-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
104 lines (76 loc) · 1.92 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
PROJECT=invert4geom
STYLE_CHECK_FILES=.
####
####
# install commands
####
####
create:
mamba create --name $(PROJECT) --yes --force --channel conda-forge polartoolkit python=3.11
install:
pip install -e .[all]
remove:
mamba remove --name $(PROJECT) --all
pip_install:
pip install $(PROJECT)[all]
conda_install:
mamba create --name $(PROJECT) --yes --force --channel conda-forge $(PROJECT) pytest pytest-cov ipykernel
####
####
# test commands
####
####
test: test_coverage test_numba
test_coverage:
NUMBA_DISABLE_JIT=1 pytest
test_numba:
NUMBA_DISABLE_JIT=0 pytest -rP -m use_numba
####
####
# style commands
####
####
format:
ruff format $(STYLE_CHECK_FILES)
check:
ruff check --fix $(STYLE_CHECK_FILES)
lint:
pre-commit run --all-files
pylint:
pylint $(PROJECT)
style: format check lint pylint
mypy:
mypy src/$(PROJECT)
####
####
# chore commands
####
####
release_check:
semantic-release --noop version
changelog:
semantic-release changelog
clean:
find . -name '*.pickle' -delete
find . -name '*.log' -delete
find . -name '*.lock' -delete
find . -name '*.pkl' -delete
find . -name '*.sqlite3' -delete
find . -name '*.coverage' -delete
####
####
# doc commands
####
####
clear_gallery_outputs:
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace docs/gallery/*.ipynb
run_gallery: clear_gallery_outputs
jupyter nbconvert --ExecutePreprocessor.allow_errors=False --execute --inplace docs/gallery/*.ipynb
clear_user_guide_outputs:
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace docs/user_guide/*.ipynb
run_user_guide: clear_user_guide_outputs
jupyter nbconvert --ExecutePreprocessor.allow_errors=False --execute --inplace docs/user_guide/*.ipynb
clear_docs_outputs:
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace docs/**/*.ipynb
run_doc_files: clear_docs_outputs
jupyter nbconvert --ExecutePreprocessor.allow_errors=False --execute --inplace docs/**/*.ipynb