-
Notifications
You must be signed in to change notification settings - Fork 3
/
noxfile.py
42 lines (35 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
"""
nox -s build
nox -s lint
nox -s format_check
nox -s format
nox -s docs
nox -s tests
"""
import nox
@nox.session
def build(session):
session.install("setuptools", "wheel", "Cython", "numpy")
session.run("python", "setup.py", "sdist", "bdist_wheel")
@nox.session(python="3.10")
def lint(session):
session.install("flake8")
session.run("flake8", "src", "tests")
@nox.session(python="3.10")
def format_check(session):
session.install("black")
session.run("black", "--check", "src", "tests")
@nox.session(python="3.10")
def format(session):
session.install("black")
session.run("black", "src", "tests")
# @nox.session(python="3.10")
# def docs(session):
# session.install(".")
# session.install("sphinx")
# session.run("sphinx-build", "-b", "html", "docs/source", "docs/build")
# @nox.session(python=["3.7", "3.8", "3.9", "3.10"])
# def tests(session):
# session.install("setuptools", "wheel", "Cython", "numpy", "pytest")
# session.install(".")
# session.run("python", "-m", "pytest", "tests")