-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
99 lines (83 loc) · 2.36 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
[tox]
# What order to run the envs (testenv:<name>)
envlist = format,docstrings,lint,typing
skipsdist = true
#### Default testenv config, applies to all testenv:<name>
[testenv]
deps = -r requirements.txt
basepython = python3.11
#### env configs
[testenv:format]
commands = black --preview --check --verbose -l 110 src
deps =
black==23.9.1
click==8.0.4
[testenv:docstrings]
commands = pydocstyle
deps = pydocstyle==6.1.1
[testenv:lint]
commands = flake8 src
deps =
flake8==4.0.1
flake8-isort==4.1.1
isort==5.10.1
[testenv:typing]
commands = python3 -m pip install types-requests
mypy --config-file tox.ini src
deps = mypy==1.1.1
#### Tool-specific configurations
[mypy]
ignore_missing_imports = True
# This script contains variant types that make sense in context
[flake8]
max-line-length=110
extend-ignore=W605,E712,W293, E261
# isort --settings-file tox.ini modules/clients/searchengine.py
[isort]
# Compatibility with the Black formatter
profile = black
reverse_relative=True
multi_line_output=3
use_parentheses = True
include_trailing_comma=True
force_grid_wrap=0
combine_as_imports=True
line_length=100
# Help it organize imports
known_third_party=boto3,pandas
# Help developers organize imports
import_heading_stdlib=Standard library
import_heading_thirdparty=Third party
import_heading_firstparty=First party
import_heading_localfolder=Local
[pydocstyle]
# Hand-picked from
# https://pep257.readthedocs.io/en/latest/error_codes.html
select=D101,D102,D103,D200,D207,D208,D209,D210,D300,D400
[pytest]
# https://docs.pytest.org/en/latest/customize.html
# No need to cache old test performances.
# No need to be able to upload results to pastebin.
# https://docs.pytest.org/en/latest/plugins.html#cmdunregister
addopts = -p no:cacheprovider -p no:pastebin
# Unit-test coverage config
# https://coverage.readthedocs.io/en/latest/config.html
[coverage:report]
# Sort file list by coverage percentage, low to high
sort = Cover
# Do spend screen space on 100% covered files
skip_covered = False
# Return nonzero status code if overall coverage is too low
fail_under = 100
# Show line numbers of lines not covered
show_missing = True
# Exclude abstract methods, keep ability to exclude with # pragma: no cover
exclude_lines =
pragma: no cover
exclude_also =
if __name__ == .__main__.:
raise ValueError
raise Exception
[coverage:run]
omit =
*__init__.py