-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathnoxfile.py
37 lines (27 loc) · 957 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
35
36
37
# Copyright (c) Microsoft Corporation. All rights reserved.
import nox
_ARGS = ("-vvv", "--nbmake", "--overwrite")
_NOTEBOOKS = [
"notebooks/paper-figures.ipynb",
"notebooks/stage-one-analysis.ipynb",
"notebooks/stage-two-analysis.ipynb",
"notebooks/fridge-calibration.ipynb",
"notebooks/PRL130_207001.ipynb",
]
@nox.session(python=["3.8", "3.9", "3.10"])
def pytest(session):
session.install(".[test]")
session.run("coverage", "erase")
session.run("pytest", *_ARGS, *_NOTEBOOKS)
@nox.session(python="3.10")
def pytest_typeguard(session):
session.install(".[test]")
session.run("coverage", "erase")
session.run("pytest", "--typeguard-packages=tgp", *_ARGS, *_NOTEBOOKS)
@nox.session(python="3.8")
def coverage(session):
session.install("coverage")
session.install(".[test]")
session.run("pytest", *_ARGS, *_NOTEBOOKS)
session.run("coverage", "report")
session.run("coverage", "xml")