Skip to content

Commit 3cfacad

Browse files
committed
!squash
1 parent c8b76b9 commit 3cfacad

File tree

1 file changed

+23
-30
lines changed

1 file changed

+23
-30
lines changed

docs/developing.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ $ cd tmuxp
3333

3434
### Bootstrap
3535

36-
The easiest way to configure a dev environment is through [poetry]. This
36+
The easiest way to configure a dev environment is through [uv]. This
3737
automatically will manage virtualenv and python dependencies for tmuxp.
38-
For information on installing poetry visit the [poetry's documentation].
38+
For information on installing uv visit the [uv's documentation].
3939

4040
To begin developing, check out the code from github:
4141

@@ -48,34 +48,29 @@ $ cd tmuxp
4848
```
4949

5050
You can create a virtualenv, and install all of the locked
51-
packages as listed in poetry.lock:
51+
packages as listed in uv.lock:
5252

5353
```console
54-
$ poetry install
54+
$ uv sync --all-extras --dev
5555
```
5656

5757
If you ever need to update packages during your development session, the
58-
following command can be used to update all packages as per poetry settings or
59-
individual package (second command):
58+
following command can be used to update all packages as per uv settings:
6059

6160
```console
62-
$ poetry update
61+
$ uv sync --all-extras --dev --upgrade
6362
```
6463

65-
```console
66-
$ poetry update requests
67-
```
68-
69-
Then activate it to your current tty / terminal session with:
64+
Then before any python command in tty / terminal session, run with:
7065

7166
```console
72-
$ poetry shell
67+
$ uv run [command]
7368
```
7469

7570
That is it! You are now ready to code!
7671

77-
[poetry]: https://python-poetry.org/
78-
[poetry's documentation]: https://python-poetry.org/docs/
72+
[uv]: https://github.com/astral-sh/uv
73+
[uv's documentation]: https://docs.astral.sh/uv
7974

8075
### Advanced: Manual virtualenv
8176

@@ -134,7 +129,7 @@ $ make watch_test
134129
### Manual (just the command, please)
135130

136131
```console
137-
$ poetry run py.test
132+
$ uv run py.test
138133
```
139134

140135
or:
@@ -159,19 +154,19 @@ $ env PYTEST_ADDOPTS="-verbose" make start
159154
Pick a file:
160155

161156
```console
162-
$ env PYTEST_ADDOPTS="tests/workspace/test_builder.py" poetry run make start
157+
$ env PYTEST_ADDOPTS="tests/workspace/test_builder.py" uv run make start
163158
```
164159

165160
Drop into `test_automatic_rename_option()` in `tests/workspace/test_builder.py`:
166161

167162
```console
168-
$ env PYTEST_ADDOPTS="-s -x -vv tests/workspace/test_builder.py" poetry run make start
163+
$ env PYTEST_ADDOPTS="-s -x -vv tests/workspace/test_builder.py" uv run make start
169164
```
170165

171166
Drop into `test_automatic_rename_option()` in `tests/workspace/test_builder.py` and stop on first error:
172167

173168
```console
174-
$ env PYTEST_ADDOPTS="-s -x -vv tests/workspace/test_builder.py::test_automatic_rename_option" poetry run make start
169+
$ env PYTEST_ADDOPTS="-s -x -vv tests/workspace/test_builder.py::test_automatic_rename_option" uv run make start
175170
```
176171

177172
Drop into `pdb` on first error:
@@ -299,10 +294,8 @@ $ cd doc
299294
$ make watch
300295
```
301296

302-
If you're not source'd via `poetry shell`, you can use this:
303-
304297
```console
305-
$ make SPHINXBUILD='poetry run sphinx-build' watch
298+
$ make SPHINXBUILD='uv run sphinx-build' watch
306299
```
307300

308301
(tmuxp-developer-config)=
@@ -335,10 +328,10 @@ The project uses [ruff] to handle formatting, sorting imports and linting.
335328

336329
````{tab} Command
337330
338-
poetry:
331+
uv:
339332
340333
```console
341-
$ poetry run ruff
334+
$ uv run ruff
342335
```
343336
344337
If you setup manually:
@@ -369,10 +362,10 @@ requires [`entr(1)`].
369362

370363
````{tab} Fix files
371364
372-
poetry:
365+
uv:
373366
374367
```console
375-
$ poetry run ruff check . --fix
368+
$ uv run ruff check . --fix
376369
```
377370
378371
If you setup manually:
@@ -389,10 +382,10 @@ $ ruff check . --fix
389382

390383
````{tab} Command
391384
392-
poetry:
385+
uv:
393386
394387
```console
395-
$ poetry run ruff format .
388+
$ uv run ruff format .
396389
```
397390
398391
If you setup manually:
@@ -417,10 +410,10 @@ $ make ruff_format
417410

418411
````{tab} Command
419412
420-
poetry:
413+
uv:
421414
422415
```console
423-
$ poetry run mypy .
416+
$ uv run mypy .
424417
```
425418
426419
If you setup manually:

0 commit comments

Comments
 (0)