Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 9 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
*.egg-info
*.pyc
# Distribution / packaging
build/
dist/
*.egg-info/

# Unit test / coverage reports
__pycache__
htmlcov/
.tox/
.coverage
.coverage.*
durations/*
coverage*.xml
dist
htmlcov
test
qcfg.json

# IDEs
.vscode/
Expand All @@ -23,23 +27,9 @@ venv/
# Mac personalization files
*.DS_Store

# Tox envs
.tox

# Backup files and folders
*.bkp
*.bkp.*
*bkp*

# Build output
/build/lib/

# Generated by setuptools_scm
/fms_mo/_version.py

# Generated by tests
qcfg.json

# Generated by spelling check
dictionary.dic

31 changes: 11 additions & 20 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@ envlist = ruff, lint, spellcheck, unit
minversion = 4.4

[testenv]
description = run tests (unit)
description = run tests (unit, unitcov)
extras =
dev
package = wheel
wheel_build_env = pkg
deps =
pytest
pytest-cov
pytest-html
commands =
unit: {basepython} -m pytest {posargs:tests}
unit: {envpython} -m pytest {posargs:tests}
unitcov: {envpython} -W error::UserWarning -m pytest --cov=fms_mo --cov-report term --cov-report=html:coverage-{env_name} --cov-report=xml:coverage-{env_name}.xml --html=durations/{env_name}.html {posargs:tests -m "not (examples or slow)"}

[testenv:py3]
basepython = python3.11

[testenv:unit]
basepython = {[testenv:py3]basepython}

[testenv:unitcov]
basepython = {[testenv:py3]basepython}

[testenv:lint]
description = lint with pylint
basepython = {[testenv:py3]basepython}
Expand Down Expand Up @@ -68,23 +74,8 @@ commands =
{envpython} -m pyspelling --config {toxinidir}/.spellcheck.yml --spellchecker aspell
allowlist_externals = sh

[testenv:coverage]
description = report unit test coverage
deps =
coverage
pytest
genbadge[coverage]
commands =
coverage run \
--omit=*/_version.py \
--source=fms_mo \
--module pytest tests/
coverage report -m
coverage xml
genbadge coverage -s -i coverage.xml

[gh]
python =
3.11 = 3.11
3.10 = 3.10
3.9 = 3.9
3.11 = 3.11-{unitcov}
3.10 = 3.10-{unitcov}
3.9 = 3.9-{unitcov}
Loading