Skip to content

Content Aggregation System for tutorials and vignette of reproducible computational methods.

Notifications You must be signed in to change notification settings

GESIS-Methods-Hub/andrew

Repository files navigation

andrew

andrew (Aggregator for Navigatable Discoverable Reproducible and Educational work) is designed to speed up the creation of a static website with pages from a collection of tutorials or vignette of transparent analytic computational methods. This is inspired by the feed aggregator Planet. Tutorials and vignette must be reproducible and, to enforce it, andrew executes the calculations presents in Jupyter Notebooks and R Markdown files in an container.

The curation of tutorials or vignette that is included in the static website can be done using a sibling project or manually editting the CSV files.

Workflow diagram ilustrating how andrew works.

The collection is organised in two levels.

Screenshot of demo showing the content of the "root".

Screenshot of demo showing the content of a 1st level collection.

Screenshot of demo showing the content of of a 2nd level collection.

Screenshot of demo showing one document in the collection.

Dependencies

  • Docker
    • a) add andrew as a docker user so it does not need superuser privilege
    • b) alternatively: install rootless docker. In this case you need to set docker_host in the config.yaml or config_minimal.yaml
  • Quarto >= 1.3
  • R == 4.2.3 (for remote Intellij development)
  • Python

Dependencies installation

We recommend use mamba to install the dependencies. A step by step is available at the Contribution Guide.

Install andrew

Rscript -e "devtools::install('GESIS-Methods-Hub/andrew')"

How to Build the Demo Website

Rscript -e "andrew::main(source_dir='demo')"

Similar Projects

Developer Notes

The file main.R is the entrypoint for the pipeline. It consist of the following steps:

  • downloading (cloning the repositories) in download_contributions.R. They will be stored in the repository names without underscore.
  • compiling the contributions to markdown and removing all dynamic elements (should be static md afterwards). This is done in render_contributions.
    1. create a docker container depending on the needs (python R etc.)
    2. run compilation scripts in the container (inst/dockerscripts) to map the different repository types and entry points
    3. copy/using valumes to move the resulting static markdown to the repositories with underscore.
  • automatically create a quarto structure for composing the different repositories into one website

Using start.R for Debugging

The start.R script assumes that your conda env is called base and it needs you to set the working dir in line 5

setwd("/home/dehnejn/gitlab/andrew")

Using start_minimal.R for Running the minimal example

In the directory minimal_example there is a pipeline to build only one tool to test the process. It does not fulfill all the requirements of the main pipeline but it is a faster way of testing new tool integration.

Deployment

  • deploy.sh deploys andrew to the local webserver
  • deploy_minimal.sh deploys the minimal example to the webserver