Expose dataset/conversion scripts as uv entry points

scripts/ is now a proper package (scripts/__init__.py, added to the wheel's
packages), with each script registered under [project.scripts] using its
bare dashed name (e.g. `uv run migrate-geant-steps`). Tests now import these
modules normally instead of loading them by file path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-25 16:51:47 +02:00
parent 320365606a
commit 5be91e0d17
7 changed files with 18 additions and 41 deletions
+1 -8
View File
@@ -1,17 +1,10 @@
import importlib.util
import json
import stat
from pathlib import Path
import pytest
# scripts/ is not an installed package — load the module straight from its path.
_SPEC = importlib.util.spec_from_file_location(
"create_root_files",
Path(__file__).resolve().parents[1] / "scripts" / "create_root_files.py",
)
create_root_files = importlib.util.module_from_spec(_SPEC)
_SPEC.loader.exec_module(create_root_files)
from scripts import create_root_files
parse_detector_spec = create_root_files.parse_detector_spec
next_shard_index = create_root_files.next_shard_index