-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
79 lines (70 loc) · 1.54 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
[tox]
requires =
tox>=4
envlist = py39, lint, typecheck, black, ingest
skip_missing_interpreters = true
[gh-actions]
python =
3.9: py39, lint, typecheck, black
[testenv]
deps =
pytest
requests
setenv =
NMDC_ENVIRONMENT = testing
SQLALCHEMY_SILENCE_UBER_WARNING=1
passenv =
NMDC_TESTING_DATABASE_URI
commands = pytest {posargs} tests/
[testenv:ingest]
setenv =
NMDC_ENVIRONMENT = testing
passenv =
NMDC_TESTING_DATABASE_URI
commands =
nmdc-server truncate
nmdc-server migrate
nmdc-server ingest
nmdc-server truncate
[testenv:lint]
skip_install = true
deps =
flake8 == 3.9.2
flake8-isort == 4.0.0
pep8-naming == 0.12.1
commands = flake8 nmdc_server tests
[testenv:typecheck]
deps =
mypy
pydantic
sqlalchemy-stubs>=0.4
types-setuptools
types-python-dateutil
types-requests
types-click
commands = mypy nmdc_server tests {posargs}
[testenv:black]
skip_install = true
deps = black
commands = black --check nmdc_server tests
[testenv:format]
skip_install = true
deps = black
commands = black nmdc_server tests
[pytest]
addopts = --verbose --showlocals
filterwarnings = ignore::pydantic.PydanticDeprecatedSince20
[flake8]
format = pylint
application-import-names = nmdc_server
import-order-style = google
max-line-length = 100
max-complexity = 12
extend-ignore =
E203
E231 # conflicts with black
W503 # conflicts with black
N805 # conflicts with pydantic validators
N815 # conflicts with nmdc column names
N818 # conflicts with existing code (Error suffix)
E711 # conflicts with sqlalchemy comparisons