-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpytest.ini
More file actions
127 lines (111 loc) · 4.76 KB
/
pytest.ini
File metadata and controls
127 lines (111 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
[pytest]
testpaths = tests
pythonpath = src
python_files = test_*.py
python_classes = Test*
python_functions = test_*
addopts =
-v
--tb=short
--strict-markers
--strict-config
-ra
# Parallel execution: auto-detect CPU count, group by module so
# session-scoped fixtures are shared within each worker.
-n auto
--dist loadscope
# Disable plugins that import numpy at plugin load time (before conftest).
# Numpy loads conda's uv.dll; once loaded, torch's shm.dll fails
# with WinError 127 on Windows. Disabling these lets conftest.py
# import torch first so its bundled uv.dll wins.
-p no:zarr
-p no:jaxtyping
markers =
# Test types
unit: Unit tests (fast, isolated)
integration: Integration tests (moderate speed)
e2e: End-to-end tests (slow, full workflow)
live: Tests that run against live external services
# Speed markers
slow: Slow tests (>30s)
quick: Quick tests (<5s)
# Data requirements
requires_data: Requires external data downloads
requires_cloud: Requires cloud API credentials
requires_credentials: Requires API credentials to be configured
requires_acquisition: Requires active cloud data acquisition (slow)
# Component markers
cli: CLI component tests
tui: TUI (terminal user interface) tests
domain: Domain workflow tests
data: Data acquisition/processing tests
models: Model execution tests
calibration: Calibration/optimization tests
# Model-specific
summa: SUMMA-specific tests
fuse: FUSE-specific tests
ngen: NGEN-specific tests
gr: GR-specific tests
hype: HYPE-specific tests
mesh: MESH-specific tests
lstm: LSTM-specific tests
# Optimization markers
optimization: Optimization/calibration tests
# Acquisition markers
acquisition: Data acquisition tests
contract: Handler contract tests
mixin_retry: RetryMixin tests
mixin_chunked: ChunkedDownloadMixin tests
mixin_spatial: SpatialSubsetMixin tests
# CI markers
smoke: Smoke tests (minimal, fast validation)
ci_quick: Quick CI validation (~5 min)
ci_full: Full CI validation (~30 min)
full: Full test matrix (opt-in)
full_examples: Full example test suite (multi-year workflows with optimization)
# Cache-aware markers (optimization)
uses_raw_cache: Test uses raw forcing data cache
cache_safe: Test is safe for parallel execution with shared cache
downloads_data: Test downloads external data (may be slow without cache)
requires_fresh_data: Test requires fresh download (skips cache)
# Property-based testing
property: Property-based tests using Hypothesis
# Dataset-specific markers (for parallel execution)
era5: ERA5-specific test
aorc: AORC-specific test
hrrr: HRRR-specific test
conus404: CONUS404-specific test
carra: CARRA-specific test
cerra: CERRA-specific test
nex_gddp: NEX-GDDP-CMIP6-specific test
# Default timeout per test (seconds). Override with @pytest.mark.timeout(N).
# Prevents runaway tests from blocking CI indefinitely.
timeout = 300
filterwarnings =
ignore:Conversion of an array with ndim > 0 to a scalar is deprecated:DeprecationWarning
ignore::DeprecationWarning:rasterio
ignore::FutureWarning:xarray
ignore:Column names longer than 10 characters will be truncated when saved to ESRI Shapefile\\.:UserWarning:opt\\.homebrew\\.bin\\.easymore
# numpy binary compatibility warning (requires reinstalling packages compiled against numpy)
ignore:numpy.ndarray size changed:RuntimeWarning
# GDAL exception mode warning (handled in conftest.py, but filter as backup)
ignore:Neither gdal.UseExceptions.*:FutureWarning:osgeo
# SWIG-generated code warnings from GDAL bindings (no __module__ attribute)
ignore:builtin type Swig.*has no __module__ attribute:DeprecationWarning
# ---- Registry migration (old @Registry.register() API still dominant) ----
ignore:.*Registry\.register\(\) is deprecated:DeprecationWarning:symfluence
ignore:.*Registry\.register_\w+\(\) is deprecated:DeprecationWarning:symfluence
# ---- Third-party noise ----
ignore:Column names longer than 10 characters:UserWarning
ignore:Normalized/laundered field name:RuntimeWarning:pyogrio
ignore:dropping variables using `drop` is deprecated:DeprecationWarning:easymore
ignore:Setting `jax_pmap_shmap_merge` is deprecated:DeprecationWarning:jax
ignore:The given NumPy array is not writable:UserWarning
ignore:An input array is constant
ignore:Degrees of freedom <= 0 for slice:RuntimeWarning:numpy
ignore:invalid value encountered in:RuntimeWarning:numpy
ignore:Mean of empty slice:RuntimeWarning:numpy
# Minimum Python version
minversion = 3.9
# Test discovery patterns
norecursedirs = .git .tox dist build *.egg __pycache__