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 -5
View File
@@ -16,6 +16,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
from core.cli import add_repo_inputs
from model.database import load_database
from model.profiles import load_emulator_profiles
from resolve.regionaudit import build_report
@@ -67,11 +68,7 @@ def main() -> int:
allow_abbrev=False,
description="Cross-check profile region: values against No-Intro provenance"
)
parser.add_argument("--db", default="database.json", help="Path to database.json")
parser.add_argument(
"--emulators-dir", default="emulators",
help="emulator profile directory (default: %(default)s)",
)
add_repo_inputs(parser, "db", "emulators")
parser.add_argument("--json", action="store_true", help="Machine-readable output")
args = parser.parse_args()
from model.cliargs import work_from_repo_root