Closed sourcery-ai[bot] closed 3 years ago
β Merging this PR will increase code quality in the affected files by 0.27%.
Quality metrics | Before | After | Change |
---|---|---|---|
Complexity | 24.46 π | 23.34 π | -1.12 π |
Method Length | 91.30 π | 90.04 π | -1.26 π |
Working memory | 11.81 π | 11.87 π | 0.06 π |
Quality | 44.31% π | 44.58% π | 0.27% π |
Other metrics | Before | After | Change |
---|---|---|---|
Lines | 1384 | 1358 | -26 |
Changed files | Quality Before | Quality After | Quality Change |
---|---|---|---|
processscheduler/solution.py | 38.14% π | 36.81% π | -1.33% π |
processscheduler/solver.py | 36.08% π | 37.16% π | 1.08% π |
processscheduler/task_constraint.py | 73.96% π | 74.50% π | 0.54% π |
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 |
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!
Merging #92 (ac421e6) into buffer (095baed) will decrease coverage by
0.00%
. The diff coverage is90.47%
.
@@ Coverage Diff @@
## buffer #92 +/- ##
==========================================
- Coverage 95.33% 95.33% -0.01%
==========================================
Files 33 33
Lines 3883 3859 -24
==========================================
- Hits 3702 3679 -23
+ Misses 181 180 -1
Impacted Files | Coverage Ξ | |
---|---|---|
processscheduler/solver.py | 96.55% <75.00%> (+0.22%) |
:arrow_up: |
processscheduler/solution.py | 94.97% <100.00%> (-0.27%) |
:arrow_down: |
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 095baed...ac421e6. Read the comment docs.
Pull Request #91 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
buffer
branch, then run:Help us improve this pull request!