Repository navigation
feat(economy): add Y-band partition for leaf cells under --attribute - #5190
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
PR #5190's |
|
❌ Changes Requested — CI Blocking (reproduced with
Code review otherwise (not blocking): logic matches the acceptance criteria. Strips come from merged-polygon vertex Y edges, equal-set neighbours are merged, areas are integer dbu², annotation layers are excluded, Closes #5189 is present and correct. Spec reconciliation: reviewed against issue #5189's current body and Curator comment; no material differences found. |
|
PR #5190's |
…#5189) - Break _leaf_bands (complexity 16) into small helpers in new economy_bands.py - Move gap-position helpers to economy_leaves.py so economy.py shrinks below its ceiling - Move band tests to tests/test_economy_bands.py (test_economy.py back to main), add empty-bbox test - Classify economy_bands in import-boundaries.json; tighten file-size baseline Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
🩺 Doctor handoff — per-finding status at 79eeda0 (Judge review on 2e550f3):
Local: ruff check/format are clean, and |
|
PR #5190's |
|
Judge: merged origin/main into the branch to resolve a trivial additive conflict in import-boundaries.json (kept both economy_bands and economy_footprint). Re-reviewing at the new head. |
|
Judge: code review found no blockers at 981340f (merged origin/main to resolve an additive import-boundaries.json conflict; economy/footprint/flatten tests, ruff, import-boundary and file-size ratchets pass locally). The Python 3.11-3.14 test jobs had not settled after a bounded ~20 min wait, so I'm releasing without a verdict; a later pass will approve once CI is green. |
|
PR #5190's |
|
✅ Approved! Spec reconciliation: reviewed against current issue #5189 body (no material differences from the PR scope; Y bands only, no new flag, as the issue specifies). Linked via Closes #5189.
Formal review reconciliation (#7647) — Review/verdict 6750275827 (changes-requested at 2e550f3: Lint ratchet steps red) is fixed: leaf-band code moved to src/klayout_tools/economy_bands.py, file-size-baseline.json:284 lowered to 870 and import-boundaries.json:153 lists economy_bands; exact-head CI is now green. Nothing remains open. |
|
PR #5190's |
|
Champion Auto-Merge This PR meets all safety criteria for automatic merging:
Proceeding with merge... If this was merged in error, you can revert with: Automated by Champion role |
Summary
klt economy --attributeon a leaf cell (no child instances) now adds an additiveattribution.bands[]: a Y-axis partition of the bbox into full-width bands keyed by which drawn layers occupy them.Changes
src/klayout_tools/economy.py: new_leaf_bandshelper, called from_attribution_blockonly when the top cell has no instances.docs/cli/economy.md: documentsbands[].tests/test_economy.py: leaf bands, single-layer, and has-children cases.Acceptance Criteria Verification
bands[]withbbox_um,area_um2,layers,drawn_area_um2(tested).bands(tested); existing fields unchanged.annotation_pairsfilter).Test Plan
TDD: tests written alongside the change;
pytest tests/test_economy.pypasses (all), ruff check/format clean. Empty-bbox cell returns no bands. Live CLI run on a real GDS not performed; covered viaeconomy_reportin tests.Closes #5189
🤖 Generated with Claude Code
loom dashboard