forked from spacetelescope/spherical_geometry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
74 lines (64 loc) · 2.02 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
[tox]
envlist =
py{39,310,311,312}-test{,-devdeps,-numpy2x}{,-cov}
codestyle
twine
bandit
[testenv]
# Pass through the following environment variables which are needed for the CI
passenv = HOME,WINDIR,CC,CI
setenv =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
# Run the tests in a temporary directory to make sure that we don't import
# package from the source tree
changedir = .tmp/{envname}
# tox environments are constructued with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-devdeps. Lines below starting with factor:
# will only take effect if that factor is included in the environment name. To
# see a list of example environments that can be run, along with a description,
# run:
#
# tox -l -v
#
description =
run tests
devdeps: with the latest developer version of key dependencies
cov: and test coverage
deps =
# The devdeps factor is intended to be used to install the latest
# developer version or nightly wheel of key dependencies.
devdeps: astropy>=0.0.dev0
!numpy2x: numpy==1.*
numpy2x: numpy>=2.0.0.dev0
cov: pytest-cov
extras =
test
commands =
pip freeze
!cov: pytest --pyargs spherical_geometry {posargs}
cov: pytest --pyargs spherical_geometry --cov spherical_geometry --cov-config={toxinidir}/pyproject.toml --cov-report xml:{toxinidir}/coverage.xml {posargs}
[testenv:codestyle]
skip_install = true
changedir = {toxinidir}
description = check code style with flake8
deps = flake8
commands = flake8 spherical_geometry --count
[testenv:twine]
skip_install = true
changedir = {toxinidir}
description = twine check dist tarball
deps =
build
twine>=3.3
commands =
pip freeze
python -m build --sdist .
twine check --strict dist/*
[testenv:bandit]
skip_install = true
changedir = {toxinidir}
description = Security audit with bandit
deps = bandit
commands =
pip freeze
bandit spherical_geometry -r -x spherical_geometry/tests