From 6c3188cbb43403e6e9e17f66a37b51ca85f5b825 Mon Sep 17 00:00:00 2001 From: Jeff Dairiki Date: Wed, 8 Feb 2023 21:03:02 -0800 Subject: [PATCH] refactor: move coverage config to pyproject.toml --- .coveragerc | 8 -------- MANIFEST.in | 2 +- pyproject.toml | 10 ++++++++++ tox.ini | 6 +++--- 4 files changed, 14 insertions(+), 12 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index f5c3c24..0000000 --- a/.coveragerc +++ /dev/null @@ -1,8 +0,0 @@ -[run] -source_pkgs = unflatten -parallel = true - -[paths] -source = - src - */site-packages diff --git a/MANIFEST.in b/MANIFEST.in index cf22a9e..cc0ce8d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,5 +3,5 @@ exclude .pre-commit-config.yaml # these are redundant, as setuptools-scm includes everything in the git repo include LICENSE.txt README.md CHANGES.md -include tox.ini .coveragerc +include tox.ini recursive-include tests *.py diff --git a/pyproject.toml b/pyproject.toml index 1cd983f..785f229 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,3 +3,13 @@ requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] + +[tool.coverage.run] +source_pkgs = ["unflatten"] +parallel = true + +[tool.coverage.paths] +source = [ + "src", + "*/site-packages", +] diff --git a/tox.ini b/tox.ini index a7c55a9..788af31 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ python = [testenv] deps = - coverage + coverage[toml] pytest commands = coverage run -m pytest {posargs:tests} @@ -29,12 +29,12 @@ depends: [testenv:cover-clean] skip_install = true -deps = coverage +deps = coverage[toml] commands = coverage erase [testenv:cover-report] skip_install = true -deps = coverage +deps = coverage[toml] commands = -coverage combine coverage report --show-missing --fail-under=100