How to use the jupyterlab.jupyterlab.commands.get_app_info function in jupyterlab

To help you get started, we’ve selected a few jupyterlab examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterlab / jupyterlab-data-explorer / jupyterlab / jupyterlab / extension_manager_handler.py View on Github external
def _load_outdated(self):
        """Get the latest compatible version"""
        info = get_app_info(app_dir=self.app_dir, logger=self.log)
        names = tuple(info['extensions'].keys())
        data = yield self.executor.submit(
            get_latest_compatible_package_versions,
            names,
            app_dir=self.app_dir,
            logger=self.log,
        )
        raise gen.Return(data)
github jupyterlab / jupyterlab-data-explorer / jupyterlab / jupyterlab / extension.py View on Github external
def load_config(nbapp):
    """Load the JupyterLab configuration and defaults for a given application.
    """
    from jupyterlab_server import LabConfig
    from .commands import (
        get_app_dir,
        get_app_info,
        get_workspaces_dir,
        get_user_settings_dir,
        pjoin
    )

    app_dir = getattr(nbapp, 'app_dir', get_app_dir())
    info = get_app_info(app_dir)
    public_url = info['publicUrl']
    user_settings_dir = getattr(
        nbapp, 'user_settings_dir', get_user_settings_dir()
    )
    workspaces_dir = getattr(nbapp, 'workspaces_dir', get_workspaces_dir())

    config = LabConfig()
    config.app_dir = app_dir
    config.app_name = 'JupyterLab'
    config.app_namespace = 'jupyterlab'
    config.app_settings_dir = pjoin(app_dir, 'settings')
    config.app_version = info['version']
    config.cache_files = True
    config.schemas_dir = pjoin(app_dir, 'schemas')
    config.templates_dir = pjoin(app_dir, 'static')
    config.themes_dir = pjoin(app_dir, 'themes')
github jupyterlab / jupyterlab-data-explorer / jupyterlab / jupyterlab / extension_manager_handler.py View on Github external
def list_extensions(self):
        """Handle a request for all installed extensions"""
        info = get_app_info(app_dir=self.app_dir, logger=self.log)
        build_check_info = _build_check_info(self.app_dir, self.log)
        _ensure_compat_errors(info, self.app_dir, self.log)
        extensions = []
        # TODO: Ensure loops can run in parallel
        for name, data in info['extensions'].items():
            status = 'ok'
            pkg_info = yield self._get_pkg_info(name, data)
            if info['compat_errors'].get(name, None):
                status = 'error'
            else:
                for packages in build_check_info.values():
                    if name in packages:
                        status = 'warning'
            extensions.append(_make_extension_entry(
                name=name,
                description=pkg_info['description'],