Minor fixes to the htmlnotebook #727

Merged
merged 3 commits into from Aug 25, 2011

Conversation

Projects
None yet
3 participants
Owner

ellisonbg commented Aug 24, 2011

We were having problems with notebook renaming when using uuid5,
as there are many places in the code where we assume that the
notebook id is unique and unchanging as long as the notebook
server runs.

This branch will also contains other related bug fixes.

@ellisonbg ellisonbg Going back to using uuid.uuid4() for notebook ids.
We were having problems with notebook renaming when using uuid5,
as there are many places in the code where we assume that the
notebook id is unique and unchanging as long as the notebook
server runs.
88bc8b6

@minrk minrk commented on the diff Aug 24, 2011

docs/source/interactive/htmlnotebook.txt
@@ -24,7 +24,7 @@ which will behave similar to the terminal and Qt console versions, using your
default matplotlib backend and providing floating interactive plot windows. If
you want inline figures, you must manually select the ``inline`` backend::
- $ ipython notebook --pylab inline
+ $ ipython notebook --pylab=inline
@minrk

minrk Aug 24, 2011

Owner

There was nothing wrong here, the '=' sign is unnecessary.

@ellisonbg

ellisonbg Aug 24, 2011

Owner

OK, but are we recommending either as the canonical way of passing arguments?

On Wed, Aug 24, 2011 at 10:25 AM, minrk
reply@reply.github.com
wrote:

@@ -24,7 +24,7 @@ which will behave similar to the terminal and Qt console versions, using your
 default matplotlib backend and providing floating interactive plot windows.  If
 you want inline figures, you must manually select the inline backend::

  •    $ ipython notebook --pylab inline
  •    $ ipython notebook --pylab=inline

There was nothing wrong here, the '=' sign is unnecessary.

Reply to this email directly or view it on GitHub:
https://github.com/ipython/ipython/pull/727/files#r101556

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

ellisonbg added some commits Aug 24, 2011

@ellisonbg ellisonbg Ctrl-Enter now does not delete input, but selects it. c586fb0
@ellisonbg ellisonbg Adding messages to HTTPError raising.
These messages are not returned to the browser, but are printed
to the server logs and will help the code readability.
I have also used a more specific code in some cases.
a6875a6

@fperez fperez commented on the diff Aug 24, 2011

IPython/frontend/html/notebook/notebookmanager.py
@@ -70,8 +70,7 @@ class NotebookManager(LoggingConfigurable):
def new_notebook_id(self, name):
"""Generate a new notebook_id for a name and store its mappings."""
- notebook_id = unicode(uuid.uuid5(uuid.NAMESPACE_URL,
- 'file://'+self.get_path_by_name(name).encode('utf-8')))
@fperez

fperez Aug 24, 2011

Owner

My only suggestion would be to leave this commented out with a TODO indicating we want to get stable urls for which this mostly works, but which can't be left quite as-is because of the breakage. That way, if we do take a stab at proper url redirection, then we don't have to remember what this logic was. Because this part by itself is pretty much ok, the problem is the inconsistency generated on renames due to lack of redirection.

If you'd rather not leave dead code around, at least a todo comment with a note of this commit would make the job easier later if we need to get this back, so we don't need to go fishing for it in git. No big deal one way or another, though.

Owner

fperez commented Aug 24, 2011

OK, other than the minor note above, this looks great. Thanks both for the fixes and for catching several small typos in the docs I wrote in haste as my plane was boarding :)

As far as I'm concerned, decide what to do about the small comment above, and merge away!

Owner

fperez commented Aug 25, 2011

Since we really need this here, I've merged it with an added todo comment as indicated above.

@fperez fperez merged commit a6875a6 into ipython:master Aug 25, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment