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
+8 -4
View File
@@ -34,7 +34,7 @@ The model is developed in two phases:
## Data
Input: parquet files produced by [miniCaloSim](https://gitlab.etp.kit.edu/lbogner/minicalosim), or converted from a ROOT file via `scripts/steps_to_parquet.py`. Each row is one Geant4 step. Train/val split is by `event_id` (not row shuffle) to avoid leaking correlated steps from the same shower.
Input: parquet files produced by [miniCaloSim](https://gitlab.etp.kit.edu/lbogner/minicalosim), or converted from a ROOT file via `uv run steps-to-parquet`. Each row is one Geant4 step. Train/val split is by `event_id` (not row shuffle) to avoid leaking correlated steps from the same shower.
## Project structure
@@ -55,9 +55,13 @@ giant/
│ ├── validate.py # step-level marginal + KL-divergence validation
│ ├── analysis.py # notebook diagnostics: marginals, correlations, constraint checks
│ └── cli.py # `giant train` / `giant predict` Typer app
├── scripts/
│ ├── train.py # argparse training entry point
── steps_to_parquet.py # ROOT → parquet conversion (uproot/awkward/polars)
├── scripts/ # also exposed as uv entry points, e.g. `uv run steps-to-parquet`
│ ├── steps_to_parquet.py # ROOT → parquet conversion (uproot/awkward/polars)
── steps_to_parquet_parallel.py # fan out steps_to_parquet.py over several ROOT files
│ ├── migrate_geant_steps.py # one-time move into the raw/processed/pools/derived layout
│ ├── bump_dataset_version.py # cut a new raw gen or parquet schema, with a logged reason
│ ├── create_root_files.py # generate new ROOT shards via a minicalosim executable
│ └── hparam_scan.py # hyperparameter grid scan over `giant train` runs
└── tests/
```