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_sage2

v1.2.3

Published

A JupyterLab extension integrating the Jupyter data science workflow with the SAGE2 collaborative system.

Downloads

11

Readme

jupyterlab_sage2

npm GitHub package.json version

Docker Cloud Build Status Docker Pulls

A JupyterLab extension to integrate SAGE2 into the JupyterLab scientific workflow.

SAGE2 and JupyterLab in Use Three researchers using JupyterLab and SAGE2 together with the jupyterlab_sage2 extension.

Table of Contents

  1. Extension
  2. Package Installation
  3. Docker Installation
  4. Issues and Contributing

Extension

The goal of this extension is to use SAGE2 with JupyterLab to integrate existing data science workflows into the collaborative software.

Disclaimer: A SAGE2 server must be running version 5.0.0 or newer to use all current JupyterLab functionality.

This extension to JupyterLab allows a user to simultaneously connect to multiple SAGE2 servers and share JupyterLab content with SAGE2, including:

  • Single Cells from a Notebook
  • An .ipynb Notebook File
  • All Cells in a Notebook by either:
    • Code Cells Only or ...
    • Code and Markdown Cells

Connecting to SAGE2 from JupyterLab

From the JupyterLab launcher, open the SAGE2 widget under "Other." Once the SAGE2 Widget is opened, a server connection can be created by clicking the green '+' button and entering the server Address. A Server Name can be specified in order to more easily refer to a server later.

Connecting to a SAGE2 Server

The plugin displays current server connections -- these connections are persistent whether or not the widget is open. The gold Star icon allows a user to choose a 'favorite' SAGE2 server which they may send content to more often.

SAGE2 Plugin Two SAGE2 Connections. Left: A SAGE2 connection which is closed (server turned off, incorrect IP, firewall issue). Right: A successful SAGE2 server connection.

Supported Jupyter Notebook Content

SAGE2 and this JupyterLab Plugin supports a variety of cell content, seen below. In order to best replicate the content in Jupyter Notebooks, SAGE2 will render:

  • image, html, and text cell Output
  • Errors produced by cells
  • Code Display (a toggleable overlaid on cells with output)

Supported Content Code Cells shared to SAGE2. These include html and image output, an Error message, and a few enabled Code Overlays.

Sending Notebook Content to SAGE2

To select a Notebook from which to send content, simply open the notebook in JupyterLab. With a Notebook active, open the SAGE2 menu in the Menu Bar (pictured below) to choose the content to share.

Sending a Content to '' sends the content to the Favorited server, while sending content to '...' opens a dialog in which a user may choose one of the SAGE2 connections to send to.

Sending Content to SAGE2

Notebooks are sent to SAGE2 and rendered using nbviewer. This requires that the SAGE2 server has an externally accessible IP or hostname which nbviewer can access. Notebook cells are rendered as images and automatically updated when a cell is re-run.

Managing Shared Content

There are two methods of managing content shared from JupyterLab to SAGE2. First, you can simply close apps from within the SAGE2 UI and cell updates will no longer be sent. This allows you to remove content based on what you currently see on the display. This UI can be accessed by clicking on the URL displayed for a SAGE2 Connection in JupyterLab.

Alternatively, you may use the Shared Content pane within the plugin. This interface displays all Notebooks with shared content. Upon selecting a notebook, the individual cells currently shared are also displayed. You may remove a single cell at a time or all cells from the notebook. This allows you to manage content based on from where the content originated.

Sending Content to SAGE2

Package Installation

Note: This package versioning mirrors that of JupyterLab. If you are not using our provided Docker images, we recommend matching your version of JupyterLab with the version of this plugin for best results.

Prerequisites

  • JupyterLab

Installation

jupyter labextension install jupyterlab_sage2

Docker Installation

To try JupyterLab with SAGE2, use the sage2/jupyterlab-datascience-notebook Docker image. This image is built FROM the jupyter/datascience-notebook and includes Python 3, R, and Julia as well as a variety of data science packages.

To install/update:

docker pull sage2/jupyterlab-datascience-notebook

To run:

docker run -it --rm -p 8888:8888 sage2/jupyterlab-datascience-notebook:latest start.sh jupyter lab

The -p 8888:8888 maps the external port to the docker port: -p <external>:<internal>. If you would like to select a different port to access Jupyterlab use -p <yourport>:8888.

When starting the docker image, the console will give a JupyterLab url with an access token. To access JupyterLab, navigate your webpage to http://<yourhostname>:<yourport>/?token=<yourtoken>.

For more information on the jupyter/datascience-notebook Docker image, visit: https://github.com/jupyter/docker-stacks/tree/master/datascience-notebook

Issues and Contributing

Please direct any issues or bug reports to the repository's Issues.

If you would like to contribute, submit a Pull Request.

Development Installation

For a development install (requires npm version 4 or later), do the following in the repository directory:

npm install
npm run build
jupyter labextension install .

To rebuild the package and the JupyterLab app:

jupyter lab build

To start development in watch mode:

# start in parallel:
yarn watch

# and
jupyter lab --watch