From 8bb63ba98b51bb974b9aa003e3e975bba6f49cca Mon Sep 17 00:00:00 2001 From: martinRenou Date: Tue, 26 Sep 2023 15:14:09 +0200 Subject: [PATCH] Iterate --- beakerx_widgets/beakerx/__init__.py | 2 +- beakerx_widgets/beakerx/commands.py | 10 +--------- beakerx_widgets/pyproject.toml | 2 +- configuration.yml | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/beakerx_widgets/beakerx/__init__.py b/beakerx_widgets/beakerx/__init__.py index bb047f7..7d88b55 100644 --- a/beakerx_widgets/beakerx/__init__.py +++ b/beakerx_widgets/beakerx/__init__.py @@ -13,7 +13,7 @@ # limitations under the License. from ._version import version_info, __version__ -# from .commands import parse_widgets +from .commands import parse_widgets from .forms import * from .jupyter_server_handlers import setup_jupyter_server_handlers from .magics import * diff --git a/beakerx_widgets/beakerx/commands.py b/beakerx_widgets/beakerx/commands.py index a8bbf47..f14cb28 100644 --- a/beakerx_widgets/beakerx/commands.py +++ b/beakerx_widgets/beakerx/commands.py @@ -15,7 +15,6 @@ import sys import beakerx -from notebook import notebookapp as app from .bkr2ipynb import main from .install import install, uninstall @@ -63,14 +62,9 @@ def bkr2ipynb_subparser(subparser): # Py4JServer(args.port, args.pyport, args.kernel, args.context) -def run_jupyter(jupyter_commands): - app.launch_new_instance(jupyter_commands) - - def init_parser(): parser = argparse.ArgumentParser() parser.add_argument('--version', action='version', version=beakerx.__version__) - parser.set_defaults(func=run_jupyter) subparsers = parser.add_subparsers() install_subparser(subparsers) @@ -83,9 +77,7 @@ def init_parser(): def parse_widgets(): parser = init_parser() args, jupyter_commands = parser.parse_known_args() - if args.func == run_jupyter: - args.func(jupyter_commands) - elif not jupyter_commands: + if not jupyter_commands: args.func(args) else: parser.parse_args(jupyter_commands) diff --git a/beakerx_widgets/pyproject.toml b/beakerx_widgets/pyproject.toml index 68605bf..8b9a4b6 100644 --- a/beakerx_widgets/pyproject.toml +++ b/beakerx_widgets/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.1"] +requires = ["jupyter_packaging~=0.10,<2", "jupyterlab>4,<5"] build-backend = "jupyter_packaging.build_api" [tool.jupyter-packaging.options] diff --git a/configuration.yml b/configuration.yml index 4d4108e..41f9941 100644 --- a/configuration.yml +++ b/configuration.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - bottle - - ipywidgets>=7.5.1,<8 + - ipywidgets>=7.5.1,<9 - pandas - py4j - pyspark