-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (37 loc) · 970 Bytes
/
Copy pathMakefile
File metadata and controls
47 lines (37 loc) · 970 Bytes
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
all: commands
## commands: show available commands (*)
commands:
@grep -h -E '^##' ${MAKEFILE_LIST} \
| sed -e 's/## //g' \
| column -t -s ':'
## check: check HTML
.PHONY: check
check:
@mccole check --src . --dst docs --files '*.jpg' '*.png' '*.svg'
## clean: clean up
clean:
@rm -rf ./dist
@find . -path ./.venv -prune -o -type d -name __pycache__ -exec rm -rf {} +
@find . -path ./.venv -prune -o -type d -name .ruff_cache -exec rm -rf {} +
@find . -path ./.venv -prune -o -type f -name '*~' -exec rm {} +
## fix: fix code issues
fix:
@ruff check --fix ${LESSONS}
## format: format code
format:
@ruff format ${LESSONS}
## lint: run all code checks
lint:
@make check
@make types
## site: build documentation
site:
@mccole build --math --src . --dst docs
@touch docs/.nojekyll
## serve: serve documentation
serve:
python -m http.server -d docs
## examples: regenerate example output
examples: ${EXAMPLES_OUT}
%.txt: %.py
python $< ${SEED} > $@