forked from openvinotoolkit/training_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
144 lines (129 loc) · 3.63 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# SETUP CONFIGURATION. #
[build-system]
# FIXME: specified torch wheel to build torch cpp extension should be fixed in some
# different way instead of using static link url
requires = [
"setuptools>=42",
"wheel",
"Cython~=0.29.32",
"numpy~=1.21.0"
]
build-backend = "setuptools.build_meta"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# COVERAGE CONFIGURATION. #
[tool.coverage.run]
source = [
"otx/",
]
omit = [
"otx/algorithms/*/configs/**/*pipeline*.py",
"otx/algorithms/*/configs/**/model*.py",
"otx/algorithms/*/configs/**/deployment.py",
"otx/algorithms/**/configs/**/backbones/*",
"otx/algorithms/**/*sample*.py",
"**/__init__.py",
"otx/recipes/*",
]
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ISORT CONFIGURATION. #
[tool.isort]
profile = "black"
known_first_party = ["ote_cli", "ote_sdk"]
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# MYPY CONFIGURATION. #
[tool.mypy]
python_version = 3.8
ignore_missing_imports = true
show_error_codes = true
# TODO: Need to be edited
follow_imports = "skip"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# PYLINT CONFIGURATION #
[tool.pylint.master]
ignore = "CVS"
ignore-patterns = "^.*test_.*.py"
[tool.pylint.messages_control]
disable = [
"logging-fstring-interpolation",
"too-few-public-methods",
"fixme",
"duplicate-code",
"raw-checker-failed",
"bad-inline-option",
"locally-disabled",
"file-ignored",
"suppressed-message",
"useless-suppression",
"deprecated-pragma",
"use-symbolic-message-instead",
"import-outside-toplevel",
"arguments-differ",
"use-dict-literal",
"broad-exception-raised",
]
[tool.pylint.typecheck]
generated-members = ["numpy.*", "torch.*"]
ignored-modules = [
"otx",
"ote_sdk",
"mmseg",
"segmentation_tasks",
"mmdet",
"detection_tasks",
"torchreid",
"torchreid_tasks",
"cv2",
"anomalib",
"pytorch_lightning",
"torch",
"addict",
"compression",
"openvino",
"pandas",
]
[tool.pylint.format]
max-line-length = 120
[tool.pylint.basic]
good-names = [
"i",
"j",
"k",
"e",
"ex",
"Run",
"_",
"x1",
"x2",
"y1",
"y2",
"x",
"y",
"r",
"id",
"type",
"xs",
"ys",
"p",
"f",
]
[tool.pylint.imports]
known-third-party = ["enchant", "ote_sdk", "otx"]
[tool.pylint.design]
max-args = 7
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# PYDOCSTYLE CONFIGURATION #
[tool.pydocstyle]
inherit = false
ignore = [
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line should be in imperative mood; try rephrasing
"D404", # First word of the docstring should not be This
"D406", # Section name should end with a newline
"D407", # Missing dashed underline after section
"D413", # Missing blank line after last section
"D418", # Methods decorated with @overload shouldn't contain a docstring
]