-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathtox.ini
More file actions
96 lines (87 loc) · 2.93 KB
/
tox.ini
File metadata and controls
96 lines (87 loc) · 2.93 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
# -*- 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]
envlist = py39, py310, py311, py312, py313, py314, docs, pypi, linters
skipdist = true
# Mapping required by tox-gh-actions, only used in CI
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314
[testenv]
install_command = uv pip install --upgrade {opts} {packages}
commands =
python -c "import os; os.makedirs('test-reports', exist_ok=True)"
pytest -v --instafail \
-n auto --dist loadscope \
--cov=eodag \
--cov-report term-missing \
--cov-report=html:test-reports/coverage \
--cov-report=xml:test-reports/coverage.xml \
--junitxml=test-reports/junit-report.xml \
--html=test-reports/tests/report.html \
--self-contained-html {posargs: --ignore=tests/test_end_to_end.py}
extras = dev
allowlist_externals = mkdir
setenv =
CPLUS_INCLUDE_PATH=/usr/include/gdal
C_INCLUDE_PATH=/usr/include/gdal
COVERAGE_FILE=.coverage.{envname}
# 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:docs]
basepython = python3.13
changedir = {toxinidir}/docs
usedevelop = false
extras = docs
allowlist_externals = /usr/bin/make
commands =
# generate parameters mapping csv tables
python {toxinidir}/utils/params_mapping_to_csv.py
# 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"
passenv = HOME
[testenv:pypi]
skip_install = true
# To prevent from installing eodag and the dev deps set in testenv
deps =
build
twine
uv
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]
basepython = python3.9
commands =
prek run --all-files
python -m mypy -p eodag