Support GCS runtime dataset materialization#381
Merged
Conversation
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.
Fixes #379
Summary
gs://andhf://artifact URIs..datasets/with CRC-backed disk caching and support for generation or metadata-versioned objects.Microsimulationconstructors, preserving canonical bundle provenance separately.Root Cause
The simulation API needs to pass GCS dataset URIs for runtime execution, but the US country package intercepts string dataset references before policyengine-core can handle
gs://. This caused GCS runtime dataset references to fail instead of being downloaded to a local path.Validation
env POLICYENGINE_SKIP_COUNTRY_IMPORTS=1 uv run --extra dev --extra us --extra uk pytest --noconftest tests/test_dataset_sources.py -qruff check pyproject.toml src/policyengine/provenance/dataset_sources.py src/policyengine/utils/data src/policyengine/utils/google_cloud_bucket.py src/policyengine/tax_benefit_models/us/datasets.py src/policyengine/tax_benefit_models/us/model.py src/policyengine/tax_benefit_models/uk/datasets.py src/policyengine/tax_benefit_models/uk/model.py tests/test_dataset_sources.py tests/test_release_manifests.pyDeployment Note
The simulation API GCS normalization changes should wait for a policyengine.py release containing this support, unless the API intentionally pins a branch or wheel during testing.