Package: lckr-jupyterlab-variableinspector
jupyterlab_variableinspectorJupyterlab extension that shows currently used variables and their values.Contributions in any form are welcome!FeaturesAllows inspection of variables for both consoles and notebooks.Allows inspection of matrices in a datagrid-viewer. This might not work for large matrices.Allows an inline and interactive inspection of Jupyter Widgets.Supported LanguagesThis extension is currently targetspythonas a main language but also supports the following languages with different levels of feature completenessRscalavia thealmond kernelHow it WorksIn order to allow variable inspection, all content that is displayed first need to be sent from the kernel to the front end.Therefore, opening large data frames with the datagrid viewer can dramatically increase your occupied memory andsignificantly slow downyour browser.Use at your own risk.RequirementsJupyterLab >= 3.0Requirements forpythonfunctionalitypandasandnumpyare required to enable matrix inspection.pysparkfor spark support.tensorflowandkerasto allow inspection of tf objects.torchfor PyTorch support.Requirements forRfunctionalityThereprlibrary.Requirements foripywidgetsfunctionalityThe variable inspector can also display Jupyter interactive widgets:The requirements for this functionality are:ipywidgets, which can be installed withpip install ipywidgets.InstallTo install the extension, execute:pipinstalllckr_jupyterlab_variableinspectorUninstallTo remove the extension, execute:pipuninstalllckr_jupyterlab_variableinspectorContributingDevelopment 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 lckr_jupyterlab_variableinspector directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou 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 neededjlpmwatch# 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 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=FalseDevelopment uninstallpipuninstalllckr_jupyterlab_variableinspectorIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink named@lckr/jupyterlab_variableinspectorwithin that folder.Testing the extensionFrontend testsThis extension is usingJestfor JavaScript code testing.To execute them, execute:jlpm
jlpmtestIntegration testsThis extension usesPlaywrightfor the integration tests (aka user level tests).
More precisely, the JupyterLab helperGalatais used to handle testing the extension in JupyterLab.More information are provided within theui-testsREADME.Packaging the extensionSeeRELEASE