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
+37-4Lines changed: 37 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,38 +129,71 @@ Follow these steps to start contributing:
129
129
130
130
🚨 **Do not** work on the `main` branch.
131
131
132
-
4. for development, we use `poetry` instead of just `pip` to easily track our dependencies.
133
-
If you don't have it already, follow the [instructions](https://python-poetry.org/docs/#installation)to install it (use a version >=2.1.0).
132
+
4. for development, we advise to use a tool like `poetry` or `uv` instead of just `pip` to easily track our dependencies.
133
+
Follow the instructions to [install poetry](https://python-poetry.org/docs/#installation) (use a version >=2.1.0) or to [install uv](https://docs.astral.sh/uv/getting-started/installation/#installation-methods) if you don't have one of them already.
134
134
135
135
Set up a development environment with conda or miniconda:
If you're using `uv`, it can manage python versions so you can instead do:
141
+
```bash
142
+
uv venv --python 3.10 &&source .venv/bin/activate
143
+
```
144
+
140
145
To develop on 🤗 LeRobot, you will at least need to install the `dev` and `test` extras dependencies along with the core library:
146
+
147
+
using `poetry`
148
+
```bash
149
+
poetry sync --extras "dev test"
150
+
```
151
+
152
+
using `uv`
141
153
```bash
142
-
poetry install --sync --extras "dev test"
154
+
uv sync --extra dev --extra test
143
155
```
144
156
145
157
You can also install the project with all its dependencies (including environments):
158
+
159
+
using `poetry`
146
160
```bash
147
161
poetry sync --all-extras
148
162
```
149
163
164
+
using `uv`
165
+
```bash
166
+
uv sync --all-extras
167
+
```
168
+
150
169
> **Note:** If you don't install simulation environments with `--all-extras`, the tests that require them will be skipped when running the pytest suite locally. However, they *will* be tested in the CI. In general, we advise you to install everything and test locally before pushing.
151
170
152
171
Whichever command you chose to install the project (e.g. `poetry sync --all-extras`), you should run it again when pulling code with an updated version of `pyproject.toml` and `poetry.lock` in order to synchronize your virtual environment with the new dependencies.
153
172
154
173
The equivalent of `pip install some-package`, would just be:
174
+
175
+
using `poetry`
155
176
```bash
156
177
poetry add some-package
157
178
```
158
179
180
+
using `uv`
181
+
```bash
182
+
uv add some-package
183
+
```
184
+
159
185
When making changes to the poetry sections of the `pyproject.toml`, you should run the following command to lock dependencies.
186
+
using `poetry`
160
187
```bash
161
-
poetry lock --no-update
188
+
poetry lock
162
189
```
163
190
191
+
using `uv`
192
+
```bash
193
+
uv lock
194
+
```
195
+
196
+
164
197
5. Develop the features on your branch.
165
198
166
199
As you work on the features, you should make sure that the test suite
0 commit comments