-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (53 loc) · 1.7 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
.PHONY: help install clean docs blobs test ci mypy pyright ruff release example-ci upgrade-ci
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " install to install the package"
@echo " clean to clean the directory tree"
@echo " docs to generate the documentation"
@echo " ci to run the CI workflows"
@echo " mypy to run the mypy static type checker"
@echo " pyright to run the pyright static type checker"
@echo " ruff to run ruff"
@echo " blobs to compile the models"
@echo " stubs to generate the stubs"
@echo " test to run the tests"
@echo " release to perform all actions required for a release"
@echo " upgrade-ci to upgrade the CI tools"
@echo " example-ci to run the CI workflows for the example scripts"
install:
pip3 install .
clean:
rm -rf build
rm -rf dist
rm -rf *.egg-info
rm -rf oakutils/*.egg-info
rm -rf src/oakutils/*.egg-info
pyclean .
rm -rf .mypy_cache
rm -rf .ruff_cache
docs:
python3 ci/build_example_docs.py
rm -rf docs/source/*
sphinx-apidoc -o docs/source/ src/oakutils/
cd docs && make html
blobs:
python3 ci/compile_models.py --definitions
ci: ruff mypy
mypy:
python3 -m mypy src/oakutils --config-file=pyproject.toml
pyright:
python3 -m pyright --project=pyproject.toml
ruff:
python3 -m ruff format ./src/oakutils
python3 -m ruff check ./src/oakutils --fix --preview
stubs:
python3 ci/make_stubs.py
test: install
./ci/run_tests.sh
upgrade-ci:
pip3 install --upgrade ruff
pip3 install --upgrade mypy
example-ci:
python3 -m ruff format ./examples
python3 -m ruff check ./examples --fix --preview --ignore=T201,INP001,F841
release: clean blobs ci test docs example-ci