Skip to content

Commit

Permalink
Update data workflows docs (#1802)
Browse files Browse the repository at this point in the history
- Remove dangling beta/alpha notices
- Link to GA API spec instead of beta
  • Loading branch information
VerstraeteBert authored Jun 11, 2024
1 parent 0c9b532 commit 774e0d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
26 changes: 13 additions & 13 deletions cognite/client/_api/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class WorkflowTaskAPI(APIClient):
def update(
self, task_id: str, status: Literal["completed", "failed"], output: dict | None = None
) -> WorkflowTaskExecution:
"""`Update status of async task. <https://api-docs.cognite.com/20230101-beta/tag/Tasks/operation/UpdateTaskStatus>`_
"""`Update status of async task. <https://api-docs.cognite.com/20230101/tag/Tasks/operation/UpdateTaskStatus>`_
For tasks that has been marked with 'is_async = True', the status must be updated by calling this endpoint with either 'completed' or 'failed'.
Expand Down Expand Up @@ -93,7 +93,7 @@ class WorkflowExecutionAPI(APIClient):
_RESOURCE_PATH = "/workflows/executions"

def retrieve_detailed(self, id: str) -> WorkflowExecutionDetailed | None:
"""`Retrieve a workflow execution with detailed information. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-executions/operation/ExecutionOfSpecificRunOfWorkflow>`_
"""`Retrieve a workflow execution with detailed information. <https://api-docs.cognite.com/20230101/tag/Workflow-executions/operation/ExecutionOfSpecificRunOfWorkflow>`_
Args:
id (str): The server-generated id of the workflow execution.
Expand Down Expand Up @@ -133,7 +133,7 @@ def trigger(
metadata: dict | None = None,
client_credentials: ClientCredentials | None = None,
) -> WorkflowExecution:
"""`Trigger a workflow execution. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-executions/operation/TriggerRunOfSpecificVersionOfWorkflow>`_
"""`Trigger a workflow execution. <https://api-docs.cognite.com/20230101/tag/Workflow-executions/operation/TriggerRunOfSpecificVersionOfWorkflow>`_
Args:
workflow_external_id (str): External id of the workflow.
Expand Down Expand Up @@ -195,7 +195,7 @@ def list(
statuses: WorkflowStatus | MutableSequence[WorkflowStatus] | None = None,
limit: int = DEFAULT_LIMIT_READ,
) -> WorkflowExecutionList:
"""`List workflow executions in the project. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-executions/operation/ListWorkflowExecutions>`_
"""`List workflow executions in the project. <https://api-docs.cognite.com/20230101/tag/Workflow-executions/operation/ListWorkflowExecutions>`_
Args:
workflow_version_ids (WorkflowVersionIdentifier | MutableSequence[WorkflowVersionIdentifier] | None): Workflow version id or list of workflow version ids to filter on.
Expand Down Expand Up @@ -247,7 +247,7 @@ def list(
)

def cancel(self, id: str, reason: str | None) -> WorkflowExecution:
"""`cancel a workflow execution. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-executions/operation/WorkflowExecutionCancellation>`_
"""`cancel a workflow execution. <https://api-docs.cognite.com/20230101/tag/Workflow-executions/operation/WorkflowExecutionCancellation>`_
Args:
id (str): The server-generated id of the workflow execution.
Expand Down Expand Up @@ -281,7 +281,7 @@ def cancel(self, id: str, reason: str | None) -> WorkflowExecution:
return WorkflowExecution._load(response.json())

def retry(self, id: str, client_credentials: ClientCredentials | None = None) -> WorkflowExecution:
"""`Retry a workflow execution. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-executions/operation/WorkflowExecutionRetryn>`_
"""`Retry a workflow execution. <https://api-docs.cognite.com/20230101/tag/Workflow-executions/operation/WorkflowExecutionRetryn>`_
Args:
id (str): The server-generated id of the workflow execution.
Expand Down Expand Up @@ -317,7 +317,7 @@ def __init__(self, config: ClientConfig, api_version: str | None, cognite_client
self._DELETE_LIMIT = 100

def upsert(self, version: WorkflowVersionUpsert, mode: Literal["replace"] = "replace") -> WorkflowVersion:
"""`Create a workflow version. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-versions/operation/CreateOrUpdateWorkflowVersion>`_
"""`Create a workflow version. <https://api-docs.cognite.com/20230101/tag/Workflow-versions/operation/CreateOrUpdateWorkflowVersion>`_
Note this is an upsert endpoint, so if a workflow with the same version external id already exists, it will be updated.
Expand Down Expand Up @@ -370,7 +370,7 @@ def delete(
workflow_version_id: WorkflowVersionIdentifier | MutableSequence[WorkflowVersionIdentifier],
ignore_unknown_ids: bool = False,
) -> None:
"""`Delete a workflow version(s). <https://api-docs.cognite.com/20230101-beta/tag/Workflow-versions/operation/DeleteSpecificVersionsOfWorkflow>`_
"""`Delete a workflow version(s). <https://api-docs.cognite.com/20230101/tag/Workflow-versions/operation/DeleteSpecificVersionsOfWorkflow>`_
Args:
workflow_version_id (WorkflowVersionIdentifier | MutableSequence[WorkflowVersionIdentifier]): Workflow version id or list of workflow version ids to delete.
Expand Down Expand Up @@ -400,7 +400,7 @@ def delete(
)

def retrieve(self, workflow_external_id: str, version: str) -> WorkflowVersion | None:
"""`Retrieve a workflow version. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-versions/operation/GetSpecificVersion>`_
"""`Retrieve a workflow version. <https://api-docs.cognite.com/20230101/tag/Workflow-versions/operation/GetSpecificVersion>`_
Args:
workflow_external_id (str): External id of the workflow.
Expand Down Expand Up @@ -433,7 +433,7 @@ def list(
workflow_version_ids: WorkflowIdentifier | MutableSequence[WorkflowIdentifier] | None = None,
limit: int = DEFAULT_LIMIT_READ,
) -> WorkflowVersionList:
"""`List workflow versions in the project <https://api-docs.cognite.com/20230101-beta/tag/Workflow-versions/operation/ListWorkflowVersions>`_
"""`List workflow versions in the project <https://api-docs.cognite.com/20230101/tag/Workflow-versions/operation/ListWorkflowVersions>`_
Args:
workflow_version_ids (WorkflowIdentifier | MutableSequence[WorkflowIdentifier] | None): Workflow version id or list of workflow version ids to filter on.
Expand Down Expand Up @@ -494,7 +494,7 @@ def __init__(
self._DELETE_LIMIT = 100

def upsert(self, workflow: WorkflowUpsert, mode: Literal["replace"] = "replace") -> Workflow:
"""`Create a workflow. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-versions/operation/CreateOrUpdateWorkflow>`_
"""`Create a workflow. <https://api-docs.cognite.com/20230101/tag/Workflow-versions/operation/CreateOrUpdateWorkflow>`_
Note this is an upsert endpoint, so if a workflow with the same external id already exists, it will be updated.
Expand Down Expand Up @@ -524,7 +524,7 @@ def upsert(self, workflow: WorkflowUpsert, mode: Literal["replace"] = "replace")
return Workflow._load(response.json()["items"][0])

def retrieve(self, external_id: str) -> Workflow | None:
"""`Retrieve a workflow. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-versions/operation/CreateOrUpdateWorkflow>`_
"""`Retrieve a workflow. <https://api-docs.cognite.com/20230101/tag/Workflow-versions/operation/CreateOrUpdateWorkflow>`_
Args:
external_id (str): Identifier for a Workflow. Must be unique for the project.
Expand Down Expand Up @@ -570,7 +570,7 @@ def delete(self, external_id: str | SequenceNotStr[str], ignore_unknown_ids: boo
)

def list(self, limit: int = DEFAULT_LIMIT_READ) -> WorkflowList:
"""`List all workflows in the project. <https://api-docs.cognite.com/20230101-beta/tag/Workflow-versions/operation/FetchAllWorkflows>`_
"""`List all workflows in the project. <https://api-docs.cognite.com/20230101/tag/Workflow-versions/operation/FetchAllWorkflows>`_
Args:
limit (int): Maximum number of results to return. Defaults to 25. Set to -1, float("inf") or None
Expand Down
8 changes: 0 additions & 8 deletions docs/source/workflow_orchestration.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
Data Workflows
======================

.. warning::
Data Workflows is a new feature:
* The API specification is in beta.
* The SDK implementation is in alpha.

Thus, breaking changes may occur without further notice, see :ref:`appendix-alpha-beta-features` for more information.


Workflows
------------
Upsert Workflow
Expand Down

0 comments on commit 774e0d9

Please sign in to comment.