Commit Graph
2664 Commits
Author SHA1 Message Date
Abdessamad Derraz 3bfd72ba7f refactor: name the recipe package romrecipes 2026-11-18 20:20:46 +01:00
Abdessamad Derraz 05a6af5e97 docs: recipes help names the package 2026-11-18 20:11:33 +01:00
Abdessamad Derraz 694ce0c7f9 refactor: one acquisition directory 2026-11-18 19:58:21 +01:00
Abdessamad Derraz b0b505dc94 refactor: one recipe rule, one reconstruction 2026-11-18 19:58:21 +01:00
Abdessamad Derraz 41da592291 refactor: hash fields and pins read one way 2026-11-18 19:58:21 +01:00
Abdessamad Derraz 6172cb65c0 refactor: recipes command imports its packages 2026-11-18 19:49:59 +01:00
Abdessamad Derraz 0e4e5f450d refactor: move recipes and acquisition to packages 2026-11-18 19:49:49 +01:00
Abdessamad Derraz 664776ae91 refactor: recipe modules read the repo root 2026-11-18 19:38:56 +01:00
Abdessamad Derraz cbfa26f315 refactor: one manufacturer slug in the collection 2026-11-18 19:31:28 +01:00
Abdessamad Derraz 01ade3970c docs: name the new homes of moved site code 2026-11-18 19:31:28 +01:00
Abdessamad Derraz b648bf1784 refactor: import urllib.parse where it is read 2026-11-18 19:31:28 +01:00
Abdessamad Derraz 4e50286d8c refactor: split generate_site into sitegen modules 2026-11-18 19:31:28 +01:00
Abdessamad Derraz 231002a7c0 refactor: site commands keep only their options 2026-11-18 19:31:27 +01:00
Abdessamad Derraz 206dae3163 refactor: site modules into the sitegen package 2026-11-18 19:31:27 +01:00
Abdessamad Derraz 29f5c48a2c refactor: system names and guides below packs 2026-11-18 19:31:27 +01:00
Abdessamad Derraz ab0265408c refactor: site code reads the repo root from core 2026-11-18 19:31:27 +01:00
Abdessamad Derraz 825c527d11 refactor: one reader of a declared destination 2026-11-18 13:47:56 +01:00
Abdessamad Derraz d55555f3e0 refactor: one database path index per run 2026-11-18 13:47:56 +01:00
Abdessamad Derraz b4573d310b refactor: one keyword-option guard in core 2026-11-18 13:47:56 +01:00
Abdessamad Derraz 27330be60a refactor: leave the commands their own code 2026-11-18 13:47:56 +01:00
Abdessamad Derraz 1f8e106974 docs: name the packs modules 2026-11-18 13:47:56 +01:00
Abdessamad Derraz f48b66b540 refactor: keep split packs beside platformpack 2026-11-18 13:47:31 +01:00
Abdessamad Derraz 0b532366d0 refactor: move pack library code into packs/ 2026-11-18 13:47:31 +01:00
Abdessamad Derraz 4d4052a8ab refactor: one type-checking block per alias 2026-11-18 13:46:15 +01:00
Abdessamad Derraz 18e91f8c07 refactor: read the repo root from core.paths 2026-11-18 13:46:15 +01:00
Abdessamad Derraz 92903eb4be refactor: split the C# reader from RetroBat's 2026-11-18 13:38:44 +01:00
Abdessamad Derraz 27333c154a refactor: hash the MAME pack with core.hashing 2026-11-18 13:38:44 +01:00
Abdessamad Derraz 738bb5bc07 refactor: share the target scrapers' fetch and CLI 2026-11-18 13:38:44 +01:00
Abdessamad Derraz 6f8b8dedb2 refactor: share the scrapers' fetch helpers 2026-11-18 13:38:44 +01:00
Abdessamad Derraz a5834a4b8a refactor: move the export library into exporter 2026-11-18 13:38:44 +01:00
Abdessamad Derraz 8738179f42 refactor: move the region audit library down 2026-11-18 13:38:44 +01:00
Abdessamad Derraz a81c497e8d refactor: break the scraper import cycles 2026-11-18 13:38:34 +01:00
Abdessamad Derraz 2b3551dd22 fix: keep a write pass going on a cold cache
--rebase-refs or --bump-commit with --offline read the prose of a
profile whose cited files were never cached, and the NotCachedError
ended the whole pass on a traceback. The profile is named, counted
as failed and left as it was, and the pass goes on.
2026-11-18 12:50:24 +01:00
Abdessamad Derraz 735f86283b refactor: split profile_sync into profiling
profile_sync.py keeps the command line: the parser, the flag checks,
profile selection against the branch, main, and the two steps that
read top-level modules (project_base, the site's source paths). The
library goes to one module per concern under scripts/profiling.

Tests that patched a name now patch the module their caller reads
it from. test_layers declares profiling with no sibling imports.
2026-11-18 12:49:20 +01:00
Abdessamad Derraz eea24c68ca refactor: read sourceref names from their module
profile_sync re-exported the source_ref grammar for its callers and
tests. Each of them imports it from model.sourceref now, and
profile_sync keeps a plain import of what it uses.
2026-11-18 12:41:16 +01:00
Abdessamad Derraz e1f2f8685d refactor: move upstream, sourceref, version_basis
upstream reads forges with the standard library alone and scrapers,
packs and the site read it: it goes to core. sourceref is the grammar
of a profile field, which the site parses without the comparison
tool: it goes to model. version_basis is read by profile_sync alone
and opens the profiling package.
2026-11-18 12:39:09 +01:00
Abdessamad Derraz 8cdda10393 docs: say what core and resolve.layout hold 2026-11-18 12:10:12 +01:00
Abdessamad Derraz b688f41a5a docs: name the modules that replaced common.py
The wiki, the platforms README and two comments named common.py, and
the installer's region table named scripts/region.py. tools.md lists
core/, model/ and resolve/ where it listed common.py, and the testing
guide names test_layers. install.py is rebuilt from installer/ and its
pins rewritten.
2026-11-18 11:43:36 +01:00
Abdessamad Derraz bcb99cf761 refactor: break the launchers and layout cycle
resolve.layout imported resolve.launchers inside functions, and
launchers imported the outer roots back from layout inside functions:
the cycle common.py and launchers.py had. The outer roots and
outer_layout read only the platform config, so they move to
model.declarations beside declared_root, and launchers imports them at
the top.
2026-11-18 11:39:59 +01:00
Abdessamad Derraz c764d9abf1 refactor: split the leaf modules libraries use
model.region holds the region vocabulary, resolve.regions the selection
that needs the cores a platform runs. The libraries behind identity.py,
retired_files.py and torrentzip.py move to resolve.identity,
model.retired and core.torrentzip, with their long docstrings; the
commands stay where they are run from. The source_ref parts that cite a
config or feature file move from scraper.shell_launchers to
resolve.launcherrefs, so resolve no longer imports the scraper package.
2026-11-18 11:39:47 +01:00
Abdessamad Derraz 83cfa6fd0f refactor: split common.py into three packages
core: cli (run_cli, input errors, name hints), github (token), paths.
model: sources, database, composition, registry, platforms,
declarations, targets, systems, profiles, cliargs. resolve: content,
ownership, datadirs, archives, localfile, directories, layout,
contentlayout, standalone, grouping, cores.

Definitions move verbatim; common.py and its re-exports are gone and
every importer, patch target and code-in-string names the new home. A
test that stubbed common.load_platform_config stubs each module that
reads the loader by its own name.
2026-11-18 11:09:13 +01:00
Abdessamad Derraz c784aef883 refactor: move leaf modules into packages
core: hashing, artifacts, ziptools, deterministic_zip, romdir, sect233r1,
crypto_verify, paths (REPO_ROOT). model: safeparse (needs yaml),
dumpcatalog, largefiles, alternatives. resolve: nativemode, validation,
launchers, slot, truth, gamedata, and exporter/baseline.py and
exporter/candidates.py as resolve/reconcile.py and resolve/categories.py,
which truth and gamedata read.

Every importer follows. Modules one level deeper read the repository
root from core.paths instead of __file__.
2026-11-18 10:50:45 +01:00
Abdessamad Derraz a98e0a7140 chore: check install.py against installer/ in CI
validate.yml and pr_checks.py run build_installer.py --check after the
lint, vermin holds installer/ to 3.8 beside install.py, mypy and ruff
read the package, and both workflows trigger on installer/**.
CONTRIBUTING says where installer changes go.
2026-11-18 01:37:33 +01:00
Abdessamad Derraz e9f6fe43a0 refactor: split the installer into a package
install.py held 31,575 lines and 1,370 definitions in one module. Its
source is now installer/, 45 modules by concern, each importing from the
others what it uses, so ruff and mypy read every module on its own.

scripts/build_installer.py joins them back into install.py in import
order, with one block of standard library imports and the zlib and
unicodedata guard. It refuses an import from outside the standard
library, a name two modules define, an import cycle, a renamed import
and an import-time read of a name from a later module. install.py stays
one stdlib-only file for the bootstraps, the launchers and PyPI.

The split was written by a script, statement by statement: every
top-level statement of the old file is in the new one with the same AST.
Two tests that located code by its neighbour now read it by name.
2026-11-18 01:37:28 +01:00
Abdessamad Derraz ecf225d007 refactor: read platform-only APIs without ignores 2026-11-17 16:44:35 +01:00
Abdessamad Derraz 8f1b88bb7e chore: lint with ruff in CI, drop mypy baseline
The code now carries no type error and no ruff finding. CI runs mypy
bare and ruff with the rule set of pyproject.toml; pr_checks.py and
the contribution guide list both. The baseline and its tooling go.
2026-11-17 15:28:11 +01:00
Abdessamad Derraz 0d0ec442b3 chore: merge the installer quality work 2026-11-17 15:11:43 +01:00
Abdessamad Derraz 188f9393a3 refactor: group outcome, check and menu arguments 2026-11-17 14:02:33 +01:00
Abdessamad Derraz 1c37f1eb02 refactor: split the wanted list build by stage 2026-11-17 10:01:23 +01:00
Abdessamad Derraz e14a7d79bb chore: merge the verify and truth quality work 2026-11-17 09:48:56 +01:00