Skip to content

Commit

Permalink
feat: automation now runs notebooks and readme examples
Browse files Browse the repository at this point in the history
  • Loading branch information
George3d6 committed Nov 25, 2021
1 parent 6536e5a commit ef7c884
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- staging
- separate_doc_branch
- jupyter_actions

jobs:
doc_build:
runs-on: ubuntu-latest
Expand All @@ -18,15 +20,22 @@ jobs:
with:
python-version: 3.9

- name: build docs
- name: install all dependencies
run: |
sudo apt install pandoc
python -m pip install --upgrade pip
pip install --no-cache-dir -e .
pip install install 'Sphinx==4.1.2' 'sphinx-autoapi==1.8.4' 'sphinx-autodoc-typehints==1.12.0' 'sphinx-code-include==1.1.1' 'sphinx-rtd-theme==0.5.2' 'sphinxcontrib-applehelp==1.0.2' 'sphinxcontrib-devhelp==1.0.2' 'sphinxcontrib-htmlhelp==2.0.0' 'sphinxcontrib-jsmath==1.0.1' 'sphinxcontrib-napoleon==0.7' 'sphinxcontrib-qthelp==1.0.3' 'sphinxcontrib-serializinghtml==1.1.5' autoapi nbsphinx myst_parser pandoc jupyter
pip install install 'Sphinx==4.1.2' 'sphinx-autoapi==1.8.4' 'sphinx-autodoc-typehints==1.12.0' 'sphinx-code-include==1.1.1' 'sphinx-rtd-theme==0.5.2' 'sphinxcontrib-applehelp==1.0.2' 'sphinxcontrib-devhelp==1.0.2' 'sphinxcontrib-htmlhelp==2.0.0' 'sphinxcontrib-jsmath==1.0.1' 'sphinxcontrib-napoleon==0.7' 'sphinxcontrib-qthelp==1.0.3' 'sphinxcontrib-serializinghtml==1.1.5' autoapi nbsphinx myst_parser pandoc jupyter matplotlib imblearn fsspec
- name: Re-run notebooks
run: |
find . -iname '*.ipynb' -exec jupyter nbconvert --to notebook --inplace --execute {} \; > out.txt 2>&1
cat out.txt
cat out.txt | grep -zvqi exception && echo 'no errors detected' || exit
cat out.txt | grep -zvqi error && echo 'no errors detected' || exit
- name: Make the docs
run: |
cd docssrc && make github

- name: Deploy to another branch
uses: s0/git-publish-subdir-action@develop
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ligthtwood.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- stable
- staging


jobs:
test:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -49,6 +50,7 @@ jobs:
python -m flake8 .
- name: Test with unittest
run: |
# Run all the "standard" tests
python -m unittest discover tests
deploy:
Expand Down

0 comments on commit ef7c884

Please sign in to comment.