-
Notifications
You must be signed in to change notification settings - Fork 24
/
pyproject.toml
186 lines (160 loc) · 4.78 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
[project]
name = "Retool"
dynamic = ["version"]
description = "A better filter tool for Redump and No-Intro DATs"
readme = "readme.md"
requires-python = ">=3.10"
license = {file = "LICENSE"}
keywords = ["filter", "1G1R", "Redump", "No-Intro", "DAT"]
authors = [
{name = "unexpectedpanda", email = "[email protected]"},
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"alive-progress >= 3.1.5",
"darkdetect >= 0.8.0",
"lxml >= 5.2.1",
"psutil >= 5.9.8",
"PySide6 == 6.6.2",
"strictyaml >= 1.7.3",
"validators >= 0.28.0",
]
[project.urls]
Documentation = "https://unexpectedpanda.github.io/retool/"
Issues = "https://github.com/unexpectedpanda/retool/issues"
Source = "https://github.com/unexpectedpanda/retool"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project.scripts]
retool = "retool:main"
retoolgui = "retoolgui:main"
# Hatch
[tool.hatch.version]
path = "modules/constants.py"
[tool.hatch.build.targets.wheel]
packages = ["retool.py", "retoolgui.py", "modules"]
[[tool.hatch.envs.all.matrix]]
python = ["3.10", "3.11", "3.12"]
[tool.hatch.envs.default.scripts]
all = [
"hatch run style:fix",
"hatch run types:check",
"hatch run lint:check",
"hatch run integration:test",
]
build = [
"all",
"hatch run build:build"
]
# Hatch lint setup and scripts
[tool.hatch.envs.lint]
detached = true
dependencies = [
"codespell",
]
[tool.hatch.envs.lint.scripts]
spelling = 'codespell retool.py retoolgui.py modules *.* -L ue -S modules/gui/resources_rc.py'
check = ["spelling"]
# Hatch style setup and scripts
[tool.hatch.envs.style]
type = "pip-compile" # requires the hatch-pip-compile dependency
detached = true
dependencies = [
"black",
"isort",
"ruff",
]
[tool.hatch.envs.style.scripts]
check = [
"isort --check-only --diff retool.py retoolgui.py modules tests",
"black -q --check --diff retool.py retoolgui.py modules tests",
"lint",
]
lint = [
"ruff check retool.py retoolgui.py modules tests {args}"
]
fix = [
"lint --fix",
"format",
]
format = [
"isort -q retool.py retoolgui.py modules tests",
"black -q retool.py retoolgui.py modules tests",
]
# Hatch types setup and scripts
[tool.hatch.envs.types]
dependencies = [
"mypy>=1.8.0",
]
[tool.hatch.envs.types.scripts]
check = [
"mypy --strict --install-types --non-interactive --python-version=3.10 retoolgui.py tests",
]
# Hatch tool configuration
[tool.black]
line-length = 100
skip-string-normalization = true
extend-exclude = "(modules/gui/resources_rc.py|modules/gui/retool_.*.py)"
[tool.isort]
profile = "black"
line_length = 100
extend_skip=["modules/gui/resources_rc.py"]
extend_skip_glob=["modules/gui/retool_*.py"]
[tool.mypy]
warn_unreachable = true
no_implicit_optional = true
show_error_codes = true
[tool.ruff]
lint.select = [
"F", "W", "E", "UP", "YTT", "C4", "DTZ", "FA", "ISC", "PIE", "T20", "RSE", "TCH",
"B002", "B003", "B005", "B007", "B009", "B012", "B013", "B014", "B015", "B018", "B020", "B021", "B023", "B026", "B033", "B034", "B905",
"COM818",
"D200", "D201", "D202", "D204", "D207", "D208", "D209", "D210", "D211", "D213", "D214", "D300", "D301", "D400", "D402", "D403", "D405", "D412", "D414", "D415", "D416", "D417", "D419",
"G010",
"PERF101",
"PGH004", "PGH005",
"FLY002",
"PLC", "PLE", "PLR0124", "PLR0133", "PLR0206", "PLR0402", "PLR1701", "PLR1722", "PLW0120", "PLW0127", "PLW0129", "PLW0131", "PLW0406", "PLW0602", "PLW0603", "PLW0711",
"RUF001", "RUF005", "RUF007", "RUF010", "RUF013", "RUF100", "RUF200",
"SIM101", "SIM107", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM300", "SIM401", "SIM910",
]
lint.ignore = ["E501", "E731"]
extend-exclude = ["modules/gui/resources_rc.py", "modules/gui/retool_*.py"]
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
# Hatch integration tests
[tool.hatch.envs.integration]
[[tool.hatch.envs.integration.matrix]]
python = ["3.10", "3.11", "3.12"]
[tool.hatch.envs.integration.scripts]
compilations = "python -m tests.compilations"
exclusions = "python -m tests.exclusions"
filters = "python -m tests.filters"
languages = "python -m tests.languages"
modern_rips = "python -m tests.modern_rips"
oldest = "python -m tests.oldest"
post_filters = "python -m tests.post_filters"
determinism = "python -m tests.determinism"
regions = "python -m tests.regions"
features = [
"compilations",
"exclusions",
"filters",
"languages",
"modern_rips",
"oldest",
"post_filters",
]
test = [
"features",
"determinism",
"regions",
]