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

show_ports=False by default and use PORT layer #441

Merged
merged 1 commit into from Jun 6, 2022
Merged

show_ports=False by default and use PORT layer #441

merged 1 commit into from Jun 6, 2022

Conversation

joamatab
Copy link
Contributor

@joamatab joamatab commented Jun 6, 2022

Component.show(show_ports=False) show_ports=False and use LAYER.PORT, fixes issue

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 6, 2022

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 5.17 ⭐ 5.17 ⭐ 0.00
Method Length 50.44 ⭐ 50.44 ⭐ 0.00
Working memory 9.05 🙂 9.05 🙂 0.00
Quality 69.81% 🙂 69.81% 🙂 0.00%
Other metrics Before After Change
Lines 1370 1370 0
Changed files Quality Before Quality After Quality Change
gdsfactory/component.py 70.24% 🙂 70.24% 🙂 0.00%
gdsfactory/components/straight.py 62.40% 🙂 62.32% 🙂 -0.08% 👎

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.add_port 15 🙂 211 ⛔ 23 ⛔ 29.76% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/component.py Component.write_gds 14 🙂 244 ⛔ 16 ⛔ 33.36% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/component.py Component.ploth 8 ⭐ 363 ⛔ 16 ⛔ 34.79% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/component.py Component.remove_layers 22 😞 191 😞 11 😞 37.93% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/straight.py straight 7 ⭐ 136 😞 11 😞 55.67% 🙂 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!

@sonarcloud
Copy link

sonarcloud bot commented Jun 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@joamatab joamatab merged commit 83bb935 into master Jun 6, 2022
@joamatab joamatab deleted the 589b branch June 6, 2022 05:21
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.

Use LayerSpec in Component.show()
1 participant