限制文本输出.mime渲染
项目描述
jupyterlab-limit-output
限制单个mime渲染的长时间文本输出。
这灵感来源于笔记本版本这里。
设置
使用 设置->高级用户设置->限制输出
设置头部和/或尾部限制。您还可以按字符而不是按行进行限制。此扩展也可以启用/禁用,以允许网站范围安装。
注意:这是基于每个mime渲染的。例如,想象一个单元格输出大量交替的stdout和stderr行。此扩展无法帮助,因为每一行都是自己的mime渲染器(lab本身将通过限制显示的渲染数量来帮助)。
要求
- JupyterLab >= 3.0
安装
使用 pip
安装此软件包,请运行
pip install jupyterlab_limit_output
使用 conda
安装此软件包,请运行
conda install -c conda-forge jupyterlab_limit_output
贡献
开发安装
注意:您需要 NodeJS 来构建扩展包。
jlpm
命令是 JupyterLab 预装版本的 yarn,它是与 JupyterLab 一起安装的。您可以使用 yarn
或 npm
替代 jlpm
# Clone the repo to your local environment
# Change directory to the jupyterlab_limit_output 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 jupyterlab_limit_output/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_limit_output
- 将其上传到 pypi
twine upload dist/*
卸载
pip uninstall jupyterlab_limit_output
历史
此插件由 D. E. Shaw group 贡献给社区。
许可证
此项目在 BSD-3-Clause 许可证 下发布。
我们热爱贡献!在您能够贡献之前,请签署并提交此 贡献者许可协议 (CLA)。此 CLA 的目的是保护此项目的所有用户。
"Jupyter" 是 NumFOCUS 基金会的商标,Project Jupyter 是其一部分。
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装软件包 的信息。
源分布
构建分布
jupyterlab_limit_output-2.0.0.tar.gz 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 8742a6c9d8823b037d3cdd4d644373a00ff35babc3718a0d6bb35521f9f5f638 |
|
MD5 | c35a29f676bac43816945bc8c43fa39e |
|
BLAKE2b-256 | b7d5b9ce957a97f4d9bd8670bf83a149cd60c49f3fac2b5693f3e592c02ccfc6 |
jupyterlab_limit_output-2.0.0-py3-none-any.whl 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 3614bee39ba65abbc778ea9de02d9a54953c21d02daed4156b46259698ac494e |
|
MD5 | 8fc2f851fd4632bfed70d19e4f03dfc3 |
|
BLAKE2b-256 | 0f6c6b81b9c72a440a3f9f2fd057876ea5cb781e13c9d894fb3b4fe441a9852c |