Giter Club home page Giter Club logo

renku-jupyterlab-ts's Introduction

jl-renku

Github Actions Status

A JupyterLab extension for Renku.

This extension is composed of a Python package named jl_renku for the server extension and a NPM package named jl-renku for the frontend extension.

Requirements

  • JupyterLab >= 3.0

Install

To install from pypi, run the following command (this will fail at the moment, since jl_renku has not been published to pypi yet):

pip install jl_renku

If you have NodeJS available, you can also install from the repo:

pip install .

Troubleshoot

If you are seeing the frontend extension, but it is not working, check that the server extension is enabled:

jupyter server extension list

If the server extension is installed and enabled, but you are not seeing the frontend extension, check the frontend extension is installed:

jupyter labextension list

Contributing

Development install

Note: You will need NodeJS to build the extension package.

Create environment for development (optional)

If you have not already done so, you will probably want to set up an environment for developing the extension. Detailed instructions are in the JupyterLab Extension Tutorial.

Here are the key commands (assuming conda is installed) to create a conda environment that includes all prerequisites and the development version of JupyterLab:

conda create -n jupyterlab-ext --override-channels --strict-channel-priority -c conda-forge -c anaconda cookiecutter nodejs jupyter-packaging git
conda activate jupyterlab-ext
pip install jupyterlab --pre

Install extension in development mode

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
# Change directory to the renku-jupyterlab-ts directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build

You 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 needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

With 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, the jlpm run build command 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:

jupyter lab build --minimize=False

Building

To build the extension for deployment as a python package, first make sure jupyter_packaging is installed. If not, install it with

pip install jupyter_packaging

Then you can create a wheel package with

python setup.py bdist_wheel

You will find the package in the dist/ directory.

Refer to the JupyterLab documentation for more detailed instructions.

Uninstall

pip uninstall jl_renku
jupyter labextension uninstall jl-renku

renku-jupyterlab-ts's People

Contributors

ciyer avatar cramakri avatar dependabot[bot] avatar jirikuncar avatar lorenzo-cavazzi avatar masterscrat avatar rokroskar avatar vfried avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

renku-jupyterlab-ts's Issues

Add Renku tab to JupyterLab

image

Add a "Renku" tab to JupyterLab, which offers point-and-click access to common renku commands.
The initial version should support the following commands:

Renku

  • status: execute renku status in a terminal
  • log: execute renku log in a terminal
  • run: Take arguments for the command to run and execute renku run [args] in a terminal

Git

  • push: execute git push in a terminal
  • commit: Take a commit message and execute git commit -m<message>

Revive JupyterLab Extension

We implemented a JupyterLab Extension, but that was coded against an earlier version of the API (pre 1.0). We should revive the extension. Initially it should just provide a command cheat sheet.

extension not compatible with new jupyterlab

> /opt/conda/bin/npm pack renku-jupyterlab-ts
renku-jupyterlab-ts-0.1.4.tgz

Errored, use --debug for full output:
ValueError: This extension does not yet support the current version of JupyterLab.

Add a "renku-run" button in the notebook

Currently every execution inside the notebook is not tracking the output (this is fine for experimenting and exploration). But if someone want to do so, she would be required to open a terminal and type the renku run command.
The idea here would be some shortcut to clean previous executions (untracked ones), and run the whole notebook in a deterministic manner (all cells in the right order) and track all outpus.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.