Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -84,15 +84,14 @@ def _run_tests(
*install_args,
env=env,
)
if extra_command:
session.run(*extra_command, env=env)
session.run(
"uv",
"run",
"--no-dev", # do not auto-install dev dependencies
"--no-build-isolation-package",
"mqt-ddsim", # build the project without isolation
*install_args,
*uv_run_args,
"pytest",
*run_args,
*session.posargs,
Expand Down Expand Up @@ -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)
Expand Down
Loading