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) #88

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.48%.

Quality metrics Before After Change
Complexity 8.79 πŸ™‚ 8.91 πŸ™‚ 0.12 πŸ‘Ž
Method Length 93.86 πŸ™‚ 93.29 πŸ™‚ -0.57 πŸ‘
Working memory 10.80 😞 10.90 😞 0.10 πŸ‘Ž
Quality 54.12% πŸ™‚ 53.64% πŸ™‚ -0.48% πŸ‘Ž
Other metrics Before After Change
Lines 225 222 -3
Changed files Quality Before Quality After Quality Change
processscheduler/resource_constraint.py 54.12% πŸ™‚ 53.64% πŸ™‚ -0.48% πŸ‘Ž

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__ 8 ⭐ 166 😞 11 😞 51.56% πŸ™‚ 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!

codecov-commenter commented 3 years ago

Codecov Report

Merging #88 (5a4e4b3) into resource-tasks-distance (cac8b4a) will decrease coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@                     Coverage Diff                     @@
##           resource-tasks-distance      #88      +/-   ##
===========================================================
- Coverage                    95.07%   95.06%   -0.01%     
===========================================================
  Files                           31       31              
  Lines                         3551     3549       -2     
===========================================================
- Hits                          3376     3374       -2     
  Misses                         175      175              
Impacted Files Coverage Ξ”
processscheduler/resource_constraint.py 95.78% <100.00%> (-0.09%) :arrow_down:
test/test_resource_tasks_distance.py 99.00% <100.00%> (ΓΈ)

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update cac8b4a...5a4e4b3. Read the comment docs.