-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
112 lines (102 loc) · 2.76 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[tox]
minversion = 3.0.0
requires =
numpy
setuptools >= 30.0.0
skip_missing_interpreters = true
envlist =
py36
py36-lint
py36-type
py36-docs
[testenv]
description = run the test suite with (basepython)
deps = -rtest-requirements.txt
# This environmental variable critically needed for pandoc to work.
# https://github.com/bebraw/pypandoc/blob/87912f0f17e0a71c1160008df708c876d32e5819/tox.ini#L6
passenv = HOME
commands = pytest {posargs}
[testenv:py36-lint]
description = check the code style
basepython = python3.6
commands =
black --check {toxinidir}
flake8 {toxinidir}/nucleic
pylint {toxinidir}/nucleic --errors-only --output-format=colorized
[testenv:py36-type]
description = type check the library
basepython = python3.6
commands = mypy --config-file {toxinidir}/tox.ini {toxinidir}/nucleic {posargs}
[testenv:py36-docs]
description = test building of HTML docs
basepython = python3.6
deps =
numpy
-rdocs/docs-requirements.txt
commands = sphinx-build docs {toxworkdir}/docs/_build -a --color -W -bhtml {posargs}
[testenv:dev]
description = the official nucleic development environment
envdir = venv
basepython = python3.6
usedevelop = True
commands =
python -m pip list --format=columns
python -c 'print("\n\nTo activate type: `source venv/bin/activate`\n\n")'
[coverage:run]
branch = true
source = nucleic
parallel = true
[flake8]
doctests = True
show-source = True
max-complexity = 12
max-line-length = 99
ignore =
D100 # Missing docstring in public module
D104 # Missing docstring in public package
D105 # Missing docstring in magic method
D107 # Missing docstring in __init__
E203 # Whitespace before ':', `black` style
E501 # Line too long, `black` normalizes anyway
RST304 # Unknown interpreted text role "X", https://github.com/peterjc/flake8-rst-docstrings/issues/7
W503 # Line break before binary operator, `black` style
enable-extensions=G
application-import-names = nucleic
exclude =
.git
.hypothesis
.ipynb_checkpoints
.mypy_cache
.pytest_cache
.tox
docs
tests
__init__.py
[mypy]
python_version = 3.6
platform = linux
mypy_path = docs/stubs
show_column_numbers = True
follow_imports = normal
ignore_missing_imports = True
disallow_untyped_calls = True
disallow_untyped_defs = True
no_implicit_optional = True
strict_optional = True
warn_no_return = True
warn_return_any = True
warn_redundant_casts = True
[pytest]
testpaths = nucleic tests docs
addopts =
--cov
--cov-config tox.ini
--cov-report html
--doctest-modules
--doctest-continue-on-failure
--doctest-plus
--doctest-rst
--doctest-glob '*.rst'
doctest_plus = enabled
doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL
mock_use_standalone_module = true