jamalsenouci / causalimpact

Python port of CausalImpact R library
Apache License 2.0
262 stars 62 forks source link

Full covery unittests #15

Closed WillianFuks closed 4 years ago

WillianFuks commented 5 years ago

Hello Jamal,

I'd like to propose this contribution to your repository. It's nothing new, the intent was to cover the whole code with unit tests.

I tried for the most part to just change the testing files and leave the main source as untouched as possible; when the tests showed something wrong then I made some modifications (there were a few bugs that have been eliminated in the testing process).

I plan on adding p-value computation next, please let me know what you think or if you want anything changed. If everything looks good them I'll start some new development :)!

(sorry for having 2 users of mine, I switched machines between work and home and ended up leaving both in history.)

Regards,

Will

codecov-io commented 5 years ago

Codecov Report

Merging #15 into master will increase coverage by 34.71%. The diff coverage is 97.91%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #15       +/-   ##
===========================================
+ Coverage   60.12%   94.84%   +34.71%     
===========================================
  Files           8        5        -3     
  Lines         632      407      -225     
  Branches       98       72       -26     
===========================================
+ Hits          380      386        +6     
+ Misses        222       12      -210     
+ Partials       30        9       -21
Impacted Files Coverage Δ
causalimpact/analysis.py 94.82% <100%> (+58.97%) :arrow_up:
causalimpact/misc.py 100% <100%> (ø) :arrow_up:
causalimpact/inferences.py 96.29% <100%> (+9.25%) :arrow_up:
causalimpact/model.py 88.23% <87.5%> (+38.23%) :arrow_up:
causalimpact/tests/test.py

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 67aca3a...19c7975. Read the comment docs.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+32.5%) to 96.57% when pulling 19c7975c7cd6dd23b53862f7223df24d16b0c31f on WillianFuks:full_covery_unittests into 67aca3a347e84165bfc3454f76fc1f16550cd897 on jamalsenouci:master.

jamalsenouci commented 4 years ago

merged into master