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

raise warning with uncached cells #1381

Merged
merged 2 commits into from Mar 3, 2023
Merged

raise warning with uncached cells #1381

merged 2 commits into from Mar 3, 2023

Conversation

joamatab
Copy link
Contributor

@joamatab joamatab commented Mar 3, 2023

fixes #1306

thank you Troy!

@tvt173

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 3, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 6.60 ⭐ 6.92 ⭐ 0.32 👎
Method Length 64.35 🙂 63.88 🙂 -0.47 👍
Working memory 8.00 🙂 8.05 🙂 0.05 👎
Quality 67.13% 🙂 66.78% 🙂 -0.35% 👎
Other metrics Before After Change
Lines 3223 3235 12
Changed files Quality Before Quality After Quality Change
gdsfactory/component.py 66.16% 🙂 65.64% 🙂 -0.52% 👎
gdsfactory/config.py 81.32% ⭐ 81.20% ⭐ -0.12% 👎
gdsfactory/pdk.py 65.85% 🙂 65.75% 🙂 -0.10% 👎

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 32 😞 505 ⛔ 17 ⛔ 15.41% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/pdk.py Pdk._get_component 22 😞 255 ⛔ 14 😞 29.14% 😞 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!

@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Merging #1381 (8b3ea0c) into main (a18f327) will increase coverage by 0.01%.
The diff coverage is 84.21%.

@@            Coverage Diff             @@
##             main    #1381      +/-   ##
==========================================
+ Coverage   69.64%   69.65%   +0.01%     
==========================================
  Files         366      366              
  Lines       21852    21871      +19     
  Branches     3130     3134       +4     
==========================================
+ Hits        15218    15234      +16     
- Misses       5734     5736       +2     
- Partials      900      901       +1     
Impacted Files Coverage Δ
gdsfactory/config.py 65.42% <66.66%> (+0.07%) ⬆️
gdsfactory/component.py 66.93% <90.90%> (+0.26%) ⬆️
gdsfactory/pdk.py 57.40% <100.00%> (+0.25%) ⬆️

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

@joamatab joamatab merged commit 036661e into main Mar 3, 2023
@joamatab joamatab deleted the 650 branch March 3, 2023 04:26
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.

Add check to avoid uncached intermediate cells
1 participant