-
Notifications
You must be signed in to change notification settings - Fork 66
feat(tidy3d): FXC-4413-get-cell-name-from-violation-marker-in-klayout-plugin #3054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tidy3d): FXC-4413-get-cell-name-from-violation-marker-in-klayout-plugin #3054
Conversation
e70ce55 to
c24ee38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, no comments
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
tidy3d/plugins/klayout/drc/results.py |
c24ee38 to
94f8dfb
Compare
94f8dfb to
61813ae
Compare
bzhangflex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Greptile Overview
Greptile Summary
This PR adds cell-level tracking to KLayout DRC violation markers, enabling users to identify which design cells contain DRC violations.
Key changes:
DRCMarkerbase class withcellfield that all marker types (EdgeMarker,EdgePairMarker,MultiPolygonMarker) now inherit fromviolated_cellsandviolations_by_cellproperties to bothDRCViolationandDRCResultsfor cell-based analysisviolations_from_fileto extract cell information from the<cell>elementThe implementation maintains backward compatibility since
DRCMarkerwas previously only a type alias (not exported) and is now a base class. All existing marker type functionality is preserved.Confidence Score: 5/5
DRCMarkerbase class pattern is clean and the cell extraction from XML is properly validated with error handling.Important Files Changed
File Analysis
DRCMarkerbase class withcellfield, helper properties for cell-based grouping (violated_cells,violations_by_cell) on bothDRCViolationandDRCResults, and cell extraction from XML parsing.parse_violation_valuecalls to includecellparameter, and enhanced test helpers to support cell names.DRCResultsandDRCViolation.Sequence Diagram
sequenceDiagram participant User participant DRCResults participant DRCViolation participant DRCMarker participant XMLParser as violations_from_file User->>DRCResults: load(resultsfile) DRCResults->>XMLParser: violations_from_file(resultsfile) XMLParser->>XMLParser: Parse XML categories loop For each item XMLParser->>XMLParser: Extract category, cell, value XMLParser->>DRCMarker: parse_violation_value(value, cell) DRCMarker-->>XMLParser: EdgeMarker/EdgePairMarker/MultiPolygonMarker end XMLParser-->>DRCResults: dict[str, DRCViolation] DRCResults-->>User: DRCResults instance User->>DRCResults: violations_by_cell DRCResults->>DRCViolation: violations_by_cell (for each category) DRCViolation->>DRCMarker: marker.cell (for each marker) DRCViolation-->>DRCResults: dict[str, DRCViolation] DRCResults-->>User: dict[str, list[DRCViolation]]