Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue196 #197

Merged
merged 8 commits into from
Aug 20, 2020
Merged

Issue196 #197

merged 8 commits into from
Aug 20, 2020

Conversation

lisphilar
Copy link
Owner

Related issues

This is related to #196

@lisphilar lisphilar added bug Something isn't working development Add tests or refactoring labels Aug 19, 2020
@lisphilar lisphilar added this to the Release CovsirPhy v2.7.1 milestone Aug 19, 2020
@pull-assistant
Copy link

pull-assistant bot commented Aug 19, 2020

Score: 0.92

Best reviewed: commit by commit


Optimal code review plan

     update: change of weights in SIR-F

     refactoring

     update: remove np.average() from scoring

     test

     'Refactored by Sourcery'

     Merge pull request #198 from lisphilar/sourcery/issue196

     test

     update: error description

Powered by Pull Assistant. Last update 08fc6fd ... 1323d26. Read the comment docs.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 20, 2020

Sourcery Code Quality Report (beta)

✅  Merging this PR will increase code quality in the affected files by 0.02 out of 10.

Quality metrics Before After Change
Complexity 0.53 0.54 0.01 🔴
Method Length 67.24 66.64 -0.60 🔵
Quality 8.45 8.47 0.02 🔵
Other metrics Before After Change
Lines 2399 2407 8
Changed files Quality Before Quality After Quality Change
covsirphy/cleaning/jhu_data.py 8.49 8.42 -0.07 🔴
covsirphy/ode/mbase.py 9.28 9.28 0.00
covsirphy/ode/sewirf.py 8.55 8.55 0.00
covsirphy/ode/sir.py 8.83 8.83 0.00
covsirphy/ode/sird.py 8.78 8.78 0.00
covsirphy/ode/sirf.py 8.71 8.71 0.00
covsirphy/ode/sirfv.py 8.42 8.42 0.00
covsirphy/simulation/estimator.py 8.08 8.24 0.16 🔵
covsirphy/simulation/optimize.py 8.53 8.59 0.06 🔵
tests/test_change_finder.py 8.94 8.94 0.00
tests/test_phase_series.py 7.47 7.47 0.00
tests/test_scenario.py 7.74 7.73 -0.01 🔴

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

File Function Complexity Length Overall Recommendation
covsirphy/simulation/optimize.py Optimizer.accuracy 4 289.51 5.12 Split out functionality
covsirphy/simulation/estimator.py Estimator.__init__ 6 217.84 5.42 Split out functionality
tests/test_phase_series.py TestPhaseSeries.test_add_phase 0 276.64 5.59 Split out functionality
covsirphy/simulation/estimator.py Estimator.run 10 159.88 5.69 Split out functionality
covsirphy/cleaning/jhu_data.py JHUData._cleaning 1 241.44 5.72 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 by mentioning @sourcery-ai in a comment.

@codeclimate
Copy link

codeclimate bot commented Aug 20, 2020

Code Climate has analyzed commit 1323d26 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 85.1% (50% is the threshold).

This pull request will bring the total coverage in the repository to 90.0% (0.0% change).

View more on Code Climate.

@lisphilar lisphilar merged commit 5ab7adb into master Aug 20, 2020
@lisphilar lisphilar deleted the issue196 branch August 20, 2020 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working development Add tests or refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant