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

Add possibility of adding label when adding fiber array #2535

Merged
merged 1 commit into from Feb 15, 2024

Conversation

mdecea
Copy link
Collaborator

@mdecea mdecea commented Feb 15, 2024

I added the possibility of adding a text to a structure when adding a fiber array. I believe this functionality is useful, since this way one can add an identifier to a test structure when adding fiber arrays. Doing it this way allows to place the labels with respect to the grating couplers, which is likely the safest placement so as to not interact with the component itself.

You can choose to place the label in different positions:

add_fiber_array(c, dev_id='abc', text=text_m3, id_placement="l") will place the label at the left of the grating coupler array:
image

add_fiber_array(c, dev_id='abc', text=text_m3, id_placement="r") will place the label at the right of the grating coupler array:
image

add_fiber_array(c, dev_id='abc', text=text_m3, id_placement="center") will place the label at the center of the grating coupler array:
image

add_fiber_array(c, dev_id='abc', text=text_m3, id_placement="s") will place the label at the center of the grating coupler array but below the array:
image

By default no text is added.

@mdecea mdecea requested a review from joamatab February 15, 2024 18:16
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: 27 lines in your changes are missing coverage. Please review.

Comparison is base (5aabf7a) 72.27% compared to head (597fbe3) 72.19%.
Report is 1 commits behind head on main.

Files Patch % Lines
gdsfactory/routing/add_fiber_array.py 3.57% 26 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2535      +/-   ##
==========================================
- Coverage   72.27%   72.19%   -0.08%     
==========================================
  Files         366      366              
  Lines       23671    23700      +29     
  Branches     3888     3905      +17     
==========================================
+ Hits        17108    17110       +2     
- Misses       5379     5405      +26     
- Partials     1184     1185       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joamatab joamatab added enhancement New feature or request routing maintenance patch labels Feb 15, 2024
Copy link
Contributor

@joamatab joamatab left a comment

Choose a reason for hiding this comment

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

Looks great Marc!

@joamatab joamatab merged commit ac2eb95 into gdsfactory:main Feb 15, 2024
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintenance patch routing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants