Skip to content
Open
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
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: patch
changes:
changed:
- Update PolicyEngine US to 1.454.1
14 changes: 7 additions & 7 deletions policyengine_api/data/model_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@

def get_dataset_version(country_id: str) -> str | None:
"""
Get the latest dataset version for the specified country. If the country exists, but
no version is found, return None. If PolicyEngine does not publish data for the country,
raise a ValueError.
Get the dataset version for the specified country. If PolicyEngine does not
publish data for the country, raise a ValueError.

By returning None for all valid countries, we allow policyengine.py to use
whatever default dataset version it has available, without imposing version
validation constraints from the API layer.
"""
match country_id:
case "uk":
return None
case "us":
return get_latest_commit_tag(
repo_id="policyengine/policyengine-us-data",
repo_type="model",
)
return None
case _:
raise ValueError(f"Unknown country ID: {country_id}")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"policyengine-ng==0.5.1",
"policyengine-il==0.1.0",
"policyengine_uk==2.39.0",
"policyengine_us==1.444.1",
"policyengine_us==1.454.1",
"policyengine_core>=3.16.6",
"policyengine>=0.3.0",
"pydantic",
Expand Down
Loading