tpaviot / ProcessScheduler

A Python package for automatic and optimized resource scheduling
https://processscheduler.github.io/
GNU General Public License v3.0
59 stars 17 forks source link

Resource tasks distance (Sourcery refactored) #89

Closed sourcery-ai[bot] closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Pull Request #87 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

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:

Review changes via command line

To manually merge these changes, make sure you're on the resource-tasks-distance branch, then run:

git fetch origin sourcery/resource-tasks-distance
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 10.53 🙂 10.68 🙂 0.15 👎
Method Length 102.00 🙂 101.43 🙂 -0.57 👍
Working memory 11.11 😞 11.21 😞 0.10 👎
Quality 50.47% 🙂 49.94% 😞 -0.53% 👎
Other metrics Before After Change
Lines 245 242 -3
Changed files Quality Before Quality After Quality Change
processscheduler/resource_constraint.py 50.47% 🙂 49.94% 😞 -0.53% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
processscheduler/resource_constraint.py WorkLoad.__init__ 13 🙂 257 ⛔ 14 😞 35.94% 😞 Try splitting into smaller methods. Extract out complex expressions
processscheduler/resource_constraint.py ResourceTasksDistance.__init__ 14 🙂 223 ⛔ 12 😞 39.95% 😞 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!