generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
56 lines (47 loc) · 1.05 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
54
55
56
PROJECT := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
SRC := $(PROJECT)src
TESTS := $(PROJECT)tests
ALL := $(SRC) $(TESTS)
export PYTHONPATH = $(PROJECT):$(PROJECT)/lib:$(SRC)
update-dependencies:
uv lock -U --no-cache
generate-requirements:
uv pip compile -q --no-cache pyproject.toml -o requirements.txt
uv pip compile -q --no-cache --all-extras pyproject.toml -o requirements-dev.txt
lint:
uv tool run ruff check $(ALL)
uv tool run ruff format --check --diff $(ALL)
fmt:
uv tool run ruff check --fix $(ALL)
uv tool run ruff format $(ALL)
unit:
uv run --all-extras \
coverage run \
--source=$(SRC) \
-m pytest \
--ignore=$(TESTS)/integration \
--tb native \
-v \
-s \
$(ARGS)
uv run --all-extras coverage report
integration:
uv run --all-extras \
pytest \
-v \
-x \
-s \
--tb native \
--ignore=$(TESTS)/unit \
--log-cli-level=INFO \
$(ARGS)
clean:
rm -rf .coverage
rm -rf .pytest_cache
rm -rf .ruff_cache
rm -rf .venv
rm -rf *.charm
rm -rf *.rock
rm -rf **/__pycache__
rm -rf **/*.egg-info
rm -rf requirements*.txt