-
Notifications
You must be signed in to change notification settings - Fork 231
Expand file tree
/
Copy pathnoxfile.py
More file actions
36 lines (26 loc) · 1.2 KB
/
noxfile.py
File metadata and controls
36 lines (26 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import nox
# Use uv for faster dependency installation and Python version management
nox.options.default_venv_backend = "uv"
# Test against all currently supported Python versions (3.10+)
PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
@nox.session(python=PYTHON_VERSIONS)
def tests(session: nox.Session) -> None:
"""Run the test suite across Python versions."""
session.install(".[test]")
session.run("python", "-m", "PyEMD.tests.test_all")
@nox.session(python=PYTHON_VERSIONS)
def tests_pytest(session: nox.Session) -> None:
"""Run the test suite with pytest across Python versions."""
session.install(".[test]")
session.run("pytest", "PyEMD/tests/", "-v")
@nox.session(python=PYTHON_VERSIONS[-1]) # Latest Python only
def lint(session: nox.Session) -> None:
"""Run linting checks."""
session.install(".[dev]")
session.run("isort", "--check", "PyEMD")
session.run("black", "--check", "PyEMD", "doc", "example")
@nox.session(python=PYTHON_VERSIONS[-1]) # Latest Python only
def typecheck(session: nox.Session) -> None:
"""Run type checking (if mypy is added later)."""
session.install(".", "mypy")
session.run("mypy", "PyEMD", "--ignore-missing-imports")