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

Remove phidl dependency #741

Merged
merged 35 commits into from Sep 29, 2022
Merged

Remove phidl dependency #741

merged 35 commits into from Sep 29, 2022

Conversation

joamatab
Copy link
Contributor

remove phidl dependency from gdsfactory

@tvt173
@alexsludds
@basnijholt

#521

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 29, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 10.30 🙂 9.83 🙂 -0.47 👍
Method Length 92.14 🙂 95.66 🙂 3.52 👎
Working memory 10.77 😞 11.16 😞 0.39 👎
Quality 56.37% 🙂 55.73% 🙂 -0.64% 👎
Other metrics Before After Change
Lines 11998 13239 1241
Changed files Quality Before Quality After Quality Change
gdsfactory/init.py 53.90% 🙂 53.90% 🙂 0.00%
gdsfactory/add_keepout.py 80.28% ⭐ 80.28% ⭐ 0.00%
gdsfactory/add_labels.py 61.41% 🙂 61.46% 🙂 0.05% 👍
gdsfactory/add_pins.py 61.48% 🙂 61.56% 🙂 0.08% 👍
gdsfactory/cell.py 48.81% 😞 49.15% 😞 0.34% 👍
gdsfactory/component.py 68.45% 🙂 66.73% 🙂 -1.72% 👎
gdsfactory/component_reference.py 70.22% 🙂 70.24% 🙂 0.02% 👍
gdsfactory/config.py 64.23% 🙂 64.30% 🙂 0.07% 👍
gdsfactory/decorators.py 84.19% ⭐ 83.87% ⭐ -0.32% 👎
gdsfactory/fill.py 47.69% 😞 52.67% 🙂 4.98% 👍
gdsfactory/grid.py 33.93% 😞 33.93% 😞 0.00%
gdsfactory/layers.py 67.27% 🙂 67.38% 🙂 0.11% 👍
gdsfactory/pack.py 61.54% 🙂 61.54% 🙂 0.00%
gdsfactory/path.py 38.37% 😞 43.47% 😞 5.10% 👍
gdsfactory/port.py 61.66% 🙂 61.89% 🙂 0.23% 👍
gdsfactory/quickplotter.py 55.98% 🙂 56.09% 🙂 0.11% 👍
gdsfactory/serialization.py 47.21% 😞 47.09% 😞 -0.12% 👎
gdsfactory/types.py 63.32% 🙂 48.35% 😞 -14.97% 👎
gdsfactory/components/C.py 73.20% 🙂 73.20% 🙂 0.00%
gdsfactory/components/init.py 30.68% 😞 30.68% 😞 0.00%
gdsfactory/components/awg.py 51.94% 🙂 51.17% 🙂 -0.77% 👎
gdsfactory/components/bend_circular.py 55.35% 🙂 55.42% 🙂 0.07% 👍
gdsfactory/components/coh_rx_single_pol.py 16.59% ⛔ 16.59% ⛔ 0.00%
gdsfactory/components/die.py 33.69% 😞 33.69% 😞 0.00%
gdsfactory/components/die_bbox.py 39.56% 😞 39.56% 😞 0.00%
gdsfactory/components/die_bbox_frame.py 41.78% 😞 41.78% 😞 0.00%
gdsfactory/components/litho_calipers.py 58.36% 🙂 58.36% 🙂 0.00%
gdsfactory/components/litho_ruler.py 68.65% 🙂 68.65% 🙂 0.00%
gdsfactory/components/litho_steps.py 66.02% 🙂 66.02% 🙂 0.00%
gdsfactory/components/resistance_meander.py 32.37% 😞 32.65% 😞 0.28% 👍
gdsfactory/components/ring_single_dut.py 47.68% 😞 47.68% 😞 0.00%
gdsfactory/components/text.py 42.00% 😞 43.17% 😞 1.17% 👍
gdsfactory/components/via_cutback.py 33.67% 😞 33.67% 😞 0.00%
gdsfactory/geometry/boolean.py 39.60% 😞 43.46% 😞 3.86% 👍
gdsfactory/geometry/invert.py 69.70% 🙂 69.70% 🙂 0.00%
gdsfactory/geometry/offset.py 53.66% 🙂 64.08% 🙂 10.42% 👍
gdsfactory/geometry/outline.py 90.00% ⭐ 46.62% 😞 -43.38% 👎
gdsfactory/geometry/union.py 74.00% 🙂 76.04% ⭐ 2.04% 👍
gdsfactory/geometry/xor_diff.py 63.32% 🙂 63.32% 🙂 0.00%
gdsfactory/labels/siepic.py 64.01% 🙂 64.81% 🙂 0.80% 👍
gdsfactory/read/from_phidl.py 74.69% 🙂 74.69% 🙂 0.00%
gdsfactory/read/import_gds.py 14.86% ⛔ 14.86% ⛔ 0.00%
gdsfactory/read/import_oas.py 48.60% 😞 48.60% 😞 0.00%
gdsfactory/read/labels.py 65.02% 🙂 65.02% 🙂 0.00%
gdsfactory/routing/get_bundle_corner.py 44.30% 😞 44.33% 😞 0.03% 👍
gdsfactory/routing/route_quad.py 63.54% 🙂 66.83% 🙂 3.29% 👍
gdsfactory/routing/route_sharp.py 48.23% 😞 48.23% 😞 0.00%
gdsfactory/samples/01_component_pcell.py 82.30% ⭐ 82.30% ⭐ 0.00%
gdsfactory/tests/test_add_pins.py 86.67% ⭐ 86.88% ⭐ 0.21% 👍
gdsfactory/tests/test_import_from_phidl.py 91.87% ⭐ 90.40% ⭐ -1.47% 👎
gdsfactory/tests/test_offset.py 97.50% ⭐ 96.92% ⭐ -0.58% 👎
gdsfactory/tests/test_paths_transition.py 64.57% 🙂 64.57% 🙂 0.00%
gdsfactory/tests/test_read_gds_with_hierarchy.py 90.51% ⭐ 90.51% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
gdsfactory/path.py extrude 89 ⛔ 1028 ⛔ 28 ⛔ 1.52% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/cell.py cell_without_validator 48 ⛔ 625 ⛔ 5.53% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
gdsfactory/quickplotter.py quickplot 57 ⛔ 643 ⛔ 21 ⛔ 5.77% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/read/import_gds.py import_gds 41 ⛔ 601 ⛔ 19 ⛔ 10.21% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
gdsfactory/routing/route_sharp.py path_manhattan 35 ⛔ 351 ⛔ 19 ⛔ 14.19% ⛔ 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 Sep 29, 2022

Codecov Report

Merging #741 (639d7bb) into master (00adb41) will decrease coverage by 0.37%.
The diff coverage is 70.39%.

❗ Current head 639d7bb differs from pull request most recent head ba05ce9. Consider uploading reports for the commit ba05ce9 to get more accurate results

@@            Coverage Diff             @@
##           master     #741      +/-   ##
==========================================
- Coverage   75.55%   75.18%   -0.38%     
==========================================
  Files         407      412       +5     
  Lines       19179    20505    +1326     
  Branches     2697     2793      +96     
==========================================
+ Hits        14491    15416     +925     
- Misses       3874     4223     +349     
- Partials      814      866      +52     
Impacted Files Coverage Δ
gdsfactory/components/C.py 100.00% <ø> (ø)
gdsfactory/components/awg.py 100.00% <ø> (ø)
gdsfactory/components/bend_circular.py 75.86% <ø> (ø)
gdsfactory/components/coh_rx_single_pol.py 80.70% <ø> (ø)
gdsfactory/components/die.py 56.41% <ø> (ø)
gdsfactory/components/die_bbox.py 64.28% <ø> (ø)
gdsfactory/components/die_bbox_frame.py 63.41% <ø> (ø)
gdsfactory/components/litho_calipers.py 100.00% <ø> (ø)
gdsfactory/components/litho_ruler.py 100.00% <ø> (ø)
gdsfactory/components/litho_steps.py 100.00% <ø> (ø)
... and 49 more

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

@joamatab joamatab merged commit dcc077c into master Sep 29, 2022
@joamatab joamatab deleted the remove_phidl2 branch September 29, 2022 22:15
@sonarcloud
Copy link

sonarcloud bot commented Sep 29, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 42 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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