-
Notifications
You must be signed in to change notification settings - Fork 11
/
tox.ini
126 lines (117 loc) · 3.25 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
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
123
124
125
126
[tox]
envlist =
py{39, 310, 311, 312}-{lin,mac,win}
check
lint
format
flake8
type-check
docs
build
upload
skip_missing_interpreters = true
requires =
tox>=4
virtualenv>20.2
labels =
test = py{39, 310, 311, 312}-{lin,mac,win}
static = lint, format, flake8, type-check, docs
[testenv]
platform =
lin: linux
mac: darwin
win: win32
deps =
pytest
pytest-xdist
pytest-cov
typing_extensions
py39-mac: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.1.0.dev0-cp39-cp39-macosx_12_0_arm64.whl
py310-mac: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.1.0.dev0-cp310-cp310-macosx_12_0_arm64.whl
py311-mac: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.2.0.dev0-cp311-cp311-macosx_10_9_universal2.whl
py312-mac: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.1.0.dev0-cp312-cp312-macosx_12_0_arm64.whl
py312-mac: chaco @ https://github.com/capn-freako/PyBERT/raw/master/deps/chaco-6.0.0-cp312-cp312-macosx_12_0_arm64.whl
py312-win: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.1.0.dev0-cp312-cp312-win_amd64.whl
py312-win: chaco @ https://github.com/capn-freako/PyBERT/raw/master/deps/chaco-6.0.0-cp312-cp312-win_amd64.whl
package = wheel
wheel_build_env = .pkg
commands =
pytest --basetemp={envtmpdir} -vv --cov=pyibisami \
--cov-report=html --cov-report=term-missing tests \
--ignore=tests/ami/test_model.py # Need to build IBIS-AMI model for M2.
allowlist_externals =
validate-pyproject
[testenv:format]
description = Reformat all source code.
deps =
black
isort
autoflake
docformatter[tomli]
commands =
autoflake --in-place --remove-all-unused-imports --expand-star-imports \
--ignore-init-module-imports --recursive src/ tests/
docformatter --in-place --recursive src/ tests/
isort src/ tests/
black src/ tests/
[testenv:check]
description = Validate the `pyproject.toml` file.
skip_install = true
deps =
packaging
validate-pyproject
commands =
validate-pyproject pyproject.toml
[testenv:lint]
description = Run linting using `lint`.
skip_install = true
deps =
pylint
commands =
pylint --disable=E0401 src/
[testenv:flake8]
description = Run linting using `flake8`.
skip_install = true
deps =
flake8
commands =
flake8 --ignore=E501,E272,E241,E222,E221 src/
[testenv:type-check]
description = Run type checking using `mypy`.
skip_install = true
setenv =
MYPYPATH = {toxinidir}
deps =
mypy
types-PyYAML
commands =
python -m mypy type_stubs/ src/
[testenv:docs]
description = Build documentation.
skip_install = true
deps =
numpy
Cython
sphinx
sphinx_rtd_theme
m2r2
changedir = docs
setenv =
PROJ_VER={env:PROJ_VER}
commands =
sphinx-build -j auto -b html source/ build/
[testenv:build]
description = Build source tarball and wheel for distribution.
skip_install = true
deps =
build
commands =
python -m build
[testenv:upload]
description = Upload build products to PyPI.
skip_install = true
depends = build
deps =
twine
commands =
twine upload dist/pyibis_ami-{env:PROJ_VER}.tar.gz dist/PyIBIS_AMI-{env:PROJ_VER}-py3-none-any.whl