Skip to content

Commit

Permalink
Fix docstrings in data modeling (#1430)
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt authored Oct 19, 2023
1 parent 60e86db commit 47b759b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions cognite/client/data_classes/data_modeling/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
18 changes: 9 additions & 9 deletions cognite/client/data_classes/data_modeling/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions cognite/client/data_classes/data_modeling/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 47b759b

Please sign in to comment.