torressa / cspy

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

Revert to v0.1.1 with new features #49

Closed torressa closed 4 years ago

sourcery-ai[bot] commented 4 years ago

Sourcery Code Quality Report (beta)

❌ Merging this PR will decrease code quality in the affected files by 0.07 out of 10.

Before After Change
Quality 8.48 8.4 -0.07
Complexity 2.03 2.2 0.17
Method Length 59.09 61.76 2.67
Lines 3620 3530 -90
Changed files Quality Before Quality After Quality Change
cspy/checking.py 8.36 8.36 0.0
cspy/algorithms/bidirectional.py 8.39 7.88 -0.51 ⬇️
cspy/algorithms/grasp.py 8.6 8.6 0.0
cspy/algorithms/greedy_elimination.py 8.63 8.63 0.0
cspy/algorithms/label.py 8.82 8.69 -0.13 ⬇️
cspy/algorithms/path_base.py 8.4 8.4 0.0
cspy/algorithms/psolgent.py 8.44 8.44 0.0
cspy/algorithms/tabu.py 8.46 8.46 0.0
docs/conf.py 8.76 8.76 0.0
examples/cgar/algorithm.py 7.48 7.48 0.0
examples/cgar/classes.py 9.42 9.42 0.0
examples/cgar/master.py 7.73 7.73 0.0
examples/cgar/master_gu.py 8.15 8.15 0.0
examples/cgar/read_input.py 8.88 8.88 0.0
examples/cgar/sub.py 6.71 6.71 0.0
examples/cgar/time_space_network.py 8.1 8.1 0.0
examples/jpath/jpath_preprocessing.py 8.0 8.0 0.0
tests/tests_bidirectional.py 8.77 8.72 -0.05 ⬇️
tests/tests_grasp.py 8.53 8.65 0.13 ⬆️
tests/tests_greedy_elimination.py 8.91 8.72 -0.2 ⬇️
tests/tests_issue17.py 8.35 8.07 -0.28 ⬇️
tests/tests_issue20.py 8.26 8.39 0.13 ⬆️
tests/tests_issue22.py 8.23 8.26 0.04 ⬆️
tests/tests_issue25.py 8.72 8.51 -0.21 ⬇️
tests/tests_issue32.py 8.46 8.29 -0.16 ⬇️
tests/tests_issue38.py 9.12 9.09 -0.02 ⬇️
tests/tests_issue41.py 8.67 8.59 -0.08 ⬇️
tests/tests_preprocessing.py 8.44 8.44 0.0
tests/tests_tabu.py 8.54 8.84 0.3 ⬆️

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

File Function Quality Recommendation
examples/cgar/sub.py Subproblem.REF 1.47 Reduce complexity. Split out functionality
examples/cgar/sub.py Subproblem.REF._check_flight 3.43 Split out functionality
cspy/algorithms/bidirectional.py BiDirectional._get_direction 4.0 Split out functionality
examples/cgar/time_space_network.py TSN._edge_weight 4.48 Split out functionality
examples/cgar/time_space_network.py TSN._add_ground_edges 4.51 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 4 years ago

Codecov Report

Merging #49 into dev will decrease coverage by 0.11%. The diff coverage is 96.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev      #49      +/-   ##
==========================================
- Coverage   92.85%   92.74%   -0.12%     
==========================================
  Files          21       24       +3     
  Lines        1469     1598     +129     
==========================================
+ Hits         1364     1482     +118     
- Misses        105      116      +11     
Impacted Files Coverage Δ
tests/tests_preprocessing.py 97.56% <ø> (-0.06%) :arrow_down:
cspy/algorithms/tabu.py 53.84% <83.33%> (-39.58%) :arrow_down:
cspy/algorithms/bidirectional.py 92.70% <90.29%> (+0.43%) :arrow_up:
cspy/checking.py 88.00% <92.59%> (-1.48%) :arrow_down:
cspy/algorithms/psolgent.py 97.08% <93.10%> (+1.45%) :arrow_up:
cspy/algorithms/path_base.py 86.59% <95.00%> (-4.99%) :arrow_down:
cspy/algorithms/label.py 95.65% <98.14%> (+0.19%) :arrow_up:
cspy/algorithms/grasp.py 95.83% <100.00%> (+0.13%) :arrow_up:
cspy/algorithms/greedy_elimination.py 70.58% <100.00%> (+44.05%) :arrow_up:
tests/tests_bidirectional.py 100.00% <100.00%> (+1.51%) :arrow_up:
... and 16 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 b700593...b0427e1. Read the comment docs.