-
Notifications
You must be signed in to change notification settings - Fork 5
/
pixi.toml
191 lines (182 loc) · 6.77 KB
/
pixi.toml
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[project]
name = "Ribasim"
version = "2024.2.0"
description = "Water resources modeling"
authors = ["Deltares and contributors <[email protected]>"]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-arm64", "osx-64"]
readme = "README.md"
license = "MIT"
license-file = "LICENSE"
homepage = "https://deltares.github.io/Ribasim/"
documentation = "https://deltares.github.io/Ribasim/"
repository = "https://github.com/Deltares/Ribasim"
[tasks]
# Installation
install-julia = "juliaup add 1.10 && juliaup default 1.10"
install-ribasim-python = "pip install --no-deps --editable python/ribasim"
install-ribasim-api = "pip install --no-deps --editable python/ribasim_api"
install-ribasim-testmodels = "pip install --no-deps --editable python/ribasim_testmodels"
install-pre-commit = "pre-commit install"
install-without-pre-commit = { depends_on = [
"install-julia",
"update-registry-julia",
"install-ribasim-python",
"install-ribasim-api",
"install-ribasim-testmodels",
] }
install = { depends_on = ["install-without-pre-commit", "install-pre-commit"] }
# Instantiate
update-registry-julia = "julia --eval='using Pkg; Registry.update()'"
update-manifest-julia = "julia --project --eval='using Pkg; Pkg.update()'"
instantiate-julia = "julia --project --eval='using Pkg; Pkg.instantiate()'"
initialize-julia = { depends_on = [
"update-registry-julia",
"instantiate-julia",
] }
# Docs
build-julia-docs = { cmd = "julia --project docs/make.jl", depends_on = [
"initialize-julia",
] }
quartodoc-build = { cmd = "quartodoc build && rm objects.json", cwd = "docs" }
quarto-preview = { cmd = "quarto preview docs", depends_on = [
"quartodoc-build", "generate-testmodels"
] }
quarto-check = { cmd = "quarto check all", depends_on = ["quartodoc-build"] }
quarto-render = { cmd = "julia --project --eval 'using Pkg; Pkg.build(\"IJulia\")' && quarto render docs --to html --execute", depends_on = [
"quartodoc-build", "generate-testmodels"
] }
docs = { depends_on = ["build-julia-docs", "quarto-preview"] }
# Lint
mypy-ribasim-python = "mypy python/ribasim/ribasim"
mypy-ribasim-testmodels = "mypy python/ribasim_testmodels/ribasim_testmodels"
mypy-ribasim-api = "mypy python/ribasim_api/ribasim_api"
pre-commit = "pre-commit run --all-files"
lint = { depends_on = [
"pre-commit",
"mypy-ribasim-python",
"mypy-ribasim-testmodels",
"mypy-ribasim-api",
"mypy-ribasim-qgis",
] }
# Build
build-ribasim-cli = { cmd = "julia --project build.jl --app", cwd = "build", depends_on = [
"generate-testmodels",
"initialize-julia",
] }
build-libribasim = { cmd = "julia --project build.jl --lib", cwd = "build", depends_on = [
"generate-testmodels",
"initialize-julia",
] }
build = { "cmd" = "julia --project build.jl --app --lib", cwd = "build", depends_on = [
"generate-testmodels",
"initialize-julia",
] }
remove-artifacts = "julia --eval 'rm(joinpath(Base.DEPOT_PATH[1], \"artifacts\"), force=true, recursive=true)'"
# Test
test-ribasim-python = "pytest --numprocesses=4 python/ribasim/tests"
test-ribasim-api = "pytest --basetemp=python/ribasim_api/tests/temp --junitxml=report.xml python/ribasim_api/tests"
test-ribasim-cli = "pytest --numprocesses=4 --basetemp=build/tests/temp --junitxml=report.xml build/tests"
test-ribasim-core = { cmd = "julia --project=core --eval 'using Pkg; Pkg.test()'", depends_on = [
"generate-testmodels",
] }
test-ribasim-core-cov = { cmd = "julia --project=core --eval 'using Pkg; Pkg.test(coverage=true, julia_args=[\"--check-bounds=yes\"])'", depends_on = [
"generate-testmodels",
] }
generate-testmodels = "python utils/generate-testmodels.py"
tests = { depends_on = ["lint", "test-ribasim-python", "test-ribasim-core"] }
# Codegen
generate-python = { cmd = "julia --project utils/gen_python.jl && ruff format python/ribasim/ribasim/schemas.py"}
codegen = { depends_on = ["generate-python", "lint"] }
# Publish
build-ribasim-python-wheel = { cmd = "rm --recursive --force dist && python -m build && twine check dist/*", cwd = "python/ribasim" }
build-ribasim-api-wheel = { cmd = "rm --recursive --force dist && python -m build && twine check dist/*", cwd = "python/ribasim_api" }
build-wheels = { depends_on = [
"build-ribasim-python-wheel",
"build-ribasim-api-wheel",
] }
publish-ribasim-python = { cmd = "twine upload dist/*", cwd = "python/ribasim", depends_on = [
"build-ribasim-python-wheel",
] }
publish-ribasim-api = { cmd = "twine upload dist/*", cwd = "python/ribasim_api", depends_on = [
"build-ribasim-api-wheel",
] }
# QGIS
qgis = "qgis --profiles-path .pixi/qgis_env"
install-ribasim-qgis = "python ribasim_qgis/scripts/install_ribasim_qgis.py"
install-imod-qgis = "python ribasim_qgis/scripts/install_qgis_plugin.py iMOD && python ribasim_qgis/scripts/enable_plugin.py imodqgis"
install-plugin-reloader-qgis = "python ribasim_qgis/scripts/install_qgis_plugin.py \"Plugin Reloader\" && python ribasim_qgis/scripts/enable_plugin.py plugin_reloader"
install-debugvs-qgis = "python ribasim_qgis/scripts/install_qgis_plugin.py debugvs==0.7 && python ribasim_qgis/scripts/enable_plugin.py debug_vs"
install-qgis-plugins = { depends_on = [
"install-plugin-reloader-qgis",
"install-debugvs-qgis",
"install-ribasim-qgis",
"install-imod-qgis",
] }
test-ribasim-qgis-ui = { cmd = "python ribasim_qgis/scripts/run_qgis_ui_tests.py", depends_on = [
"install-ribasim-qgis",
] }
test-ribasim-qgis = { cmd = "pytest --numprocesses=auto ribasim_qgis/tests", depends_on = [
"install-ribasim-qgis",
]}
test-ribasim-qgis-cov = { cmd = "pytest --numprocesses=auto --cov=ribasim_qgis --cov-report=xml --cov-config=ribasim_qgis/.coveragerc ribasim_qgis/tests", depends_on = [
"install-ribasim-qgis",
]}
mypy-ribasim-qgis = "mypy ribasim_qgis"
# Run
ribasim-model = "julia --project=core -e 'using Ribasim; Ribasim.main(ARGS)'"
# Release
github-release = "python utils/github-release.py"
[dependencies]
build = "*"
geopandas = "*"
gh = "*"
hatchling = "*"
juliaup = "*"
jupyterlab = "*"
libgdal-arrow-parquet = "*"
matplotlib = "*"
mypy = "*"
netCDF4 = "*"
pandas = "==2.1.4" # Avoid excessive deprecation warnings from pandera (#984)
pandas-stubs = "*"
pandera = "*"
pip = "*"
platformdirs = "*"
pre-commit = "*"
pyarrow = "*"
pydantic = ">=2"
pyogrio = "*"
pyqt-stubs = "*"
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
python = ">=3.10"
qgis = "*"
qgis-plugin-manager = "*"
quartodoc = "*"
ruff = "*"
shapely = ">=2.0"
tomli = "*"
tomli-w = "*"
twine = "*"
types-requests = "*"
typing-extensions = ">=4.6"
xarray = "*"
xmipy = "*"
xugrid = "*"
[target.win-64.dependencies]
quarto = "*"
ptvsd = "*"
[target.linux-64.dependencies]
quarto = "*"
ptvsd = "*"
[target.osx-64.dependencies]
quarto = "*"
ptvsd = "*"
[activation]
scripts = ["utils/env_setup.sh"]
[target.win-64.activation]
scripts = ["utils/env_setup.bat"]
[system-requirements]
linux = "3.10.0"