-
Notifications
You must be signed in to change notification settings - Fork 20
/
tox.ini
134 lines (104 loc) · 2.72 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[testenv]
passenv = PYTHONPATH FSBENCHMARKS DOWNWARD_BENCHMARKS
extras =
arithmetic
rddl
[testenv:pytest]
deps= pytest
commands= pytest
[testenv:mypy]
basepython = {env:TOX_LATEST_PYTHON:python3}
extras =
stubs
deps=mypy
setenv =
MYPYPATH = {toxinidir}/src
whitelist_externals =
/bin/sh
commands=
{toxinidir}/scripts/run-mypy
[testenv:coverage]
passenv = PYTHONPATH FSBENCHMARKS DOWNWARD_BENCHMARKS CI
deps=
pytest
pytest-cov
commands=
# Report both on screen and generate the xml file
pytest --cov-config=tox.ini --cov --cov-report term --cov-report xml
[testenv:antlrgrammars]
# Test the building of the different parser ANTLR grammars only
commands = {toxinidir}/scripts/build-grammars
[testenv:pylint]
# We avoid the installation of extras for this tox environment, as it appears
# that tox cannot handle URL-based package specs such as the one we're using for
# pyrddl at the moment
extras =
parsegen
gringo
deps =
setuptools
pylint
commands = {toxinidir}/scripts/lint
[testenv:flake8]
# We avoid the installation of extras for this tox environment, as it appears
# that tox cannot handle URL-based package specs such as the one we're using for
# pyrddl at the moment
deps =
flake8
commands = flake8 src/
[testenv:black]
basepython = {env:TOX_LATEST_PYTHON:python3}
skipsdist = true
deps =
black
commands =
python -m black src/tarski
python -m black tests
[testenv:docs]
description = Invoke sphinx-build to build the HTML docs
basepython = {env:TOX_LATEST_PYTHON:python3}
deps = -rdocs/requirements.txt
commands = {toxinidir}/scripts/build-docs
### Some coverage.py configuration options ###
[coverage:paths]
source =
src/tarski
*/site-packages/tarski
[coverage:run]
branch = true
source =
tarski
[coverage:report]
; show_missing = true
precision = 2
[flake8]
max-line-length = 120
ignore =
# Let's deal with "unused imports" once we move to Python 3.7 and can do lazy importing
F401,
# The preferred style now is as governed by W504, see https://www.flake8rules.com/rules/W503.html
W503,
exclude =
# Files auto-generated by ANTLR
src/tarski/io/_fstrips/parser
# Work in progress, full of false positives. TODO Reenable this soon.
src/tarski/io/pddl
### mypy-related configuration options ###
# https://mypy.readthedocs.io/en/latest/config_file.html
[mypy]
[mypy-tarski.io._fstrips.parser.*]
ignore_errors = True
[mypy-tarski.io.pddl.parsetab.*]
ignore_errors = True
[mypy-tarski.rddl.task]
ignore_errors = True
[mypy-tarski.io.rddl.*]
ignore_errors = True
[mypy-scipy.*]
ignore_missing_imports = True
[mypy-numpy.*]
ignore_missing_imports = True
[mypy-antlr4.*]
ignore_missing_imports = True
[mypy-pyrddl.*]
ignore_missing_imports = True