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

fix mode hashing and change gdslib branch to main #1151

Merged
merged 4 commits into from Jan 15, 2023
Merged

fix mode hashing and change gdslib branch to main #1151

merged 4 commits into from Jan 15, 2023

Conversation

joamatab
Copy link
Contributor

@joamatab joamatab commented Jan 15, 2023

  • fix mode hashing for tidy3d mode solver. Add plot_power=True flag that can also plot field if False.
  • change gdslib branch to main
  • install gdslib in $HOME/.gdsfactory
  • remove empty cells from notebooks

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 15, 2023

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 6.89 ⭐ 6.75 ⭐ -0.14 👍
Method Length 125.69 😞 127.32 😞 1.63 👎
Working memory 15.13 😞 15.39 ⛔ 0.26 👎
Quality 49.79% 😞 49.26% 😞 -0.53% 👎
Other metrics Before After Change
Lines 1130 1222 92
Changed files Quality Before Quality After Quality Change
gdsfactory/simulation/fem/mode_solver.py 33.22% 😞 33.22% 😞 0.00%
gdsfactory/simulation/gtidy3d/modes.py 51.60% 🙂 50.93% 🙂 -0.67% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
gdsfactory/simulation/gtidy3d/modes.py Waveguide.compute_modes 19 😞 826 ⛔ 28 ⛔ 17.37% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/simulation/fem/mode_solver.py compute_cross_section_modes 12 🙂 386 ⛔ 22 ⛔ 26.39% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/simulation/gtidy3d/modes.py Waveguide.get_n 11 🙂 497 ⛔ 19 ⛔ 28.01% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/simulation/gtidy3d/modes.py plot 8 ⭐ 191 😞 17 ⛔ 41.27% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/simulation/gtidy3d/modes.py plot_sweep_width 5 ⭐ 206 ⛔ 13 😞 47.80% 😞 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 Jan 15, 2023

Codecov Report

Merging #1151 (78bbf2a) into main (9cecd8b) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1151      +/-   ##
==========================================
- Coverage   73.01%   73.00%   -0.01%     
==========================================
  Files         450      450              
  Lines       22751    22751              
  Branches     3015     3015              
==========================================
- Hits        16611    16609       -2     
- Misses       5235     5236       +1     
- Partials      905      906       +1     
Impacted Files Coverage Δ
gdsfactory/read/from_yaml.py 67.26% <0.00%> (-0.61%) ⬇️

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

@joamatab joamatab merged commit bc4f76f into main Jan 15, 2023
@joamatab joamatab deleted the 622 branch January 15, 2023 20:26
simbilod pushed a commit to simbilod/gdsfactory that referenced this pull request Mar 2, 2023
fix mode hashing and change gdslib branch to main

Former-commit-id: 359a53e [formerly bc4f76f]
Former-commit-id: f48fc424de964f4d9e1c4edbe6fbfd0d00bc676a
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

1 participant