From 47b759b1fbc66306985ec9b844ecd1b8244ac75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20V=2E=20Treider?= Date: Thu, 19 Oct 2023 21:59:24 +0200 Subject: [PATCH] Fix docstrings in data modeling (#1430) --- .../data_classes/data_modeling/containers.py | 6 +++--- .../data_classes/data_modeling/instances.py | 18 +++++++++--------- .../data_classes/data_modeling/spaces.py | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cognite/client/data_classes/data_modeling/containers.py b/cognite/client/data_classes/data_modeling/containers.py index 418c59a1e6..7e628dea16 100644 --- a/cognite/client/data_classes/data_modeling/containers.py +++ b/cognite/client/data_classes/data_modeling/containers.py @@ -23,7 +23,7 @@ class ContainerCore(DataModelingResource): """Represent the physical storage of data. This is the base class for the read and write version. Args: - space (str): The workspace for the view, a unique identifier for the space. + space (str): The workspace for the container, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the view. properties (dict[str, ContainerProperty]): We index the property by a local unique identifier. description (str | None): Textual description of the view @@ -85,7 +85,7 @@ class ContainerApply(ContainerCore): """Represent the physical storage of data. This is the write format of the container Args: - space (str): The workspace for the view, a unique identifier for the space. + space (str): The workspace for the container, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the view. properties (dict[str, ContainerProperty]): We index the property by a local unique identifier. description (str | None): Textual description of the view @@ -114,7 +114,7 @@ class Container(ContainerCore): """Represent the physical storage of data. This is the read format of the container Args: - space (str): The workspace for the view, a unique identifier for the space. + space (str): The workspace for the container, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the view. properties (dict[str, ContainerProperty]): We index the property by a local unique identifier. is_global (bool): Whether this is a global container, i.e., one of the out-of-the-box models. diff --git a/cognite/client/data_classes/data_modeling/instances.py b/cognite/client/data_classes/data_modeling/instances.py index 983a530e3b..1c5c185c0c 100644 --- a/cognite/client/data_classes/data_modeling/instances.py +++ b/cognite/client/data_classes/data_modeling/instances.py @@ -103,7 +103,7 @@ def dump(self, camel_case: bool = False) -> dict: class InstanceCore(DataModelingResource): """A node or edge Args: - space (str): The workspace for the instance.a unique identifier for the space. + space (str): The workspace for the instance, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the instance. instance_type (Literal["node", "edge"]): No description. """ @@ -118,7 +118,7 @@ class InstanceApply(InstanceCore): """A node or edge. This is the write version of the instance. Args: - space (str): The workspace for the instance.a unique identifier for the space. + space (str): The workspace for the instance, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the instance. instance_type (Literal["node", "edge"]): No description. existing_version (int | None): Fail the ingestion request if the node's version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or instance). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request. @@ -244,7 +244,7 @@ class Instance(InstanceCore): """A node or edge. This is the read version of the instance. Args: - space (str): The workspace for the instance.a unique identifier for the space. + space (str): The workspace for the instance, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the instance. version (str): DMS version. last_updated_time (int): The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. @@ -299,7 +299,7 @@ class InstanceApplyResult(InstanceCore): Args: instance_type (Literal["node", "edge"]): The type of instance. - space (str): The workspace for the instance.a unique identifier for the space. + space (str): The workspace for the instance, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the instance. version (str): DMS version of the instance. was_modified (bool): Whether the instance was modified by the ingestion. @@ -382,7 +382,7 @@ class NodeApply(InstanceApply): """A node. This is the write version of the node. Args: - space (str): The workspace for the node.a unique identifier for the space. + space (str): The workspace for the node, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the node. existing_version (int | None): Fail the ingestion request if the node's version is greater than or equal to this value. If no existingVersion is specified, the ingestion will always overwrite any existing data for the edge (for the specified container or node). If existingVersion is set to 0, the upsert will behave as an insert, so it will fail the bulk if the item already exists. If skipOnVersionConflict is set on the ingestion request, then the item will be skipped instead of failing the ingestion request. sources (list[NodeOrEdgeData] | None): List of source properties to write. The properties are from the node and/or container the container(s) making up this node. @@ -405,7 +405,7 @@ class Node(Instance): """A node. This is the read version of the node. Args: - space (str): The workspace for the node.a unique identifier for the space. + space (str): The workspace for the node, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the node. version (str): DMS version. last_updated_time (int): The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. @@ -462,7 +462,7 @@ class NodeApplyResult(InstanceApplyResult): """A node. This represents the update on the node. Args: - space (str): The workspace for the node a unique identifier for the space. + space (str): The workspace for the node, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the node. version (str): DMS version of the node. was_modified (bool): Whether the node was modified by the ingestion. @@ -555,7 +555,7 @@ class Edge(Instance): """An Edge. This is the read version of the edge. Args: - space (str): The workspace for the edge an unique identifier for the space. + space (str): The workspace for the edge, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the edge. version (str): DMS version. type (DirectRelationReference): The type of edge. @@ -642,7 +642,7 @@ class EdgeApplyResult(InstanceApplyResult): """An Edge. This represents the update on the edge. Args: - space (str): The workspace for the edge a unique identifier for the space. + space (str): The workspace for the edge, a unique identifier for the space. external_id (str): Combined with the space is the unique identifier of the edge. version (str): DMS version. was_modified (bool): Whether the edge was modified by the ingestion. diff --git a/cognite/client/data_classes/data_modeling/spaces.py b/cognite/client/data_classes/data_modeling/spaces.py index 605b53dd2b..2ceb4a8291 100644 --- a/cognite/client/data_classes/data_modeling/spaces.py +++ b/cognite/client/data_classes/data_modeling/spaces.py @@ -13,7 +13,7 @@ class SpaceCore(DataModelingResource): """A workspace for data models and instances. Args: - space (str): A unique identifier for space. + space (str): A unique identifier for the space. description (str | None): Textual description of the space name (str | None): Human readable name for the space. """ @@ -31,7 +31,7 @@ class SpaceApply(SpaceCore): """A workspace for data models and instances. This is the write version Args: - space (str): A unique identifier for space. + space (str): A unique identifier for the space. description (str | None): Textual description of the space name (str | None): Human readable name for the space. **_ (Any): No description. @@ -52,7 +52,7 @@ class Space(SpaceCore): """A workspace for data models and instances. This is the read version. Args: - space (str): a unique identifier for the space. + space (str): A unique identifier for the space. is_global (bool): Whether the space is global or not. last_updated_time (int): The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds. created_time (int): The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.