Closed Bug 1247931 Opened 10 years ago Closed 10 years ago

Integrate IPython Notebook 'gist' plugin

Categories

(Cloud Services Graveyard :: Metrics: Pipeline, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mreid, Assigned: azhang)

Details

We should deploy the jupyter-notebook-gist plugin[1] for our Spark notebooks. It allows you to easily post+update a notebook as a gist (both as a .ipynb file and a .py for convenient diffs), as well as loading a notebook from an arbitrary URL, or from a list of your gists (or some other user's public gists) on github. The plugin is installable via pip, and we can either use the GitHub Application client id / secret I generated for development, or create a new one[2] within the 'mozilla' org. [1] https://github.com/mozilla/jupyter-notebook-gist [2] https://github.com/settings/applications
Summary: Integrate IPython Notebook 'gist' integration → Integrate IPython Notebook 'gist' plugin
Anthony, would you be able to look at integrating this plugin?
Flags: needinfo?(azhang)
Assignee: nobody → azhang
Flags: needinfo?(azhang)
:whd, do you have access to the mozilla Github account? Would you mind generating a set of OAuth credentials capable of creating Gists?
Flags: needinfo?(whd)
To clarify: * The name can be something like "Jupyter Notebook Gist" * These credentials would be for the purpose of creating Gists, so that is the only permission they should have - everyone using the analysis server will have access to it! * The callback URL should be "http://localhost:8888/". Also, we *can* allow all @mozilla.com email holders to create Gists, right? I assume yes, but would like to double check.
(In reply to Anthony Zhang [:azhang] from comment #3) > Also, we *can* allow all @mozilla.com email holders to create Gists, right? > I assume yes, but would like to double check. Yeah, the plugin creates the gist in the user's own GitHub account (not the mozilla account), so it should be safe.
I have created some credentials under the Mozilla org. I didn't see any way of restricting permissions, but I assume that's done in the application code / oauth flow. Let me know who to send them to or where to put them.
Flags: needinfo?(whd)
:whd, can you send them to me, or put them on S3 in telemetry-spark-emr-2/jupyter_notebook_config.py? My GPG key is E7A352D6 on the Mozilla keyserver, if you prefer to email them. After some testing, it seems that the permissions requested will be on the user's account, rather than Mozilla's; the resulting gists will show up at gist.github.com/USER/...
Points: --- → 1
Priority: -- → P1
Creds sent.
This is currently waiting on a PR [1] I sent to Jupyter-notebook-gist that will fix it for the current version of Jupyter. Afterwards, merging [2] will give all newly created clusters the plugin. I've tested it locally; it's pretty useful. [1]: https://github.com/mozilla/jupyter-notebook-gist/pull/39 [2]: https://github.com/mozilla/emr-bootstrap-spark/pull/15
The gist plugin doesn't appear to be loading correctly. I see a 404 when attempting to create a gist. I tried killing the the auto-started notebook server, then manually starting another one, and got the following error message: [W 18:11:41.169 NotebookApp] Config option `oauth_client_secret` not recognized by `NotebookApp`, do you mean : `cookie_secret` [W 18:11:41.170 NotebookApp] Unrecognized JSON config file version, assuming version 1 [W 18:11:41.218 NotebookApp] Error loading server extension jupyter-notebook-gist.create_gist Traceback (most recent call last): File "/home/hadoop/anaconda2/lib/python2.7/site-packages/notebook/notebookapp.py", line 1005, in init_server_extensions mod = importlib.import_module(modulename) File "/home/hadoop/anaconda2/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named jupyter-notebook-gist.create_gist
Filed https://github.com/mozilla/jupyter-notebook-gist/pull/40 to fix this, and pushed a new version of the package to PyPI.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.