Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -24,4 +25,3 @@ pandas = ">=1.0.0"
pyam-iamc = ">=2.0.0"
nomenclature-iamc = ">=0.29"
pypsa-validation-processing = { path = ".", editable = true }

18 changes: 18 additions & 0 deletions tests/test_pixi_tasks.py
Original file line number Diff line number Diff line change
@@ -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",
]
Loading