-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathnoxfile.py
43 lines (33 loc) · 1.07 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
from noxopt import NoxOpt, Session
group = NoxOpt(auto_tag=True)
@group.session
def fix_lint(session: Session) -> None:
session.install(
"black[jupyter]",
"flake8-pyproject",
"flake8",
"isort",
)
session.run("black", ".")
session.run("isort", ".")
session.run("npm", "run", "fix:lint", external=True)
@group.session
def check_python(session: Session) -> None:
session.install(
"black[jupyter]",
"flake8-pyproject",
"flake8",
"isort",
)
session.run("flake8", "reactpy_jupyter", "setup.py", "noxfile.py")
session.run("black", "--check", ".")
session.run("isort", "--check-only", ".")
@group.session(python=False)
def check_javascript(session: Session) -> None:
session.run("npm", "ci", external=True)
session.run("npm", "run", "lint", external=True)
@group.session
def publish(session: Session) -> None:
session.install("twine", "build", "wheel")
session.run("python", "-m", "build", "--wheel", "--sdist", "--outdir", "dist/")
session.run("twine", "upload", "dist/*")