-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
93 lines (67 loc) · 1.57 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
# Build, package, test, and clean
PROJECT=polartoolkit
STYLE_CHECK_FILES=.
####
####
# install commands
####
####
create:
mamba create --name $(PROJECT) --yes --force --channel conda-forge pygmt geopandas python=3.11
install:
pip install -e .[all]
install_test:
pip install $(PROJECT)[all]
remove:
mamba remove --name $(PROJECT) --all
conda_install:
mamba create --name $(PROJECT) --yes --force --channel conda-forge $(PROJECT) pytest pytest-cov deepdiff
conda_export:
mamba env export --name $(PROJECT) --channel conda-forge --file env/environment.yml
####
####
# test commands
####
####
test:
pytest -m "not earthdata and not issue and not fetch"
test_fetch:
pytest -s -m fetch #-rp
####
####
# style commands
####
####
check:
pre-commit run --all-files
pylint:
pylint $(PROJECT)
style: check pylint
mypy:
mypy src/$(PROJECT)
####
####
# chore commands
####
####
release_check:
semantic-release --noop version
changelog:
semantic-release changelog
license-add:
python tools/license_notice.py
license-check:
python tools/license_notice.py --check
####
####
# doc commands
####
####
run_gallery:
jupyter nbconvert --ExecutePreprocessor.allow_errors=True --execute --inplace docs/gallery/*.ipynb
run_tutorials:
jupyter nbconvert --ExecutePreprocessor.allow_errors=True --execute --inplace docs/tutorial/*.ipynb
run_doc_files:
jupyter nbconvert --ExecutePreprocessor.allow_errors=True --execute --inplace docs/*.ipynb
jupyter nbconvert --ExecutePreprocessor.allow_errors=True --execute --inplace docs/*/*.ipynb
run_notebooks: run_gallery run_tutorials run_doc_files