-
Notifications
You must be signed in to change notification settings - Fork 440
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (42 loc) · 1.67 KB
/
Copy pathMakefile
File metadata and controls
57 lines (42 loc) · 1.67 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
57
UV ?= uv
UV_RUN_DEV = $(UV) run --group dev
UV_RUN_DEV_PYTHONPATH = PYTHONPATH=$(CURDIR) $(UV_RUN_DEV)
UV_RUN_LITE = $(UV) run --group dev --extra milvus-lite
UV_RUN_LITE_PYTHONPATH = PYTHONPATH=$(CURDIR) $(UV_RUN_LITE)
# Keep aligned with the codegen group's requires-python constraint in pyproject.toml.
CODEGEN_PYTHON = >=3.9,<3.14
# vcs-versioning 2.x changes .dev0 handling away from PyMilvus' intended
# master dev line, so keep all local/workflow version reads on <2.
VERSION_DEPS = --with "hatchling>=1.27,<1.28" --with "setuptools-scm[toml]>=8" --with "vcs-versioning<2"
sync:
$(UV) sync --group dev
unittest:
$(UV_RUN_DEV_PYTHONPATH) pytest tests/unit --cov=pymilvus -v
integration-lite:
$(UV_RUN_LITE_PYTHONPATH) pytest tests/integration/lite -v
benchmark:
$(UV_RUN_DEV_PYTHONPATH) pytest tests/benchmark --benchmark-only
lint:
$(UV_RUN_DEV_PYTHONPATH) black pymilvus tests --check --diff
$(UV_RUN_DEV_PYTHONPATH) ruff check pymilvus tests
format:
$(UV_RUN_DEV_PYTHONPATH) black pymilvus tests
$(UV_RUN_DEV_PYTHONPATH) ruff check pymilvus tests --fix
coverage:
$(UV_RUN_DEV_PYTHONPATH) pytest tests/unit --cov=pymilvus --cov-report=xml -v
example:
$(UV_RUN_DEV_PYTHONPATH) python examples/example.py
example_index:
$(UV_RUN_DEV_PYTHONPATH) python examples/example_index.py
package:
$(UV) build --sdist --wheel --out-dir dist/ .
get_proto:
git submodule update --init
gen_proto:
cd pymilvus/grpc_gen && PYTHON_CMD='$(UV) run --isolated --frozen --only-group codegen --python $(CODEGEN_PYTHON) python' ./python_gen.sh
check_proto_product: gen_proto
./check_proto_product.sh
version:
@$(UV) run --no-project $(VERSION_DEPS) python -m hatchling version
install:
$(UV) sync