-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathtox.ini
88 lines (80 loc) · 2.46 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
[tox]
minversion = 3.3.0
# attrs{20,21} appear due to the issue https://github.com/Toloka/toloka-kit/issues/37
envlist = py3{8,9,10,11}-attrs{20,21}-{all,pandas,autoquality,zookeeper,jupyter-metrics},py310-stubgeneration-all
isolated_build = True
requires = setuptools >= 36.2.0
[gh-actions]
python =
3.8: py38-attrs{20,21}-{all,pandas,autoquality,zookeeper,jupyter-metrics}
3.9: py39-attrs{20,21}-{all,pandas,autoquality,zookeeper,jupyter-metrics}
3.10: py310-attrs{20,21}-{all,pandas,autoquality,zookeeper,jupyter-metrics},py310-stubgeneration-all
3.11: py311-attrs{20,21}-{all,pandas,autoquality,zookeeper,jupyter-metrics}
[testenv]
deps =
aiohttp
attrs20: attrs==20.3.0
attrs21: attrs>=21.2.0
dash<=2.8.1
data-science-types
filelock >= 3.2.0
flake8
mypy
# https://github.com/TvoroG/pytest-lazy-fixture/issues/65
pytest < 8.0
pytest-asyncio
pytest-lazy-fixture
pytest-timeout
pytest-mock
respx
types-urllib3
commands =
all: pytest tests -vv
pandas: pytest tests/import_tests/test_pandas.py -vv
autoquality: pytest tests/import_tests/test_autoquality.py -vv
zookeeper: pytest tests/import_tests/test_zookeper.py -vv
jupyter-metrics: pytest tests/import_tests/test_jupyter_metrics.py -vv
attrs21-all: mypy --no-strict-optional src
attrs21-all: flake8 --select=E,W,F --ignore=E122,E123,E127,E131,E203,E225,E226,E24,E275,E305,E306,E402,E722,E731,E741,F722,W503,W504,C9,N8 --max-line-length=200 src
extras =
all: all
pandas: pandas
autoquality: autoquality
zookeeper: zookeeper
jupyter-metrics: jupyter-metrics
# For Python 3.8 we additionally collect test coverage
# information and upload it to codecov
[testenv:py38-attrs21-all]
deps =
{[testenv]deps}
coverage
commands =
mypy --no-strict-optional src
coverage run --source {envsitepackagesdir}/toloka -m pytest tests
coverage xml -o coverage_py38.xml
# Test that stubs can be generated
[testenv:py310-stubgeneration-all]
deps =
{[testenv]deps}
stubmaker==0.1.0
commands = pytest misc/stubmaker/tests -vv
# Builds and uploads package to PyPI
[testenv:release]
basepython = python3.8
deps =
build
twine
passenv =
TWINE_USERNAME
TWINE_PASSWORD
commands =
python -m build --sdist --wheel .
twine upload dist/*
# Functional tests on real production version of Toloka.
[testenv:py38-functional-tests]
passenv =
TOLOKA_TOKEN
commands =
pytest functional_tests -vv
extras =
all