在Jupyter Lab中显示单元时间
项目描述
jupyterlab-execute-time
在Jupyter Lab中显示单元时间
这是由这里的notebook版本启发。
需求
- JupyterLab >= 3.0
安装
使用pip
安装此包,运行
pip install jupyterlab_execute_time
使用conda
安装此包,运行
conda install -c conda-forge jupyterlab_execute_time
注意:默认情况下,如果启用此扩展,在加载时它会自动将您的设置更改为在笔记本元数据中记录时间。如果失败,您可以通过设置->高级设置编辑器->笔记本:{"recordTiming": true}
手动进行此操作。这是一个笔记本元数据设置,而不是插件设置。插件只是显示这些数据。
贡献
开发安装
注意:您需要NodeJS来构建扩展包。
jlpm
命令是JupyterLab的固定版本yarn,它是与JupyterLab一起安装的。您可以使用下面的yarn
或npm
代替jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterlab_execute_time 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 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以在浏览器中加载更改(您可能需要等待几秒钟以便重新构建扩展)。
默认情况下,jlpm run build
命令为此扩展生成源映射,以便更容易使用浏览器开发者工具进行调试。要为JupyterLab核心扩展也生成源映射,可以运行以下命令
jupyter lab build --minimize=False
发布
开始之前,您需要运行:pip install twine jupyter_packaging
- 更新
package.json
中的版本并更新CHANGELOG.md
中的发布日期 - 提交步骤1中的更改,打上标签,然后推送
git commit -am <msg>
git tag vX.Z.Y
git push && git push --tags
- 创建工件
rm -rf dist build jupyterlab_execute_time/labextension
jlpm run build
python setup.py sdist bdist_wheel
- 对此进行测试,以测试测试PyPI。您也可以从这里安装以进行测试
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# In a new venv
pip install --index-url https://test.pypi.org/simple/ jupyterlab_execute_time
- 将其上传到PyPI
twine upload dist/*
卸载
pip uninstall jupyterlab_execute_time
历史记录
此插件由D. E. Shaw小组贡献回社区。
许可证
此项目在BSD-3-Clause许可证下发布。
我们喜欢贡献!在您能够贡献之前,请签署并提交此贡献者许可协议(CLA)。此CLA是为了保护此项目的所有用户。
"Jupyter"是NumFOCUS基金会的商标,Project Jupyter是其一部分。
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
构建分布
哈希值 用于 jupyterlab_execute_time-3.2.0-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a0be3fe740fa59b59b16047793e5a0831cc497906863d26b83d3b92525dcb7ed |
|
MD5 | 30e2b3d84891ec3c38906ec494a3fba1 |
|
BLAKE2b-256 | ce74f47c4411b280175938c5f1ee3f8f98a0a75c83aa6e992c1616621b238ac0 |