-
Notifications
You must be signed in to change notification settings - Fork 43
/
tox.ini
91 lines (82 loc) · 2.7 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
83
84
85
86
87
88
89
90
91
# -*- 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, 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
[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}
deps =
-r{toxinidir}/requirements-dev.txt
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.9
changedir = {toxinidir}/docs
usedevelop = false
deps = -r{toxinidir}/requirements-docs.txt
allowlist_externals = /usr/bin/make
commands =
# generate parameters mapping csv tables
python {toxinidir}/utils/params_mapping_to_csv.py
# generate product types information csv table
python {toxinidir}/utils/product_types_information_to_csv.py
# 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
commands =
# build package to be checked
python -m build
# 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 =
pre-commit run --all-files
python -m mypy -p eodag