-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
81 lines (64 loc) · 1.71 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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = lint,py37,py38,py39,py310
skip_missing_interpreters =
true
[flake8]
max-line-length = 120
select = C,E,F,W,B,B950
ignore = E203, E501, W503
[testenv]
deps = -rrequirements/test.txt
allowlist_externals = make
commands =
pytest tests/unit tests/integration \
--cov-report term-missing \
--cov-report html \
--cov-report xml \
{posargs}
[testenv:unit]
deps = -rrequirements/test.txt
passenv =
TEST_API_TOKEN
commands =
pytest -s tests/unit
[testenv:integration]
deps = -rrequirements/test.txt
commands =
pytest -s tests/integration --test_api_token={env:TEST_API_TOKEN:} --test_api_url={env:TEST_API_URL:}
[testenv:lint]
deps =
pylint
black
flake8
commands =
black --line-length 120 --check --diff --target-version py38 cellarium tests
isort --check-only --diff -rc --line-length 120 --profile black tests cellarium
flake8 cellarium tests
pylint --exit-zero --max-line-length 120 cellarium tests
[testenv:format]
# install black in a virtual environment and invoke it on the current folder
deps =
black
isort
skip_install = true
commands =
black --line-length 120 cellarium tests
isort --line-length 120 --profile black tests cellarium
[testenv:docs]
deps =
-rrequirements/docs.txt
-rrequirements/vis.txt
changedir =
{toxinidir}/docs
commands =
make html SPHINXOPTS="-W --keep-going"
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310