forked from ics-py/ics-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
98 lines (89 loc) · 2.62 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
91
92
93
94
95
96
97
98
[tox]
isolated_build = true
envlist = py36, py37, py38, py39, pypy3, checks, docs
[testenv]
description = Run the pytest suite
setenv =
PYTHONDEVMODE=1
extras =
test
# see pyproject.toml for the list of dependencies in the "test" extra
commands =
pytest -V
python -c 'import sys, pkg_resources; dist = pkg_resources.get_distribution("ics"); print(repr(dist), dist.__dict__, sys.path)'
python -c 'import time; print((time.timezone, time.altzone, time.daylight, time.tzname, time.time()))'
pytest --basetemp="{envtmpdir}" {posargs}
[testenv:flake8]
description = Run the flake8 code style checks
deps = flake8>=3.8.1
commands =
flake8 --version
flake8 src/
[testenv:mypy]
description = Run the mypy type checks
deps = mypy>=0.770
commands =
mypy -V
mypy --config-file=tox.ini src/
[testenv:checks]
description = Run all code checkers (flake8 and mypy)
deps =
{[testenv:flake8]deps}
{[testenv:mypy]deps}
commands =
{[testenv:flake8]commands}
{[testenv:mypy]commands}
[testenv:docs]
description = Build the documentation with sphinx
deps =
sphinx
sphinxcontrib-napoleon
sphinx-autodoc-typehints
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" doc "{toxworkdir}/docs_out" --color -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39, docs, flake8, mypy
pypy3: pypy3
[pytest]
python_files = *.py
norecursedirs = dist venv .git .hypothesis .mypy_cache .pytest_cache .tox .eggs .cache ics.egg-info
testpaths = doc tests
addopts =
--doctest-glob='*.rst' --doctest-modules
--ignore doc/conf.py
--hypothesis-show-statistics
--cov=ics --cov-report=xml
-s
[flake8]
# http://flake8.pycqa.org/en/latest/user/error-codes.html
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
ignore =
# E127 continuation line over-indented for visual indent
E127
# E128 continuation line under-indented for visual indent
E128
# E251 unexpected spaces around keyword / parameter equals
E251
# E402 module level import not at top of file
E402
# E501 line too long (82 > 79 characters)
E501
# E701 multiple statements on one line (colon)
E701
# E704 multiple statements on one line (def)
E704
# E731 do not assign a lambda expression, use a def
E731
# F401 module imported but unused
F401
# F403 ‘from module import *’ used; unable to detect undefined names
F403
[mypy]
python_version = 3.9
warn_unused_configs = True
show_error_codes = True