Detect duplicate cell names before writing layouts#997
Open
joamatab wants to merge 4 commits into
Open
Conversation
GDS/OASIS formats require unique cell names. Add a pre-write check that raises DuplicateCellNameError with details about which names collide, helping users diagnose the issue before it corrupts output. Also suppress a ty type-checker false positive for os.sched_getaffinity (platform-dependent attribute handled at runtime via AttributeError).
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #997 +/- ##
==========================================
- Coverage 71.06% 70.93% -0.13%
==========================================
Files 72 72
Lines 14708 14762 +54
Branches 2852 2868 +16
==========================================
+ Hits 10452 10472 +20
- Misses 3371 3400 +29
- Partials 885 890 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Deduplicate the repetitive name-conflict branches in TKCell.name setter into a single code path. Also add _check_duplicate_cell_names to KCLayout.write() so the layout-level write path catches duplicates the same way ProtoTKCell.write() does.
Replaces try/except AttributeError with a hasattr check so that ty can narrow the type on both macOS (attribute absent) and Linux (attribute present) without needing a platform-specific ignore comment.
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.
Summary
DuplicateCellNameErrorand a pre-write check (_check_duplicate_cell_names) that validates all cells in the write set have unique names before writing GDS/OASIS fileskf.config.debug_namesfor earlier detectiontytype-checker false positive foros.sched_getaffinityon macOSTest plan
DuplicateCellNameErrorwith a clear message