From 312ce5a24aa21bd912f4b0b556603b828dd645f0 Mon Sep 17 00:00:00 2001 From: Egor Deev Date: Fri, 2 Oct 2026 11:59:07 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B8:=20=D0=B7=D0=B0=D0=BA=D1=80=D0=B5?= =?UTF-8?q?=D0=BF=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8?= =?UTF-8?q?=D0=B8,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=BD=D0=B5=D0=B4=D0=BE=D1=81=D1=82=D0=B0=D1=8E=D1=89?= =?UTF-8?q?=D0=B8=D0=B5,=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD=D1=8B=20=D0=BB?= =?UTF-8?q?=D0=B8=D1=88=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - добавлены python-dotenv (без него падал settings.py) и whitenoise; - убраны неиспользуемые python-telegram-bot, vk-api, django-recaptcha, python-slugify; - версии закреплены по рабочему окружению продакшена; - requirements-dev.txt (pytest, pytest-django, ruff) и настройки ruff/pytest в pyproject.toml. --- pyproject.toml | 20 ++++++++++++++++++++ requirements-dev.txt | 4 ++++ requirements.txt | 20 +++++++++----------- 3 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 pyproject.toml create mode 100644 requirements-dev.txt diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8228014 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,20 @@ +[tool.ruff] +target-version = "py310" +line-length = 120 +extend-exclude = ["main/migrations"] + +[tool.ruff.lint] +select = ["E", "F", "W", "B", "S", "UP", "I"] +ignore = [ + "E501", # длинные строки — в шаблонах сообщений и help_text + "S308", # mark_safe — проверяется вручную + "UP031", # %-форматирование в логах — осознанно +] + +[tool.ruff.lint.per-file-ignores] +"main/tests/*" = ["S101", "S106"] +"main/management/commands/*" = ["S311"] + +[tool.pytest.ini_options] +DJANGO_SETTINGS_MODULE = "dspace.settings" +python_files = ["test_*.py"] diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..eca60e8 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,4 @@ +-r requirements.txt +pytest==8.4.2 +pytest-django==4.11.1 +ruff==0.14.0 diff --git a/requirements.txt b/requirements.txt index 5962630..aeff8ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,9 @@ -Django>=4.2,<5.0 -Pillow>=10.0.0 -python-slugify>=8.0.0 -Unidecode>=1.3.0 -bleach>=6.0.0 -requests>=2.31.0 -python-telegram-bot>=20.0 -vk-api>=11.9.9 -django-recaptcha>=3.0.0 -gunicorn>=21.0.0 -beautifulsoup4>=4.12.0 \ No newline at end of file +Django==4.2.27 +python-dotenv==1.2.1 +Pillow==12.0.0 +bleach==6.3.0 +beautifulsoup4==4.14.3 +requests==2.32.5 +Unidecode==1.4.0 +whitenoise==6.11.0 +gunicorn==23.0.0