torressa / cspy

A collection of algorithms for the (Resource) Constrained Shortest Path problem in Python / C++ / C#
https://torressa.github.io/cspy/
MIT License
77 stars 24 forks source link

Added parameters and changed custom REF inputs #51

Closed torressa closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report (beta)

βœ…  Merging this PR will increase code quality in the affected files by 0.08 out of 10.

Quality metrics Before After Change
Complexity 2.29 1.99 -0.30 πŸ”΅
Method Length 62.17 58.96 -3.21 πŸ”΅
Quality 8.36 8.44 0.08 πŸ”΅
Other metrics Before After Change
Lines 2147 2379 232
Changed files Quality Before Quality After Quality Change
cspy/checking.py 8.20 8.36 0.16 πŸ”΅
cspy/algorithms/bidirectional.py 7.83 7.90 0.07 πŸ”΅
cspy/algorithms/grasp.py 8.65 8.60 -0.05 πŸ”΄
cspy/algorithms/greedy_elimination.py 8.74 8.62 -0.12 πŸ”΄
cspy/algorithms/label.py 8.75 8.71 -0.04 πŸ”΄
cspy/algorithms/path_base.py 8.50 8.45 -0.05 πŸ”΄
cspy/algorithms/psolgent.py 8.47 8.44 -0.03 πŸ”΄
cspy/algorithms/tabu.py 8.53 8.46 -0.07 πŸ”΄
examples/jpath/jpath_preprocessing.py 8.00 8.03 0.03 πŸ”΅
tests/tests_bidirectional.py 8.57 8.72 0.15 πŸ”΅
tests/tests_grasp.py 8.53 8.65 0.12 πŸ”΅
tests/tests_greedy_elimination.py 8.67
tests/tests_issue17.py 7.88 8.07 0.19 πŸ”΅
tests/tests_issue20.py 8.36 8.14 -0.22 πŸ”΄
tests/tests_issue22.py 8.16 8.26 0.10 πŸ”΅
tests/tests_issue25.py 8.51 8.51 0.00
tests/tests_issue32.py 8.33 8.29 -0.04 πŸ”΄
tests/tests_issue38.py 9.12 9.09 -0.03 πŸ”΄
tests/tests_issue41.py 8.59
tests/tests_tabu.py 8.54 8.77 0.23 πŸ”΅

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

File Function Complexity Length Overall Recommendation
cspy/algorithms/bidirectional.py BiDirectional._get_direction 31 154.68 4.00 Split out functionality
cspy/algorithms/path_base.py PathBase.get_simple_path 14 157.82 5.35 Split out functionality
tests/tests_grasp.py TestsGRASP.setUp 0 270.10 5.63 Split out functionality
cspy/algorithms/label.py Label.get_new_label 11 147.86 5.77 Split out functionality
tests/tests_issue17.py TestsIssue17.setUp 0 213.33 6.06 Split out functionality

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!

Let us know what you think of it via email or our Gitter!

codecov[bot] commented 3 years ago

Codecov Report

Merging #51 into master will increase coverage by 0.16%. The diff coverage is 97.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   92.87%   93.03%   +0.16%     
==========================================
  Files          22       24       +2     
  Lines        1501     1636     +135     
==========================================
+ Hits         1394     1522     +128     
- Misses        107      114       +7     
Impacted Files Coverage Ξ”
cspy/algorithms/tabu.py 53.84% <80.00%> (-39.49%) :arrow_down:
cspy/algorithms/path_base.py 87.00% <88.88%> (-5.40%) :arrow_down:
cspy/algorithms/greedy_elimination.py 69.23% <90.90%> (+42.14%) :arrow_up:
cspy/algorithms/bidirectional.py 93.39% <92.98%> (+1.53%) :arrow_up:
cspy/algorithms/psolgent.py 97.08% <93.75%> (+1.49%) :arrow_up:
cspy/checking.py 88.00% <94.11%> (+1.33%) :arrow_up:
cspy/algorithms/label.py 95.52% <97.87%> (-0.32%) :arrow_down:
cspy/algorithms/grasp.py 95.83% <100.00%> (+0.18%) :arrow_up:
tests/tests_bidirectional.py 100.00% <100.00%> (+1.51%) :arrow_up:
tests/tests_grasp.py 97.36% <100.00%> (-0.20%) :arrow_down:
... and 14 more

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 1fbc7ee...f68d95f. Read the comment docs.