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

Nox_ruff #30

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import nox


@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"], venv_backend="uv")
def tests(session: nox.Session) -> None:
args = session.posargs or ["--cov"]
session.install("-r", "requirements_test.txt")
session.install(".")
session.install(".[test]")
session.run("pytest", *args)
4 changes: 2 additions & 2 deletions noxfile_conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"], venv_backend="mamba")
def conda_tests(session: nox.Session) -> None:
args = session.posargs or ["--cov"]
session.conda_install("--file", "requirements_test.txt")
session.install(".")
session.conda_install("uv")
session.install(".[test]")
session.run("pytest", *args)
6 changes: 3 additions & 3 deletions noxfile_conda_lint.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import nox

locations = "src/nbmetaclean", "tests", "noxfile.py"
locations = "."


@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"], venv_backend="mamba")
def conda_lint(session: nox.Session) -> None:
args = session.posargs or locations
session.conda_install("flake8")
session.run("flake8", *args)
session.conda_install("ruff")
session.run("ruff", "check", *args)
8 changes: 4 additions & 4 deletions noxfile_lint.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import nox

locations = "src/nbmetaclean", "tests", "noxfile.py"
locations = "."


@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"])
@nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12"], venv_backend="uv")
def lint(session: nox.Session) -> None:
args = session.posargs or locations
session.install("flake8")
session.run("flake8", *args)
session.install("ruff")
session.run("ruff", "check", *args)