GithubHelp home page GithubHelp logo

jupyter-server / extension-cookiecutter Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 8.0 264 KB

A Cookiecutter recipe for Jupyter Server extensions

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

extension-cookiecutter's People

Contributors

afshin avatar almarklein avatar blink1073 avatar bloomsa avatar bollwyvl avatar claytonpassmore avatar danielballan avatar dlqqq avatar echarles avatar fcollonval avatar fm75 avatar gnestor avatar goanpeca avatar ianhi avatar invisibleroads avatar janjagusch avatar jasongrout avatar jtpio avatar jzf2101 avatar krassowski avatar martinrenou avatar parente avatar pre-commit-ci[bot] avatar s-weigand avatar telamonian avatar vidartf avatar willingc avatar xiaohk avatar yuvipanda avatar zsailer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

extension-cookiecutter's Issues

Add a trait/config to the extension app

Problem

Current jupyter server documentation doesn't have any references for using a config/trait in the extension app. This forces extension writers to use alternate means to configure their applications by using env variables or other custom configuration methods.

Proposed Solution

Add a trait/config to the extension app that showcases use of config to set properties with default values but configurable from the extension config. Also add code to show use of this trait within a handler.

Additional context

How to use generated sample extension

Description

I ran through the setup process with cookiecutter to generate my sample extension but I'm not understanding how to test it within a running jupyter server. My (naive) understanding was that this extension just adds a /ping endpoint to the server that responds with a 200 and 'pong', but I'm either misunderstanding the code, or missing something.

The server extension does appear to load correctly judging from the logs below
Screen Shot 2022-09-06 at 10 30 03 PM

Reproduce

  1. run cookiecutter https://github.com/jupyter-server/extension-cookiecutter
  2. complete prompts and navigate into the new directory
  3. run pip install .
  4. run jupyter server

Expected behavior

I expected to be able to curl http://localhost:8888/myextension/ping but that returned a 404 instead of "pong"

Context

  • Operating System and version:
  • Browser and version:
  • Jupyter Server version:
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.

The ping url should be namespaced

Currently we are using a top level url (/ping) in the recipe. It should be namespaced with the extension name, to promote best practices.

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.