Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
122 lines (113 loc) · 4.04 KB
/
Copy pathtox.ini
File metadata and controls
122 lines (113 loc) · 4.04 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
# -*- coding: utf-8 -*-
# Copyright 2018, CS GROUP - France, https://www.csgroup.eu/
#
# This file is part of EODAG project
# https://www.github.com/CS-SI/EODAG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[tox]
requires = tox-uv
envlist = py310, py311, py312, py313, py314, docs, pypi, linters
# Mapping required by tox-gh-actions, only used in CI
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314
[testenv]
description = Run the unit, integration and doctest suite
pass_env = PYTEST_REPORT_ARGS
commands =
python -c "import os; os.makedirs(r'{env:EODAG_TEST_REPORTS}', exist_ok=True)"
pytest -v --instafail \
-n auto --dist loadscope \
{env:PYTEST_REPORT_ARGS:--cov=eodag --cov-report=term-missing --cov-report=html:{env:EODAG_TEST_REPORTS}/coverage} \
{posargs: --ignore=tests/test_end_to_end.py --ignore=tests/test_benchmark.py}
extras = test
deps = stac-valid
uv_resolution = highest
setenv =
COVERAGE_FILE=.coverage.{envname}
EODAG_TEST_REPORTS={toxinidir}/test-reports
# Any IO done by eodag or the tests should now be done in the local env /tmp
# This prevents race conditions when running the tests in parallel
TMPDIR={envtmpdir}
HOME={envtmpdir}
[testenv:min-deps]
description = Test lowest direct runtime dependencies on Python 3.10
basepython = python3.10
skip_install = true
deps =
allowlist_externals = uv
setenv =
{[testenv]setenv}
EODAG_TEST_REPORTS={toxinidir}/test-reports/min-deps
UV_PYTHON={envpython}
commands_pre =
# Pin direct runtime deps to their declared minimums (transitive deps stay latest compatible)
uv pip compile --resolution lowest-direct --upgrade \
--output-file "{env:EODAG_TEST_REPORTS}/runtime-requirements.txt" \
"{toxinidir}/pyproject.toml"
# Reset the env to exactly these pins, removing leftovers from previous runs
uv pip sync "{env:EODAG_TEST_REPORTS}/runtime-requirements.txt"
# stac-valid needs tqdm>=4.66, above the runtime minimum; use stac-validator here.
uv pip install \
--constraint "{env:EODAG_TEST_REPORTS}/runtime-requirements.txt" \
"{toxinidir}[test]" "stac-validator >= 3.7.0"
[testenv:docs]
description = Build the HTML documentation
basepython = python3.13
changedir = {toxinidir}/docs
usedevelop = false
extras = docs
allowlist_externals = /usr/bin/make
commands =
# generate collections information csv table
python {toxinidir}/utils/collections_information_to_csv.py
# clean previously auto-generated docs to avoid stale files
python -c "import shutil, os;\
[shutil.rmtree(os.path.join('{toxinidir}', 'docs', d), ignore_errors=True)\
for d in ('drivers_generated', 'plugins_reference/generated')]"
# build doc
make html SPHINXOPTS="-W --keep-going"
[testenv:benchmark]
description = Run performance benchmarks
basepython = python3.14
deps =
stac-valid
pytest-benchmark>=5.3.1
eodag-cube
commands =
pytest -v tests/test_benchmark.py --benchmark-disable-gc {posargs}
[testenv:pypi]
description = Build and validate the package for PyPI
skip_install = true
# To prevent from installing eodag and the dev deps set in testenv
deps =
build
twine
commands =
# build package to be checked
python -m build --installer uv
# Check that the long description is ready to be published on PyPI without errors
python -m twine check dist/*
[testenv:linters]
description = Run formatting, lint and type checks
basepython = python3.10
extras = dev
deps =
commands =
prek run --all-files
python -m mypy -p eodag