-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
125 lines (109 loc) · 2.58 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
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
[build-system]
requires = [
"setuptools >= 40.9.0",
"wheel",
]
build-backend = "setuptools.build_meta"
[tool.isort]
multi_line_output=3
line_length=120
include_trailing_comma = true
known_first_party=[
'ds_pycontain'
]
known_third_party=[ # Most popular libraries. Extend if necessary.
'dotenv',
'pqdm',
'pydantic',
'pytest',
'requests',
'setuptools',
'tqdm',
'typer',
'docker',
]
skip_gitignore=true
[tool.black]
line_length=120
[tool.pytest]
norecursedirs=[
'.git',
'.tox',
'.env',
'dist',
'build',
'migrations',
'docker',
'config',
'notebooks',
'research',
]
python_files = ['test_*.py']
addopts = [
'-ra',
'--showlocals',
'--strict-markers',
'--ignore=docs/conf.py',
'--ignore=setup.py',
'--ignore=ci',
'--ignore=.eggs',
'--doctest-modules',
'--doctest-glob=\*.rst',
'--tb=short',
]
testpaths = ['tests']
[tool.mypy]
warn_unused_configs = true
ignore_missing_imports = true
warn_unused_ignores = false
show_error_codes = true
check_untyped_defs = true
no_implicit_optional = true
mypy_path=['src']
[[tool.mypy.overrides]]
module = "ds_pycontain.*"
ignore_missing_imports = false
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "docker.*"
ignore_errors = true
[tool.pylint.basic]
good-names="""i,j,x,y,z,x1,y1,z1,x2,y2,z2,cv,df,dx,dy,dz,w,h,c,b,g,qa,q,a""""
max-args=8
[tool.pylint.main]
load-plugins=["pylint.extensions.docparams"]
[tool.pylint.messages_control]
disable=[
"suppressed-message",
# therefore we wouldn't have to install full dependency set in order to lint
"import-error",
# sometimes we create a dataclass or Pydantic module and just don't need public methods
"too-few-public-methods",
# below is handled by pycln
"unused-import",
# below is handled by isort
"wrong-import-order",
# too restrictive
"too-many-instance-attributes",
# not necessary nor useful in our projects
"missing-module-docstring"
]
[tool.pylint.format]
max-line-length=120
[tool.pylint.miscellaneous]
notes=["XXX"]
[tool.pylint.parameter_documentation]
accept-no-param-doc = false
accept-no-raise-doc = false
accept-no-return-doc = false
accept-no-yields-doc = false
default-docstring-type = "google"
[tool.pylint.design]
max-locals=20
[tool.pylint.similarities]
min-similarity-lines=10
[tool.bandit]
exclude_dirs = ["venv", "src/ds_pycontain/data"]
# B101 disables errors for asserts in the code
# remember to not use asserts for security and control flows
skips = ["B101"]