-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
251 lines (230 loc) · 5.33 KB
/
pyproject.toml
File metadata and controls
251 lines (230 loc) · 5.33 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
250
251
[build-system]
requires = ["setuptools>=61.0", "wheel", "setuptools_scm[toml]>=6.0"]
build-backend = "setuptools.build_meta"
[project]
name = "marEx"
authors = [
{name = "Aaron Wienkers", email = "aaron@wienkers.com"},
]
description = "Marine Extremes Detection and Tracking"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Scientific/Engineering :: Physics",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
dynamic = ["version"]
dependencies = [
"numpy",
"xarray[complete]",
"dask[complete]==2025.3.0",
"netcdf4",
"scipy",
"scikit-image",
"dask_image",
"pandas",
"numba",
"pillow",
"xhistogram",
"flox>=0.10.1",
"matplotlib",
"cartopy",
]
[project.optional-dependencies]
# Minimal installation (basic oceanographic analysis)
minimal = []
# Performance optimisation dependencies
performance = [
"jax",
"jaxlib",
]
# High-performance computing cluster support
hpc = [
"dask_jobqueue",
"psutil",
]
# Visualisation and plotting
plotting = [
"seaborn>=0.11.0",
"cmocean",
"cartopy",
"matplotlib>=3.5.0",
"ffmpeg",
]
# Full installation (all optional dependencies)
full = [
"jax",
"jaxlib",
"dask_jobqueue",
"seaborn>=0.11.0",
"cmocean",
"ffmpeg",
]
# Development tools
dev = [
"pytest>=7.0.0",
"pytest-cov",
"pytest-xdist",
"black>=22.0.0",
"flake8>=4.0.0",
"flake8-pyproject",
"isort>=5.0.0",
"mypy>=0.991",
"pre-commit>=2.20.0",
"coverage[toml]>=6.0.0",
"nbqa",
"bandit[toml]>=1.7.0",
"psutil",
"sphinx>=5.0.0",
"sphinx-rtd-theme",
"myst-parser",
"jupyter",
"ipykernel",
]
# Documentation building
docs = [
"sphinx>=5.0.0",
"sphinx-rtd-theme",
"myst-parser",
"sphinx-autodoc-typehints",
"nbsphinx",
"pandoc",
"sphinxcontrib-video",
]
# Testing framework
test = [
"pytest>=7.0.0",
"pytest-cov",
"pytest-xdist",
"coverage[toml]>=6.0.0",
"psutil",
]
[project.urls]
"Homepage" = "https://github.com/wienkers/marEx"
"Bug Tracker" = "https://github.com/wienkers/marEx/issues"
[tool.setuptools]
packages = ["marEx"]
[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "node-and-date"
[tool.black]
line-length = 132
target-version = ['py310']
[tool.isort]
profile = "black"
line_length = 132
[tool.flake8]
max-line-length = 132
extend-ignore = ["E203", "W503", "E402", "D205", "D400"]
per-file-ignores = [
"__init__.py:F401",
"tests/*:D",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--tb=short",
"--strict-markers",
"--disable-warnings",
]
log_cli_level = "WARNING"
log_cli_format = "%(levelname)s %(name)s: %(message)s"
filterwarnings = [
"ignore::UserWarning",
"ignore::FutureWarning",
"ignore::DeprecationWarning",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"benchmark: marks tests as benchmark tests",
"nocov: marks tests to be excluded from coverage reporting",
"numba_issue: marks tests that have Numba compatibility issues with coverage",
]
[tool.coverage.run]
source = ["marEx"]
parallel = true # Enable parallel coverage collection
concurrency = ["thread", "multiprocessing"] # Handle both threads and processes
sigterm = true # Handle SIGTERM gracefully
omit = [
"*/tests/*",
"*/test_*.py",
"setup.py",
"*/_coverage_init.py",
"*/_dependencies.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@jit",
"@njit",
"@numba\\.jit", # Add comprehensive Numba exclusions
"@numba\\.njit",
"@numba\\.vectorize",
"@numba\\.guvectorize",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"except ImportError:",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
show_missing = true
precision = 2
[tool.coverage.html]
directory = "htmlcov"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
# Ignore missing imports for scientific packages that often lack stubs
ignore_missing_imports = true
# Exclude test files and notebooks for now
exclude = [
"tests/",
"examples/",
"build/",
"dist/",
]
[[tool.mypy.overrides]]
module = [
"numpy.*",
"scipy.*",
"pandas.*",
"xarray.*",
"dask.*",
"matplotlib.*",
"cartopy.*",
"skimage.*",
"numba.*",
"jax.*",
]
ignore_missing_imports = true