diff --git a/changelog.d/bundle-drop-us-data-package.fixed.md b/changelog.d/bundle-drop-us-data-package.fixed.md new file mode 100644 index 00000000..3b647b2c --- /dev/null +++ b/changelog.d/bundle-drop-us-data-package.fixed.md @@ -0,0 +1 @@ +Stop treating `policyengine-us-data` as an installable package in the certified bundle scaffold. diff --git a/docs/bundles.md b/docs/bundles.md index 5d2e1ab5..4afe5455 100644 --- a/docs/bundles.md +++ b/docs/bundles.md @@ -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: diff --git a/scripts/bundle.py b/scripts/bundle.py index 2eb0c860..a94b26fb 100644 --- a/scripts/bundle.py +++ b/scripts/bundle.py @@ -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]) @@ -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.", diff --git a/scripts/prepare_package_bundle_update.py b/scripts/prepare_package_bundle_update.py index a4f6ef27..16140a47 100644 --- a/scripts/prepare_package_bundle_update.py +++ b/scripts/prepare_package_bundle_update.py @@ -17,7 +17,6 @@ "core": "policyengine-core", "us": "policyengine-us", "uk": "policyengine-uk", - "us_data": "policyengine-us-data", } diff --git a/src/policyengine/data/bundle/manifest.json b/src/policyengine/data/bundle/manifest.json index 059920e6..11122813 100644 --- a/src/policyengine/data/bundle/manifest.json +++ b/src/policyengine/data/bundle/manifest.json @@ -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", diff --git a/src/policyengine/data/bundle/uk.trace.tro.jsonld b/src/policyengine/data/bundle/uk.trace.tro.jsonld index 224d75e2..b9b49ac4 100644 --- a/src/policyengine/data/bundle/uk.trace.tro.jsonld +++ b/src/policyengine/data/bundle/uk.trace.tro.jsonld @@ -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", @@ -102,7 +102,7 @@ "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "a4917b65289b9a0d1cbb68f0410e24e8d5bbab7b30075fdad4d56897f8f30ca3" + "trov:sha256": "662ccbe3e8e06197712799fd41b0cf831fa0ac2739be8a7efd9ed57b1e0ae96b" } }, "trov:hasPerformance": { diff --git a/src/policyengine/data/bundle/us.trace.tro.jsonld b/src/policyengine/data/bundle/us.trace.tro.jsonld index c5ae7bcc..a5a71da6 100644 --- a/src/policyengine/data/bundle/us.trace.tro.jsonld +++ b/src/policyengine/data/bundle/us.trace.tro.jsonld @@ -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", @@ -102,7 +102,7 @@ "trov:hasFingerprint": { "@id": "composition/1/fingerprint", "@type": "trov:CompositionFingerprint", - "trov:sha256": "1deb4adb19f9f35241a2f59af4883f78794a847056b612b31b9385b6c5642f9e" + "trov:sha256": "d160fd1371060653c3a225cff9e39ee481594bbf1397e41dad7882dd05b38abf" } }, "trov:hasPerformance": { diff --git a/tests/test_bundle.py b/tests/test_bundle.py index adfbb100..c7f004bd 100644 --- a/tests/test_bundle.py +++ b/tests/test_bundle.py @@ -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): diff --git a/tests/test_bundle_metadata.py b/tests/test_bundle_metadata.py index 1ac44a55..6975a2d5 100644 --- a/tests/test_bundle_metadata.py +++ b/tests/test_bundle_metadata.py @@ -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():