diff --git a/projects/orquestra-sdk/CHANGELOG.md b/projects/orquestra-sdk/CHANGELOG.md index cf5b07090..5fb9c3315 100644 --- a/projects/orquestra-sdk/CHANGELOG.md +++ b/projects/orquestra-sdk/CHANGELOG.md @@ -6,6 +6,7 @@ * Setting `workspace_id` is now required when submitting workflow to remote clusters * `TaskDef` `WorkflowDef` and `TaskInvocation` Objects `__init__` functions now do set parameters by default. +* Removed deprecated `project_dir` argument from all workflow-related functions 🔥 *Features* diff --git a/projects/orquestra-sdk/src/orquestra/sdk/_client/_base/_api/_wf_run.py b/projects/orquestra-sdk/src/orquestra/sdk/_client/_base/_api/_wf_run.py index c428e71d7..f287a6594 100644 --- a/projects/orquestra-sdk/src/orquestra/sdk/_client/_base/_api/_wf_run.py +++ b/projects/orquestra-sdk/src/orquestra/sdk/_client/_base/_api/_wf_run.py @@ -15,7 +15,6 @@ import warnings from datetime import timedelta from functools import cached_property -from pathlib import Path from urllib.parse import urlparse from orquestra.workflow_shared import ProjectRef, iter_invocations_topologically, serde @@ -72,7 +71,6 @@ def by_id( cls, run_id: str, config: t.Optional[t.Union["RuntimeConfig", str]] = None, - project_dir: t.Optional[t.Union[Path, str]] = None, ) -> "WorkflowRun": """Get the WorkflowRun corresponding to a previous workflow run. @@ -81,7 +79,6 @@ def by_id( config: Determines where to look for the workflow run record. If omitted, we will retrieve the config name from a local cache of workflow runs submitted from this machine. - project_dir: DEPRECATED Raises: orquestra.sdk.exceptions.RuntimeQuerySummaryError: when ``config`` @@ -97,12 +94,6 @@ def by_id( orquestra.sdk.exceptions.ConfigNameNotFoundError: when there's no corresponding config entry in the config file. """ - if project_dir: - warnings.warn( - "project_dir argument is deprecated and will be removed" - "in upcoming versions of orquestra-sdk" - ) - # Resolve config resolved_config: RuntimeConfig if config is None: @@ -147,7 +138,6 @@ def start_from_ir( workspace_id: t.Optional[WorkspaceId] = None, project_id: t.Optional[ProjectId] = None, dry_run: bool = False, - project_dir: t.Optional[t.Union[str, Path]] = None, ): """Start workflow run from its IR representation. @@ -160,14 +150,7 @@ def start_from_ir( project_id: ID of the project for workflow - supported only on CE dry_run: Run the workflow without actually executing any task code. Useful for testing infrastructure, dependency imports, etc. - project_dir: DEPRECATED """ - if project_dir: - warnings.warn( - "project_dir argument is deprecated and will be removed" - "in upcoming versions of orquestra-sdk" - ) - _config = resolve_config(config) runtime = _config._get_runtime() @@ -747,7 +730,6 @@ def list_workflow_runs( limit: t.Optional[int] = None, max_age: t.Optional[str] = None, state: t.Optional[t.Union[State, t.List[State]]] = None, - project_dir: t.Optional[t.Union[Path, str]] = None, workspace: t.Optional[WorkspaceId] = None, project: t.Optional[ProjectId] = None, ) -> t.List[WorkflowRun]: @@ -764,7 +746,6 @@ def list_workflow_runs( limit: Restrict the number of runs to return, prioritising the most recent. max_age: Only return runs younger than the specified maximum age. state: Only return runs of runs with the specified status. - project_dir: DEPRECATED workspace: Only return runs from the specified workspace when using CE. project: will be used to list workflows from specific workspace and project when using CE. @@ -778,13 +759,6 @@ def list_workflow_runs( a list of WorkflowRuns """ # TODO: update docstring when platform workspace/project filtering is merged [ORQP-1479](https://zapatacomputing.atlassian.net/browse/ORQP-1479?atlOrigin=eyJpIjoiZWExMWI4MDUzYTI0NDQ0ZDg2ZTBlNzgyNjE3Njc4MDgiLCJwIjoiaiJ9) # noqa: E501 - - if project_dir: - warnings.warn( - "project_dir argument is deprecated and will be removed" - "in upcoming versions of orquestra-sdk" - ) - _handle_common_listing_project_errors(project, workspace) workspace = resolve_studio_workspace_ref(workspace_id=workspace) diff --git a/projects/orquestra-sdk/src/orquestra/sdk/_client/_base/_workflow.py b/projects/orquestra-sdk/src/orquestra/sdk/_client/_base/_workflow.py index 69cc8d60e..e6c39dd57 100644 --- a/projects/orquestra-sdk/src/orquestra/sdk/_client/_base/_workflow.py +++ b/projects/orquestra-sdk/src/orquestra/sdk/_client/_base/_workflow.py @@ -5,7 +5,6 @@ import functools import inspect import warnings -from pathlib import Path from types import FunctionType from typing import ( Any, @@ -154,7 +153,6 @@ def graph(self): def run( self, config: Union[RuntimeConfig, str], - project_dir: Optional[Union[str, Path]] = None, workspace_id: Optional[WorkspaceId] = None, project_id: Optional[ProjectId] = None, dry_run: bool = False, @@ -165,7 +163,6 @@ def run( config: SDK needs to know where to execute the workflow. The config contains the required details. This can be a RuntimeConfig object, or the name of a saved configuration. - project_dir: DEPRECATED workspace_id: ID of the workspace for workflow - supported only on CE project_id: ID of the project for workflow - supported only on CE dry_run: Run the workflow without actually executing any task code. @@ -178,12 +175,6 @@ def run( orquestra.sdk.exceptions.ProjectInvalidError: when only 1 out of project and workspace is passed. """ - if project_dir: - warnings.warn( - "project_dir argument is deprecated and will be removed" - "in upcoming versions of orquestra-sdk" - ) - try: wf_def_model = self.model except exceptions.DirtyGitRepo: