Document that Census TAX_ID is replaced by our tax-unit construction#1155
Draft
MaxGhenis wants to merge 2 commits into
Draft
Document that Census TAX_ID is replaced by our tax-unit construction#1155MaxGhenis wants to merge 2 commits into
MaxGhenis wants to merge 2 commits into
Conversation
_create_tax_unit_table overwrites the raw Census ASEC TAX_ID with our own construct_tax_units() assignment, retaining the original as CENSUS_TAX_ID. Add a comment explaining the why so the intent (we build tax units ourselves; the Census value is kept only as the validation baseline + required raw-schema column) is legible at the call site. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add an explanatory comment in
CensusCPS._create_tax_unit_tabledocumenting that the raw Census ASECTAX_IDis intentionally replaced by our ownconstruct_tax_units()assignment, with the original retained asCENSUS_TAX_ID.Why
Read cold,
person["TAX_ID"] = constructed_person["TAX_ID"].valueslooks like it might be silently clobbering the Census filing-unit grouping. It's deliberate: we build tax units ourselves (default mode"policyengine"), and keep the original asCENSUS_TAX_IDbecause it's the validation baseline (validation/cps_tax_unit_validation.py) and a required raw-schema column (_validate_raw_cps_schema). SoCENSUS_TAX_IDshould be neither dropped nor renamed — only documented.Comment-only; no behavior change.
Note
Refile of #1154 from a canonical branch instead of a fork, so the
check-fork-gated CI (calibration/integration jobs) actually runs.🤖 Generated with Claude Code