forked from flozz/rivalcfg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
49 lines (37 loc) · 1.04 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
import nox
PYTHON_FILES = [
"rivalcfg",
"test",
"noxfile.py",
"scripts",
]
@nox.session(reuse_venv=True)
def lint(session):
session.install("flake8", "black")
session.run("black", "--check", "--diff", "--color", *PYTHON_FILES)
session.run("flake8", *PYTHON_FILES)
@nox.session(reuse_venv=True)
def black_fix(session):
session.install("black")
session.run("black", *PYTHON_FILES)
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"], reuse_venv=True)
def test(session):
session.install("pytest")
session.install(".")
session.run(
"pytest",
"--doctest-modules",
"rivalcfg",
"test",
env={
"RIVALCFG_DRY": "1",
},
)
@nox.session(reuse_venv=True)
def gendoc(session):
session.install("sphinx", "sphinx-rtd-theme")
session.install("-e", ".")
session.run("sphinx-build", "-M", "html", "doc", "build")
@nox.session(reuse_venv=True)
def update_ssdb(session):
session.run("python", "./scripts/sse3_db_update.py", "ssdb/sse3.db.csv")