跳转到主要内容

JupyterLab扩展,当单元格执行时显示闪光效果

项目描述

jupyterlab-cell-flash

Extension status Github Actions Status Binder PyPI npm

JupyterLab扩展,当单元格执行时显示闪光效果。

需求

  • JupyterLab >= 2.0

安装

对于JupyterLab 3.x,可以使用pip安装扩展

pip install jupyterlab-cell-flash

对于JupyterLab 1.x和2.x

jupyter labextension install jupyterlab-cell-flash

设置

使用以下设置来调整动画的颜色和持续时间(在设置 > 高级设置编辑器

{
  // The base color for the flash effect
  color: 'rgba(255, 255, 0, 0.5)',

  // The duration of the flash effect animation (in seconds)
  duration: 0.5
}

settings

贡献

开发安装

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

jlpm 命令是 JupyterLab 集成的 yarn 的固定版本,与 JupyterLab 一起安装。以下示例中,您可以使用 yarnnpm 替换 jlpm

# Clone the repo to your local environment
# Change directory to the jupyterlab-cell-flash directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jlpm run install:extension
# Rebuild extension Typescript source after making changes
jlpm run build

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

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

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

卸载

pip uninstall jupyterlab-cell-flash
jupyter labextension uninstall jupyterlab-cell-flash

项目详情


下载文件

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

源代码分发

jupyterlab_cell_flash-0.4.0.tar.gz (253.0 kB 查看哈希值)

上传时间 源代码

构建分发

jupyterlab_cell_flash-0.4.0-py3-none-any.whl (18.4 kB 查看哈希值)

上传时间 Python 3

支持者