Commit Graph
27 Commits
Author SHA1 Message Date
Abdessamad Derraz d8570c6480 refactor: build platform packs without printing
build_platform_pack and build_split_packs return what the build came to and print nothing. print_platform_pack holds the report lines, and generate_pack and generate_split_packs compose the two. The variant choice, the plan and the data directory pass return their notices instead of printing them. The callers that silenced stdout to get a record now call the builder.
2026-11-22 02:26:45 +01:00
Abdessamad Derraz 85f6447333 docs: drop two more clause semicolons 2026-11-22 00:17:50 +01:00
Abdessamad Derraz bbb139bbaf fix: name uncached trees once per manifest 2026-11-21 21:46:27 +01:00
Abdessamad Derraz 6721a738b4 refactor: hand uncached data trees to the caller
data_directory_members printed a warning and filled a process-wide set
that the pack, the manifest and the step 5 comparison all fed. It now
reports each uncached tree through uncached_out. The platform pack and
the manifest print the warning and add the tree to the run's account,
as the emulator pack already did with data_dir_notices, and
generate_pack names what it wrote: a --manifest run no longer ends on
'packs written without data directories'.
2026-11-21 19:50:33 +01:00
Abdessamad Derraz 37ec04aed1 refactor: move generate_pack modes into packs
Option checks go to packs/packoptions.py, the run modes to
packs/packmodes.py and the platform choice to packs/platformrun.py.
generate_pack.py keeps main() and build_parser(). Tests patch the
package modules instead of command attributes.
2026-11-21 15:47:20 +01:00
Abdessamad Derraz fbbb941e38 refactor: one owner for the test scratch folder
Test modules passed dir= the repository's tmp/ or a hard-coded tmp/tests by hand, and seven modules kept their own _tempdir copy. Under run_tests.py the literal tmp/tests did not exist in a fresh clone (FileNotFoundError in test_core_probe and scratch_checkout), and dir=tmp/ wrote beside the per-module scratch folders. Every temporary directory now lands in the folder tests/__init__ sets, and scratch_dir() replaces the copies. The X socket binds by a relative name, since a scratch path can exceed the 108-byte AF_UNIX limit. The journeys keep the short tmp/ root: their word budgets count the printed card path.
2026-11-21 06:04:40 +01:00
Abdessamad Derraz 3853ca2f1c refactor: public names for cross-module reads 2026-11-18 22:59:51 +01:00
Abdessamad Derraz 74207e25fc refactor: point tests at the packs modules 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 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 5f18caec31 refactor: put scripts/ on the test path once
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.
2026-11-17 16:11:23 +01:00
Abdessamad Derraz cc028fe7ee chore: clear the ruff findings in tests 2026-11-17 07:21:28 +01:00
Abdessamad Derraz 057fd2d0f6 fix: isolate every test module however it runs
tests/__init__.py keeps a run offline, its scratch under tmp/ and its
installer cache its own, but only discover -s tests -t . imported it.
discover tests ran with RETROBIOS_OFFLINE unset, scratch on the /tmp
tmpfs and the user's real installer cache, the setting in which e2e
fixtures had written into the shared .cache/large. Every test module now
imports the package first, and a test fails on a module that does not.
test_verify_listing.py took its line with the previous commit.
2026-11-06 15:14:05 +01:00
Abdessamad Derraz 4d3f589ef4 refactor: drop the archived platform status
RetroPie was the only platform with status: archived, which kept it out
of verify --all, slots, the pipeline and list_platforms unless
--include-archived was typed. release_pack already decides which packs a
release publishes and the installer serves every platform, so the status
set nothing apart. The field, its schema entry and the flag are gone, and
RetroPie is covered by every full run like any other platform.
2026-11-06 11:52:34 +01:00
Abdessamad Derraz 25c356669b fix: record each platform's own list version
install/<platform>.json wrote the constant "1.0" as the version of the
list it was built from. The manifest now carries the version the platform
YAML records, and generate_pack refuses a YAML without one.

inherits: no longer passes a parent's version to a child: Lakka was
published as RetroArch v1.22.2 in its manifest, pack name and site page.
lakka.yml records v6.1, the Lakka-LibreELEC tag its target list is read
at. The MiSTer scraper refuses a BiosDB without a timestamp instead of
writing an empty version.

A pack's manifest.json records list_version, so an install from the pack
alone knows it too. Manifests regenerated twice and compared: only
version and generated changed.
2026-10-27 19:10:39 +01:00
Abdessamad Derraz 625bee35cc fix: record missing data dirs in the run
main() starts each run with no notices, so the mocked run records the
missing directory itself.
2026-10-27 04:16:33 +01:00
Abdessamad Derraz 4231902a6c docs: write prose without dashes or semicolons
Profiles, the wiki, comments, docstrings, command output and schema descriptions carried em-dashes, clause-joining semicolons, unicode arrows, box-drawing banners and check-mark glyphs. Each sentence was rewritten rather than having its character swapped. Hashes, paths, source_ref values and every cited file:line are unchanged, which a comparison of each parsed profile against the previous revision confirms.

validate_pr comments now say PASS and FAIL in words, and source_ref values in a profile's structured blocks render as code. test_prose_style fails if any of these comes back, in tracked files or in the generated site.
2026-10-19 06:47:31 +02:00
Abdessamad Derraz ff3428e1f1 fix: resolve manifest core files like the pack
The manifest resolved core files without the data directories: blueMSX's pack carried its own MSX2P.rom while the manifest named another dump for the installer.
2026-10-18 19:46:03 +02:00
Abdessamad Derraz 1c7b2e85a4 fix: resolve nameless md5 entries as verify does 2026-10-18 18:18:19 +02:00
Abdessamad Derraz 34c8b925d7 fix: count a shared destination once, filled
verify kept the worst verdict on the raw destination, the builder the first one it read. Both now key on the sanitized path and let a declaration that holds a file fill one that finds nothing.
2026-10-18 18:17:28 +02:00
Abdessamad Derraz 92d639253a refactor: drop sixteen unused imports 2026-10-18 08:52:19 +02:00
Abdessamad Derraz fad4fa6d7e fix: read core files in verify as the builder does 2026-10-18 01:18:32 +02:00
Abdessamad Derraz 262cb5e438 fix: list core files nobody holds as omissions 2026-10-17 20:28:31 +02:00
Abdessamad Derraz 4a09412ae6 fix: fail a pack run missing its data directories 2026-10-17 19:41:35 +02:00
Abdessamad Derraz 18e61fabcb refactor: read the asset registry with one parser
generate_pack kept a private .gitignore parser whose cache ignored the
root it was asked about, and generate_db a copy of the shared one. Both
now read largefiles.load_registered_paths, cached per root. Test modules
whose main block preceded their last class end with it again.
2026-10-17 19:35:42 +02:00
Abdessamad Derraz d600a54a6e fix: report core files as the builder declares 2026-10-17 19:19:05 +02:00
Abdessamad Derraz a58b65754b fix: count a core file filling a declaration
In existence mode the builder packs a core's file at a destination the
platform declares and does not hold, and counts the declaration met.
verify now reads the same placement and reports it OK, so both sides
agree on the platform's count.
2026-10-17 18:14:26 +02:00