refactor: share CLI options and default paths

core.paths holds the default database, platforms, emulators and bios paths, core.cli declares the options built on them (add_repo_inputs) and the --emulator/--system modes verify and generate_pack share. model.targets.target_scope answers --target for a command line, model.profiles.no_profile_for_systems the system with no emulator. tests/sources.declared_options reads the options a script declares through either form.
This commit is contained in:
Abdessamad Derraz committed 2026-11-20 18:28:46 +01:00
1 parent 348d5b51c3
commit cf03dcb2ef
50 files changed
+260 -405

No files matched your search

+2 -1
View File
@@ -10,6 +10,7 @@ from collections.abc import Iterable
from pathlib import Path
from typing import NamedTuple
from core.paths import EMULATORS_DIR
from core.hashing import file_digest
from model.composition import composition_tier
from model.largefiles import LARGE_FILES_RELEASE, LARGE_FILES_REPO, asset_names, registered_paths
@@ -234,7 +235,7 @@ def render_notes(
return "\n".join(out)
def profile_descriptions(emulators_dir: str = "emulators") -> dict[str, str]:
def profile_descriptions(emulators_dir: str = EMULATORS_DIR) -> dict[str, str]:
"""Name -> description, from the first profile that declares the file."""
from model.profiles import load_emulator_profiles