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

Some changes to section based ring and ViaStacks #1475

Merged
merged 7 commits into from Mar 24, 2023
Merged

Conversation

mdecea
Copy link
Collaborator

@mdecea mdecea commented Mar 24, 2023

  • Modified section based rings so that they can have diffferent add/drop gaps and different cross sections before and after the drop port. @simbilod I don't think this affects you but might be worth taking a quick look.

  • Made ViaStack accept a parameter that tells if we want to get an error when the via is too small, or simply adjust the sizes to make them work. @joamatab What do you think?

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 24, 2023

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 5.84%.

Quality metrics Before After Change
Complexity 12.61 🙂 21.26 😞 8.65 👎
Method Length 203.89 😞 227.20 ⛔ 23.31 👎
Working memory 18.51 ⛔ 18.17 ⛔ -0.34 👍
Quality 34.99% 😞 29.15% 😞 -5.84% 👎
Other metrics Before After Change
Lines 984 1220 236
Changed files Quality Before Quality After Quality Change
gdsfactory/components/ring_section_based.py 20.62% ⛔ 12.26% ⛔ -8.36% 👎
gdsfactory/components/spiral_heater.py 41.91% 😞 41.71% 😞 -0.20% 👎
gdsfactory/components/via_stack.py 36.65% 😞 29.54% 😞 -7.11% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
gdsfactory/components/ring_section_based.py ring_section_based 44 ⛔ 788 ⛔ 22 ⛔ 7.51% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/via_stack.py via_stack 33 ⛔ 429 ⛔ 21 ⛔ 12.63% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/via_stack.py circular_via_stack 26 😞 504 ⛔ 17 ⛔ 18.46% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/spiral_heater.py spiral_racetrack 18 🙂 388 ⛔ 23 ⛔ 21.00% ⛔ Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/via_stack.py via_stack_from_rules 14 🙂 390 ⛔ 18 ⛔ 27.11% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@simbilod
Copy link
Collaborator

simbilod commented Mar 24, 2023

Always good to have more flexibility!

Seems like a good check for the vias. If there is freedom in choosing via size we also have def via_stack_from_rules(

@joamatab
Copy link
Contributor

great, thank you Marc!

@joamatab joamatab merged commit 036a272 into gdsfactory:main Mar 24, 2023
4 of 8 checks passed
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

3 participants