-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
90 lines (78 loc) · 2.25 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"
[tool.isort]
profile = "black"
line_length = 120
extend_skip_glob = ["venv*/*", "log/*"]
[tool.black]
line_length = 120
extend-exclude = "venv.*"
[tool.pylint.master]
recursive = "yes"
# Add McCabe code complexity checker
load-plugins= """
pylint.extensions.mccabe
"""
# The following settings modify the behavior when running pylint with pylint.extensions.docparams plugin loaded
accept-no-param-doc = "no"
accept-no-raise-doc = "no"
accept-no-return-doc = "no"
accept-no-yields-doc = "no"
ignore = [
"conf.py", # The Sphinx config file
".tox",
"build",
"dist",
"log"
]
ignore-patterns = ["venv.*"]
[tool.pylint.messages_control]
max-line-length = 120
# https://github.com/samuelcolvin/pydantic/issues/1961
extension-pkg-whitelist = "pydantic"
# ignore unrecognized-option because of https://github.com/PyCQA/pylint/issues/6799
disable = """
unrecognized-option,
too-few-public-methods,
logging-fstring-interpolation,
too-many-instance-attributes,
too-many-arguments,
duplicate-code,
missing-function-docstring
"""
[tool.pylint.similarities]
# Exclude the following from code duplication checks
ignore-comments = "yes"
ignore-docstrings = "yes"
ignore-imports = "yes"
ignore-signatures = "yes"
[tool.pylint.typecheck]
generated-members=["numpy.*", "torch.*"]
[tool.mypy]
# https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-ignore-missing-imports
ignore_missing_imports = true
# Functions need to be annotated
disallow_untyped_defs = true
exclude = ["venv.*/", "log/", "build/", "dist/"]
[tool.pytest.ini_options]
addopts = """
-vv
--doctest-modules
--junitxml=reports/pytest.xml
--cov=./
--cov-config=pyproject.toml
--cov-report xml:reports/coverage.xml
--cov-report html:reports/coverage_html
"""
[tool.coverage.run]
branch = true
data_file = "reports/.coverage"
omit = ["test*.py"]
[tool.coverage.paths]
# Maps coverage measured in site-packages to source files in src
source = ["*.py"]
[tool.pydocstyle]
convention = "google"
# Ignore folders starting with "venv" or with a dot. Also ignore some build directories
match-dir = "(?!venv|\\.|build|log|dist).*"