-
Notifications
You must be signed in to change notification settings - Fork 52
/
noxfile.py
50 lines (40 loc) · 1.3 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
44
45
46
47
48
49
50
import tempfile
from pathlib import Path
import nox
ALL_PYTHON_VS = ["3.9", "3.10", "3.11"]
@nox.session(python=ALL_PYTHON_VS)
def test_pymc3(session):
session.install(".[test,pymc3]")
session.install("batman-package", "starry>=0.9.9", "tqdm")
session.run("python", "-c", "import theano")
session.run("python", "-c", "import exoplanet_core.pymc3.ops")
session.run("python", "-c", "import starry")
session.run("pytest", "-v", *session.posargs)
@nox.session(python=ALL_PYTHON_VS)
def test_pymc(session):
session.install(".[test,pymc]")
session.install("batman-package")
session.run("python", "-c", "import pytensor")
session.run("python", "-c", "import exoplanet_core.pymc.ops")
session.run("pytest", "-v", *session.posargs)
@nox.session(python=ALL_PYTHON_VS)
def lint(session):
session.install("pre-commit")
session.run("pre-commit", "run", "--all-files", *session.posargs)
@nox.session
def docs(session):
session.install(".[docs]")
session.install("sphinx")
session.run(
"sphinx-build",
"--color",
"-W",
"-b",
"dirhtml",
"-d",
str(session.cache_dir / "doctrees"),
"docs",
str(session.cache_dir / "dirhtml"),
*session.posargs
)
session.run("open", session.cache_dir)