Skip to content

Commit

Permalink
Bump version to 2.1.0 and added new extension for lab
Browse files Browse the repository at this point in the history
  • Loading branch information
ildipo committed Jan 18, 2021
1 parent 133ac52 commit 6d64b89
Show file tree
Hide file tree
Showing 70 changed files with 18 additions and 6,886 deletions.
2 changes: 1 addition & 1 deletion beakerx_widgets/beakerx/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version_info = (2, 0, 1)
version_info = (2, 1, 0)
__version__ = '.'.join(map(str, version_info))
6 changes: 0 additions & 6 deletions beakerx_widgets/beakerx/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ def install_subparser(subparser):
install_parser.add_argument("--prefix",
help="location of the environment to install into",
default=sys.prefix)
install_parser.add_argument("--lab",
help="install lab extension",
action='store_true')
return subparser


Expand All @@ -42,9 +39,6 @@ def uninstall_subparser(subparser):
uninstall_parser.add_argument("--prefix",
help="location of the environment to uninstall from",
default=sys.prefix)
uninstall_parser.add_argument("--lab",
help="uninstall lab extension",
action='store_true')
return subparser


Expand Down
18 changes: 14 additions & 4 deletions beakerx_widgets/beakerx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
from jupyter_core import paths
from traitlets.config.manager import BaseJSONConfigManager

try:
import jupyterlab
LAB_VERSION=int(jupyterlab.__version__[0])
except:
LAB_VERSION=None


def _base_classpath_for(kernel):
return pkg_resources.resource_filename(
Expand Down Expand Up @@ -123,10 +129,13 @@ def install(args):
subprocess.check_call(["jupyter", "nbextension", "install", "beakerx", "--py", "--symlink", "--sys-prefix"])
subprocess.check_call(["jupyter", "nbextension", "enable", "beakerx", "--py", "--sys-prefix"])
subprocess.check_call(["jupyter", "serverextension", "enable", "beakerx", "--py", "--sys-prefix"])
if args.lab:
if LAB_VERSION is not None:
subprocess.call(["jupyter", "labextension", "install", "@jupyter-widgets/jupyterlab-manager", "--no-build"],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
subprocess.check_call(["jupyter", "labextension", "install", "@beakerx/beakerx-widgets"])
if LAB_VERSION == 1:
subprocess.check_call(["jupyter", "labextension", "install", "@beakerx/beakerx-widgets@2.0"])
else:
subprocess.check_call(["jupyter", "labextension", "install", "@beakerx/beakerx-widgets@2.1"])

_install_kernelspec_manager(args.prefix)
_install_magics()
Expand All @@ -137,8 +146,9 @@ def uninstall(args):
subprocess.check_call(["jupyter", "nbextension", "disable", "beakerx", "--py", "--sys-prefix"])
subprocess.check_call(["jupyter", "nbextension", "uninstall", "beakerx", "--py", "--sys-prefix"])
subprocess.check_call(["jupyter", "serverextension", "disable", "beakerx", "--py", "--sys-prefix"])
subprocess.check(["jupyter", "labextension", "uninstall", "@beakerx/beakerx-widgets"],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if LAB_VERSION is not None:
subprocess.check(["jupyter", "labextension", "uninstall", "@beakerx/beakerx-widgets"],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
_install_kernelspec_manager(args.prefix, disable=True)


Expand Down
2 changes: 1 addition & 1 deletion beakerx_widgets/conda_recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set name = "beakerx_widgets" %}
{% set fname = "beakerx" %}
{% set version = "2.0.1" %}
{% set version = "2.1.0" %}

package:
name: "{{ name|lower }}"
Expand Down
2 changes: 0 additions & 2 deletions js/_old/lab-theme-dark/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion js/_old/lab-theme-dark/.npmignore

This file was deleted.

3 changes: 0 additions & 3 deletions js/_old/lab-theme-dark/README.md

This file was deleted.

Loading

0 comments on commit 6d64b89

Please sign in to comment.