-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (42 loc) · 1.53 KB
/
Makefile
File metadata and controls
51 lines (42 loc) · 1.53 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
.PHONY: clean clean-pyc clean-build clean-test help
help:
@echo "clean - remove all build, test, coverage and Python artifacts"
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-test - remove test and coverage artifacts"
@echo "test - run tests with pytest"
@echo "lint - check style with ruff"
@echo "format - format code with ruff"
clean: clean-build clean-pyc clean-test
clean-build:
rm -rf build/
rm -rf dist/
rm -rf .eggs/
find . -path ./.venv -prune -o -name '*.egg-info' -exec rm -rf {} + || true
find . -path ./.venv -prune -o -name '*.egg' -exec rm -f {} + || true
clean-pyc:
find . -path ./.venv -prune -o -name '*.pyc' -exec rm -f {} + || true
find . -path ./.venv -prune -o -name '*.pyo' -exec rm -f {} + || true
find . -path ./.venv -prune -o -name '*~' -exec rm -f {} + || true
find . -path ./.venv -prune -o -name '__pycache__' -exec rm -rf {} + || true
clean-test:
rm -rf .pytest_cache/
rm -rf .mypy_cache/
rm -rf .ruff_cache/
rm -rf htmlcov/
rm -rf .coverage
rm -rf coverage.xml
rm -rf test-docs/
# NOTE: do NOT delete ./docs — it holds CHANGELOG.md and examples/.
# `docs/` is also the OutputConfig.directory default, but conflating
# a dev artifact with project source content turned out to be a
# footgun. Users who run docpull and produce ./docs output should
# clean it manually or pick a different -o.
test:
pytest
benchmark:
DOCPULL_BENCHMARK_10K=1 pytest tests/benchmarks/test_10k_pages.py -v -s
lint:
ruff check .
format:
ruff format .