-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (45 loc) · 1.25 KB
/
Makefile
File metadata and controls
56 lines (45 loc) · 1.25 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
.PHONY: pre-commit-install install clean clean-build clean-pyc clean-test clean-misc check-lint lint unit-tests integration-tests prepare-integration-tests tests
# install pre-commit
pre-commit-install:
uv run pre-commit install
# install dependencies
install: clean pre-commit-install
uv sync
# remove all build, test, coverage and Python artifacts
clean: clean-build clean-pyc clean-test clean-misc
# remove build artifacts
clean-build:
rm -fr build/
rm -fr dist/
rm -fr wheelhouse/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
# remove Python file artifacts
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
# remove test and coverage artifacts
clean-test:
rm -f .coverage
rm -f coverage.xml
rm -rf htmlcov/
rm -rf .tox/
rm -rf .pytest_cache/
# remove other artifacts
clean-misc:
rm -rf .ruff_cache/
rm -rf .mypy_cache/
# check the linting of the project
check-lint:
uv run ruff check .
uv run ruff format --check .
# perform the linting on the project
lint:
uv run ruff check --fix .
uv run ruff format .
# test the package
tests: clean-test install
uv run pytest -vv -s