From 4c02b57672ca733bacf1f5f1a8edf8196484f566 Mon Sep 17 00:00:00 2001 From: Christian Groschupp Date: Fri, 28 Mar 2025 10:27:07 +0100 Subject: [PATCH] docs: replace poetry by uv --- .gitignore | 11 ----------- .pre-commit-config.yaml | 4 ++-- README.md | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index 5fdc13c..b30f846 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ab0c47..dab0e14 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/README.md b/README.md index e6e8f4c..0e64ec9 100644 --- a/README.md +++ b/README.md @@ -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