-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpyproject.toml
229 lines (218 loc) · 5.16 KB
/
pyproject.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
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
[build-system]
requires = [
"meson-python",
# numpy requirement for wheel builds for distribution on PyPI - building
# against 2.x yields wheels that are also compatible with numpy 1.x at
# runtime.
"numpy>=2.0.0",
"f90wrap>=0.2.15",
"versioneer[toml]"
]
build-backend = "mesonpy"
[project]
name = "hydro-smash"
dynamic = ["version"]
description = "An open source, Python library interfacing the Fortran Spatially distributed Modelling and ASsimilation for Hydrology platform."
readme = "README.md"
authors = [
{name = "INRAE RECOVER RHAX Team", email = "[email protected]"},
]
license = {text = "GPL-3.0"}
requires-python = ">=3.9"
dependencies = [
"numpy>=1.24",
"f90wrap>=0.2.15",
"geopandas>=1.0",
"rasterio>=1.3.10",
"pandas>=2.2.2",
"h5py>=3.11",
"tqdm",
"scipy>=1.13",
"pyyaml",
"terminaltables",
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Fortran',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Scientific/Engineering',
'Operating System :: Unix',
'Operating System :: Microsoft :: Windows',
"Operating System :: MacOS",
]
[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
]
doc = [
"sphinx",
"numpydoc",
"pydata-sphinx-theme",
"ipython",
"pickleshare",
"sphinxcontrib-bibtex",
"sphinx-design",
"sphinx-autosummary-accessors",
"matplotlib>=3.8.4"
]
dev = [
"ruff",
"fprettify",
]
[project.urls]
documentation = "https://smash.recover.inrae.fr"
repository = "https://github.com/DassHydro/smash"
[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "smash/_version.py"
versionfile_build = "smash/_version.py"
tag_prefix = "v"
parentdir_prefix = "smash-"
[tool.cibuildwheel]
skip = "cp36-* cp37-* cp38-* cp313-* pp* *_i686 *_ppc64le *_s390x"
test-command = 'python -c "import smash; print(smash.__version__)"'
build-verbosity = 3
[tool.cibuildwheel.windows]
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"
[tool.cibuildwheel.macos]
before-build = "brew reinstall gfortran libomp && brew unlink gfortran && brew link gfortran"
[tool.ruff]
line-length = 110
# ruff lint rules derived from Pandas
[tool.ruff.lint]
select = [
# pyflakes
"F",
# pycodestyle
"E", "W",
# isort
"I",
# flake8-2020
"YTT",
# flake8-bugbear
"B",
# flake8-quotes
"Q",
# flake8-debugger
"T10",
# flake8-gettext
"INT",
# pylint
"PL",
# flake8-pytest-style
"PT",
# misc lints
"PIE",
# flake8-pyi
"PYI",
# tidy imports
"TID",
# implicit string concatenation
"ISC",
# type-checking imports
"TCH",
# comprehensions
"C4",
# pygrep-hooks
"PGH",
# Ruff-specific rules
"RUF",
# flake8-bandit: exec-builtin
"S102",
# Perflint
"PERF",
# flynt
"FLY",
# flake8-logging-format
"G",
# flake8-future-annotations
"FA",
]
ignore = [
### Intentionally disabled
# module level import not at top of file
"E402",
# do not assign a lambda expression, use a def
"E731",
# controversial
"B007",
# controversial
"B008",
# setattr is used to side-step mypy
"B009",
# getattr is used to side-step mypy
"B010",
# tests use comparisons but not their returned value
"B015",
# Function definition does not bind loop variable
"B023",
# Only works with python >=3.10
"B905",
# Too many arguments to function call
"PLR0913",
# Too many returns
"PLR0911",
# Too many branches
"PLR0912",
# Too many statements
"PLR0915",
# Redefined loop name
"PLW2901",
# Checks for else blocks that consist of a single if statement
"PLR5501",
# Global statements are discouraged
"PLW0603",
# Use `typing.NamedTuple` instead of `collections.namedtuple`
"PYI024",
# No builtin `eval()` allowed
"S307",
# while int | float can be shortened to float, the former is more explicit
"PYI041",
# incorrect-dict-iterator, flags valid Series.items usage
"PERF102",
# try-except-in-loop, becomes useless in Python 3.11
"PERF203",
# pytest-missing-fixture-name-underscore
"PT006",
# pytest-parametrize-values-wrong-type
"PT007",
# pytest-patch-with-lambda
"PT008",
# pytest-raises-with-multiple-statements
"PT012",
# pytest-assert-in-except
"PT017",
# pytest-composite-assertion
"PT018",
# pytest-fixture-param-without-value
"PT019",
# The following rules may cause conflicts when used with the formatter:
"ISC001",
### TODO: Enable gradually
# Useless statement
"B018",
# Magic number
"PLR2004",
# comparison-with-itself
"PLR0124",
# collection-literal-concatenation
"RUF005",
# pairwise-over-zipped (>=PY310 only)
"RUF007",
# mutable-class-default
"RUF012",
# numpy-legacy-random
"NPY002",
]