fix: support canonical material aliases - #759
Open
vvahidd wants to merge 2 commits into
Open
Conversation
Contributor
Reviewer's GuideAdds canonical material name aliases (Si, SiO2, SiN) across Lumerical, Tidy3D, and Femwell mappings so PDK layer stacks can use either canonical or lowercase material tokens without breaking existing explicit mappings. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
vvahidd
marked this pull request as ready for review
August 10, 2026 14:08
vvahidd
requested review from
ThomasPluck,
joamatab and
nikosavola
as code owners
August 10, 2026 14:08
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
_add_material_name_aliases, the docstring claims aliases are added "without overriding mappings", but theelifbranch explicitly overwrites the canonical name when only a legacy name exists; consider clarifying the docstring or making the behavior symmetric (usingsetdefault) to avoid surprise. - The material aliasing and medium definitions for
Si,SiO2, andSiNare now repeated across multiple modules (Lumerical, Tidy3D, Femwell); consider centralizing the alias map and shared constants to reduce the risk of them drifting out of sync.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `_add_material_name_aliases`, the docstring claims aliases are added "without overriding mappings", but the `elif` branch explicitly overwrites the canonical name when only a legacy name exists; consider clarifying the docstring or making the behavior symmetric (using `setdefault`) to avoid surprise.
- The material aliasing and medium definitions for `Si`, `SiO2`, and `SiN` are now repeated across multiple modules (Lumerical, Tidy3D, Femwell); consider centralizing the alias map and shared constants to reduce the risk of them drifting out of sync.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
Add canonical
Si,SiO2, andSiNaliases to the default Femwell and Tidy3D material mappings used by PDK layer stacks.Complete missing canonical or legacy aliases in Lumerical without overriding explicit mappings. Existing lowercase aliases remain supported, while film-qualified tokens still require explicit material mappings.
Summary by Sourcery
Support canonical silicon material aliases across simulators without breaking existing mappings.
New Features:
Si,SiO2, andSiNaliases to Femwell, Tidy3D, and Lumerical material mappings while preserving lowercase aliases.Bug Fixes: