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/bundle-drop-us-data-package.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Stop treating `policyengine-us-data` as an installable package in the certified bundle scaffold.
3 changes: 1 addition & 2 deletions docs/bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ Run:
python scripts/bundle.py update-packages \
--core 3.27.0 \
--us 1.730.0 \
--uk 2.91.0 \
--us-data 1.118.0
--uk 2.91.0
```

To certify a new data release from a data-producer manifest, run:
Expand Down
7 changes: 1 addition & 6 deletions scripts/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _update_packages(args: argparse.Namespace) -> int:
from prepare_package_bundle_update import main as prepare_package_bundle_update_main

argv: list[str] = []
for option in ("core", "us", "uk", "us_data"):
for option in ("core", "us", "uk"):
value = getattr(args, option)
if value:
argv.extend([f"--{option.replace('_', '-')}", value])
Expand Down Expand Up @@ -165,11 +165,6 @@ def _parser() -> argparse.ArgumentParser:
packages.add_argument("--core", help="Exact version for policyengine-core.")
packages.add_argument("--us", help="Exact version for policyengine-us.")
packages.add_argument("--uk", help="Exact version for policyengine-uk.")
packages.add_argument(
"--us-data",
dest="us_data",
help="Exact version for policyengine-us-data.",
)
packages.add_argument(
"--changelog",
default="Update the certified PolicyEngine bundle pins.",
Expand Down
1 change: 0 additions & 1 deletion scripts/prepare_package_bundle_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"core": "policyengine-core",
"us": "policyengine-us",
"uk": "policyengine-uk",
"us_data": "policyengine-us-data",
}


Expand Down
10 changes: 0 additions & 10 deletions src/policyengine/data/bundle/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,6 @@
"name": "policyengine-us",
"role": "country_model",
"version": "1.729.0"
},
"policyengine-us-data": {
"country": "us",
"import_name": "policyengine_us_data",
"install_requirement": "policyengine-us-data==1.78.2; python_version >= '3.12' and python_version < '3.15'",
"markers": "python_version >= '3.12' and python_version < '3.15'",
"name": "policyengine-us-data",
"optional": true,
"role": "country_data",
"version": "1.78.2"
}
},
"policyengine_version": "4.18.0",
Expand Down
4 changes: 2 additions & 2 deletions src/policyengine/data/bundle/uk.trace.tro.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@type": "trov:ResearchArtifact",
"schema:name": "policyengine.py bundle manifest for uk",
"trov:mimeType": "application/json",
"trov:sha256": "9b13579bebf6acfd9530bcdb62578fa84f61f06f6ffb9875b96989f7ae1661bd"
"trov:sha256": "4edd42f304aad4fc7699700565fca3ab4ca2ca6cd0f4516cddfdaf72347b2260"
},
{
"@id": "composition/1/artifact/data_release_manifest",
Expand All @@ -102,7 +102,7 @@
"trov:hasFingerprint": {
"@id": "composition/1/fingerprint",
"@type": "trov:CompositionFingerprint",
"trov:sha256": "a4917b65289b9a0d1cbb68f0410e24e8d5bbab7b30075fdad4d56897f8f30ca3"
"trov:sha256": "662ccbe3e8e06197712799fd41b0cf831fa0ac2739be8a7efd9ed57b1e0ae96b"
}
},
"trov:hasPerformance": {
Expand Down
4 changes: 2 additions & 2 deletions src/policyengine/data/bundle/us.trace.tro.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@type": "trov:ResearchArtifact",
"schema:name": "policyengine.py bundle manifest for us",
"trov:mimeType": "application/json",
"trov:sha256": "9b13579bebf6acfd9530bcdb62578fa84f61f06f6ffb9875b96989f7ae1661bd"
"trov:sha256": "4edd42f304aad4fc7699700565fca3ab4ca2ca6cd0f4516cddfdaf72347b2260"
},
{
"@id": "composition/1/artifact/data_release_manifest",
Expand All @@ -102,7 +102,7 @@
"trov:hasFingerprint": {
"@id": "composition/1/fingerprint",
"@type": "trov:CompositionFingerprint",
"trov:sha256": "1deb4adb19f9f35241a2f59af4883f78794a847056b612b31b9385b6c5642f9e"
"trov:sha256": "d160fd1371060653c3a225cff9e39ee481594bbf1397e41dad7882dd05b38abf"
}
},
"trov:hasPerformance": {
Expand Down
15 changes: 9 additions & 6 deletions tests/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ def test_bundle_install_requirements_are_country_scoped():
manifest["packages"]["policyengine-core"]["install_requirement"],
manifest["packages"]["policyengine-uk"]["install_requirement"],
]
assert (
"policyengine-us-data==1.78.2; python_version >= '3.12' and python_version < '3.15'"
in bundle.bundle_install_requirements(
manifest,
countries=["us"],
)
us_requirements = bundle.bundle_install_requirements(
manifest,
countries=["us"],
)
assert us_requirements == [
f"policyengine=={manifest['policyengine_version']}",
manifest["packages"]["policyengine-core"]["install_requirement"],
manifest["packages"]["policyengine-us"]["install_requirement"],
]
assert not any("policyengine-us-data" in req for req in us_requirements)


def test_dataset_plans_use_certified_release_metadata(tmp_path):
Expand Down
1 change: 1 addition & 0 deletions tests/test_bundle_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def test_bundle_manifest_exposes_model_and_country_extras():
"policyengine-uk",
]
assert "policyengine-uk-data" not in manifest["packages"]
assert "policyengine-us-data" not in manifest["packages"]


def test_bundle_manifest_carries_populace_uk_data_release():
Expand Down
Loading