Skip to content

Commit

Permalink
Use uv whenever available in nox (#11802)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Oct 19, 2024
1 parent 57973e7 commit c7e16e5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import tomli as tomllib # type: ignore[import-not-found,no-redef]

nox.options.reuse_existing_virtualenvs = True
nox.options.default_venv_backend = "uv|virtualenv"


def install(
Expand Down Expand Up @@ -76,7 +77,10 @@ def tests(session: nox.Session) -> None:
else:
install(session, f".[{extras}]")

session.run("pip", "list")
if session.venv_backend == "uv":
session.run("uv", "pip", "list")
else:
session.run("pip", "list")

if session.name != "tests-nocoverage":
cov_args = [
Expand Down Expand Up @@ -267,7 +271,7 @@ def rust(session: nox.Session) -> None:
process_rust_coverage(session, rust_tests, prof_location)


@nox.session(venv_backend="uv|venv")
@nox.session
def local(session):
pyproject_data = load_pyproject_toml()
install(session, "-e", "./vectors", verbose=False)
Expand Down

0 comments on commit c7e16e5

Please sign in to comment.