Dashboard improvement
see #1658#1676
Allow to shutdown the kernels from the dashboard,
autorefresh dashboard,
add a native upload method, especially for https/chrome/linux that prevent drag and drop
Cython related magic functions: offers the new cell magics %%cython_inline, %%cython_pyximport and %%cython to make it very easy to put cython-accelerated code in a cell and have it loaded interactively.
ENH: Open a notebook from the command line
open notebook files from the command line, just
like ipython can open (run) python files. For example:
ipython notebook foo.ipynb
closes#945
This commit lets you open notebook files from the command line, just
like ipython can open (run) python files. For example:
ipython notebook foo.ipynb
Fixes#945.
Resizing to small collapse the pager keeping the size to at least 20%
height
(trying to) resize a collapsed pager to more than 10% "expand" it.
Pager can remember it size when toggling by clicking.
clear In[] prompt numbers on "Clear All Output"
For more version-control-friendly `.ipynb` files, this strips the `In[]` prompt numbers when doing a "Clear all output". This reduces the amount of noise in commit-to-commit diffs that would otherwise show the (highly variable) prompt number changes.
* 2.1.7 (earliest dep) will simply not work, so skip it
* 2.1.9-10 log the interrupts, so add a short delay to ensure the log
messages don't come after the prompt.
rename plaintext cell -> raw cell
Raw cells should be *untransformed* when writing various output formats, as the point of them is to let users pass through IPython to their rendered document format (rst, latex, etc.). This is different from what is the logical meaning of 'plaintext', which would suggest that the contents should be preserved as unformatted plaintext (e.g. in a `<pre>` tag, or literal block).
In the UI, these cells will be displayed as 'Raw Text'.
WARNING: any existing v3 notebooks which use plaintext cells, when read in by versions after this merge, will silently rename those cells to 'raw'. But if such a notebook is uploaded into a pre-merge IPython, cells labeled as 'raw' will simply *not be displayed*.
small changes in response to pyflakes pass
Only significant change: removes incomplete kernelstarter file, which shouldn't have been in the repo at all.
closes#1499
clear_output improvements, which allow things like progress bars and other simple animations to work well in the notebook.
* `clear_output()` clears the line, even in terminal IPython, the QtConsole and plain Python as well, by printing `\r` to streams.
* `clear_output()` avoids the flicker in the notebook by adding a delay, and firing immediately upon the next actual display message.
* `display_javascript` hides its `output_area` element, so using display to run a bunch of javascript doesn't result in ever-growing vertical space.
This reduces flicker during common loops like:
for step in stuff:
clear_output()
print something
the timeout is flushed *immediately* on any subsequent output.
ensures that config loading matches what would happen in ipcluster.
The only change needed in IPClusterStart itself was moving the on_stop registration from init_launchers to start_controller, where it should have been anyway.
* Created new base page html/css/js.
* Everything inherits from the page template.
* Universal header border.
* Notebook list borders are set to 1px all around.
* No border around notebook area.
* Border cleanup of toolbar/menubar.
* Lots of code reorg to get ready for further refactoring.
This exposes ipcluster's over the web. The current implementation
uses IPClusterLauncher to run ipcluster in a separate process.
Here is the URL scheme we are using:
GET /clusters => list available clusters
GET /cluster/profile => list info for cluster with profile
POST /cluster/profile/start => start a cluster
POST /cluster/profile/stop => stop a cluster
Amazon CloudFront (MathJax's CDN) supports HTTPS, but their SSL certificate only applies to *.cloudfront.net urls. This retrieves the cloudfront host at runtime, and loads MathJax from there via HTTPS.
adds new `NotebookApp.browser` configurable and corresponding `--browser` alias for specifying which browser should be launched with the notebook landing page.
Safari still uses draft76, and Tornado 2.2.0 release disables the
access from the draft version by default for security reasons.
This simply sets the tornado flag to True, so we can continue
to support Safari until it upgrades to the RFC 6455 implementation.
Python < 2.6.5 doesn't accept unicode keys in f(**kwargs), and
base_project_url will always be unicode, which will in turn
make the patterns unicode, and ultimately result in unicode
keys in kwargs to handler._execute(**kwargs) in tornado.
This enforces that base_project_url be ascii in that situation.
Note that the URLs these patterns check against are escaped,
and thus guaranteed to be ASCII: 'héllo' is really 'h%C3%A9llo'.
If you actually use u'héllo' in your regex, it will not match the URLs
you think it should.
1. Users are warned when an older nbformat notebook is converted.
2. The notebook notifies the user when a notebook that is too new
is attempted to load.
To test these things, create a simple notebook. Then change its
nbformat field by hand to 2 (to test 1) and then 4 (to test 2).
Pressing TAB to get the tooltip "range(TAB" was inserting a TAB.
To get rid of this we are now telling CodeMirror to ignore it
and also stopping the event from bubbling up the DOM.
* Refactored the save widget so that the notebook doesn't depend
on it. Now the notebook emits events and the save widget
observes those events.
* Created a new event system for all IPython events (events.js).
We should start to use this to allow our classes to be loosely
coupled.
* Created a new notification widget that should be used for all
notifications. Uses new event system.
* Removed the kernel status widget.
* All kernel status message use new event/notification system.
* The print notebook view works again.
* json separator is not ',' to avoid adding extra space at EOL.
* vs used throughout nbformat.current.
* Cell collapse is properly loaded from notebook.
Make Control-S (or Cmd-S on Apple) save the actual notebook instead of bringing up the useless 'save as html' dialog. This doesn't disable the C-m-s keybinding, simply adds the far more familiar and common C-s.
We are adding a thin horizontal toolbar below the menubar. This
commit adds the basic UI elements. Still need to hook up the actions
and make this hidable.
The notebook js transforms ANSI-escaped text to HTML. The transformed HTML was previously persisted to ipynb files, rather than the true output. This has been fixed, and notebooks with ANSI-colored output will need to be re-run for colored output (tracebacks) to be displayed correctly after this change.
Updating CodeMirror to the latest dev master.
We had found a bug in CodeMirror that was forcing us to call refresh/focus/refresh on Firefox. This bug was fixed upstream. This PR pull in the latest CM with the bug fix and removes the extra refresh calls. All known CM bugs should be fixed, yeh!
Removing Ace edit capability.
We have fixed some of the problems with CodeMirror and feel that
the differences between Ace and CodeMirror are not great enough
to justify having both. We may reintroduce a full-window edit
mode using CodeMirror, but that will come separately.
We have fixed some of the problems with CodeMirror and feel that
the differences between Ace and CodeMirror are not great enough
to justify having both. We may reintroduce a full-window edit
mode using CodeMirror, but that will come separately.
somwhere in renaming `selected_cell` to `get_selected_cell` one
occurence has been forgoten in `codecell.js` this was mainly visible by
the fact that the 'show pager' button of the tooltip was non fonctionnal
anymore.
This updates CodeMirror and refactors a good bit of the notebook code related to it.
* Updated CodeMirror to the latest stable release.
* Fix numerous bugs related to the CM update.
* Refactored the Cell API and the notebook's cell handling methods.
* Generalized split/merge to work with all cell types.
* Generalized "Edit in Ace" to work with all cell types.
* Loading optimizations: pager starts out hidden, faster loads.
* Shading added to Markdown and HTML cells when they are being edited.
* This branch will require solid usability testing on Safari, FF and Chrome before merging.
* Fixed a number of CM related bugs.
* Merge/split works for all cell types.
* Notebook.select won't select an already selected cell.
* Bugs in markdown cell editing fixed.
* border-box-sizing used for Markdown cells to get correct css boxes.
* Shading/border added to Markdown cell editor.
* Cell insertion code completely rewritten. We now have two methods
rather than 9: insert_cell_above, insert_cell_below.
* Renaming methods to be more consistent.
* Creating new methods to provide a uniform API.
* Minor bug fixes.
* Added placeholder to the base Cell class.
* Removed the \u0000 char at the beginning of the TextCell
placeholder that was there for a CodeMirror bug workaround.
* Other refactoring of Cell related Notebook methods.
* Added set_text/get_text in favor of get_code/set_code and
get_source/set_source.
* Added methods to the base class (get_text, set_text, refresh,
edit, render, toJSON, fromJSON).
When enabling paste, I was adding the click callback multiple
times causing paste to overwrite multiple cells. I also found
a bug that was doing paste above instead of paste below.
* QuickHelp button has been removed in favor of a Help menu item.
* Keyboard shortcuts are now in the menus.
* Numerous fixes to subtle aspects of the wijmenu implementation.
* edit text cells on double-click instead of single-click
* render text cells on unselect instead of focusout.
Only renders when selecting another cell, and prevents rendering when
switching applications/windows/tabs.
Single-click to edit gets in the way of using interactive elements (e.g. non-flash videos),
and select/copy of the rendered HTML. Switching to double-click makes the edit action more intentional.
adds AuthenticatedFileHandler, which extends StaticFileHandler with
a simple authentication check before providing access to files local
to the notebook dir.
Heartbeats start immediately, causing false heart failures on slow systems that can take a while to start kernel subprocesses.
Also adds a 'flush' to the heartbeat callback (just like in IPython.parallel), to protect against server load being detected as heart failures.
Kernels would not linger, but the KernelManagers are not garbage-collected on shutdown.
This means that connection files for kernels still running at notebook shutdown would not be removed.
Also disable the unnecessary (and actively unhelpful) SIGINT handler inherited from the original
copy/paste from the qt app.
Change Notebook logo to IP[y]:Notebook
Make it clickable to return to the dashboard
Thanks to @MinRK for the css.
closes#607
png logo is 48px high (2x display), for balance of
browser display / zoomed appearance.
settings for tornado web application can now be specified via the
NotebookApp.webapp_settings configurable. This principally allows
users/admins to serve custom templates, css, and javascript, without
having to modify IPython's shipped sources.
closes#1135
Following @fperez advice, change the completer apparence to avoid user confusion.
- Append what the user type in the completer in code-miror, (Almost) as if
codemirror still have focus
- distinguish between "fixed" completion part, which was sent to the kernel
(now written in bold) and filtering one,handled only in JS,that the user
can errase without dismissing the completer
I changed the action of <Space> to dismiss the completer with what have
already been typed and inserting a space instead of "picking" the currently
hilighted option
<Escape> will still dissmiss the completer and remove everything the user as
typed since the completer invocation
Note that while the completer is shown, code-mirror does not show any
blinking cursor
- dissmiss the completer, append what alredy type, **Plus** one caracter in
some cases
List of special caracter that are handle are in a given list `()[]./\-+`
for the moment. usefull for exaple when typing :
>>> np.s<tab>in(
and not having to type '(' twice.
they are handle separately has the [a-zA-Z] ones because otherwise they
will screw up the regexp, and are opt-in to avoid bugs with invisible
caracters send because some browser have 'keypress' event for meta keys
close#1080
Note to this commit :
list of test for the completer across browser with --pylab=inline flag
#test direct one completion
plt.an<tab> -> plt.annotate
#test filter,tab, only one completion
plt.a<tab>n<tab> -> plt.annotate
# test partial common beggining
# test dismmised if user erase
plt.a<tab>nn<backspace><backspace>u<tab> -> completer to `aut`
........................................<tab><tab><tab> -> nothing should append
.......................................................<backspace><backspace<backspace> -> completer cancelled
#test dismiss if no more completion
plt.s<tab>c -> completer 3 choices
...........u -> dismissed whith what user have typed. `plt.scu`
# test dismiss in no completion, special symbol
# opt-in list of caracters +-/\()[].
np<tab>.s -> a 'dot' sould dismiss the completer and be appended
.........<tab>in( -> np.sin(
np.s<tab>in[ -> np.sin[
allow the notebook to run without MathJax
adds --no-mathjax flag for disabling mathjax, and moves the mathjax URL decision to the server from the browser.
closes#1071
prototype functions were actually called which should not happen, and
resulted in objects and their attributes being passed to their own methods
as arguments.