-
Notifications
You must be signed in to change notification settings - Fork 139
/
pyproject.toml
159 lines (142 loc) · 4.07 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
[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 = [
"cgen",
"cftime",
"numpy",
"dask",
"cftime",
"psutil",
"netCDF4",
"zarr",
"tqdm",
"pymbolic",
"pytest",
"scipy",
"xarray",
]
[project.urls]
homepage = "https://oceanparcels.org/"
repository = "https://github.com/OceanParcels/parcels"
Tracker = "https://github.com/OceanParcels/parcels/issues"
[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"]
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",
]
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/compilation/codegenerator.py",
"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",
"cgen"
]
ignore_missing_imports = true