From 98a5a20d8aaf137ff59bd7ec4190ae6f8d317c92 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Mon, 13 Jan 2025 12:10:46 -0600 Subject: [PATCH] Migrate coverage config into `pyproject.toml` --- .coveragerc | 29 ----------------------------- pyproject.toml | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 29 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index d4516da62..000000000 --- a/.coveragerc +++ /dev/null @@ -1,29 +0,0 @@ -[run] -parallel = True -source = - globus_cli - -[paths] -source = - src - */site-packages - -[report] -show_missing = True -skip_covered = True -fail_under = 87 - -exclude_lines = - # the pragma to disable coverage - pragma: no cover - # don't complain if tests don't hit unimplemented methods/modes - raise NotImplementedError - assert_never() - # don't check on executable components of importable modules - if __name__ == .__main__.: - # don't check coverage on type checking conditionals - if t.TYPE_CHECKING: - # skip overloads - @t.overload - # skip abstract methods - @abc.abstractmethod diff --git a/pyproject.toml b/pyproject.toml index 31f3db424..14c3547e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,34 @@ profile = "black" addopts = "-n auto --maxprocesses 8 --timeout 3 --color=yes" filterwarnings = ["error"] +[tool.coverage.run] +parallel = true +source = ["globus_cli"] +[tool.coverage.paths] +source = [ + "src/", + "*/site-packages/", +] +[tool.coverage.report] +show_missing = true +skip_covered = true +fail_under = 87 +exclude_lines =[ + # the pragma to disable coverage + "pragma: no cover", + # don't complain if tests don't hit unimplemented methods/modes + "raise NotImplementedError", + "assert_never()", + # don't check on executable components of importable modules + "if __name__ == .__main__.:", + # don't check coverage on type checking conditionals + "if t.TYPE_CHECKING:", + # skip overloads + "@t.overload", + # skip abstract methods + "@abc.abstractmethod", +] + [tool.scriv] version = "literal: src/globus_cli/version.py: __version__" categories = "Bugfixes, Enhancements, Other"