Skip to content

[v4] Refresh docs + example for agent-first surface#295

Open
MaxGhenis wants to merge 1 commit intov4-base-extractionfrom
v4-docs-refresh
Open

[v4] Refresh docs + example for agent-first surface#295
MaxGhenis wants to merge 1 commit intov4-base-extractionfrom
v4-docs-refresh

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Refreshes documentation and the household_impact_example script for the v4 agent-first surface. All user-facing docs now teach the pe.uk.* / pe.us.* entry points first.

Changed:

  • README.md: Quick start leads with pe.{uk,us}.calculate_household (flat kwargs, dot-access, dict reforms), then shows population-analysis path.
  • docs/core-concepts.md: New "Quick start" section above the architecture overview. Lower-level import paths retained as a shortcut comment next to the main pe.uk / pe.us idiom.
  • docs/economic-impact-analysis.md: Both UK and US examples now import policyengine as pe and call pe.{uk,us}.economic_impact_analysis.
  • docs/country-models-{uk,us}.md: Each gets a Quick start at the top demonstrating pe.{uk,us}.calculate_household with a simple case, a compound household, and a reform.
  • docs/regions-and-scoping.md: Switched to pe.{us,uk}.model.region_registry. Removed the "Legacy filter fields" section documenting filter_field/filter_value (dropped in [v4] Drop legacy filter_field/filter_value scoping fields #290).
  • docs/dev.md: Package-layout diagram now includes tax_benefit_models/common/, provenance/, and mentions the base-class extraction. "Country-specific model classes" description updated for the new inheritance model.
  • docs/examples.md: "Household impact calculation" section retitled to "Household calculation" and reworded for the new API.
  • examples/household_impact_example.py: Rewritten end-to-end; verified by running both UK and US cases against installed country models.

Safety

  • No library code changes; all 391 tests still pass.
  • examples/household_impact_example.py runs end-to-end (both UK and US cases produce non-zero tax/benefit values).

Stack

Stacked on #294 (MicrosimulationModelVersion base). Will retarget to main once the preceding stack merges.

Test plan

  • python examples/household_impact_example.py produces expected numeric output for both countries
  • No remaining references to calculate_household_impact, UKHouseholdInput, USHouseholdInput, or filter_field/filter_value in docs/ or README.md

🤖 Generated with Claude Code

- README and core-concepts now lead with pe.uk/pe.us entry points and
  pe.uk.calculate_household / pe.us.calculate_household (flat kwargs,
  dot-access result, dict reforms).
- economic-impact-analysis, country-models-{uk,us}, and
  regions-and-scoping switched from `from policyengine.tax_benefit_models...`
  to the top-level facade.
- Removed the "Legacy filter fields" section from regions-and-scoping
  now that filter_field/filter_value have been dropped (v4 breaking).
- dev.md package-layout diagram updated to mention common/ base,
  provenance/ subpackage, and the MicrosimulationModelVersion extraction.
- examples/household_impact_example.py rewritten against the v4 API and
  verified end-to-end against both UK and US models.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant