Commit Graph

912 Commits

Author SHA1 Message Date
MinRK
cd6fd19fd8 remove stale exclusions revealed by warning 2012-05-31 11:57:13 -07:00
MinRK
65ac94d8f4 warn on nonexistent exclusions 2012-05-31 11:56:06 -07:00
MinRK
3ac79da49c add missing cython exclusion in iptest 2012-05-31 10:06:13 -07:00
Matthias BUSSONNIER
a4dc3f1e3f position upload form for firefox 2012-05-31 18:58:03 +02:00
Bussonnier Matthias
711c2ef6cc Merge pull request #1739 from Carreau/dashboardImprovement
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
2012-05-31 00:24:14 -07:00
Matthias BUSSONNIER
981738f9e3 change upload sentense 2012-05-31 08:33:52 +02:00
Fernando Perez
c15e0fa132 Merge pull request #1770 from ellisonbg/cython_magic
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.
2012-05-30 22:17:34 -07:00
Brian Granger
26e8363d46 More code review changes:
* Added extension to the Sphinx docs.
* Fixed unicode issues.
2012-05-30 22:01:34 -07:00
Fernando Perez
5378cba25a Merge pull request #1755 from minrk/pygmentstest
test for pygments before running qt tests, to avoid an error in the test suite itself if pygments isn't present.
2012-05-29 14:04:46 -07:00
Brian E. Granger
13cc762f4c Merge pull request #1630 from minrk/mergekernel
Merge divergent Kernel implementations
2012-05-25 16:43:27 -07:00
Bussonnier Matthias
242d3df5c2 Merge pull request #1705 from Carreau/draggablePager
[notebook] Make pager resizable, and remember size...
2012-05-25 00:20:19 -07:00
Thomas Kluyver
89b6bc664a Merge pull request #1606 from Carreau/loadpycat
Share code for %pycat and %loadpy, make %pycat aware of URLs
2012-05-24 02:26:35 -07:00
Matthias BUSSONNIER
1eeff0e5c8 Revert "esc collapse pager"
This reverts commit c8e47d45dbd7c17293de0d9218e8f52247b79d1d.
2012-05-23 20:35:50 +02:00
MinRK
b037cf18a4 move default log setup to _log_default from init_logging
allows classes to be passed log attribute, avoiding duplicate setup and occasional errors if things are done in the wrong order.
2012-05-22 22:07:23 -07:00
MinRK
1cd79e1461 test for pygments before running qt tests 2012-05-22 14:38:59 -07:00
MinRK
e0cdb267de fix date objects in _reserialize_reply 2012-05-21 22:07:47 -07:00
Matthias BUSSONNIER
73ff1c5cde fix upload button selection by class
superseed #1676 #1658 (and correct bug in 1676 where one con't upload
notebook because of refresh)
2012-05-15 21:57:05 +02:00
Matthias BUSSONNIER
b2291b14dc Drag target bigger for empty notebook dashboard
When no notebooks, show "Notebook list empty", which increase the size
of the drag target.

fixes #1492
2012-05-15 21:54:09 +02:00
Matthias BUSSONNIER
1eae6f060a do not expose enable/disable autorefresh 2012-05-15 21:54:09 +02:00
Matthias BUSSONNIER
40bdd81f5c replace b by strong for semantic, more change in boilerplate 2012-05-15 21:53:22 +02:00
Matthias BUSSONNIER
231e8f93f2 remove underscore in filename 2012-05-15 21:53:22 +02:00
Matthias BUSSONNIER
0ada7dd847 bold click here in dashboard 2012-05-15 21:53:22 +02:00
Matthias BUSSONNIER
ee857f1bd9 remove extra console.log 2012-05-15 21:53:22 +02:00
Matthias BUSSONNIER
d549731d32 add 'Close and halt' in notebook filemenu 2012-05-15 21:53:22 +02:00
Matthias BUSSONNIER
13cf61912b prevent autorefresh when pending upload
don't clear list if 'upload' button are present to avoid clearing the
list and the upload form
2012-05-15 21:53:22 +02:00
Matthias BUSSONNIER
a6f78c90b3 Check for null rather than undefined
set kernel id to None/null if not started
2012-05-15 21:53:21 +02:00
Matthias BUSSONNIER
c20c814a69 space around assignement 2012-05-15 21:53:21 +02:00
Matthias BUSSONNIER
2faee858af rename kernel_status -> kernel_id 2012-05-15 21:53:21 +02:00
Matthias BUSSONNIER
34deb138c8 test kernel for undefined rather than off 2012-05-15 21:53:21 +02:00
Matthias BUSSONNIER
fc59441dda dashboard autorefresh
refresh notebook list and cluster list when :
- page get focus
- every 60 sec when page is on focus

stop refreshing every 60 sec when page loose focus
2012-05-15 21:53:21 +02:00
Matthias BUSSONNIER
a07088dde1 clean unused command 2012-05-15 21:52:29 +02:00
Matthias BUSSONNIER
4af8cb6c9a proof of concept 2012-05-15 21:52:28 +02:00
Matthias BUSSONNIER
473a3947b0 kernel status 2012-05-15 21:52:28 +02:00
Matthias BUSSONNIER
8d673ea086 clean html, style logon form 2012-05-15 21:52:28 +02:00
Matthias BUSSONNIER
275b1040b1 multifile selection 2012-05-15 21:52:28 +02:00
Matthias BUSSONNIER
ca089cc7cf alternate notebook upload methods
fixes #1562
2012-05-15 21:52:28 +02:00
Min RK
c6fedc3456 Merge pull request #1686 from punchagan/notebook-cmd-line
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
2012-05-13 16:08:34 -07:00
Matthias BUSSONNIER
293243fcf4 remove references to loadpy
remove most of the references to loadpy across the docs and example
2012-05-11 23:36:22 +02:00
Matthias BUSSONNIER
6acefdacb2 pep 8 and js
space after comma, space around equal, space before if and curly bracket
2012-05-09 14:50:31 +02:00
Matthias BUSSONNIER
4cfd7e9df6 fix firefox compatibility 2012-05-08 09:53:49 +02:00
MinRK
f72eebe15f update with forthcoming MathJax CDN move 2012-05-07 13:18:29 -07:00
Matthias BUSSONNIER
785fbd9d9a esc collapse pager 2012-05-07 12:36:18 +02:00
Puneeth Chaganti
1e9d2f4a1c ENH: Open a notebook from the command line
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.
2012-05-07 10:27:25 +05:30
Matthias BUSSONNIER
976c433fe4 Make pager resizable, and remember size...
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.
2012-05-06 21:08:04 +02:00
Matthias BUSSONNIER
8462288405 fix tooltip on token with number
fixes #1696
allow number in matched token for tooltip, except first position
also prevent matching token starting wit a dot
2012-05-04 09:13:43 +02:00
MinRK
97151aa3b8 revert PR #1659
caused critical problems with subprocess output.

See `!ls` for an example.
2012-04-29 23:52:07 -07:00
Michael Droettboom
a5d7dd8d2b Fix typo in comment 2012-04-27 16:48:04 -04:00
Michael Droettboom
e8be6bbe50 Fix the "test for nothing was streamed" so it doesn't add empty elements -- but only when there wasn't already something there. 2012-04-26 10:00:16 -04:00
Michael Droettboom
50fa35b1cc Handle carriage return characters ("\r") in HTML notebook output. 2012-04-25 13:16:33 -04:00
MinRK
86e3e953da add ioloop.install to backported patches 2012-04-23 16:59:00 -07:00
Fernando Perez
e5e200eaa7 Merge pull request #1621 from ivanov/clear-input-prompt-on-clear-all-output
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.
2012-04-18 23:06:32 -07:00
MinRK
6419b0b130 include IPython.zmq in iptest groups 2012-04-18 15:32:43 -07:00
Paul Ivanov
06dd2b00c6 clear In[] prompt numbers on "Clear All Output" 2012-04-17 18:48:30 -07:00
MinRK
6e2694a9d9 handle old pyzmq in notebook exit confirmation
* 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.
2012-04-16 11:59:55 -07:00
MinRK
c5d7d6f08a confirm notebook shutdown on SIGINT
confirmation in bg thread, to avoid blocking
5s timeout before restoring original state if no response

^C^C == confirmation
2012-04-15 23:25:09 -07:00
MinRK
3c19b40d2f exit notebook cleanly on SIGINT, SIGTERM
makes it a bit more likely security files, etc. will be cleaned up.
2012-04-15 12:06:05 -07:00
Fernando Perez
0344f92a62 Merge pull request #1490 from minrk/raw
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*.
2012-04-14 17:46:25 -07:00
MinRK
e7a45e9454 add VERSIONHACK markers for never-released plaintext handling 2012-04-14 16:02:53 -07:00
Fernando Perez
526d842289 Merge pull request #1502 from minrk/pyflakes
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
2012-04-14 02:33:29 -07:00
Fernando Perez
98ac51808e Merge pull request #1563 from minrk/clear_output
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.
2012-04-13 21:12:23 -07:00
Fernando Perez
14d29450a3 Merge pull request #1560 from minrk/testdocs
remove obsolete discussion of Twisted/trial from testing docs

We don't use trial anymore, so these docs were no longer accurate.

closes #1558
2012-04-13 20:31:32 -07:00
MinRK
9cb1559d5e document initially hidden javascript container 2012-04-09 15:35:29 -07:00
MinRK
c21be2f386 hide output_area for js
prevents growing vertical space from adding empty output_areas.
2012-04-09 15:35:29 -07:00
MinRK
5c6c247b65 [notebook] clear_output is handled after a delay
This reduces flicker during common loops like:

for step in stuff:
    clear_output()
    print something

the timeout is flushed *immediately* on any subsequent output.
2012-04-09 15:35:28 -07:00
MinRK
fe92e50471 remove a few more obsolete twisted notes 2012-04-09 11:01:21 -07:00
MinRK
124037690e use os.getcwdu in NotebookManager
prevents unicode error when starting in non-unicode path.
2012-04-04 09:48:29 -06:00
MinRK
fd2cc9d19e make MultiKernelManager.kernel_manager_class configurable
This allows deployments to use customized KernelManager subclasses via config.
2012-03-31 19:24:38 -07:00
MinRK
600acfb694 fix sorting profiles in clustermanager 2012-03-16 14:52:06 -07:00
MinRK
f9438de710 small changes in response to pyflakes pass
removes incomplete kernelstarter file, which shouldn't be in the repo at all yet.
2012-03-15 15:54:20 -07:00
MinRK
9927cec392 denote raw cell with 'Raw Text' in UI 2012-03-14 15:07:55 -07:00
MinRK
f036c032c7 interpret 'plaintext' cells with their new name 'raw' 2012-03-14 12:45:28 -07:00
MinRK
9ffc7829da rename plaintext cell -> raw cell 2012-03-13 17:31:39 -07:00
MinRK
9d80f8522c use DummyIPClusterStart to load config in notebook ClusterManager
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.
2012-03-08 12:21:51 -08:00
Brian Granger
19322be14d Chaging # of engines format in cluster list. 2012-03-08 11:37:28 -08:00
Brian Granger
24510c6e00 Sort profiles in cluster tab. 2012-03-08 11:31:04 -08:00
Brian Granger
c0a87aa940 Notebook cluster manager now uses proper launchers. 2012-03-08 11:27:31 -08:00
Brian Granger
dbefa745fd On tab select, the URL is updated. 2012-03-08 11:27:31 -08:00
Brian Granger
35ffb5500a Cluster management is now working.
You can start/stop clusters in the notebook with a very simple UI. More to do,
but this is a start.
2012-03-08 11:27:30 -08:00
Brian Granger
5df969af5c Fixing tab design. 2012-03-08 11:27:30 -08:00
Brian Granger
34d784a5ab Draft of the cluster list UI.
Not functional yet, but the idea is there.
2012-03-08 11:27:30 -08:00
Brian Granger
b819fbfe8f Initial try at adding tabs to project dashboard. 2012-03-08 11:27:30 -08:00
Brian Granger
3631fae153 Major refactoring of notebook.
* 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.
2012-03-08 11:27:29 -08:00
Brian Granger
6dc7b078b9 Refactoring templates and top level js/css organization. 2012-03-08 11:27:29 -08:00
Brian Granger
f19a63759b First version of cluster web service.
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
2012-03-08 11:27:29 -08:00
Brian E. Granger
6b5a5f0b36 Merge pull request #1450 from minrk/httpsmathjax
load mathjax from CDN via https.
2012-02-29 15:27:45 -08:00
MinRK
8de583a6cd include heading level in JSON
adds level-including to/fromJSON methods to HeadingCell
2012-02-28 14:21:05 -08:00
MinRK
83c5470bf7 load mathjax from CDN via https
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.
2012-02-28 13:53:48 -08:00
MinRK
7ad2568d53 fix inverted self.browser logic 2012-02-20 10:00:50 -05:00
Min RK
ea945fa31c Merge pull request #1406 from ivanov/browser-selection
adds new `NotebookApp.browser` configurable and corresponding `--browser` alias for specifying which browser should be launched with the notebook landing page.
2012-02-18 18:39:31 -08:00
Paul Ivanov
6ee29b4c72 be more explicit about how --browser value is used 2012-02-14 14:26:31 -08:00
Paul Ivanov
407c8ee6d7 added --browser option to notebook
now you can specify --browser=firefox when starting ipython notebook
2012-02-13 19:15:32 -08:00
Paul Ivanov
7b9099041d document how to select browser for notebook 2012-02-13 18:11:54 -08:00
Thomas Kluyver
7d849a2f70 Only monkeypatch xunit when the tests are run using it. 2012-02-13 23:17:05 +00:00
Thomas
c926a2872c Merge pull request #1395 from takluyver/xunit-kf
Make Xunit count KnownFailure tests as skipped, not failures.
2012-02-12 03:49:28 -08:00
Brian E. Granger
d0c445a63c Merge pull request #1386 from ellisonbg/jsd3
Adding Javascript output handling to the notebook.
2012-02-09 17:47:36 -08:00
Thomas Kluyver
4f947c2877 Make separate function to monkeypatch Xunit. 2012-02-09 20:20:19 +00:00
Thomas Kluyver
5773f8cd1d Monkeypatch Xunit to count known failures as skips, not errors. 2012-02-09 19:52:20 +00:00
Min RK
6b2cb224cd Merge pull request #1353 from takluyver/i1345
Save notebook as script using unicode file handle.

Using io.open(), which is the Python 3 open() in 2.6 and above.

Closes #1345
2012-02-08 15:14:47 -08:00
Brian Granger
6c9a7d0d41 Fixing Cell menu to update cell type select box. 2012-02-07 12:02:54 -08:00
Brian Granger
5ef2e06a42 Javascript output is not run on notebook loading and paste's. 2012-02-07 09:18:23 -08:00
Brian Granger
893572d3ad Wired up the javascript display protocol using eval. 2012-02-07 08:57:06 -08:00
Brian E. Granger
cd0810ee25 Merge pull request #1370 from minrk/draft76
allow draft76 websockets (Safari)
2012-02-06 10:59:13 -08:00
Brian E. Granger
b3fb9c474b Merge pull request #1368 from minrk/asciipatterns
Ensure handler patterns are str, not unicode
2012-02-06 10:51:39 -08:00
MinRK
8cfd9dcf6e allow draft76 websockets (Safari)
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.
2012-02-02 22:31:42 -08:00
MinRK
7607bb6a5b Ensure handler patterns are str, not unicode
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.
2012-02-02 15:18:54 -08:00
Brian Granger
f387e52610 Proper error handling for nbformat versions in client code.
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).
2012-02-01 15:46:14 -08:00
Brian Granger
1ffb5ff262 Making keyboard shortcut for showing line numbers consistent. 2012-02-01 14:43:58 -08:00
Brian Granger
f9ce3fa493 Fixing #1337. Tooltip stops TAB from being handled by others.
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.
2012-02-01 10:26:07 -08:00
Brian Granger
e5bc1eef59 Fixing Shift-Enter bug in text cells.
Hitting Shift-Enter on an already rendered text cell should simply
move past it. It was causing the cell to enter edit mode. This
is not fixed.
2012-02-01 09:57:23 -08:00
Brian Granger
4ae865a988 Fixing #1348 to allow Ctrl-M M to work w/o releasing Ctrl. 2012-02-01 09:50:56 -08:00
Brian Granger
e59f95376d Major refactoring of saving, notification.
* 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.
2012-01-31 21:42:01 -08:00
Brian E. Granger
241e65b5c1 Merge pull request #1347 from Carreau/fixes-1243
Fix weird magic completion in notebook.  Closes #1243.
2012-01-30 15:22:03 -08:00
Brian E. Granger
96e5089d5d Merge pull request #1346 from astraw/alternate-url-fixups
fixups for alternate URL prefix stuff
2012-01-30 15:16:15 -08:00
Brian Granger
d7efc05572 Removing extra refresh in PlaintextCell. 2012-01-30 14:54:26 -08:00
Brian Granger
bdd17da81d Fixing minor bugs in nbformat and saving.
* json separator is not ',' to avoid adding extra space at EOL.
* vs used throughout nbformat.current.
* Cell collapse is properly loaded from notebook.
2012-01-30 14:20:54 -08:00
Thomas Kluyver
abd3989bb6 Specify UTF-8 encoding for saving notebook as script. 2012-01-30 21:48:05 +00:00
Thomas Kluyver
53b10b861c Save notebook as script using unicode file handle.
Closes gh-1345
2012-01-30 21:43:48 +00:00
Brian Granger
a00fc0165b Heading/plaintext cells now wired up to toolbar UI. 2012-01-30 12:08:36 -08:00
Brian Granger
2f88004a05 Updating JS part of plaintext cell handling. 2012-01-30 11:50:04 -08:00
Brian Granger
fd3d5edb66 Finishing first draft of RST and heading cells. 2012-01-30 11:50:03 -08:00
Brian Granger
f65adcf33e Adding new HeadingCell. 2012-01-30 11:50:03 -08:00
Brian Granger
47e4e1e2c4 A first go at RST cell support in the notebook. 2012-01-30 11:50:03 -08:00
Andrew Straw
ee9da32b05 use full URL when using alternate URL prefix 2012-01-30 07:19:33 +01:00
Andrew Straw
332fdf662c let websocket server be traited config option 2012-01-29 07:29:33 +01:00
Andrew Straw
bd7f1f941c allow setting base_project_url and base_kernel_url to non-default values 2012-01-29 07:29:33 +01:00
Andrew Straw
c706d6ed99 bugfix: use baseProjectUrl when re-writing URL in address bar 2012-01-29 07:29:33 +01:00
Andrew Straw
81a636dabf use Tornado's handler.static_url() in templates 2012-01-29 07:29:33 +01:00
Fernando Perez
5067e77292 Merge pull request #1334 from fawce/keycuts
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.
2012-01-28 16:39:06 -08:00
Brian Granger
1ed9a21039 Adding "Cell" to cell related Edit actions. 2012-01-27 16:16:22 -08:00
Brian Granger
9b723324db Wired the rest of the toolbar buttons up to actions. 2012-01-27 13:54:37 -08:00
Brian Granger
428c82877f Further work on the toolbar UI.
* Cell type selection box is wired up and styled.
* New View menu that allows toolbar/header to be toggled.
2012-01-27 13:45:43 -08:00
Brian Granger
4c88c4686c First draft of toolbar.
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.
2012-01-27 12:31:28 -08:00
fawce
a53def4a49 fixed missing return for keybinding 2012-01-27 14:49:39 -05:00
fawce
6120c07c4d added key handler for control-s to notebook, seems to work pretty well 2012-01-27 14:18:48 -05:00
Thomas Kluyver
717285060e Use explicit for loop to find section in testing. 2012-01-27 11:16:35 +00:00
Thomas Kluyver
4b51bacbb2 Don't raise errors from coverage post-processing. 2012-01-27 01:16:46 +00:00
Thomas Kluyver
93a8b9d215 Use separate option --with-xml-coverage to ask for coverage xml output. 2012-01-27 01:16:46 +00:00
Thomas Kluyver
24af9ac298 Use standard command for coverage. 2012-01-27 01:16:46 +00:00
Thomas Kluyver
e29d417931 Produce coverage xml reports from subprocess test runners. 2012-01-27 01:16:46 +00:00
Min RK
125dc8cb74 Merge pull request #1206 from minrk/fixConsole
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.
2012-01-26 17:14:29 -08:00
Fernando Perez
df7d91f30a Add linewrapping to text cells (new feature in CodeMirror). 2012-01-25 22:17:12 -08:00
Fernando Perez
ef1cc56996 Merge pull request #1327 from ellisonbg/updatecm2
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!
2012-01-25 22:16:13 -08:00
Fernando Perez
219ba77482 Merge pull request #1326 from ellisonbg/removeace
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.
2012-01-25 20:30:36 -08:00
Fernando Perez
1d5c57d6c9 Remove debug print statement left over from PR #1316. 2012-01-25 19:43:14 -08:00
Brian Granger
0bc0c560aa Removing extra refresh that is no longer needed because of CM fix. 2012-01-25 14:03:49 -08:00
Brian Granger
262d73f652 Updating CodeMirror to latest to incorporate bug fixes. 2012-01-25 13:46:48 -08:00
Brian Granger
c29e928054 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.
2012-01-25 12:32:06 -08:00
Matthias BUSSONNIER
7e268d8ec8 execute_get_cell -> execute_cell
wrongly rename execute_cell leading to broken execute_all_cell
2012-01-25 15:15:52 +01:00
Matthias BUSSONNIER
8ad0cbe4c0 forgotten selected_cell -> get_selected_cell
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.
2012-01-25 14:47:15 +01:00
Thomas Kluyver
b01e9ea082 Pass subprocess test runners a suitable location for xunit output. 2012-01-24 21:23:58 +00:00
Brian E. Granger
d8e1b38507 Merge pull request #1303 from ellisonbg/updatecm
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.
2012-01-23 19:29:53 -08:00
Brian Granger
d3c3c9e712 Fixing auto-indent issues in CodeMirror config.
* Block-level indent/dedent works.
* Tab in docstrings works.
2012-01-23 19:27:18 -08:00
Brian Granger
5947849342 Fixing broken notebook saves. 2012-01-23 19:00:25 -08:00
Brian Granger
c94e6f34d7 Disallow empty notebook names. 2012-01-23 15:36:01 -08:00
MinRK
370078020f flush outgoing heartbeats
Prevents mismatch between heartbeat timer and actual heartbeat send/recv events.

Applied in notebook and parallel.
2012-01-23 13:42:00 -08:00
Brian Granger
244ed795d3 Adding refresh/focus/refresh back to edit to fix bug in FF. 2012-01-23 11:56:07 -08:00
Brian Granger
e6e7d41f5b Fixing bugs in CodeMirror refreshing. 2012-01-23 11:33:02 -08:00
Brian Granger
1e2e086508 Optimizing notebook loading. 2012-01-23 11:33:01 -08:00
Brian Granger
bf0353ae47 Start the pager out collapsed. 2012-01-23 11:33:01 -08:00
Brian Granger
a997e50782 Ace editor now works with Markdown and HTML cells with proper modes. 2012-01-23 11:33:01 -08:00
Brian Granger
68fe221a29 Lots of small notebook improvements.
* 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.
2012-01-23 11:33:01 -08:00
Brian Granger
ecfdfad2bf Refactoring of the notebooks cell management.
* 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.
2012-01-23 11:33:01 -08:00
Brian Granger
ccd4de93c7 Updating cell logic.
* 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.
2012-01-23 11:33:01 -08:00
Brian Granger
e1a8835dfa Work on the base Cell API.
* 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).
2012-01-23 11:33:01 -08:00
Brian Granger
deb800daff Fixing bugs that have shown up since updating CM to 2.2. 2012-01-23 11:33:01 -08:00
Brian Granger
13ca0054f7 Updating to CodeMirror 2.2, latest stable release. 2012-01-23 11:33:01 -08:00
Brian Granger
1b8b716b48 Removing left over console.logs. 2012-01-19 09:47:05 -08:00
Brian Granger
e93d4a9308 Minor, but important fixes to cut/copy/paste.
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.
2012-01-19 09:47:05 -08:00
Brian Granger
43c82a2b80 Fixing minor typo in menubar.js. 2012-01-18 12:47:53 -08:00
Brian Granger
183e9ccfb1 Minor changes to Ace widget.
* Font size and family matches that of our CodeMirror editors.
* Help link to Ace keyboard shortcuts added to help.
2012-01-18 12:16:39 -08:00
Brian Granger
f04e31b80c Add Ace editing mode for code cells. 2012-01-18 10:31:59 -08:00
Brian Granger
d369606683 Cell splitting and merging is done! 2012-01-17 18:27:58 -08:00
Brian Granger
b42cafa15d More of the initial split cell capability. 2012-01-17 18:27:58 -08:00
Brian Granger
23b5fd856a Basic code cell splitting implemented. 2012-01-17 18:27:57 -08:00
Min RK
41149ba246 Merge pull request #1253 from ivanov/profile_auto_create
set auto_create flag for notebook apps

Fixes first use of bundled profiles when used with the notebook (e.g. ipython --profile=sympy).
2012-01-17 18:27:55 -08:00
Brian Granger
06cc810b80 Adding keyboard sortcuts for cut/copy/paste. 2012-01-17 18:27:52 -08:00
Brian Granger
ccc5aa04b2 Added cell level cut/copy/paste. 2012-01-17 18:27:51 -08:00
Brian Granger
0051dd3bda Fixing docstring in the notebook manager. 2012-01-17 18:27:51 -08:00
Brian Granger
eef6d192e4 Created new print view for notebook printing. 2012-01-17 18:27:50 -08:00
Brian Granger
76f500b3c3 Improving the save notification.
* Added last saved with time/date display.
* Reimplemented save widget status updates.
2012-01-17 18:27:50 -08:00
Brian Granger
2a7666639c Fixing bug in dialog closing, drafting print css. 2012-01-17 18:27:50 -08:00
Brian Granger
531cfee407 Remove Rename dialog from the DOM upon closing it. 2012-01-17 18:27:49 -08:00
Brian Granger
1f1132c5a4 More minor theme/styling changes. 2012-01-17 18:27:49 -08:00
Brian Granger
bf5ffad6f8 Minor style changes. Using better fonts, indenting menu items. 2012-01-17 18:27:49 -08:00
Brian Granger
10a76e8537 Solid first go at jquery-ui based menus. 2012-01-17 18:27:49 -08:00
Brian Granger
b3de72087c Minor fixes to the menu shortcuts. 2012-01-17 18:27:47 -08:00
Brian Granger
be8f252e78 Finishing work on "Make a Copy" functionality. 2012-01-17 18:27:47 -08:00
Brian Granger
8cd495c38f Beginning work on notebook duplication. 2012-01-17 18:27:46 -08:00
Brian Granger
52a2600c87 Improved notebook renaming.
There is not a rename dialog that is available in the File menu and
when you click on the notebook name.
2012-01-17 18:27:46 -08:00
Brian Granger
b010d14f58 Cleaning up menu code.
* 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.
2012-01-17 18:27:46 -08:00
Brian Granger
33f5cea94b Implemented menu based UI using Wijmo. 2012-01-17 18:27:45 -08:00
Brian Granger
e4489da763 Initial work to add Wijmo based menu. 2012-01-17 18:27:45 -08:00
Paul Ivanov
9e475c3dc5 set auto_create flag for notebook apps 2012-01-10 16:52:07 -08:00
Matthias BUSSONNIER
096ba3fcc4 fix weird magic completion
should fix #1243

handle magic as a special case, but the completer should be moved in it's
own clase for 0.13
2012-01-08 16:39:11 +01:00
Min RK
e4beaf0a73 Merge pull request #1211 from minrk/localfiles
Files in notebook-dir are served by the nbserver as `files/<relativepath>`.
2012-01-06 02:00:14 -08:00
Min RK
7be995118d Merge pull request #1224 from minrk/dblclick
* 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.
2012-01-06 01:59:02 -08:00
MinRK
87877e9a7f explicit for-loop in cleanup_kernels
makes single-iteration clearer than while loop, as reviewed by @fperez.
2012-01-05 21:53:34 -08:00
MinRK
1385ef8ebb log heartbeat failure in notebook 2012-01-05 21:12:58 -08:00
MinRK
655bf1bacc prevent delayed heartbeat from starting on closed sessions 2012-01-05 20:05:32 -08:00
MinRK
2c8106bf42 trigger textcell render on unselect instead of focusout 2012-01-05 19:20:17 -08:00
MinRK
5cce816d2a edit text cells on double-click instead of single-click
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.
2012-01-05 19:12:44 -08:00
MinRK
1d65883212 serve local files as files/foo 2012-01-03 11:40:15 -08:00
MinRK
ba5e2538b5 use absolute URLs for static files 2012-01-03 11:37:15 -08:00
MinRK
d67865c73c authenticate local file access
adds AuthenticatedFileHandler, which extends StaticFileHandler with
a simple authentication check before providing access to files local
to the notebook dir.
2012-01-03 11:30:00 -08:00
MinRK
831fb175f8 serve files in notebook-dir as local/foo 2012-01-03 11:30:00 -08:00
MinRK
7691f4f9fc store nonexistent prompt number as null 2011-12-24 10:59:17 -08:00
MinRK
220a5f0664 don't preserve fixConsole output in json 2011-12-24 10:45:47 -08:00
MinRK
15ca2aaa20 add first_beat delay to notebook heartbeats
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.
2011-12-22 22:45:44 -08:00
MinRK
13fc7e5c41 cleanup connection files on notebook shutdown
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.
2011-12-20 12:32:08 -08:00
Fernando Perez
572e1eb56f Add message about how to stop the notebook. 2011-12-18 21:55:05 -08:00
MinRK
602d2ec18a fix IOPub parent checking in notebook
prevented 'dead kernel' messages from arriving.
2011-12-18 18:21:47 -08:00
Bradley M. Froehle
930ba99b19 Show class init and call tooltips in notebook.
Closes #1094.
2011-12-18 12:36:38 -08:00
Fernando Perez
7c7a48e2ce Define flags in application that's going to use them. 2011-12-17 18:12:41 -08:00
Fernando Perez
b3d5732690 Fix typo in help string 2011-12-17 14:31:33 -08:00
Fernando Perez
fd485e23fc Add --script flag as shorthand for the script autosave notebook option. 2011-12-17 13:38:52 -08:00
Stefan van der Walt
6a8a66fa8b Correctly set read_only meta name for use in javascript. Note that this has a different meaning than in the Python code: not whether the read-only flag was specified upon launch, but whether the notebook is in read-only mode and input should be disabled. 2011-12-13 18:02:17 -08:00
Stefan van der Walt
4476c69984 Hide top login/logout buttons on login/logout pages. 2011-12-13 17:44:29 -08:00
Stefan van der Walt
52a2f081fe Split read-only logic into three functions: read_only, logged_in, and login_available. Move display logic from javascript into templates. 2011-12-13 17:22:13 -08:00
Stefan van der Walt
3bf57a7f5d Improve three-state read-only logic. 2011-12-13 16:15:20 -08:00
Stefan van der Walt
23ff0c2f88 On the login page, focus on the password field. 2011-12-13 16:13:34 -08:00
Stefan van der Walt
06d34fea72 Redirect to front page upon read-only logout. 2011-12-13 16:13:34 -08:00
Stefan van der Walt
ec89b7c98b Display login button in read-only mode. 2011-12-13 16:13:34 -08:00
Fernando Perez
b98a86f818 Merge pull request #1146 from minrk/savescript
Allow saving notebook.py next to notebook.ipynb.  This allows notebooks to be imported or %run via their .py companion file.
2011-12-12 22:38:45 -08:00
MinRK
dca65fa91d include error in 'Unexpected error' message. 2011-12-12 21:09:42 -08:00
MinRK
6947e47822 Merge PR #1132
Improve read-only style

closes #1132
2011-12-12 15:19:04 -08:00
MinRK
218a88a47b move drag_info show/hide to page.ready, to avoid flouc 2011-12-12 15:17:20 -08:00
Matthias BUSSONNIER
c6457428c8 notebook : update logo
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.
2011-12-12 15:03:38 -08:00
MinRK
a8425e5c62 Merge PR 1135
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
2011-12-12 14:17:07 -08:00
MinRK
88340d682c update iptest exclusions with recent changes 2011-12-12 11:47:51 -08:00
Matthias BUSSONNIER
16946ef7bb unhide on not read-only instead of inverse 2011-12-11 13:02:13 +01:00
Timo Paulssen
eb51077b26 look for mathjax in the custom static path if it's supplied. 2011-12-10 22:44:12 +01:00
Timo Paulssen
7fa16984cc this is how the configuration system is supposed to be used. 2011-12-10 18:49:41 +01:00
Timo Paulssen
ec0026bbf9 use IPythons config subsystem to allow overrides to the tornado web app. 2011-12-10 16:30:12 +01:00
Matthias BUSSONNIER
540f77f96a [notebook] read-only disable element
* remove the drag file to upload text
    * prevent drag binding to show upload form
2011-12-09 16:45:19 +01:00
Matthias BUSSONNIER
b0ad2c6f29 [notebook] read-only: disable name field 2011-12-09 12:36:11 +01:00
MinRK
d7970d29a5 skip codemirror key-event handling when read-only 2011-12-08 12:47:08 -08:00
Matthias BUSSONNIER
70fa9c8b2a totally remove pager when read only
closes #1126
2011-12-08 12:46:31 -08:00
MinRK
46cd0213a6 allow saving notebook.py next to notebook.ipynb
enable with:

    NotebookManager.save_script=True
2011-12-07 16:37:11 -08:00
Matthias BUSSONNIER
855fd6f923 notebook: code Readability. Add dismissing symbols
* As minrk suggested, changes list of char to string.split()
	* add also a few dismissing symbold like `,` `=` and `*` for
	  the completer
2011-12-07 08:03:37 +01:00
Matthias BUSSONNIER
44c959f88b notebook: fix, only one completion autopick 2011-12-07 08:03:37 +01:00
Matthias BUSSONNIER
c596d17eaf completer update code-miror on the fly
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
2011-12-07 08:03:37 +01:00
Matthias BUSSONNIER
1fbf5b18dd Apply pep8 to js 2011-12-07 08:03:37 +01:00
Matthias BUSSONNIER
933cf3606b usability and cross browser compat for completer
- 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[
2011-12-07 08:03:37 +01:00
MinRK
bf7f3336ae Split swallow_argv into standalone function in lib.kernel
adds frontend_flags/aliases traits to ConsoleApp derivatives for
use in this function.
2011-12-05 17:41:00 -08:00
Min RK
b6bb3c8c7a Merge pull request #1077 from minrk/nb
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
2011-12-05 16:49:04 -08:00
MinRK
7774ddd0a5 Merge PR #1098: notebook config-panel style
Fixes some style consistency issues in config section of side panel.

closes #1098
2011-12-05 15:52:01 -08:00
MinRK
26416b6d2d make 'time before tooltip' style more consistent 2011-12-05 15:51:29 -08:00
MinRK
d6ac9f3ec3 add server/permission info in failed-mathjax dialog
It's now more clear that offline mathjax info is server-related.
2011-12-05 15:21:49 -08:00
MinRK
41b493f540 Cleanup some inappropriate javascript
prototype functions were actually called which should not happen, and
resulted in objects and their attributes being passed to their own methods
as arguments.
2011-12-04 14:20:48 -08:00
Matthias BUSSONNIER
e268dd0650 fix cancell->cancel typo in js
prevented closing tooltip

closes #1095
2011-12-04 13:52:13 -08:00