forked from Cadair/parfive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
71 lines (66 loc) · 1.61 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
[tox]
envlist =
py{37,38,39,310,311}{,-conda}{,-devdeps}
codestyle
build_docs
isolated_build = True
[testenv]
setenv =
PYTEST_COMMAND = pytest -vvv -s -raR --pyargs parfive --cov-report=xml --cov=parfive --cov-config={toxinidir}/setup.cfg {toxinidir}/docs {posargs}
extras =
ftp
tests
deps =
devdeps: aiohttp>=0.0.dev0
commands =
pip freeze --all --no-input
{env:PYTEST_COMMAND}
[testenv:build_docs]
changedir = docs
description = Invoke sphinx-build to build the HTML docs
# Be verbose about the extras rather than using dev for clarity
extras =
ftp
docs
commands =
sphinx-build -j auto --color -W --keep-going -b html -d _build/.doctrees . _build/html {posargs}
python -c 'import pathlib; print("Documentation available under file://\{0\}".format(pathlib.Path(r"{toxinidir}") / "docs" / "_build" / "index.html"))'
[testenv:codestyle]
skip_install = true
description = Run all style and file checks with pre-commit
deps =
pre-commit
commands =
pre-commit install-hooks
pre-commit run --color always --all-files --show-diff-on-failure
[testenv:mypy]
skip_install = true
description = Run mypy
deps =
mypy
types-aiofiles
pydantic
commands =
mypy -p parfive
# This env requires tox-conda.
[testenv:py{38,39,310,311}-conda]
extras =
deps =
conda_deps =
# core deps
tqdm
aiohttp
# ftp
aioftp
# tests
pytest
pytest-localserver
pytest-asyncio
pytest-socket
pytest-cov
aiofiles
conda_channels = conda-forge
install_command = pip install --no-deps {opts} {packages}
commands =
conda list
{env:PYTEST_COMMAND} {posargs}