Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 29]: Options to enable HTTP access to kernels #35

Merged
merged 15 commits into from
Dec 5, 2015
Merged

[Issue 29]: Options to enable HTTP access to kernels #35

merged 15 commits into from
Dec 5, 2015

Conversation

nitind
Copy link
Collaborator

@nitind nitind commented Nov 24, 2015

Refactored with changes from @Lull3rSkat3r and @parente:

  • Use kernel client library to wait for the kernel to start,
    draining shell output when executing non-API cells
  • Added path params for access from API functions.
  • Fixed encoding issue with args parsing.
  • Added scotch notebook example.
  • Add parsing of query parameters
  • Can access request body from cells
  • Body assignment and API cell indicator respect notebook kernel spec

Ref issue #29

Nitin Dahyabhai and others added 3 commits November 24, 2015 10:41
   Refactored with changes from @Lull3rSkat3r and @parente:
   * Use kernel client library to wait for the kernel to start,
       draining shell output when executing non-API cells
   * Added path params for access from API functions.
   * Fixed encoding issue with args parsing.
   * Added scotch notebook example.
   * Add parsing of query parameters
   * Can access request body from cells
   * Body assignment and API cell indicator respect notebook kernel spec

(c) Copyright IBM Corp. 2015
… the future.

Added license headers to test_request_utils.py
(c) Copyright IBM Corp. 2015
@parente
Copy link
Contributor

parente commented Nov 30, 2015

Does this replace PR #32?

@nitind nitind changed the title [Issue 29]: Options to enable HTTP access to kernels [WIP] [Issue 29]: Options to enable HTTP access to kernels Nov 30, 2015
@nitind
Copy link
Collaborator Author

nitind commented Nov 30, 2015

Yes.

@@ -152,9 +153,16 @@ def _default_kernel_name_default(self):
def _list_kernels_default(self):
return os.getenv(self.list_kernels_env, 'False') == 'True'

api_env = 'KG_API'
api = Unicode(config=True,
help='Designates that the kernel gateway will serve APIs from this notebook (KG_API env var)'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a choices traitlet? If so, this should use it. Either way, the currently supported options should be "jupyter-websocket" and "notebook-http". Anything else should be an error. The help string needs to reflect the available options if you can't define a set of choices in a traitlet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a dedicated option for that plus another specifying the notebook whose APIs should be exposed, or just renaming and documenting this one for clarity?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two options, the notebook to use and the API to expose, are separate. The seed notebook makes sense under both API modes (and potentially new modes that will be added.)

@parente
Copy link
Contributor

parente commented Nov 30, 2015

Some system tests would also be good. You can keep cramming them into test_gatewayapp for now and we can figure out how to refactor later.

Nitin Dahyabhai and others added 11 commits November 30, 2015 23:12
  * Change the API argument to switch between Jupyter Kernel mode and
    Notebook API serving mode, and exit with error text on wrong value
  * Serve APIs from the seed_uri notebook
  * Merge the two kernel manager classes back into one
  * Fix the sorted_endpoints iterating
  * Change extraneous print() call to logging
  * Delegate per-language handling into methods and dictionaries
(c) Copyright IBM Corp. 2015
…ls from leaking.

(c) Copyright IBM Corp. 2015
… execution to complete.

(c) Copyright IBM Corp. 2015
    Also fix a couple of spelling typos
(c) Copyright IBM Corp. 2015
@parente
Copy link
Contributor

parente commented Dec 5, 2015

OK. I think this is MVP enough to put into master. I've opened some follow on issues. And we'll open more as we find bugs or potential improvements.

Nice work @nitind and @Lull3rSkat3r. I think people are going to have some fun with this once we make it easy to convert and deploy.

parente added a commit that referenced this pull request Dec 5, 2015
[Issue 29]: Options to enable HTTP access to kernels
@parente parente merged commit 08690b0 into jupyter-server:master Dec 5, 2015
@parente parente changed the title [WIP] [Issue 29]: Options to enable HTTP access to kernels [Issue 29]: Options to enable HTTP access to kernels Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants