-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtox.ini
More file actions
83 lines (79 loc) · 1.98 KB
/
Copy pathtox.ini
File metadata and controls
83 lines (79 loc) · 1.98 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
[tox]
min_version = 4.30.3
envlist =
lint
py{3.10,3.11,3.12,3.13}
docs
requires =
flit >= 3.11.0,<4.0
pip >= 25.2
setuptools >= 71.0
opts =
--verbose
[gh]
python =
3.10 = py3.10-coverage-upstream-prefetch
3.11 = py3.11-coverage-prefetch
3.12 = py3.12-coverage-prefetch
3.13 = py3.13-prefetch # coveralls not supported on 3.13
[testenv:lint]
skip_install = True
deps =
flake8 >=7.3.0
flake8-rst-docstrings >=0.3.1
ruff >=0.13.3
numpydoc >=1.9.0
commands =
make lint
allowlist_externals =
make
[testenv:docs]
extras =
docs
commands =
make autodoc-custom-index
make --directory=docs clean html
allowlist_externals =
make
[testenv]
setenv =
PYTEST_ADDOPTS = --numprocesses=logical --durations=10 --cov=ravenpy
PYTHONPATH = {toxinidir}
UPSTREAM_BRANCH = main
TOX = {envname}
passenv =
CI
COVERALLS_*
GDAL_VERSION
GITHUB_*
LD_LIBRARY_PATH
RAVEN_*
UPSTREAM_BRANCH
extras =
dev
gis
raven-hydro
download = true
install_command =
python -m pip install --no-user {opts} {packages}
deps =
coverage: coveralls>=4.0.1
; numpy must be present in python env before GDAL is installed
numpy >=1.25.0
gdal == {env:GDAL_VERSION}
commands_pre =
python -m pip list
python -m pip check
commands =
; Rebuild GDAL in order to gain access to GDAL system-level objects
python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir --no-build-isolation gdal[numpy]=={env:GDAL_VERSION}.*
; Install raven-hydro from the upstream branch
upstream: python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir git+https://github.com/Ouranosinc/raven-hydro.git@{env:UPSTREAM_BRANCH}
; Prefetch testing data
prefetch: python -c "import ravenpy.testing.utils as rtu; rtu.populate_testing_data(branch=\"{env:RAVEN_TESTDATA_BRANCH}\")"
; Run tests
pytest {posargs}
coverage: - coveralls
allowlist_externals =
make
env