cambiotraining / stats-glm

https://cambiotraining.github.io/stats-glm/
Other
1 stars 1 forks source link
generalised-linear-models python-programming r-programming statistics

Course Template Repository

This repository contains a template for our courses, which are built using Quarto.

Training Developers

See our course template page for guidelines on setup, how to render the course site, how files/directories are organised, and what the conventions used for lesson content.


Maintainers (Bioinformatics Training Team)

Starting a New Course Repository

Converting an existing repository

If you already have course materials using a different template and want to use this template instead, you will need to copy some files to your existing repository.
This will vary depending on the specific template you were using, but the easiest might be to basically start from scratch. Here is a potential workflow:

Maintaining the Repository

Clean-up frozen HTML files

We use the _freeze feature of Quarto to ensure that the site builds successfully (without the need to manage complicated software dependencies). With time, this directory may become large and it might be a good idea to purge its history (as it's not really needed for versioning). We can use the BFG Repo-Cleaner to retain only the latest commit of those files.
You can easily install BFG with conda install -c conda-forge bfg or brew install bfg.

To purge the _freeze history, make a fresh clone of the repository and run:

bfg --delete-folders _freeze
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push --force

After this, the _freeze directory will have no history (only the latest commit). This should shrink the repository size, especially for courses with lots of plotting output.

:warning: Important:

Update course template

If there are changes to our course template format (e.g. the CSS themes are updated), you can propagate these changes by running quarto update extension cambiotraining/quarto-course-template.

:interrobang: Note: not sure that a fresh re-render is actually needed - the _freeze folder doesn't hold the html files themselves, only the output from code chunks (such as .png files, etc.). This needs to be double-checked, but leaving the instructions below for reference.

If you do this, you will need to re-render the whole website:

git rm -r _freeze
quarto render
git add _freeze
git commit -m "fresh website render"

Note: you may want to purge the history of the _freeze directory after doing a full website re-render (see above).