Commit Graph

2681 Commits

Author SHA1 Message Date
Brian E. Granger
c7a12effa1 Export works with filenames having spaces.
* The fix was to put the filename in double quotes in the
  Content-Disposition header.
* Export As/Clear All have been renamed to Export and Clr All
2011-08-15 14:19:36 -07:00
Brian E. Granger
bf8ba0889e Code cell gets focused after "To Code" is triggered. 2011-08-15 14:15:21 -07:00
Brian E. Granger
dcd25caf9a Adding additional whitespace at botton of notebook for TAB comp. 2011-08-15 14:10:27 -07:00
Brian E. Granger
0790979100 Fixing tab completion edge cases. 2011-08-15 14:03:17 -07:00
Brian E. Granger
60147f495f A single tab-completion match is now automatically selected. 2011-08-14 23:41:54 -07:00
Brian E. Granger
e445ad1796 Fixing latex rendering bug. 2011-08-14 23:30:11 -07:00
Brian E. Granger
75c54c887e Notebook id removed from the notebook format. 2011-08-14 22:38:46 -07:00
Brian E. Granger
3d7d0f8b0b Added a notebook dirty flag that is used when exiting page. 2011-08-14 22:01:39 -07:00
Brian E. Granger
e911393836 Browser window title follows the name of the notebook. 2011-08-14 21:48:20 -07:00
Brian E. Granger
3be2ace4f2 Autotry additional ports if 8888 if already in use. 2011-08-14 21:41:01 -07:00
Brian E. Granger
63de9cd719 Fixing bug that caused plots to not be saved.
CodeCell.append_mime_type needed a default element.
2011-08-14 21:29:07 -07:00
Brian E. Granger
a9d6f2eb2d Major refactor of kernel connection management in the notebook.
* Full kernel heartbeating is working.
* Connections between the notebook and server and now created
  a new each time there is a WebSocket connection. Each channel is
  also handled separately. This dramatically simplifies the
  server code and makes for a more scalable system.
2011-08-14 17:58:25 -07:00
Brian E. Granger
b264e21a6d Clear all output is implemented. 2011-08-13 16:18:16 -07:00
Brian E. Granger
24a3464921 Disabling auto-save at exit. 2011-08-13 16:08:30 -07:00
Brian E. Granger
058c0b4767 HTML output cells are now styled with the rendered_html class. 2011-08-13 15:55:58 -07:00
Brian E. Granger
c72b41883f Adding tracebacks, evalue and etype to the nbformat and notebook. 2011-08-13 15:53:35 -07:00
Brian E. Granger
0c3bba9641 Adding time delay to show the notebook saving more clearly. 2011-08-11 16:55:46 -07:00
Brian E. Granger
1abacb4fce HTML/Markdown cells no longer saved their rendered output. 2011-08-11 16:48:22 -07:00
Brian E. Granger
0b5b3ed341 Added collapsed field to the code cell. 2011-08-11 16:44:50 -07:00
Brian E. Granger
0529d43ae7 Fixing padding of output cells. 2011-08-11 15:39:48 -07:00
Brian E. Granger
c2ce42121b %loadpy works in the notebook and bug with inline plotting fixed. 2011-08-11 14:51:53 -07:00
Brian E. Granger
3db421fb73 Autoindentation fixed and enabled by default. 2011-08-11 14:30:44 -07:00
Brian E. Granger
0db7ab16a3 Finishing display system work.
* Added image/jpeg MIME type to notebook format, the core display
  logic and the notebook.
* Finished HTML, SVG, Image, Math, Javascript, JSON classes.
2011-08-11 14:17:01 -07:00
Brian E. Granger
3ad866c73d Reducing/adjusting the padding of cells to make the notebook more
compact.

* Reduced padding between cells from 15px to 5px.
* Prompt width is now dynamic to grow/shrink as the prompt number
  increases in width.
* Reduced padding between input and output from 15px to 5px.
2011-08-11 09:39:04 -07:00
Brian E. Granger
90a20054a0 Updating notebook configuration.
* ipython_notebook_config.py is now created and staged.
* New certfile/keyfile config=True attributes for enabling SSL/TLS.
* Examples of usage added.
* New handling for --ip=*
* Aliases added.
2011-08-10 09:28:47 -07:00
Brian E. Granger
8a55d6bf22 Adding minor help strings for keyboard shortcuts. 2011-08-09 21:12:44 -07:00
Brian E. Granger
da63e8cbe8 Minor fixes to config system for notebook. 2011-08-09 16:38:09 -07:00
Brian E. Granger
20adfc4ced Updates to the css style of rendered html text cells. 2011-08-09 16:05:32 -07:00
Brian E. Granger
217616a505 Fixed text cell rendering bug. 2011-08-09 14:36:38 -07:00
Brian E. Granger
a70cbfc382 Implemented smart autoindenting. 2011-08-09 14:09:03 -07:00
Brian E. Granger
bc5dd6d359 Markdown cells are now saved and restored in notebooks. 2011-08-09 13:09:36 -07:00
Brian Granger
c56f76980e Reordering Export button and renaming Export->Export As 2011-08-09 12:38:59 -07:00
Brian Granger
f90b5761a2 Refactoring of text/markdown/rst/html cells. 2011-08-09 11:37:14 -07:00
Brian E. Granger
81a1099f87 Starting work on a Markdown cell. 2011-08-09 10:05:20 -07:00
Brian E. Granger
b62857f151 Fixing HTML cell syntax highlighting. 2011-08-08 14:33:48 -07:00
Brian E. Granger
b7bcdabc9a Updating CodeMirror to v 2.12.
For now I am keeping the old codemirror2 directory in here until
we finish debugging the new version.
2011-08-08 14:03:36 -07:00
Brian E. Granger
9964704b73 New HTMl cell working with CodeMirror editing. 2011-08-08 11:12:11 -07:00
Brian E. Granger
a003af7977 Starting to rename text cell to html cell. 2011-08-08 08:44:51 -07:00
Brian E. Granger
875e7da94b Added saving and loading of output of all types. 2011-08-07 20:38:51 -07:00
Brian E. Granger
188e6271e1 Using beforeunload to save at exit and kill the kernel. 2011-08-07 12:26:33 -07:00
Brian E. Granger
8cf1812395 Fixed subtle bug in kernel restarting.
* Old routers were not being shutdown and removed.
* We were incorrectly associating the new kernel with the notebook
  (we were using the *old* kernel_id for this).
* General clean ups in the kernel manager.
2011-08-07 11:17:54 -07:00
Brian E. Granger
a0cbccaa03 Adding kernel/notebook associations. 2011-08-06 21:33:55 -07:00
Brian E. Granger
ad84abcf36 Improvements to file uploaded, mime types and .py reader.
* The .py notebook reader now uses that ast module to split
  a plain python file into blocks. These blocks become cells in
  the notebook.
* Proper mime types are used for xml (application/xml), json
  (application/json) and python (application/x-python).
* Other fixes to file uploading.
2011-08-06 17:47:18 -07:00
Brian E. Granger
458c48b229 File upload/import working from notebook browser. 2011-08-05 22:06:45 -07:00
Brian E. Granger
e0cc1a6c48 Implemented delete functionality in nb browser.
* Dialog confirms the notebook delete.
* Notebook element is removed from list upon deletion.
2011-08-05 11:04:43 -07:00
Brian E. Granger
c106630a2f Implemented basic notebook browser and fixed numerous bugs. 2011-08-04 22:57:01 -07:00
Brian E. Granger
b11824ef1b Massive work on the notebook document format.
* Finished nbformat work and debugged the versioning API.
* Integrated the nbformat with the notebook. Save/New/Open/Export
  are all now working.
2011-08-04 13:55:04 -07:00
MinRK
8e64e13bbb support html representations in the notebook frontend
html gets highest priority, because it is the native language
of the frontend.
2011-07-29 11:04:04 -07:00
Brian E. Granger
59a9cd1777 Updates to basic notebook format.
* The format now handles multiple output blocks.
* XML now as worksheets, cells and outputs tags.
2011-07-29 10:15:22 -07:00
Brian E. Granger
10963a588e Adding Cell.grow back to fix bug.
This can go away once we star to use CodeMirror for TextCells.
2011-07-28 09:17:03 -07:00
Brian Granger
8207ecc086 Fixing minor resize bug on the Mac. 2011-07-27 15:21:22 -07:00
Brian E. Granger
cad3c34d62 Hacks to prevent FLOUC (flash of unformatted content). 2011-07-27 15:09:23 -07:00
Brian E. Granger
4f57e3c7fe Fixes to terminal mode execution (ctrl-enter). 2011-07-27 13:36:41 -07:00
Brian E. Granger
b6b4107e59 Notebook now uses tab for autocompletion. 2011-07-27 13:16:38 -07:00
Brian E. Granger
96be322070 Removing default input prompt number.
In a notebook setting being able to delete and add cells makes it
virtually impossible to correctly guess what the next input
prompt number should be. We now follow the convention that our
prompts look like "In [ ]:" before execution.
2011-07-27 09:16:36 -07:00
Brian E. Granger
5519c01de3 CTRL-ENTER now runs a cell in "terminal mode"
In this mode, a new cell is not created after the current cell
is run. Once the cell is run, the current input is cleared, so
it acts just like the terminal.
2011-07-27 09:13:29 -07:00
Brian E. Granger
64273fa929 Autocompletion working with CTRL-SPACE. 2011-07-26 16:45:46 -07:00
Brian Granger
e09906c1a8 Added complete method of JS kernel object. 2011-07-26 14:22:41 -07:00
Brian Granger
f24bd4f635 Colors now working in tracebacks and the pager.
For now I am just converting ANSI color escape sequences to HTML
<span> tags that have css classes for coloring.
2011-07-22 22:28:36 -07:00
Brian E. Granger
4558e8af5f Prevent shift-enter from propagating and performing default. 2011-07-22 17:18:56 -07:00
Brian E. Granger
239b087e8f Updating font-sizing to use the YUI protocol. 2011-07-22 17:07:35 -07:00
Brian E. Granger
27b5357678 Fixing execution related things.
* Extra enter on FF is fixed by hooking into CodeMirror's
  onKeyEvent hook. We now have CodeMirror ignore shift-enter
  completely as we handle it ourselves.
* The cell execution logic in notebook.js has been refactored and
  the Run All/Selected buttons have been hooked up.
2011-07-22 16:04:54 -07:00
Brian E. Granger
5fb6787570 Work on save widget, kernel status widget and notebook section. 2011-07-22 11:20:29 -07:00
Brian E. Granger
41e20d3f3e Minors fixes and initial work on save widget.
* Fixed width of buttons in left panel.
* Started to create a save widget for the header.
2011-07-20 20:42:35 -07:00
Brian E. Granger
60a89580ea Help section implemented and working. 2011-07-20 20:42:35 -07:00
Brian E. Granger
a0c36fbe7a Controls in cell section have a solid layout. 2011-07-20 20:42:35 -07:00
Brian Granger
b4015cd010 Minor fixes to fonts and spacing. 2011-07-20 20:42:35 -07:00
Brian E. Granger
3db8ae6073 Initial draft of panel section and the cell section working. 2011-07-20 20:42:35 -07:00
Brian E. Granger
4db2677391 Improving the scrolling model. 2011-07-20 20:42:35 -07:00
Brian E. Granger
c538958f71 Left panel is now working. 2011-07-20 20:42:35 -07:00
Brian E. Granger
3c07de2208 More accuract height calculations for the pager collapse/expand. 2011-07-20 20:42:35 -07:00
Brian E. Granger
4e0dd9ddbb Pager is working again. 2011-07-20 20:42:35 -07:00
Brian E. Granger
9efad482a9 More work updating the notebook to use dynamics resizing. 2011-07-20 20:42:35 -07:00
Brian E. Granger
76d7a1fdac Adding note about vbox related scroll bugs. 2011-07-20 20:42:35 -07:00
Brian Granger
122b449011 Updating jQuery to 1.6.2 and jQuery UI to 1.8.14.
I have also added a focus.html files for testing focus related
events.
2011-07-20 20:42:35 -07:00
Brian E. Granger
b46517689b Refactoring pager into its own class. 2011-07-20 20:42:35 -07:00
Brian E. Granger
68091df3f1 Initial payload handling.
* Syntax highlighting fixed for things like "math?".
* Basic pager is working.
2011-07-20 20:42:35 -07:00
Brian E. Granger
d99e820c94 Starting to refactor the notebook layout 2011-07-20 20:42:35 -07:00
Brian E. Granger
861a481f29 Actually kill old kernels upon restart. 2011-07-20 20:42:35 -07:00
Brian E. Granger
ed3a348817 Using $.proxy to clean up callbacks. 2011-07-20 20:42:35 -07:00
Brian E. Granger
215fbc4a29 Implemented module and namespace pattern in js notebook. 2011-07-20 20:42:34 -07:00
Brian E. Granger
d9cf4fa390 Updating main notebook template to use split scripts. 2011-07-20 20:42:34 -07:00
Brian E. Granger
1fd4434be4 Splitting notebook.js into muliple files for development ease. 2011-07-20 20:42:34 -07:00
Brian E. Granger
0c261d5466 Updating the notebook to work with the latex master.
* PNG figures are now used for matplotlib.
* NEW msg format is used where msg_type is in the header.
* Session is used for sending/recving.
2011-07-20 20:42:34 -07:00
Brian E. Granger
47ca4892b1 More work on updating the notebook zmq forwarding. 2011-07-20 20:42:34 -07:00
Brian E. Granger
60a21ecc14 Work to adapt routers to new Session message protocol. 2011-07-20 20:42:34 -07:00
Brian E. Granger
a66bf72d2b Notebook app debugging.
* Logging is now working with a default of INFO.
* Other misc bug fixes.
2011-07-20 20:42:34 -07:00
Brian E. Granger
d04eb09f2e Refactoring the notebook app to support the new config system. 2011-07-20 20:42:34 -07:00
Brian E. Granger
52b29af5bd Refactored htmlnotebook session and kernel manager.
* The KernelManager now manages multiple kernels with a uniform
  API.
* The SessionManager now manages the full set of channels+streams
  and the IPython.zmq.session.Session object for a single kernel.
2011-07-20 20:42:34 -07:00
Brian E. Granger
ff6d76c9e5 Renaming NotebookApplication to NotebookWebApplication. 2011-07-20 20:42:34 -07:00
Brian E. Granger
1140eeb679 Initial reorg of files complete.
I have moved things around to get ready for making the notebook
a full blown app, but have not actually made it an app.  That is
next.
2011-07-20 20:42:34 -07:00
Brian E. Granger
29bd45d3d5 Fixing import statments in handlers and notebookapp. 2011-07-20 20:42:34 -07:00
Brian E. Granger
6e2fd5206e Creating files to new notebook app. 2011-07-20 20:42:34 -07:00
Brian Granger
3c9e42586f Much improved nagivation for the notebook cells.
* Up/Down arrow now used to navigate cells.
* For text cells, shift-enter renders, enter edits.
2011-07-20 20:42:33 -07:00
Brian Granger
a91129b49a Better handling of up/down arrows for CodeCells. 2011-07-20 20:42:33 -07:00
Brian Granger
6a8c7da009 CodeMirror code editing added.
* codemirror2 repo has been added to IPython.
* Custom coloring used to match the qtconsole.
2011-07-20 20:42:33 -07:00
Brian Granger
2f9f482a6c General CSS cleanup.
* Created layout.css for common layout related mixins.
* monospace is the default font for now.
2011-07-20 20:42:33 -07:00
Brian Granger
c7dbb124f2 Updating notebook examples, and notebook js/html. 2011-07-20 20:42:33 -07:00
Brian Granger
0dd637b4d5 Added note about tornado version to main script. 2011-07-20 20:42:33 -07:00
Brian Granger
a24e75c2a2 Adding logic to look for CDN version of MathJax and fallback to local. 2011-07-20 20:42:33 -07:00
Brian Granger
36aafb3b86 Fine tuning of notebook styles.
* Padding added to L/R of notebook div (40px).
* Margin added to T/B of cells (15px).
* Margin added to T of output div (15px).
* More elements using border-box layout mode.
2011-07-20 20:42:33 -07:00
Brian Granger
1cae7230d9 Shift-Enter only selects the next cell if it is a CodeCell. 2011-07-20 20:42:33 -07:00
Brian Granger
9edf46f9dc Cells call grow by hand when they reload from JSON. 2011-07-20 20:42:33 -07:00
Brian Granger
cc4a8cff40 Added basic styling to text cells. 2011-07-20 20:42:33 -07:00
Brian Granger
680bcc4825 Basic exception display in the notebook is working. 2011-07-20 20:42:33 -07:00
Brian Granger
3b5f4b3dbe Fixes to the latex rendering by adjusting the MathJax config. 2011-07-20 20:42:32 -07:00
Brian Granger
040a285de3 Refactoring of the output and display system.
* LaTeX rendering now works.
* Font's are reworked in the css style sheet.
* Testing on FF and Chrome.
2011-07-20 20:42:32 -07:00
Brian Granger
6e36522cdf Initial latex printing for sympy and fixes to autogrow. 2011-07-20 20:42:32 -07:00
Brian Granger
005820c005 Basic notebook saving and loading.
* The logic in the server and javascript frontend is there for
  a basic JSON notebook format with a .ipynb extension.
* To save a new notebook: "%notebook save filename.ipynb"
* To save a notebook that is already saved: "%notebook save"
* To load a notebook from the cwd: "notebook load filename.ipynb"
2011-07-20 20:42:32 -07:00
Brian Granger
b584914bfb Work on the notebook's code cell.
* Cleaned up the js code for creating the code cell.
* Added a div around the input text area to allow the text area
  to have a width of 100%.
* Added CodeCell.toJSON.
2011-07-20 20:42:32 -07:00
Brian Granger
bba15fb958 Further font adjustments to the notebook.
* Using Fernando's recommended monospaced font list.
* Increased tool/tab menus to 10 pt.
2011-07-20 20:42:32 -07:00
Brian Granger
ffc2dffeca Tweaking and cleanup of notebook.css.
* Adjusted font sizes for improved readability.
* Got rid of unused css attributes and styles.
* Changed font of Title to Verdana.
2011-07-20 20:42:32 -07:00
Brian Granger
d8ca0d5d5b Fixes to notebook scrolling and layout.
We are now using the flexible box model, so the layout won't work
on IE9, but it already doesn't work on IE9 because of WS support.
2011-07-20 20:42:32 -07:00
Brian Granger
a5c3132665 Status monitoring added to notebook.
* Busy == red
* Idle == gray
* Restarting == black
2011-07-20 20:42:32 -07:00
Brian Granger
06a6f1b145 Cleaned up kernel action interface.
* Using POST rather than GET.
* Using simple URLs rather than a query string.
* Using a regexp to match the action.
2011-07-20 20:42:32 -07:00
Brian Granger
a589310431 Interrupt and restart work for kernels. 2011-07-20 20:42:32 -07:00
Brian Granger
bb7e0bff27 Minor changes to notebook css. 2011-07-20 20:42:32 -07:00
Brian Granger
49c970cddf Different clients now share a single zmq session.
Previously, each client (browser window) would open its own set
of ZMQ sockets to a kernel. Now one master set of connections
to the kernel is created and all clients share those connections.
In some ways, this simplifies the URL design.

I have also made kernel_ids server-side created.
2011-07-20 20:42:32 -07:00
Brian Granger
00b857165e Fixing main toolbar area and cleaning up jquery themes. 2011-07-20 20:42:32 -07:00
Brian Granger
f45f35ec2e Added message to help users open notebook. 2011-07-20 20:42:32 -07:00
Brian Granger
d0f883af9d Initial template for notebook browser. 2011-07-20 20:42:32 -07:00
Brian Granger
910d129f14 Server side of file based notebook store implemented. 2011-07-20 20:42:32 -07:00
Brian Granger
3ed9c3371c Make the main notebook div auto scroll. 2011-07-20 20:42:31 -07:00
Brian Granger
96cb3a8982 Initial reply handling implemented along with css fixes. 2011-07-20 20:42:31 -07:00
Brian Granger
17d899d38f Basic server for htmlnotebook working. 2011-07-20 20:42:31 -07:00
Brian Granger
a2aef63d09 Work on the server side of the html notebook. 2011-07-20 20:42:31 -07:00
Brian Granger
f44f537ee4 Adding preventDefault to shift-up/down events. 2011-07-20 20:42:31 -07:00
Brian Granger
276e5db516 Added placeholder text for TextCell. 2011-07-20 20:42:31 -07:00
Brian Granger
6729e2f4f4 Fixing selection and focus logic. 2011-07-20 20:42:31 -07:00
Brian Granger
94647cfbb1 Adding shift-enter support. 2011-07-20 20:42:31 -07:00
Brian Granger
360b6bf6ab Initial draft of HTML5/JS/CSS3 notebook. 2011-07-20 20:42:31 -07:00
Jörgen Stenarson
eea358698b 2011-07-12 19:19:38 +02:00
Thomas Kluyver
9dd9ddc0e7 Replace links to launchpad bugs in comments/docstrings with equivalent github links. 2011-05-29 23:10:48 +01:00
Thomas Kluyver
e77036cc30 Call sys.exit() at correct point in iptest. 2011-05-24 19:21:45 +01:00
Thomas Kluyver
a15c6996b1 Add exit code when running all tests with iptest. 2011-05-24 13:50:32 +01:00
MinRK
daa9df5b63 various db backend fixes
* use index on msg_id in mongodb backend (_table prevented some methods from working outside the session)
* purge_request improved to use fewer db calls
* mongodb testcase split into its own file
* Fix equality testing, NULL handling, in SQLiteDB backend
2011-05-17 14:27:33 -07:00
MinRK
59f06d7d7b update zmq dependency on Windows to 2.1.7 2011-05-16 10:47:13 -07:00
MinRK
0de0a0d4ab io.Term.cin/out/err replaced by io.stdin/out/err
Behavior is now the same as sys.stdin/out/err, and
defaults to those streams.
2011-04-27 11:35:53 -07:00
MinRK
f32e2bb944 depend on pyzmq-2.1dev on Windows
This is a temporary dependency, and should be changed to the next release of pyzmq when it arrives.
2011-04-21 12:10:26 -07:00
MinRK
7eefed1d6b fix 'test_pylabtools' exclusion in iptest 2011-04-14 17:15:20 -07:00
MinRK
a6aaa64016 update test exclusions
exclude test_irunner w/o pexpect
exclude frontend/qt w/o pyzmq or qt

closes gh-375
2011-04-14 14:48:26 -07:00
Fernando Perez
a6ebd33613 Do not generate output for empty figures in Qt console.
Before, calling figure() would produce a big blank area.  This ensures
output is only returned if the figure has content.

Also added basic testing for pylabtools, for which we had none.
2011-04-11 00:22:11 -07:00
MinRK
cf9b16d19d fix pyzmq version check for testing IPython.parallel 2011-04-08 15:27:53 -07:00
MinRK
ca5b871975 add pymongo to iptest exclusions 2011-04-07 17:50:07 -07:00
MinRK
b84c3f0cd6 organize IPython.parallel into subpackages 2011-04-07 17:38:58 -07:00
MinRK
587b10631a rebase IPython.parallel after removal of IPython.kernel
This commit removes all '*z' suffixes from scripts and docs,
as there is no longer conflict with IPython.kernel.
2011-04-07 17:38:57 -07:00
MinRK
5dfb26377f add zmq checking in iptest 2011-04-07 17:38:21 -07:00
MinRK
1277658644 Merge branch 'removetwisted' of https://github.com/ellisonbg/ipython into remove_twisted 2011-04-06 13:31:11 -07:00
Paul Ivanov
b7a088db6b make know failures report as 'K'
ported from numpy.testing.noseclasses, with the equivalent code
extracted into _numpy_testing_noseclasses in case numpy is not
installed.

removed some unused imports throughout
2011-04-03 17:52:21 -07:00
Brian Granger
527aa15f84 Removed Twisted related things from setup scripts and testing. 2011-03-30 23:20:28 -07:00
Thomas Kluyver
becb566a6f Tweak code with suggestions from yesterday. 2011-03-24 23:42:04 +00:00
Robert Kern
943edf4cf9 Remove check for GTK in tests, so that the default encoding remains ascii, and Unicode failures can be resolved. 2011-03-24 19:33:06 +00:00
Fernando Perez
5a0edd6c04 Complete support of git commit info with IPython.sys_info().
This will give us an easy way for users to report platform details,
without trying to cram lots of data into the version string.

Now, the version information in release.py is simple and doesn't
attempt to read version control data at runtime.  We expose sys_info()
as a top-level function so it's very easy to remember/direct for new
users.

Minor doc/copyright notices updates in the same files.
2010-10-26 23:19:36 -07:00
Brian Granger
29259fc441 Refactor of prompts and the displayhook.
* Renamed CachedOutput to displayhook.DisplayHook.
* Added methods that DisplayHook.__call__ uses to do its work.
  These methods can now be overridden for the ZMQ kernel.
* Removed all hooks (result_display and generate_output_prompt)
  that the outputcache was using. We need to add these back in
  once we figure out what to do about hooks in general.
2010-08-17 18:38:39 -07:00
Brian Granger
30627d74a5 Moving and renaming in preparation of subclassing InteractiveShell.
* IPython/scripts/ipython -> IPython/frontend/terminal/scripts
* IPython.core.ipapp -> IPython.frontend.terminal.ipapp
* IPython.core.embed -> IPython.frontend.terminal.embed
* IPython.core.iplib -> IPython.core.interactiveshell
2010-08-12 15:40:30 -07:00
Fernando Perez
2e8acf77e2 Finish cleanup of setup.py and tests after dead code removal.
This completes the cleanup from Brian's previous commits, so that
trunk again installs/tests correctly.
2010-07-27 13:52:54 -07:00
Brian Granger
9d00d5e3da Minor cleanup in iptest.py and growl.py. 2010-01-31 12:06:20 -08:00
Brian Granger
ba5e56c49f Removed the top-level iptest.py and INSTALLED logic.
Fernando's branch introduced the ability to run the test suite
from a top-level iptest.py script. This allowed IPython to be tested
without installation. The implementation was fragile and we also
decided that we *want* people to install IPython as part of testing
it, so we removed this feature.
2010-01-30 19:43:46 -08:00
Brian Granger
e5b30872ed More work addressing review comments for Fernando's branch.
* :mod:`IPython.testing.globalipapp` now directly creates a
  :class:`~IPython.core.iplib.InteractiveShell` instance by passing it a
  configuration object, rather than creating an IPython application.
* Updated everything in :mod:`IPython.frontend` and :mod:`IPython.gui` to use
  raw :class:`~IPython.core.iplib.InteractiveShell directly rather than
  creating an IPython application.
* Updated the IPython sphinx extension to use raw
  :class:`~IPython.core.iplib.InteractiveShell directly rather than creating
  an IPython application.
* Removed code from :mod:`IPython.extensions.pretty` that called
  :func:`get_ipython` (r1271).
* Addressed comment on (r1284) about holding refs to deferreds in
  :mod:`IPython.kernel.ipclusterapp`.
* Removed :mod:`IPython.kernel` from list of modules tested by nose in
  :mod:`IPython.testing.iptest`. (r1318)
2010-01-29 21:01:10 -08:00
Brian Granger
e24997b0ba Work to address the review comments on Fernando's branch.
* Added comment about Magic(object) (r1224)
* Moved InteractiveTB.set_mode from IPythonApp -> InteractiveShell (r1229)
* Moved pylabtools.py to IPython/lib (r1229)
* Cleaned up comments and copyrights in testing (r1233)
* Added comment about ip.shell._ofind (r1237)
* Removed "Bye." from quitter (r1240).
* Refactored and removed :mod:`IPython.utils.genutils` and
  :mod:`IPython.utils.platutils`. These modules have been replaced by topical
  focused modules in :mod:`IPython.utils`.
* Refactored tests in :mod:`IPython.utils.tests`.
* Moved :func:`IPython.testing.tools.temp_pyfile` to :mod:`IPython.utils.io`.
* Moved :func:`IPython.testing.tools.cmd2argv` to
  :func:`IPython.testing.tools.pycmd2argv` and documented the fact that this
  only works with Python based command line programs.
* Created a new :func:`IPython.utils.path.get_ipython_module_path` to use
  in finding paths to IPython modules.
2010-01-29 16:24:13 -08:00
Fernando Perez
8965698c56 Added diagnostics printout at the end of the test suite.
This will make it easier for us to understand problem reports from users.
2010-01-17 14:36:19 -08:00
Fernando Perez
e1ea030504 Robustness fixes in test suite machinery.
Added a module-level INSTALLED flag, which can be set to false if the test
suite is being run in-place (without ipython having been installed at all).
This is because how we call and import things must be done differently
depending on whether the code is installed or is being run in-place.  The
only ones that can know this reliably are the entry-point scripts, so those
are responsible for setting this flag.

Also made the code that validates ipython in subprocesses report errors
better, by checking stderr for errors before validating stdout output, as
anything on stderr will be likely informative of the real problem.
2010-01-17 13:13:21 -08:00
Fernando Perez
ecff1e9e39 Make the test suite runnable without X11 connections.
This fix makes the test suite work in settings like a screen session that
can import but not initialize GTK.
2010-01-16 14:50:08 -08:00
Fernando Perez
5740081c62 Fix tests to return consistent results regardless of how they are called.
Now, calling:

- 'python iptest.py' from source dir or from src/IPython/testing should give
the same results

- 'python iptest.py IPython.SOMETHING' from either place should also give
the same results.
2010-01-16 14:43:41 -08:00
Fernando Perez
34dd139174 Fixes to make test suite more robust on Fedora.
I fond some spurious warnings on Fedora, extra noise on stdout and other
small problems this commit fixes.

The test suite now runs cleanly on Fedora11 without Twisted available.
2010-01-15 14:41:10 -08:00
Fernando Perez
5756b33e52 Make it possible to run the tests from the source dir without installation.
Also clean up the handling of command-line options for iptest, so that all
options given at the top-level are correctly passed to nose.

Fixes: https://bugs.launchpad.net/ipython/+bug/507079
2010-01-15 02:00:11 -08:00
Fernando Perez
ae70bfc440 Let iptest pass arguments correctly to nose (in-process or in subprocess).
Fixes https://bugs.launchpad.net/ipython/+bug/507079

Also, remove relative imports from the iptest.py module so it can be run as
a script as well under 2.5 or 2.6.
2010-01-15 01:06:34 -08:00
Fernando Perez
1621f0a23f Fix bug where python -c "import IPython; IPython.test()" could fail.
Depending on where one was located when typing it, it could fail.  Made all
necessary paths absolute so this doesn't happen.
2010-01-13 00:32:13 -08:00
Fernando Perez
59117c597e Include 'kernel' in the nose tests as well; it picks up doctests that trial
doesn't.
2010-01-12 23:58:30 -08:00
Fernando Perez
91791416ab Fixes for test suite in win32 when all dependencies (esp. Twisted) are
installed.

Also activated testing.tools to be picked up by the test suite (was
excluded), this gives us a few more tests.

Status:

- On Linux, the full suite passes like before.

- On Win32, now that we have Twisted, we're seeing a few failures, because I
don't have the WinHPC server stuff.  These should be easy for Brian to fix.
There are also two tests where the Skip nose exception isn't recognized by
Twisted, should also be easy.  I'll file tickets for those.
2010-01-12 23:21:21 -08:00
Fernando Perez
e3a6f8da77 Fix test failure when pexpect not available 2010-01-12 17:39:42 -08:00
Fernando Perez
2b7da9a1bd Fix test suite when Twisted not available, cleanups to iptest for clarity. 2010-01-12 17:36:00 -08:00
Fernando Perez
0e94b28cd8 Remove accidentally introduced runtime nose dependencies. 2010-01-12 12:42:23 -08:00
Fernando Perez
22cb80d555 Fix config part of the test suite. 2010-01-09 17:55:56 -08:00
Fernando Perez
72cb0a3c73 Massive amount of work to improve the test suite, restores doctests.
After Brian's comments, I realized that our test machinery was NOT in
reality running all the ipython-syntax doctests we have.  This is now fixed.
The test suite isn't completely passing, but this commit is for the
underlying machinery.  I will now work on fixing as many broken tests as I
can.

Fixes https://bugs.launchpad.net/ipython/+bug/505071
2010-01-09 16:30:59 -08:00
Fernando Perez
6d8161fac0 A few small fixes so ipythonx works, and PEP-8 cleanups I found along the way. 2010-01-07 17:39:24 -08:00
Fernando Perez
e68e992d80 Improve test suite robustness by cleaning up stale processes when possible. 2010-01-07 16:47:46 -08:00
Fernando Perez
dabdb5361a Work in multiple places to improve state of the test suite.
With these changes, on my system now all the test sub-suites pass except
for the Twisted one (see https://bugs.launchpad.net/ipython/+bug/504515 for
details on that one).
2010-01-07 16:04:08 -08:00
Fernando Perez
dd4405c646 Progress towards getting the test suite in shape again.
Work all over the place to get more tests to pass.
2010-01-06 01:56:27 -08:00
Fernando Perez
ed2f210ebe Add new testing support machinery with better parametric tests.
Also included are new tools for doctests with ipython syntax.
2009-12-31 19:26:22 -08:00
Brian Granger
4ca0ac83cc First failed attempt to get the test suite to run. 2009-09-17 21:29:54 -07:00
Brian Granger
5f4dfb3d53 Merging upstream change from module-reorg branch.
Recently lp:ipython was merged into module-reorg.  This is propagating
that merge into this inputhook branch.
2009-08-04 11:19:33 -07:00
Brian Granger
d2126ac322 Merging -r 1196 from lp:ipython.
A couple of issues came up:

* Some tests in testing and frontend rely on twisted, but are being
  tested with nose.  This is bad!  We currently have hackish logic in
  iptest to skip these if twisted is not installed, but if it is we
  are testing them with nose!
* Some modules (engineservice, kernel/error, newserialized) have nose
  skip logic even though they should never be tested with nose.
* When trial is run on testStrictDict we get an uncaught error.

testStrictDict ... ERROR: An unexpected error occurred while tokenizing 
input The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (37, 0))
2009-08-04 09:50:23 -07:00
Brian Granger
551b819cd4 Merging -r 1185 from lp:ipython. 2009-08-03 23:52:39 -07:00
Fernando Perez
2f50493d06 Fixes so the test suite runs when Twisted is not available.
Other minor cleanups (formatting and unused imports)
2009-08-03 18:18:28 -07:00
Brian Granger
acc15a048b Merging -r 1177 from lp:ipython with fixes and resolutions.
The main conflicts I had to fix were in ultratb.  I have removed
the ultraTB.py in IPython/kernel/core.  Now IPython/core/ultratb.py
is being used everywhere.  Also I have protected the calls to ipapi.get
to see if None is returned.  This happens when trial IPython.kernel
is run.
2009-08-03 12:50:56 -07:00
Fernando Perez
f64ae7afe9 Make iptest more reliable under Win32.
This ensures the trial part of the tests runs in win32.
2009-08-01 17:08:32 -07:00
Fernando Perez
0331faae06 Small fixes for wx-dependent tests and include clearcmd.
Check that wx.aui can be imported and otherwise exclude modules that use it to
avoid errors when loading the test suite.

Also, do load clearcmd so that the tests for %clear do work.
2009-07-29 02:13:26 -07:00
Brian Granger
4e709cd95d Updated iptest to skip inputhook*.py files for doctesting. 2009-07-27 15:52:00 -07:00
Brian Granger
58e345c261 Refactored iptest.py to work with new package org.
In the process I had to fix 2 small bugs to get all the tests passing.
2009-07-27 15:38:27 -07:00
Brian Granger
6221939722 Renaming Extensions=>extensions in code and imports. 2009-07-20 15:16:34 -07:00
Brian Granger
f53e35c98b UserConfig => config/userconfig and imports updated. 2009-07-02 12:04:09 -07:00
Brian Granger
629dabdeab upgrade_dir.py => utils/upgradedir.py and updated imports. 2009-07-02 11:32:19 -07:00
Brian Granger
8bdec3ecc8 ultraTB.py => core/ultratb.py and imports updated. 2009-07-02 10:46:01 -07:00
Brian Granger
a522e6f6fd Shell.py => core/shell.py and imports updated. 2009-07-02 10:35:51 -07:00
Brian Granger
7c088ae84a Release.py => core/release.py and imports updated. 2009-07-02 09:59:43 -07:00
Brian Granger
c2b67757f4 Prompts.py => core/prompts.py and imports updated. 2009-07-02 09:35:38 -07:00
Brian Granger
d24aa6729d All platutils modules to utils, moved tests and updated imports. 2009-07-02 09:26:42 -07:00
Brian Granger
a86437a272 OutputTrap.py => core/outputtrap.py and updated imports. 2009-07-02 09:21:53 -07:00
Brian Granger
96372896a0 OInspect.py => core/oinspect.py and imports updated. 2009-07-02 09:19:02 -07:00
Brian Granger
93ff33a755 Magic.py => core/magic.py and imports updated. 2009-07-02 09:14:59 -07:00
Brian Granger
9e7706b8e8 irunner.py => lib/irunner.py and imports updated. 2009-07-02 09:12:10 -07:00
Brian Granger
6f8009d88f Logger.py => core/logger.py and updated imports. 2009-07-01 22:24:01 -07:00
Brian Granger
d4c01d0407 FakeModule.py => core/fakemodule.py and updated tests and imports. 2009-07-01 17:07:30 -07:00
Brian Granger
32a5e3041d deep_reload.py =? lib/deepreload.py and imports updated. 2009-07-01 16:39:48 -07:00
Brian Granger
8221c8f920 Debugger.py => core/debugger.py and updated all imports. 2009-07-01 16:25:06 -07:00
Brian Granger
d0a609940a CrashHandler.py => core/crashhandler.py and updated all imports. 2009-07-01 16:14:57 -07:00
Brian Granger
6bc203735a ConfigLoader.py => config/configloader.py and updated all imports. 2009-07-01 16:12:15 -07:00
Brian Granger
bfd32c129b background_jobs.py => lib/backgroundjob.py and imports updated. 2009-07-01 15:59:42 -07:00
Brian Granger
f6061ca275 ColorANSI.py -> utils/coloransi.py and all imports updated. 2009-07-01 15:55:28 -07:00
Brian Granger
ed8ff9e4e0 Fixing small bug in iptest. Can now be run as "iptest". 2009-04-25 16:09:59 -07:00
Administrator
386c262e44 Merging changes from above. 2009-04-25 15:06:50 -07:00
Administrator
ff41bf1dc6 Added platutils.get_long_path_name to expand paths with "~" on win32.
This might be needed to fix ticket https://bugs.launchpad.net/bugs/366353
But, there are still problems with Magic.parse_options
2009-04-25 15:04:17 -07:00
Brian Granger
f97df71460 Adding comment about ticket https://bugs.launchpad.net/bugs/366982 2009-04-25 13:50:45 -07:00
Administrator
e6a9e402ff More fixes for testing on win32. 2009-04-25 13:19:34 -07:00
Brian Granger
db440afb0f Fixing tests in IPython.testing. 2009-04-25 12:50:43 -07:00
Administrator
e18c04f33a Fixing bugs with the testing system. 2009-04-25 12:27:03 -07:00
Administrator
f4d078c8be Fixing doctest EXCLUDES in iptest on win32.
The regular expressions we were using on win32 were not matching.  The
trick is to construct the regular expression with double \\ like this::

    re.compile('foo\\\\bar')

Arggg!!
2009-04-25 10:05:09 -07:00
Brian Granger
44f17cc75f Making the doctest exclude paths os independent. 2009-04-25 09:04:56 -07:00
Brian Granger
055c6cdcde Run the top level module tests in a single process. 2009-04-24 11:04:32 -07:00
Brian Granger
a96c333256 Merging Fernando's fixes from his trunk-dev and fixing testing things.
I have merged his changes with a few modifications.  I have also
removed IPython.kernel from the list of packages that nose will test.
2009-04-24 10:39:01 -07:00
Brian Granger
cbd271fb01 Refactored iptest to include the iptestall capabilities.
We not have a test suite that can be run with `iptest all`.  Give it a
shot!
2009-04-24 10:12:50 -07:00
Fernando Perez
cdac592b4e Reactivate --with-ipdoctest option by default, now that trial is isolated. 2009-04-23 15:29:27 -07:00
Fernando Perez
32edd98fbd Skip things we shouldn't be testing 2009-04-22 16:34:16 -07:00
Fernando Perez
75873476f5 - Make ipdoctest a little cleaner by giving it separate option names.
This is in an attempt at better isolating it from the rest of nose, because
we are seeing intermittent Twisted errors when it is enabled.  However, I
still see them sometimes.

- Also, make the reference counting tests a little less verbose.
2009-04-03 02:03:12 -07:00
Brian Granger
842130bd17 Temporarily disabling the ipdoctest nose plugin.
This plugin was causing problems with Twisted.  We need to go through
the plugin to find the source of the problem.  For now, our test suite
passes though.
2009-03-20 21:18:16 -07:00
Fernando Perez
d2f86cc9a4 Fix problems with multiline doctests and add docs about testing.
Also enabled some more testings that were blacklisted, now that the testing
machinery is more robust.
2009-03-15 18:38:04 -07:00
Fernando Perez
55b455032b Cleanup testing machinery. 2009-03-10 22:49:08 -07:00
Fernando Perez
07b2c09938 Update decorators and test scripts. 2009-03-10 13:02:00 -07:00
Fernando Perez
366ad68411 Fixes to testing system: ipdocetst plugin wasn't being properly loaded. 2008-11-08 21:54:34 -08:00
Fernando Perez
cc13fca3c2 Add module I forgot 2008-08-23 23:37:40 -07:00