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

better via_stack_with_offset #1480

Merged
merged 9 commits into from Mar 25, 2023
Merged

better via_stack_with_offset #1480

merged 9 commits into from Mar 25, 2023

Conversation

joamatab
Copy link
Contributor

@joamatab joamatab commented Mar 25, 2023

  • better via_stack_with_offset, ports are now on top layer
  • rename circular_via_stack to via_stack_circular for consistency. Marked as not working @mdecea
  • change test_coverage to python3.10

@simbilod

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 25, 2023

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 1.27%.

Quality metrics Before After Change
Complexity 24.27 😞 24.30 😞 0.03 👎
Method Length 181.21 😞 175.21 😞 -6.00 👍
Working memory 17.84 ⛔ 16.83 ⛔ -1.01 👍
Quality 27.70% 😞 28.97% 😞 1.27% 👍
Other metrics Before After Change
Lines 875 879 4
Changed files Quality Before Quality After Quality Change
gdsfactory/components/ring_section_based.py 11.28% ⛔ 11.11% ⛔ -0.17% 👎
gdsfactory/components/via_stack.py 30.52% 😞 31.07% 😞 0.55% 👍
gdsfactory/components/via_stack_with_offset.py 36.40% 😞 46.52% 😞 10.12% 👍
tests/test_components.py 94.88% ⭐ 94.85% ⭐ -0.03% 👎

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 47 ⛔ 830 ⛔ 21 ⛔ 7.31% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/via_stack.py via_stack 22 😞 438 ⛔ 21 ⛔ 18.51% ⛔ 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/via_stack.py via_stack_from_rules 14 🙂 390 ⛔ 18 ⛔ 27.11% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/via_stack_with_offset.py via_stack_with_offset 7 ⭐ 268 ⛔ 17 ⛔ 37.54% 😞 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!

@codecov
Copy link

codecov bot commented Mar 25, 2023

Codecov Report

Merging #1480 (7cb822c) into main (0a8721a) will decrease coverage by 0.42%.
The diff coverage is 26.19%.

@@            Coverage Diff             @@
##             main    #1480      +/-   ##
==========================================
- Coverage   68.89%   68.48%   -0.42%     
==========================================
  Files         374      374              
  Lines       22768    22879     +111     
  Branches     3289     3318      +29     
==========================================
- Hits        15686    15668      -18     
- Misses       6141     6279     +138     
+ Partials      941      932       -9     
Impacted Files Coverage Δ
gdsfactory/component.py 64.62% <0.00%> (-0.13%) ⬇️
gdsfactory/routing/manhattan.py 85.74% <ø> (-0.07%) ⬇️
gdsfactory/components/ring_section_based.py 10.90% <5.35%> (-40.41%) ⬇️
gdsfactory/components/via_stack.py 60.10% <20.68%> (-33.76%) ⬇️
gdsfactory/__init__.py 94.11% <100.00%> (ø)
gdsfactory/cli.py 63.26% <100.00%> (ø)
gdsfactory/components/cutback_2x2.py 96.82% <100.00%> (+0.15%) ⬆️
gdsfactory/components/mzm.py 87.83% <100.00%> (+0.33%) ⬆️
gdsfactory/components/spiral_heater.py 80.57% <100.00%> (+0.28%) ⬆️
gdsfactory/components/via_stack_with_offset.py 100.00% <100.00%> (+4.54%) ⬆️
... and 1 more

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

@joamatab joamatab merged commit c2ea0e6 into main Mar 25, 2023
8 of 10 checks passed
@joamatab joamatab deleted the 670 branch March 25, 2023 17:23
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