Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 46 additions & 3 deletions common/tox.ini
Original file line number Diff line number Diff line change
@@ -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
black --check .