From 8f307342dcc2158d94fc155f93231c3cfc781fd2 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Sat, 4 Jul 2026 03:08:10 +0200 Subject: [PATCH 1/2] test if there is a cap on the qiskit depdency --- ecosystem/validation/test_pypi.py | 7 +++++++ resources/checks.toml | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ecosystem/validation/test_pypi.py b/ecosystem/validation/test_pypi.py index c3c4c84b4f..85e2a0ab53 100644 --- a/ecosystem/validation/test_pypi.py +++ b/ecosystem/validation/test_pypi.py @@ -75,3 +75,10 @@ def test_P11(member): assert ( len(stable_packages) != 0 ), "At least one python package should declare a stable development status classifier" + + +def test_P12(member): + for pypi_package in member.pypi.values(): + assert pypi_package.compatible_with_qiskit( + 3 + ), f"Python package {pypi_package.package_name} declared itself compatible to a not-yet-released major version of Qiskit" diff --git a/resources/checks.toml b/resources/checks.toml index 90be360e9c..d0233e4b1d 100644 --- a/resources/checks.toml +++ b/resources/checks.toml @@ -242,6 +242,15 @@ description = "If the project maturiy level is is production-ready then, at leas checker = "test_pypi.py::test_P11" importance = "STRONG-RECOMMENDATION" +[P12] +title = "Have a cap on the major version for the qiskit dependency" +applies_to = "Python packages" +affects = ['member.pypi.*.requires_qiskit'] +category = "BEST-PRACTICE" +description = "As Qiskit follows semantic versioning, not having a cap for the eventual next major version, there is no guarantee that the package will continue working as expected." +checker = "test_pypi.py::test_P12" +importance = "RECOMMENDATION" + [020] title = "Primitive interface should be v2-compatible" applies_to = 'label:"Compute provider"' @@ -302,3 +311,7 @@ description = "There is an issue with some of the open-source aspect of the proj [[categories]] name = "OUT-OF-DATE" description = "The project might not follow the last best-practices or connects to Qiskit in a way that is considered old-fashioned, currently unsupported, or deprecated." + +[[categories]] +name = "BEST-PRACTICE" +description = "The project might not follow software general best-practices." From 86b9acedb50224f1bdcdf703a5170e38cbf9ddf4 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Sat, 4 Jul 2026 03:12:24 +0200 Subject: [PATCH 2/2] lint --- ecosystem/validation/test_pypi.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ecosystem/validation/test_pypi.py b/ecosystem/validation/test_pypi.py index 85e2a0ab53..877a5c8901 100644 --- a/ecosystem/validation/test_pypi.py +++ b/ecosystem/validation/test_pypi.py @@ -12,7 +12,7 @@ """Validations involving section member.pypi""" -# pylint: disable=invalid-name +# pylint: disable=invalid-name,missing-function-docstring import pytest @@ -79,6 +79,7 @@ def test_P11(member): def test_P12(member): for pypi_package in member.pypi.values(): - assert pypi_package.compatible_with_qiskit( - 3 - ), f"Python package {pypi_package.package_name} declared itself compatible to a not-yet-released major version of Qiskit" + assert pypi_package.compatible_with_qiskit(3), ( + f"Python package {pypi_package.package_name} declared " + "itself compatible with a not-yet-released major version of Qiskit" + )