-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
237 lines (216 loc) · 5.47 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
[project]
name = "fur-pattern-generator"
requires-python = ">=3.10"
version = "0.3.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
################################################################################
# poetry
[tool.poetry]
name = "fur-pattern-generator"
version = "0.3.0"
description = ""
authors = ["RobertHue <[email protected]>"]
readme = "README.md"
packages = [{include = "fpg"}]
[tool.poetry.dependencies]
python = ">=3.10,<3.12,"
numpy = "^1.25.2"
opencv-python = "^4.8.0.74"
mathutils = "^3.3.0"
pillow = "^10.0.0"
loguru = "^0.7.0"
pyside6 = "^6.5.2"
cython = "^3.0.2"
[tool.poetry.group.dev.dependencies]
fake-bpy-module-latest = "^20230805"
pre-commit = "^3.3.3"
isort = "^5.12.0"
black = "^23.7.0"
ruff = "^0.0.282"
pyright = "^1.1.320"
mypy = "^1.4.1"
[tool.poetry.group.test.dependencies]
pytest = "^7.4.0"
pytest-cov = "^4.1.0"
codecov = "^2.1.13"
################################################################################
# PyTest
[tool.pytest.ini_options]
minversion = "7.4"
testpaths = "tests"
[tool.coverage.run]
branch = true
parallel = true
omit = [
"fpg/__init__.py",
"fpg/version.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"raise AssertionError",
"raise NotImplementedError",
]
[tool.coverage.paths]
source = [
"fpg/*",
]
[tool.coverage.html]
directory = "reports"
################################################################################
# FORMATTER
[tool.black]
target-versions = ["py37", "py38", "py39", "py310"]
line-length = 80
extend-exclude = '''
/(
| .vscode
| docs
| .gitignore
| poetry.lock
| pyproject.toml
)/
'''
################################################################################
# import sorter
[tool.isort]
py_version = 39
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER"
]
default_section = "FIRSTPARTY"
known_third_party = [
"numpy",
"pandas",
"keras",
"tensorflow",
"sklearn",
"matplotlib",
"scipy",
"h5py",
"seaborn",
"numba",
"gym",
"PyQt6",
"PyQt5",
"pyqtgraph",
"torch",
"tqdm"
]
known_first_party = []
known_local_folder = []
multi_line_output = 3
lines_after_imports = 2
force_single_line = true
use_parentheses = true
ensure_newline_before_comments = true
line_length = 80
include_trailing_comma = true
skip_glob = [
"docs/*",
"setup.py"
]
################################################################################
# dynamic duck-style checker
[tool.mypy]
# imports related
ignore_missing_imports = true
follow_imports = "silent"
# None and Optional handling
no_implicit_optional = false
strict_optional = false
# Configuring warnings
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
warn_return_any = false
# Untyped definitions and calls
check_untyped_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_decorators = false
# Disallow dynamic typing
disallow_subclassing_any = false
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
# Miscellaneous strictness flags
allow_untyped_globals = true
allow_redefinition = false
local_partial_types = false
implicit_reexport = true
strict_equality = true
# Configuring error messages
show_error_context = false
show_column_numbers = false
show_error_codes = true
exclude = ["examples"]
################################################################################
# LINTER
[tool.ruff]
select = ["F", "E"]
extend-select = ["W", "C90", "YTT", "ANN", "ASYNC", "A", "C4", "RET", "SIM", "PLC", "PLE", "PLR", "PLW", "FLY", "PERF", "RUF", "UP", "SIM"]
ignore = ["F401", "E402", "B905", "SIM300", "PD901", "PERF203", "ANN101", "PLR5501"]
fixable = ["F", "E", "W", "UP", "C90", "YTT", "ANN", "ASYNC", "A", "C4", "RET", "SIM", "PLC", "PLE", "PLR", "PLW", "FLY", "PERF", "RUF"]
unfixable = []
line-length = 80
# extend-exclude = ["tests", "test"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.isort]
force-single-line = true
force-sort-within-sections = false
lines-after-imports = 2
[tool.ruff.mccabe]
max-complexity = 24
[tool.ruff.pycodestyle]
ignore-overlong-task-comments = true
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
ignore-fully-untyped = true
[tool.ruff.pylint]
max-branches = 24
max-returns = 12
max-statements = 100
max-args = 15
allow-magic-value-types = ["str", "bytes", "complex", "float", "int", "tuple"]
################################################################################
# Static Type Checker
[tool.pyright]
typeCheckingMode = "basic"
# enable subset of "strict"
reportDuplicateImport = true
reportInvalidStubStatement = true
reportOverlappingOverload = true
reportPropertyTypeMismatch = true
reportUntypedClassDecorator = true
reportUntypedFunctionDecorator = true
reportUntypedNamedTuple = true
reportUnusedImport = true
# disable subset of "basic"
reportGeneralTypeIssues = false
reportMissingModuleSource = false
reportOptionalCall = false
reportOptionalIterable = false
reportOptionalMemberAccess = false
reportOptionalOperand = false
reportOptionalSubscript = false
reportPrivateImportUsage = false
reportUnboundVariable = true