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

increase package-wide unit test coverage #143

Open
brownag opened this issue Jun 24, 2020 · 3 comments
Open

increase package-wide unit test coverage #143

brownag opened this issue Jun 24, 2020 · 3 comments
Assignees
Milestone

Comments

@brownag
Copy link
Member

brownag commented Jun 24, 2020

We can use the {covr} package to see which parts of the codebase need unit tests developed.

I am not sure that this is picking up everything... investigate further perhaps at finer level of detail (i.e. individual exported functions)

By this estimate, we are just below 50% coverage right now.

library(covr)
package_coverage(type="tests")
aqp Coverage: 49.38%
R/AAAA.R: 0.00%
R/accuracy_uncertainty.R: 0.00%
R/addBracket.R: 0.00%
R/aggregateSoilDepth.R: 0.00%
R/checkSPC.R: 0.00%
R/colorContrastPlot.R: 0.00%
R/colorQuantiles.R: 0.00%
R/contrastChart.R: 0.00%
R/depthOf.R: 0.00%
R/depthWeights.R: 0.00%
R/evalGenHz.R: 0.00%
R/f.noise.R: 0.00%
R/factor-level-setters.R: 0.00%
R/get.ml.hz.R: 0.00%
R/getCambicBounds.R: 0.00%
R/glomApply.R: 0.00%
R/group_by.R: 0.00%
R/groupedProfilePlot.R: 0.00%
R/guessGenHzLevels.R: 0.00%
R/hzTransitionProbabilities.R: 0.00%
R/make.segments.R: 0.00%
R/missingDataGrid.R: 0.00%
R/mollicEpipedon.R: 0.00%
R/mostLikelyHzSequence.R: 0.00%
R/mutate.R: 0.00%
R/mutate_profile.R: 0.00%
R/panel.depth_function.R: 0.00%
R/permute_profile.R: 0.00%
R/plot_distance_graph.R: 0.00%
R/plotMultipleSPC.R: 0.00%
R/prepanel.depth_function.R: 0.00%
R/previewColors.R: 0.00%
R/resample.twotheta.R: 0.00%
R/soilPalette.R: 0.00%
R/summarize.R: 0.00%
R/tauW.R: 0.00%
R/test_hz_logic.R: 0.00%
R/texture-low-rv-high.R: 0.00%
R/texture.R: 0.00%

## >0%

R/soilColorSignature.R: 37.50%
R/generalize.hz.R: 44.44%
R/genSlabLabels.R: 52.94%
R/glom.R: 55.24%
R/plotSPC.R: 55.79%
R/estimatePSCS.R: 57.14%
R/SoilProfileCollection-methods.R: 62.73%
R/aggregateColor.R: 65.67%
R/Class-SoilProfileCollection.R: 67.67%
R/slab.R: 68.04%
R/getArgillicBounds.R: 71.08%
R/profile_compare.R: 71.43%
R/SoilProfileCollection-coercion.R: 71.43%
R/unroll.R: 72.73%

## >75%

R/SoilProfileCollection-operators.R: 75.17%
R/guessColumnNames.R: 75.93%
R/rebuildSPC.R: 78.57%
R/SoilProfileCollection-slice-methods.R: 79.49%
R/SoilProfileCollection-iterators.R: 79.63%
R/SoilProfileCollection-setters.R: 81.35%
R/sketch-utils.R: 84.21%
R/random_profile.R: 84.29%
R/denormalize.R: 85.71%
R/split.R: 85.71%
R/getSurfaceHorizonDepth.R: 86.21%
R/get.increase.matrix.R: 86.36%
R/union.R: 86.75%
R/SoilProfileCollection-integrity.R: 88.10%
R/munsell2rgb.R: 88.89%
R/huePosition.R: 91.67%
R/estimateSoilDepth.R: 92.00%
R/SoilProfileCollection-spatial.R: 92.86%
R/soilColorIndices.R: 94.44%
R/addVolumeFraction.R: 94.83%
R/colorContrast.R: 95.83%
R/contrastClass.R: 95.83%
R/evalMissingData.R: 95.83%
R/lunique.R: 96.55%
R/checkHzDepthLogic.R: 96.88%
R/compositeSPC.R: 100.00%
R/explainPlotSPC.R: 100.00%
R/getSoilDepthClass.R: 100.00%
R/sim.R: 100.00%
R/zzz.R: 100.00%
@brownag brownag self-assigned this Jun 24, 2020
@brownag brownag added this to the aqp 2.0 milestone Jun 24, 2020
brownag added a commit that referenced this issue Aug 2, 2020
@brownag
Copy link
Member Author

brownag commented Aug 2, 2020

aqp Coverage: 64.47%
R/aggregateSoilDepth.R: 0.00%
R/colorContrastPlot.R: 0.00%
R/colorQuantiles.R: 0.00%
R/contrastChart.R: 0.00%
R/f.noise.R: 0.00%
R/factor-level-setters.R: 0.00%
R/groupedProfilePlot.R: 0.00%
R/hzBoundary.R: 0.00%
R/invertLabelColor.R: 0.00%
R/make.segments.R: 0.00%
R/missingDataGrid.R: 0.00%
R/mostLikelyHzSequence.R: 0.00%
R/panel.depth_function.R: 0.00%
R/plot_distance_graph.R: 0.00%
R/plotMultipleSPC.R: 0.00%
R/prepanel.depth_function.R: 0.00%
R/previewColors.R: 0.00%
R/resample.twotheta.R: 0.00%
R/segment.R: 0.00%
R/soilPalette.R: 0.00%
R/tauW.R: 0.00%
R/test_hz_logic.R: 0.00%
R/texture-low-rv-high.R: 0.00%
R/texture.R: 0.00%
R/soilColorSignature.R: 37.50%
R/plotSPC.R: 44.16%
R/generalize.hz.R: 44.44%
R/SoilProfileCollection-methods.R: 61.94%
R/group_by.R: 70.00%
R/SoilProfileCollection-coercion.R: 71.43%
R/profile_compare.R: 71.62%
R/unroll.R: 72.73%
R/enforce_df_class.R: 78.57%
R/SoilProfileCollection-slice-methods.R: 79.49%
R/union.R: 79.84%
R/sketch-utils.R: 80.43%
R/SoilProfileCollection-operators.R: 81.93%
R/mollicEpipedon.R: 82.02%
R/getArgillicBounds.R: 82.22%
R/SoilProfileCollection-setters.R: 84.65%
R/summarize.R: 84.85%
R/glomApply.R: 85.71%
R/random_profile.R: 85.71%
R/slab.R: 86.60%
R/glom.R: 86.72%
R/addBracket.R: 87.50%
R/aggregateColor.R: 88.06%
R/munsell2rgb.R: 88.89%
R/rebuildSPC.R: 88.89%
R/Class-SoilProfileCollection.R: 88.95%
R/getSurfaceHorizonDepth.R: 89.66%
R/mutate.R: 90.00%
R/permute_profile.R: 90.14%
R/evalGenHz.R: 90.70%
R/get.increase.matrix.R: 90.91%
R/huePosition.R: 91.67%
R/estimateSoilDepth.R: 92.00%
R/hzTransitionProbabilities.R: 92.50%
R/guessColumnNames.R: 92.86%
R/SoilProfileCollection-spatial.R: 92.86%
R/genSlabLabels.R: 94.12%
R/mutate_profile.R: 94.12%
R/estimatePSCS.R: 95.24%
R/split.R: 95.24%
R/colorContrast.R: 95.83%
R/evalMissingData.R: 95.83%
R/lunique.R: 96.55%
R/get.ml.hz.R: 97.14%
R/getCambicBounds.R: 97.96%
R/AAAA.R: 100.00%
R/accuracy_uncertainty.R: 100.00%
R/addVolumeFraction.R: 100.00%
R/checkHzDepthLogic.R: 100.00%
R/checkSPC.R: 100.00%
R/compositeSPC.R: 100.00%
R/contrastClass.R: 100.00%
R/denormalize.R: 100.00%
R/depthOf.R: 100.00%
R/depthWeights.R: 100.00%
R/explainPlotSPC.R: 100.00%
R/getSoilDepthClass.R: 100.00%
R/guessGenHzLevels.R: 100.00%
R/sim.R: 100.00%
R/soilColorIndices.R: 100.00%
R/SoilProfileCollection-integrity.R: 100.00%
R/SoilProfileCollection-iterators.R: 100.00%
R/zzz.R: 100.00%

@dylanbeaudette
Copy link
Member

dylanbeaudette commented Jan 3, 2022

Update:

aqp Coverage: 68.21%
R/allocate.R: 0.00%
R/colorChart.R: 0.00%
R/colorContrastPlot.R: 0.00%
R/contrastChart.R: 0.00%
R/factor-level-setters.R: 0.00%
R/groupedProfilePlot.R: 0.00%
R/hzBoundary.R: 0.00%
R/mostLikelyHzSequence.R: 0.00%
R/panel.depth_function.R: 0.00%
R/plot_distance_graph.R: 0.00%
R/plotColorMixture.R: 0.00%
R/plotMultipleSPC.R: 0.00%
R/previewColors.R: 0.00%
R/slicedHSD.R: 0.00%
R/soilPalette.R: 0.00%
R/tauW.R: 0.00%
R/generalize.hz.R: 44.44%
R/texture.R: 48.59%
R/similarMunsellChips.R: 55.56%
R/depthOf.R: 59.14%
R/HzDepthLogicSubset.R: 62.50%
R/SoilProfileCollection-coercion.R: 64.29%
R/prepanel.depth_function.R: 64.71%
R/soilColorSignature.R: 65.42%
R/glom.R: 66.46%
R/plotSPC.R: 67.54%
R/SoilProfileCollection-methods.R: 67.69%
R/combine.R: 68.48%
R/profile_compare.R: 71.62%
R/unroll.R: 73.68%
R/getArgillicBounds.R: 74.55%
R/findOverlap-fixOverlap.R: 74.58%
R/bootstrapSoilTexture.R: 76.74%
R/group_by.R: 77.78%
R/enforce_df_class.R: 78.57%
R/SoilProfileCollection-slice-methods.R: 80.49%
R/mutate_profile.R: 80.56%
R/mollicEpipedon.R: 80.65%
R/missingDataGrid.R: 80.85%
R/alignTransect.R: 81.25%
R/L1_profiles.R: 82.35%
R/Class-SoilProfileCollection.R: 83.05%
R/split.R: 83.33%
R/mixMunsell.R: 84.03%
R/SoilProfileCollection-operators.R: 84.80%
R/perturb.R: 84.82%
R/glomApply.R: 85.71%
R/random_profile.R: 85.71%
R/colorQuantiles.R: 86.32%
R/parseMunsell.R: 86.44%
R/accumulateDepths.R: 86.59%
R/SoilProfileCollection-setters.R: 87.40%
R/harmonize.R: 87.88%
R/addBracket.R: 87.93%
R/rebuildSPC.R: 88.00%
R/SoilProfileCollection-spatial.R: 88.00%
R/munsell2rgb.R: 88.06%
R/slab.R: 88.29%
R/PMS2Munsell.R: 88.89%
R/repairMissingHzDepths.R: 89.47%
R/huePosition.R: 90.00%
R/aggregateColor.R: 90.36%
R/dice.R: 90.48%
R/guessColumnNames.R: 90.62%
R/summarize.R: 90.62%
R/get.increase.matrix.R: 90.91%
R/transform.R: 90.91%
R/estimateSoilDepth.R: 91.67%
R/estimateAWC.R: 92.00%
R/evalGenHz.R: 92.00%
R/hzTransitionProbabilities.R: 92.50%
R/aggregateSoilDepth.R: 92.59%
R/spc2mpspline.R: 92.73%
R/estimatePSCS.R: 93.55%
R/SoilProfileCollection-metadata.R: 93.98%
R/genSlabLabels.R: 94.12%
R/sketch-utils.R: 94.52%
R/simulateColor.R: 94.55%
R/getClosestMunsellChip.R: 94.74%
R/textureTriangleSummary.R: 94.87%
R/segment.R: 94.92%
R/splitLogicErrors.R: 95.45%
R/profileInformationIndex.R: 95.65%
R/evalMissingData.R: 95.83%
R/colorContrast.R: 96.30%
R/getSoilDepthClass.R: 96.43%
R/soilColorIndices.R: 96.43%
R/lunique.R: 96.55%
R/SoilProfileCollection-iterators.R: 96.88%
R/SoilProfileCollection-integrity.R: 97.30%
R/get.ml.hz.R: 97.73%
R/getCambicBounds.R: 97.96%
R/checkHzDepthLogic.R: 98.36%
R/getSurfaceHorizonDepth.R: 98.36%
R/AAAA.R: 100.00%
R/accuracy_uncertainty.R: 100.00%
R/addVolumeFraction.R: 100.00%
R/checkSPC.R: 100.00%
R/compositeSPC.R: 100.00%
R/contrastClass.R: 100.00%
R/datadots.R: 100.00%
R/denormalize.R: 100.00%
R/depthWeights.R: 100.00%
R/duplicate.R: 100.00%
R/explainPlotSPC.R: 100.00%
R/fillHzGaps.R: 100.00%
R/getLastHorizonID.R: 100.00%
R/guessGenHzLevels.R: 100.00%
R/huePositionCircle.R: 100.00%
R/invertLabelColor.R: 100.00%
R/sim.R: 100.00%
R/spec2Munsell.R: 100.00%
R/zzz.R: 100.00%

@dylanbeaudette
Copy link
Member

Just those without 100% coverage.

aqp Coverage: 69.80%
R/allocate.R: 0.00%
R/colorChart.R: 0.00%
R/colorContrastPlot.R: 0.00%
R/compareSites.R: 0.00%
R/contrastChart.R: 0.00%
R/groupedProfilePlot.R: 0.00%
R/mostLikelyHzSequence.R: 0.00%
R/panel.depth_function.R: 0.00%
R/plot_distance_graph.R: 0.00%
R/plotColorMixture.R: 0.00%
R/plotMultipleSPC.R: 0.00%
R/previewColors.R: 0.00%
R/slicedHSD.R: 0.00%
R/soilPalette.R: 0.00%
R/tauW.R: 0.00%
R/similarMunsellChips.R: 51.72%
R/SoilProfileCollection-spatial.R: 52.38%
R/texture.R: 55.78%
R/segment.R: 59.22%
R/plotSPC.R: 59.89%
R/addBracket.R: 60.34%
R/factor-level-setters.R: 63.64%
R/soilColorSignature.R: 64.04%
R/prepanel.depth_function.R: 64.71%
R/SoilProfileCollection-coercion.R: 65.12%
R/SoilProfileCollection-methods.R: 65.93%
R/rebuildSPC.R: 68.57%
R/glom.R: 68.75%
R/huePositionCircle.R: 68.97%
R/generalize.hz.R: 69.77%
R/combine.R: 70.06%
R/profile_compare.R: 71.71%
R/unroll.R: 73.68%
R/findOverlap-fixOverlap.R: 74.58%
R/bootstrapSoilTexture.R: 76.74%
R/groupSPC.R: 77.78%
R/enforce_df_class.R: 78.57%
R/missingDataGrid.R: 80.85%
R/alignTransect.R: 81.25%
R/sketch-utils.R: 81.40%
R/L1_profiles.R: 82.61%
R/split.R: 83.33%
R/Class-SoilProfileCollection.R: 83.52%
R/slab-utils.R: 83.72%
R/depthOf.R: 84.16%
R/reduce.R: 84.62%
R/SoilProfileCollection-operators.R: 84.92%
R/mixMunsell.R: 85.11%
R/SoilProfileCollection-slice-methods.R: 85.33%
R/glomApply.R: 85.71%
R/random_profile.R: 85.71%
R/slab.R: 85.90%
R/hzOffset.R: 86.05%
R/colorQuantiles.R: 86.32%
R/get.increase.matrix.R: 86.36%
R/parseMunsell.R: 86.89%
R/SoilProfileCollection-setters.R: 87.40%
R/HzDepthLogicSubset.R: 87.50%
R/harmonize.R: 87.88%
R/munsell2rgb.R: 88.41%
R/NCSP.R: 89.13%
R/mutate_profile.R: 89.29%
R/accumulateDepths.R: 89.87%
R/huePosition.R: 90.00%
R/perturb.R: 90.00%
R/aggregateColor.R: 90.36%
R/guessColumnNames.R: 90.62%
R/summarize.R: 90.62%
R/reaction.R: 90.91%
R/transform.R: 90.91%
R/dice.R: 91.67%
R/evalGenHz.R: 92.00%
R/repairMissingHzDepths.R: 92.00%
R/hzTransitionProbabilities.R: 92.50%
R/aggregateSoilDepth.R: 92.59%
R/explainPlotSPC.R: 93.75%
R/estimateAWC.R: 94.23%
R/simulateColor.R: 94.55%
R/mollicEpipedon.R: 94.68%
R/textureTriangleSummary.R: 94.87%
R/estimatePSCS.R: 94.94%
R/accuracy_uncertainty.R: 95.24%
R/splitLogicErrors.R: 95.45%
R/profileInformationIndex.R: 95.65%
R/estimateSoilDepth.R: 95.83%
R/evalMissingData.R: 95.83%
R/get.ml.hz.R: 96.00%
R/SoilProfileCollection-metadata.R: 96.04%
R/colorContrast.R: 96.30%
R/getClosestMunsellChip.R: 96.43%
R/getSoilDepthClass.R: 96.43%
R/soilColorIndices.R: 96.43%
R/lunique.R: 96.55%
R/SoilProfileCollection-iterators.R: 96.97%
R/getCambicBounds.R: 97.01%
R/spec2Munsell.R: 97.14%
R/SoilProfileCollection-integrity.R: 97.30%
R/getArgillicBounds.R: 97.50%
R/spc2mpspline.R: 97.67%
R/fillHzGaps.R: 98.18%
R/getSurfaceHorizonDepth.R: 98.18%
R/checkHzDepthLogic.R: 98.36%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants