tpaviot / ProcessScheduler

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

Excel export #114

Closed tpaviot closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 7.71 ⭐ 8.17 ⭐ 0.46 👎
Method Length 72.21 🙂 72.28 🙂 0.07 👎
Working memory 4.60 ⭐ 4.65 ⭐ 0.05 👎
Quality 66.11% 🙂 65.28% 🙂 -0.83% 👎
Other metrics Before After Change
Lines 1425 1411 -14
Changed files Quality Before Quality After Quality Change
processscheduler/cost.py 83.02% ⭐ 83.09% ⭐ 0.07% 👍
processscheduler/problem.py 65.73% 🙂 62.93% 🙂 -2.80% 👎
processscheduler/solution.py 32.52% 😞 33.19% 😞 0.67% 👍
test/test_cost.py 77.59% ⭐ 78.65% ⭐ 1.06% 👍
test/test_features.py 86.90% ⭐ 86.90% ⭐ 0.00%
test/test_solver.py 74.37% 🙂 72.92% 🙂 -1.45% 👎

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 ⛔ 808 ⛔ 4.78% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
processscheduler/solution.py SchedulingSolution.render_gantt_plotly 23 😞 357 ⛔ 23.12% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
processscheduler/problem.py SchedulingProblem.add_indicator_resource_cost 21 😞 205 ⛔ 34.55% 😞 Refactor to reduce nesting. Try splitting into smaller methods
processscheduler/problem.py SchedulingProblem.add_objective_flowtime_single_resource 4 ⭐ 252 ⛔ 12 😞 47.57% 😞 Try splitting into smaller methods. Extract out complex expressions
test/test_solver.py TestSolver.test_alternative_workers_2 0 ⭐ 193 😞 15 😞 51.07% 🙂 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!