Development¶
Run from a checkout¶
Clone the repository and install the R packages as in Getting started, then start the app from the repository root:
The code is four files: ui.R (the page), server.R (upload, merge and download), utils.R (makeSibling and deriveOutputName, shared by the app and the script) and script.R (the command line).
Test¶
Rscript -e 'install.packages(c("testthat", "XML"), repos = "https://cloud.r-project.org/")'
Rscript -e 'testthat::test_dir("tests/testthat")'
The tests cover deriveOutputName and makeSibling in utils.R. Two makeSibling tests call skip_on_ci(): the XML package's in-place node edits crash with free(): invalid pointer on the CI runners, so those two run only on your machine.
Build the image¶
The image is rocker/shiny:4.6 with the R packages installed and server.R, ui.R, utils.R and www/ copied in, built for linux/amd64 only. script.R and docs/ are not in it.
Every pull request runs test and docker-build from ci.yml, and the strict docs build from docs.yml.
Release¶
- Change the image tag in
docker-compose.ymland in Getting started to the new version, and merge. - Push a tag
vX.Y.Zonmain. Never move an existing tag. - The Release workflow creates the GitHub release with generated notes, pushes
drumsergio/epublangmerger:X.Y.Zandlatestto Docker Hub forlinux/amd64, and copiesREADME.mdto the Docker Hub description.
Docs¶
The site is built by MkDocs Material from docs/ and mkdocs.yml:
The same strict build runs on every pull request, and a push to main that changes the docs deploys the site. How to send a change: CONTRIBUTING.md.