From 2a316b41ef339b86b4a5c7a61875a6257611a295 Mon Sep 17 00:00:00 2001 From: Arin Date: Wed, 10 Jun 2026 15:21:41 +0530 Subject: [PATCH 1/3] fix: replace deprecated -p with -ps/-pn/-pa/-pt in CLI tests (closes #315) --- src/ewoks/tests/test_cli.py | 4 ++-- src/ewoks/tests/test_convert_cli.py | 4 ++-- src/ewoks/tests/test_execute_cli.py | 4 ++-- src/ewoks/tests/test_show_cli.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ewoks/tests/test_cli.py b/src/ewoks/tests/test_cli.py index f0cd582..e188202 100644 --- a/src/ewoks/tests/test_cli.py +++ b/src/ewoks/tests/test_cli.py @@ -9,9 +9,9 @@ def test_cli_convert(cli_interface): # noqa F811 "acyclic1", "test.json", "--test", - "-p", + "-ps", "a=1", - "-p", + "-pn", "task1:b=test", "--src-format", "yaml", diff --git a/src/ewoks/tests/test_convert_cli.py b/src/ewoks/tests/test_convert_cli.py index 48ca344..fe906e7 100644 --- a/src/ewoks/tests/test_convert_cli.py +++ b/src/ewoks/tests/test_convert_cli.py @@ -55,7 +55,7 @@ def test_convert_with_all_inputs(tmpdir): graph_name, destination, "--test", - "-p", + "-pa", "value=10", "--inputs=all", ] @@ -79,7 +79,7 @@ def test_convert_with_taskid_inputs(tmpdir): graph_name, destination, "--test", - "-p", + "-pt", f"{taskid}:value=test", "--input-node-id", "taskid", diff --git a/src/ewoks/tests/test_execute_cli.py b/src/ewoks/tests/test_execute_cli.py index 5b07dcc..a378a89 100644 --- a/src/ewoks/tests/test_execute_cli.py +++ b/src/ewoks/tests/test_execute_cli.py @@ -66,7 +66,7 @@ def test_execute_with_convert_destination(tmpdir): "execute", "demo", "--test", - "-p", + "-pn", "task1:b=42", "-o", f"convert_destination={destination}", @@ -91,7 +91,7 @@ def test_execute_with_convert_destination_inputs_all(tmpdir): "execute", "demo", "--test", - "-p", + "-pa", "b=42", "--inputs=all", "-o", diff --git a/src/ewoks/tests/test_show_cli.py b/src/ewoks/tests/test_show_cli.py index 9462d14..09b9adf 100644 --- a/src/ewoks/tests/test_show_cli.py +++ b/src/ewoks/tests/test_show_cli.py @@ -52,7 +52,7 @@ def test_show(capsys): def test_show_with_inputs(capsys): - argv = [sys.executable, "show", "demo", "--test", "-p", "b=999", "--inputs=all"] + argv = [sys.executable, "show", "demo", "--test", "-pa", "b=999", "--inputs=all"] main(argv=argv, shell=False) captured = capsys.readouterr() From 5b346f42848281d78a34ca71bdff4e3757a8e810 Mon Sep 17 00:00:00 2001 From: arinbalyan Date: Thu, 11 Jun 2026 13:35:17 +0530 Subject: [PATCH 2/3] fix: remove deprecated --inputs=all and --input-node-id from tests/docs --- doc/howtoguides/inspect_workflows.rst | 13 ++++++------- src/ewoks/tests/test_convert_cli.py | 3 --- src/ewoks/tests/test_execute_cli.py | 1 - src/ewoks/tests/test_show_cli.py | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/doc/howtoguides/inspect_workflows.rst b/doc/howtoguides/inspect_workflows.rst index 28842c2..7056a81 100644 --- a/doc/howtoguides/inspect_workflows.rst +++ b/doc/howtoguides/inspect_workflows.rst @@ -112,17 +112,17 @@ If no labels are defined, the `Label` column is omitted from the output. Validating Execution Arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To override workflow parameters for execution, use the `-p` option: +To override workflow parameters for execution, use the `-p` option (or `-pt` to target a specific task identifier): .. code-block:: bash - ewoks execute example.json -p SumTask:delay=99 --input-node-id taskid + ewoks execute example.json -pt SumTask:delay=99 Before executing the workflow, you can verify that your arguments are applied as intended using `ewoks show` with the same arguments: .. code-block:: bash - ewoks show example.json -p SumTask:delay=99 --input-node-id taskid + ewoks show example.json -pt SumTask:delay=99 The output will reflect the overridden `delay` values: @@ -163,8 +163,7 @@ The output will reflect the overridden `delay` values: │ b │ 6 │ SumTask │ task6 │ ╘════════╧════════════════╧═══════════════════╧═══════╛ -The value before the colon in `-p :=` refers to the node identifier, which defaults to the `Id` column. -You can change this behavior with the `--input-node-id` option to use the `Label` or `Task identifier` instead. +The `-pt` flag uses the task identifier as the target prefix in the format `:=`, so `-pt SumTask:delay=99` applies `delay=99` to all nodes whose task identifier is `SumTask`. Graphical Interfaces -------------------- @@ -178,7 +177,7 @@ To use the :ref:`desktop GUI ` based on Orange: .. code-block:: bash - ewoks execute example.json --engine=orange -p SumTask:delay=99 --input-node-id taskid + ewoks execute example.json --engine=orange -pt SumTask:delay=99 Then double-click on each node to inspect or edit parameters: @@ -194,7 +193,7 @@ To inspect parameters via the :ref:`web interface `: .. code-block:: bash - ewoks convert example.json example_with_params.json --test -p SumTask:delay=99 --input-node-id taskid + ewoks convert example.json example_with_params.json --test -pt SumTask:delay=99 2. Start the web server: diff --git a/src/ewoks/tests/test_convert_cli.py b/src/ewoks/tests/test_convert_cli.py index fe906e7..42e72f0 100644 --- a/src/ewoks/tests/test_convert_cli.py +++ b/src/ewoks/tests/test_convert_cli.py @@ -57,7 +57,6 @@ def test_convert_with_all_inputs(tmpdir): "--test", "-pa", "value=10", - "--inputs=all", ] main(argv=argv, shell=False) @@ -81,8 +80,6 @@ def test_convert_with_taskid_inputs(tmpdir): "--test", "-pt", f"{taskid}:value=test", - "--input-node-id", - "taskid", ] main(argv=argv, shell=False) diff --git a/src/ewoks/tests/test_execute_cli.py b/src/ewoks/tests/test_execute_cli.py index a378a89..141a3a4 100644 --- a/src/ewoks/tests/test_execute_cli.py +++ b/src/ewoks/tests/test_execute_cli.py @@ -93,7 +93,6 @@ def test_execute_with_convert_destination_inputs_all(tmpdir): "--test", "-pa", "b=42", - "--inputs=all", "-o", f"convert_destination={destination}", ] diff --git a/src/ewoks/tests/test_show_cli.py b/src/ewoks/tests/test_show_cli.py index 09b9adf..d817ada 100644 --- a/src/ewoks/tests/test_show_cli.py +++ b/src/ewoks/tests/test_show_cli.py @@ -52,7 +52,7 @@ def test_show(capsys): def test_show_with_inputs(capsys): - argv = [sys.executable, "show", "demo", "--test", "-pa", "b=999", "--inputs=all"] + argv = [sys.executable, "show", "demo", "--test", "-pa", "b=999"] main(argv=argv, shell=False) captured = capsys.readouterr() From 68fa0ecba6dda2df898d0a2544f24229d85c2af0 Mon Sep 17 00:00:00 2001 From: arinbalyan Date: Fri, 12 Jun 2026 18:23:26 +0530 Subject: [PATCH 3/3] fix: bump ewoksutils dependency to >=1.10.0rc1, fix docs and test ordering - Bump ewoksutils minimum version to 1.10.0rc1 (required for new -ps/-pn/-pa/-pt flags) - Update inspect_workflows.rst docs to list all new parameter flags instead of deprecated -p - Swap input ordering in test_cli.py per reviewer suggestion --- doc/howtoguides/inspect_workflows.rst | 10 +++++++++- pyproject.toml | 2 +- src/ewoks/tests/test_cli.py | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/howtoguides/inspect_workflows.rst b/doc/howtoguides/inspect_workflows.rst index 7056a81..3f141fc 100644 --- a/doc/howtoguides/inspect_workflows.rst +++ b/doc/howtoguides/inspect_workflows.rst @@ -112,7 +112,15 @@ If no labels are defined, the `Label` column is omitted from the output. Validating Execution Arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To override workflow parameters for execution, use the `-p` option (or `-pt` to target a specific task identifier): +Workflow parameters can be overridden at execution time using one of the following options: + +* ``-pt TASK_ID:NAME=VALUE`` — apply to all nodes with the specified task identifier +* ``-pn NODE_ID:NAME=VALUE`` — apply to the node with the specified node id +* ``-pl LABEL:NAME=VALUE`` — apply to all nodes with the specified label +* ``-ps NAME=VALUE`` — apply to all start nodes +* ``-pa NAME=VALUE`` — apply to all nodes + +For example, to target a specific task identifier: .. code-block:: bash diff --git a/pyproject.toml b/pyproject.toml index f91e1e5..b2d6dca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ requires-python = ">=3.8" dependencies = [ "ewokscore >=4.0.1,<5", - "ewoksutils >=1.6.0,<2", + "ewoksutils >=1.10.0rc1,<2", "tabulate", "importlib_resources; python_version < '3.9'", ] diff --git a/src/ewoks/tests/test_cli.py b/src/ewoks/tests/test_cli.py index e188202..4205750 100644 --- a/src/ewoks/tests/test_cli.py +++ b/src/ewoks/tests/test_cli.py @@ -28,8 +28,8 @@ def test_cli_convert(cli_interface): # noqa F811 convert_options = { "inputs": [ - {"all": False, "name": "a", "value": 1}, {"id": "task1", "name": "b", "value": "test"}, + {"all": False, "name": "a", "value": 1}, ], "load_options": {"representation": "test_core"}, "save_options": {"representation": "json"},