-
Notifications
You must be signed in to change notification settings - Fork 7
/
noxfile.py
53 lines (33 loc) · 1020 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import nox
def install_reqs(session):
session.install("--progress-bar", "off", "--no-cache-dir", "-r", "requirements.txt")
def run_lint(session):
session.run("black", "--check", "slp")
session.run("black", "--check", "examples")
session.run("black", "--check", "tests")
def run_typecheck(session):
session.run("python", "-m", "mypy", "--config-file", "mypy.ini", "-p", "slp")
def run_tests(session):
session.run("pytest", "-s", "-p", "no:warnings", "--cov", "slp", "tests")
@nox.session
def lint(session):
session.install("black")
run_lint(session)
@nox.session
def typecheck(session):
install_reqs(session)
run_typecheck(session)
@nox.session
def tests(session):
install_reqs(session)
session.install(".")
run_tests(session)
@nox.session(python=False)
def lintci(session):
run_lint(session)
@nox.session(python=False)
def typecheckci(session):
run_typecheck(session)
@nox.session(python=False)
def testsci(session):
run_tests(session)