-
Notifications
You must be signed in to change notification settings - Fork 24
/
noxfile.py
34 lines (26 loc) · 991 Bytes
/
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
import platform
from pathlib import Path
import nox
PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
@nox.session(python=PYTHON_VERSIONS)
def test(session: nox.Session) -> None:
session.install(".[test]")
session.run("pytest", *session.posargs)
@nox.session(python=PYTHON_VERSIONS)
def comparison(session: nox.Session) -> None:
session.install(".[test,comparison]")
session.run("pytest", *session.posargs, env={"JAX_ENABLE_X64": "1"})
@nox.session(python=PYTHON_VERSIONS)
def doctest(session: nox.Session) -> None:
if platform.system() == "Windows":
module = Path(session.virtualenv.location) / "Lib" / "site-packages" / "tinygp"
else:
module = (
Path(session.virtualenv.location)
/ "lib"
/ f"python{session.python}"
/ "site-packages"
/ "tinygp"
)
session.install(".[test]", "numpyro")
session.run("pytest", "--doctest-modules", "-v", str(module), *session.posargs)