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

+6 -6
View File
@@ -22,11 +22,11 @@ import functools
import hashlib
import zlib
import sys
from common import filter_systems_by_target
from resolve.cores import filter_systems_by_target
from core.hashing import md5_composite_of, parse_md5_list
import io
from common import load_emulator_profiles
from common import load_platform_config
from model.profiles import load_emulator_profiles
from model.platforms import load_platform_config
import os
from packextras import platform_region_groups
from packpaths import _flat
@@ -36,8 +36,8 @@ import slots
from packresolve import resolve_declaration, resolve_file
from resolve.categories import BIOS, EntryCategories
from resolve.gamedata import without_game_data
from common import resolve_platform_cores
from common import sanitize_pack_path
from resolve.cores import resolve_platform_cores
from core.paths import sanitize_pack_path
import zipfile
from collections.abc import Callable, Mapping
@@ -442,7 +442,7 @@ def _repo_satisfies_declaration(
packed) from data coverage gaps (no repo file matches the upstream
declaration): only the former is a pack generation error.
"""
from common import md5_composite
from core.hashing import md5_composite
files_db = db.get("files", {})
by_md5 = db.get("indexes", {}).get("by_md5", {})