forked from algolia/algoliasearch-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
77 lines (72 loc) · 2.07 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
[tox]
envlist =
py{27,34,35,36,37,38,39}-sync
py{34,35,36,37,38,39}-async
format
types
install_command = python -m pip install --user {opts} {packages}
[versions]
faker = >=1.0,<2.0
mock = >=2.0,<3.0
typing = >=3.6,<4.0; python_version < '3.5'
asyncio = >=3.4,<4.0
aiohttp = >=2.0,<4.0; python_version >= '3.4.2'
async_timeout = >=2.0,<4.0
mypy = >=0.600,<0.900
flake8 = ==3.8.3
black = ==22.3.0
twine = >=1.13,<2.0
wheel = >=0.34,<1.0
requests = ==2.26.0
types-requests = >=2.0,<3.0
[testenv]
deps =
faker {[versions]faker}
mock {[versions]mock}
typing {[versions]typing}
py{34,35,36,37,38,39}-async: asyncio {[versions]asyncio}
py{34,35,36,37,38,39}-async: aiohttp {[versions]aiohttp}
py{34,35,36,37,38,39}-async: async_timeout {[versions]async_timeout}
passenv =
ALGOLIA_APPLICATION_ID_1
ALGOLIA_ADMIN_KEY_1
ALGOLIA_SEARCH_KEY_1
ALGOLIA_APPLICATION_ID_2
ALGOLIA_ADMIN_KEY_2
ALGOLIA_APPLICATION_ID_MCM
ALGOLIA_ADMIN_KEY_MCM
commands =
py27-sync: python -m unittest discover -v
py27-async: python -c 'print "No asynchronous tests for Python 2.7, skipping."'
py{34,35,36}-{sync,async}: python -m unittest discover -v
py{37,38,39}-{sync,async}: python -m unittest discover -v -k {posargs:*}
[testenv:types]
basepython = python3.8
commands = mypy --config-file mypy.ini -p algoliasearch
deps =
requests {[versions]requests}
types-requests{[versions]types-requests}
asyncio {[versions]asyncio}
aiohttp {[versions]aiohttp}
async_timeout {[versions]async_timeout}
mypy {[versions]mypy}
[testenv:format]
basepython = python3.8
deps =
flake8 {[versions]flake8}
black {[versions]black}
commands =
black --check algoliasearch/ tests/
flake8 algoliasearch/ tests/
[testenv:release]
basepython = python3.8
deps =
twine {[versions]twine}
wheel {[versions]wheel}
passenv =
PYPI_USER
PYPI_PASSWORD
commands =
python setup.py sdist bdist_wheel
twine check dist/*
twine upload -u {env:PYPI_USER} -p {env:PYPI_PASSWORD} --repository-url https://upload.pypi.org/legacy/ dist/*