-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (53 loc) · 2.08 KB
/
Makefile
File metadata and controls
70 lines (53 loc) · 2.08 KB
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
SHELL := /bin/zsh
UV ?= uv
.PHONY: sync test test-cov lint lint-preview typecheck typecheck-changed security-lint import-lint format format-check build-dist check-dist release-dry-run check-markdown-links help
help:
@echo "Targets:"
@echo " make sync - install/update dependencies via uv"
@echo " make lint - run ruff lint checks"
@echo " make lint-preview - run optional preview-only Ruff checks (non-blocking)"
@echo " make typecheck - run mypy on src"
@echo " make typecheck-changed - run mypy on changed src modules"
@echo " make security-lint - run bandit security checks on src"
@echo " make import-lint - run import-linter architecture contracts"
@echo " make format - apply ruff formatter"
@echo " make format-check - verify ruff formatting"
@echo " make test - run unit, integration and acceptance tests"
@echo " make test-cov - run tests and write coverage report to coverage.xml"
@echo " make build-dist - build sdist and wheel into dist/"
@echo " make check-dist - verify built distributions with twine"
@echo " make release-dry-run - preview the next semantic-release version"
@echo " make check-markdown-links - validate markdown links with lychee"
sync:
$(UV) lock
$(UV) sync
lint:
$(UV) run ruff check src tests
lint-preview:
-$(UV) run ruff check src tests --preview --select PLR0904,PLR0914,PLR0917,PLR1702
typecheck:
$(UV) run mypy src
typecheck-changed:
@./scripts/typecheck-changed.sh
security-lint:
$(UV) run bandit -q -r src
import-lint:
$(UV) run lint-imports
format:
$(UV) run ruff check src tests --fix
$(UV) run ruff format src tests
format-check:
$(UV) run ruff check src tests
$(UV) run ruff format --check src tests
test:
$(UV) run pytest tests/unit tests/integration tests/acceptance -q
test-cov:
$(UV) run pytest tests/unit tests/integration tests/acceptance -q --cov=src/docctl --cov-report=term --cov-report=xml:coverage.xml
build-dist:
$(UV) build
check-dist:
$(UV) run twine check dist/*
release-dry-run:
$(UV) run semantic-release --strict --noop version --print
check-markdown-links:
@./scripts/check-markdown-links.sh