diff --git a/cognite/client/_api/diagrams.py b/cognite/client/_api/diagrams.py index c92a9d7ab9..4fdb95c437 100644 --- a/cognite/client/_api/diagrams.py +++ b/cognite/client/_api/diagrams.py @@ -144,7 +144,7 @@ async def detect( file_ids (int | Sequence[int] | None): ID of the files, should already be uploaded in the same tenant. file_external_ids (str | SequenceNotStr[str] | None): File external ids, alternative to file_ids and file_references. file_instance_ids (NodeId | Sequence[NodeId] | None): Files to detect in, specified by instance id. - file_references (list[FileReference] | FileReference | None): File references (id, external_id or instance_id), and first_page and last_page to specify page ranges per file. Each reference can specify up to 50 pages. Providing a page range will also make the page count of the document a part of the response. + file_references (list[contextualization.FileReference] | contextualization.FileReference | None): File references (id, external_id or instance_id), and first_page and last_page to specify page ranges per file. Each reference can specify up to 50 pages. Providing a page range will also make the page count of the document a part of the response. pattern_mode (bool | None): If True, entities must be provided with a sample field. This enables detecting tags that are similar to the sample, but not necessarily identical. Defaults to None. configuration (DiagramDetectConfig | None): Additional configuration for the detect algorithm. See `DiagramDetectConfig` class documentation and `beta API docs `_. multiple_jobs (bool): Enables you to publish multiple jobs. If True the method returns a tuple of DetectJobBundle and list of potentially unposted files. If False it will return a single DiagramDetectResults. Defaults to False. @@ -223,7 +223,7 @@ async def detect( >>> job = client.diagrams.detect(entities=[{"name": "A1"}], file_id=123, config=config) Check the documentation for `DiagramDetectConfig` for more information on the available options. - """ + """ # noqa: DOC105 items = self._process_file_ids(file_ids, file_external_ids, file_instance_ids, file_references) entities_dumped = [ entity.dump(camel_case=True) if isinstance(entity, CogniteResource) else entity for entity in entities diff --git a/cognite/client/_sync_api/diagrams.py b/cognite/client/_sync_api/diagrams.py index b8a601be94..61f2ded613 100644 --- a/cognite/client/_sync_api/diagrams.py +++ b/cognite/client/_sync_api/diagrams.py @@ -1,6 +1,6 @@ """ =============================================================================== -6f405a44b9af327b96291aa79765b1f2 +f3ee463c974a23fb18aed9753a979783 This file is auto-generated from the Async API modules, - do not edit manually! =============================================================================== """ @@ -98,7 +98,7 @@ def detect( file_ids (int | Sequence[int] | None): ID of the files, should already be uploaded in the same tenant. file_external_ids (str | SequenceNotStr[str] | None): File external ids, alternative to file_ids and file_references. file_instance_ids (NodeId | Sequence[NodeId] | None): Files to detect in, specified by instance id. - file_references (list[FileReference] | FileReference | None): File references (id, external_id or instance_id), and first_page and last_page to specify page ranges per file. Each reference can specify up to 50 pages. Providing a page range will also make the page count of the document a part of the response. + file_references (list[contextualization.FileReference] | contextualization.FileReference | None): File references (id, external_id or instance_id), and first_page and last_page to specify page ranges per file. Each reference can specify up to 50 pages. Providing a page range will also make the page count of the document a part of the response. pattern_mode (bool | None): If True, entities must be provided with a sample field. This enables detecting tags that are similar to the sample, but not necessarily identical. Defaults to None. configuration (DiagramDetectConfig | None): Additional configuration for the detect algorithm. See `DiagramDetectConfig` class documentation and `beta API docs `_. multiple_jobs (bool): Enables you to publish multiple jobs. If True the method returns a tuple of DetectJobBundle and list of potentially unposted files. If False it will return a single DiagramDetectResults. Defaults to False. @@ -177,7 +177,7 @@ def detect( >>> job = client.diagrams.detect(entities=[{"name": "A1"}], file_id=123, config=config) Check the documentation for `DiagramDetectConfig` for more information on the available options. - """ + """ # noqa: DOC105 return run_sync( self.__async_client.diagrams.detect( entities=entities, diff --git a/docs/source/data_modeling.rst b/docs/source/data_modeling.rst index af2bb93b23..c9e1b2e0dc 100644 --- a/docs/source/data_modeling.rst +++ b/docs/source/data_modeling.rst @@ -329,3 +329,9 @@ Debugging Data Classes .. automodule:: cognite.client.data_classes.data_modeling.debug :members: :show-inheritance: + +Data Types +---------- +.. automodule:: cognite.client.data_classes.data_modeling.data_types + :members: + :show-inheritance: diff --git a/scripts/custom_checks/docstrings.py b/scripts/custom_checks/docstrings.py index 496b024172..e1b19097ca 100644 --- a/scripts/custom_checks/docstrings.py +++ b/scripts/custom_checks/docstrings.py @@ -20,6 +20,8 @@ import numpy as np +from cognite.client._api.diagrams import DiagramsAPI +from cognite.client._sync_api.diagrams import SyncDiagramsAPI from cognite.client.data_classes.data_modeling.query import Query, QuerySync from cognite.client.data_classes.functions import FunctionHandle from cognite.client.utils._text import shorten @@ -29,6 +31,8 @@ (Query, "__init__"), # Reason (Generics[...]): Avoid showing (bounded) type var instead of actual class (QuerySync, "__init__"), # Reason (Generics[...]): Avoid showing (bounded) type var instead of actual class (FunctionHandle, "__init__"), # Reason: Protocol class doesn't have __init__ with return type + (DiagramsAPI, "detect"), # Reason: References FileReference, which there are two of in the documentation + (SyncDiagramsAPI, "detect"), # Reason: References FileReference, which there are two of in the documentation } # Helper for testing specific class + method/property: