Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Sep 26, 2023
1 parent 9890044 commit 8bb63ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion beakerx_widgets/beakerx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
10 changes: 1 addition & 9 deletions beakerx_widgets/beakerx/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import sys

import beakerx
from notebook import notebookapp as app

from .bkr2ipynb import main
from .install import install, uninstall
Expand Down Expand Up @@ -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)
Expand All @@ -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)
2 changes: 1 addition & 1 deletion beakerx_widgets/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- bottle
- ipywidgets>=7.5.1,<8
- ipywidgets>=7.5.1,<9
- pandas
- py4j
- pyspark
Expand Down

0 comments on commit 8bb63ba

Please sign in to comment.