You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+12-55Lines changed: 12 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,65 +1,31 @@
1
1
## Setting up the environment
2
2
3
-
### With Rye
3
+
### With UV
4
4
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.
6
6
7
-
After installing Rye, you'll just have to run this command:
7
+
After installing UV, you'll just have to run this command:
8
8
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
22
11
```
23
12
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:
27
13
28
-
```sh
29
-
$ pip install -r requirements-dev.lock
30
-
```
31
14
32
15
## Modifying/Adding code
33
16
34
17
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
35
18
result in merge conflicts between manual patches and changes from the generator. The generator will never
36
19
modify the contents of the `src/llama_stack_client/lib/` and `examples/` directories.
37
20
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
-
55
21
## Using the repository from source
56
22
57
23
If you’d like to use the repository from source, you can either install from git or link to a cloned repository:
0 commit comments