Skip to content
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

fix route_info #2130

Merged
merged 2 commits into from Sep 27, 2023
Merged

fix route_info #2130

merged 2 commits into from Sep 27, 2023

Conversation

joamatab
Copy link
Contributor

  • add Component.add_route_info(cross_section, length ...)
  • add Pdk.get_cross_section_name

@tvt173

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #2130 (7cba2ff) into main (710489e) will increase coverage by 0.04%.
The diff coverage is 77.41%.

@@            Coverage Diff             @@
##             main    #2130      +/-   ##
==========================================
+ Coverage   71.49%   71.53%   +0.04%     
==========================================
  Files         368      367       -1     
  Lines       22992    22993       +1     
  Branches     3373     3373              
==========================================
+ Hits        16437    16447      +10     
+ Misses       5551     5541      -10     
- Partials     1004     1005       +1     
Files Coverage Δ
gdsfactory/components/bend_circular.py 100.00% <100.00%> (ø)
gdsfactory/components/bend_euler.py 71.76% <100.00%> (+0.33%) ⬆️
gdsfactory/components/straight.py 100.00% <100.00%> (ø)
gdsfactory/cross_section.py 56.72% <100.00%> (ø)
gdsfactory/pdk.py 62.59% <100.00%> (+0.29%) ⬆️
gdsfactory/components/taper_cross_section.py 91.30% <0.00%> (-0.37%) ⬇️
gdsfactory/component.py 63.31% <80.00%> (+0.17%) ⬆️
gdsfactory/serialization.py 77.77% <69.23%> (+0.24%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@joamatab joamatab merged commit ffba2b7 into main Sep 27, 2023
7 of 8 checks passed
@joamatab joamatab deleted the fix_route_info branch September 27, 2023 13:49
@@ -686,6 +686,17 @@ def to_updk(self) -> str:
# def on_cross_section_registered(self) -> Event:
# return self._on_cross_section_registered

def get_cross_section_name(self, cross_section: CrossSection) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

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

in this case, we are getting the name of a specific cross section (i.e. rib of width 0.5 um) rather than the type of cross section, right? i suppose this should be ok, but just noting it's different from what i was doing before for pathlength extraction. it comes down to if you want to group all rib as rib or break them out based on particular widths, etc. ideally, i think you probably want to be able to do it either way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the CrossSections are uniquely identified by name,

it will try to get name from the PDK, and if it does not exist it will name them with a hash

what do you think?

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.

None yet

2 participants