diff --git a/.github/codecov.yml b/.github/codecov.yml index 356666bf..f7313574 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -30,7 +30,7 @@ flag_management: - name: python paths: - "src/mqt/**/*.py" - after_n_builds: 3 + after_n_builds: 12 statuses: - type: project threshold: 0.5% diff --git a/extern/mqt-core b/extern/mqt-core index ed17e0c2..63fdf109 160000 --- a/extern/mqt-core +++ b/extern/mqt-core @@ -1 +1 @@ -Subproject commit ed17e0c21e18fb53b10f6ec6085ebdfd64e3bdb4 +Subproject commit 63fdf109ed86fd3320989cd34bb7c155afaf4532 diff --git a/noxfile.py b/noxfile.py index ccb04253..b280a3c3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,6 +4,7 @@ import argparse import os +import shutil import sys from typing import TYPE_CHECKING @@ -12,6 +13,9 @@ if TYPE_CHECKING: from collections.abc import Sequence +nox.needs_version = ">=2024.3.2" +nox.options.default_venv_backend = "uv|virtualenv" + nox.options.sessions = ["lint", "tests"] PYTHON_ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"] @@ -49,6 +53,11 @@ def _run_tests( if os.environ.get("CI", None) and sys.platform == "win32": env["SKBUILD_CMAKE_ARGS"] = "-T ClangCL" + if shutil.which("cmake") is None and shutil.which("cmake3") is None: + session.install("cmake") + if shutil.which("ninja") is None: + session.install("ninja") + _extras = ["test", *extras] if "--cov" in posargs: _extras.append("coverage") @@ -66,29 +75,27 @@ def tests(session: nox.Session) -> None: _run_tests(session) -@nox.session() +@nox.session(reuse_venv=True, venv_backend="uv") def minimums(session: nox.Session) -> None: """Test the minimum versions of dependencies.""" _run_tests( session, - install_args=["--constraint=test/python/constraints.txt"], + install_args=["--resolution=lowest-direct"], run_args=["-Wdefault"], + extras=["qiskit", "evaluation"], ) - session.run("pip", "list") + session.run("uv", "pip", "list") @nox.session(reuse_venv=True) def docs(session: nox.Session) -> None: - """Build the docs. Pass "--serve" to serve. Pass "-b linkcheck" to check links.""" + """Build the docs. Use "--non-interactive" to avoid serving. Pass "-b linkcheck" to check links.""" parser = argparse.ArgumentParser() - parser.add_argument("--serve", action="store_true", help="Serve after building") parser.add_argument("-b", dest="builder", default="html", help="Build target (default: html)") args, posargs = parser.parse_known_args(session.posargs) - if args.builder != "html" and args.serve: - session.error("Must not specify non-HTML builder with --serve") - - extra_installs = ["sphinx-autobuild"] if args.serve else [] + serve = args.builder == "html" and session.interactive + extra_installs = ["sphinx-autobuild"] if serve else [] session.install(*BUILD_REQUIREMENTS, *extra_installs) session.install("--no-build-isolation", "-ve.[docs]") session.chdir("docs") @@ -106,7 +113,7 @@ def docs(session: nox.Session) -> None: *posargs, ) - if args.serve: + if serve: session.run("sphinx-autobuild", *shared_args) else: session.run("sphinx-build", "--keep-going", *shared_args) diff --git a/pyproject.toml b/pyproject.toml index ce655c37..b884f9e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dynamic = ["version"] [project.optional-dependencies] test = ["pytest>=7.0"] -coverage = ["mqt.qcec[test]", "pytest-cov"] +coverage = ["mqt.qcec[test]", "pytest-cov>=4"] docs = [ "furo>=2023.08.17", "sphinx~=7.0", diff --git a/test/python/constraints.txt b/test/python/constraints.txt deleted file mode 100644 index f2723ab5..00000000 --- a/test/python/constraints.txt +++ /dev/null @@ -1,7 +0,0 @@ -scikit-build-core==0.8.1 -setuptools-scm==7.0.0 -pybind11==2.12.0 -pytest==7.0.0 -importlib_resources==5.0.0 -typing_extensions==4.2.0 -qiskit==1.0.0