[tox] minversion = 4.30.0 skipdist = True skip_missing_interpreters = true envlist = lint,py{311,312,313,314} requires = tox-uv # Activate isolated build environment. tox will use a virtual environment # to build a source distribution from the source tree. For build tools and # arguments use the pyproject.toml file as specified in PEP-517 and PEP-518. isolated_build = true [testenv] runner = uv-venv-lock-runner description = Run unit-testing with pytest setenv = _PYTEST_SETUP_SKIP_APRSD_DEP=1 PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 extras = tests commands = pytest -v --cov-report term-missing --cov=aprsd tests {posargs} coverage: coverage report -m coverage: coverage xml [testenv:docs] skip_install = true deps = -r{toxinidir}/requirements.txt -r docs/requirements.txt {toxinidir}/. changedir = {toxinidir}/docs commands = {envpython} clean_docs.py m2r2 --overwrite {toxinidir}/README.md {envpython} -c "import shutil, os; os.chdir('{toxinidir}'); shutil.move('README.rst', 'docs/source/readme.rst')" {envpython} fix_readme_rst.py sphinx-apidoc --force --output-dir source/apidoc {toxinidir}/aprsd #sphinx-build -a -W . _build sphinx-build -M html source build [testenv:lint] runner = uv-venv-lock-runner description = Run ruff linter and formatter checks allowlist_externals = ruff commands = ruff check aprsd tests {posargs} ruff format --check aprsd tests [testenv:fast8] basepython = python3 # Use same environment directory as lint env to save space and install time envdir = {toxworkdir}/lint commands = {toxinidir}/tools/fast8.sh passenv = FAST8_NUM_COMMITS # This is the configuration for the tox-gh-actions plugin for GitHub Actions # https://github.com/ymyzk/tox-gh-actions # This section is not needed if not using GitHub Actions for CI. [gh-actions] python = 3.11: py311, lint, type-check, docs 3.12: py312, lint, type-check, docs 3.13: py313, lint, type-check, docs 3.14: py314, lint, type-check, docs [testenv:fmt] runner = uv-venv-lock-runner description = Auto-fix code formatting and linting errors using ruff allowlist_externals = ruff commands = ruff format aprsd tests ruff check --fix aprsd tests [testenv:type-check] skip_install = true deps = mypy types-pytz types-requests types-tzlocal commands = mypy --ignore-missing-imports --install-types aprsd [testenv:pre-commit] skip_install = true basepython = python3 deps = pre-commit allowlist_externals = pre-commit commands = pre-commit run --all-files --show-diff-on-failure [testenv:fix] description = run code formatter and linter (auto-fix) skip_install = true deps = pre-commit-uv>=4.1.1 allowlist_externals = pre-commit commands = pre-commit run --all-files --show-diff-on-failure [testenv:type] runner = uv-venv-lock-runner description = run type checker via mypy commands = mypy {posargs:aprsd} [testenv:dev] runner = uv-venv-lock-runner description = dev environment extras = dev tests type commands = uv pip tree