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.
This commit is contained in:
Abdessamad Derraz committed 2026-11-18 11:09:13 +01:00
1 parent c784aef883
commit 83cfa6fd0f
281 files changed
+7036 -6794

No files matched your search

+5 -10
View File
@@ -5,7 +5,7 @@ about its game folders, read at a pinned revision: the roms root relative to
the BIOS folder, each folder with the system name the OS gives it, the
extensions it lists and the core it starts by default. Those files hold the
OS's facts only. Which repository system a folder is, and which profile its
core is, is decided here, through the one alias table in common.py
core is, is decided here, through the one alias table in model/systems.py
(`SYSTEM_ALIASES`, `_norm_system_id`) and the profiles' `cores:` lists, so a
change to either reaches every setup without a rescrape.
"""
@@ -16,15 +16,10 @@ import re
from dataclasses import dataclass, field
from pathlib import Path
from common import (
_norm_system_id,
list_registered_platforms,
load_emulator_profiles,
load_platform_config,
native_layer,
preferred_profile,
upstream_profile_index,
)
from model.systems import _norm_system_id
from model.registry import list_registered_platforms
from model.profiles import load_emulator_profiles, preferred_profile, upstream_profile_index
from model.platforms import load_platform_config, native_layer
from model.safeparse import yaml_load
ROMFOLDERS_DIR = Path("platforms") / "romfolders"