Jupyter freeze扩展程序用于jupyterlab!
项目描述
jupyterlab_freeze
Jupyter freeze扩展程序用于jupyterlab!
此扩展程序基于jupyter_contrib_nbextensions的freeze扩展。
此仓库将扩展程序引入jupyterlab。
此扩展程序允许将单元格设置为只读或冻结。它提供三个按钮
- 解锁
- 只读
- 冻结
对于 代码单元格
- 只读:它可以执行,但不能更改其输入。
- 冻结:它既不能更改也不能执行。
对于 Markdown单元格
- 只读 / 冻结:可以通过双击查看其输入,但不能更改。
要更改选中单元格的状态,请按相应的按钮。
单个单元格的状态存储在其元数据中,并在加载扩展程序时应用于单元格。
要求
- JupyterLab >= 4.0.0
安装
要安装扩展程序,请执行
pip install jupyterlab_freeze
卸载
要删除扩展程序,请执行
pip uninstall jupyterlab_freeze
贡献
开发安装
注意:您需要NodeJS来构建扩展程序包。
jlpm
命令是JupyterLab与yarn的固定版本,与JupyterLab一起安装。您可以使用下面的yarn
或npm
代替jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterlab_freeze 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
开发卸载
pip uninstall jupyterlab_freeze
在开发模式下,您还需要删除由 jupyter labextension develop
命令创建的符号链接。要找到其位置,您可以使用 jupyter labextension list
来确定 labextensions
文件夹的位置。然后您可以删除该文件夹中名为 jupyterlab_freeze
的符号链接。
测试扩展
前端测试
此扩展使用 Jest 对 JavaScript 代码进行测试。
要执行它们,请执行
jlpm
jlpm test
集成测试
此扩展使用 Playwright 进行集成测试(也称为用户级测试)。更确切地说,JupyterLab 辅助工具 Galata 用于处理在 JupyterLab 中测试扩展。
更多详细信息请参阅 ui-tests README。
打包扩展
见 RELEASE
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源分发
构建分发
jupyterlab_freeze-0.1.0.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | fec7f5a76cdcf8f1573eecb8b3be43b46edf8659c0e8d9f926305e38cf472358 |
|
MD5 | d860f30d967cb15c6cfbef3d4014ef71 |
|
BLAKE2b-256 | f45d6ef7ee3f4a16bd40ec9002ec2c1b76ebdfa13a14e0b23dbcb5ebe7d7693a |
jupyterlab_freeze-0.1.0-py3-none-any.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e8849dcd8789144df6156ca7b9e118f691def36a340223a3f662951b3aeda846 |
|
MD5 | 60cf246d53bc7063e8284f6bd6f0627f |
|
BLAKE2b-256 | 32c626736cb8e8253eb229256aef27e72d74d1dc69e2cd1030451e74096ad460 |