Skip to content

Commit

Permalink
!squash
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Nov 25, 2024
1 parent d029926 commit 084779e
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions docs/developing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Development

[poetry] is a required package to develop.
Install and [git] and [uv]

Clone:

```console
$ git clone https://github.com/tmux-python/libtmux.git
Expand All @@ -10,15 +12,20 @@ $ git clone https://github.com/tmux-python/libtmux.git
$ cd libtmux
```

Install packages:

```console
$ poetry install -E "docs test coverage lint"
$ uv sync --all-extras --dev
```

[installation documentation]: https://docs.astral.sh/uv/getting-started/installation/
[git]: https://git-scm.com/

Makefile commands prefixed with `watch_` will watch files and rerun.

## Tests

`poetry run py.test`
`uv run py.test`

Helpers: `make test`
Rerun tests on file change: `make watch_test` (requires [entr(1)])
Expand Down Expand Up @@ -63,7 +70,7 @@ The project uses [ruff] to handle formatting, sorting imports and linting.
poetry:
```console
$ poetry run ruff
$ uv run ruff
```
If you setup manually:
Expand Down Expand Up @@ -97,7 +104,7 @@ requires [`entr(1)`].
poetry:
```console
$ poetry run ruff check . --fix
$ uv run ruff check . --fix
```
If you setup manually:
Expand All @@ -117,7 +124,7 @@ $ ruff check . --fix
poetry:
```console
$ poetry run ruff format .
$ uv run ruff format .
```
If you setup manually:
Expand Down Expand Up @@ -145,7 +152,7 @@ $ make ruff_format
poetry:
```console
$ poetry run mypy .
$ uv run mypy .
```
If you setup manually:
Expand Down Expand Up @@ -218,7 +225,7 @@ to PyPI.
This isn't used yet since package maintainers may want setup.py in the source.
See https://github.com/tmux-python/tmuxp/issues/625.

As of 0.10, [poetry] handles virtualenv creation, package requirements, versioning,
As of 0.10, [uv] handles virtualenv creation, package requirements, versioning,
building, and publishing. Therefore there is no setup.py or requirements files.

Update `__version__` in `__about__.py` and `pyproject.toml`::
Expand All @@ -227,11 +234,9 @@ Update `__version__` in `__about__.py` and `pyproject.toml`::
git tag v0.1.1
git push
git push --tags
poetry build
poetry deploy

[twine]: https://twine.readthedocs.io/
[poetry]: https://python-poetry.org/
[uv]: https://github.com/astral-sh/uv
[entr(1)]: http://eradman.com/entrproject/
[`entr(1)`]: http://eradman.com/entrproject/
[ruff format]: https://docs.astral.sh/ruff/formatter/
Expand Down

0 comments on commit 084779e

Please sign in to comment.