-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
54 lines (40 loc) · 1.02 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
import nox
REQUIRES = {
"coverage": ["coverage>=5.0.0,<6.0.0"],
"fmt": ["black>=19.10b0,<20.00"],
"lint": ["flake8>=3.7.9,<4.0.0"],
}
def install(session, *names):
for e in names:
session.install(*REQUIRES[e])
@nox.session
def devel(session):
session.install("-e", ".")
install(session, "coverage", "fmt", "lint")
@nox.session(python=["3.6", "3.7", "3.8", "3.9"])
def test(session):
session.install("-e", ".")
session.run("python", "-m", "unittest", "discover", "tests")
@nox.session
def coverage(session):
session.install("-e", ".")
install(session, "coverage")
session.run(
"coverage",
"run",
"--source=hexastore",
"-m",
"unittest",
"discover",
"tests",
)
session.run("coverage", "report", "-m")
@nox.session
def fmt(session):
install(session, "fmt")
session.run("black", ".")
@nox.session
def lint(session):
install(session, "fmt", "lint")
session.run("black", ".")
session.run("flake8")