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

Plan improvements to test coverage (Was: Example coverage test results) #150

Open
mortisflux opened this issue Aug 5, 2020 · 5 comments
Labels
Milestone

Comments

@mortisflux
Copy link

mortisflux commented Aug 5, 2020

Example coverage

Issue summary:

One of our goals has been to 1) make sure all examples run, and 2) look at example coverage. Implementing covr::package_coverage(type = c("examples")) is the function that allows us to do this. I'm happy to report that all examples appear to running on the roxygen2_documentation_v2 branch (yay!).

The report below details example coverage for future reference (and apologies for the output dump!). I'll look into GitHub workflows that can automate this in the future to try and give a nicer report. There is a GitHub action for this that I'm going to try to implement this afternoon: https://github.com/r-lib/actions/tree/master/examples#test-coverage-workflow (hopefully it will run examples?)

Overall hydromad package example coverage: 60.01%
R/cmd_unstable.R: 0.00%
R/eigenplot.R: 0.00%
R/evalRSM.R: 0.00%
R/eval_fdc.R: 0.00%
R/expuh3s.sim.R: 0.00%
R/fitByCMAES.R: 0.00%
R/fitByNsga2.R: 0.00%
R/fitByOptim1.R: 0.00%
R/fitDbmToPeaks.R: 0.00%
R/lambda.inverse.fit.R: 0.00%
R/lambda.inverse.sim.R: 0.00%
R/lambda.sim.R: 0.00%
R/ltv.R: 0.00%
R/maexpuh.R: 0.00%
R/prefilters.R: 0.00%
R/simhyd.R: 0.00%
R/tryModelOrders.R: 0.00%
R/xyplot.runlist.R: 0.00%
R/zzz.R: 0.00%
src/simhyd.cpp: 0.00%
R/expuh.fit.R: 5.19%
R/hydromad.stats.R: 16.61%
R/options.R: 20.93%
src/inversefilter.c: 31.88%
R/evalPars.R: 35.42%
R/evalParsRollapply.R: 42.11%
R/crossValidate.R: 44.64%
R/armax.inverse.fit.R: 44.97%
R/utilities.R: 46.38%
R/paretoObjectivesVaryWeights.R: 47.83%
R/cmd.R: 51.32%
R/buildTsObjective.R: 52.17%
src/cmd.c: 56.41%
R/armax.inverse.sim.R: 57.55%
R/tellTS.R: 60.38%
R/tfUtils.R: 60.45%
R/armax.sriv.fit.R: 60.75%
R/objFunVal.R: 61.62%
src/riv.c: 62.69%
R/estimateDelayFrac.R: 63.64%
R/fitByOptim.R: 63.89%
R/dbm.R: 64.29%
R/bucket.R: 66.67%
R/snow.R: 66.67%
R/expuh.sim.R: 67.09%
R/powuh.sim.R: 68.18%
R/runlist.R: 68.67%
R/hydromad.parallel.R: 69.23%
R/awbm.R: 72.46%
src/fland1.c: 74.11%
R/gr4j.R: 74.66%
R/armax.ls.fit.R: 75.00%
R/defineFeasibleSet.R: 75.76%
R/areModelsDominated.R: 76.47%
R/swimp.R: 76.47%
R/fitByDDS.R: 76.79%
R/simulate.hydromad.R: 77.55%
R/events.R: 77.78%
R/poweroid.R: 78.16%
R/filter_loss.R: 78.26%
R/hydromad.object.R: 78.83%
R/xyplot.hydromad.R: 78.89%
R/summary.hydromad.R: 79.46%
R/panel.ribbon.R: 80.77%
R/fitBySampling.R: 81.08%
R/nseStat.R: 81.36%
R/tf.R: 81.68%
R/cwi.R: 82.35%
R/runoffratio.R: 82.61%
R/predict.hydromad.R: 83.85%
R/sacramento.R: 83.87%
R/coef.hydromad.R: 84.31%
R/paretoCatchments.R: 84.35%
R/filter_tv.R: 85.71%
R/scalar.R: 85.71%
R/update.hydromad.R: 86.74%
R/paretoObjectivesNsga2.R: 86.84%
R/event.xyplot.hydromad.R: 86.96%
R/fitByDream.R: 87.80%
R/fitBySCE.R: 89.13%
R/estimateDelay.R: 89.47%
R/fitByDE.R: 90.24%
R/sce.R: 91.02%
R/routingfit.R: 91.43%
R/optimtrace.R: 93.18%
R/rotatedSampling.R: 93.75%
R/convertFlow.R: 93.85%
R/rollccf.R: 94.12%
R/nseVarTd.R: 94.44%
src/swimp.c: 95.45%
R/ParetoFiltering.R: 95.74%
R/event.xyplot.R: 96.88%
R/paretoTimeAnalysis.R: 97.06%
R/armax.sim.R: 97.78%
R/parameterSets.R: 98.28%
R/deconvolution.uh.R: 100.00%
R/findUnivariateBounds.R: 100.00%
R/hydromad.R: 100.00%
R/intensity.R: 100.00%
R/lagFrac.R: 100.00%
R/leakyExpStore.R: 100.00%
R/splitData.R: 100.00%
src/awbm.c: 100.00%
src/bucket.c: 100.00%
src/filters.c: 100.00%
src/gr4j.c: 100.00%
src/hydromad-init.c: 100.00%
src/sacramento.c: 100.00%
src/sacramento_state.c: 100.00%
src/snow.c: 100.00%

@jnothman
Copy link

jnothman commented Aug 5, 2020

Is this example coverage only, or union of example + test coverage?

@mortisflux
Copy link
Author

This is example coverage only.

@jnothman
Copy link

jnothman commented Aug 5, 2020

Is it possible to get combined coverage stats?

@mortisflux
Copy link
Author

Yup! I ran covr::package_coverage(type = c("examples", "tests")) and got the following:

** hydromad Coverage: 66.33% (examples + tests) **
R/cmd_unstable.R: 0.00%
R/eigenplot.R: 0.00%
R/evalRSM.R: 0.00%
R/eval_fdc.R: 0.00%
R/expuh3s.sim.R: 0.00%
R/fitDbmToPeaks.R: 0.00%
R/lambda.inverse.fit.R: 0.00%
R/lambda.inverse.sim.R: 0.00%
R/lambda.sim.R: 0.00%
R/ltv.R: 0.00%
R/maexpuh.R: 0.00%
R/prefilters.R: 0.00%
R/tryModelOrders.R: 0.00%
R/xyplot.runlist.R: 0.00%
R/zzz.R: 0.00%
R/expuh.fit.R: 5.19%
R/hydromad.stats.R: 16.61%
R/options.R: 20.93%
src/inversefilter.c: 31.88%
R/evalPars.R: 35.42%
R/evalParsRollapply.R: 42.11%
R/crossValidate.R: 44.64%
R/armax.inverse.fit.R: 44.97%
R/utilities.R: 46.38%
R/paretoObjectivesVaryWeights.R: 47.83%
R/buildTsObjective.R: 52.17%
R/tellTS.R: 60.38%
R/armax.sriv.fit.R: 60.75%
src/riv.c: 62.69%
R/estimateDelayFrac.R: 63.64%
R/fitByOptim.R: 63.89%
R/dbm.R: 64.29%
R/objFunVal.R: 67.68%
R/powuh.sim.R: 68.18%
R/runlist.R: 68.67%
R/armax.inverse.sim.R: 68.87%
R/hydromad.parallel.R: 69.23%
R/simhyd.R: 70.21%
src/cmd.c: 74.36%
R/armax.ls.fit.R: 75.00%
R/tfUtils.R: 75.14%
R/defineFeasibleSet.R: 75.76%
R/areModelsDominated.R: 76.47%
R/swimp.R: 76.47%
R/fitByDDS.R: 76.79%
R/poweroid.R: 78.16%
R/hydromad.object.R: 78.83%
R/xyplot.hydromad.R: 78.89%
R/summary.hydromad.R: 79.46%
R/panel.ribbon.R: 80.77%
R/fitBySampling.R: 81.08%
R/nseStat.R: 81.36%
R/cmd.R: 81.58%
R/simulate.hydromad.R: 81.63%
R/tf.R: 81.68%
R/runoffratio.R: 82.61%
R/snow.R: 83.33%
R/predict.hydromad.R: 83.85%
R/sacramento.R: 83.87%
R/coef.hydromad.R: 84.31%
R/cwi.R: 84.31%
R/paretoCatchments.R: 84.35%
R/events.R: 85.35%
R/scalar.R: 85.71%
R/paretoObjectivesNsga2.R: 86.84%
R/event.xyplot.hydromad.R: 86.96%
src/fland1.c: 87.05%
R/fitByDream.R: 87.80%
R/update.hydromad.R: 88.40%
R/fitByCMAES.R: 88.64%
R/fitBySCE.R: 89.13%
R/bucket.R: 89.39%
R/estimateDelay.R: 89.47%
R/fitByNsga2.R: 89.74%
R/fitByDE.R: 90.24%
R/fitByOptim1.R: 90.91%
R/routingfit.R: 91.43%
R/sce.R: 91.43%
R/expuh.sim.R: 92.41%
R/optimtrace.R: 93.18%
R/filter_loss.R: 93.48%
R/rotatedSampling.R: 93.75%
R/gr4j.R: 93.84%
R/rollccf.R: 94.12%
R/awbm.R: 94.20%
R/nseVarTd.R: 94.44%
src/swimp.c: 95.45%
R/ParetoFiltering.R: 95.74%
R/event.xyplot.R: 96.88%
R/convertFlow.R: 96.92%
R/paretoTimeAnalysis.R: 97.06%
R/armax.sim.R: 97.78%
R/parameterSets.R: 98.28%
R/deconvolution.uh.R: 100.00%
R/filter_tv.R: 100.00%
R/findUnivariateBounds.R: 100.00%
R/hydromad.R: 100.00%
R/intensity.R: 100.00%
R/lagFrac.R: 100.00%
R/leakyExpStore.R: 100.00%
R/splitData.R: 100.00%
src/awbm.c: 100.00%
src/bucket.c: 100.00%
src/filters.c: 100.00%
src/gr4j.c: 100.00%
src/hydromad-init.c: 100.00%
src/sacramento.c: 100.00%
src/sacramento_state.c: 100.00%
src/simhyd.cpp: 100.00%
src/snow.c: 100.00%

@josephguillaume
Copy link
Collaborator

Coverage CI merged in #151

@josephguillaume josephguillaume changed the title Example coverage test results Plan improvements to test coverage (Was: Example coverage test results) Aug 10, 2020
@josephguillaume josephguillaume added this to the 1.0 milestone Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants