gesistsa/rang

Executable compenium template

Closed this issue · 8 comments

How about we just use the structure of Turing (rather than inventing something new):

compendium/
├── CITATION
├── code
│   ├── analyse_data.R
│   └── clean_data.R
├── data_clean
│   └── data_clean.csv
├── data_raw
│   ├── datapackage.json
│   └── data_raw.csv
├── Dockerfile
├── figures
│   └── flow_chart.jpeg
├── LICENSE
├── Makefile
├── paper.Rmd
└── README.md

It means that:

  • We copy the materials_dir (assume that it contains data_*, code and paper.Rmd) as the output_dir.
  • Place Dockerfile
  • Create a directory called rang (or even ./inst/rang) and put cache (if cache is TRUE) and rang.R there.
  • In the Dockerfile, just COPY * /*
  • Rewire the current Dockerfile to RUN rang/rang.R
  • Rewire cache to rang/cache in rang/rang.R

I was comparing the compendiums the other day and I also like the Turing way best. Lets go with that one.

Maybe inst/rang is a better idea because we can also cover rrtools. We can just have a function called rang::use_rang() to insert our rang things into a format-independent existing compendium directory. We can also provide a function called rang::use_turing() to generate a basic structure.

Potential features / issues

  • Makefile detection to insert make as a sysreqs
  • How about rrtools' Quarto?
  • Is this real?

I like the use_* approach. eventually one could also implement other compendiums like this. Can you help me understand the "is this real" comment. Is that a GHA to build a docker image?

Quote from the readme

this also creates creates a minimal .yml configuration file to activate continuous integration using GitHub Actions. This will attempt to render your qmd document, in a Docker container specified by your Dockerfile, each time you push to GitHub.

With this default Dockerfile

https://github.com/benmarwick/rrtools/blob/f71bddccf00d124512a8f20a4df08cd5e069f53e/inst/templates/Dockerfile#L1-L22

Too good to be true, e.g. no installation of Quarto CLI. But well, it says "attempt".

oh ok that would be something :-O

Tasks

  • use_rang
  • use_turing create_turing
  • A vignette
  • Integration of apptainer
  • Don't use ... in create_turing