forked from Toloka/toloka-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
90 lines (81 loc) · 2.37 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
[tox]
minversion = 3.3.0
# attrs{20,21} appear due to the issue https://github.com/Toloka/toloka-kit/issues/37
envlist = py3{7,8,9,10}-attrs{20,21}-{all,pandas,autoquality,zookeeper,jupyter-metrics},py310-stubgeneration-all
isolated_build = True
requires = setuptools >= 36.2.0
[gh-actions]
python =
3.7: py37-attrs{20,21}-{all,pandas,autoquality,zookeeper,jupyter-metrics}
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
[testenv]
deps =
aiohttp
data-science-types
filelock >= 3.2.0
flake8
mypy
pytest
pytest-asyncio
pytest-lazy-fixture
requests_mock
types-requests
types-urllib3
attrs20: attrs==20.3.0
attrs21: attrs>=21.2.0
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: pandas: pytest tests/import_tests/test_jupyter_metrics.py -vv
attrs21-all: mypy 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}
coveragepy
codecov
passenv =
CI
CODECOV_*
commands =
coverage run --source {envsitepackagesdir}/toloka/client -m pytest tests
codecov
mypy src/client
# Test that stubs can be generated
[testenv:py310-stubgeneration-all]
deps =
{[testenv]deps}
stubmaker==0.0.3
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