policyengine 4.4.3__tar.gz → 4.4.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. {policyengine-4.4.3 → policyengine-4.4.4}/CHANGELOG.md +7 -0
  2. {policyengine-4.4.3 → policyengine-4.4.4}/PKG-INFO +3 -3
  3. {policyengine-4.4.3 → policyengine-4.4.4}/pyproject.toml +3 -3
  4. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/data/release_manifests/uk.json +2 -2
  5. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/data/release_manifests/uk.trace.tro.jsonld +8 -8
  6. policyengine-4.4.4/src/policyengine/data/release_manifests/us.json +54 -0
  7. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/data/release_manifests/us.trace.tro.jsonld +22 -22
  8. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/provenance/bundle.py +7 -0
  9. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/provenance/manifest.py +24 -4
  10. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/provenance/trace.py +3 -10
  11. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine.egg-info/PKG-INFO +3 -3
  12. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine.egg-info/requires.txt +2 -2
  13. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/us_model_surface.json +1 -1
  14. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_bundle_refresh.py +8 -0
  15. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_models.py +3 -3
  16. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_release_manifests.py +54 -15
  17. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_trace_tro.py +53 -0
  18. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_us_regions.py +3 -3
  19. {policyengine-4.4.3 → policyengine-4.4.4}/uv.lock +6 -6
  20. policyengine-4.4.3/src/policyengine/data/release_manifests/us.json +0 -54
  21. {policyengine-4.4.3 → policyengine-4.4.4}/.claude/policyengine-guide.md +0 -0
  22. {policyengine-4.4.3 → policyengine-4.4.4}/.claude/quick-reference.md +0 -0
  23. {policyengine-4.4.3 → policyengine-4.4.4}/.github/CONTRIBUTING.md +0 -0
  24. {policyengine-4.4.3 → policyengine-4.4.4}/.github/bump_version.py +0 -0
  25. {policyengine-4.4.3 → policyengine-4.4.4}/.github/changelog_template.md +0 -0
  26. {policyengine-4.4.3 → policyengine-4.4.4}/.github/check-changelog.sh +0 -0
  27. {policyengine-4.4.3 → policyengine-4.4.4}/.github/fetch_version.py +0 -0
  28. {policyengine-4.4.3 → policyengine-4.4.4}/.github/get-changelog-diff.sh +0 -0
  29. {policyengine-4.4.3 → policyengine-4.4.4}/.github/has-functional-changes.sh +0 -0
  30. {policyengine-4.4.3 → policyengine-4.4.4}/.github/is-version-number-acceptable.sh +0 -0
  31. {policyengine-4.4.3 → policyengine-4.4.4}/.github/publish-git-tag.sh +0 -0
  32. {policyengine-4.4.3 → policyengine-4.4.4}/.github/workflows/pr_code_changes.yaml +0 -0
  33. {policyengine-4.4.3 → policyengine-4.4.4}/.github/workflows/pr_docs_changes.yaml +0 -0
  34. {policyengine-4.4.3 → policyengine-4.4.4}/.github/workflows/push.yaml +0 -0
  35. {policyengine-4.4.3 → policyengine-4.4.4}/.gitignore +0 -0
  36. {policyengine-4.4.3 → policyengine-4.4.4}/.python-version +0 -0
  37. {policyengine-4.4.3 → policyengine-4.4.4}/LICENSE +0 -0
  38. {policyengine-4.4.3 → policyengine-4.4.4}/Makefile +0 -0
  39. {policyengine-4.4.3 → policyengine-4.4.4}/README.md +0 -0
  40. {policyengine-4.4.3 → policyengine-4.4.4}/changelog.d/.gitkeep +0 -0
  41. {policyengine-4.4.3 → policyengine-4.4.4}/docs/.gitignore +0 -0
  42. {policyengine-4.4.3 → policyengine-4.4.4}/docs/_generator/README.md +0 -0
  43. {policyengine-4.4.3 → policyengine-4.4.4}/docs/_generator/build_reference.py +0 -0
  44. {policyengine-4.4.3 → policyengine-4.4.4}/docs/_quarto.yml +0 -0
  45. {policyengine-4.4.3 → policyengine-4.4.4}/docs/countries.md +0 -0
  46. {policyengine-4.4.3 → policyengine-4.4.4}/docs/data-publishing-design.md +0 -0
  47. {policyengine-4.4.3 → policyengine-4.4.4}/docs/dev.md +0 -0
  48. {policyengine-4.4.3 → policyengine-4.4.4}/docs/examples.md +0 -0
  49. {policyengine-4.4.3 → policyengine-4.4.4}/docs/getting-started.md +0 -0
  50. {policyengine-4.4.3 → policyengine-4.4.4}/docs/households.md +0 -0
  51. {policyengine-4.4.3 → policyengine-4.4.4}/docs/impact-analysis.md +0 -0
  52. {policyengine-4.4.3 → policyengine-4.4.4}/docs/index.md +0 -0
  53. {policyengine-4.4.3 → policyengine-4.4.4}/docs/methodology/index.md +0 -0
  54. {policyengine-4.4.3 → policyengine-4.4.4}/docs/methodology/model-architecture.md +0 -0
  55. {policyengine-4.4.3 → policyengine-4.4.4}/docs/methodology/us-health-costs.md +0 -0
  56. {policyengine-4.4.3 → policyengine-4.4.4}/docs/microsim.md +0 -0
  57. {policyengine-4.4.3 → policyengine-4.4.4}/docs/outputs.md +0 -0
  58. {policyengine-4.4.3 → policyengine-4.4.4}/docs/programs/index.md +0 -0
  59. {policyengine-4.4.3 → policyengine-4.4.4}/docs/programs/us-chip.md +0 -0
  60. {policyengine-4.4.3 → policyengine-4.4.4}/docs/reference/index.md +0 -0
  61. {policyengine-4.4.3 → policyengine-4.4.4}/docs/reforms.md +0 -0
  62. {policyengine-4.4.3 → policyengine-4.4.4}/docs/regions.md +0 -0
  63. {policyengine-4.4.3 → policyengine-4.4.4}/docs/release-bundles.md +0 -0
  64. {policyengine-4.4.3 → policyengine-4.4.4}/docs/trace-case-study.md +0 -0
  65. {policyengine-4.4.3 → policyengine-4.4.4}/docs/visualisation.md +0 -0
  66. {policyengine-4.4.3 → policyengine-4.4.4}/examples/employment_income_variation_uk.py +0 -0
  67. {policyengine-4.4.3 → policyengine-4.4.4}/examples/employment_income_variation_us.py +0 -0
  68. {policyengine-4.4.3 → policyengine-4.4.4}/examples/household_impact_example.py +0 -0
  69. {policyengine-4.4.3 → policyengine-4.4.4}/examples/income_bands_uk.py +0 -0
  70. {policyengine-4.4.3 → policyengine-4.4.4}/examples/income_distribution_us.py +0 -0
  71. {policyengine-4.4.3 → policyengine-4.4.4}/examples/paper_repro_uk.py +0 -0
  72. {policyengine-4.4.3 → policyengine-4.4.4}/examples/policy_change_uk.py +0 -0
  73. {policyengine-4.4.3 → policyengine-4.4.4}/examples/speedtest_us_simulation.py +0 -0
  74. {policyengine-4.4.3 → policyengine-4.4.4}/examples/us_budgetary_impact.py +0 -0
  75. {policyengine-4.4.3 → policyengine-4.4.4}/scripts/check_data_staleness.py +0 -0
  76. {policyengine-4.4.3 → policyengine-4.4.4}/scripts/generate_trace_tros.py +0 -0
  77. {policyengine-4.4.3 → policyengine-4.4.4}/scripts/refresh_release_bundle.py +0 -0
  78. {policyengine-4.4.3 → policyengine-4.4.4}/setup.cfg +0 -0
  79. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/__init__.py +0 -0
  80. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/cli.py +0 -0
  81. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/__init__.py +0 -0
  82. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/cache.py +0 -0
  83. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/dataset.py +0 -0
  84. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/dynamic.py +0 -0
  85. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/output.py +0 -0
  86. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/parameter.py +0 -0
  87. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/parameter_node.py +0 -0
  88. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/parameter_value.py +0 -0
  89. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/policy.py +0 -0
  90. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/region.py +0 -0
  91. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/scoping_strategy.py +0 -0
  92. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/simulation.py +0 -0
  93. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/tax_benefit_model.py +0 -0
  94. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/tax_benefit_model_version.py +0 -0
  95. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/core/variable.py +0 -0
  96. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/__init__.py +0 -0
  97. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/uk/__init__.py +0 -0
  98. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/uk/regions.py +0 -0
  99. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/us/__init__.py +0 -0
  100. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/us/data/__init__.py +0 -0
  101. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/us/data/districts.py +0 -0
  102. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/us/data/places.py +0 -0
  103. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/us/data/states.py +0 -0
  104. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/countries/us/regions.py +0 -0
  105. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/data/schemas/trace_tro.schema.json +0 -0
  106. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/graph/__init__.py +0 -0
  107. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/graph/extractor.py +0 -0
  108. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/graph/graph.py +0 -0
  109. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/__init__.py +0 -0
  110. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/aggregate.py +0 -0
  111. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/change_aggregate.py +0 -0
  112. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/congressional_district_impact.py +0 -0
  113. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/constituency_impact.py +0 -0
  114. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/decile_impact.py +0 -0
  115. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/inequality.py +0 -0
  116. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/intra_decile_impact.py +0 -0
  117. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/local_authority_impact.py +0 -0
  118. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/poverty.py +0 -0
  119. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/outputs/program_statistics.py +0 -0
  120. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/provenance/__init__.py +0 -0
  121. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/results/__init__.py +0 -0
  122. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/results/schema.py +0 -0
  123. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/results/trace_tro.py +0 -0
  124. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/results/tracking.py +0 -0
  125. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/common/__init__.py +0 -0
  126. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/common/extra_variables.py +0 -0
  127. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/common/household.py +0 -0
  128. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/common/model_version.py +0 -0
  129. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/common/reform.py +0 -0
  130. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/common/result.py +0 -0
  131. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/uk/__init__.py +0 -0
  132. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/uk/analysis.py +0 -0
  133. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/uk/datasets.py +0 -0
  134. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/uk/household.py +0 -0
  135. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/uk/model.py +0 -0
  136. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/us/__init__.py +0 -0
  137. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/us/analysis.py +0 -0
  138. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/us/datasets.py +0 -0
  139. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/us/household.py +0 -0
  140. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/tax_benefit_models/us/model.py +0 -0
  141. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/__init__.py +0 -0
  142. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/dates.py +0 -0
  143. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/design.py +0 -0
  144. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/entity_utils.py +0 -0
  145. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/errors.py +0 -0
  146. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/household_validation.py +0 -0
  147. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/parameter_labels.py +0 -0
  148. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/parametric_reforms.py +0 -0
  149. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine/utils/plotting.py +0 -0
  150. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine.egg-info/SOURCES.txt +0 -0
  151. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine.egg-info/dependency_links.txt +0 -0
  152. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine.egg-info/entry_points.txt +0 -0
  153. {policyengine-4.4.3 → policyengine-4.4.4}/src/policyengine.egg-info/top_level.txt +0 -0
  154. {policyengine-4.4.3 → policyengine-4.4.4}/tests/__init__.py +0 -0
  155. {policyengine-4.4.3 → policyengine-4.4.4}/tests/conftest.py +0 -0
  156. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/__init__.py +0 -0
  157. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/filtering_fixtures.py +0 -0
  158. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/uk_couple_two_kids.json +0 -0
  159. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/uk_model_surface.json +0 -0
  160. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/uk_single_adult_employment_income.json +0 -0
  161. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/uk_single_adult_no_income.json +0 -0
  162. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/uk_single_parent_one_child.json +0 -0
  163. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/us_married_two_kids_high_income.json +0 -0
  164. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/us_single_adult_employment_income.json +0 -0
  165. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/us_single_adult_no_income.json +0 -0
  166. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/household_calculator_snapshots/us_single_parent_one_child.json +0 -0
  167. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/parameter_labels_fixtures.py +0 -0
  168. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/parametric_reforms_fixtures.py +0 -0
  169. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/poverty_by_demographics_fixtures.py +0 -0
  170. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/region_fixtures.py +0 -0
  171. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/us_reform_fixtures.py +0 -0
  172. {policyengine-4.4.3 → policyengine-4.4.4}/tests/fixtures/variable_label_fixtures.py +0 -0
  173. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_aggregate.py +0 -0
  174. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_bump_version.py +0 -0
  175. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_cache.py +0 -0
  176. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_change_aggregate.py +0 -0
  177. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_congressional_district_impact.py +0 -0
  178. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_constituency_impact.py +0 -0
  179. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_dict_reforms_on_simulation.py +0 -0
  180. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_entity_mapping.py +0 -0
  181. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_entity_utils.py +0 -0
  182. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_errors.py +0 -0
  183. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_extra_variables.py +0 -0
  184. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_filtering.py +0 -0
  185. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_graph/__init__.py +0 -0
  186. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_graph/conftest.py +0 -0
  187. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_graph/test_extractor.py +0 -0
  188. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_household_calculator_snapshot.py +0 -0
  189. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_household_impact.py +0 -0
  190. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_inequality.py +0 -0
  191. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_intra_decile_impact.py +0 -0
  192. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_local_authority_impact.py +0 -0
  193. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_manifest_version_mismatch.py +0 -0
  194. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_pandas3_compatibility.py +0 -0
  195. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_parameter_labels.py +0 -0
  196. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_parametric_reforms.py +0 -0
  197. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_poverty.py +0 -0
  198. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_poverty_by_demographics.py +0 -0
  199. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_poverty_run.py +0 -0
  200. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_preservation_mirror.py +0 -0
  201. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_region.py +0 -0
  202. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_results.py +0 -0
  203. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_scoping_strategy.py +0 -0
  204. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_small_follow_ups.py +0 -0
  205. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_uk_regions.py +0 -0
  206. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_us_microsim_structural_reforms.py +0 -0
  207. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_us_program_statistics.py +0 -0
  208. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_us_reform_application.py +0 -0
  209. {policyengine-4.4.3 → policyengine-4.4.4}/tests/test_variable_labels.py +0 -0
@@ -1,3 +1,10 @@
1
+ ## [4.4.4] - 2026-05-13
2
+
3
+ ### Changed
4
+
5
+ - Update the bundled US release to policyengine-us 1.691.3 and policyengine-us-data 1.113.1.
6
+
7
+
1
8
  ## [4.4.3] - 2026-05-11
2
9
 
3
10
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: policyengine
3
- Version: 4.4.3
3
+ Version: 4.4.4
4
4
  Summary: A package to conduct policy analysis using PolicyEngine tax-benefit models.
5
5
  Author-email: PolicyEngine <hello@policyengine.org>
6
6
  License: GNU AFFERO GENERAL PUBLIC LICENSE
@@ -690,7 +690,7 @@ Requires-Dist: policyengine_core>=3.26.1; extra == "uk"
690
690
  Requires-Dist: policyengine-uk==2.88.14; extra == "uk"
691
691
  Provides-Extra: us
692
692
  Requires-Dist: policyengine_core>=3.26.1; extra == "us"
693
- Requires-Dist: policyengine-us==1.690.7; extra == "us"
693
+ Requires-Dist: policyengine-us==1.691.3; extra == "us"
694
694
  Provides-Extra: dev
695
695
  Requires-Dist: pytest; extra == "dev"
696
696
  Requires-Dist: furo; extra == "dev"
@@ -704,7 +704,7 @@ Requires-Dist: pytest-asyncio>=0.26.0; extra == "dev"
704
704
  Requires-Dist: ruff>=0.9.0; extra == "dev"
705
705
  Requires-Dist: policyengine_core>=3.26.1; extra == "dev"
706
706
  Requires-Dist: policyengine-uk==2.88.14; extra == "dev"
707
- Requires-Dist: policyengine-us==1.690.7; extra == "dev"
707
+ Requires-Dist: policyengine-us==1.691.3; extra == "dev"
708
708
  Requires-Dist: towncrier>=24.8.0; extra == "dev"
709
709
  Requires-Dist: mypy>=1.11.0; extra == "dev"
710
710
  Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "policyengine"
7
- version = "4.4.3"
7
+ version = "4.4.4"
8
8
  description = "A package to conduct policy analysis using PolicyEngine tax-benefit models."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -46,7 +46,7 @@ uk = [
46
46
  ]
47
47
  us = [
48
48
  "policyengine_core>=3.26.1",
49
- "policyengine-us==1.690.7",
49
+ "policyengine-us==1.691.3",
50
50
  ]
51
51
  dev = [
52
52
  "pytest",
@@ -61,7 +61,7 @@ dev = [
61
61
  "ruff>=0.9.0",
62
62
  "policyengine_core>=3.26.1",
63
63
  "policyengine-uk==2.88.14",
64
- "policyengine-us==1.690.7",
64
+ "policyengine-us==1.691.3",
65
65
  "towncrier>=24.8.0",
66
66
  "mypy>=1.11.0",
67
67
  "pytest-cov>=5.0.0",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "bundle_id": "uk-4.4.3",
3
+ "bundle_id": "uk-4.4.4",
4
4
  "country_id": "uk",
5
- "policyengine_version": "4.4.3",
5
+ "policyengine_version": "4.4.4",
6
6
  "model_package": {
7
7
  "name": "policyengine-uk",
8
8
  "version": "2.88.14",
@@ -18,18 +18,18 @@
18
18
  "schema:url": "https://policyengine.org"
19
19
  },
20
20
  "schema:dateCreated": "2026-05-09T07:14:50.156352Z",
21
- "schema:description": "TRACE TRO for certified runtime bundle uk-4.4.3 covering the bundle manifest, the certified dataset artifact, the country model wheel, and the country data release manifest when it is available.",
21
+ "schema:description": "TRACE TRO for certified runtime bundle uk-4.4.4 covering the bundle manifest, the certified dataset artifact, the country model wheel, and the country data release manifest when it is available.",
22
22
  "schema:name": "policyengine uk certified bundle TRO",
23
23
  "trov:createdWith": {
24
24
  "@type": "schema:SoftwareApplication",
25
25
  "schema:name": "policyengine",
26
- "schema:softwareVersion": "4.4.3"
26
+ "schema:softwareVersion": "4.4.4"
27
27
  },
28
28
  "trov:hasArrangement": [
29
29
  {
30
30
  "@id": "arrangement/1",
31
31
  "@type": "trov:ArtifactArrangement",
32
- "rdfs:comment": "Certified arrangement for bundle uk-4.4.3.",
32
+ "rdfs:comment": "Certified arrangement for bundle uk-4.4.4.",
33
33
  "trov:hasArtifactLocation": [
34
34
  {
35
35
  "@id": "arrangement/1/location/bundle_manifest",
@@ -75,14 +75,14 @@
75
75
  "@type": "trov:ResearchArtifact",
76
76
  "schema:name": "policyengine.py bundle manifest for uk",
77
77
  "trov:mimeType": "application/json",
78
- "trov:sha256": "77947ecc210cad81ab4ec04aedae8a9997930d3d3cc9c7f2092c9d62aa84e105"
78
+ "trov:sha256": "7dfe8ea4171a6d893263ad4075412e4cae42dee794af7e85c6194b538739cf77"
79
79
  },
80
80
  {
81
81
  "@id": "composition/1/artifact/data_release_manifest",
82
82
  "@type": "trov:ResearchArtifact",
83
83
  "schema:name": "policyengine-uk-data release manifest 1.55.5",
84
84
  "trov:mimeType": "application/json",
85
- "trov:sha256": "41a51aaaf52c5cf9dcbbd906f6d2f4f9ab25a7fb654b458940931d7e98fe4bb7"
85
+ "trov:sha256": "31de03e0bedc1ad29d5809fb16ca925f26485c86fc1b14bf911636ebb83863a4"
86
86
  },
87
87
  {
88
88
  "@id": "composition/1/artifact/dataset",
@@ -102,7 +102,7 @@
102
102
  "trov:hasFingerprint": {
103
103
  "@id": "composition/1/fingerprint",
104
104
  "@type": "trov:CompositionFingerprint",
105
- "trov:sha256": "3643c10fef547c3b0a3885ae277c699bc70b1da872f2cbe8b211b269d292e8e7"
105
+ "trov:sha256": "baeaf58f54eeaeb9bc65460831d5d3d88e3778c67a46d24ca3e434664cb9ba1d"
106
106
  }
107
107
  },
108
108
  "trov:hasPerformance": {
@@ -112,8 +112,8 @@
112
112
  "pe:certifiedBy": "policyengine.py bundled manifest",
113
113
  "pe:certifiedForModelVersion": "2.88.14",
114
114
  "pe:ciGitRef": "refs/heads/main",
115
- "pe:ciGitSha": "1718b493e4749faf62f0ffdff480205abdd20011",
116
- "pe:ciRunUrl": "https://github.com/PolicyEngine/policyengine.py/actions/runs/25692889721",
115
+ "pe:ciGitSha": "eb8173947304550bed70a2e372640e41cc3f7a66",
116
+ "pe:ciRunUrl": "https://github.com/PolicyEngine/policyengine.py/actions/runs/25799489507",
117
117
  "pe:compatibilityBasis": "matching_data_build_fingerprint",
118
118
  "pe:dataBuildFingerprint": "sha256:dff5c5bb976ce254fa965ecfce6a0d84859fe1629a714ae28a79b3075522a0ae",
119
119
  "pe:dataBuildId": "policyengine-uk-data-1.55.5",
@@ -0,0 +1,54 @@
1
+ {
2
+ "schema_version": 1,
3
+ "bundle_id": "us-4.4.4",
4
+ "country_id": "us",
5
+ "policyengine_version": "4.4.4",
6
+ "model_package": {
7
+ "name": "policyengine-us",
8
+ "version": "1.691.3",
9
+ "sha256": "c5d37aa4442f23d48bd5d587a02876c89d83c6135809f12988cc39bd3a47e8b2",
10
+ "wheel_url": "https://files.pythonhosted.org/packages/2a/03/e21c872664f90dcc99f1fcf29d1da71409c50cf8a7798ff0596ad10d9400/policyengine_us-1.691.3-py3-none-any.whl"
11
+ },
12
+ "data_package": {
13
+ "name": "policyengine-us-data",
14
+ "version": "1.113.1",
15
+ "repo_id": "policyengine/policyengine-us-data",
16
+ "release_manifest_path": "releases/1.113.1/release_manifest.json",
17
+ "release_manifest_revision": "99e0ec7e784cdba43dd21ff1d80a081599a7a537"
18
+ },
19
+ "certified_data_artifact": {
20
+ "data_package": {
21
+ "name": "policyengine-us-data",
22
+ "version": "1.113.1"
23
+ },
24
+ "build_id": "policyengine-us-data-1.113.1",
25
+ "dataset": "enhanced_cps_2024",
26
+ "uri": "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@99e0ec7e784cdba43dd21ff1d80a081599a7a537",
27
+ "sha256": "0ce549af18753287c097718362b8cd5cdccfc47953acf7f282709d604cf314d2"
28
+ },
29
+ "certification": {
30
+ "compatibility_basis": "exact_build_model_version",
31
+ "data_build_id": "policyengine-us-data-1.113.1",
32
+ "built_with_model_version": "1.691.3",
33
+ "certified_for_model_version": "1.691.3",
34
+ "certified_by": "policyengine.py bundled manifest",
35
+ "data_build_fingerprint": "sha256:d891044ece8ec3338904771c879b98ec11a12f1090c074e5b8cee846825d8056"
36
+ },
37
+ "default_dataset": "enhanced_cps_2024",
38
+ "datasets": {
39
+ "enhanced_cps_2024": {
40
+ "path": "enhanced_cps_2024.h5"
41
+ }
42
+ },
43
+ "region_datasets": {
44
+ "national": {
45
+ "path_template": "enhanced_cps_2024.h5"
46
+ },
47
+ "state": {
48
+ "path_template": "states/{state_code}.h5"
49
+ },
50
+ "congressional_district": {
51
+ "path_template": "districts/{district_code}.h5"
52
+ }
53
+ }
54
+ }
@@ -17,19 +17,19 @@
17
17
  "schema:name": "PolicyEngine",
18
18
  "schema:url": "https://policyengine.org"
19
19
  },
20
- "schema:dateCreated": "2026-05-11T18:53:05.508006Z",
21
- "schema:description": "TRACE TRO for certified runtime bundle us-4.4.3 covering the bundle manifest, the certified dataset artifact, the country model wheel, and the country data release manifest when it is available.",
20
+ "schema:dateCreated": "2026-05-13T03:56:37.150215Z",
21
+ "schema:description": "TRACE TRO for certified runtime bundle us-4.4.4 covering the bundle manifest, the certified dataset artifact, the country model wheel, and the country data release manifest when it is available.",
22
22
  "schema:name": "policyengine us certified bundle TRO",
23
23
  "trov:createdWith": {
24
24
  "@type": "schema:SoftwareApplication",
25
25
  "schema:name": "policyengine",
26
- "schema:softwareVersion": "4.4.3"
26
+ "schema:softwareVersion": "4.4.4"
27
27
  },
28
28
  "trov:hasArrangement": [
29
29
  {
30
30
  "@id": "arrangement/1",
31
31
  "@type": "trov:ArtifactArrangement",
32
- "rdfs:comment": "Certified arrangement for bundle us-4.4.3.",
32
+ "rdfs:comment": "Certified arrangement for bundle us-4.4.4.",
33
33
  "trov:hasArtifactLocation": [
34
34
  {
35
35
  "@id": "arrangement/1/location/bundle_manifest",
@@ -45,7 +45,7 @@
45
45
  "trov:hasArtifact": {
46
46
  "@id": "composition/1/artifact/data_release_manifest"
47
47
  },
48
- "trov:hasLocation": "https://huggingface.co/policyengine/policyengine-us-data/resolve/3aac4505ec10d31efc1b3799a1e6458a15853ecc/releases/1.110.12/release_manifest.json"
48
+ "trov:hasLocation": "https://huggingface.co/policyengine/policyengine-us-data/resolve/99e0ec7e784cdba43dd21ff1d80a081599a7a537/releases/1.113.1/release_manifest.json"
49
49
  },
50
50
  {
51
51
  "@id": "arrangement/1/location/dataset",
@@ -53,7 +53,7 @@
53
53
  "trov:hasArtifact": {
54
54
  "@id": "composition/1/artifact/dataset"
55
55
  },
56
- "trov:hasLocation": "https://huggingface.co/policyengine/policyengine-us-data/resolve/1.110.12/enhanced_cps_2024.h5"
56
+ "trov:hasLocation": "https://huggingface.co/policyengine/policyengine-us-data/resolve/99e0ec7e784cdba43dd21ff1d80a081599a7a537/enhanced_cps_2024.h5"
57
57
  },
58
58
  {
59
59
  "@id": "arrangement/1/location/model_wheel",
@@ -61,7 +61,7 @@
61
61
  "trov:hasArtifact": {
62
62
  "@id": "composition/1/artifact/model_wheel"
63
63
  },
64
- "trov:hasLocation": "https://files.pythonhosted.org/packages/2a/02/52109bae5f4767237b43bd72ce0bc4edf7925650a788053b2bc168caa5ae/policyengine_us-1.690.7-py3-none-any.whl"
64
+ "trov:hasLocation": "https://files.pythonhosted.org/packages/2a/03/e21c872664f90dcc99f1fcf29d1da71409c50cf8a7798ff0596ad10d9400/policyengine_us-1.691.3-py3-none-any.whl"
65
65
  }
66
66
  ]
67
67
  }
@@ -75,54 +75,54 @@
75
75
  "@type": "trov:ResearchArtifact",
76
76
  "schema:name": "policyengine.py bundle manifest for us",
77
77
  "trov:mimeType": "application/json",
78
- "trov:sha256": "41e196a6263b8168d403058029c52ebab795e17024ac9ebef11ff876e36959e2"
78
+ "trov:sha256": "b19682542465cf163e45b36184dc648f698d15b637e27f629c3ea5556bc8083e"
79
79
  },
80
80
  {
81
81
  "@id": "composition/1/artifact/data_release_manifest",
82
82
  "@type": "trov:ResearchArtifact",
83
- "schema:name": "policyengine-us-data release manifest 1.110.12",
83
+ "schema:name": "policyengine-us-data release manifest 1.113.1",
84
84
  "trov:mimeType": "application/json",
85
- "trov:sha256": "17cfd2fbb31064834ed82c0fd7d8ae5c272fe7f24b1e48b226a4acf97ff4c5dd"
85
+ "trov:sha256": "d6b29ceff0cbf6a5cff4de94362ebc533dc5044c6a4155a46da7143140a8cb5f"
86
86
  },
87
87
  {
88
88
  "@id": "composition/1/artifact/dataset",
89
89
  "@type": "trov:ResearchArtifact",
90
90
  "schema:name": "enhanced_cps_2024",
91
91
  "trov:mimeType": "application/x-hdf5",
92
- "trov:sha256": "58a6639f7511b8d804701417e2647f0c3a77f51a3d90441037eaf004b1f00761"
92
+ "trov:sha256": "0ce549af18753287c097718362b8cd5cdccfc47953acf7f282709d604cf314d2"
93
93
  },
94
94
  {
95
95
  "@id": "composition/1/artifact/model_wheel",
96
96
  "@type": "trov:ResearchArtifact",
97
- "schema:name": "policyengine-us==1.690.7 wheel",
97
+ "schema:name": "policyengine-us==1.691.3 wheel",
98
98
  "trov:mimeType": "application/zip",
99
- "trov:sha256": "5a7a541efabac98fa069d6845902cf5924c81db67383234b55dcd2b8bfcfc3ca"
99
+ "trov:sha256": "c5d37aa4442f23d48bd5d587a02876c89d83c6135809f12988cc39bd3a47e8b2"
100
100
  }
101
101
  ],
102
102
  "trov:hasFingerprint": {
103
103
  "@id": "composition/1/fingerprint",
104
104
  "@type": "trov:CompositionFingerprint",
105
- "trov:sha256": "b84e895b3f19ffee5ec299b94ae2155448a12af2b3dc61d00f3d17003ecdf14a"
105
+ "trov:sha256": "4e37940c1a7bdcc238d209a76feb845f2b451602d8d1d7bed3c637752a89685e"
106
106
  }
107
107
  },
108
108
  "trov:hasPerformance": {
109
109
  "@id": "trp/1",
110
110
  "@type": "trov:TransparentResearchPerformance",
111
- "pe:builtWithModelVersion": "1.690.7",
111
+ "pe:builtWithModelVersion": "1.691.3",
112
112
  "pe:certifiedBy": "policyengine.py bundled manifest",
113
- "pe:certifiedForModelVersion": "1.690.7",
113
+ "pe:certifiedForModelVersion": "1.691.3",
114
114
  "pe:ciGitRef": "refs/heads/main",
115
- "pe:ciGitSha": "1718b493e4749faf62f0ffdff480205abdd20011",
116
- "pe:ciRunUrl": "https://github.com/PolicyEngine/policyengine.py/actions/runs/25692889721",
115
+ "pe:ciGitSha": "eb8173947304550bed70a2e372640e41cc3f7a66",
116
+ "pe:ciRunUrl": "https://github.com/PolicyEngine/policyengine.py/actions/runs/25799489507",
117
117
  "pe:compatibilityBasis": "exact_build_model_version",
118
- "pe:dataBuildFingerprint": "sha256:9961ed1c5d00943a360724da560eee425eb9f99f91896f053dca74724c46e96e",
119
- "pe:dataBuildId": "policyengine-us-data-1.110.12",
118
+ "pe:dataBuildFingerprint": "sha256:d891044ece8ec3338904771c879b98ec11a12f1090c074e5b8cee846825d8056",
119
+ "pe:dataBuildId": "policyengine-us-data-1.113.1",
120
120
  "pe:emittedIn": "github-actions",
121
- "rdfs:comment": "Certification of build policyengine-us-data-1.110.12 for policyengine-us 1.690.7.",
121
+ "rdfs:comment": "Certification of build policyengine-us-data-1.113.1 for policyengine-us 1.691.3.",
122
122
  "trov:accessedArrangement": {
123
123
  "@id": "arrangement/1"
124
124
  },
125
- "trov:startedAtTime": "2026-05-11T18:53:05.508006Z",
125
+ "trov:startedAtTime": "2026-05-13T03:56:37.150215Z",
126
126
  "trov:wasConductedBy": {
127
127
  "@id": "trs"
128
128
  }
@@ -395,6 +395,13 @@ def refresh_release_bundle(
395
395
  dataset_repo_id = data_artifact_json.get("repo_id", repo_id)
396
396
  dataset_path = data_artifact_json.get("path", dataset_path)
397
397
  dataset_revision = data_artifact_json.get("revision", new_data)
398
+ if (
399
+ release_manifest_json is not None
400
+ and new_release_manifest_revision is not None
401
+ and dataset_repo_id == repo_id
402
+ and dataset_revision == new_data
403
+ ):
404
+ dataset_revision = new_release_manifest_revision
398
405
 
399
406
  # Only hit HF if the data version actually changed.
400
407
  if new_data != old_data:
@@ -1,3 +1,4 @@
1
+ import hashlib
1
2
  import os
2
3
  from functools import lru_cache
3
4
  from importlib import import_module
@@ -127,6 +128,8 @@ class DataReleaseManifest(BaseModel):
127
128
  can enclose the full set of artifacts published together). Distinct
128
129
  from per-artifact DOIs on ``DataReleaseArtifact.preservation_mirrors``.
129
130
  Populated when the release pipeline mirrors to a DOI-minting host."""
131
+ source_sha256: Optional[str] = Field(default=None, exclude=True)
132
+ """Byte sha256 of the fetched manifest before runtime URI rewrites."""
130
133
 
131
134
 
132
135
  class DataCertification(BaseModel):
@@ -180,9 +183,13 @@ def https_dataset_uri(repo_id: str, path_in_repo: str, revision: str) -> str:
180
183
  return f"https://huggingface.co/{repo_id}/resolve/{revision}/{path_in_repo}"
181
184
 
182
185
 
186
+ def _artifact_revision(data_package: "DataPackageVersion") -> str:
187
+ return data_package.release_manifest_revision or data_package.version
188
+
189
+
183
190
  def https_release_manifest_uri(data_package: "DataPackageVersion") -> str:
184
191
  """Return a dereferenceable HTTPS URI for a data release manifest."""
185
- revision = data_package.release_manifest_revision or data_package.version
192
+ revision = _artifact_revision(data_package)
186
193
  return (
187
194
  f"https://huggingface.co/{data_package.repo_id}/resolve/"
188
195
  f"{revision}/{data_package.release_manifest_path}"
@@ -267,7 +274,20 @@ def get_data_release_manifest(country_id: str) -> DataReleaseManifest:
267
274
  raise DataReleaseManifestUnavailableError(
268
275
  "Could not fetch the data release manifest from Hugging Face."
269
276
  ) from exc
270
- return DataReleaseManifest.model_validate_json(response.text)
277
+ data_release_manifest = DataReleaseManifest.model_validate_json(response.text)
278
+ source_bytes = response.content
279
+ if not isinstance(source_bytes, bytes):
280
+ source_bytes = response.text.encode("utf-8")
281
+ data_release_manifest.source_sha256 = hashlib.sha256(source_bytes).hexdigest()
282
+ release_revision = country_manifest.data_package.release_manifest_revision
283
+ if release_revision is not None:
284
+ for artifact in data_release_manifest.artifacts.values():
285
+ if (
286
+ artifact.repo_id == country_manifest.data_package.repo_id
287
+ and artifact.revision == country_manifest.data_package.version
288
+ ):
289
+ artifact.revision = release_revision
290
+ return data_release_manifest
271
291
 
272
292
 
273
293
  def _specifier_matches(version: str, specifier: str) -> bool:
@@ -404,7 +424,7 @@ def resolve_dataset_reference(country_id: str, dataset: str) -> str:
404
424
  return build_hf_uri(
405
425
  repo_id=manifest.data_package.repo_id,
406
426
  path_in_repo=path_reference.path,
407
- revision=manifest.data_package.version,
427
+ revision=_artifact_revision(manifest.data_package),
408
428
  )
409
429
 
410
430
  data_release_manifest = get_data_release_manifest(country_id)
@@ -525,5 +545,5 @@ def resolve_region_dataset_path(
525
545
  return build_hf_uri(
526
546
  repo_id=manifest.data_package.repo_id,
527
547
  path_in_repo=resolved_path,
528
- revision=manifest.data_package.version,
548
+ revision=_artifact_revision(manifest.data_package),
529
549
  )
@@ -353,21 +353,14 @@ def build_trace_tro_from_release_bundle(
353
353
  if data_release_manifest is not None
354
354
  else None
355
355
  )
356
- dataset_location = (
357
- https_dataset_uri(
358
- repo_id=dataset_artifact.repo_id,
359
- path_in_repo=dataset_artifact.path,
360
- revision=dataset_artifact.revision,
361
- )
362
- if dataset_artifact is not None
363
- else _dataset_location_from_uri(certified_artifact.uri)
364
- )
356
+ dataset_location = _dataset_location_from_uri(certified_artifact.uri)
365
357
 
366
358
  bundle_manifest_hash = hashlib.sha256(
367
359
  canonical_json_bytes(country_manifest.model_dump(mode="json"))
368
360
  ).hexdigest()
369
361
  data_release_manifest_hash = (
370
- hashlib.sha256(
362
+ data_release_manifest.source_sha256
363
+ or hashlib.sha256(
371
364
  canonical_json_bytes(data_release_manifest.model_dump(mode="json"))
372
365
  ).hexdigest()
373
366
  if data_release_manifest is not None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: policyengine
3
- Version: 4.4.3
3
+ Version: 4.4.4
4
4
  Summary: A package to conduct policy analysis using PolicyEngine tax-benefit models.
5
5
  Author-email: PolicyEngine <hello@policyengine.org>
6
6
  License: GNU AFFERO GENERAL PUBLIC LICENSE
@@ -690,7 +690,7 @@ Requires-Dist: policyengine_core>=3.26.1; extra == "uk"
690
690
  Requires-Dist: policyengine-uk==2.88.14; extra == "uk"
691
691
  Provides-Extra: us
692
692
  Requires-Dist: policyengine_core>=3.26.1; extra == "us"
693
- Requires-Dist: policyengine-us==1.690.7; extra == "us"
693
+ Requires-Dist: policyengine-us==1.691.3; extra == "us"
694
694
  Provides-Extra: dev
695
695
  Requires-Dist: pytest; extra == "dev"
696
696
  Requires-Dist: furo; extra == "dev"
@@ -704,7 +704,7 @@ Requires-Dist: pytest-asyncio>=0.26.0; extra == "dev"
704
704
  Requires-Dist: ruff>=0.9.0; extra == "dev"
705
705
  Requires-Dist: policyengine_core>=3.26.1; extra == "dev"
706
706
  Requires-Dist: policyengine-uk==2.88.14; extra == "dev"
707
- Requires-Dist: policyengine-us==1.690.7; extra == "dev"
707
+ Requires-Dist: policyengine-us==1.691.3; extra == "dev"
708
708
  Requires-Dist: towncrier>=24.8.0; extra == "dev"
709
709
  Requires-Dist: mypy>=1.11.0; extra == "dev"
710
710
  Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
@@ -19,7 +19,7 @@ pytest-asyncio>=0.26.0
19
19
  ruff>=0.9.0
20
20
  policyengine_core>=3.26.1
21
21
  policyengine-uk==2.88.14
22
- policyengine-us==1.690.7
22
+ policyengine-us==1.691.3
23
23
  towncrier>=24.8.0
24
24
  mypy>=1.11.0
25
25
  pytest-cov>=5.0.0
@@ -36,4 +36,4 @@ policyengine-uk==2.88.14
36
36
 
37
37
  [us]
38
38
  policyengine_core>=3.26.1
39
- policyengine-us==1.690.7
39
+ policyengine-us==1.691.3
@@ -5,7 +5,7 @@
5
5
  "has_income_tax": true,
6
6
  "has_region_registry": true,
7
7
  "model_package_name": "policyengine-us",
8
- "num_parameters_bucketed_100s": 851,
8
+ "num_parameters_bucketed_100s": 852,
9
9
  "num_variables_bucketed_100s": 48,
10
10
  "region_registry_country": "us"
11
11
  }
@@ -306,6 +306,10 @@ def test__bump_data_only_writes_release_manifest_revision_when_absent(
306
306
  written["data_package"]["release_manifest_revision"]
307
307
  == "release-manifest-commit-sha"
308
308
  )
309
+ assert (
310
+ written["certified_data_artifact"]["uri"]
311
+ == "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@release-manifest-commit-sha"
312
+ )
309
313
 
310
314
 
311
315
  def test__bump_data_only_falls_back_to_main_for_release_manifest(
@@ -337,6 +341,10 @@ def test__bump_data_only_falls_back_to_main_for_release_manifest(
337
341
  written["data_package"]["release_manifest_revision"]
338
342
  == "release-manifest-commit-sha"
339
343
  )
344
+ assert (
345
+ written["certified_data_artifact"]["uri"]
346
+ == "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@release-manifest-commit-sha"
347
+ )
340
348
 
341
349
 
342
350
  def test__release_manifest_version_mismatch_raises(sandbox) -> None:
@@ -113,12 +113,12 @@ class TestUSModel:
113
113
  assert us_latest.release_manifest is not None
114
114
  assert us_latest.release_manifest.country_id == "us"
115
115
  assert us_latest.model_package.name == "policyengine-us"
116
- assert us_latest.model_package.version == "1.690.7"
116
+ assert us_latest.model_package.version == "1.691.3"
117
117
  assert us_latest.data_package.name == "policyengine-us-data"
118
- assert us_latest.data_package.version == "1.110.12"
118
+ assert us_latest.data_package.version == "1.113.1"
119
119
  assert (
120
120
  us_latest.default_dataset_uri
121
- == "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@1.110.12"
121
+ == "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@99e0ec7e784cdba43dd21ff1d80a081599a7a537"
122
122
  )
123
123
 
124
124
  def test_has_hundreds_of_parameters(self):
@@ -1,5 +1,6 @@
1
1
  """Tests for bundled compatibility manifests and data release manifests."""
2
2
 
3
+ import hashlib
3
4
  import json
4
5
  import os
5
6
  import re
@@ -43,6 +44,7 @@ def _response_with_json(payload: dict) -> MagicMock:
43
44
  response = MagicMock()
44
45
  response.status_code = 200
45
46
  response.text = json.dumps(payload)
47
+ response.content = response.text.encode("utf-8")
46
48
  response.raise_for_status.return_value = None
47
49
  return response
48
50
 
@@ -62,27 +64,27 @@ class TestReleaseManifests:
62
64
  assert manifest.country_id == "us"
63
65
  assert manifest.policyengine_version == POLICYENGINE_VERSION
64
66
  assert manifest.model_package.name == "policyengine-us"
65
- assert manifest.model_package.version == "1.690.7"
67
+ assert manifest.model_package.version == "1.691.3"
66
68
  assert manifest.data_package.name == "policyengine-us-data"
67
- assert manifest.data_package.version == "1.110.12"
69
+ assert manifest.data_package.version == "1.113.1"
68
70
  assert manifest.data_package.repo_id == "policyengine/policyengine-us-data"
69
71
  assert (
70
72
  manifest.data_package.release_manifest_path
71
- == "releases/1.110.12/release_manifest.json"
73
+ == "releases/1.113.1/release_manifest.json"
72
74
  )
73
75
  assert (
74
76
  manifest.data_package.release_manifest_revision
75
- == "3aac4505ec10d31efc1b3799a1e6458a15853ecc"
77
+ == "99e0ec7e784cdba43dd21ff1d80a081599a7a537"
76
78
  )
77
79
  assert manifest.certified_data_artifact is not None
78
80
  assert (
79
- manifest.certified_data_artifact.build_id == "policyengine-us-data-1.110.12"
81
+ manifest.certified_data_artifact.build_id == "policyengine-us-data-1.113.1"
80
82
  )
81
83
  assert manifest.certified_data_artifact.dataset == "enhanced_cps_2024"
82
84
  assert manifest.certification is not None
83
- assert manifest.certification.data_build_id == "policyengine-us-data-1.110.12"
84
- assert manifest.certification.built_with_model_version == "1.690.7"
85
- assert manifest.certification.certified_for_model_version == "1.690.7"
85
+ assert manifest.certification.data_build_id == "policyengine-us-data-1.113.1"
86
+ assert manifest.certification.built_with_model_version == "1.691.3"
87
+ assert manifest.certification.certified_for_model_version == "1.691.3"
86
88
 
87
89
  def test__given_uk_manifest__then_has_pinned_model_and_data_packages(self):
88
90
  manifest = get_release_manifest("uk")
@@ -117,7 +119,7 @@ class TestReleaseManifests:
117
119
 
118
120
  assert (
119
121
  resolved
120
- == "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@1.110.12"
122
+ == "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@99e0ec7e784cdba43dd21ff1d80a081599a7a537"
121
123
  )
122
124
 
123
125
  def test__given_uk_dataset_name__then_resolves_to_versioned_hf_url(self):
@@ -238,8 +240,8 @@ class TestReleaseManifests:
238
240
  mock_get.assert_called_once()
239
241
  assert mock_get.call_args.args[0] == (
240
242
  "https://huggingface.co/policyengine/policyengine-us-data/resolve/"
241
- "3aac4505ec10d31efc1b3799a1e6458a15853ecc/"
242
- "releases/1.110.12/release_manifest.json"
243
+ "99e0ec7e784cdba43dd21ff1d80a081599a7a537/"
244
+ "releases/1.113.1/release_manifest.json"
243
245
  )
244
246
 
245
247
  def test__given_explicit_manifest_revision__then_builds_manifest_url(self):
@@ -247,8 +249,45 @@ class TestReleaseManifests:
247
249
 
248
250
  assert https_release_manifest_uri(manifest.data_package) == (
249
251
  "https://huggingface.co/policyengine/policyengine-us-data/resolve/"
250
- "3aac4505ec10d31efc1b3799a1e6458a15853ecc/"
251
- "releases/1.110.12/release_manifest.json"
252
+ "99e0ec7e784cdba43dd21ff1d80a081599a7a537/"
253
+ "releases/1.113.1/release_manifest.json"
254
+ )
255
+
256
+ def test__given_release_manifest_artifact_uses_version_tag__then_rewrites_to_commit(
257
+ self,
258
+ ):
259
+ get_data_release_manifest.cache_clear()
260
+ payload = {
261
+ "schema_version": 1,
262
+ "data_package": {
263
+ "name": "policyengine-us-data",
264
+ "version": "1.113.1",
265
+ },
266
+ "artifacts": {
267
+ "enhanced_cps_2024": {
268
+ "kind": "microdata",
269
+ "path": "enhanced_cps_2024.h5",
270
+ "repo_id": "policyengine/policyengine-us-data",
271
+ "revision": "1.113.1",
272
+ "sha256": "abc",
273
+ "size_bytes": 123,
274
+ }
275
+ },
276
+ }
277
+
278
+ with patch(
279
+ "policyengine.provenance.manifest.requests.get",
280
+ return_value=_response_with_json(payload),
281
+ ):
282
+ manifest = get_data_release_manifest("us")
283
+
284
+ assert (
285
+ manifest.artifacts["enhanced_cps_2024"].uri
286
+ == "hf://policyengine/policyengine-us-data/enhanced_cps_2024.h5@99e0ec7e784cdba43dd21ff1d80a081599a7a537"
287
+ )
288
+ assert (
289
+ manifest.source_sha256
290
+ == hashlib.sha256(json.dumps(payload).encode("utf-8")).hexdigest()
252
291
  )
253
292
 
254
293
  def test__given_missing_data_release_manifest__then_fetch_raises_unavailable(self):
@@ -355,7 +394,7 @@ class TestReleaseManifests:
355
394
  ):
356
395
  certification = certify_data_release_compatibility(
357
396
  "us",
358
- runtime_model_version="1.690.7",
397
+ runtime_model_version="1.691.3",
359
398
  )
360
399
 
361
400
  assert certification == get_release_manifest("us").certification
@@ -371,7 +410,7 @@ class TestReleaseManifests:
371
410
  ):
372
411
  certification = certify_data_release_compatibility(
373
412
  "us",
374
- runtime_model_version="1.690.7",
413
+ runtime_model_version="1.691.3",
375
414
  )
376
415
 
377
416
  assert certification == get_release_manifest("us").certification