From f41827650b3cf60a7df2a6505c59fdaf6966283f Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 29 Nov 2023 12:38:05 +0100 Subject: [PATCH] update docs / workflow --- .github/workflows/test_doc.yml | 4 ++-- documentation/README.md | 8 +------- scripts/run-sphinx-hasenv.sh | 17 ----------------- scripts/run-sphinx.sh | 16 ---------------- 4 files changed, 3 insertions(+), 42 deletions(-) delete mode 100755 scripts/run-sphinx-hasenv.sh delete mode 100755 scripts/run-sphinx.sh diff --git a/.github/workflows/test_doc.yml b/.github/workflows/test_doc.yml index 07e0afdcc8..ca4766c5eb 100644 --- a/.github/workflows/test_doc.yml +++ b/.github/workflows/test_doc.yml @@ -67,10 +67,10 @@ jobs: sudo apt-get update \ && sudo apt-get install -y \ pandoc \ - python3-venv + && pip install tox - name: Set up SWIG uses: ./.github/actions/setup-swig - name: Run sphinx - run: scripts/run-sphinx.sh + run: tox -e doc diff --git a/documentation/README.md b/documentation/README.md index af9f33320e..eece1de90e 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -12,7 +12,7 @@ The legacy GitHub Pages URL https://amici-dev.github.io/AMICI/ is set up as a redirect to RTD. The main configuration file is `documentation/conf.py` and the documentation -is generated using `scripts/run-sphinx.sh`. The documentation is written to +is generated using `tox -e doc`. The documentation is written to `documentation/_build/`. The documentation comprises: @@ -50,12 +50,6 @@ Matlab documentation is processed by [mtoc++](https://www.morepas.org/software/mtocpp/docs/tools.html). This is configured in `matlab/mtoc/config`. -#### Python documentation - -Python documentation is processed by doxygen and doxypypy using the script and -filters in `scripts/`. - - ## Writing documentation ### Out-of-source documentation diff --git a/scripts/run-sphinx-hasenv.sh b/scripts/run-sphinx-hasenv.sh deleted file mode 100755 index e401737022..0000000000 --- a/scripts/run-sphinx-hasenv.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Build the sphinx documentation in an environment prepared -# as in run-sphinx.sh already - -SCRIPT_PATH=$(dirname $BASH_SOURCE) -AMICI_PATH=$(cd $SCRIPT_PATH/.. && pwd) - -source ${AMICI_PATH}/doc-venv/bin/activate - -cd ${AMICI_PATH}/documentation - -rm -rf ${AMICI_PATH}/documentation/generated - -sphinx-build -T -E -W --keep-going -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html - -ret=$? -if [[ $ret != 0 ]]; then exit $ret; fi diff --git a/scripts/run-sphinx.sh b/scripts/run-sphinx.sh deleted file mode 100755 index e7b1ce0861..0000000000 --- a/scripts/run-sphinx.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# generate code documentation via sphinx for upload to rtd - -SCRIPT_PATH=$(dirname $BASH_SOURCE) -AMICI_PATH=$(cd $SCRIPT_PATH/.. && pwd) - -python3 -m venv ${AMICI_PATH}/doc-venv --clear -source ${AMICI_PATH}/doc-venv/bin/activate -python -m pip install --upgrade --no-cache-dir pip setuptools wheel -(cd ${AMICI_PATH}/ && python -m pip install --exists-action=w --no-cache-dir -r documentation/rtd_requirements.txt) -(cd ${AMICI_PATH}/ && python -m pip install --exists-action=w --no-cache-dir -r documentation/rtd_requirements2.txt) - -${AMICI_PATH}/scripts/run-sphinx-hasenv.sh - -ret=$? -if [[ $ret != 0 ]]; then exit $ret; fi