Skip to content

Commit

Permalink
update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereiracgn committed Dec 2, 2024
1 parent 5d09fb0 commit 016227c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
25 changes: 14 additions & 11 deletions cognite/client/_api/simulators/simulator_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,18 @@ def list(
List simulator model revisions
Args:
limit (int): The maximum number of model revisions to return. Defaults to 100.
limit (int): The maximum number of simulator model revisions to return. Defaults to 100.
filter (SimulatorModelRevisionsFilter | dict[str, Any] | None): The filter to narrow down simulator model revisions.
Returns:
SimulatorModelRevisionList: List all simulator model revisions
SimulatorModelRevisionList: List of simulator model revisions
Examples:
List simulators model revisions:
>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.simulators.models.routines.list()
List simulator model revisions:
>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.simulators.models.revisions.list()
"""
self._warning.warn()
Expand Down Expand Up @@ -78,11 +77,15 @@ def retrieve(self, id: int | None = None, external_id: str | None = None) -> Sim
Examples:
Retrieve simulator model revisions:
Get simulator model revisions by id:
>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.simulators.models.revisions.retrieve(ids=[1, 2, 3])
>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.simulators.models.revisions.retrieve(external_id="1")
Get simulator model revisions by external id:
>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.simulators.models.revisions.retrieve(external_ids=["abc", "def"])
"""
identifiers = IdentifierSequence.load(ids=id, external_ids=external_id).as_singleton()
Expand Down
11 changes: 5 additions & 6 deletions cognite/client/_api/simulators/simulator_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ def list(
Examples:
List simulators:
>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.simulators.routines.revisions.list()
List simulator routine revisions:
>>> from cognite.client import CogniteClient
>>> client = CogniteClient()
>>> res = client.simulators.routines.revisions.list()
"""
self._warning.warn()
Expand Down Expand Up @@ -111,7 +110,7 @@ def __init__(self, config: ClientConfig, api_version: str | None, cognite_client
def list(
self, limit: int = DEFAULT_LIMIT_READ, filter: SimulatorRoutinesFilter | dict[str, Any] | None = None
) -> SimulatorRoutineList:
"""`Filter simulator routines <https://api-docs.cognite.com/20230101-alpha/tag/Simulators/operation/filter_simulators_simulators_list_post>`_
"""`Filter simulator routines <https://developer.cognite.com/api#tag/Simulator-Routines/operation/filter_simulator_routines_simulators_routines_list_post>`_
List simulator routines
Expand Down
2 changes: 1 addition & 1 deletion cognite/client/_api/simulators/simulators.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def list(self, limit: int = DEFAULT_LIMIT_READ) -> SimulatorList:
List simulators
Args:
limit (int): The maximum number of simulators to return. Defaults to 25. Set to -1, float("inf") or None
limit (int): The maximum number of simulators to return. Defaults to 10.
Returns:
SimulatorList: List of simulators
Expand Down

0 comments on commit 016227c

Please sign in to comment.