-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
46 lines (34 loc) · 1.38 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
setup: install kernel plotly
install:
pip install -r requirements.txt
kernel:
python3 -m ipykernel install --user --name python-cadlabs-eth-model --display-name "Python (CADLabs Ethereum Model)"
plotly:
jupyter labextension install [email protected]
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-jupyter-book
docs-pdoc:
pdoc --html model -o docs --force
docs-jupyter-book:
jupyter-book clean docs
python build_docs.py
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-eth-model --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-eth-model --execute --to notebook --inplace experiments/notebooks/*.ipynb
rm experiments/notebooks/*.nbconvert.* || true
clear-notebook-outputs:
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace experiments/notebooks/*.ipynb