Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update noxfile a bit #693

Merged
merged 1 commit into from
Oct 5, 2024
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
15 changes: 9 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import nox

ALL_PYTHONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

nox.needs_version = ">=2024.3.2"
nox.options.sessions = ["lint", "pylint", "tests"]
nox.needs_version = ">=2024.4.15"
nox.options.default_venv_backend = "uv|virtualenv"

ALL_PYTHONS = [
c.split()[-1]
for c in nox.project.load_toml("pyproject.toml")["project"]["classifiers"]
if c.startswith("Programming Language :: Python :: 3.")
]


@nox.session(reuse_venv=True)
def lint(session):
Expand Down Expand Up @@ -37,7 +40,7 @@ def tests(session):
session.run("pytest", *session.posargs, env={"PYTHONTRACEMALLOC": "5"})


@nox.session(reuse_venv=True)
@nox.session(reuse_venv=True, default=False)
def docs(session):
"""
Build the docs. Pass "serve" to serve.
Expand All @@ -55,7 +58,7 @@ def docs(session):
session.log("Unsupported argument to docs")


@nox.session
@nox.session(default=False)
def build(session):
"""
Build an SDist and wheel.
Expand Down