-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 1.04 KB
/
Makefile
File metadata and controls
35 lines (27 loc) · 1.04 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
all: build
clean:
rm -f *.log
rm -rf dist/*
rm -rf *.egg-info/
rm -rf **/*.egg-info
compile:
# Make stub directory
mkdir -p ocr_openstack_plugin/stub
# Compile the protobuf files
PYTHONWARNINGS="ignore::DeprecationWarning" uv run python -m grpc_tools.protoc -I grpc/proto/src \
--python_out=ocr_openstack_plugin/stub \
--grpc_python_out=ocr_openstack_plugin/stub \
--proto_path=grpc/proto \
src/capability.proto src/common.proto src/virtual-machine.proto src/template.proto src/feature.proto src/switch.proto src/condition.proto src/inject.proto src/deputy.proto src/event.proto
touch ocr_openstack_plugin/stub/src/__init__.py
touch ocr_openstack_plugin/stub/__init__.py
sed -i 's/from src import/from ocr_openstack_plugin.stub.src import/g' ocr_openstack_plugin/stub/src/*.py
install:
uv sync --locked
build: install compile
uv build
test-report:
uv run pytest tests -v --cov-report term --cov-report html:htmlcov --cov-report xml --cov-fail-under=90 --cov=./ocr_openstack_plugin
upgrade: clean
git submodule update --remote --init
uv sync