-
Notifications
You must be signed in to change notification settings - Fork 3
/
noxfile.py
57 lines (42 loc) · 1.85 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
51
52
53
54
55
56
57
import nox
ALL_PYTHON_VS = ["3.9", "3.10", "3.11"]
@nox.session(python=ALL_PYTHON_VS)
def test(session):
session.install(".[test]")
session.run("pytest", "-v", "tests", *session.posargs)
@nox.session(python=ALL_PYTHON_VS)
def test_comparison(session):
session.install(".[test,comparison]")
session.run("pytest", "-v", "tests/core_test.py", *session.posargs)
@nox.session(python=ALL_PYTHON_VS)
def test_pymc3(session):
session.install(".[test,pymc3]")
session.run("python", "-c", "import theano")
session.run("python", "-c", "import exoplanet_core.pymc3.ops")
session.run("pytest", "-v", "tests/pymc3_test.py", *session.posargs)
@nox.session(python=ALL_PYTHON_VS)
def test_pymc(session):
session.install(".[test,pymc]")
session.run("python", "-c", "import pytensor")
session.run("python", "-c", "import exoplanet_core.pymc.ops")
session.run("pytest", "-v", "tests/pymc_test.py", *session.posargs)
@nox.session(python=ALL_PYTHON_VS)
def test_pymc_jax(session):
session.install(".[test,pymc,jax]")
session.run("python", "-c", "import jax")
session.run("python", "-c", "import pytensor")
session.run("python", "-c", "import exoplanet_core.pymc.ops")
session.run("pytest", "-v", "tests/pymc_jax_test.py", *session.posargs)
@nox.session(python=ALL_PYTHON_VS)
def test_jax(session):
session.install(".[test,jax]")
session.run("python", "-c", "import jax")
session.run("python", "-c", "import exoplanet_core.jax.ops")
session.run("pytest", "-v", "tests/jax_test.py", *session.posargs)
@nox.session(python=ALL_PYTHON_VS)
def test_all(session):
session.install(".[test,pymc3,pymc,jax,comparison]")
session.run("python", "-c", "import jax")
session.run("python", "-c", "import aesara")
session.run("python", "-c", "import theano")
session.run("pytest", "-v", "tests", *session.posargs)