From de0eba1c27278c16bc9c5128ca7db948fd0e497a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 8 Aug 2024 16:48:57 -0400 Subject: [PATCH 1/2] Split the test dependencies into four classes (test, cover, type, check). Allows for easier exclusion by downstream integrators. Ref jaraco/skeleton#138 --- pyproject.toml | 25 ++++++++++++++++++++----- tox.ini | 4 ++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1307e1fa..54ed4886 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,14 +28,10 @@ Source = "https://github.com/PROJECT_PATH" test = [ # upstream "pytest >= 6, != 8.1.*", - "pytest-checkdocs >= 2.4", - "pytest-cov", - "pytest-mypy", - "pytest-enabler >= 2.2", - "pytest-ruff >= 0.2.1; sys_platform != 'cygwin'", # local ] + doc = [ # upstream "sphinx >= 3.5", @@ -47,4 +43,23 @@ doc = [ # local ] +enabler = [ + "pytest-enabler >= 2.2", +] + +check = [ + "pytest-checkdocs >= 2.4", + "pytest-ruff >= 0.2.1; sys_platform != 'cygwin'", +] + +cover = [ + "pytest-cov", +] + +type = [ + "pytest-mypy", +] + + + [tool.setuptools_scm] diff --git a/tox.ini b/tox.ini index cc4db36e..1a3f1671 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,10 @@ commands = usedevelop = True extras = test + cover + type + check + enabler [testenv:diffcov] description = run tests and check that diff from main is covered From bc5db71b5118f01ba0c3d3efb7eefb26d0302dd9 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 8 Aug 2024 16:57:30 -0400 Subject: [PATCH 2/2] Use consistent ordering in the extras. --- pyproject.toml | 8 ++++---- tox.ini | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 54ed4886..31057d85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,10 +43,6 @@ doc = [ # local ] -enabler = [ - "pytest-enabler >= 2.2", -] - check = [ "pytest-checkdocs >= 2.4", "pytest-ruff >= 0.2.1; sys_platform != 'cygwin'", @@ -56,6 +52,10 @@ cover = [ "pytest-cov", ] +enabler = [ + "pytest-enabler >= 2.2", +] + type = [ "pytest-mypy", ] diff --git a/tox.ini b/tox.ini index 1a3f1671..01f0975f 100644 --- a/tox.ini +++ b/tox.ini @@ -8,10 +8,10 @@ commands = usedevelop = True extras = test - cover - type check + cover enabler + type [testenv:diffcov] description = run tests and check that diff from main is covered