-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathpyproject.toml
More file actions
233 lines (208 loc) · 6.79 KB
/
pyproject.toml
File metadata and controls
233 lines (208 loc) · 6.79 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
[project]
name = "rovr"
version = "0.8.0.dev1"
description = "A post-modern terminal file explorer"
readme = "README.md"
requires-python = ">=3.12, <3.14"
license = "MIT"
license-files = [ "LICENSE" ]
authors = [{ name = "NSPC911" }]
keywords = ["filemanager", "fs", "python", "textual", "tui"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.13",
# "Framework :: Textual", # I highly believe textual deserves its own category
"Topic :: Desktop Environment :: File Managers",
"Topic :: Utilities",
]
dependencies = [
"backports-zstd>=1.3.0; python_version < '3.14'",
"fastjsonschema>=2.21.2",
"humanize>=4.15.0",
"natsort>=8.4.0",
"pathvalidate>=3.3.1",
"pillow>=12.1.0",
"platformdirs>=4.9.0",
"psutil>=7.2.0",
"puremagic>=2.0.0",
"rarfile>=4.2",
"resvg-py>=0.2.6",
"rich>=14.3.1", # issue with 14.3.0 that breaks nerd fonts
"rich-click>=1.9.3",
"send2trash>=2.1.0",
"textual~=7.0",
"textual-autocomplete>=4.0.6",
"textual-image[textual]>=0.8.4",
"textual-speedups>=0.2.1",
"tomli>=2.4.0",
]
[project.urls]
Issues = "https://github.com/NSPC911/rovr/issues"
Source = "https://github.com/NSPC911/rovr"
Documentation = "https://nspc911.github.io/rovr"
[project.scripts]
rovr = "rovr:main"
[dependency-groups]
build = [
"zstandard>=0.25.0",
"poethepoet>=0.41.0",
"nuitka>=4.0.0",
]
dev = [
"poethepoet>=0.41.0",
"prek>=0.2.25",
"ruff>=0.15.0",
"textual-dev>=1.8.0",
"ty==0.0.8",
"pyinstrument>=5.1.2",
"commitizen>=4.13.0",
]
docscripts = [
"json-schema-for-humans>=1.5.1",
"jsonschema-gentypes>=2.13.0",
"poethepoet>=0.41.0",
"ruff>=0.15.0",
]
test = [
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0",
"pytest-xdist>=3.8.0",
]
[build-system]
requires = ["uv_build>=0.9.0,<0.10.0"]
build-backend = "uv_build"
[tool.uv]
compile-bytecode = true
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "$version"
version_scheme = "pep440"
version_provider = "uv"
update_changelog_on_bump = true
major_version_zero = true
[tool.poe.executor]
type = "uv"
no-sync = true
[tool.poe.tasks]
_hash_dump.shell = "git rev-parse HEAD > src/rovr/COMMIT_HASH"
_hash_clean.shell = "python -c \"import os; os.path.exists('src/rovr/COMMIT_HASH') and os.remove('src/rovr/COMMIT_HASH')\""
_docscripts_setup.cmd = "uv sync --group docscripts"
_test_setup.cmd = "uv sync --group test"
run.help = "Run rovr"
run.cmd = "rovr"
dev.help = "Run rovr in development mode with textual-dev"
dev.cmd = "textual run --dev rovr.__main__:cli --"
log.help = "Launch textual's console (need rovr to be launched as dev)"
log.cmd = "textual console -x WORKER -x SYSTEM -x DEBUG -x EVENT"
gen-schema.help = "Generate the JSON schema for rovr's config"
gen-schema.sequence = [
"_docscripts_setup",
{ cmd = "docs/scripts/generate_schema.py" },
]
icon-test.help = "Print all available icons to the terminal for testing"
icon-test.cmd = "docs/scripts/icon_test.py"
gen-keys.help = "Generate the keybinds documentation"
gen-keys.cmd = "docs/scripts/generate_keybinds.py"
typed.help = ""
typed.ref = "schema-to-dict"
schema-to-dict.help = "Convert the JSON schema into a Python TypedDict for internal use"
schema-to-dict.sequence = [
"_docscripts_setup",
{ cmd = "jsonschema-gentypes --json-schema ./src/rovr/config/schema.json --python ./src/rovr/classes/config.py" },
"format"
]
check.help = "Run all checks (type checking and linting)"
check.sequence = [ { cmd = "ty check" },{ cmd = "ruff check" } ]
fmt.help = ""
fmt.ref = "format"
format.help = "Run ruff related formatters"
format.sequence = [ { cmd = "ruff check --unsafe-fixes --fix"}, { cmd = "ruff format"} ]
svg-fmt.help = ""
svg-fmt.ref = "screenshot-format"
screenshot-format.help = "Format all SVG screenshots in the docs"
screenshot-format.cmd = 'pnpx prettier --write "docs/public/screenshots/*.svg" --parser html --bracket-same-line --print-width 160'
flame.help = "Start rovr with pyinstrument for flamegraph profiling"
flame.cmd = "pyinstrument --renderer=html --timeline --use-timing-thread --show-all -m rovr"
snap.help = ""
snap.ref = "snip"
snip.help = "Take a screenshot of the app after a certain delay, before saving to the docs screenshots folder"
snip.cmd = "textual run --screenshot ${delay} rovr.__main__:cli --screenshot-path docs/public/screenshots --screenshot-filename ${filename} -- --without theme.transparent"
snip.args = [
{ name = "filename", help = "Filename of the screenshot", type = "string", positional = true, required = true },
{ name = "delay", help = "Delay in seconds before taking the screenshot", default = 10, type = "integer" },
]
[tool.poe.tasks.test]
help = "Run tests"
sequence = [
"_test_setup",
{ cmd = "pytest -n ${workers} ${FILES}" }
]
args = [
{ name = "FILES", help = "Specific test files or directories to run (optional)", type = "string", positional = true, required = false, multiple = true },
{ name = "workers", help = "Number of parallel workers for test execution (optional)", default = 4, type = "integer", options = ["-n"] },
]
[tool.poe.tasks.build]
help = "Build rovr into an executable using Nuitka"
sequence = [
"_hash_dump",
{ cmd = 'nuitka --mode=${mode} --assume-yes-for-downloads --enable-plugins=no-qt --python-flag=-m --python-flag="no_docstrings" --include-package-data=rovr --lto=${lto} src/rovr --onefile-cache-mode=cached --onefile-child-grace-time=0 --user-package-configuration-file=nuitka.config.yml' },
"_hash_clean",
]
args = [
{ name = "mode", help = "Build mode: onefile (default) or standalone", default = "onefile", positional = true, choices = ["standalone", "onefile"] },
{ name = "lto", help = "Enable LTO (link time optimization)", default = "yes", choices = ["yes", "no"], options = ["--lto"] },
]
[tool.poe.tasks.uv-build]
help = "Build rovr distributions using uv and include commit hash"
sequence = [
"_hash_dump",
{ cmd = "uv build" },
"_hash_clean",
]
[tool.pytest]
testpaths = ["tests"]
asyncio_mode = "auto"
[tool.ruff]
force-exclude = true
exclude = [
"src/rovr/monkey_patches/sys_stdout.py"
]
[tool.ruff.lint]
select = [
"ASYNC220",
"ASYNC221",
"ASYNC251",
"ANN",
"COM819",
"C400",
"DOC",
"D404",
"E",
"F",
"I",
"N801", "N802", "N805",
"PLE1142",
"Q",
"SIM",
"TD",
"W",
]
ignore = ["W505", "E501", "ANN002", "ANN003", "TD002", "TD003", "ANN401"]
preview = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
preview = true
[tool.ty.src]
exclude = [
"src/rovr/classes/archive.py"
] # i dont want to add type indicators
[tool.ty.rules]
# possibly-missing-import = "ignore"
unresolved-reference = "ignore" # handled by ruff
unresolved-attribute = "ignore"
no-matching-overload = "ignore" # not that accurate
possibly-missing-attribute = "ignore" # no it is not missing
invalid-assignment = "warn" # probably already but warn for future