-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtox.ini
82 lines (78 loc) · 1.82 KB
/
tox.ini
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
[tox]
min_version = 4.24.1
envlist =
lint
py{3.10,3.11,3.12,3.13}
docs
requires =
flit >= 3.10.1,<4.0
pip >= 25.0
setuptools >= 71.0
opts =
--verbose
[gh]
python =
3.10 = py3.10-coveralls-upstream
3.11 = py3.11-coveralls
3.12 = py3.12-coveralls
3.13 = py3.13 # coveralls not supported on 3.13
[testenv:lint]
skip_install = True
deps =
black[jupyter] ==25.1.0
blackdoc ==0.3.9
isort ==6.0.0
flake8 >=7.1.1
flake8-rst-docstrings ==0.3.0
ruff >=0.9.0
numpydoc >=1.8.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
passenv =
CI
COVERALLS_*
GDAL_VERSION
GITHUB_*
LD_LIBRARY_PATH
RAVENPY_*
UPSTREAM_BRANCH
extras =
dev
gis
download = true
install_command =
python -m pip install --no-user {opts} {packages}
deps =
coveralls: coveralls>=4.0.1
; numpy must be present in python env before GDAL is installed
numpy >=1.24.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}
; Run tests
pytest {posargs}
coveralls: - coveralls
allowlist_externals =
make
env