-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (37 loc) · 914 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
SHELL:=/bin/bash
PACKAGE_NAME:=snick
ROOT_DIR:=$(shell dirname $(shell pwd))
.PHONY: install
install:
poetry install
.PHONY: test
test: install
poetry run pytest
.PHONY: mypy
mypy: install
poetry run mypy ${PACKAGE_NAME} --pretty
.PHONY: lint
lint: install
poetry run ruff check ${PACKAGE_NAME} tests
.PHONY: qa
qa: test lint mypy
echo "All quality checks pass!"
.PHONY: format
format: install
poetry run ruff format ${PACKAGE_NAME} tests
publish: install
git tag v$(shell poetry version --short)
git push origin v$(shell poetry version --short)
clean: clean-eggs clean-build
@find . -iname '*.pyc' -delete
@find . -iname '*.pyo' -delete
@find . -iname '*~' -delete
@find . -iname '*.swp' -delete
@find . -iname '__pycache__' -delete
@rm -r .mypy_cache
@rm -r .pytest_cache
@find . -name '*.egg' -print0|xargs -0 rm -rf --
@rm -rf .eggs/
@rm -fr build/
@rm -fr dist/
@rm -fr *.egg-info