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

Improvements to KLayout technology #757

Merged
merged 4 commits into from Oct 6, 2022

Conversation

thomasdorch
Copy link
Contributor

Some minor fixes to KLayout technology:

  • Allow users to set layer_pattern regex
  • Remove LayerStack from KLayoutTechnology and take as argument for export_technology_files instead.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 6, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 6.99 ⭐ 6.98 ⭐ -0.01 👍
Method Length 72.85 🙂 75.04 🙂 2.19 👎
Working memory 9.01 🙂 9.37 🙂 0.36 👎
Quality 64.67% 🙂 63.88% 🙂 -0.79% 👎
Other metrics Before After Change
Lines 559 508 -51
Changed files Quality Before Quality After Quality Change
gdsfactory/klayout_tech.py 64.67% 🙂 63.88% 🙂 -0.79% 👎

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 7 ⭐ 203 😞 16 ⛔ 42.29% 😞 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 12 🙂 235 ⛔ 9 🙂 46.64% 😞 Try splitting into smaller methods
gdsfactory/klayout_tech.py _properties_to_layerview 13 🙂 128 😞 12 😞 49.39% 😞 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 Oct 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 5 Code Smells

No Coverage information No Coverage information
1.8% 1.8% Duplication

@codecov
Copy link

codecov bot commented Oct 6, 2022

Codecov Report

Merging #757 (db25d20) into master (ce0578c) will increase coverage by 0.00%.
The diff coverage is 88.23%.

@@           Coverage Diff           @@
##           master     #757   +/-   ##
=======================================
  Coverage   74.70%   74.71%           
=======================================
  Files         419      420    +1     
  Lines       20786    20789    +3     
  Branches     2824     2823    -1     
=======================================
+ Hits        15529    15532    +3     
  Misses       4387     4387           
  Partials      870      870           
Impacted Files Coverage Δ
gdsfactory/klayout_tech.py 48.62% <88.23%> (-0.03%) ⬇️
gdsfactory/geometry/get_xsection_script.py 71.42% <0.00%> (ø)

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

@joamatab
Copy link
Contributor

joamatab commented Oct 6, 2022

thank you Thomas!

@joamatab joamatab merged commit 830194f into gdsfactory:master Oct 6, 2022
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