-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpixi.toml
More file actions
132 lines (114 loc) · 5.07 KB
/
Copy pathpixi.toml
File metadata and controls
132 lines (114 loc) · 5.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[workspace]
name = "imod_coupler"
version = "0.1.0"
channels = ["conda-forge"]
platforms = ["win-64", "linux-64"]
[system-requirements]
linux = "4.4.0"
[tasks]
# Build
build-imod-coupler = "rm -rf dist && pyinstaller --onefile imod_coupler/__main__.py --name imodc"
[dependencies]
geopandas = ">=1.0.0"
netCDF4 = "*"
loguru = "*"
numpy = ">=2.0"
pydantic = ">=2.11.0"
python = ">=3.10"
xarray = ">=2025.8.0"
scipy = "*"
tomli = "*"
tomli-w = "*"
xmipy = "*"
imod = "=1.0.0.post1"
ribasim = "=2026.1.1"
[pypi-dependencies]
ribasim_testmodels = { git = "https://github.com/Deltares/Ribasim.git", tag = "v2026.1.1", subdirectory = "python/ribasim_testmodels" }
imod_coupler = { path = ".", editable = true }
primod = { path = "pre-processing", editable = true }
pyinstaller = "*" # Use pypi version instead of condforge due to issues with the AV
ribasim = "==2026.1.1"
[feature.common.tasks]
# Fetch binaries
fetch-ribasim = { cmd = "python scripts/download_ribasim.py 2026.1.1 ./.imod_collector/develop/ribasim", cwd="." }
fetch-modflow = { cmd = "python scripts/download_modflow.py 6.7.0 ./.imod_collector/develop/modflow6", cwd="." }
fetch-metaswap = "aws s3 cp s3://metaswap/releases/r2410 ./.imod_collector/develop/metaswap --recursive --no-sign-request --endpoint-url https://s3.deltares.nl --no-verify-ssl"
fetch-metaswap-test-db = "aws s3 cp s3://metaswap/db/LHM2016_v01vrz ./.imod_collector/LHM2016_v01vrz --recursive --no-sign-request --endpoint-url https://s3.deltares.nl --no-verify-ssl"
fetch-imod-collector = { depends-on = ["fetch-metaswap", "fetch-ribasim", "fetch-modflow"] }
fetch-imod-collector-regression = "python scripts/download_regression.py 2025.11.0 ./.imod_collector/regression"
generate-env-file = "python scripts/generate_env_file.py"
# Tests
test-primod = "pytest --junitxml=report.xml tests/test_primod"
[feature.common.dependencies]
awscli = "*"
python-build = "*"
gh = "*"
httpx = "*"
ipython = "*"
jupyterlab = "*"
mypy = "*"
pytest = "*"
pytest-cases = "*"
pytest-xdist = "*"
python-dotenv = "*"
ruff = "*"
tqdm = "*"
twine = "*"
[feature.dev.pypi-dependencies]
mypy2junit = "*"
[feature.dev.tasks]
# Setup
setup-test-dependencies = { depends-on = [
"fetch-metaswap-test-db",
"fetch-imod-collector",
"fetch-imod-collector-regression",
"generate-env-file",
] }
test-imod-coupler = "pytest -vvv -s --numprocesses=auto --dist=loadgroup --basetemp=tests/temp --junitxml=report.xml tests/test_imod_coupler"
tests = { depends-on = ["test-primod", "test-imod-coupler"] }
# Lint
mypy-imodc = "mypy --ignore-missing-imports --strict imod_coupler"
mypy-imodc-report = "mypy --ignore-missing-imports --strict imod_coupler | mypy2junit > mypy-imodc-report.xml"
mypy-primod = "mypy --ignore-missing-imports pre-processing/primod"
mypy-primod-report = "mypy --ignore-missing-imports pre-processing/primod | mypy2junit > mypy-primod-report.xml"
format = "ruff format ."
format-check = "ruff format --check ."
ruff = "ruff check ."
check-package-primod = { cmd = "rm --recursive --force dist && python -m build && twine check --strict dist/*", cwd = "pre-processing" }
lint = { depends-on = ["format", "ruff", "mypy-imodc", "mypy-primod"] }
# Build & publish primod
build-primod = { cmd = "rm --recursive --force dist && python -m build && twine check dist/*", cwd = "pre-processing", inputs = ["pre-processing/primod/**", "pre-processing/pyproject.toml"] }
publish-primod = { cmd = "twine upload dist/*", cwd = "pre-processing"}
# Build & publish coupler
build-coupler = { cmd = "rm --recursive --force dist && python -m build && twine check dist/*", inputs = ["imod_coupler/**", "pyproject.toml"] }
publish-coupler = { cmd = "twine upload dist/*", cwd = "." }
[feature.pixi-update.dependencies]
gh = "*"
pip = "*"
pixi-diff-to-markdown = "*"
[feature.pixi-update.tasks]
update = "pixi update --json | pixi-diff-to-markdown > diff.md"
[feature.user-acceptance.dependencies]
dvc = "*"
dvc-s3 = "*"
rioxarray = "*"
[feature.user-acceptance.tasks]
pull_lhm_db = { cmd = "aws s3 cp s3://metaswap/db/LHM2018_v02vae_BOFEK2020.zip ./LHM2018_v02vae_BOFEK2020.zip --no-sign-request --endpoint-url https://s3.deltares.nl --no-verify-ssl", cwd = "tests/data/user_acceptance" }
pull_data = "dvc pull --remote minio"
fetch_lhm = {cmd = "tar -xf LHM2018_v02vae_BOFEK2020.zip && tar -xf LHM_transient.zip", depends-on = ["pull_lhm_db", "pull_data"], cwd = "tests/data/user_acceptance"}
user_acceptance_test = { cmd = [
"pytest",
"-m", "user_acceptance",
"--cache-clear",
"--verbose",
"--junitxml=user_acceptance_report.xml",
], env = { USER_ACCEPTANCE_DIR = "tests/data/user_acceptance"} }
run_imod5 = {cmd = ["./prepare_mf6_transient_imod5.bat"], cwd = "tests/data/user_acceptance/LHM_transient/scripts_imod-5"}
[feature.py312.dependencies]
python = "3.12.*"
[environments]
default = { features = ["py312"], solve-group = "py312" }
dev = { features = ["py312", "dev", "common"], solve-group = "py312" }
py312 = { features = ["py312", "common"], solve-group = "py312" }
user-acceptance = { features = ["py312", "common", "user-acceptance"], solve-group = "py312" }
pixi-update = { features = ["pixi-update"], no-default-feature = true }