-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
53 lines (38 loc) · 1.09 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
.PHONY: compile publish check fix lint fixlint format mypy deadcode audit test
check: test lint mypy audit deadcode
fix: format fixlint
.venv:
pip install uv
uv venv -p 3.10 .venv
uv pip sync requirements-dev.txt
uv pip install -e .[test]
VERSION := $(shell .venv/bin/deadcode --version);
publish: .venv
rm -fr dist/*
.venv/bin/hatch build
.venv/bin/hatch -v publish
git tag $(VERSION)
git push origin tag $(VERSION)
test: .venv
.venv/bin/pytest -vv $(PYTEST_ME_PLEASE)
lint: .venv
.venv/bin/ruff check deadcode tests
fix: .venv
.venv/bin/ruff check deadcode tests --fix
mypy: .venv
.venv/bin/mypy deadcode
deadcode: .venv
.venv/bin/deadcode deadcode tests -v
fixlint: .venv
.venv/bin/ruff check --fix deadcode tests --unsafe-fixes
.venv/bin/deadcode deadcode tests --fix
format: .venv
.venv/bin/ruff format deadcode tests
audit: .venv
.venv/bin/pip-audit --skip-editable
sync: .venv
uv pip sync requirements-dev.txt
uv pip install -e .[test]
compile:
uv pip compile -U -q pyproject.toml -o requirements.txt
uv pip compile -U -q --all-extras pyproject.toml -o requirements-dev.txt