-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
36 lines (26 loc) · 851 Bytes
/
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
NOTEBOOKS_DIR=notebooks
.PHONY: build run clean check check-style check-format format
help:
@echo "Commands:"
@echo ""
@echo " build build Myst website (without running notebooks)"
@echo " clean clean output of Myst website"
@echo " run run all notebooks"
@echo " check check notebooks style and format with ruff"
@echo " check-style check notebooks style with ruff"
@echo " check-format check notebooks format with ruff"
@echo " format autoformat notebooks with ruff"
@echo ""
build:
myst build --html
clean:
myst clean --all
run:
jupyter nbconvert --to notebook --execute --inplace "${NOTEBOOKS_DIR}/**/*.ipynb"
check: check-format check-style
check-style:
ruff check "${NOTEBOOKS_DIR}"
check-format:
ruff format --check "${NOTEBOOKS_DIR}"
format:
ruff format "${NOTEBOOKS_DIR}"