Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (35 loc) · 1.43 KB
/
Copy pathMakefile
File metadata and controls
48 lines (35 loc) · 1.43 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
.PHONY: clean test test-fast test-unit test-property test-integration lint format check clean-branches install-skills uninstall-skills stamp-version
clean:
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name '*.pyc' -delete 2>/dev/null || true
find . -type f -name '*.pyo' -delete 2>/dev/null || true
rm -rf .pytest_cache/ *.egg-info/ dist/ .ruff_cache/ .mypy_cache/ .hypothesis/
rm -rf packages/*/.pytest_cache packages/*/.mypy_cache packages/*/.ruff_cache
rm -rf packages/*/build packages/*/dist packages/*/*.egg-info
test:
uv run pytest -q
test-fast:
uv run pytest -m "not slow" -q
test-unit:
uv run pytest packages/afcore/tests/unit/ -q
test-property:
uv run pytest packages/afcore/tests/property/ -q
test-integration:
uv run pytest packages/afcore/tests/integration/ -q
lint:
uv run ruff check packages/ && uv run ruff format --check packages/
format:
uv run ruff format packages/
check: lint test
check-all: clear lint test test-unit test-property test-integration
clean-branches:
@git branch --list 'feature/*' | xargs -r git branch -D
@git branch --list 'fix/*' | xargs -r git branch -D
@git branch --list 'refactor/*' | xargs -r git branch -D
stamp-version:
@rev=$$(git rev-parse --short HEAD) && \
printf '%s\n' \
'"""Build-time metadata — autogenerated by make stamp-version."""' \
'' \
"GIT_REVISION: str | None = \"$$rev\"" \
> packages/afcore/afcore/_build_info.py