Skip to content

Commit

Permalink
Update docs build in tox
Browse files Browse the repository at this point in the history
  • Loading branch information
opcode81 committed Aug 12, 2024
1 parent 9cf27e4 commit f50b0d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Prepare Pages
if: github.ref == 'refs/heads/develop'
run: |
mv docs/_build/html/* public/docs
mv docs/build/* public/docs
mv htmlcov/* public/coverage
- name: Deploy Pages
uses: JamesIves/[email protected]
Expand Down
1 change: 1 addition & 0 deletions build-docs.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export PYTHONPATH=$PYTHONPATH:src
rm -rf docs/build
rm -rf docs/jupyter_execute
jupyter-book config sphinx docs/
Expand Down
14 changes: 5 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,21 @@ extras =
full

[testenv:docs]
; NOTE: we don't use pytest for running the doctest, even though with pytest no imports have to be written in them
; The reason is that we want to be running doctest during the docs build (which might happen on a remote machine,
; like read_the_docs does) with possibly fewer external dependencies and use sphinx' ability to automock the missing ones.
commands =
python build_scripts/update_docs.py
git add docs/*
sphinx-build -W -b html -d "{envtmpdir}/doctrees" docs "docs/_build/html"
sphinx-build -b doctest -d "{envtmpdir}/doctrees" docs "docs/_build/doctest"
sh build-docs.sh
deps =
Sphinx~=4.1
sphinxcontrib-websupport==1.2.4
sphinx-toolbox
sphinx_rtd_theme
nbsphinx
ipython
ipywidgets
jupyter-book
whitelist_externals =
git
sh
allowlist_externals =
git
sh

[testenv:report]
skip_install = true
Expand Down

0 comments on commit f50b0d4

Please sign in to comment.