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
47 changes: 44 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,49 @@
# tox configuration for running tests and checks across multiple environments.
[tox]
envlist = py36,py37,py38,py39
# List of environments to run by default (using 'tox').
# Includes modern Python versions (3.9+) and critical code quality checks.
envlist = py39, py310, py311, py312, lint, mypy

# ==================================
# Base Configuration for Testing
# ==================================
[testenv]
description = Run tests for Python {basepython}
# Use the corresponding python version installed on the system
basepython =
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12

# Install dependencies from the test requirements file
deps =
-r requirements/requirements-test.txt

# Commands to execute (running pytest with verbosity)
commands =
pytest -v

# ==================================
# Code Quality Checks
# ==================================

# Environment for running code style checks (e.g., Flake8)
[testenv:lint]
description = Check code style with Flake8
skip_install = True
deps =
flake8
commands =
flake8 {toxinidir}

# Environment for running static type checks (e.g., Mypy)
[testenv:mypy]
description = Run static type checking with Mypy
skip_install = True
deps =
-rrequirements/requirements-test.txt
mypy
# Install test dependencies for type checking context (optional but recommended)
-r requirements/requirements-test.txt
commands =
pytest
mypy {toxinidir}