Skip to content

Fix uniquename bug - #333

Open
parrangoiz wants to merge 4 commits into
mainfrom
arrangop/uniquename-bug-fix
Open

parrangoiz wants to merge 4 commits into
mainfrom
arrangop/uniquename-bug-fix

Conversation

@parrangoiz

Copy link
Copy Markdown
Contributor

Fixes #332

@parrangoiz
parrangoiz requested a review from gpeairs September 25, 2026 00:49
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/schematics/schematics.jl 50.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@gpeairs gpeairs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, just one more case I'd like to cover below.

Comment thread src/schematics/schematics.jl
parrangoiz and others added 3 commits September 30, 2026 17:46
…ses base_id literally

uniquename("x_3_1", '_') returned "x3_1" because the base name was rebuilt with
join(substrings[1:end-1]) without the delimiter, and any trailing integer was read as an
occurrence counter, so schematic nodes (add_node! → node ids → locator prefixes and cell
names) for components named like lattice sites (s_3_1, a_2_1) were mangled/renumbered.

- join with dlm; a bare number is not a suffix
- new keyword parse_suffix (default true keeps the documented str0$n behavior); add_node!
  passes parse_suffix=false so base_id is used as the node id unless already taken, as its
  docstring says
- tests for uniquename and node ids; CHANGELOG
From @gpeairs PR comment

Co-authored-by: Greg Peairs <gpeairs@amazon.com>
@parrangoiz
parrangoiz force-pushed the arrangop/uniquename-bug-fix branch from 9ffdc00 to 767c590 Compare September 30, 2026 17:46

This branch has not been deployed

No deployments
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.

uniquename(str, '_') mangles names ending in _<n>

2 participants