Package: jupyterlab-limit-output
jupyterlab-limit-outputLimit long text output for a single mime render.This is inspired by the notebook versionhere.SettingsUseSettings->Advanced User Settings->Limit Outputto set head and/or tail limits. You can also limit by characters instead of lines.
This extension can also be enabled/disabled to allow for site-wide installations.Note: This works on a per mime render basis. For example, imagine cell that outputs a large number alternating lines of stdout and stderr.
This extension won't help because each line would be it's own mime renderer (lab itself will help by limiting the number of renders shown).RequirementsJupyterLab >= 3.0InstallTo install this package withpiprunpipinstalljupyterlab_limit_outputTo install this package withcondaruncondainstall-cconda-forgejupyterlab_limit_outputContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the jupyterlab_limit_output directory# Install package in development modepipinstall-e.# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmrunbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmrunwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm run buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalsePublishingBefore starting, you'll need to have run:pip install twine jupyter_packagingUpdate the version inpackage.jsonand update the release date inCHANGELOG.mdCommit the change in step 1, tag it, then push itgit commit -am <msg>
git tag vX.Z.Y
git push && git push --tagsCreate the artifactsrm -rf dist jupyterlab_limit_output/labextension
jlpm run build
python setup.py sdist bdist_wheelTest this against the test pypi. You can then install from here to test as well: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_outputUpload this to pypi:twine upload dist/*Uninstallpipuninstalljupyterlab_limit_outputHistoryThis plugin was contributed back to the community by theD. E. Shaw group.LicenseThis project is released under aBSD-3-Clause license.We love contributions! Before you can contribute, please sign and submit thisContributor License Agreement (CLA).
This CLA is in place to protect all users of this project."Jupyter" is a trademark of the NumFOCUS foundation, of which Project Jupyter is a part.