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 tests and rename raise_exception to check_min_radius #1406

Merged
merged 2 commits into from Mar 9, 2023
Merged

Conversation

joamatab
Copy link
Contributor

@joamatab joamatab commented Mar 9, 2023

  • fix tests
  • improve spiral_racetrack and bend_s names to be more consistent
    • rename raise_exception to check_min_radius
    • rename total_length to length
    • rename nb_points to npoints for consitency

@mdecea

@joamatab joamatab merged commit c57699b into main Mar 9, 2023
@joamatab joamatab deleted the 656b branch March 9, 2023 15:10
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 9, 2023

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 1.21%.

Quality metrics Before After Change
Complexity 5.33 ⭐ 5.17 ⭐ -0.16 👍
Method Length 155.12 😞 148.50 😞 -6.62 👍
Working memory 16.47 ⛔ 16.16 ⛔ -0.31 👍
Quality 45.62% 😞 46.83% 😞 1.21% 👍
Other metrics Before After Change
Lines 763 778 15
Changed files Quality Before Quality After Quality Change
gdsfactory/components/bend_s.py 58.53% 🙂 58.53% 🙂 0.00%
gdsfactory/components/spiral_heater.py 36.52% 😞 39.28% 😞 2.76% 👍
gdsfactory/routing/fanout2x2.py 45.41% 😞 45.41% 😞 0.00%
gdsfactory/routing/get_route_sbend.py 69.24% 🙂 69.24% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
gdsfactory/components/spiral_heater.py spiral_racetrack 18 🙂 388 ⛔ 23 ⛔ 21.00% ⛔ Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/spiral_heater.py spiral_racetrack_fixed_length 4 ⭐ 361 ⛔ 26 ⛔ 32.93% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/routing/fanout2x2.py fanout2x2 4 ⭐ 315 ⛔ 16 ⛔ 39.77% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/spiral_heater.py spiral_racetrack_heater_metal 1 ⭐ 259 ⛔ 21 ⛔ 40.98% 😞 Try splitting into smaller methods. Extract out complex expressions
gdsfactory/components/spiral_heater.py spiral_racetrack_heater_doped 1 ⭐ 220 ⛔ 21 ⛔ 43.15% 😞 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!

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