-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
31 lines (20 loc) · 815 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
import nox
import sys
PYTHON = sys.executable
PACKAGE_NAME = "src/talking_python"
@nox.session
def compile_dependencies(session):
session.run(PYTHON, "-m", "piptools", "compile", "requirements/base_flow.in")
session.run(PYTHON, "-m", "piptools", "compile", "requirements/requirements_clean_transcript.in")
session.run(PYTHON, "-m", "piptools", "compile", "requirements/requirements_embed.in")
session.run(PYTHON, "-m", "piptools", "compile", "requirements/requirements_app.in")
@nox.session
def format_package(session):
session.run("black", PACKAGE_NAME)
session.run("ruff", PACKAGE_NAME, "--fix")
@nox.session
def build_package(session):
session.run(PYTHON, "-m", "build", "-w")
@nox.session
def install_package(session):
session.run(PYTHON, "-m", "pip", "install", ".")