Skip to content

Commit

Permalink
sphinx in gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulSt committed Mar 6, 2022
1 parent 8c98fc1 commit 19a23f9
Show file tree
Hide file tree
Showing 19 changed files with 158 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ WORKDIR /home/app

RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get -y install vim python3 python3-pip python3-distutils python3-tk libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev libblas-dev liblapack-dev

#RUN pip install ngsolve ngstrefftz

RUN apt-get update
RUN apt-get update
RUN apt-get install -y software-properties-common
Expand Down
77 changes: 75 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,79 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
#labels: ${{ steps.meta.outputs.labels }}

docs:
needs: [ubuntu,macos]
runs-on: ubuntu-latest
#if: github.event_name == 'release' && github.event.action == 'created'
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
submodules: 'True'
path: 'NGSTrefftz'
- name: install pkgs
run: |
sudo apt-get update && DEBIAN_FRONTEND="noninteractive" sudo apt-get -y install vim libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev libblas-dev liblapack-dev python3 python3-pip python3-distutils python3-tk libpython3-dev
sudo apt-get install -y software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:ngsolve/nightly -y
sudo apt-get install ngsolve -y
sudo apt-get install npm nodejs pandoc -y
- name: pip pkgs
run: python3 -m pip list
- name: set path
run: |
echo "NETGENDIR=/usr/bin/" >> $GITHUB_ENV
- run: pip install --user -r $GITHUB_WORKSPACE/NGSTrefftz/docs/requirements.txt
- name: webgui
run: |
jupyter nbextension install --user --py widgetsnbextension
jupyter nbextension enable --user --py widgetsnbextension
jupyter nbextension install --user --py webgui_jupyter_widgets
jupyter nbextension enable --user --py webgui_jupyter_widgets
- run: python3 -c "import sys; print(sys.path)"
- name: cmake NGSTrefftz
run: |
cmake -B $GITHUB_WORKSPACE/NGSTrefftz/make -S $GITHUB_WORKSPACE/NGSTrefftz/src/
make -C $GITHUB_WORKSPACE/NGSTrefftz/make
sudo make -C $GITHUB_WORKSPACE/NGSTrefftz/make install
python3 -c "import sys; print(sys.path)"
python3 -c "import ngstrefftz"
ln -s /usr/lib/python3/dist-packages/ngsolve /opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/
ln -s /usr/lib/python3/dist-packages/ngstrefftz /opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/
ln -s /usr/lib/python3/dist-packages/ngstents /opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/
- name: jupyter stuff
run: |
pip install jupyter_contrib_nbextensions
#pip install jupyter_nbextensions_configurator
jupyter contrib nbextension install --user
jupyter nbextension install --user --py widgetsnbextension
jupyter nbextension enable --user --py widgetsnbextension
- name: build tentswebgui
run: |
cd $GITHUB_WORKSPACE/NGSTrefftz/external_dependencies/ngstents/tentswebgui/ && bash build.sh
- name: install tentswebgui
run: |
cd $GITHUB_WORKSPACE/NGSTrefftz/external_dependencies/ngstents/tentswebgui/ && pip install --user .
- name: jupyter tentswebgui
run: |
jupyter nbextension install --user --py tentswebgui
jupyter nbextension enable --user --py tentswebgui
- name: Build and Commit
uses: sphinx-notes/pages@v2
with:
repository_path: 'NGSTrefftz'
#requirements_path: ./docs/requirements.txt
- name: Push changes
uses: ad-m/github-push-action@master
with:
directory: 'NGSTrefftz'
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
- name: Debugging
if: ${{ failure() }}
run: cat /tmp/sphinx*

paper:
runs-on: ubuntu-latest
name: Paper Draft
Expand All @@ -166,9 +239,9 @@ jobs:
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
paper-path: doc/paper/paper.md
paper-path: docs/paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: joss_paper
path: doc/paper/paper.pdf
path: docs/paper/paper.pdf
4 changes: 2 additions & 2 deletions doc/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
# extensions = [ "myst_nb" ]
extensions = ["sphinx.ext.autodoc","sphinx.ext.mathjax","sphinx.ext.todo",
extensions = ["sphinx.ext.autodoc","sphinx.ext.mathjax","sphinx.ext.todo","sphinx.ext.githubpages",
"IPython.sphinxext.ipython_console_highlighting", "IPython.sphinxext.ipython_directive",
"nbsphinx",
"m2r2"
Expand Down Expand Up @@ -85,7 +85,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'paper']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'paper','env']

# LaTeX
latex_engine = 'xelatex'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
79 changes: 79 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
alabaster==0.7.12
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
asttokens==2.0.5
attrs==21.4.0
Babel==2.9.1
backcall==0.2.0
bleach==4.1.0
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.12
debugpy==1.5.1
decorator==5.1.1
defusedxml==0.7.1
docutils==0.17.1
entrypoints==0.4
executing==0.8.3
idna==3.3
imagesize==1.3.0
ipykernel==6.9.1
ipython==8.1.1
ipython-genutils==0.2.0
ipywidgets==7.6.5
jedi==0.18.1
Jinja2==3.0.3
jsonschema==4.4.0
jupyter-client==7.1.2
jupyter-core==4.9.2
jupyterlab-pygments==0.1.2
jupyterlab-widgets==1.0.2
m2r2==0.3.2
MarkupSafe==2.1.0
matplotlib-inline==0.1.3
mistune==0.8.4
nbclient==0.5.11
nbconvert==6.4.2
nbformat==5.1.3
nbsphinx==0.8.8
nest-asyncio==1.5.4
notebook==6.4.8
numpy==1.22.2
packaging==21.3
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
prometheus-client==0.13.1
prompt-toolkit==3.0.28
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
Pygments==2.11.2
pyparsing==3.0.7
pyrsistent==0.18.1
python-dateutil==2.8.2
pytz==2021.3
pyzmq==22.3.0
requests==2.27.1
scipy==1.8.0
Send2Trash==1.8.0
six==1.16.0
snowballstemmer==2.2.0
Sphinx==4.4.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
stack-data==0.2.0
terminado==0.13.2
testpath==0.6.0
tornado==6.1
traitlets==5.1.1
urllib3==1.26.8
wcwidth==0.2.5
webencodings==0.5.1
webgui-jupyter-widgets==0.2.8
widgetsnbextension==3.5.2

0 comments on commit 19a23f9

Please sign in to comment.