Skip to content

Add dataset input contract helpers#8560

Open
MaxGhenis wants to merge 1 commit into
mainfrom
codex/dataset-input-contract-20260601
Open

Add dataset input contract helpers#8560
MaxGhenis wants to merge 1 commit into
mainfrom
codex/dataset-input-contract-20260601

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • add a PolicyEngine-US-owned dataset input contract helper module for data-generation packages
  • classify stochastic status inputs, medical/geographic/identifier inputs, deprecated aliases, and formula overrides such as FLSA overtime premium
  • expose helpers to distinguish dataset-exportable variables from formula-owned outputs
  • correct the WIC category comment to say family, matching the existing formula

Notes

  • This does not add any dependency on policyengine-us-data and does not change formulas or default values.
  • Downstream builders such as Microplex can use this after bumping their pinned policyengine-us version, while still owning their own data-generation logic.

Tests

  • uv run ruff check policyengine_us/data/dataset_input_contract.py policyengine_us/data/init.py policyengine_us/tests/core/test_dataset_input_contract.py policyengine_us/variables/gov/usda/wic/wic_category.py
  • uv run ruff format --check policyengine_us/data/dataset_input_contract.py policyengine_us/data/init.py policyengine_us/tests/core/test_dataset_input_contract.py policyengine_us/variables/gov/usda/wic/wic_category.py
  • uv run pytest policyengine_us/tests/core/test_dataset_input_contract.py policyengine_us/tests/core/test_input_variable_definitions.py -q
  • uv run pytest policyengine_us/tests/core/test_dataset_input_contract.py -q

@MaxGhenis MaxGhenis force-pushed the codex/dataset-input-contract-20260601 branch from 34c67e5 to 5ec896c Compare June 2, 2026 00:03
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fa285ae) to head (5d8f174).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8560   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         1    -4     
  Lines           62        24   -38     
=========================================
- Hits            62        24   -38     
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MaxGhenis MaxGhenis force-pushed the codex/dataset-input-contract-20260601 branch from 5ec896c to 5d8f174 Compare June 2, 2026 00:18
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