-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (55 loc) · 1.56 KB
/
Makefile
File metadata and controls
70 lines (55 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
65
66
67
68
69
70
# Makefile for Finite Difference Computing with PDEs book
.PHONY: pdf html all preview clean test test-devito test-no-devito lint format check help
# Default target
all: pdf html
# Build targets
pdf:
quarto render --to pdf
html:
quarto render --to html
# Build both PDF and HTML
book:
quarto render
# Live preview with hot reload
preview:
quarto preview
# Clean build artifacts
clean:
rm -rf _book/
rm -rf .quarto/
find . -name "*.aux" -delete
find . -name "*.log" -delete
find . -name "*.out" -delete
# Test targets
test:
pytest tests/ -v
test-devito:
pytest tests/ -v -m devito
test-no-devito:
pytest tests/ -v -m "not devito"
test-phase1:
pytest tests/test_elliptic_devito.py tests/test_burgers_devito.py tests/test_swe_devito.py -v
# Linting and formatting
lint:
ruff check src/
format:
ruff check --fix src/
isort src/
check:
pre-commit run --all-files
# Help
help:
@echo "Available targets:"
@echo " pdf - Build PDF (default)"
@echo " html - Build HTML"
@echo " book - Build all formats (PDF + HTML)"
@echo " preview - Live preview with hot reload"
@echo " clean - Remove build artifacts"
@echo " test - Run all tests"
@echo " test-devito - Run only Devito tests"
@echo " test-no-devito - Run tests without Devito"
@echo " test-phase1 - Run Phase 1 tests (elliptic, burgers, swe)"
@echo " lint - Check code with ruff"
@echo " format - Auto-format code with ruff and isort"
@echo " check - Run all pre-commit hooks"
@echo " help - Show this help message"