1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-01-27 07:56:07 -05:00

update tox.ini

This patch updates tox.ini to use tox-uv and pytest

uv now runs the tests.
This commit is contained in:
Walter Boring 2026-01-16 14:07:33 -05:00
parent 10f70bd99d
commit f95c1a8d46
2 changed files with 22 additions and 37 deletions

View File

@ -118,7 +118,9 @@ class APRSDThreadList:
@wrapt.synchronized(lock)
def remove(self, thread_obj):
self.threads_list.remove(thread_obj)
"""Remove a thread from the list if it exists."""
if thread_obj in self.threads_list:
self.threads_list.remove(thread_obj)
@wrapt.synchronized(lock)
def stop_all(self):

55
tox.ini
View File

@ -2,10 +2,8 @@
minversion = 4.30.0
skipdist = True
skip_missing_interpreters = true
envlist = pep8,py{310,311,312,313,314}
#requires = tox-pipenv
# pip==22.0.4
# pip-tools==5.4.0
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
@ -18,14 +16,12 @@ setenv =
_PYTEST_SETUP_SKIP_APRSD_DEP=1
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
usedevelop = True
install_command = pip install {opts} {packages}
extras = tests
package = editable
deps =
pytest-cov
pytest
pytest-cov
commands =
pytest -v --cov-report term-missing --cov=aprsd {posargs}
uv run pytest -v --cov-report term-missing --cov=aprsd tests {posargs}
coverage: coverage report -m
coverage: coverage xml
@ -45,51 +41,38 @@ commands =
#sphinx-build -a -W . _build
sphinx-build -M html source build
[testenv:pep8]
deps =
flake8
commands =
flake8 {posargs} aprsd tests
[testenv:fast8]
basepython = python3
# Use same environment directory as pep8 env to save space and install time
envdir = {toxworkdir}/pep8
commands =
{toxinidir}/tools/fast8.sh
passenv = FAST8_NUM_COMMITS
[testenv:lint]
skip_install = true
deps =
ruff
ruff
commands =
ruff check aprsd tests
ruff check aprsd tests {posargs}
ruff format --check aprsd tests
[flake8]
max-line-length = 99
show-source = True
ignore = E713,E501,W503,N818
extend-ignore = E203,W503
extend-exclude = venv
exclude = .venv,.git,.tox,dist,doc,.ropeproject
[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.10: py39, pep8, type-check, docs
3.11: py311, pep8, type-check, docs
3.10: py39, lint, type-check, docs
3.11: py311, lint, type-check, docs
[testenv:fmt]
# This will reformat your code to comply with pep8
# and standard formatting
# This will reformat your code using ruff
skip_install = true
deps =
ruff
commands =
ruff format aprsd tests
ruff check --fix aprsd tests
[testenv:type-check]
skip_install = true