From fc91a9a43266f5877d0b5b3224bee126697aae08 Mon Sep 17 00:00:00 2001 From: ewa Date: Thu, 27 Nov 2025 03:38:10 +0300 Subject: [PATCH] Update tox.ini --- common/tox.ini | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/common/tox.ini b/common/tox.ini index 52eb76f5..0c0f04e0 100644 --- a/common/tox.ini +++ b/common/tox.ini @@ -1,11 +1,54 @@ [tox] -envlist = py39,310,311,312,313 +# Define environments to run for comprehensive testing. +# py39, py310, py311, py312, py313 are standard test environments. +# lint and format-check are added for code quality assurance. +envlist = py{39,10,11,12,13}, lint, format-check + +# Ensures the project's source distribution is built in isolation before installing. isolated_build = true +# ------------------------------------ +# Base Configuration for Test Environments (py39, py310, etc.) +# ------------------------------------ [testenv] +# Dependencies needed to run tests (pytest itself). deps = pytest +# Explicitly allow external commands (Poetry) for security/modern tox versions. allowlist_externals = poetry +# Ensure all project dependencies are installed by Poetry first. +# Note: This relies on 'poetry install' respecting the environment and installing test dependencies. commands_pre = - poetry install -v + poetry install +# Run the tests. +commands = + pytest + +# ------------------------------------ +# Code Quality - LINTING Environment +# Checks static code analysis (style and types) +# ------------------------------------ +[testenv:lint] +skip_install = True +# Linting tools: flake8 for style/errors, mypy for type checking. +deps = + flake8 + mypy + poetry +# Check all Python files +commands = + flake8 . + mypy . + +# ------------------------------------ +# Code Quality - FORMAT CHECK Environment +# Checks code formatting using Black (no auto-fix). +# ------------------------------------ +[testenv:format-check] +skip_install = True +# Black is the standard formatter. +deps = + black + poetry +# Check all files recursively without modifying them (-c is check-only). commands = - pytest \ No newline at end of file + black --check .