Skip to content

Reject misplaced uprating rounding metadata - #533

Draft
anth-volk wants to merge 1 commit into
masterfrom
reject-misplaced-uprating-rounding
Draft

Reject misplaced uprating rounding metadata#533
anth-volk wants to merge 1 commit into
masterfrom
reject-misplaced-uprating-rounding

Conversation

@anth-volk

Copy link
Copy Markdown
Collaborator

Fixes #216

Merge order: PolicyEngine/policyengine-us#9371 must merge before this pull request. Current PolicyEngine US main contains 176 definitions that this validation will reject.

Summary

  • reject metadata that places rounding and uprating at the same level
  • report that rounding must be nested inside uprating because the previous structure is ignored
  • validate ordinary parameters, scale-level metadata, and bracket-level metadata through the common parameter schema check
  • retain the existing supported nested rounding behavior

Validation

  • uv run --frozen pytest tests/core/parameters -v — 49 passed
  • uv run --frozen ruff format . — 270 files unchanged
  • uv run --frozen ruff check . — all checks passed
  • loaded the corrected PolicyEngine US parameter tree through this validation — 75,480 parameter descendants loaded

The full Core test suite was not run locally; the complete parameter suite covering this loader behavior passed. make format could not locate ruff on the shell path, so the same configured formatter and lint checks were run through the repository's uv environment.

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.

Ensure that parameter rounding isn't permitted except as a step within uprating

1 participant