A JupyterLab extension for Jupytext
This extension adds a few Jupytext commands to the command palette. Use these to select the desired ipynb/text pairing for your notebook.
Most users do not need to install this extension, since it is already included in the latest jupytext, both on and .
Please install Jupytext first. As mentioned above, both the
conda packages do include the latest version of the JupyterLab extension, so in most cases you don't need to specifically install this
Installing Jupytext will trigger a build of JupyterLab the next time you open it. If you prefer, you can trigger the build manually with
jupyter lab build
In case you're not using JupyterLab 1.0, you may have to install another version of the extension that is compatible with your version. For instance, install the last version of the extension compatible with Jupyter 0.35 with
jupyter labextension install email@example.com
How to develop this extension
We assume that you have activated the conda environment described in CONTRIBUTING.md. In addition to that environment, you will need
npm. Install it with
conda install nodejs
In that environment, install JupyterLab's plugin manager, and the extension with
# Go to the extension foldercd packages/labextension# Cleanuprm -rf lib node_modules yarn.lock# Install JupyterLab's plugin managerjlpm install# Package the extensionnpm pack
Then you can rebuild the Jupytext python package (with
python setup.py sdist bdist_wheel) and reinstall it (
pip install dist\jupytext-XXX.tar.gz).
Alternatively, if you prefer to develop iteratively, you could install a development version of the extension with
jupyter labextension install . --no-build
Then start JupyterLab in watch mode in another shell on the same environment:
jupyter lab --watch
And finally, make changes to the extension and rebuild it (in the first shell) with:
jlpm run build
How to publish a new version of the extension
Bump the version in
package.json, rebuild the extension with
npm pack. Include the new extension in Git and
setup.py, and delete the previous version.
If you wish, you can also publish the package on npm with
npm publish --access=public