-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (52 loc) · 1.56 KB
/
Makefile
File metadata and controls
64 lines (52 loc) · 1.56 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
help:
@echo "Commands:"
@echo ""
@echo " install conda env create -f environment.yml"
@echo " flake8 style check with flake8"
@echo " html build docs (update existing)"
@echo " html-noplot as above, without gallery"
@echo " example FILE= build particular example"
@echo " html-clean build docs (new, removing any existing)"
@echo " preview renders docs in Browser"
@echo " linkcheck check all links in docs"
@echo " linkcheck-noplot"
@echo " deploy deploy gallery to gh-pages (as is; run doc before)"
@echo " clean clean up all generated files"
@echo " remove remove conda-env emg3d-gallery"
@echo ""
install:
conda env create -f environment.yml
remove:
conda remove --name emg3d-gallery --all
flake8:
flake8 docs/conf.py examples/
html:
cd docs && make html
html-noplot:
cd docs && make html-noplot
html-clean:
cd docs && rm -rf gallery/*/ && rm -rf _build/ && make html
example:
cd docs && sphinx-build -D sphinx_gallery_conf.filename_pattern=$(FILE) -b html -d _build/doctrees . _build/html
preview:
xdg-open docs/_build/html/index.html
linkcheck:
cd docs && make linkcheck
linkcheck-noplot:
cd docs && make linkcheck-noplot
.ONESHELL:
deploy:
mkdir tmp
cp -r docs/_build/html/* tmp/.
cp -r .git tmp/.
cd tmp/
touch .nojekyll
git branch -D gh-pages &>/dev/null
git checkout --orphan gh-pages
git add --all
git commit -m 'Update gallery'
git push -f --set-upstream origin gh-pages
cd ..
rm -rf tmp/
clean:
rm -rf docs/gallery/*/ docs/gallery/*.zip docs/_build/