-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (45 loc) · 862 Bytes
/
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
.PHONY: all
.PHONY: build
.PHONY: install
.PHONY: clean
.PHONY: test
.PHONY: lint
.PHONY: isort
.PHONY: mypy
.PHONY: bandit
.PHONY: tag
.PHONY: pre-commit
PKG_VERSION=`hatch version`
# Equivalent to python -m build --sdist --wheel --outdir dist/ .
all:
pip install -r requirements.txt --quiet
make isort
make lint
make mypy
make bandit
make pre-commit
make test
make build
make install
build:
hatch build
install:
pip install -e . --quiet
clean:
rm -rf dist
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
test:
hatch run test:test
lint:
hatch run test:lint
isort:
hatch run test:isort
mypy:
mypy rl_2048 tests --check-untyped-defs --ignore-missing-imports
bandit:
bandit -c pyproject.toml -r .
tag:
git tag -a v${PKG_VERSION} -m v${PKG_VERSION}
git push --tag
pre-commit:
pre-commit run --all-files