-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
103 lines (58 loc) · 1.52 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
94
95
96
97
98
99
100
101
102
103
# Project
srcdir = src
testsdir = tests
# Build
.PHONY: build
build:
poetry build
# Init
.PHONY: init
init:
poetry install --sync
# Format
.PHONY: fmt
fmt:
poetry run ruff check --select I001 --fix $(srcdir) $(testsdir)
poetry run ruff format $(srcdir) $(testsdir)
# Lint
.PHONY: lint lint-poetry lint-ruff-format lint-ruff-check lint-mypy
lint: lint-poetry lint-ruff-format lint-ruff-check lint-mypy
lint-poetry:
poetry check
lint-ruff-format:
poetry run ruff format --diff $(srcdir) $(testsdir)
lint-ruff-check:
poetry run ruff check $(srcdir) $(testsdir)
lint-mypy:
poetry run mypy --show-error-context --pretty $(srcdir) $(testsdir)
# Tests
.PHONY: test test-pytest
test: test-pytest
test-pytest:
poetry run pytest --cov=qldebugger --cov-report=term-missing --no-cov-on-fail $(testsdir)
# Docs
.PHONY: docs-build docs-serve
docs-build:
poetry run mkdocs build
docs-serve:
poetry run mkdocs serve
# Clean
.PHONY: clean clean-build clean-pycache clean-python-tools clean-docs clean-lock dist-clean
clean: clean-build clean-pycache clean-python-tools clean-docs
clean-build:
rm -rf dist
clean-pycache:
find $(srcdir) $(testsdir) -name '__pycache__' -exec rm -rf {} +
find $(srcdir) $(testsdir) -type d -empty -delete
clean-python-tools:
rm -rf .ruff_cache .mypy_cache .pytest_cache .coverage .coverage.*
clean-docs:
rm -rf docs-site
clean-lock:
rm -rf poetry.lock
dist-clean: clean clean-lock
rm -rf .venv qldebugger.toml
# Misc
.PHONY: run-aws-mock
run-aws-mock:
poetry run moto_server -p 4566