* [Poetry](https://python-poetry.org/) for Python package and environment management.
* [uv](https://docs.astral.sh/uv/) for Python package and environment management.
## Docker Compose
## Docker Compose
@ -11,21 +11,21 @@ Start the local development environment with Docker Compose following the guide
## General Workflow
## General Workflow
By default, the dependencies are managed with [Poetry](https://python-poetry.org/), go there and install it.
By default, the dependencies are managed with [uv](https://docs.astral.sh/uv/), go there and install it.
From `./backend/` you can install all the dependencies with:
From `./backend/` you can install all the dependencies with:
```console
```console
$ poetry install
$ uv sync
```
```
Then you can start a shell session with the new environment with:
Then you can activate the virtual environment with:
```console
```console
$ poetry shell
$ source .venv/bin/activate
```
```
Make sure your editor is using the correct Python virtual environment.
Make sure your editor is using the correct Python virtual environment, with the interpreter at `backend/.venv/bin/python`.
Modify or add SQLModel models for data and SQL tables in `./backend/app/models.py`, API endpoints in `./backend/app/api/`, CRUD (Create, Read, Update, Delete) utils in `./backend/app/crud.py`.
Modify or add SQLModel models for data and SQL tables in `./backend/app/models.py`, API endpoints in `./backend/app/api/`, CRUD (Create, Read, Update, Delete) utils in `./backend/app/crud.py`.
@ -134,10 +134,10 @@ You can find a file `.pre-commit-config.yaml` with configurations at the root of
After having the `pre-commit` tool installed and available, you need to "install" it in the local repository, so that it runs automatically before each commit.
After having the `pre-commit` tool installed and available, you need to "install" it in the local repository, so that it runs automatically before each commit.
Using Poetry, you could do it with:
Using `uv`, you could do it with:
```bash
```bash
❯ poetry run pre-commit install
❯ uv run pre-commit install
pre-commit installed at .git/hooks/pre-commit
pre-commit installed at .git/hooks/pre-commit
```
```
@ -153,10 +153,10 @@ Then you can `git add` the modified/fixed files again and now you can commit.
#### Running pre-commit hooks manually
#### Running pre-commit hooks manually
you can also run `pre-commit` manually on all the files, you can do it using Poetry with:
you can also run `pre-commit` manually on all the files, you can do it using `uv` with:
```bash
```bash
❯ poetry run pre-commit run --all-files
❯ uv run pre-commit run --all-files
check for added large files..............................................Passed
check for added large files..............................................Passed