在JupyterLab中运行ImJoy插件
项目描述
ImJoy Jupyterlab Extension
在JupyterLab中运行ImJoy插件
需求
- JupyterLab >= 4.0.0
安装
要安装扩展,请执行
pip install imjoy-jupyterlab-extension
卸载
要删除扩展,请执行
pip uninstall imjoy-jupyterlab-extension
贡献
开发安装
注意:您将需要NodeJS来构建扩展包。
jlpm
命令是JupyterLab附带的yarn的固定版本。您可以使用 yarn
或 npm
替代下面的 jlpm
。
# Clone the repo to your local environment
# Change directory to the imjoy-jupyterlab-extension directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# 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
发布包
sh scripts/publish.sh
开发卸载
pip uninstall imjoy-jupyterlab-extension
在开发模式下,您还需要删除由 jupyter labextension develop
命令创建的符号链接。要找到其位置,您可以通过运行 jupyter labextension list
来确定 labextensions
文件夹的位置。然后您可以删除该文件夹中名为 imjoy-jupyterlab-extension
的符号链接。
测试扩展
前端测试
此扩展使用 Jest 对 JavaScript 代码进行测试。
要执行它们,请执行
jlpm
jlpm test
集成测试
此扩展使用 Playwright 进行集成测试(也称为用户级测试)。更准确地说,使用 JupyterLab 辅助程序 Galata 来处理在 JupyterLab 中的扩展测试。
更多详细信息请参阅 ui-tests 的 README。
打包扩展
请参阅 RELEASE
项目详情
关闭
imjoy_jupyterlab_extension-0.2.6.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b3a134070ca8813eb9ede95d9c483f15fb4bb963d73047173db4bf417a04f988 |
|
MD5 | 817070b93d032d1e282c11b3171e3932 |
|
BLAKE2b-256 | 098501f98ab01e9a8ebbc6b3fc384062ce14e637aa090787d5db273032ead0bc |
关闭
imjoy_jupyterlab_extension-0.2.6-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d1de1a92576b1be48bae009fe2f9cf1701f16cae7bff826d061a50ac331ef127 |
|
MD5 | 560ef178c7528014fbec3b34e8914c9c |
|
BLAKE2b-256 | 8bcf7c73c6bbdfaa3b3eb7b9fc7730d86469891fcc41e875c9e14d1eb9e3643c |