diff --git a/cognite/client/_api/datapoints.py b/cognite/client/_api/datapoints.py index 914cedcfe6..d1398115d0 100644 --- a/cognite/client/_api/datapoints.py +++ b/cognite/client/_api/datapoints.py @@ -589,7 +589,7 @@ async def __call__( chunk_size_time_series: int | None = None, return_arrays: bool = True, ) -> AsyncIterator[DatapointsArray | DatapointsArrayList | Datapoints | DatapointsList]: - """`Iterate through datapoints in chunks, for one or more time series. `_ + """`Iterate through datapoints in chunks, for one or more time series `_. Note: Control memory usage by specifying ``chunk_size_time_series``, how many time series to iterate simultaneously and ``chunk_size_datapoints``, diff --git a/cognite/client/_sync_api/datapoints.py b/cognite/client/_sync_api/datapoints.py index e19f20118a..8d4d0386f0 100644 --- a/cognite/client/_sync_api/datapoints.py +++ b/cognite/client/_sync_api/datapoints.py @@ -1,6 +1,6 @@ """ =============================================================================== -830266fb5fd8d205e7c1163175ba904e +7a135c3c2b851240417e3902f71b5222 This file is auto-generated from the Async API modules, - do not edit manually! =============================================================================== """ @@ -91,7 +91,7 @@ def __call__( return_arrays: bool = True, ) -> Iterator[DatapointsArray | DatapointsArrayList | Datapoints | DatapointsList]: """ - `Iterate through datapoints in chunks, for one or more time series. `_ + `Iterate through datapoints in chunks, for one or more time series `_. Note: Control memory usage by specifying ``chunk_size_time_series``, how many time series to iterate simultaneously and ``chunk_size_datapoints``, diff --git a/docs/source/_ext/autosummary.py b/docs/source/_ext/autosummary.py index ecae633d4f..2805912e2e 100644 --- a/docs/source/_ext/autosummary.py +++ b/docs/source/_ext/autosummary.py @@ -56,7 +56,8 @@ def run(self): methods = [ method_name for method_name in attributes - if callable(getattr(obj, method_name)) and not method_name.startswith("_") + if callable(getattr(obj, method_name)) + and (not method_name.startswith("_") or method_name == "__call__") ] content.extend([f"{name}.{method}" for method in methods]) if "attributes" in self.options: diff --git a/docs/source/_templates/custom-accessor-template.rst b/docs/source/_templates/custom-accessor-template.rst index d3e6ff0450..7a9bfe2218 100644 --- a/docs/source/_templates/custom-accessor-template.rst +++ b/docs/source/_templates/custom-accessor-template.rst @@ -1,7 +1,7 @@ {% if objname in headings %} {{headings[objname] | escape | underline }} {% else %} -{{ objname.split('.')[-1].replace('_', ' ').title() | escape | underline }} +{{ objname.split('.')[-1].replace('_', ' ').strip().title() | escape | underline }} {% endif %} .. currentmodule:: {{ module }} diff --git a/docs/source/_templates/custom-automethods-template.rst b/docs/source/_templates/custom-automethods-template.rst index 9e25cfab6f..8d4c3b1ed3 100644 --- a/docs/source/_templates/custom-automethods-template.rst +++ b/docs/source/_templates/custom-automethods-template.rst @@ -9,6 +9,10 @@ .. autosummary:: :toctree: :template: custom-accessor-template.rst + +{% if "__call__" in members %} + {{ name }}.__call__ +{% endif %} {% for item in methods %} {%- if item != "__init__" %} {{ name }}.{{ item }} diff --git a/docs/source/headings.py b/docs/source/headings.py index 312f542687..bb1d665593 100644 --- a/docs/source/headings.py +++ b/docs/source/headings.py @@ -24,24 +24,29 @@ "AsyncCogniteClient.iam.user_profiles.me": "Get my own user profile", "AsyncCogniteClient.iam.user_profiles.retrieve": "Retrieve one or more user profiles", "AsyncCogniteClient.iam.user_profiles.search": "Search for user profiles", + "AsyncCogniteClient.data_modeling.data_models.__call__": "Iterate over data models", "AsyncCogniteClient.data_modeling.data_models.apply": "Apply data models", "AsyncCogniteClient.data_modeling.data_models.delete": "Delete data models", "AsyncCogniteClient.data_modeling.data_models.list": "List data models", "AsyncCogniteClient.data_modeling.data_models.retrieve": "Retrieve data models by id(s)", + "AsyncCogniteClient.data_modeling.spaces.__call__": "Iterate over spaces", "AsyncCogniteClient.data_modeling.spaces.apply": "Apply spaces", "AsyncCogniteClient.data_modeling.spaces.delete": "Delete spaces", "AsyncCogniteClient.data_modeling.spaces.list": "List spaces", "AsyncCogniteClient.data_modeling.spaces.retrieve": "Retrieve a space by id", + "AsyncCogniteClient.data_modeling.views.__call__": "Iterate over views", "AsyncCogniteClient.data_modeling.views.apply": "Apply views", "AsyncCogniteClient.data_modeling.views.delete": "Delete views", "AsyncCogniteClient.data_modeling.views.list": "List views", "AsyncCogniteClient.data_modeling.views.retrieve": "Retrieve views by id(s)", + "AsyncCogniteClient.data_modeling.containers.__call__": "Iterate over containers", "AsyncCogniteClient.data_modeling.containers.apply": "Apply containers", "AsyncCogniteClient.data_modeling.containers.delete": "Delete containers", "AsyncCogniteClient.data_modeling.containers.delete_constraints": "Delete constraints", "AsyncCogniteClient.data_modeling.containers.delete_indexes": "Delete indexes", "AsyncCogniteClient.data_modeling.containers.list": "List containers", "AsyncCogniteClient.data_modeling.containers.retrieve": "Retrieve containers by id(s)", + "AsyncCogniteClient.data_modeling.instances.__call__": "Iterate over instances", "AsyncCogniteClient.data_modeling.instances.aggregate": "Aggregate instances", "AsyncCogniteClient.data_modeling.instances.apply": "Apply instances", "AsyncCogniteClient.data_modeling.instances.delete": "Delete instances", @@ -65,6 +70,7 @@ "AsyncCogniteClient.agents.upsert": "Create or update an agent", "AsyncCogniteClient.ai.tools.documents.ask_question": "Document Question Answering", "AsyncCogniteClient.ai.tools.documents.summarize": "Document Summarization", + "AsyncCogniteClient.assets.__call__": "Iterate over assets", "AsyncCogniteClient.assets.aggregate_cardinality_properties": "Aggregate Asset Property Cardinality", "AsyncCogniteClient.assets.aggregate_cardinality_values": "Aggregate Asset Value Cardinality", "AsyncCogniteClient.assets.aggregate_count": "Aggregate Asset Count", @@ -80,6 +86,7 @@ "AsyncCogniteClient.assets.search": "Search for assets", "AsyncCogniteClient.assets.update": "Update assets", "AsyncCogniteClient.assets.upsert": "Upsert assets", + "AsyncCogniteClient.events.__call__": "Iterate over events", "AsyncCogniteClient.events.aggregate_cardinality_properties": "Aggregate Event Property Cardinality", "AsyncCogniteClient.events.aggregate_cardinality_values": "Aggregate Event Values Cardinality", "AsyncCogniteClient.events.aggregate_count": "Aggregate Event Count", @@ -93,6 +100,7 @@ "AsyncCogniteClient.events.search": "Search for events", "AsyncCogniteClient.events.update": "Update events", "AsyncCogniteClient.events.upsert": "Upsert events", + "AsyncCogniteClient.documents.__call__": "Iterate Over Documents", "AsyncCogniteClient.documents.aggregate_cardinality_properties": "Aggregate Document Count", "AsyncCogniteClient.documents.aggregate_cardinality_values": "Aggregate Document Value Cardinality", "AsyncCogniteClient.documents.aggregate_count": "Aggregate Document Count", @@ -107,6 +115,7 @@ "AsyncCogniteClient.documents.previews.download_page_as_png": "Download Image Preview to Path", "AsyncCogniteClient.documents.previews.download_page_as_png_bytes": "Download Image Preview Bytes", "AsyncCogniteClient.documents.previews.retrieve_pdf_link": "Retrieve PDF Preview Temporary Link", + "AsyncCogniteClient.files.__call__": "Iterate over files", "AsyncCogniteClient.files.aggregate_count": "Aggregate files metadata", "AsyncCogniteClient.files.retrieve": "Retrieve file metadata by id", "AsyncCogniteClient.files.retrieve_multiple": "Retrieve multiple files’ metadata by id", # noqa: RUF001 @@ -119,6 +128,7 @@ "AsyncCogniteClient.files.upload_content_bytes": "Upload a file content in string or bytes", "AsyncCogniteClient.files.multipart_upload_session": "Upload a file in multiple parts", "AsyncCogniteClient.files.multipart_upload_content_session": "Upload a file content in multiple parts", + "AsyncCogniteClient.time_series.__call__": "Iterate over time series", "AsyncCogniteClient.time_series.aggregate_cardinality_properties": "Aggregate Time Series Property Cardinality", "AsyncCogniteClient.time_series.aggregate_cardinality_values": "Aggregate Time Series Values Cardinality", "AsyncCogniteClient.time_series.aggregate_count": "Aggregate Time Series Count", @@ -143,6 +153,7 @@ "AsyncCogniteClient.time_series.data.delete_ranges": "Delete ranges of datapoints", "AsyncCogniteClient.time_series.data.insert_dataframe": "Insert pandas dataframe", "AsyncCogniteClient.time_series.data.__call__": "Iterate through datapoints in chunks", + "AsyncCogniteClient.time_series.subscriptions.__call__": "Iterate over datapoints subscriptions", "AsyncCogniteClient.time_series.subscriptions.create": "Create datapoint subscriptions", "AsyncCogniteClient.time_series.subscriptions.delete": "Delete datapoint subscription", "AsyncCogniteClient.time_series.subscriptions.list": "List datapoint subscriptions", @@ -150,6 +161,7 @@ "AsyncCogniteClient.time_series.subscriptions.update": "Update datapoint subscription", "AsyncCogniteClient.time_series.subscriptions.list_member_time_series": "List member time series of subscription", "AsyncCogniteClient.time_series.subscriptions.iterate_data": "Iterate over subscriptions data", + "AsyncCogniteClient.sequences.__call__": "Iterate over sequences", "AsyncCogniteClient.sequences.aggregate_cardinality_properties": "Aggregate Sequences Property Cardinality", "AsyncCogniteClient.sequences.aggregate_cardinality_values": "Aggregate Sequences Value Cardinality", "AsyncCogniteClient.sequences.aggregate_count": "Aggregate Sequences Count", @@ -170,11 +182,13 @@ "AsyncCogniteClient.sequences.data.retrieve": "Retrieve rows", "AsyncCogniteClient.sequences.data.retrieve_dataframe": "Retrieve rows in a pandas dataframe", "AsyncCogniteClient.sequences.data.retrieve_last_row": "Retrieve last row", + "AsyncCogniteClient.three_d.models.__call__": "Iterate over 3D models", "AsyncCogniteClient.three_d.models.create": "Create models", "AsyncCogniteClient.three_d.models.delete": "Delete models", "AsyncCogniteClient.three_d.models.list": "List models", "AsyncCogniteClient.three_d.models.retrieve": "Retrieve a model by ID", "AsyncCogniteClient.three_d.models.update": "Update models", + "AsyncCogniteClient.three_d.revisions.__call__": "Iterate over 3D model revisions", "AsyncCogniteClient.three_d.revisions.create": "Create a revision", "AsyncCogniteClient.three_d.revisions.delete": "Delete revisions", "AsyncCogniteClient.three_d.revisions.filter_nodes": "Filter nodes", @@ -212,6 +226,7 @@ "AsyncCogniteClient.raw.rows.list": "List rows in a table", "AsyncCogniteClient.raw.rows.retrieve": "Get a row from a table", "AsyncCogniteClient.raw.rows.retrieve_dataframe": "Retrieve pandas dataframe", + "AsyncCogniteClient.extraction_pipelines.__call__": "Iterate over extraction pipelines", "AsyncCogniteClient.extraction_pipelines.create": "Create extraction pipeline", "AsyncCogniteClient.extraction_pipelines.delete": "Delete extraction pipelines", "AsyncCogniteClient.extraction_pipelines.list": "List extraction pipelines", @@ -224,6 +239,7 @@ "AsyncCogniteClient.extraction_pipelines.config.list": "List configuration revisions", "AsyncCogniteClient.extraction_pipelines.config.retrieve": "Get the latest or a specific config revision", "AsyncCogniteClient.extraction_pipelines.config.revert": "Revert to an earlier config revision", + "AsyncCogniteClient.transformations.__call__": "Iterate over transformations", "AsyncCogniteClient.transformations.cancel": "Cancel transformation run by id", "AsyncCogniteClient.transformations.create": "Create transformations", "AsyncCogniteClient.transformations.list": "List transformations", @@ -232,12 +248,14 @@ "AsyncCogniteClient.transformations.retrieve_multiple": "Retrieve transformations by id", "AsyncCogniteClient.transformations.run": "Run transformations by id", "AsyncCogniteClient.transformations.update": "Update transformations", + "AsyncCogniteClient.transformations.schedules.__call__": "Iterate over transformation schedules", "AsyncCogniteClient.transformations.schedules.create": "Create transformation Schedules", "AsyncCogniteClient.transformations.schedules.delete": "Delete transformation schedules", "AsyncCogniteClient.transformations.schedules.list": "List transformation schedules", "AsyncCogniteClient.transformations.schedules.retrieve": "Retrieve transformation schedules", "AsyncCogniteClient.transformations.schedules.retrieve_multiple": "Retrieve multiple transformation schedules", "AsyncCogniteClient.transformations.schedules.update": "Update transformation schedules", + "AsyncCogniteClient.transformations.notifications.__call__": "Iterate over transformation notifications", "AsyncCogniteClient.transformations.notifications.create": "Create transformation notifications", "AsyncCogniteClient.transformations.notifications.delete": "Delete transformation notifications", "AsyncCogniteClient.transformations.notifications.list": "List transformation notifications", @@ -245,6 +263,7 @@ "AsyncCogniteClient.transformations.jobs.retrieve": "Retrieve transformation jobs", "AsyncCogniteClient.transformations.jobs.retrieve_multiple": "Retrieve transformation jobs", "AsyncCogniteClient.transformations.schema.retrieve": "Get transformation schema", + "AsyncCogniteClient.functions.__call__": "Iterate over functions", "AsyncCogniteClient.functions.call": "Call function", "AsyncCogniteClient.functions.create": "Create function", "AsyncCogniteClient.functions.delete": "Delete function", @@ -255,15 +274,18 @@ "AsyncCogniteClient.functions.calls.get_response": "Retrieve function call response", "AsyncCogniteClient.functions.calls.list": "List function calls", "AsyncCogniteClient.functions.calls.retrieve": "Retrieve function call", + "AsyncCogniteClient.functions.schedules.__call__": "Iterate over function schedules", "AsyncCogniteClient.functions.schedules.create": "Create function schedule", "AsyncCogniteClient.functions.schedules.delete": "Delete function schedule", "AsyncCogniteClient.functions.schedules.list": "List function schedules", "AsyncCogniteClient.functions.schedules.retrieve": "Retrieve function schedule", "AsyncCogniteClient.functions.schedules.get_input_data": "Get function schedule input data", + "AsyncCogniteClient.workflows.__call__": "Iterate over workflows", "AsyncCogniteClient.workflows.delete": "Delete Workflows", "AsyncCogniteClient.workflows.list": "List Workflows", "AsyncCogniteClient.workflows.retrieve": "Retrieve Workflows", "AsyncCogniteClient.workflows.upsert": "Upsert Workflows", + "AsyncCogniteClient.workflows.versions.__call__": "Iterate over workflow versions", "AsyncCogniteClient.workflows.versions.delete": "Delete Workflow Versions", "AsyncCogniteClient.workflows.versions.list": "List Workflow Versions", "AsyncCogniteClient.workflows.versions.retrieve": "Retrieve Workflow Versions", @@ -280,25 +302,32 @@ "AsyncCogniteClient.workflows.triggers.pause": "Pause Trigger", "AsyncCogniteClient.workflows.triggers.resume": "Resume Trigger", "AsyncCogniteClient.workflows.triggers.upsert": "Upsert Trigger", + "AsyncCogniteClient.simulators.__call__": "Iterate over simulators", "AsyncCogniteClient.simulators.list": "List simulators", + "AsyncCogniteClient.simulators.integrations.__call__": "Iterate over simulator integrations", "AsyncCogniteClient.simulators.integrations.delete": "Delete simulator integration", "AsyncCogniteClient.simulators.integrations.list": "List simulator integrations", + "AsyncCogniteClient.simulators.models.__call__": "Iterate over simulator models", "AsyncCogniteClient.simulators.models.create": "Create simulator models", "AsyncCogniteClient.simulators.models.delete": "Delete simulator models", "AsyncCogniteClient.simulators.models.list": "List simulator models", "AsyncCogniteClient.simulators.models.retrieve": "Retrieve simulator models", "AsyncCogniteClient.simulators.models.update": "Update simulator models", + "AsyncCogniteClient.simulators.models.revisions.__call__": "Iterate over simulator model revisions", "AsyncCogniteClient.simulators.models.revisions.create": "Create simulator model revisions", "AsyncCogniteClient.simulators.models.revisions.list": "List simulator model revisions", "AsyncCogniteClient.simulators.models.revisions.retrieve": "Retrieve simulator model revisions", "AsyncCogniteClient.simulators.models.revisions.retrieve_data": "Retrieve simulator model revisions data", + "AsyncCogniteClient.simulators.routines.__call__": "Iterate over simulator routines", "AsyncCogniteClient.simulators.routines.create": "Create simulator routines", "AsyncCogniteClient.simulators.routines.delete": "Delete simulator routines", "AsyncCogniteClient.simulators.routines.list": "List simulator routines", "AsyncCogniteClient.simulators.routines.run": "Run simulator routines", + "AsyncCogniteClient.simulators.routines.revisions.__call__": "Iterate over simulator routine revisions", "AsyncCogniteClient.simulators.routines.revisions.create": "Create simulator routine revisions", "AsyncCogniteClient.simulators.routines.revisions.list": "List simulator routine revisions", "AsyncCogniteClient.simulators.routines.revisions.retrieve": "Retrieve simulator routine revisions", + "AsyncCogniteClient.simulators.runs.__call__": "Iterate over simulation runs", "AsyncCogniteClient.simulators.runs.create": "Create simulation runs", "AsyncCogniteClient.simulators.runs.list": "List simulation runs", "AsyncCogniteClient.simulators.runs.list_run_data": "List simulation run data", @@ -326,11 +355,13 @@ "AsyncCogniteClient.units.list": "List Units", "AsyncCogniteClient.units.retrieve": "Retrieve Unit", "AsyncCogniteClient.units.systems.list": "List Unit System", + "AsyncCogniteClient.hosted_extractors.sources.__call__": "Iterate over sources", "AsyncCogniteClient.hosted_extractors.sources.create": "Create new source", "AsyncCogniteClient.hosted_extractors.sources.delete": "Delete source", "AsyncCogniteClient.hosted_extractors.sources.list": "List sources", "AsyncCogniteClient.hosted_extractors.sources.retrieve": "Retrieve sources", "AsyncCogniteClient.hosted_extractors.sources.update": "Update sources", + "AsyncCogniteClient.hosted_extractors.jobs.__call__": "Iterate over jobs", "AsyncCogniteClient.hosted_extractors.jobs.create": "Create new job", "AsyncCogniteClient.hosted_extractors.jobs.delete": "Delete job", "AsyncCogniteClient.hosted_extractors.jobs.list": "List jobs", @@ -338,21 +369,25 @@ "AsyncCogniteClient.hosted_extractors.jobs.list_metrics": "List job metrics", "AsyncCogniteClient.hosted_extractors.jobs.retrieve": "Retrieve jobs", "AsyncCogniteClient.hosted_extractors.jobs.update": "Update jobs", + "AsyncCogniteClient.hosted_extractors.destinations.__call__": "Iterate over destinations", "AsyncCogniteClient.hosted_extractors.destinations.create": "Create new destinations", "AsyncCogniteClient.hosted_extractors.destinations.delete": "Delete destinations", "AsyncCogniteClient.hosted_extractors.destinations.list": "List destinations", "AsyncCogniteClient.hosted_extractors.destinations.retrieve": "Retrieve destinations", "AsyncCogniteClient.hosted_extractors.destinations.update": "Update destinations", + "AsyncCogniteClient.hosted_extractors.mappings.__call__": "Iterate over mappings", "AsyncCogniteClient.hosted_extractors.mappings.create": "Create new mappings", "AsyncCogniteClient.hosted_extractors.mappings.delete": "Delete mappings", "AsyncCogniteClient.hosted_extractors.mappings.list": "List mappings", "AsyncCogniteClient.hosted_extractors.mappings.retrieve": "Retrieve mappings", "AsyncCogniteClient.hosted_extractors.mappings.update": "Update mappings", + "AsyncCogniteClient.postgres_gateway.users.__call__": "Iterate over Postgres Gateway Users", "AsyncCogniteClient.postgres_gateway.users.create": "Create Postgres Gateway Users", "AsyncCogniteClient.postgres_gateway.users.delete": "Delete Postgres Gateway Users", "AsyncCogniteClient.postgres_gateway.users.list": "List Postgres Gateway Users", "AsyncCogniteClient.postgres_gateway.users.retrieve": "Retrieve Postgres Gateway Users", "AsyncCogniteClient.postgres_gateway.users.update": "Update Postgres Gateway Users", + "AsyncCogniteClient.postgres_gateway.tables.__call__": "Iterate over Postgres Gateway Tables", "AsyncCogniteClient.postgres_gateway.tables.create": "Create Postgres Gateway Tables", "AsyncCogniteClient.postgres_gateway.tables.delete": "Delete Postgres Gateway Tables", "AsyncCogniteClient.postgres_gateway.tables.list": "List Postgres Gateway Tables", @@ -364,16 +399,19 @@ "AsyncCogniteClient.annotations.retrieve": "Retrieve an annotation by id", "AsyncCogniteClient.annotations.retrieve_multiple": "Retrieve multiple annotations by id", "AsyncCogniteClient.annotations.suggest": "Suggest an annotation", + "AsyncCogniteClient.data_sets.__call__": "Iterate over data sets", "AsyncCogniteClient.data_sets.aggregate_count": "Aggregate data sets", "AsyncCogniteClient.data_sets.create": "Create data sets", "AsyncCogniteClient.data_sets.list": "List data sets", "AsyncCogniteClient.data_sets.retrieve": "Retrieve a data set by id", "AsyncCogniteClient.data_sets.retrieve_multiple": "Retrieve multiple data sets by id", "AsyncCogniteClient.data_sets.update": "Update data sets", + "AsyncCogniteClient.labels.__call__": "Iterate over labels", "AsyncCogniteClient.labels.create": "Create a label", "AsyncCogniteClient.labels.delete": "Delete labels", "AsyncCogniteClient.labels.list": "List labels", "AsyncCogniteClient.labels.retrieve": "Retrieve labels", + "AsyncCogniteClient.relationships.__call__": "Iterate over relationships", "AsyncCogniteClient.relationships.create": "Create a relationship", "AsyncCogniteClient.relationships.delete": "Delete relationships", "AsyncCogniteClient.relationships.list": "List relationships",