跳转到主要内容

glue-viz的JupyterLab扩展

项目描述

Gluepyter

JupyterLab的Glue应用程序

Binder

概述

Glue是一个开源的数据探索工具,允许用户直观地以易于理解的方式可视化和分析数据。此JupyterLab扩展将Glue的数据探索功能直接引入JupyterLab,使用户能够在不离开JupyterLab环境的情况下无缝地分析和可视化数据。

gluepyter

与Glue-jupyter有什么区别?

glue-jupyter 是一个库,可以直接在Python中从Jupyter Notebook(无论是使用经典笔记本还是JupyterLab)创建Glue "应用程序"对象,并使用像bqplot或Matplotlib这样的工具创建Glue "查看器"。

Gluepyter是一个扩展,允许从JupyterLab应用程序直接打开Glue会话。它重用了glue-jupyter的组件来创建查看器和底层Glue应用程序对象。

要求

  • JupyterLab >= 4.0.0,<5

安装

要安装扩展,请执行

pip install gluepyter

卸载

要删除扩展,请执行

pip uninstall gluepyter

故障排除

如果您看到了前端扩展但无法使用,请检查服务器扩展是否已启用

jupyter server extension list

如果服务器扩展已安装并启用,但您未看到前端扩展,请检查前端扩展是否已安装

jupyter labextension list

贡献

开发安装

注意:您需要NodeJS来构建扩展包。

jlpm 命令是JupyterLab安装的yarn版本,可以通过JupyterLab安装。您可以使用下面的yarnnpm代替jlpm

# Clone the repo to your local environment
# Change directory to the gluepyter directory
# Install package in development mode
pip install -e ".[test]"
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Server extension must be manually installed in develop mode
jupyter server extension enable gluepyter
# Rebuild extension Typescript source after making changes
jlpm build

您可以在不同的终端中同时监视源目录并运行JupyterLab,以监视扩展源代码的变化并自动重新构建扩展。

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab

当监视命令运行时,每次保存的更改都会立即在本地上构建并可在运行的JupyterLab中使用。刷新JupyterLab以在浏览器中加载更改(您可能需要等待几秒钟以重新构建扩展)。

默认情况下,jlpm build 命令为该扩展生成源映射,使其更容易使用浏览器开发者工具进行调试。要为JupyterLab核心扩展也生成源映射,可以运行以下命令

jupyter lab build --minimize=False

开发卸载

# Server extension must be manually disabled in develop mode
jupyter server extension disable gluepyter
pip uninstall gluepyter

在开发模式下,您还需要删除由jupyter labextension develop命令创建的符号链接。要找到其位置,可以运行jupyter labextension list以确定labextensions文件夹的位置。然后您可以删除该文件夹中的名为gluepyter的符号链接。

测试扩展

服务器测试

此扩展使用Pytest进行Python代码测试。

安装测试依赖项(只需安装一次)

pip install -e ".[test]"
# Each time you install the Python package, you need to restore the front-end extension link
jupyter labextension develop . --overwrite

要执行它们,请运行

pytest -vv -r ap --cov gluepyter

前端测试

此扩展使用Jest进行JavaScript代码测试。

要执行它们,请执行

jlpm
jlpm test

集成测试

此扩展使用[Playwright]进行集成测试(也称为用户级测试)。更具体地说,JupyterLab助手Galata用于在JupyterLab中测试扩展。

更多详细信息请参阅ui-tests README。

打包扩展

请参阅RELEASE

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

gluepyter-0.1.0.tar.gz (1.0 MB 查看哈希值)

上传时间

构建分布

gluepyter-0.1.0-py3-none-any.whl (74.8 kB 查看哈希值)

上传时间 Python 3

由以下支持