Skip to content

Commit ad657fc

Browse files
add back demo
1 parent bafab3c commit ad657fc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

noxfile.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,25 @@ def types(session):
140140
session.run(*command)
141141

142142

143+
@nox.session
144+
def demo(session):
145+
session.run_install(
146+
"uv",
147+
"sync",
148+
"--frozen",
149+
"--extra",
150+
"types",
151+
env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location},
152+
)
153+
154+
command = ["python", "example/demo.py", "runserver"]
155+
if session.posargs and all(arg for arg in session.posargs):
156+
command.append(*session.posargs)
157+
else:
158+
command.append("localhost:8000")
159+
session.run(*command)
160+
161+
143162
@nox.session
144163
def gha_matrix(session):
145164
sessions = session.run("python", "-m", "nox", "-l", "--json", silent=True)

0 commit comments

Comments
 (0)