Container for local development of all things R in MicrobiomeDB.
Let's say we wanted to work on the plot.data package.
- Run
make build
to build the docker image that contains all packages necessary for development. - Run
make start-shell
to start an interactive R session within the development container. R should start automatically and the output should end with something like the following
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>
- Now we're ready to load and/or install MicrobiomeDB packages. If we want to work on the main package, MicrobiomeDB, for example run
load_all([path-to-MicrobiomeDB])
. You may first need to load any dependencies you haven't chosen to install in the Dockerfile. - Make changes to the package, reload changes with
load_all('MicrobiomeDB')
(or other package nameor location). - Once you're happy with the changes, run all the testthat changes using
devtools::test('MicrobiomeDB')
. Alternatively, run all the tests in one file usingtest_file
. - All done? Quit using
quit()
.
NOTE: Keep in mind that you still need to make a PR against the package you're developing and once GitHub Actions are passing ask for a review.