Socket
Socket
Sign inDemoInstall

jupyterlab-jupytext

Package Overview
Dependencies
166
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jupyterlab-jupytext

Save Jupyter Notebooks as Scripts or Markdown files that work well with version control & external text editors


Version published
Weekly downloads
1.4K
decreased by-10.4%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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.

The latest version for this extension is npm version.

Most users do not need to install this extension, since it is already included in the latest jupytext, both on Pypi and Conda Version.

Installation

Please install Jupytext first. As mentioned above, both the pip and conda packages do include the latest version of the JupyterLab extension, so in most cases you don't need to specifically install this npm package.

In case you're not using JupyterLab 4.x, you will have to install an older version of the extension that is compatible with your version. Please first install jupytext using pip or conda, and then downgrade the extension to a version compatible with your version of Jupyter Lab with:

jupyter labextension install jupyterlab-jupytext@1.3.11  # for JupyterLab 3.x
jupyter labextension install jupyterlab-jupytext@1.2.2  # for JupyterLab 2.x
jupyter labextension install jupyterlab-jupytext@1.1.1  # for JupyterLab 1.x

How to develop this extension

For fine-grained access to the jlpm command and various build steps:

pip install -e '.[dev]'
cd jupyterlab/packages/jupyterlab-jupytext-extension
jlpm
jlpm install:extension     # Symlink into `{sys.prefix}/share/jupyter/labextensions`

(see also the instructions at developing.md on how to create a Python environment with a recent version of nodejs)

Watch the source directory and automatically rebuild the lib folder:

cd jupyterlab/packages/jupyterlab-jupytext-extension
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab

While running jlpm watch, every saved change to a .ts file will immediately be built locally and available in your running Jupyter client. "Hard" refresh JupyterLab or Notebook with CTRL-F5 or ⌘-F5 to load the change in your browser (you may need to wait several seconds for the extension to be fully rebuilt).

Read more on this on the JupyterLab documentation.

How to publish a new version of the extension on npm

Please note that the main purpose of updating the extension on npm is to keep the npm documentation up-to-date, since the extension is made available within the Python package itself.

Make sure you have nodejs>=18 installed, bump the version in package.json, and then:

cd jupyterlab/packages/jupyterlab-jupytext-extension

# Package the extension
npm pack

# Test the extension locally
jupyter labextension install jupyterlab-jupytext-xxx.tgz

# Publish the package on npm with
npm publish --access=public

Keywords

FAQs

Last updated on 13 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc