npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jupyterlab-jupytext

v1.4.3

Published

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

Downloads

3,897

Readme

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 [email protected]  # for JupyterLab 3.x
jupyter labextension install [email protected]  # for JupyterLab 2.x
jupyter labextension install [email protected]  # 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