docs: replace poetry by uv

This commit is contained in:
Christian Groschupp 2025-03-28 10:27:07 +01:00
parent 11d3079dbd
commit 4c02b57672
3 changed files with 16 additions and 27 deletions

11
.gitignore vendored
View File

@ -108,13 +108,6 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
@ -173,10 +166,6 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml
# ruff
.ruff_cache/

View File

@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.11.2
hooks:
- id: ruff
args: [--fix]
@ -12,7 +12,7 @@ repos:
hooks:
- id: mypy
name: mypy
entry: poetry run mypy
entry: uv run mypy
language: system
types: [python]
args: [--strict]

View File

@ -49,21 +49,21 @@ services:
### Manual Installation
Cleanmedia uses Poetry for dependency management. To install:
Cleanmedia uses uv for dependency management. To install:
```bash
# Install Poetry if you haven't already
pip install poetry
# Install uv if you haven't already
pip install uv
# Install dependencies
poetry install
uv sync
```
#### Requirements
- Python >= 3.9
- Poetry for dependency management
- Required packages (automatically installed by Poetry):
- uv for dependency management
- Required packages (automatically installed by uv):
- psycopg2
- pyyaml
- Development dependencies for testing and linting
@ -103,7 +103,7 @@ docker compose run --rm cleanmedia python cleanmedia.py -c /etc/dendrite/dendrit
### Manual Usage
```bash
poetry run python cleanmedia.py --help
uv run cleanmedia.py --help
```
### How it Works
@ -135,13 +135,13 @@ The project includes a comprehensive test suite using pytest:
```bash
# Run tests
poetry run pytest
uv run pytest
# Run tests with coverage report
poetry run pytest --cov=. --cov-report=xml
uv run pytest --cov=. --cov-report=xml
# Run specific test file
poetry run pytest tests/test_cleanmedia.py
uv run pytest tests/test_cleanmedia.py
```
### Code Quality
@ -150,19 +150,19 @@ Multiple tools ensure code quality:
```bash
# Run linting
poetry run ruff check
uv run ruff check
# Run formatting check
poetry run ruff format --check
uv run ruff format --check
# Run type checking
poetry run mypy .
uv run mypy .
```
The project uses pre-commit hooks for consistent code quality. Install them with:
```bash
poetry run pre-commit install
uv run pre-commit install
```
## License