Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This branch implements best DevOps practice in setting-up code coverage. This is a measurement of how many lines of code are executed while automated tests are running. In this regard, it is a good metric for how much testing is being done and consequently, how much of your code is being checked for errors or failures.
More information is provided on this StackOverflow post.
It uses the covr package.
Typically, this is used alongside software testing.
Changes
The changes made in this PR are:
covr
package added to repo (viaDESCRIPTION
)Check
covr::report()
install.packages(pkgs = c('covr', 'DT'), Ncpus = 1)
Ncpus
argument to the number of cores on your machine to speed up the installation of packages. I usually setNcpus = parallel::detectCores() - 1
so that I have one core left to do other stuff on my machine.Note
Currently are not testing any of our code, so we expect code coverage to be 0%.
This is usually employed alongside testthat.
This branch is rebased off devops/precommit so some of the file changes currently seen in this branch are not actually relevant. They will disappear when #3 gets merged into the main branch.