Skip to content

Commit 3fbe0cd

Browse files
committed
fix: update CONTRIBUTING.md to point to uv instead of rye
1 parent 91156dc commit 3fbe0cd

File tree

1 file changed

+12
-55
lines changed

1 file changed

+12
-55
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,31 @@
11
## Setting up the environment
22

3-
### With Rye
3+
### With UV
44

5-
We use [Rye](https://rye.astral.sh/) to manage dependencies so we highly recommend [installing it](https://rye.astral.sh/guide/installation/) as it will automatically provision a Python environment with the expected Python version.
5+
We use [UV](https://docs.astral.sh/uv/) to manage dependencies so we highly recommend [installing it](https://docs.astral.sh/uv/installation/) as it will automatically provision a Python environment with the expected Python version.
66

7-
After installing Rye, you'll just have to run this command:
7+
After installing UV, you'll just have to run this command:
88

9-
```sh
10-
$ rye sync --all-features
11-
```
12-
13-
You can then run scripts using `rye run python script.py` or by activating the virtual environment:
14-
15-
```sh
16-
$ rye shell
17-
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
18-
$ source .venv/bin/activate
19-
20-
# now you can omit the `rye run` prefix
21-
$ python script.py
9+
```bash
10+
uv sync
2211
```
2312

24-
### Without Rye
25-
26-
Alternatively if you don't want to install `Rye`, you can stick with the standard `pip` setup by ensuring you have the Python version specified in `.python-version`, create a virtual environment however you desire and then install dependencies using this command:
2713

28-
```sh
29-
$ pip install -r requirements-dev.lock
30-
```
3114

3215
## Modifying/Adding code
3316

3417
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
3518
result in merge conflicts between manual patches and changes from the generator. The generator will never
3619
modify the contents of the `src/llama_stack_client/lib/` and `examples/` directories.
3720

38-
## Adding and running examples
39-
40-
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
41-
42-
```bash
43-
# add an example to examples/<your-example>.py
44-
45-
#!/usr/bin/env -S rye run python
46-
47-
```
48-
49-
```
50-
chmod +x examples/<your-example>.py
51-
# run the example against your api
52-
./examples/<your-example>.py
53-
```
54-
5521
## Using the repository from source
5622

5723
If you’d like to use the repository from source, you can either install from git or link to a cloned repository:
5824

5925
To install via git:
6026

6127
```bash
62-
pip install git+ssh://[email protected]/stainless-sdks/llama-stack-python.git
28+
uv pip install git+ssh://[email protected]/stainless-sdks/llama-stack-python.git
6329
```
6430

6531
Alternatively, you can build from source and install the wheel file:
@@ -69,15 +35,13 @@ Building this package will create two files in the `dist/` directory, a `.tar.gz
6935
To create a distributable version of the library, all you have to do is run this command:
7036

7137
```bash
72-
rye build
73-
# or
74-
python -m build
38+
uv build
7539
```
7640

7741
Then to install:
7842

7943
```sh
80-
pip install ./path-to-wheel-file.whl
44+
uv pip install ./path-to-wheel-file.whl
8145
```
8246

8347
## Running tests
@@ -90,24 +54,17 @@ npx prism mock path/to/your/openapi.yml
9054
```
9155

9256
```bash
93-
rye run pytest
57+
uv run pytest
9458
```
9559

9660
## Linting and formatting
9761

98-
This repository uses [ruff](https://github.com/astral-sh/ruff) and
99-
[black](https://github.com/psf/black) to format the code in the repository.
100-
101-
To lint:
102-
103-
```bash
104-
rye run lint
105-
```
62+
There is a pre-commit hook that will run ruff and black on the code.
10663

107-
To format and fix all ruff issues automatically:
64+
To run the pre-commit hook:
10865

10966
```bash
110-
rye run format
67+
uv run pre-commit
11168
```
11269

11370
## Publishing and releases

0 commit comments

Comments
 (0)