uncscode / particula

a simple, fast, and powerful particle simulator
https://uncscode.github.io/particula
MIT License
5 stars 9 forks source link

Gorkowski/issue328 (Sourcery refactored) #330

Closed sourcery-ai[bot] closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Pull Request #329 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/uncscode/particula pull/329/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 1 year ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.81 ⭐ 2.05 ⭐ 1.24 👎
Method Length 39.06 ⭐ 63.35 🙂 24.29 👎
Working memory 6.19 ⭐ 7.79 🙂 1.60 👎
Quality 83.26% 71.63% 🙂 -11.63% 👎
Other metrics Before After Change
Lines 212 286 74
Changed files Quality Before Quality After Quality Change
particula/rates.py 84.73% ⭐ 68.42% 🙂 -16.31% 👎
particula/util/coagulation_rate.py 80.94% ⭐ 80.94% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
particula/rates.py Rates.__init__ 4 ⭐ 334 ⛔ 11 😞 46.37% 😞 Try splitting into smaller methods. Extract out complex expressions
particula/util/coagulation_rate.py CoagulationRate.coag_gain 0 ⭐ 130 😞 11 😞 63.27% 🙂 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!