Skip to content

Commit 4f12fd5

Browse files
author
Zhe Yu
committed
chore(cli): Document how to install extra dependencies
1 parent 11aecc4 commit 4f12fd5

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
.PHONY: multitest
22

33
EXTRA_LOCK_ARGS?=
4+
EXTRA_DEPS?=""
45
DEFAULT_GROUPS=--group dev --group lsp --group mcp --group debug $(EXTRA_LOCK_ARGS)
56

67
deps:
78
pdm lock $(DEFAULT_GROUPS) || pdm lock $(DEFAULT_GROUPS) --group legacy; \
89
pdm install
10+
[ -z "$(EXTRA_DEPS)" ] || (pdm run python -m ensurepip && pdm run python -m pip install $(EXTRA_DEPS))
911

1012
test:
1113
make deps; \

docs/CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,26 @@ You may also find it helpful to
4040
[enable logging](https://github.com/Davidyz/VectorCode/blob/main/docs/cli.md#debugging-and-diagnosing)
4141
for the CLI when developing new features or working on fixes.
4242

43+
### Local Dependencies
44+
45+
Sometimes you want to run `make deps` that install non-default dependencies. The
46+
`Makefile` provides easy ways to do that.
47+
48+
When you want to install a dependency group of VectorCode:
49+
50+
```bash
51+
EXTRA_LOCK_ARGS="--group chroma0" make deps
52+
```
53+
54+
When you want to install a library that is not declared in any of the dependency
55+
groups (like `openai`):
56+
57+
```bash
58+
EXTRA_DEPS="openai\<2.0.0" make deps
59+
```
60+
61+
Both environment variables apply to `make deps`, `make test` and `make coverage`.
62+
4363
### Database Connectors
4464

4565
Please take a look at [the database documentation](../src/vectorcode/database/README.md),

0 commit comments

Comments
 (0)