在 Jupyter Lab 中显示单元计时
项目描述
jupyterlab-执行时间
在 Jupyter Lab 中显示单元计时
这是受这里的笔记本版本启发的。
注意:要显示任何内容,您需要通过 Settings->Advanced Settings Editor->Notebook: 在笔记本中启用单元格计时{"recordTiming": true}
。这是笔记本元数据设置,而不是插件设置。该插件仅显示此数据。
要求
- JupyterLab >= 3.0
安装
pip
使用运行安装此软件包
pip install jupyterlab_execute_time
conda
使用运行安装此软件包
conda install -c conda-forge jupyterlab_execute_time
贡献
开发安装
注意:您将需要 NodeJS 来构建扩展包。
该jlpm
命令是与 JupyterLab 一起安装的 JupyterLab 的固定版本
yarn。您可以使用
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
运行 watch 命令后,每个保存的更改都将立即在本地构建并在您正在运行的 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
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
历史
该插件由DE Shaw 组回馈给社区。
执照
这个项目是在BSD-3-Clause 许可下发布的。
“Jupyter”是 NumFOCUS 基金会的商标,Jupyter 项目是其中的一部分。
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
jupyterlab_execute_time-2.1.0.tar.gz
(158.8 kB
查看哈希)
内置分布
关
jupyterlab_execute_time -2.1.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9005e8ec938680f38ded2d1de99b098d93126e7e38a936f4022d160d6cc10a34 |
|
MD5 | cecd35d437fd0a039ad76bb771b45b0b |
|
布莱克2-256 | 54f60cd39acf83012d072f0bc7f165f43830a7858cc9cd4559182f936164c8b1 |
关
jupyterlab_execute_time -2.1.0-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5e80cde4d8f4e81a22bad68463cce4b95e6b0edf9ffd2917c4e68322f220d364 |
|
MD5 | bb154617aa25098786c474f56e5a507e |
|
布莱克2-256 | aaff685362e5caf323a95cde0946b10f246739999412245d643c9eda8c43384a |