From 2248df790273e1b587ef5d79fa0e632802df092e Mon Sep 17 00:00:00 2001 From: robjmcgibbon <robjmcgibbon@gmail.com> Date: Tue, 27 May 2025 14:01:31 +0200 Subject: [PATCH] Generate docs --- .gitignore | 1 + make_page.sh | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 4 ++++ 3 files changed, 56 insertions(+) create mode 100755 make_page.sh diff --git a/.gitignore b/.gitignore index 544034f..4559873 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ data/pubs.yaml gallery/* user_map/* +swift/* diff --git a/make_page.sh b/make_page.sh new file mode 100755 index 0000000..ed86b1a --- /dev/null +++ b/make_page.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Tested on winkel.strw.leidenuniv.nl +module purge +module load localhosts + +# Uncomment to create new venv +#python -m venv venv +source venv/bin/activate + +pip install -r requirements.txt + +# TODO Remove +#git checkout user_map +git pull +rm -r gallery +cp -r /home/mcgibbon/public_html/SWIFT/webpage_image_gallery gallery +python query.py rLY4HeXMXttDOSedTGrYuRufATu2gDwgE84Hqy3B +python generate_map.py +python compiler.py +rsync -auv compiled/* ../ + +[ ! -d "swift" ] && git clone "git@gitlab.cosma.dur.ac.uk:swift/swiftsim.git" "swift" +cd swift +git checkout master +git pull +# Generate read the docs +cd doc/RTD +rm -rf build +make html > docbuild.out 2> docbuild.err +# Generate onboarding guide +cd ../onboardingGuide +rm -rf build +make latexpdf > onbuild.out 2> onbuild.err +# Copy both to webpage +cd ../../.. +rm -rf ../docs/* +cp -r swift/doc/RTD/build/html/ ../docs +cp swift/doc/onboardingGuide/build/latex/onboarding.pdf ../onboarding.pdf + +# Generate read the docs for the zoom branch +cd swift +git checkout zoom_docs +git pull +cd doc/RTD +rm -rf build +make html > docbuild.out 2> docbuild.err +cd ../../.. +rm -rf ../docs_will/* +cp -r swift/doc/RTD/build/html/ ../docs_will + diff --git a/requirements.txt b/requirements.txt index 62bf977..a8ea3b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,10 @@ +# Required for SWIFTweb pyyaml jinja2 mistune python-dateutil myads bokeh + +# Required for swift docs +sphinx_rtd_theme -- GitLab