[global] alwayscopy = True [gh] use_discover = False [tox] envlist = clean i18n compile minimal build release validate twine-check minversion = 4.0 requires = virtualenv>=20.0.0 isolated_build = True [testenv] skip_install = false usedevelop = true changedir = {toxinidir} allowlist_externals = * ensurepip = true setenv = COVERAGE_RCFILE = {toxinidir}/pyproject.toml [testenv:build-rpm] description = Run RPM packaging via Docker allowlist_externals = docker bash commands = docker compose run --user root --rm rpmbuild.el9 bash build-rpm.sh [testenv:lint] description = Run static analysis using Ruff deps = ruff commands = ruff check . {posargs} [testenv:format] description = Auto-format code using Ruff deps = ruff commands = ruff check . --fix {posargs} # - This defines a CLI script entry point for packaging. # - It ensures that pip install . or python -m build includes # a working apprise command. # - This is required for proper packaging and end-user usage [project.scripts] apprise = "apprise.cli:main" [testenv:apprise] description = Run Apprise CLI with args commands = apprise {posargs} [testenv:cli] description = Sanity-check Apprise CLI invocation commands = apprise --version [testenv:checkdone] description = Lint + full test run to ensure PR readiness extras = dev,all-plugins commands = pip install --no-cache-dir -e ".[dev,all-plugins]" ruff check . coverage run --source=apprise -m pytest tests {posargs} coverage report [testenv:qa] description = Full tests with all plugins + code coverage extras = dev,all-plugins commands = pip install --no-cache-dir -e ".[dev,all-plugins]" coverage run --source=apprise -m pytest tests {posargs} coverage report [testenv:minimal] description = Minimal dependencies + code coverage extras = dev commands = pip install --no-cache-dir -e ".[dev]" coverage run --source=apprise -m pytest tests {posargs} coverage report [testenv:test] description = Run simplified tests without coverage extras = dev,all-plugins commands = pip install --no-cache-dir -e ".[dev,all-plugins]" pytest --tb=short -q {posargs} [testenv:clean] description = Remove build artifacts and cache files skip_install = true allowlist_externals = find rm commands = find . -type f -name "*.pyc" -delete find . -type f -name "*.pyo" -delete find . -type f -name "*.orig" -delete find . -type d -name "__pycache__" -delete rm -rf BUILD SOURCES SRPMS BUILDROOT .cache .ruff_cache .coverage-reports .coverage coverage.xml dist build apprise.egg-info .mypy_cache .pytest_cache [testenv:i18n] description = Extract and update .pot/.po files for translation extras = dev deps = Babel ensurepip = true commands = mkdir -p apprise/i18n pybabel extract -F babel.cfg -o apprise/i18n/apprise.pot apprise pybabel update -i apprise/i18n/apprise.pot -d apprise/i18n [testenv:compile] description = Compile .mo files deps = Babel commands = pybabel compile -d apprise/i18n [testenv:build] description = Build sdist and wheel (assumes translations compiled) deps = build commands = python -m build [testenv:build-sdist] deps = build commands = python -m build --sdist [testenv:build-wheel] deps = build commands = python -m build --wheel [testenv:validate] description = Validate pyproject.toml against PEP 621/508 deps = rpmlint validate-pyproject packaging commands = validate-pyproject pyproject.toml rpmlint packaging/redhat/python-apprise.spec [testenv:twine-check] description = Run twine check on dist artifacts deps = build twine commands = rm -rf dist python -m build twine check dist/* [testenv:man] description = Rebuild the Apprise man page allowlist_externals = docker commands = docker compose run --rm rpmbuild.el9 ronn \ --organization="Chris Caron " \ packaging/man/apprise.md [testenv:release] description = Prepare translations, compile, and build all artifacts deps = validate-pyproject packaging Babel build twine commands = tox -e clean tox -e validate tox -e i18n tox -e compile tox -e build tox -e twine-check