this removes Flask, reworks a number of library methods accordingly, and adds generators and build commands to process the instance directory (largely unchanged, except config.py is now config.json) and spit out files suitable to be served by a web server such as Nginx. there are probably some rough edges here, but overall this works. also note, as this is no longer server software on a network, the license has changed from AGPLv3 to GPLv3, and the "or any later version" allowance has been removed Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
77 lines
1.8 KiB
INI
77 lines
1.8 KiB
INI
# tox (https://tox.readthedocs.io/) is a tool for running tests
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
# and then run "tox" from this directory.
|
|
|
|
[tox]
|
|
isolated_build = true
|
|
envlist = begin,py39,py310,py311,py312,coverage,security,lint,reuse
|
|
|
|
[testenv]
|
|
allow_externals = pytest, coverage
|
|
deps =
|
|
-rrequirements/requirements-dev.txt
|
|
|
|
[testenv:build]
|
|
# require setuptools when building
|
|
deps = setuptools
|
|
|
|
[testenv:begin]
|
|
# clean up potential previous coverage runs
|
|
skip_install = true
|
|
commands = coverage erase
|
|
|
|
[testenv:py39]
|
|
# run pytest with coverage
|
|
commands =
|
|
pytest --cov-append --cov={envsitepackagesdir}/incorporealcms/ --cov-branch
|
|
|
|
[testenv:py310]
|
|
# run pytest with coverage
|
|
commands =
|
|
pytest --cov-append --cov={envsitepackagesdir}/incorporealcms/ --cov-branch
|
|
|
|
[testenv:py311]
|
|
# run pytest with coverage
|
|
commands =
|
|
pytest --cov-append --cov={envsitepackagesdir}/incorporealcms/ --cov-branch
|
|
|
|
[testenv:py312]
|
|
# run pytest with coverage
|
|
commands =
|
|
pytest --cov-append --cov={envsitepackagesdir}/incorporealcms/ --cov-branch
|
|
|
|
[testenv:coverage]
|
|
# report on coverage runs from above
|
|
skip_install = true
|
|
commands =
|
|
coverage report --fail-under=95 --show-missing
|
|
|
|
[testenv:security]
|
|
# run security checks
|
|
#
|
|
# again it seems the most valuable here to run against the packaged code
|
|
commands =
|
|
bandit {envsitepackagesdir}/incorporealcms/ -r
|
|
safety check -r requirements/requirements-dev.txt
|
|
|
|
[testenv:lint]
|
|
# run style checks
|
|
# TODO: mypy incorporealcms
|
|
commands =
|
|
flake8
|
|
- flake8 --disable-noqa --ignore= --select=E,W,F,C,D,A,G,B,I,T,M,DUO
|
|
|
|
[testenv:reuse]
|
|
# check license documentation
|
|
commands =
|
|
reuse lint
|
|
|
|
[coverage:paths]
|
|
source =
|
|
./
|
|
.tox/**/site-packages/
|
|
|
|
[coverage:run]
|
|
branch = True
|