-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy pathpyproject.toml
More file actions
227 lines (200 loc) · 5.82 KB
/
pyproject.toml
File metadata and controls
227 lines (200 loc) · 5.82 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
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "parcels"
description = "Framework for Lagrangian tracking of virtual ocean particles in the petascale age."
readme = "README.md"
dynamic = ["version"]
authors = [{name = "oceanparcels.org team"}]
requires-python = ">=3.10"
license = {file = "LICENSE.md"}
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
]
dependencies = [
"cftime",
"numpy",
"dask",
"psutil",
"netCDF4",
"zarr",
"tqdm",
"pymbolic",
"pytest",
"scipy",
"xarray",
"pooch",
]
[project.urls]
homepage = "https://oceanparcels.org/"
repository = "https://github.com/OceanParcels/parcels"
Tracker = "https://github.com/OceanParcels/parcels/issues"
[tool.pixi.project]
channels = ["conda-forge"]
name = "parcels-dev"
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
[tool.pixi.tasks]
tests = "pytest"
tests-notebooks = "pytest -v -s --nbval-lax -k 'not documentation and not tutorial_periodic_boundaries and not tutorial_timevaryingdepthdimensions and not tutorial_particle_field_interaction and not tutorial_croco_3D and not tutorial_nemo_3D and not tutorial_analyticaladvection'" # TODO v4: Mirror ci.yml for notebooks being run
coverage = "coverage run -m pytest && coverage html"
typing = "mypy parcels"
pre-commit = "pre-commit run --all-files"
docs = 'sphinx-autobuild --ignore "*.zip" docs docs/_build'
# TODO v4: Remove v4 specific tasks
tests-short = "pytest tests/test_advection.py"
tests-exclude-v4 = "pytest -m 'not v4alpha and not v4future and not v4remove'"
[tool.pixi.dependencies] #! Keep in sync with environment.yml
python = ">=3.10"
ffmpeg = ">=3.2.3"
jupyter = "*"
matplotlib-base = ">=2.0.2"
netcdf4 = ">=1.1.9"
numpy = ">=1.9.1"
psutil = "*"
pymbolic = "*"
scipy = ">=0.16.0"
tqdm = "*"
xarray = ">=0.10.8"
cftime = ">=1.3.1"
dask = ">=2.0"
scikit-learn = "*"
zarr = ">=2.11.0,!=2.18.0,<3"
# Notebooks
trajan = "*"
# Testing
nbval = "*"
pytest = "*"
pytest-html = "*"
coverage = "*"
# Typing
mypy = "*"
lxml = "*" # in CI
types-tqdm = "*"
types-psutil = "*"
# Linting
pre_commit = "*"
# Docs
ipython = "*"
numpydoc = "*"
nbsphinx = "*"
sphinx = "*"
pandoc = "*"
pydata-sphinx-theme = "*"
sphinx-autobuild = "*"
myst-parser = "*"
sphinxcontrib-mermaid = "*"
[tool.pixi.pypi-dependencies]
parcels = { path = ".", editable = true }
[tool.setuptools]
packages = ["parcels"]
[tool.setuptools.package-data]
parcels = ["parcels/include/*"]
[tool.setuptools_scm]
write_to = "parcels/_version_setup.py"
local_scheme = "no-local-version"
[tool.pytest.ini_options]
addopts = ["--strict-config", "--strict-markers"]
xfail_strict = true
testpaths = ["tests", "docs/examples"]
python_files = ["test_*.py", "example_*.py", "*tutorial*"]
minversion = "7"
markers = [ # can be skipped by doing `pytest -m "not slow"` etc.
"flaky: flaky tests",
"slow: slow tests",
"v4alpha: failing tests that should work for v4alpha",
"v4future: failing tests that should work for a future release of v4",
"v4remove: failing tests that should probably be removed later",
]
filterwarnings = [
"error:.*removed in a future release of Parcels.*:DeprecationWarning", # Have Parcels DeprecationWarnings fail CI (prevents deprecated items being used in internal code)
]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = [
"D", # pydocstyle
"E", # Error
"F", # pyflakes
"I", # isort
"B", # Bugbear
"UP", # pyupgrade
"LOG", # logging
"ICN", # import conventions
"G", # logging-format
"RUF", # ruff
"ISC001", # single-line-implicit-string-concatenation
]
ignore = [
# line too long (82 > 79 characters)
"E501",
# ‘from module import *’ used; unable to detect undefined names
"F403",
# Mutable class attributes should be annotated with `typing.ClassVar`
"RUF012",
# Consider `(slice(2), *block)` instead of concatenation
"RUF005",
# Prefer `next(iter(variable.items()))` over single element slice
"RUF015",
# Use `X | Y` in `isinstance` (see https://github.com/home-assistant/core/issues/123850)
"UP038",
# TODO: ignore for now (requires more work). Remove ignore once fixed
# Missing docstring in public module
"D100",
# Missing docstring in public class
"D101",
# Missing docstring in public method
"D102",
# Missing docstring in public function
"D103",
# Missing docstring in public package
"D104",
# Missing docstring in magic method
"D105",
# Missing docstring in __init__
"D400",
# First line should be in imperative mood (requires writing of summaries)
"D401",
# First word of the docstring should not be `This`
"D404",
# 1 blank line required between summary line and description (requires writing of summaries)
"D205",
# do not use bare except, specify exception instead
"E722",
# TODO: These bugbear issues are to be resolved
"B011", # Do not `assert False`
"B016", # Cannot raise a literal. Did you intend to return it or raise an Exception?
"B904", # Within an `except` clause, raise exceptions
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.isort]
known-first-party = ["parcels"]
[tool.mypy]
files = [
"parcels/_typing.py",
"parcels/tools/*.py",
"parcels/grid.py",
"parcels/field.py",
"parcels/fieldset.py",
]
[[tool.mypy.overrides]]
module = [
"parcels._version_setup",
"mpi4py",
"scipy.spatial",
"sklearn.cluster",
"zarr",
"cftime",
"pykdtree.kdtree",
"netCDF4",
"pooch",
]
ignore_missing_imports = true