-
Notifications
You must be signed in to change notification settings - Fork 112
/
tox.ini
96 lines (90 loc) · 2.35 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
92
93
94
95
96
[tox]
envlist = py{37,38,39,310,311,312}-sqla{14,latest}, pypy3-sqla{14,latest}, lint, coverage, docs
requires=
setuptools>42
[gh-actions]
python =
3.7: py37-sqla{14, latest}
3.8: py38-sqla{14, latest}, lint
3.9: py39-sqla{14, latest}
3.10: py310-sqla{14, latest}
3.11: py311-sqla{14, latest}, docs
3.12: py312-sqla{14, latest}
pypy-3.10: pypy3-sqla{14, latest}
[testenv]
passenv=
PROJ_LIB
PYTEST_ADDOPTS
PYTEST_POSTGRESQL_DB_URL
PYTEST_MARIADB_DB_URL
PYTEST_MYSQL_DB_URL
PYTEST_SPATIALITE3_DB_URL
PYTEST_SPATIALITE4_DB_URL
SPATIALITE_LIBRARY_PATH
setenv=
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
EXPECTED_COV = 93
pypy3: EXPECTED_COV = 85
sqla14: PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --mypy --mypy-ignore-missing-imports
sqlalatest: PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --mypy
pypy3: PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:}
deps=
sqla14: SQLAlchemy==1.4.*
sqlalatest: SQLAlchemy
sqla14: Alembic==1.10.*
sqlalatest: Alembic
!pypy3: psycopg2
pypy3: psycopg2cffi
!pypy3: Shapely>=1.3.0
pypy3: Shapely>=1.3.0, !=1.7.0
-rrequirements.txt
-rrequirements-mypy.txt
commands=
pip freeze --all
pytest -v \
--basetemp={envtmpdir} \
--cov=geoalchemy2 \
--cov-branch \
--cov-report term-missing \
--cov-report html:reports/coverage-{envname} \
--cov-report xml:reports/coverage-{envname}.xml \
--cov-fail-under={env:EXPECTED_COV} \
--html reports/pytest-{envname}.html \
--junit-xml=reports/pytest-{envname}.xml \
--self-contained-html \
--durations 10 \
--durations-min=2.0 \
{posargs}
[testenv:coverage]
skip_install = true
deps = coverage
allowlist_externals = /bin/bash
commands =
/bin/bash -c 'coverage combine .coverage-py*'
coverage xml
coverage report -m
[testenv:lint]
basepython = python3.8
skip_install = true
deps =
pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:format]
basepython = python3.8
skip_install = true
deps =
codespell
pre-commit
commands =
codespell -i 3 -w
pre-commit run --all-files
[testenv:docs]
basepython = python3.11
changedir = doc
allowlist_externals = make
deps =
-rrequirements-doc.txt
commands =
make clean
make html SPHINXOPTS=-W