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

Klayout Technology (finished?) #724

Merged
merged 3 commits into from Sep 19, 2022
Merged

Conversation

thomasdorch
Copy link
Contributor

Now we can:

  • Read/write layer files (.lyp) and specify whether the layer number is displayed in KLayout (KLayout Technology #695)
  • Read/write technology files (.lyt)
    • Requires the klayout.db module
    • 2.5D layer stacks can only be written due to incomplete API in 0.27.x (#1153)

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 18, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 5.94 ⭐ 6.99 ⭐ 1.05 👎
Method Length 65.78 🙂 72.93 🙂 7.15 👎
Working memory 8.04 🙂 9.01 🙂 0.97 👎
Quality 69.24% 🙂 64.66% 🙂 -4.58% 👎
Other metrics Before After Change
Lines 516 559 43
Changed files Quality Before Quality After Quality Change
gdsfactory/klayout_tech.py 69.24% 🙂 64.66% 🙂 -4.58% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
gdsfactory/klayout_tech.py KLayoutTechnology.export_technology_files 9 🙂 215 ⛔ 15 😞 40.67% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/klayout_tech.py LayerView._get_xml_element 14 🙂 141 😞 13 😞 45.47% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/klayout_tech.py LayerDisplayProperties.add_layer 3 ⭐ 143 😞 24 ⛔ 46.52% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/klayout_tech.py LayerDisplayProperties.from_lyp 11 🙂 220 ⛔ 9 🙂 48.45% 😞 Try splitting into smaller methods
gdsfactory/klayout_tech.py _properties_to_layerview 13 🙂 129 😞 11 😞 51.01% 🙂 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 Sep 18, 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 11 Code Smells

No Coverage information No Coverage information
1.1% 1.1% Duplication

@joamatab joamatab merged commit ed79031 into gdsfactory:master Sep 19, 2022
@joamatab
Copy link
Contributor

Looks great!

thank you Thomas!

@thomasdorch thomasdorch deleted the klayout-tech branch October 6, 2022 04:20
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