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

First implementation of Buffers #91

Closed tpaviot closed 3 years ago

tpaviot commented 3 years ago

So far, only the NonConcurrentBuffer class is covered.

codecov-commenter commented 3 years ago

Codecov Report

Merging #91 (d194a85) into master (ad61387) will increase coverage by 0.13%. The diff coverage is 97.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
+ Coverage   95.19%   95.33%   +0.13%     
==========================================
  Files          31       33       +2     
  Lines        3643     3859     +216     
==========================================
+ Hits         3468     3679     +211     
- Misses        175      180       +5     
Impacted Files Coverage Δ
processscheduler/buffer.py 86.36% <86.36%> (ø)
processscheduler/solver.py 96.55% <95.45%> (+0.53%) :arrow_up:
processscheduler/solution.py 94.97% <98.36%> (+0.05%) :arrow_up:
test/test_buffer.py 99.09% <99.09%> (ø)
processscheduler/__init__.py 88.23% <100.00%> (+0.73%) :arrow_up:
processscheduler/context.py 91.48% <100.00%> (+1.24%) :arrow_up:
processscheduler/task_constraint.py 100.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 ad61387...d194a85. Read the comment docs.

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 18.09 🙂 21.94 😞 3.85 👎
Method Length 72.41 🙂 77.35 🙂 4.94 👎
Working memory 10.77 😞 11.40 😞 0.63 👎
Quality 50.58% 🙂 47.52% 😞 -3.06% 👎
Other metrics Before After Change
Lines 1295 1478 183
Changed files Quality Before Quality After Quality Change
processscheduler/init.py 83.77% ⭐ 83.46% ⭐ -0.31% 👎
processscheduler/context.py 92.33% ⭐ 91.74% ⭐ -0.59% 👎
processscheduler/solution.py 41.45% 😞 36.81% 😞 -4.64% 👎
processscheduler/solver.py 40.92% 😞 37.16% 😞 -3.76% 👎
processscheduler/task_constraint.py 72.68% 🙂 74.50% 🙂 1.82% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
processscheduler/solution.py SchedulingSolution.render_gantt_matplotlib 50 ⛔ 684 ⛔ 22 ⛔ 6.28% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
processscheduler/solver.py SchedulingSolver.__init__ 48 ⛔ 582 ⛔ 14 😞 13.55% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
processscheduler/solver.py SchedulingSolver.build_solution 42 ⛔ 425 ⛔ 12 😞 18.77% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
processscheduler/solver.py SchedulingSolver.solve_optimize_incremental 29 😞 290 ⛔ 15 😞 22.30% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
processscheduler/solution.py SchedulingSolution.render_gantt_plotly 23 😞 290 ⛔ 17 ⛔ 23.64% ⛔ 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:

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!