forked from Deltares/hydromt_wflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
249 lines (216 loc) · 6.22 KB
/
pyproject.toml
File metadata and controls
249 lines (216 loc) · 6.22 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
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
[build-system]
requires = ["flit_core >=3.4.0,<4"]
build-backend = "flit_core.buildapi"
[tool.flit.sdist]
include = ["hydromt_wflow"]
exclude = ["docs", "examples", "tests", ".github"]
[project]
name = "hydromt_wflow"
dynamic = ['version', 'description']
authors = [
{ name = "Dirk Eilander", email = "dirk.eilander@deltares.nl" },
{ name = "Hélène Boisgontier", email = "helene.boisgontier@deltares.nl" },
{ name = "Joost Buitink", email = "joost.buitink@deltares.nl" },
{ name = "Brendan Dalmijn", email = "brendan.dalmijn@deltares.nl" },
{ name = "Tjalling de Jong", email = "tjalling.dejong@deltares.nl" },
{ name = "Sam Vente", email = "sam.vente@deltares.nl" },
{ name = "Marnix Kraus", email = "marnix.kraus@deltares.nl" },
{ name = "Luuk Blom", email = "luuk.blom@deltares.nl" },
]
readme = "README.rst"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Hydrology",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
]
# Core dependencies
requires-python = ">=3.10"
dependencies = [
"dask",
"geopandas>=0.10",
"hydromt>=0.10.1,<0.11",
"numpy",
"pandas",
"pyflwdir>=0.5.7",
"pyproj",
"scipy",
"shapely",
"toml",
"xarray",
]
# Optional dependencies
[project.optional-dependencies]
dev = ["pre-commit", "ruff"]
docs = [
"nbsphinx",
"pydata-sphinx-theme",
"sphinx",
"sphinx_design",
"sphinx_autosummary_accessors",
]
extra = ["gwwapi", "hydroengine", "pyet", "wradlib"]
examples = [
"cartopy",
"jupyterlab",
"nbconvert",
"notebook",
]
test = ["pytest>=2.7.3", "pytest-cov", "pytest-mock", "pytest-timeout"]
[project.entry-points."hydromt.models"]
wflow = "hydromt_wflow.wflow:WflowModel"
wflow_sediment = "hydromt_wflow.wflow_sediment:WflowSedimentModel"
[project.urls]
Documentation = "http://deltares.github.io/hydromt_wflow/latest/"
Source = "https://github.com/Deltares/hydromt_wflow"
## Pytest and coverage
[tool.pytest.ini_options]
filterwarnings = [
"ignore:distutils Version classes are deprecated:DeprecationWarning",
"ignore:The staticmaps property:DeprecationWarning",
"ignore:The staticgeoms property:DeprecationWarning",
]
testpaths = ["tests"]
[tool.coverage.run]
branch = true
source = ["./hydromt_wflow"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
ignore_errors = true
[tool.coverage.html]
directory = ".cov"
[tool.ruff]
line-length = 88
exclude = ["docs", "examples"]
[tool.ruff.lint]
# enable pydocstyle (E), pyflake (F) and isort (I), pytest-style (PT)
select = ["E", "F", "I", "PT", "D"]
ignore = ["D105", "D211", "D213", "E712", "E741"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = 20
[tool.ruff.lint.per-file-ignores]
"hydromt_wflow/__init__.py" = ["E402", "F401", "F403"]
"hydromt_wflow/workflows/__init__.py" = ["F403"]
"tests/**" = ["D103", "D100", "D104"]
"tests/conftest.py" = ["E402"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
## Pixi related entries
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64", "win-64"]
## The different tasks of this project
[tool.pixi.tasks]
# Installation
install = { depends-on = ["install-pre-commit"] }
install-pre-commit = "pre-commit install"
# Repo related tasks
lint = { cmd = ["pre-commit", "run", "--all"] }
# Docker related stuff (expand in future)
docker-clean = { cmd = ["docker", "system", "prune", "-f"] }
# Documentation generation
docs-dummy = { cmd = [
"sphinx-build",
"./docs",
"./docs/_build",
"-b",
"dummy",
"-W",
] }
docs-html = { cmd = [
"sphinx-build",
"-M",
"html",
"docs",
"docs/_build",
"-W",
] }
doc = { depends-on = ["docs-html"]}
docs = { depends-on = ["docs-html"]}
docs-html-rebuild = { depends-on = ["clean-docs", "docs-html"] }
serve = { cmd = [
"python",
"-m",
"http.server",
"8000",
"-d",
"docs/_build/html",
] }
# Testing
test = { cmd = ["pytest"] }
test-lf = { cmd = ["pytest", "--lf", "--tb=short"] }
test-cov = { cmd = [
"pytest",
"--verbose",
"--cov=hydromt_wflow",
"--cov-report",
"xml",
] }
test-cov-local = { cmd = [
"pytest",
"--verbose",
"--cov",
"--cov-report",
"html",
] }
# Clean up (some of) the temporary files
clean = { depends-on = [
"clean-bin",
"clean-dist",
"clean-docs-build",
"clean-docs-example",
"clean-docs-gen",
] }
clean-bin = { cmd = ["rm", "-rf", "bin"] }
clean-dist = { cmd = ["rm", "-rf", "dist"] }
clean-docs-build = { cmd = ["rm", "-rf", "docs/_build"] }
clean-docs-example = { cmd = ["rm", "-rf", "docs/_examples"] }
clean-docs-gen = { cmd = ["rm", "-rf", "docs/_generated"] }
clean-docs = { depends-on = [
"clean-docs-build",
"clean-docs-example",
"clean-docs-gen",
] }
## Dependencies
[tool.pixi.dependencies]
h5py = "*"
pip = "*"
pyflwdir = ">0.5.7" # duplication is necessary to resolve numpy version correctly
# (<2.2 required by numba)
[tool.pixi.pypi-dependencies]
hydromt_wflow = { path = ".", editable = true }
[tool.pixi.feature.examples.dependencies]
pandoc = "*"
[tool.pixi.feature.extra.dependencies]
gdal = ">=3.5"
pcraster = "*"
# Extra python environments
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
[tool.pixi.feature.py310.dependencies]
python = "3.10.*"
## Define the environments
[tool.pixi.environments]
default = { features = ["py310", "dev", "docs", "examples", "extra", "test"] }
docs = { features = ["docs", "examples", "extra"] }
full = { features = ["extra"] }
slim = { features = [] }
test-slim-py311 = { features = ["py311", "test"] }
test-slim-py310 = { features = ["py310", "test"] }
test-full-py311 = { features = ["py311", "extra", "test"] }
test-full-py310 = { features = ["py310", "extra", "test"] }