feat: use uv instead of poetry for CI, docker and development (#3325)
Co-authored-by: arcbtc <ben@arc.wales>
This commit is contained in:
parent
15984fa49b
commit
5ba06d42d0
88 changed files with 4265 additions and 1303 deletions
|
|
@ -11,13 +11,13 @@ Thanks for contributing :)
|
|||
|
||||
# Run
|
||||
|
||||
Follow the [Basic installation: Option 1 (recommended): poetry](https://docs.lnbits.org/guide/installation.html#option-1-recommended-poetry)
|
||||
guide to install poetry and other dependencies.
|
||||
Follow the [Option 2 (recommended): UV](https://docs.lnbits.org/guide/installation.html)
|
||||
guide to install uv and other dependencies.
|
||||
|
||||
Then you can start LNbits uvicorn server with:
|
||||
|
||||
```bash
|
||||
poetry run lnbits
|
||||
uv run lnbits
|
||||
```
|
||||
|
||||
Or you can use the following to start uvicorn with hot reloading enabled:
|
||||
|
|
@ -25,7 +25,7 @@ Or you can use the following to start uvicorn with hot reloading enabled:
|
|||
```bash
|
||||
make dev
|
||||
# or
|
||||
poetry run lnbits --reload
|
||||
uv run lnbits --reload
|
||||
```
|
||||
|
||||
You might need the following extra dependencies on clean installation of Debian:
|
||||
|
|
@ -50,7 +50,7 @@ make install-pre-commit-hook
|
|||
This project has unit tests that help prevent regressions. Before you can run the tests, you must install a few dependencies:
|
||||
|
||||
```bash
|
||||
poetry install
|
||||
uv sync --all-extras --dev
|
||||
npm i
|
||||
```
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ make format
|
|||
Run mypy checks:
|
||||
|
||||
```bash
|
||||
poetry run mypy
|
||||
make mypy
|
||||
```
|
||||
|
||||
Run everything:
|
||||
|
|
|
|||
|
|
@ -42,14 +42,10 @@ mv templates/example templates/mysuperplugin # Rename templates folder.
|
|||
|
||||
DO NOT ADD NEW DEPENDENCIES. Try to use the dependencies that are available in `pyproject.toml`. Getting the LNbits project to accept a new dependency is time consuming and uncertain, and may result in your extension NOT being made available to others.
|
||||
|
||||
If for some reason your extensions must have a new python package to work, and its nees are not met in `pyproject.toml`, you can add a new package using `poerty`:
|
||||
|
||||
```sh
|
||||
$ poetry add <package>
|
||||
```
|
||||
If for some reason your extensions must have a new python package to work, and its nees are not met in `pyproject.toml`, you can add a new package using `poerty` or `uv`:
|
||||
|
||||
**But we need an extra step to make sure LNbits doesn't break in production.**
|
||||
Dependencies need to be added to `pyproject.toml`, then tested by running on `poetry` compatibility can be tested with `nix build .#checks.x86_64-linux.vmTest`.
|
||||
Dependencies need to be added to `pyproject.toml`, then tested by running on `uv` and `poetry` compatibility can be tested with `nix build .#checks.x86_64-linux.vmTest`.
|
||||
|
||||
## SQLite to PostgreSQL migration
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue