-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtox.toml
More file actions
75 lines (69 loc) · 2.6 KB
/
tox.toml
File metadata and controls
75 lines (69 loc) · 2.6 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
envlist = [
"lint",
"py3.{10,11,12,13,14}",
"docs"
]
skip_missing_interpreters = true
[env.docs]
description = "Build the documentation with makefile under {basepython}"
labels = ["docs"]
dependency_groups = ["docs"]
extras = []
commands = [
["make", "build-docs"]
]
commands_post = []
allowlist_externals = ["make"]
[env.gis]
description = "Run tests with extras under {basepython}"
deps = ["numpy >= 1.25.0", "gdal == {env:GDAL_VERSION}.*", "setuptools >= 71.0"]
extras = ["gis", "raven-hydro"]
commands = [
["python", "-m", "pip", "install", "--no-user", "--upgrade", "--force-reinstall", "--no-deps", "--no-binary", "gdal", "gdal[numpy]=={env:GDAL_VERSION}.*"],
["python", "-m", "pip", "install", "--no-user", "--upgrade", "--force-reinstall", "--no-deps", "--no-binary", "h5py", "h5py>=3.12.1"],
["python", "-c", "import ravenpy.testing.utils as rtu; rtu.populate_testing_data(branch=\"{env:RAVEN_TESTDATA_BRANCH}\")"],
["pytest", "{posargs}"]
]
[env.lint]
description = "Run code quality compliance tests under {basepython}"
labels = ["lint"]
skip_install = true
dependency_groups = ["lint"]
extras = []
commands = [
["make", "lint"]
]
commands_post = []
allowlist_externals = ["make"]
[env.upstream]
description = "Run tests with pytest under {basepython} for upstream libraries"
commands_pre = [
["python", "-m", "pip", "list"],
["python", "-m", "pip", "check"],
["python", "-m", "pip", "install", "--no-user", "--upgrade", "--force-reinstall", "--no-deps", "--no-binary", "raven-hydro", "git+https://github.com/Ouranosinc/raven-hydro.git@{env:UPSTREAM_BRANCH}"]
]
[env_run_base]
description = "Run tests with pytest under {basepython}"
setenv = {PYTEST_ADDOPTS = "--color=yes --numprocesses=logical --durations=10 --cov=ravenpy --cov-report=lcov", PYTHONPATH = "{toxinidir}", TOX = "{envname}", UPSTREAM_BRANCH = "main"}
passenv = ["CI", "COVERALLS_*", "GDAL_VERSION", "GITHUB_*", "LD_LIBRARY_PATH", "RAVEN_*", "UPSTREAM_BRANCH"]
download = true
install_command = ["python", "-m", "pip", "install", "--no-user", "{opts}", "{packages}"]
dependency_groups = ["test"]
extras = ["raven-hydro"]
commands_pre = [
["python", "-m", "pip", "list"],
["python", "-m", "pip", "check"]
]
commands = [
["python", "-m", "pip", "install", "--no-user", "--upgrade", "--force-reinstall", "--no-deps", "--no-binary", "h5py", "h5py>=3.12.1"],
["python", "-c", "import ravenpy.testing.utils as rtu; rtu.populate_testing_data(branch=\"{env:RAVEN_TESTDATA_BRANCH}\")"],
["pytest", "{posargs}"]
]
commands_post = [
["coverage", "report"]
]
[gh.python]
"3.10" = ["upstream"]
"3.11" = ["py3.11"]
"3.12" = ["py3.12"]
"3.13" = ["py3.13"]