-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (42 loc) · 1.12 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
PACKAGE_DIRECTORY = aiogram_broadcaster
TESTS_DIRECTORY = tests
EXAMPLES_DIRECTORY = examples
BUTCHER_DIRECTORY = butcher
CACHE_DIRECTORY = .cache
CODE_DIRECTORIES = ${PACKAGE_DIRECTORY} ${TESTS_DIRECTORY} ${EXAMPLES_DIRECTORY} ${BUTCHER_DIRECTORY}
all: lint
# =====================================
# Environment
# =====================================
.PHONY: clean
clean:
rm --force --recursive "${CACHE_DIRECTORY}"
rm --force --recursive `find . -type d -name __pycache__`
# =====================================
# Code quality
# =====================================
.PHONY: lint
lint:
mypy ${PACKAGE_DIRECTORY}
ruff check ${PACKAGE_DIRECTORY}
ruff format --check ${CODE_DIRECTORIES}
.PHONY: format
format:
ruff format ${CODE_DIRECTORIES}
ruff check --fix --unsafe-fixes ${PACKAGE_DIRECTORY}
# =====================================
# Testing
# =====================================
.PHONY: test
test:
pytest
# =====================================
# Project
# =====================================
.PHONY: butcher
butcher:
python -m butcher
$(MAKE) format
.PHONY: release
release:
git tag "v$(shell hatch version)"