Skip to content

Commit 5df653c

Browse files
authored
chore: Add linkcheck to github actions. Fix broken external links. (#2657)
1 parent 4976077 commit 5df653c

26 files changed

Lines changed: 85 additions & 81 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
3737
- uses: ./.github/actions/setup
38+
- name: Run docs linkcheck
39+
working-directory: ./docs
40+
run: make linkcheck SPHINXOPTS="-W"
3841
- name: Build docs
39-
run: cd docs && make html SPHINXOPTS="-W --keep-going"
42+
working-directory: ./docs
43+
run: make html SPHINXOPTS="-W"
4044

4145
build_package:
4246
runs-on: ubuntu-latest

cognite/client/_api/ai/tools/documents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async def ask_question(
7878
additional_context: str | None = None,
7979
ignore_unknown_ids: bool = False,
8080
) -> Answer:
81-
"""`Ask a question about one or more documents using a Large Language Model <https://api-docs.cognite.com/20230101/tag/Document-AI/operation/documents_summary_api_v1_projects__projectName__ai_tools_documents_summarize_post>`_.
81+
"""`Ask a question about one or more documents using a Large Language Model <https://api-docs.cognite.com/20230101/tag/Document-AI/operation/document_questioning_ai_tools_documents_ask_post>`_.
8282
8383
Supports up to 100 documents at a time.
8484

cognite/client/_api/data_modeling/instances.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ async def inspect(
771771
involved_views: InvolvedViews | None = None,
772772
involved_containers: InvolvedContainers | None = None,
773773
) -> InstanceInspectResults:
774-
"""`Reverse lookup for instances <https://developer.cognite.com/api/v1/#tag/Instances/operation/instanceInspect>`_.
774+
"""`Reverse lookup for instances <https://api-docs.cognite.com/20230101/tag/Instances/operation/instanceInspect>`_.
775775
776776
This method will return the involved views and containers for the given nodes and edges.
777777
@@ -1213,7 +1213,7 @@ async def search(
12131213
sort: Sequence[InstanceSort | dict] | InstanceSort | dict | None = None,
12141214
operator: Literal["AND", "OR"] = "AND",
12151215
) -> NodeList[T_Node] | EdgeList[T_Edge]:
1216-
"""`Search instances <https://developer.cognite.com/api/v1/#tag/Instances/operation/searchInstances>`_.
1216+
"""`Search instances <https://api-docs.cognite.com/20230101/tag/Instances/operation/searchInstances>`_.
12171217
12181218
Args:
12191219
view (ViewId): View to search in.
@@ -1376,7 +1376,7 @@ async def aggregate(
13761376
filter: Filter | dict[str, Any] | None = None,
13771377
limit: int | None = DEFAULT_LIMIT_READ,
13781378
) -> AggregatedNumberedValue | list[AggregatedNumberedValue] | InstanceAggregationResultList:
1379-
"""`Aggregate data across nodes/edges <https://developer.cognite.com/api/v1/#tag/Instances/operation/aggregateInstances>`_.
1379+
"""`Aggregate data across nodes/edges <https://api-docs.cognite.com/20230101/tag/Instances/operation/aggregateInstances>`_.
13801380
13811381
Args:
13821382
view (ViewId): View to aggregate over.
@@ -1489,7 +1489,7 @@ async def histogram(
14891489
filter: Filter | dict[str, Any] | None = None,
14901490
limit: int = DEFAULT_LIMIT_READ,
14911491
) -> HistogramValue | list[HistogramValue]:
1492-
"""`Produces histograms for nodes/edges <https://developer.cognite.com/api/v1/#tag/Instances/operation/aggregateInstances>`_.
1492+
"""`Produces histograms for nodes/edges <https://api-docs.cognite.com/20230101/tag/Instances/operation/aggregateInstances>`_.
14931493
14941494
Args:
14951495
view (ViewId): View to to aggregate over.
@@ -1558,7 +1558,7 @@ async def histogram(
15581558
async def query(
15591559
self, query: Query, include_typing: bool = False, debug: DebugParameters | None = None
15601560
) -> QueryResult:
1561-
"""`Advanced query interface for nodes/edges <https://developer.cognite.com/api/v1/#tag/Instances/operation/queryContent>`_.
1561+
"""`Advanced query interface for nodes/edges <https://api-docs.cognite.com/20230101/tag/Instances/operation/queryContent>`_.
15621562
15631563
The Data Modelling API exposes an advanced query interface. The query interface supports parameterization,
15641564
recursive edge traversal, chaining of result sets, and granular property selection.
@@ -1652,7 +1652,7 @@ async def query(
16521652
async def sync(
16531653
self, query: QuerySync, include_typing: bool = False, debug: DebugParameters | None = None
16541654
) -> QueryResult:
1655-
"""`Subscription to changes for nodes/edges <https://developer.cognite.com/api/v1/#tag/Instances/operation/syncContent>`_.
1655+
"""`Subscription to changes for nodes/edges <https://api-docs.cognite.com/20230101/tag/Instances/operation/syncContent>`_.
16561656
16571657
Subscribe to changes for nodes and edges in a project, matching a supplied filter.
16581658

cognite/client/_api/functions/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ async def create(
201201
memory (float | None): Memory per function measured in GB. Allowed range and default value are given by the `limits endpoint. <https://api-docs.cognite.com/20230101/tag/Functions/operation/functionsLimits>`_, and None translates to the API default. On Azure, only the default value is used.
202202
runtime (RunTime | None): The function runtime. Valid values are ["py310", "py311", "py312", "py313", `None`], and `None` translates to the API default which will change over time. The runtime "py313" resolves to the latest version of the Python 3.13 series.
203203
metadata (dict[str, str] | None): Metadata for the function as key/value pairs. Key & values can be at most 32, 512 characters long respectively. You can have at the most 16 key-value pairs, with a maximum size of 512 bytes.
204-
index_url (str | None): Index URL for Python Package Manager to use. Be aware of the intrinsic security implications of using the `index_url` option. `More information can be found on official docs, <https://docs.cognite.com/cdf/functions/#additional-arguments>`_
205-
extra_index_urls (list[str] | None): Extra Index URLs for Python Package Manager to use. Be aware of the intrinsic security implications of using the `extra_index_urls` option. `More information can be found on official docs, <https://docs.cognite.com/cdf/functions/#additional-arguments>`_
204+
index_url (str | None): Index URL for Python Package Manager to use. Be aware of the intrinsic security implications of using the `index_url` option. `More information can be found on official docs, <https://docs.cognite.com/cdf/functions/use_functions#additional-arguments>`_
205+
extra_index_urls (list[str] | None): Extra Index URLs for Python Package Manager to use. Be aware of the intrinsic security implications of using the `extra_index_urls` option. `More information can be found on official docs, <https://docs.cognite.com/cdf/functions/use_functions#additional-arguments>`_
206206
skip_folder_validation (bool): When creating a function using the 'folder' argument, pass True to skip the extra validation step that attempts to import the module. Skipping can be useful when your function requires several heavy packages to already be installed locally. Defaults to False.
207207
data_set_id (int | None): Data set to upload the function code to. Note: Does not affect the function itself.
208208

cognite/client/_api/simulators/models_revisions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ async def create(
279279
)
280280

281281
async def retrieve_data(self, model_revision_external_id: str) -> SimulatorModelRevisionDataList:
282-
"""`Filter simulator model revision data <https://api-docs.cognite.com/20230101-alpha/tag/Simulator-Models/operation/get_simulator_model_revision_data_by_id>`_
282+
"""`Filter simulator model revision data <https://api-docs.cognite.com/20230101-alpha/tag/Simulator-Models/operation/retrieve_simulator_model_revision_data>`_
283283
284284
Retrieves a list of simulator model revisions data that match the given criteria.
285285

cognite/client/_api/simulators/runs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ async def list_run_data(
307307
self,
308308
run_id: int,
309309
) -> SimulationRunDataList:
310-
"""`Get simulation run data <https://api-docs.cognite.com/20230101/tag/Simulation-Runs/operation/simulation_data_by_run_id_simulators_runs_data_list_post>`_
310+
"""`Get simulation run data <https://api-docs.cognite.com/20230101/tag/Simulation-Runs/operation/retrieve_simulation_run_data>`_
311311
312312
Retrieve data associated with a simulation run by ID.
313313

cognite/client/_api/synthetic_time_series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def query(
101101
"""`Calculate the result of a function on time series <https://api-docs.cognite.com/20230101/tag/Synthetic-Time-Series/operation/querySyntheticTimeseries>`_.
102102
103103
Info:
104-
You can read the guide to synthetic time series in our `documentation <https://docs.cognite.com/dev/concepts/resource_types/synthetic_timeseries>`_.
104+
You can read the guide to synthetic time series in our `documentation <https://docs.cognite.com/api-reference/concepts/20230101/synthetic-time-series>`_.
105105
106106
Args:
107107
expressions (str | sympy.Basic | Sequence[str] | Sequence[sympy.Basic]): Functions to be calculated. Supports both strings and sympy expressions. Strings can have either the API `ts{}` syntax, or contain variable names to be replaced using the `variables` parameter.

cognite/client/_api/workflows/versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def upsert(self, version: Sequence[WorkflowVersionUpsert]) -> WorkflowVers
9292
async def upsert(
9393
self, version: WorkflowVersionUpsert | Sequence[WorkflowVersionUpsert], mode: Literal["replace"] = "replace"
9494
) -> WorkflowVersion | WorkflowVersionList:
95-
"""`Create one or more workflow version(s) <https://api-docs.cognite.com/20230101/tag/Workflows/operation/CreateOrUpdateWorkflowVersion>`_.
95+
"""`Create one or more workflow version(s) <https://api-docs.cognite.com/20230101/tag/Workflow-versions/operation/CreateOrUpdateWorkflowVersion/>`_.
9696
9797
Note this is an upsert endpoint, so workflow versions that already exist will be updated, and new ones will be created.
9898

cognite/client/_cognite_client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def default(
260260
261261
The default configuration creates the URLs based on the project and cluster:
262262
263-
* Base URL: "https://{cdf_cluster}.cognitedata.com/
263+
* Base URL: ``"https://{cdf_cluster}.cognitedata.com/"``
264264
265265
Args:
266266
project (str): The CDF project.
@@ -288,9 +288,9 @@ def default_oauth_client_credentials(
288288
289289
The default configuration creates the URLs based on the project and cluster:
290290
291-
* Base URL: "https://{cdf_cluster}.cognitedata.com/
292-
* Token URL: "https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token"
293-
* Scopes: [f"https://{cdf_cluster}.cognitedata.com/.default"]
291+
* Base URL: ``"https://{cdf_cluster}.cognitedata.com/"``
292+
* Token URL: ``"https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token"``
293+
* Scopes: ``[f"https://{cdf_cluster}.cognitedata.com/.default"]``
294294
295295
Args:
296296
project (str): The CDF project.
@@ -320,9 +320,9 @@ def default_oauth_interactive(
320320
321321
The default configuration creates the URLs based on the tenant_id and cluster:
322322
323-
* Base URL: "https://{cdf_cluster}.cognitedata.com/
324-
* Authority URL: "https://login.microsoftonline.com/{tenant_id}"
325-
* Scopes: [f"https://{cdf_cluster}.cognitedata.com/.default"]
323+
* Base URL: ``"https://{cdf_cluster}.cognitedata.com/"``
324+
* Authority URL: ``"https://login.microsoftonline.com/{tenant_id}"``
325+
* Scopes: ``[f"https://{cdf_cluster}.cognitedata.com/.default"]``
326326
327327
Args:
328328
project (str): The CDF project.

cognite/client/_sync_api/ai/tools/documents.py

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)