Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/update-us-bundle.changed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the bundled US release to policyengine-us 1.690.7 and refresh data provenance metadata.
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ graph = [
"networkx>=3.0",
]
uk = [
"policyengine_core>=3.26.0",
"policyengine_core>=3.26.1",
"policyengine-uk==2.88.14",
]
us = [
"policyengine_core>=3.26.0",
"policyengine-us==1.687.0",
"policyengine_core>=3.26.1",
"policyengine-us==1.690.7",
]
dev = [
"pytest",
Expand All @@ -59,9 +59,9 @@ dev = [
"plotly>=5.0.0",
"pytest-asyncio>=0.26.0",
"ruff>=0.9.0",
"policyengine_core>=3.26.0",
"policyengine_core>=3.26.1",
"policyengine-uk==2.88.14",
"policyengine-us==1.687.0",
"policyengine-us==1.690.7",
"towncrier>=24.8.0",
"mypy>=1.11.0",
"pytest-cov>=5.0.0",
Expand Down
3 changes: 3 additions & 0 deletions scripts/refresh_release_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
from __future__ import annotations

import argparse
import os
import sys

os.environ.setdefault("POLICYENGINE_SKIP_COUNTRY_IMPORTS", "1")

from policyengine.provenance.bundle import (
refresh_release_bundle,
regenerate_trace_tro,
Expand Down
7 changes: 5 additions & 2 deletions src/policyengine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@
(the pinned ``TaxBenefitModelVersion``), and the microsim helpers.
"""

import os
from importlib.util import find_spec

from policyengine import outputs as outputs
from policyengine.core import Simulation as Simulation

if find_spec("policyengine_us") is not None:
_SKIP_COUNTRY_IMPORTS = os.environ.get("POLICYENGINE_SKIP_COUNTRY_IMPORTS") == "1"

if not _SKIP_COUNTRY_IMPORTS and find_spec("policyengine_us") is not None:
from policyengine.tax_benefit_models import us as us
else: # pragma: no cover
us = None # type: ignore[assignment]

if find_spec("policyengine_uk") is not None:
if not _SKIP_COUNTRY_IMPORTS and find_spec("policyengine_uk") is not None:
from policyengine.tax_benefit_models import uk as uk
else: # pragma: no cover
uk = None # type: ignore[assignment]
Expand Down
31 changes: 16 additions & 15 deletions src/policyengine/data/release_manifests/us.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,34 @@
"policyengine_version": "4.4.2",
"model_package": {
"name": "policyengine-us",
"version": "1.687.0",
"sha256": "cac7da3aa9ba4bf57009eee75d798217bbef7e1c5ca17646d472fad715ab634f",
"wheel_url": "https://files.pythonhosted.org/packages/c3/36/5633f5a3996c915494154ec3852011b1a239ea06d9f08cb6287ab709618c/policyengine_us-1.687.0-py3-none-any.whl"
"version": "1.690.7",
"sha256": "5a7a541efabac98fa069d6845902cf5924c81db67383234b55dcd2b8bfcfc3ca",
"wheel_url": "https://files.pythonhosted.org/packages/2a/02/52109bae5f4767237b43bd72ce0bc4edf7925650a788053b2bc168caa5ae/policyengine_us-1.690.7-py3-none-any.whl"
},
"data_package": {
"name": "policyengine-us-data",
"version": "1.78.2",
"version": "1.110.12",
"repo_id": "policyengine/policyengine-us-data",
"release_manifest_path": "releases/1.78.2/release_manifest.json",
"release_manifest_revision": "9cb665df0a546f9c3d79b496f8eb2dd55859d38d"
"release_manifest_path": "releases/1.110.12/release_manifest.json",
"release_manifest_revision": "3aac4505ec10d31efc1b3799a1e6458a15853ecc"
},
"certified_data_artifact": {
"data_package": {
"name": "policyengine-us-data",
"version": "1.78.2"
"version": "1.110.12"
},
"build_id": "policyengine-us-data-1.78.2",
"build_id": "policyengine-us-data-1.110.12",
"dataset": "enhanced_cps_2024",
"uri": "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@1.78.2",
"sha256": "4e92b340c3ea3e200ed5d55edf752ee1a13baf787442956fb67d25242fed13b5"
"uri": "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@1.110.12",
"sha256": "58a6639f7511b8d804701417e2647f0c3a77f51a3d90441037eaf004b1f00761"
},
"certification": {
"compatibility_basis": "matching_data_build_fingerprint",
"data_build_id": "policyengine-us-data-1.78.2",
"built_with_model_version": "1.647.0",
"certified_for_model_version": "1.687.0",
"certified_by": "policyengine.py bundled manifest"
"compatibility_basis": "exact_build_model_version",
"data_build_id": "policyengine-us-data-1.110.12",
"built_with_model_version": "1.690.7",
"certified_for_model_version": "1.690.7",
"certified_by": "policyengine.py bundled manifest",
"data_build_fingerprint": "sha256:9961ed1c5d00943a360724da560eee425eb9f99f91896f053dca74724c46e96e"
},
"default_dataset": "enhanced_cps_2024",
"datasets": {
Expand Down
40 changes: 19 additions & 21 deletions src/policyengine/data/release_manifests/us.trace.tro.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"schema:name": "PolicyEngine",
"schema:url": "https://policyengine.org"
},
"schema:dateCreated": "2026-05-09T09:38:11.356906Z",
"schema:dateCreated": "2026-05-11T18:53:05.508006Z",
"schema:description": "TRACE TRO for certified runtime bundle us-4.4.2 covering the bundle manifest, the certified dataset artifact, the country model wheel, and the country data release manifest when it is available.",
"schema:name": "policyengine us certified bundle TRO",
"trov:createdWith": {
Expand Down Expand Up @@ -45,23 +45,23 @@
"trov:hasArtifact": {
"@id": "composition/1/artifact/data_release_manifest"
},
"trov:hasLocation": "https://huggingface.co/policyengine/policyengine-us-data/resolve/9cb665df0a546f9c3d79b496f8eb2dd55859d38d/releases/1.78.2/release_manifest.json"
"trov:hasLocation": "https://huggingface.co/policyengine/policyengine-us-data/resolve/3aac4505ec10d31efc1b3799a1e6458a15853ecc/releases/1.110.12/release_manifest.json"
},
{
"@id": "arrangement/1/location/dataset",
"@type": "trov:ArtifactLocation",
"trov:hasArtifact": {
"@id": "composition/1/artifact/dataset"
},
"trov:hasLocation": "https://huggingface.co/policyengine/policyengine-us-data/resolve/1.78.2/enhanced_cps_2024.h5"
"trov:hasLocation": "https://huggingface.co/policyengine/policyengine-us-data/resolve/1.110.12/enhanced_cps_2024.h5"
},
{
"@id": "arrangement/1/location/model_wheel",
"@type": "trov:ArtifactLocation",
"trov:hasArtifact": {
"@id": "composition/1/artifact/model_wheel"
},
"trov:hasLocation": "https://files.pythonhosted.org/packages/c3/36/5633f5a3996c915494154ec3852011b1a239ea06d9f08cb6287ab709618c/policyengine_us-1.687.0-py3-none-any.whl"
"trov:hasLocation": "https://files.pythonhosted.org/packages/2a/02/52109bae5f4767237b43bd72ce0bc4edf7925650a788053b2bc168caa5ae/policyengine_us-1.690.7-py3-none-any.whl"
}
]
}
Expand All @@ -75,53 +75,51 @@
"@type": "trov:ResearchArtifact",
"schema:name": "policyengine.py bundle manifest for us",
"trov:mimeType": "application/json",
"trov:sha256": "ee037378f3e655360894dc9fe66f1d0c335321ff48789e3ebb0ff38805933d72"
"trov:sha256": "f002ead95407fb118933f09f538412a033b6295f019741196e01fb6fc1cab32c"
},
{
"@id": "composition/1/artifact/data_release_manifest",
"@type": "trov:ResearchArtifact",
"schema:name": "policyengine-us-data release manifest 1.78.2",
"schema:name": "policyengine-us-data release manifest 1.110.12",
"trov:mimeType": "application/json",
"trov:sha256": "83aafd9fa3d33a444c0277aa4b31b2041a8785910bee30660773ab96e1b1c8b9"
"trov:sha256": "17cfd2fbb31064834ed82c0fd7d8ae5c272fe7f24b1e48b226a4acf97ff4c5dd"
},
{
"@id": "composition/1/artifact/dataset",
"@type": "trov:ResearchArtifact",
"schema:name": "enhanced_cps_2024",
"trov:mimeType": "application/x-hdf5",
"trov:sha256": "4e92b340c3ea3e200ed5d55edf752ee1a13baf787442956fb67d25242fed13b5"
"trov:sha256": "58a6639f7511b8d804701417e2647f0c3a77f51a3d90441037eaf004b1f00761"
},
{
"@id": "composition/1/artifact/model_wheel",
"@type": "trov:ResearchArtifact",
"schema:name": "policyengine-us==1.687.0 wheel",
"schema:name": "policyengine-us==1.690.7 wheel",
"trov:mimeType": "application/zip",
"trov:sha256": "cac7da3aa9ba4bf57009eee75d798217bbef7e1c5ca17646d472fad715ab634f"
"trov:sha256": "5a7a541efabac98fa069d6845902cf5924c81db67383234b55dcd2b8bfcfc3ca"
}
],
"trov:hasFingerprint": {
"@id": "composition/1/fingerprint",
"@type": "trov:CompositionFingerprint",
"trov:sha256": "a26e89fc2cd91ee54bc7526aa4c1a32c5b8ad35caefa1e7f2572e2fb8bb303a0"
"trov:sha256": "524aef1282c79dc983d821f01c26c7fe17bf2787c73bd7530bd7e8fd4900d7d6"
}
},
"trov:hasPerformance": {
"@id": "trp/1",
"@type": "trov:TransparentResearchPerformance",
"pe:builtWithModelVersion": "1.647.0",
"pe:builtWithModelVersion": "1.690.7",
"pe:certifiedBy": "policyengine.py bundled manifest",
"pe:certifiedForModelVersion": "1.687.0",
"pe:ciGitRef": "refs/heads/main",
"pe:ciGitSha": "eb7334698e9116cc06a5c6232ac4b4a91e2aef9a",
"pe:ciRunUrl": "https://github.com/PolicyEngine/policyengine.py/actions/runs/25598363562",
"pe:compatibilityBasis": "matching_data_build_fingerprint",
"pe:dataBuildId": "policyengine-us-data-1.78.2",
"pe:emittedIn": "github-actions",
"rdfs:comment": "Certification of build policyengine-us-data-1.78.2 for policyengine-us 1.687.0.",
"pe:certifiedForModelVersion": "1.690.7",
"pe:compatibilityBasis": "exact_build_model_version",
"pe:dataBuildFingerprint": "sha256:9961ed1c5d00943a360724da560eee425eb9f99f91896f053dca74724c46e96e",
"pe:dataBuildId": "policyengine-us-data-1.110.12",
"pe:emittedIn": "local",
"rdfs:comment": "Certification of build policyengine-us-data-1.110.12 for policyengine-us 1.690.7.",
"trov:accessedArrangement": {
"@id": "arrangement/1"
},
"trov:startedAtTime": "2026-05-09T09:38:11.356906Z",
"trov:startedAtTime": "2026-05-11T18:53:05.508006Z",
"trov:wasConductedBy": {
"@id": "trs"
}
Expand Down
Loading
Loading