Thomas Kluyver
4c62fd4210
Merge pull request #7149 from minrk/thread-nb
...
run test notebook server in thread
12 years ago
Scott Sanderson
2216b9522c
DEV: Tweaks from PR feedback.
...
- Reformat expected keys for in `validate_model`.
- Require `'mimetype'` to be non-None only when the model being
validated is a file.
- Add more information to the error when keys are unexpectedly non-None.
12 years ago
Scott Sanderson
70eb9e219f
DOC: Add docstring for validate_model.
12 years ago
Scott Sanderson
a45b8a0c67
DEV: Validate models returned from ContentsManager methods.
12 years ago
Min RK
22e206de6f
ContentsManager type kwarg to match model key
...
remove `_` suffix, making it consistent with models,
REST API, etc.
12 years ago
Thomas Kluyver
4cee2f5f3a
Merge pull request #7128 from minrk/more-v-less-m
...
A little more V, a little less M in the text editor
12 years ago
Thomas Kluyver
9f48e86477
Merge pull request #7136 from minrk/octet-stream
...
set default mimetype to octet-stream for binary files
12 years ago
Scott Sanderson
ccc8cb9cbf
Minor cleanups in the contents API.
...
Noticed while poking around with a linter enabled.
12 years ago
Min RK
f0181836b2
run test server in thread
...
instead of subprocess
12 years ago
Min RK
407e63cb80
set default mimetype to octet-stream for binary files
...
mimetype only specified if content=True
12 years ago
Min RK
c81609f5d6
redirect /edit/ to /files/ if not (utf8) text
12 years ago
Min RK
c238553a4e
set application/json on contents model replies
12 years ago
Min RK
ee00dcf083
docstring
12 years ago
Min RK
f2343e4ec5
update `--script` behavior to use `nbconvert --to script`
12 years ago
Min RK
1731b9b449
`--script` triggers post_save hook with nbconvert
12 years ago
Min RK
58c0a97ec3
add pre/post-save hooks
...
- `ContentsManager.pre_save_hook` runs on the path and model with content
- `FileContentsManager.post_save_hook` runs on the filesystem path and model without content
- use pre_save_hook for things like stripping output
- use post_save_hook for things like nbconvert --to python
12 years ago
Min RK
11ef669ec6
kernelspecs is a dict
...
sort menus client-side
12 years ago
Matthias Bussonnier
de52775797
Merge pull request #7078 from takluyver/kernelpath
...
Rework get_kernel_path logic
12 years ago
Thomas Kluyver
3cad1f4b4d
Expose ConfigManager one level up the hierarchy
...
Because `from IPython.html.services.config import ConfigManager` is long
enough.
12 years ago
Kyle Kelley
a6d3d6a93e
Log warning directly.
12 years ago
Kyle Kelley
7a48687929
Update CSP tests for new default.
12 years ago
Kyle Kelley
17d1c2d488
Report CSP violations as warnings.
12 years ago
Kyle Kelley
0c22c140c3
Turn x-frame-options tests into CSP tests
12 years ago
Kyle Kelley
392118d536
One unified CSP report URI
12 years ago
Kyle Kelley
cb19f07c9a
csp_report_uri caused a cyclic dependency
12 years ago
Kyle Kelley
23b9f09177
Log CSP violations via report
12 years ago
Kyle Kelley
1f03954dd8
Handle CSP Reports
12 years ago
Thomas Kluyver
d273b56044
Clean up get_kernel_path logic
12 years ago
Matthias Bussonnier
fd2588612a
return API path instead of filesystem
12 years ago
Thomas Kluyver
f1295c6b8d
Add default for profile_dir
...
So ConfigManager is useful outside an IPython application
12 years ago
Thomas Kluyver
febd670716
First stab at ConfigManager class
12 years ago
Thomas Kluyver
25ee73a554
Loading a file works
12 years ago
Min RK
837ef7f122
s/open_w/atomic_writing/
12 years ago
Min RK
c9a4e5b00d
handle various permission failures
...
- turn various EPERM, EACCES errors into 403
- add `writable` bool field to contents models
- if a notebook is not `writable`, save is disabled
12 years ago
Thomas Kluyver
8252f56b00
Allow FileContentsManager and MappingKernelManager to be used outside NotebookApp
12 years ago
Thomas Kluyver
6d776a5292
Allow starting the server with both file_to_run and notebook_dir
...
file_to_run and notebook_dir would collide, with possible dictionary
ordering randomness depending on how they were passed.
With this change, the default value of notebook_dir is pulled from
file_to_run, instead of pushing the value when file_to_run is changed.
This makes it possible to specify both and have the server behave as
expected.
12 years ago
Min RK
a62a9abdef
update MappingKernelManager module docstring
12 years ago
Min RK
1914e27cff
Don't pass IPython-specific args to non-IPython kernels
...
add a few FIXME notes that the IPython-kernel special treatment
will probably want to be removed in the Jupyter explosion.
12 years ago
Thomas Kluyver
d04e41251d
Merge pull request #6915 from minrk/contents-no-0
...
use Untitled instead of Untitled0
12 years ago
Min RK
0a22217f7e
Merge pull request #6900 from takluyver/contents-api-get-as-type
...
Contents API get as type
12 years ago
Min RK
e4e1d47203
Merge pull request #6694 from takluyver/config-rest-api
...
Add REST API for retrieving, storing and updating config
12 years ago
Min RK
456e65b1f3
adjustments to filename increment
...
- start with no number (Untitled0 -> Untitled.ipynb)
- copy of copy increments instead of adding another `-Copy` (copy Foo-Copy1.ipynb gives Foo-Copy2.ipynb, not Foo-Copy1-Copy1.ipynb)
- copy file to new folder starts with the original filename, instead of unconditional `-Copy0`
12 years ago
Thomas Kluyver
0f44eced72
Put frontend config files in profile_foo/nbconfig/ subdir
12 years ago
Thomas Kluyver
c9b6e30526
Actually pass URL params with API request
12 years ago
Thomas Kluyver
f1f81e2efa
Rename get_model() to get()
12 years ago
Thomas Kluyver
6f48b58b18
Fix various review comments
12 years ago
Thomas Kluyver
b5a6cb7da1
Allow specifying format when getting files from contents API
12 years ago
Thomas Kluyver
ce6dd40c5c
Add type parameter for contents GET requests
12 years ago
Min RK
da832ef59f
split ContentsManager.new, add ContentsManager.new_untitled
12 years ago
Min RK
39041a9f03
address review in contents service
...
- various docstrings, comments clarified and updated
- misc typos
- fix and test creating an untitled directory via POST
- only define `message` if there's something to say
12 years ago
Min RK
74c897cc0b
unicode!
12 years ago
Min RK
bc4f0b32bb
rename ContentsManager.create_file->new
...
consistent with js API
12 years ago
Min RK
62dedf921b
remove notebook['name'] from sessions
12 years ago
Min RK
b6c4baa2fb
remove copy via PUT
...
only copy via POST to directories
12 years ago
MinRK
3ada0c2c27
Remove separate 'path', 'name' in Contents API
...
- path is full path (including name)
- name is only used for read-only convenience, and plays no role in any API
- remove 'untitled upload' (POST with content and no path)
12 years ago
Thomas Kluyver
ae6ae8f7b0
Return updated config from PATCH requests
12 years ago
Thomas Kluyver
c26b0f6961
Fix writing JSON on Python 2
12 years ago
Thomas Kluyver
425d5a1c02
Apply JSON config updates recursively
12 years ago
Thomas Kluyver
6786f86c63
Fix docstring, validate JSON on PUT
12 years ago
Thomas Kluyver
a76a546627
Add REST API for retrieving, storing and updating config
12 years ago
Thomas Kluyver
963921c4ff
Merge pull request #6832 from minrk/request-only-once
...
actually send only one kernel_info request
12 years ago
Min RK
525f6a7561
fix backward `f, nb` args for nbformat.write
12 years ago
MinRK
7cf53c998c
restore ability to sign v3 notebooks
12 years ago
MinRK
af735018f3
don't use nbformat.current in IPython.html
...
use top-level nbformat.read/write, v4 directly for compose
12 years ago
MinRK
12f94ae2a2
use from_dict for dict->notebook
...
not confusing to_notebook_json
12 years ago
MinRK
dd95b1ef5f
remove heading cells in v4
12 years ago
MinRK
07079095a8
update html/js to nbformat 4
12 years ago
Min RK
3e82ea8319
actually send only one kernel_info request
...
store the Future for the initial request,
allowing subsequent requests to wait on the same pending reply.
Previously, any incoming requests that arrived while waiting for the first reply would send their own request.
12 years ago
Min RK
e329a79bc8
language is removed from kernel specs
...
don't use it when testing kernel spec API
12 years ago
Min RK
a2575af6a7
log kernel specs that fail to load
12 years ago
Min RK
e5b135a905
debugging websocket connections
...
- add debug statement at the very beginning of a web socket request
- add debug statement in open, indicating that the connection has been accepted
- add timeout, so failed or slow kernel_info doesn't cause the request to never get a response
- don't send kernel_info_request before authenticating the request
The last one required some icky coroutine shenanigans,
because of our subclass structure, but it should work fine.
12 years ago
MinRK
a5a43e2746
Don't resend kernel info requests if a bad reply is received
12 years ago
MinRK
94d6196ef9
add websocket workarounds for tornado 3
...
WebSocketHandler.get is new in tornado 4
12 years ago
MinRK
769fe38789
cache kernel_info reply for protocol adaptation
...
WebSocket connections will not open until kernel_info is retrieved,
removing a race condition waiting for the reply to indicate adaptation,
which could result in a v5 message being sent to a v4 kernel.
The reply is cached, so that it need not be requested on each new connection.
12 years ago
MinRK
3693ac83ae
support binary message from javascript
12 years ago
MinRK
c9c131ebf9
s/unserialize/deserialize
12 years ago
MinRK
7da61bfc13
use default kernel name in kernels service
...
matches sessions API
12 years ago
MinRK
624f0071a2
remove on_first_message authentication
...
in ZMQStreams. No need for weird, special first message.
- use regular cookie auth
- use url param for session id
12 years ago
Matthias Bussonnier
b2a0798fdf
Merge pull request #6598 from minrk/nbformat-backport
...
nbformat validation
12 years ago
Matthias Bussonnier
7d7b85a043
Merge pull request #6649 from minrk/302-notebooks
...
redirect /api/notebooks to /api/contents
12 years ago
MinRK
b87fee048c
redirect /api/notebooks to /api/contents
...
eases 2.x-3.x transition for consumers such as emacs-ipython-notebook
12 years ago
MinRK
b2d946d44e
don't convert notebooks on upload
12 years ago
MinRK
8392c7ac9e
don't check_and_sign old notebooks on upload
12 years ago
MinRK
4ae05c729c
trust is stored in code_cell.metadata
...
not top-level code_cell
12 years ago
MinRK
ddd3aa2a5a
add dialogs for failed save/load
...
- failed validation doesn't prevent save/load,
but the user is now warned about it.
- there is now a warning dialog if fromJSON fails,
rather than the usual silent failure.
12 years ago
Jessica B. Hamrick
d606d53b4e
More informative error messages
12 years ago
Matthias Bussonnier
e808d23594
Merge pull request #6607 from minrk/cluster-load-remove
...
remove deleted profiles from cluster list
12 years ago
MinRK
ee1d9d65f3
stop using deprecated DelayedCallback
...
in favor of simpler IOLoop.add_timeout
It was added in pyzmq, but deprecated in pyzmq-13.
12 years ago
MinRK
1f231f7b5a
remove deleted profiles from cluster list
12 years ago
Jessica B. Hamrick
6bc5702398
More descriptive short message
12 years ago
Jessica B. Hamrick
46e40e5ea1
Return a proper JSON object
12 years ago
Jessica B. Hamrick
5e1e8a116c
Use 501 error code instead of 400
12 years ago
Jessica B. Hamrick
c4a89cd54d
Better user experience when kernel isn't found
12 years ago
Jessica B. Hamrick
cfc234dc89
Handle NoSuchKernel errors more gracefully
12 years ago
MinRK
974d45343e
allow kernel_name to be undefined in requests
...
fallback to KM.default_kernel_name in that case
12 years ago
MinRK
5bc118fb6c
handle system-wide kernelspecs
...
in html tets_kernelspecs_api, which can cause counts to be greater than 2
12 years ago
Matthias Bussonnier
97e99d0661
Merge pull request #6412 from takluyver/sessions-rest-api-fix
...
Sessions rest api fix
12 years ago
Thomas Kluyver
fa6056e9ed
Sort directory contents in test before assertion
...
Should fix recent test failures, but I can't replicate failure on my
computer, so it's not clear that it's fixed.
12 years ago
Thomas Kluyver
b2737e668e
Add tests and fix some issues
...
Tests taken from #6360
12 years ago
Thomas Kluyver
0e109ee4be
Correct comment
12 years ago