-
Notifications
You must be signed in to change notification settings - Fork 5
/
noxfile.py
43 lines (31 loc) · 1.15 KB
/
noxfile.py
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
37
38
39
40
41
42
43
import nox
@nox.session()
def lint(session):
session.install("flake8")
session.run("flake8", "src", "tests", "setup.py", "noxfile.py", "docs/conf.py")
@nox.session()
def check(session):
session.install("build")
session.install("twine")
session.install("wheel")
session.install("check-manifest")
session.run("check-manifest")
session.run("python", "-m", "build")
session.run("twine", "check", "dist/*.*")
@nox.session
@nox.parametrize('python', ["3.10", "3.11", "3.12"])
@nox.parametrize('pytest', ["8"])
@nox.parametrize('cython', ["0.29", "3"])
def test(session, pytest, cython):
session.install("--upgrade", "setuptools")
session.install(f"pytest=={pytest}.*")
session.install(f"cython=={cython}.*")
session.install("-e", ".")
session.run("pytest", "-vv", "tests", "src")
@nox.session()
def docs(session):
session.install("-r", "docs/requirements.txt")
session.install("-e", ".")
session.run("sphinx-build", "-b", "spelling", "docs", "dist/docs")
session.run("sphinx-build", "-b", "linkcheck", "docs", "dist/docs")
session.run("sphinx-build", "-E", "-b", "html", "docs", "dist/docs")