-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_documentation
executable file
·41 lines (30 loc) · 1.03 KB
/
build_documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
shopt -s extglob
# Don't let this stuff get in; Remove it if it gets in.
git rm -r __pycache__
# What's the correct way to do this?
git rm -r .ipynb_checkpoints
git rm -r ./*/.ipynb_checkpoints
git rm -r ./*/*/.ipynb_checkpoints
git rm -r ./*/*/*/.ipynb_checkpoints
git rm -r ./*/*/*/*/.ipynb_checkpoints
git rm -r ./*/*/*/*/*/.ipynb_checkpoints
git rm -r ./*/*/*/*/*/*/.ipynb_checkpoints
find . -iname ".ipynb_checkpoints" --exec rm -r {} \;
# Clean up editor files
find . -iname "*~" -exec rm {} \;
echo running autodoc
cd ./docs
sphinx-apidoc -fe -o . ../
#make clean
make html
cd ../
git add .
git commit -m "rebuilt documentation"
# You may need to fix Sphinx search using these steps
# https://stackoverflow.com/a/52475184/900749
# First, navigate to the Python installation folder and locate the layout.html inside ./Lib/site-packages/sphinx_rtd_theme/layout.html.
# To find this I ran
# find / -iname sphinx_rtd_theme 2>/dev/null
# Which located
# /home/mer49/.local/lib/python3.10/site-packages/sphinx_rtd_theme