Install h5py in Versioning job for TRACE TRO regen#285
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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