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

Added QOL for component.add_port. #1478

Merged
merged 1 commit into from Mar 25, 2023
Merged

Added QOL for component.add_port. #1478

merged 1 commit into from Mar 25, 2023

Conversation

st4eve
Copy link
Contributor

@st4eve st4eve commented Mar 24, 2023

centre can now also be specified when port is used when using add_port.

`centre` can now also be specified when `port` is used.
@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 0.13%.

Quality metrics Before After Change
Complexity 7.03 ⭐ 7.12 ⭐ 0.09 👎
Method Length 67.28 🙂 67.35 🙂 0.07 👎
Working memory 8.23 🙂 8.24 🙂 0.01 👎
Quality 65.81% 🙂 65.68% 🙂 -0.13% 👎
Other metrics Before After Change
Lines 2634 2636 2
Changed files Quality Before Quality After Quality Change
gdsfactory/component.py 65.81% 🙂 65.68% 🙂 -0.13% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
gdsfactory/component.py Component._write_library 25 😞 470 ⛔ 17 ⛔ 19.24% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/component.py Component.add_port 21 😞 227 ⛔ 14 😞 31.35% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/component.py Component.plot_holoviews 14 🙂 475 ⛔ 12 😞 33.50% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/component.py Component.add_polygon 18 🙂 282 ⛔ 12 😞 33.79% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/component.py Component.remap_layers 29 😞 216 ⛔ 10 😞 33.89% 😞 Refactor to reduce nesting. 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 ea9139c into gdsfactory:main Mar 25, 2023
4 of 5 checks passed
@joamatab
Copy link
Contributor

Thank you Steve!

releasing 6.69.0 with your improvement

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