跳转到主要内容

一个用于可视化学生数据的JupyterLab仪表板扩展。

项目描述

Unianalytics Dashboard JupyterLab 扩展

Binder Badge Build Check Release

一个前端JupyterLab扩展,显示有关用户笔记本完成和交互的可视化。

需求

  • JupyterLab >= 3.1.0

安装

要安装扩展,请执行

pip install jupyterlab-unianalytics-dashboard

卸载

要删除扩展,请执行

pip uninstall jupyterlab-unianalytics_dashboard

故障排除

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

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 jupyterlab_unianalytics_dashboard 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 jupyterlab_unianalytics_dashboard
# 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 jupyterlab_unianalytics_dashboard
pip uninstall jupyterlab_unianalytics_dashboard

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

测试扩展

服务器测试

此扩展使用 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 jupyterlab_unianalytics_dashboard

前端测试

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

要执行它们,请执行

jlpm
jlpm test

集成测试

此扩展使用 Playwright 进行集成测试(也称为用户级测试)。更确切地说,使用 JupyterLab 辅助程序 Galata 来处理在 JupyterLab 中测试扩展。

有关更多信息,请参阅 ui-tests 的 README 文件。

打包扩展

请参阅 RELEASE

项目详情


下载文件

下载适用于您平台的应用程序。如果您不确定选择哪一个,请了解有关 安装包 的更多信息。

源分发

jupyterlab_unianalytics_dashboard-4.0.18.tar.gz (870.0 kB 查看哈希)

上传时间

构建分发

jupyterlab_unianalytics_dashboard-4.0.18-py3-none-any.whl (655.5 kB 查看哈希)

上传时间 Python 3

由以下提供支持