Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-alhindawi committed Mar 12, 2024
1 parent e08dd57 commit 85d8b24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This template repository provides a way of containerising your R workflows by combining `Docker` and `renv`. This requires an opinionated stack of tools, and as such, I have decided to use the following:

- `OCI container runtime`; the `Dockerfile` and `.devcontainer.json` can be used with any OCI compatible runtime (`podman`) as well as `docker`
- Multi-stage builds to ensure that the resulting image contains all the packages required to run the analysis through the use of the `renv.lock` file format.
- VSCode: for its ability to have plugins and integration with GitHub and cruciallly, with its ability to use `Dev Containers` and work within a container
- `REditorSupport` provides `R` syntax highlighting, viewing plots and tables, as well as `LSP` support for `R` (syntax highlighting, linting, autocompletion).

Expand All @@ -12,9 +11,11 @@ To use this image, follow these steps:

- Click on the green `Use this template` button and create your repository under your own GitHub. During this creation process, you can mark this as Private and thus only you can see your document
- Pull your GitHub repository locally.
- Create a local (on the host) directory where you will store a cache of your libraries, something like: `mkdir -p ~/.renvcache/`
- Edit the `.devcontainer/devcontainer.json` file to point the containerised renv cache to the host folder you've just made
- Open VSCode, make sure you have the `Dev Containers` from Microsoft extensions installed.
- Open the folder where you have cloned the repository. VSCode will prompt you to open this folder with the `Dev Containers` extension.
- Et Viola! You now have a working locally built, CI/CD integrated,
- Et Viola! You now have a working locally built, CI/CD integrated

You can now:
- Modify `src/...` to add your `R` scripts and perform your analysis.
Expand All @@ -26,7 +27,7 @@ You can now:
- Once this completes, you'll have a package release waiting, which you can optionnally make public

## Docker Image
The docker image, as seen in `.devcontainer/Dockerfile` uses `rocker/r-ver` with the `R` version set to `4.3.1`.
The docker image, as seen in `.devcontainer/Dockerfile` uses `rocker/r-ver` with the `R` version set to `4.3.3`.

## Contributing
If you would like to contribute, please fork/fix/pull requests as you see fit. I've provisionally placed the repository under an MIT license.

0 comments on commit 85d8b24

Please sign in to comment.