From 81a99aaeab704ec436303017d8aaaec415db2ea9 Mon Sep 17 00:00:00 2001 From: deadzilla Date: Wed, 22 Jul 2026 22:25:43 +0500 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20pyproject.toml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Объединены зависимости из requirements.txt и requirements-dev.txt, настройки pytest из pytest.ini, и базовая конфигурация ruff. Dockerfile обновлён: установка зависимостей через pyproject.toml. requirements.txt/pytest.ini сохранены для обратной совместимости. --- Dockerfile | 4 ++-- pyproject.toml | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml diff --git a/Dockerfile b/Dockerfile index 81da2cc..effc5fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,8 @@ WORKDIR /app RUN mkdir -p logs # Устанавливаем зависимости и утилиту ps для healthcheck -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt && \ +COPY pyproject.toml . +RUN pip install --no-cache-dir . && \ apt-get update && apt-get install -y --no-install-recommends tzdata procps && \ rm -rf /var/lib/apt/lists/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..be1b558 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,25 @@ +[project] +name = "discord-bot" +version = "0.1.0" +description = "Discord бот с утренним дайджестом" +requires-python = ">=3.11" +dependencies = [ + "discord.py~=2.7.1", + "python-dotenv~=1.2.2", + "requests~=2.34.2", + "defusedxml~=0.7.1", +] + +[project.optional-dependencies] +dev = [ + "pre-commit>=3.5.0", + "pytest>=7.4.0", + "pytest-asyncio>=0.21.0", + "ruff>=0.8.0", +] + +[tool.pytest.ini_options] +asyncio_mode = "auto" + +[tool.ruff] +target-version = "py311"