Min RK
dc70ae6b07
allow ContentsManager methods to return Futures
...
mainly adding `@gen.coroutine` and `yield gen.maybe_future` all over the place.
No FileContentsManager methods are actually async at this point.
11 years ago
Matthias Bussonnier
efbe695523
Merge pull request #7226 from takluyver/win-sleep-session-tests
...
Add a brief sleep after shutting down sessions in test teardown
11 years ago
Matthias Bussonnier
5829ceacb9
s/Json/JSON/g **/*.py
11 years ago
Thomas Kluyver
0178e2add0
Add a brief sleep after shutting down sessions in test teardown
...
This fixes a test failure for me on my Windows VM. See the comment for
details.
11 years ago
Matthias Bussonnier
4bd9ac7882
Add json in the base config manager name
11 years ago
Bussonnier Matthias
6f38f7b014
generalise manager
11 years ago
Min RK
42a92d4794
Merge pull request #6896 from minrk/save-hooks
...
Proposal: add pre/post-save hooks
11 years ago
Thomas Kluyver
f2e1b6f65f
Merge pull request #7145 from minrk/type____
...
ContentsManager type kwarg to match model key
11 years ago
Thomas Kluyver
4c62fd4210
Merge pull request #7149 from minrk/thread-nb
...
run test notebook server in thread
11 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.
11 years ago
Scott Sanderson
70eb9e219f
DOC: Add docstring for validate_model.
11 years ago
Scott Sanderson
a45b8a0c67
DEV: Validate models returned from ContentsManager methods.
11 years ago
Min RK
22e206de6f
ContentsManager type kwarg to match model key
...
remove `_` suffix, making it consistent with models,
REST API, etc.
11 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
11 years ago
Thomas Kluyver
9f48e86477
Merge pull request #7136 from minrk/octet-stream
...
set default mimetype to octet-stream for binary files
11 years ago
Scott Sanderson
ccc8cb9cbf
Minor cleanups in the contents API.
...
Noticed while poking around with a linter enabled.
11 years ago
Min RK
f0181836b2
run test server in thread
...
instead of subprocess
11 years ago
Min RK
407e63cb80
set default mimetype to octet-stream for binary files
...
mimetype only specified if content=True
11 years ago
Min RK
c81609f5d6
redirect /edit/ to /files/ if not (utf8) text
11 years ago
Min RK
c238553a4e
set application/json on contents model replies
11 years ago
Min RK
ee00dcf083
docstring
11 years ago
Min RK
f2343e4ec5
update `--script` behavior to use `nbconvert --to script`
11 years ago
Min RK
1731b9b449
`--script` triggers post_save hook with nbconvert
11 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
11 years ago
Min RK
11ef669ec6
kernelspecs is a dict
...
sort menus client-side
11 years ago
Matthias Bussonnier
de52775797
Merge pull request #7078 from takluyver/kernelpath
...
Rework get_kernel_path logic
11 years ago
Thomas Kluyver
3cad1f4b4d
Expose ConfigManager one level up the hierarchy
...
Because `from IPython.html.services.config import ConfigManager` is long
enough.
11 years ago
Kyle Kelley
a6d3d6a93e
Log warning directly.
11 years ago
Kyle Kelley
7a48687929
Update CSP tests for new default.
11 years ago
Kyle Kelley
17d1c2d488
Report CSP violations as warnings.
11 years ago
Kyle Kelley
0c22c140c3
Turn x-frame-options tests into CSP tests
11 years ago
Kyle Kelley
392118d536
One unified CSP report URI
11 years ago
Kyle Kelley
cb19f07c9a
csp_report_uri caused a cyclic dependency
11 years ago
Kyle Kelley
23b9f09177
Log CSP violations via report
11 years ago
Kyle Kelley
1f03954dd8
Handle CSP Reports
11 years ago
Thomas Kluyver
d273b56044
Clean up get_kernel_path logic
11 years ago
Matthias Bussonnier
fd2588612a
return API path instead of filesystem
11 years ago
Thomas Kluyver
f1295c6b8d
Add default for profile_dir
...
So ConfigManager is useful outside an IPython application
11 years ago
Thomas Kluyver
febd670716
First stab at ConfigManager class
11 years ago
Thomas Kluyver
25ee73a554
Loading a file works
11 years ago
Min RK
837ef7f122
s/open_w/atomic_writing/
11 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
11 years ago
Thomas Kluyver
8252f56b00
Allow FileContentsManager and MappingKernelManager to be used outside NotebookApp
11 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.
11 years ago
Min RK
a62a9abdef
update MappingKernelManager module docstring
11 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.
11 years ago
Thomas Kluyver
d04e41251d
Merge pull request #6915 from minrk/contents-no-0
...
use Untitled instead of Untitled0
11 years ago
Min RK
0a22217f7e
Merge pull request #6900 from takluyver/contents-api-get-as-type
...
Contents API get as type
11 years ago
Min RK
e4e1d47203
Merge pull request #6694 from takluyver/config-rest-api
...
Add REST API for retrieving, storing and updating config
11 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`
11 years ago