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 mzi with new routing #1496

Merged
merged 3 commits into from Mar 28, 2023
Merged

fix mzi with new routing #1496

merged 3 commits into from Mar 28, 2023

Conversation

joamatab
Copy link
Contributor

@joamatab joamatab commented Mar 28, 2023

  • move cp2 in mzi and mzm to have enough space for 2 straights
  • better error messages when vias do not fit in via_stacks

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 28, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 12.04 🙂 12.82 🙂 0.78 👎
Method Length 167.70 😞 173.11 😞 5.41 👎
Working memory 19.83 ⛔ 20.44 ⛔ 0.61 👎
Quality 37.63% 😞 36.44% 😞 -1.19% 👎
Other metrics Before After Change
Lines 1169 1194 25
Changed files Quality Before Quality After Quality Change
gdsfactory/components/mzi.py 28.97% 😞 28.50% 😞 -0.47% 👎
gdsfactory/components/mzm.py 33.97% 😞 33.84% 😞 -0.13% 👎
gdsfactory/components/via_stack.py 31.07% 😞 29.14% 😞 -1.93% 👎
gdsfactory/components/via_stack_slot.py 42.86% 😞 39.84% 😞 -3.02% 👎
gdsfactory/components/via_stack_with_offset.py 34.78% 😞 34.81% 😞 0.03% 👍
tests/test_import_gds_with_hierarchy.py 90.07% ⭐ 90.07% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
gdsfactory/components/via_stack.py via_stack 27 😞 520 ⛔ 25 ⛔ 13.33% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/via_stack.py via_stack_circular 26 😞 457 ⛔ 17 ⛔ 18.75% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/mzi.py mzi 13 🙂 614 ⛔ 35 ⛔ 21.51% ⛔ Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/via_stack_with_offset.py via_stack_with_offset 12 🙂 379 ⛔ 22 ⛔ 26.49% 😞 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!

@joamatab joamatab merged commit 2ac53b8 into main Mar 28, 2023
8 checks passed
@joamatab joamatab deleted the 6726 branch March 28, 2023 16:09
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

1 participant