From 10de7efb353af30826d428d148189c4c381e5fdc Mon Sep 17 00:00:00 2001 From: Lukas Burgholzer Date: Sun, 25 Oct 2026 14:18:33 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Keep=20Git=20Qiskit=20in=20the?= =?UTF-8?q?=20nox=20test=20process?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 *AI text below* 🤖 Use a uv run overlay so project synchronization cannot replace the Git Qiskit build with the locked release before pytest starts. Keep the native MQT DDSIM build setup and normal test sessions unchanged. Remove the unused command hook, lockfile move and base-environment package report. Validate the imported Git provenance inside the test process. Assisted-by: Codex --- noxfile.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/noxfile.py b/noxfile.py index b5c05370..dd7f3a77 100755 --- a/noxfile.py +++ b/noxfile.py @@ -63,7 +63,7 @@ def _run_tests( session: nox.Session, *, install_args: Sequence[str] = (), - extra_command: Sequence[str] = (), + uv_run_args: Sequence[str] = (), run_args: Sequence[str] = (), ) -> None: env = {"UV_PROJECT_ENVIRONMENT": session.virtualenv.location} @@ -84,8 +84,6 @@ def _run_tests( *install_args, env=env, ) - if extra_command: - session.run(*extra_command, env=env) session.run( "uv", "run", @@ -93,6 +91,7 @@ def _run_tests( "--no-build-isolation-package", "mqt-ddsim", # build the project without isolation *install_args, + *uv_run_args, "pytest", *run_args, *session.posargs, @@ -122,14 +121,11 @@ def minimums(session: nox.Session) -> None: @nox.session(reuse_venv=True, venv_backend="uv", python=PYTHON_ALL_VERSIONS) def qiskit(session: nox.Session) -> None: - """Tests against the latest version of Qiskit.""" - with preserve_lockfile(): - _run_tests( - session, - extra_command=["uv", "pip", "install", "qiskit[qasm3-import] @ git+https://github.com/Qiskit/qiskit.git"], - ) - env = {"UV_PROJECT_ENVIRONMENT": session.virtualenv.location} - session.run("uv", "pip", "show", "qiskit", env=env) + """Test Qiskit main in a uv overlay without changing the project lock.""" + _run_tests( + session, + uv_run_args=["--with", "qiskit[qasm3-import] @ git+https://github.com/Qiskit/qiskit.git"], + ) @nox.session(python="3.14", reuse_venv=True)