Skip to content

Install h5py in Versioning job for TRACE TRO regen#285

Merged
MaxGhenis merged 1 commit intomainfrom
fix-tro-regen-h5py
Apr 18, 2026
Merged

Install h5py in Versioning job for TRACE TRO regen#285
MaxGhenis merged 1 commit intomainfrom
fix-tro-regen-h5py

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Problem

The post-merge `Versioning` job (push.yaml) fails at the "Regenerate bundled TRACE TROs" step with `ModuleNotFoundError: No module named 'h5py'`. `scripts/generate_trace_tros.py` imports `policyengine.core.release_manifest`, which transitively loads `policyengine.core.scoping_strategy` → `h5py`. The job installs with `pip install -e .` (no extras), so h5py is not present.

Run that failed: https://github.com/PolicyEngine/policyengine.py/actions/runs/24608911376

Fix

Install `h5py` alongside the bare package so the TRO regen script can import its dependency chain. Minimal change; no need to pull in the heavier `[us]`/`[uk]`/`[dev]` extras since the script does not touch the country model packages — it only reads bundled manifests, fetches HF data-release manifests over HTTPS, and emits JSON-LD.

Test plan

  • Push to `main` runs the Versioning job; it should now publish the bumped package

scripts/generate_trace_tros.py imports policyengine.core.release_manifest,
which transitively imports policyengine.core.scoping_strategy which
imports h5py. The Versioning job runs on a bare runner with only
`pip install -e .`, which doesn't include h5py (it's normally
brought in via the [us]/[uk]/[dev] extras). Add h5py to the install
line so the TRO regeneration step can import the module chain.
@MaxGhenis MaxGhenis merged commit 733cebc into main Apr 18, 2026
12 checks passed
@MaxGhenis MaxGhenis deleted the fix-tro-regen-h5py branch April 18, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant