Giter Club home page Giter Club logo

jupyter-extensions's Introduction

Google Cloud Platform Extensions for Jupyter and JupyterLab

This repository serves as a common repository for Google-developed extensions for the Jupyter and JupyterLab environments.

Development

The following steps only need to be completed once to setup your initial development environment.

Note: If at any point you want to go through these steps on a fresh JupyterLab environment, you can run pipenv --rm to remove the virtual environment.

  1. Clone this repository.

  2. cd into the repository directory and install the NPM dependencies with npm install.

  3. Run npm run bootstrap to install the dependencies for each of the extension subfolders.

    • You should repeat this command anytime you add a new NPM dependency to one of the subfolder packages.
  4. Run pipenv install.

    • Install pipenv if you don't have it already to assist with managing a clean Python environment.
  5. Run pipenv shell to activate the virtual Python environment with the necessary dependencies installed.

  6. Run cd shared/ and then npm run install-shared to install the shared package.

  7. Run npm run link to link the gcp-jupyterlab-shared package into the JupyterLab environment.

    • This allows local development on the common frontend components library to be used in other extensions without needing to publish and re-install updated versions of the packages.
    • If you are having trouble running this command, try restarting these steps on a new JupyterLab environment (see Note above).
  8. cd into the folder of the extension you plan to develop and run npm run install-extension. This installs the extension in the JupyterLab environment in development mode. Afterwards, cd back to the root of the repository.

    • Run jupyter labextension install @jupyter-widgets/[email protected] if your extension requires ipywidget. Currently, this is a requirement for the jupyterlab_bigquery extension.
  9. Run npm run watch to start the TypeScript compiler in watch mode. This will watch for changes in any of the TypeScript sources.

    • Alternatively, you can run the npm run watch command only in the packages you are working in.
  10. In a seperate terminal, run pipenv shell and then npm run devserver. This will start JupyterLab in watch mode to pick up any changes to either the TypeScript or Python code.

    • You can watch the terminal output to ensure that the TS compiler has successfully recompiled your package. Then, you can refresh the browser tab to see your change.
    • If your change isn't present after a refresh cycle, you may need to stop and restart the watch or devserver tasks. This may occur when adding a new file to the project.

You can then open JupyterLab at one of the links shown in the logging output.

Testing on an AI Platform Notebook

If you would like to test an extension in an AI Platform Notebook, you can do so by following these steps.

  1. Create a new AI Platform Notebook from the Cloud Console.

  2. cd into the directory of the extension you wish to install.

  3. Run ../scripts/deploy.sh passing the instance's name and zone as arguments.

    • ie. ../scripts/deploy.sh test-instance us-east1-b

jupyter-extensions's People

Contributors

angelakuo avatar ashleyswang avatar cbwilkes avatar cynthiaxjia avatar dependabot[bot] avatar hwing777 avatar josie-garza avatar junhyeokkwak avatar kpfromer avatar l1ghtspeed avatar mkalil avatar mounikasomisetty avatar mrznone avatar ojarjur avatar prodonjs avatar shunr avatar timothyrjames avatar yaminahq avatar ylil93 avatar yunluyl avatar

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.