gdsfactory / skywater130

skywater 130nm pdk
https://gdsfactory.github.io/skywater130/
MIT License
26 stars 11 forks source link

Device gen (Sourcery refactored) #44

Closed sourcery-ai[bot] closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Pull Request #43 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/gdsfactory/skywater130 pull/43/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Help us improve this pull request!

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 8.76 🙂 14.80 🙂 6.04 👎
Method Length 612.97 ⛔ 551.12 ⛔ -61.85 👍
Working memory 47.68 ⛔ 46.23 ⛔ -1.45 👍
Quality 27.34% 😞 22.71% -4.63% 👎
Other metrics Before After Change
Lines 3968 2151 -1817
Changed files Quality Before Quality After Quality Change
sky130/device_generators/mimcap_1.py 40.36% 😞 35.78% 😞 -4.58% 👎
sky130/device_generators/mimcap_2.py 41.07% 😞 36.33% 😞 -4.74% 👎
sky130/device_generators/nmos.py 26.96% 😞 15.14% ⛔ -11.82% 👎
sky130/device_generators/nmos_5v.py 29.84% 😞 19.83% ⛔ -10.01% 👎
sky130/device_generators/npn_W1L2.py 20.56% ⛔ 20.57% ⛔ 0.01% 👍
sky130/device_generators/p+poly.py 29.50% 😞 29.45% 😞 -0.05% 👎
sky130/device_generators/p-poly.py 29.50% 😞 29.45% 😞 -0.05% 👎
sky130/device_generators/pmos.py 26.96% 😞 15.17% ⛔ -11.79% 👎
sky130/device_generators/pmos_5v.py 29.89% 😞 19.94% ⛔ -9.95% 👎
sky130/device_generators/pnp.py 19.82% ⛔ 19.83% ⛔ 0.01% 👍
sky130/device_generators/via_generator.py 40.97% 😞 49.13% 😞 8.16% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
sky130/device_generators/nmos.py nmos 24 😞 1609 ⛔ 55 ⛔ 12.79% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
sky130/device_generators/pmos.py pmos 24 😞 1607 ⛔ 55 ⛔ 12.79% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
sky130/device_generators/nmos_5v.py nmos_5v 17 🙂 1688 ⛔ 61 ⛔ 17.67% ⛔ Try splitting into smaller methods. Extract out complex expressions
sky130/device_generators/pmos_5v.py pmos_5v 17 🙂 1639 ⛔ 57 ⛔ 17.68% ⛔ Try splitting into smaller methods. Extract out complex expressions
sky130/device_generators/pnp.py pnp 16 🙂 3656 ⛔ 46 ⛔ 18.53% ⛔ Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

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!