diff --git a/.gitignore b/.gitignore index abf174d05b187a9c365e34e176ef2cc7a03c8913..fb36086fbf534507b984754dbcff14f4947b22c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,45 +1,13 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -build/ -dist/ -*.egg-info/ - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Virtual environments -venv/ -.env -.venv/ - -# PyInstaller -*.manifest -*.spec - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage +.tox +bom.json coverage.xml -.cache -.pytest_cache/ - -# Sphinx documentation -docs/_build/ - -# Editor / OS junk +.coverage +htmlcov +*.egg-info +__pycache__ +.vscode +docs/build .DS_Store -Thumbs.db -.idea/ -.vscode/ -*.swp -*.swo \ No newline at end of file + +# drawio tmp files +*.bkp diff --git a/tox.ini b/tox.ini index 6cab18c91010822224274a53fba412a9b6931858..936301481e2e1807b4a787019b0f54221957b3f1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,17 @@ [tox] envlist = lint, typecheck, docs +[testenv:coverage] +description = Run unit tests and save coverage +deps = + pytest + pytest-cov + httpx # required for fastapi TestClient + responses +commands = + coverage erase + pytest --cov mapping_provider --cov-fail-under=80 --cov-report html --cov-report xml --cov-report term -p no:checkdocs + [testenv:lint] description = Lint code with Ruff deps = ruff @@ -14,6 +25,11 @@ deps = types-requests commands = mypy mapping_provider +[testenv:sbom] +description = Create SBOM for dependency analysis +deps = cyclonedx-py +commands = cyclonedx-py environment --output-format json -o bom.json + [testenv:docs] description = Build docs deps =