The packs imports moved to module level in test_install_selection and
test_install_tui. They pull core.cli, which stops below Python 3.9, so
the 3.8 screen test step exited at import.
--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.
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.
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.
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.
core (0) imports the standard library only, model (1) loads data,
resolve (2) turns declarations into files, the domain packages (3)
build on them and the top-level scripts are the commands (4). The test
refuses an import into a higher layer, a cycle between packages or
inside core, model and resolve, and a package module importing a
top-level module. NOT_YET_PACKAGED and PENDING_TOP_LEVEL_IMPORTS list
what later waves move, exactly, so an emptied entry has to leave.
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.
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.
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__.
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.
Astro 7.4.12 writes its version in the generator meta of every page,
one byte longer than 7.4.4. AmberELEC ran 2 bytes over its budget on
Validation of 55e7616eb; each budget is now the size of its pages on
the site deployed from that commit.
tests/__init__ now puts the repository root and scripts/ on sys.path,
so no test module inserts them and every import sits in the import
block. ruff accepts the bare `import tests` the modules keep for its
side effects. The last suppressions go: helper test modules import as
tests.<name>, files open in with blocks, lambdas become functions.
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.
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.
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).
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.
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.
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.
The Wanted files link in the header of every page adds about 80 bytes a
page. Batocera, AmberELEC, RomM and RetroArch ran over their byte
budget on Validation of aada55e65; each budget is now the size of its
pages on the site deployed from that commit.