-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoxfile.py
More file actions
33 lines (25 loc) · 770 Bytes
/
noxfile.py
File metadata and controls
33 lines (25 loc) · 770 Bytes
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
import nox
@nox.session
def build(session):
"""Build the Rust extension using maturin."""
session.install("maturin")
session.run("maturin", "build", "--release")
@nox.session
def develop(session):
"""Build and install in editable mode."""
session.install("maturin")
session.run("maturin", "develop")
@nox.session
def test(session):
"""Run Python tests using pytest."""
session.install("maturin")
session.run("maturin", "develop")
session.install("pytest", "numpy", "pytest-benchmark")
session.install("-e", ".")
session.run("pytest", "tests")
@nox.session
def lint(session):
"""Lint Python code."""
session.install("ruff", "black")
session.run("ruff", "check")
session.run("black", "--check", ".")