-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
230 lines (214 loc) · 4.76 KB
/
pyproject.toml
File metadata and controls
230 lines (214 loc) · 4.76 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "ewatercycle"
version = "2.4.0"
description = "A Python package for running and validating a hydrology model"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
{ name = "Stefan Verhoeven", email = "s.verhoeven@esciencecenter.nl" },
]
keywords = [
"BMI",
"FAIR",
"Geoscience",
"ewatercycle",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Hydrology",
"Typing :: Typed",
]
dependencies = [
"bmipy",
"cftime>=1.6.2",
# esmvalcore is not here as it is installed with conda-lock
# otherwise pip installation fails on esmpy
"Fiona",
"grpc4bmi>=0.4.0",
"remotebmi",
"hydrostats",
"matplotlib>=3.5.0",
"numpy",
"pandas",
"pydantic>=2",
"pyoos",
"python-dateutil",
"ruamel.yaml",
"Shapely",
"xarray",
"fsspec",
"cartopy",
# Pin pyopenssl (conda installs old version) https://github.com/conda/conda/issues/13619
"pyopenssl>=24.0.0",
]
[project.optional-dependencies]
dev = [
"ipython",
"mypy",
"myst-nb",
"pre-commit>=2.15.0",
"pytest",
"pytest-cov",
"pytest-runner",
"rich",
"sphinx",
"sphinx-autoapi",
"sphinx-copybutton",
"sphinx-rtd-theme",
"types-python-dateutil",
"types-PyYAML",
"types-requests",
"tomli",
"ruff",
]
[project.urls]
"Bug Tracker" = "https://github.com/eWaterCycle/ewatercycle/issues"
Documentation = "https://ewatercycle.readthedocs.io/"
Homepage = "https://www.ewatercycle.org/"
"Source Code" = "https://github.com/eWaterCycle/ewatercycle"
[tool.hatch.build]
exclude = [
"tests", "docs"
]
[tool.conda-lock]
channels = [
'conda-forge'
]
platforms = [
'linux-64',
'osx-64',
'osx-arm64',
# Unable to support win-64 as not all esmvaltool deps are available for that platform
# 'win-64',
# Unable to support linux-aarch64 as not all esmvaltool deps are available for that platform
# 'linux-aarch64', # aka arm64, use for Docker on Apple Silicon
]
[tool.conda-lock.dependencies]
esmvaltool-python = ">=2.11"
# grpc4bmi is not available on conda-forge, so we use the pypi version
# The grpc4bmi dependencies are not locked
# As workaround grpc4bmi deps are listed here as conda deps
# TODO publish grpc4bmi on conda-forge
grpc4bmi = {source = 'pypi'}
grpcio = '*'
grpcio-reflection = '*'
grpcio-status = '*'
protobuf = '>=4,<5'
packaging = '*'
typeguard = '*'
[tool.coverage.run]
branch = true
parallel = true
omit = ["tests/*"]
[tool.coverage.paths]
source = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.mypy]
plugins = ["pydantic.mypy", "numpy.typing.mypy_plugin"]
ignore_missing_imports = true
warn_unused_ignores = true
check_untyped_defs = true
files = ["src"]
[tool.ruff]
target-version = "py310"
extend-include = ["*.ipynb"]
# Add this to ignore shapefiles
exclude = [
"shapefiles",
"*.shp",
"*.shx",
"*.dbf",
"*.prj"
]
[tool.ruff.lint]
select = [
"A",
# TODO enable ANN and make code more typed
# "ANN",
"ARG",
"B",
"BLE",
"C",
"D",
"DTZ",
"E",
"EM",
"ERA",
"F",
# TODO enable FBT and factor out booleans args to seperate functions
# "FBT",
"FURB",
"I",
"ICN",
"ISC",
"LOG",
"N",
# TODO enable NPT and use modern random
# "NPY",
"PD",
"PERF",
"PGH",
"PLC",
"PLE",
# TODO enable PLR and make code less complex
# "PLR",
# TODO enable PT for tests/**
# "PT",
"PTH",
"PLW",
"Q",
"RET",
"RSE",
"RUF",
"S",
"SLOT",
"SIM",
"T",
"TCH",
"TID",
"TRY",
"UP",
"W",
"YTT"
]
ignore = [
# Conflicts with formatting
"ISC001",
# Conflicts with default rules
"PLC0414",
# Misidentifies xarrary.DataArray as pandas.DataFrame
"PD003",
# Conflicts with typing
"PLC0207",
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = [
"ARG", "ANN", "D", "E501", "DTZ001", "N802", "S101", "S108", "PLR2004"
]
"docs/**/*.ipynb" = [
# Allow wide lines in notebooks
"E501",
# Allow prints
"T201",
# Allow shadowing builtins
"A004",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["ewatercycle"]