refactor: move profile selection into profiling

select_profiles and version_selection go to profiling.selection, the flag
refusals to profiling.flagchecks. main calls selection, quota and the
profile loader through their modules, so tests patch them there.
generate_truth's parse_args becomes build_parser.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 15:47:20 +01:00
1 parent 8afccc3d0f
commit b520e48798
8 files changed
+241 -219

No files matched your search

+3 -3
View File
@@ -30,7 +30,7 @@ yaml = require_yaml()
DEFAULT_OUTPUT_DIR = TRUTH_DIR
def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
def build_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
allow_abbrev=False,
description="Generate ground-truth YAML from emulator profiles",
@@ -50,11 +50,11 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
help="hardware target filter",
)
add_repo_inputs(parser, "platforms", "emulators", "db")
return parser.parse_args(argv)
return parser
def main(argv: list[str] | None = None) -> None:
args = parse_args(argv)
args = build_parser().parse_args(argv)
require_directory(args.platforms_dir, "--platforms-dir")
registry = load_platform_registry(args.platforms_dir, required=True)