Commit Graph
2580 Commits
Author SHA1 Message Date
Abdessamad Derraz 0e763fd013 chore: merge main into the lint work 2026-11-17 09:05:08 +01:00
Abdessamad Derraz 87ba76c94e refactor: keep declared_hash_verdict keywords
typing_extensions is not a dependency the scripts may import, even for
the type checker. The declaration stays ten keywords, typed as
collections.
2026-11-17 09:02:33 +01:00
Abdessamad Derraz c92c14ef44 chore: merge the tooling scripts quality work 2026-11-17 08:26:04 +01:00
Abdessamad Derraz fe243ce8a8 chore: lint and type the remaining tools 2026-11-17 08:25:26 +01:00
Abdessamad Derraz 54521380dc refactor: split long functions of the tools 2026-11-17 08:25:26 +01:00
Abdessamad Derraz ddcdd14cca refactor: split build_setups by folder 2026-11-17 08:25:26 +01:00
Abdessamad Derraz ecc30d396f refactor: split core_probe argument checks 2026-11-17 08:25:26 +01:00
Abdessamad Derraz 3764e77e92 refactor: type documents validate_schemas reads 2026-11-17 08:25:26 +01:00
Abdessamad Derraz 89e186c18b refactor: split validate_file by stage 2026-11-17 08:25:19 +01:00
Abdessamad Derraz fa5c02fb66 refactor: split campaign checks by stage 2026-11-17 08:25:19 +01:00
Abdessamad Derraz f2fd49a9c9 refactor: share now_iso and the pack size label 2026-11-17 08:25:10 +01:00
Abdessamad Derraz f36a95bdcc docs: keep shell reader docstrings in house style 2026-11-17 08:10:24 +01:00
Abdessamad Derraz aab606f496 refactor: type and split the build helpers 2026-11-17 07:52:20 +01:00
Abdessamad Derraz 9ac7b848a4 refactor: split pipeline main into stages 2026-11-17 07:52:20 +01:00
Abdessamad Derraz b4cf8a969f refactor: split alias collection and dedup 2026-11-17 07:52:20 +01:00
Abdessamad Derraz 86f32f6afb refactor: split resolve_local_file by stage
Each resolution stage is its own function, run in the same order with
the same guards and statuses. load_platform_config, _build_layouts,
content_layout and system_core_reach are split the same way, the
re-exports move to the top, declared_hash_verdict takes its declaration
as a typed dict.
2026-11-17 07:52:14 +01:00
Abdessamad Derraz e2b3daff63 chore: merge the scraper quality work 2026-11-17 07:51:58 +01:00
Abdessamad Derraz 60a72ac0c6 refactor: split build_report and writers by stage 2026-11-17 07:44:07 +01:00
Abdessamad Derraz 29c75f21a2 chore: type the json answers read by upstream 2026-11-17 07:44:07 +01:00
Abdessamad Derraz a6bc592c24 refactor: split prose run scanning by stage 2026-11-17 07:44:07 +01:00
Abdessamad Derraz 27ee267431 refactor: split version_basis.read by basis kind 2026-11-17 07:44:06 +01:00
Abdessamad Derraz 7905729c18 refactor: type and split dat importers 2026-11-17 07:39:30 +01:00
Abdessamad Derraz 4fdc100197 refactor: type romfolders and hash tooling 2026-11-17 07:35:02 +01:00
Abdessamad Derraz 9af72a1ffb refactor: split scraper cli and platform scrapers 2026-11-17 07:35:02 +01:00
Abdessamad Derraz fbf7ae826d refactor: type and split recalbox launchers 2026-11-17 07:33:36 +01:00
Abdessamad Derraz e6c5b78a64 refactor: type and split shell launchers 2026-11-17 07:31:37 +01:00
Abdessamad Derraz d62c314f33 refactor: type and split configgen launchers 2026-11-17 07:31:02 +01:00
Abdessamad Derraz 34eee3f087 refactor: drop dead scraper import fallbacks 2026-11-17 07:23:39 +01:00
Abdessamad Derraz 3e732fd57e chore: merge origin main into the lint work 2026-11-17 07:09:55 +01:00
Abdessamad Derraz 4eacb6ff39 chore: lint scripts and tests with ruff
pyproject.toml now carries the ruff rule set: pyflakes, the B rules,
simplify, perf, pyupgrade, complexity and size limits. This commit
applies the fixes that change no behavior and the small defects the
first run named:

- tests/test_install.py used argparse without importing it
- three loops rebound the outer `profile` with each layout
  (packextras, slots, verify); the loop variable is now `layout`
- profile_sync loops shadowed dataclasses.field
- generate_readme and packextras computed values nothing read
- stale noqa markers for rules the project does not enforce

Complexity, size and the remaining findings are handled next.
2026-11-17 07:07:48 +01:00
Abdessamad Derraz ac37802e20 feat: keep game data out of the wanted list
Game data is the player's own, and a file the emulator installs for the build that reads it is no gap: neither is listed. A platform entry leaves when every core reading it installs it (validation.deliverable, scoped by the platform's build of each core).
2026-11-17 03:14:42 +01:00
Abdessamad Derraz 6c03dd07ee chore: type the placement tables of validate_pr
The platform table mixes sets and dicts, so mypy read it as
Collection[Any] and rejected the setdefault and the folder argument
that b3a510995 added. The narrowed folder set is a name of its own,
since it can be None. Nine baseline entries go with it.
2026-11-13 20:47:25 +01:00
Abdessamad Derraz b1e8de7124 feat: show the wanted list as a plain table
File name, size, CRC32, MD5 and SHA1, a header row per system, firmware and required first, filtered by name or hash. Each name links its emulator card, else its setup page. Rows carry no upload button: the drop box does that. wanted.json keeps only what the table and the drop box read.
2026-11-13 19:54:20 +01:00
Abdessamad Derraz 6ce6469d25 feat: rank unread platform files after firmware
A file a platform lists and no core it runs reads (verify's unread category) comes after firmware and before game data, labelled on its row.
2026-11-13 19:00:17 +01:00
Abdessamad Derraz b3a5109955 fix: place hashless files by their own system
The wanted list puts firmware first, then game data, labels each row, and leaves out what no one can share (the profile's reason: user written, emulator written, per person). validate_pr.placement() takes a file known by name alone to its system's folder or the directory it declares, never beside a homonym held for another system.
2026-11-13 18:34:13 +01:00
Abdessamad Derraz 3fd61df038 feat: list every wanted file with its upload
The wanted page lists every file the gaps report lacks, hashless ones included and marked, by system and most useful first, each with its own upload button to the folder validate_pr.placement() gives. Steps from a file in hand to its merge, copy without personal pronouns, list address versioned against stale caches.
2026-11-13 17:38:34 +01:00
Abdessamad Derraz fda0806bad fix: keep the wanted page copy in the house style 2026-11-13 15:59:32 +01:00
Abdessamad Derraz c4f746e2d5 chore: merge the wanted files page 2026-11-13 12:26:49 +01:00
Abdessamad Derraz e6738e591b feat: put the wanted page in the site header
A Wanted files link sits in the bar on every page and every width, beside the search and menu buttons on a phone, current on its own page. Below 27rem the site name is kept for screen readers only. files/ and wanted/ link each other in one line.
2026-11-13 12:26:18 +01:00
Abdessamad Derraz 4a9317cb4c feat: add the wanted page
Files dropped on wanted/ are hashed in the browser and compared with the files the gaps page reports the collection lacks. A wanted file gets a link to GitHub's upload page for the folder validate_pr asks for, and the name to give it. The gaps page upload link reads the same rule.
2026-11-13 10:45:18 +01:00
Abdessamad Derraz b18e478db0 refactor: share the placement rule of validate_pr
placement() decides the folder and name of a file not under bios/ yet, so the wanted page and the gaps page send an upload where the review asks for it. A declared file whose name the collection holds now gets the .variants/ slot beside it.
2026-11-13 10:45:12 +01:00
Abdessamad Derraz 849722ef18 fix: report a large file only when no name answers 2026-11-13 10:41:09 +01:00
Abdessamad Derraz 9d8dcb1634 docs: keep the readme badges that say something
GitHub cannot name the license of LICENSE, which opens on its scope,
and the Python floor is in the install text. The row keeps the PyPI
version and the validation status.
2026-11-13 06:40:13 +01:00
Abdessamad Derraz 9c2d931b12 chore: drop 241 byte-identical bios copies
Each removed file has the same bytes as another file the collection
keeps. Every platform and profile entry resolves to the same content
before and after, and every installer list gives the same sha1 to every
destination. Copies that alone carry a hashless name, sit in a tree
addressed by path (game data, directory entries), or would leave a
system folder empty are kept. Three identity exemptions no longer apply.
2026-11-13 04:30:05 +01:00
Abdessamad Derraz 37aadbd4e0 fix: write the verify excerpt whole
generate_report_excerpt.py rewrote wiki/reading-reports.md with
write_text, which test_atomic_artifacts refuses for a generator: an
interrupted run left a truncated page. It now goes through
write_text_atomic like the other generators.
2026-11-12 18:56:41 +01:00
Abdessamad Derraz 16b452bf3c feat: write the verify excerpt from a real run
The RetroDECK excerpt of wiki/reading-reports.md went stale with every
file the collection gained, three times on 2026-11-12. It now sits
between generated markers, and generate_report_excerpt.py writes it from
verify.py --platform retrodeck at pipeline step 7 (--check reports a
stale block).
2026-11-12 17:19:13 +01:00
Abdessamad Derraz c61cc21d88 fix: take the repository hold in the test scratch
Modules run side by side by run_tests.py each started pipelines or
generators that hold the repository root, and the second was refused:
four modules failed on the busy lock in a full run. tests/__init__ names
a scratch folder in RETROBIOS_REPOSITORY_LOCK_DIR, and artifact_lock
takes a repository root's lock there, keyed by the root's path so a
scratch checkout and its child find the same one. Real runs are
unchanged.
2026-11-12 16:29:58 +01:00
Abdessamad Derraz abbfebff3e feat: run the CI suite as parallel processes
validate.yml and pr_checks.py run scripts/run_tests.py with four jobs,
the runner's cores: 24 minutes here for the suite that took about 40 in
one process. A failed module's tracebacks are printed in the summary, as
a runner keeps no log file. The two scripts added today follow the rules
the suite holds every script to (no abbreviated option, run_cli, every
option documented), and the two isolation tests drop the per-module
scratch variable to check the folder a module gets alone.
2026-11-12 15:36:46 +01:00
Abdessamad Derraz fb33ee58e1 feat: find a file stored inside others by crc32
A ROM an emulator embeds sits at an undocumented offset of its
executable, installer or archive. find_embedded tries every offset with a
rolling crc32 (a 29 MB executable in about 3 seconds), reads ZIP members
and walks folders. A hit stays a candidate until --sha1 confirms it, and
--extract writes only a confirmed one, to tmp/acquire/.
2026-11-12 13:56:46 +01:00
Abdessamad Derraz bdfa2be849 chore: merge the dependency updates 2026-11-12 13:49:49 +01:00