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. # install all needed dependencies.
#Pipfile.lock #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 # pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock #pdm.lock
@ -173,10 +166,6 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml
# ruff # ruff
.ruff_cache/ .ruff_cache/

View File

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

View File

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