-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
48 lines (36 loc) · 1.46 KB
/
Makefile
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
setup: install kernel plotly
install:
pip install -r requirements.txt
kernel:
python3 -m ipykernel install --user --name python-cadlabs --display-name "Python (CADLabs)"
plotly:
jupyter labextension install jupyterlab-plotly@4.14.3
start-lab:
jupyter lab
test:
# execute-notebooks
# Check formatting
python -m black --check --diff model
# Check docstrings
pylint --disable=all --enable=missing-docstring model
# Run Pytest tests
python3 -m pytest -m "not api_test" tests
build-docs: docs-pdoc docs-jupyter-book
docs-pdoc:
pdoc --html model -o docs --force
docs-jupyter-book:
jupyter-book clean docs
jupyter-book build --config docs/_config.yml --toc docs/_toc.yml --path-output docs .
cp -r ./docs/model ./docs/_build/html/docs/model
serve-docs:
gunicorn -w 4 -b 127.0.0.1:5000 docs.server:app
execute-notebooks:
rm experiments/notebooks/*.nbconvert.* || true
jupyter nbconvert --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python-cadlabs --execute --to notebook experiments/notebooks/*.ipynb
rm experiments/notebooks/*.nbconvert.* || true
update-notebooks:
rm experiments/notebooks/*.nbconvert.* || true
jupyter nbconvert --ExecutePreprocessor.timeout=-1 --ExecutePreprocessor.kernel_name=python-cadlabs --execute --to notebook --inplace experiments/notebooks/*.ipynb
rm experiments/notebooks/*.nbconvert.* || true
clear-notebook-outputs:
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace experiments/notebooks/*.ipynb