-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
241 lines (214 loc) · 6.19 KB
/
Copy pathpyproject.toml
File metadata and controls
241 lines (214 loc) · 6.19 KB
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
238
239
240
241
[build-system]
requires = ["setuptools>=82.0.1", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "construct-editor"
version = "0.2.0"
description = "GUI (based on wxPython) for 'construct', which is a powerful declarative and symmetrical parser and builder for binary data."
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "Tim Riddermann" }]
requires-python = ">=3.10"
keywords = [
"gui",
"wx",
"wxpython",
"widget",
"binary",
"editor",
"construct",
"kaitai",
"declarative",
"data structure",
"struct",
"symmetric",
"parser",
"builder",
"parsing",
"building",
"pack",
"unpack",
"packer",
"unpacker",
"bitstring",
"bytestring",
"bitstruct",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Typing :: Typed",
]
dependencies = [
"arrow>=1.0.0",
"construct>=2.10.68",
"construct-typing>=0.8.1,<0.9.0",
"typing-extensions>=4.12.0",
"wrapt>=2.2.2",
"wxPython>=4.2.2",
]
[project.urls]
Homepage = "https://github.com/timrid/construct-editor"
[project.gui-scripts]
construct-editor = "construct_editor.main:main"
[dependency-groups]
dev = [
"poethepoet>=0.48.0",
"mypy>=2.3.0",
"pyright>=1.1.411",
"ruff>=0.15.21",
"ty>=0.0.59",
"pytest>=9.1.1",
"pytest-mock>=3.15.1",
"pytest-cov>=7.1.0",
"cryptography", # optional "extra" from construct that the user may or may not have installed
"cloudpickle", # optional "extra" from construct that the user may or may not have installed
"lz4", # optional "extra" from construct that the user may or may not have installed
"numpy>=1.20.0", # optional "extra" from construct that the user may or may not have installed
"ruamel.yaml", # optional "extra" from construct that the user may or may not have installed
]
[tool.setuptools.packages.find]
include = [
"construct_editor",
"construct_editor.core",
"construct_editor.gallery",
"construct_editor.wx_widgets",
]
[tool.setuptools.package-data]
construct_editor = ["py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --cov=construct_editor --cov-report=term-missing --cov-report=html"
# Coverage is measured purely for informational purposes, to see which code
# still needs tests. There is intentionally no `fail_under` threshold - a low
# coverage percentage should never fail the build.
[tool.coverage.run]
source = ["construct_editor"]
branch = true
[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError",
"pass",
"\\.\\.\\.",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.mypy]
strict = true
# These errors should be activated in the future, but for now we don't want to refactor the entire codebase right now.
disable_error_code = [
"arg-type",
"attr-defined",
"import-untyped",
"misc",
"no-any-return",
"no-untyped-call",
"no-untyped-def",
"str-bytes-safe",
"unused-ignore",
]
[tool.pyright]
typeCheckingMode = "strict"
exclude = [
"**/node_modules",
"**/__pycache__",
"**/.*",
".history",
".venv",
".venv*",
"build",
"dist",
"libs",
]
# These warnings should be activated as "error" in the future, but for now we don't want to refactor the entire codebase right now.
# Valid values: "error", "warning", "information", "none"
reportArgumentType = "none" # 6 errors
reportAttributeAccessIssue = "none" # 8 errors
reportMissingParameterType = "none" # 130 errors
reportMissingTypeStubs = "none" # 11 errors
reportUnknownArgumentType = "none" # 132 errors
reportUnknownMemberType = "none" # 242 errors
reportUnknownParameterType = "none" # 64 errors
reportUnknownVariableType = "none" # 61 errors
# These "unnecessary isinstance" checks often enhance readability or increase the future-proofness of the code,
# since you can then explicitly "raise" for other types. So we don't want to complain about them.
reportUnnecessaryIsInstance = "none"
[tool.ty.src]
exclude = [
"**/node_modules",
"**/__pycache__",
"**/.*",
".history",
".venv",
".venv*",
"build",
"dist",
"libs",
]
# These warnings should be activated as "error" in the future, but for now we don't want to refactor the entire codebase right now.
# Valid values: "error", "warn", "ignore"
[tool.ty.rules]
invalid-argument-type = "ignore"
unresolved-attribute = "ignore"
unused-type-ignore-comment = "ignore"
[tool.ty.terminal]
error-on-warning = true
output-format = "concise" # "full" | "concise" | "github" | "gitlab" | "junit"
[tool.ruff]
line-length = 140
indent-width = 4
output-format = "concise" # "full" | "concise" | "grouped" | "json" | "junit" | "github" | "gitlab" | "pylint" | "azure"
[tool.ruff.lint]
allowed-confusables = ["×", "–", "‘", "’"]
select = [
"F",
"I",
"UP007",
"UP037",
"UP045",
]
# These warnings should be activated as "error" in the future, but for now we don't want to refactor the entire codebase right now.
ignore = [
"F403", # `from ... import *` used; unable to detect undefined names
"F405", # `...` may be undefined, or defined from star imports
]
[tool.poe.tasks.test]
cmd = "pytest $POE_EXTRA_ARGS"
executor = {type = "uv", isolated = true}
[tool.poe.tasks.lint]
cmd = "ruff check --fix --show-fixes"
executor = { type = "uv", isolated = true }
[tool.poe.tasks.lint-checkonly]
cmd = "ruff check"
executor = { type = "uv", isolated = true }
[tool.poe.tasks.ty]
cmd = "ty check"
executor = {type = "uv", isolated = true}
[tool.poe.tasks.pyright]
cmd = "pyright"
executor = {type = "uv", isolated = true}
[tool.poe.tasks.mypy]
cmd = "mypy construct_editor"
executor = {type = "uv", isolated = true}
[tool.poe.tasks.typecheck]
sequence = [
"ty",
"pyright",
"mypy"
]
[tool.poe.tasks.check-all]
sequence = [
"lint",
"typecheck",
"test",
]