feat: добавить pyproject.toml

Объединены зависимости из requirements.txt и requirements-dev.txt,
настройки pytest из pytest.ini, и базовая конфигурация ruff.
Dockerfile обновлён: установка зависимостей через pyproject.toml.
requirements.txt/pytest.ini сохранены для обратной совместимости.
This commit is contained in:
deadzilla 2026-07-22 22:25:43 +05:00
parent 089a77ce17
commit 81a99aaeab
2 changed files with 27 additions and 2 deletions

View File

@ -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/*

25
pyproject.toml Normal file
View File

@ -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"