mirror of
https://github.com/enpaul/spectrepy.git
synced 2025-12-19 09:12:34 +00:00
Add initial python module scaffolding and repo automation
This commit is contained in:
63
tox.ini
Normal file
63
tox.ini
Normal file
@@ -0,0 +1,63 @@
|
||||
[tox]
|
||||
envlist = py3{7,8,9,10,11}, static, static-tests, security
|
||||
isolated_build = true
|
||||
skip_missing_interpreters = true
|
||||
|
||||
[testenv]
|
||||
description = Run the tests
|
||||
require_locked_deps = true
|
||||
require_poetry = true
|
||||
poetry_dep_groups =
|
||||
test
|
||||
commands =
|
||||
pytest {toxinidir}/tests/ \
|
||||
--cov spectrepy \
|
||||
--cov-config {toxinidir}/.coveragerc \
|
||||
--cov-report term-missing
|
||||
|
||||
[testenv:static]
|
||||
description = Static formatting and quality enforcement
|
||||
basepython = python3.10
|
||||
platform = linux
|
||||
ignore_errors = true
|
||||
poetry_dep_groups =
|
||||
dev
|
||||
commands =
|
||||
pre-commit run \
|
||||
--all-files
|
||||
pylint {toxinidir}/spectrepy.py \
|
||||
--rcfile {toxinidir}/.pylintrc
|
||||
mypy {toxinidir}/spectrepy.py \
|
||||
--ignore-missing-imports \
|
||||
--no-strict-optional
|
||||
|
||||
[testenv:static-tests]
|
||||
description = Static formatting and quality enforcement for the tests
|
||||
basepython = python3.10
|
||||
platform = linux
|
||||
ignore_errors = true
|
||||
poetry_dep_groups =
|
||||
dev
|
||||
commands =
|
||||
pylint {toxinidir}/tests/ \
|
||||
--rcfile {toxinidir}/.pylintrc
|
||||
mypy {toxinidir}/tests/ \
|
||||
--ignore-missing-imports \
|
||||
--no-strict-optional
|
||||
|
||||
[testenv:security]
|
||||
description = Security checks
|
||||
basepython = python3.10
|
||||
platform = linux
|
||||
ignore_errors = true
|
||||
skip_install = true
|
||||
poetry_dep_groups =
|
||||
security
|
||||
commands =
|
||||
bandit {toxinidir}/spectrepy.py \
|
||||
--recursive \
|
||||
--quiet
|
||||
bandit {toxinidir}/tests/ \
|
||||
--recursive \
|
||||
--quiet \
|
||||
--skip B101
|
||||
Reference in New Issue
Block a user