Skip to content

Commit fc30398

Browse files
committed
Upgrade fps v0.5.2
1 parent 796be1a commit fc30398

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

jupyverse_api/jupyverse_api/cli.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@
8484
type=str,
8585
help="Disable plugin.",
8686
)
87+
@click.option(
88+
"--timeout",
89+
type=float,
90+
default=None,
91+
help="The timeout for starting Jupyverse.",
92+
)
93+
@click.option(
94+
"--stop-timeout",
95+
type=float,
96+
default=1,
97+
help="The timeout for stopping Jupyverse.",
98+
)
8799
def main(
88100
debug: bool = False,
89101
show_config: bool = False,
@@ -96,6 +108,8 @@ def main(
96108
disable: tuple[str, ...] = (),
97109
allow_origin: tuple[str, ...] = (),
98110
query_param: tuple[str, ...] = (),
111+
timeout: float | None = None,
112+
stop_timeout: float = 1,
99113
) -> None:
100114
query_params_dict = {}
101115
for qp in query_param:
@@ -118,6 +132,8 @@ def main(
118132
show_config=show_config,
119133
help_all=help_all,
120134
backend=backend,
135+
timeout=timeout,
136+
stop_timeout=stop_timeout,
121137
) # type: ignore
122138

123139

jupyverse_api/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies = [
2929
"importlib_metadata >=3.6; python_version<'3.10'",
3030
"pydantic >=2,<3",
3131
"fastapi >=0.95.0,<1",
32-
"fps >=0.5.1,<0.6.0",
32+
"fps >=0.5.2,<0.6.0",
3333
"anyio >=3.6.2,<5",
3434
"anyioutils >=0.7.4",
3535
]

plugins/environments/tests/test_environments.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ async def test_kernel_environment(tmp_path):
5252
}
5353
}
5454

55-
async with get_root_module(config) as root_module:
55+
root_module = get_root_module(config)
56+
root_module._global_start_timeout = 10
57+
async with root_module as root_module:
5658
environments = await root_module.get(Environments)
5759
app = root_module.app
5860
transport = httpx.ASGITransport(app=app)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "A set of FPS plugins implementing a Jupyter server"
99
keywords = ["jupyter", "server", "fastapi", "plugins"]
1010
requires-python = ">=3.9"
1111
dependencies = [
12-
"fps[click,fastapi,anycorn] >=0.5.1,<0.6.0",
12+
"fps[click,fastapi,anycorn] >=0.5.2,<0.6.0",
1313
"fps-contents >=0.10.2,<0.11.0",
1414
"fps-environments >=0.1.0,<0.2.0",
1515
"fps-environment-micromamba >=0.1.0,<0.2.0",

tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def start_jupyverse(auth_mode, clear_users, cwd, unused_tcp_port):
5050
"kernels.require_yjs=true",
5151
"--port",
5252
str(unused_tcp_port),
53+
"--timeout",
54+
"10",
5355
]
5456
p = subprocess.Popen(command_list)
5557
url = f"http://127.0.0.1:{unused_tcp_port}"

0 commit comments

Comments
 (0)