alan-turing-institute / bio-Turing-Way

Experimenting with JupyterBooks, Sphinx, and training materials for biomed/life sciences from the Turing Way.
https://the-turing-way-personas.netlify.app/welcome
Other
4 stars 5 forks source link

Fix Issue 12 and add Pre-Commit checks #14

Closed Iain-S closed 2 years ago

Iain-S commented 2 years ago

There is a bug (closes #12) where large directories could be generated if you ran main.py multiple times. To fix this, and to remove the need to call jupyter-book build mybook/ before calling main.py build mybook/ we have changed to this order of operations:

  1. call jupyter-book clean mybook/ to empty mybook/_build.
  2. build all of the new additions
    1. copy mybook/ to mybook_profile-name/
    2. jupyter-book build mybook_profile-name/
    3. copy mybook_profile-name/_build/html to mybook/_build/html/editions (making that folder if it doesn't already exist)
  3. build the main book with jupyter-book build mybook/

This PR also contains the .pre-commit.yml config file for Git pre-commit checks (also executed as a CI job).

Iain-S commented 2 years ago

The branch was incorrectly named issue-18 when it actually addresses issue 12.