From 05d734c95f3a16d4ae657b4e09502c2b41c4c976 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 13:30:13 +0000 Subject: [PATCH 1/2] Initial plan From 6a25181aad2fe610559f9de9fef03b0559566397 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 23 Apr 2026 13:34:52 +0000 Subject: [PATCH 2/2] Add pixi workflow_test task with ordered workflow config checks Agent-Logs-Url: https://github.com/maxnutz/pypsa_validation_processing/sessions/0820f2d0-3c71-48d8-bb2f-40ef604c013d Co-authored-by: maxnutz <81740567+maxnutz@users.noreply.github.com> --- pixi.toml | 2 +- tests/test_pixi_tasks.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/test_pixi_tasks.py diff --git a/pixi.toml b/pixi.toml index 75b0e9d..a714ae0 100644 --- a/pixi.toml +++ b/pixi.toml @@ -7,6 +7,7 @@ platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"] [tasks] workflow = "python workflow.py" +workflow_test = "python workflow.py --config pypsa_validation_processing/configs/config.country-timeseries.yaml && python workflow.py --config pypsa_validation_processing/configs/config.country-year.yaml && python workflow.py --config pypsa_validation_processing/configs/config.region-timeseries.yaml && python workflow.py --config pypsa_validation_processing/configs/config.region-year.yaml && pytest tests/ -v" test = "pytest tests/ -v" [dependencies] @@ -24,4 +25,3 @@ pandas = ">=1.0.0" pyam-iamc = ">=2.0.0" nomenclature-iamc = ">=0.29" pypsa-validation-processing = { path = ".", editable = true } - diff --git a/tests/test_pixi_tasks.py b/tests/test_pixi_tasks.py new file mode 100644 index 0000000..092fe36 --- /dev/null +++ b/tests/test_pixi_tasks.py @@ -0,0 +1,18 @@ +from pathlib import Path +import tomllib + + +def test_workflow_test_task_runs_all_required_commands_in_order(): + pixi_toml_path = Path(__file__).resolve().parent.parent / "pixi.toml" + pixi_config = tomllib.loads(pixi_toml_path.read_text()) + + task_command = pixi_config["tasks"]["workflow_test"] + parts = task_command.split(" && ") + + assert parts == [ + "python workflow.py --config pypsa_validation_processing/configs/config.country-timeseries.yaml", + "python workflow.py --config pypsa_validation_processing/configs/config.country-year.yaml", + "python workflow.py --config pypsa_validation_processing/configs/config.region-timeseries.yaml", + "python workflow.py --config pypsa_validation_processing/configs/config.region-year.yaml", + "pytest tests/ -v", + ]