Commit Graph

273 Commits

Author SHA1 Message Date
Steven Silvester
614e4780b8
Use hatch backend (#6425) 2022-06-13 10:19:48 -05:00
Steven Silvester
a7717d90f1
Run Autoformatters (#6335) 2022-04-01 11:02:12 -05:00
Steven Silvester
ebc7615a71
Adopt pre-commit (#6331) 2022-04-01 08:48:40 -05:00
Jeremy Tuloup
c0f3dc02a0 Update to Notebook v7 2022-03-01 15:48:27 +01:00
Jeremy Tuloup
8b6c8209ad More renaming 2022-03-01 08:39:53 +01:00
Jeremy Tuloup
78f745573c First round of renaming to notebook 2022-03-01 08:39:36 +01:00
David Leen
751c7eb0cc Fix asyncio error when opening notebooks
This is a fix for https://github.com/jupyter/notebook/issues/6164

`nest_asyncio` must be applied before any async tasks have been created
otherwise there could be tasks queued that are unpatched, and thus do
not respect nested loops. An example of an unpatched task can be seen in
the original issue:

```
<Task pending coro=<HTTP1ServerConnection._server_request_loop() running at /apps/python3/lib/python3.7/site-packages/tornado/http1connection.py:823>
```
which originates from Tornado.

A similar issue was reported in `nest-asyncio`: https://github.com/erdewit/nest_asyncio/issues/22
where the solution is to call `apply` on import so that unpatched tasks
do not get created.
2021-11-03 14:55:23 -07:00
Jeremy Tuloup
ebead7bf95 Update glob pattern 2021-10-31 09:35:09 +01:00
Jeremy Tuloup
f9b1043e2b Add ensured_target 2021-10-31 09:25:35 +01:00
Jeremy Tuloup
0d22a5d786 Ensure @retrolab settings 2021-10-30 23:32:36 +02:00
Maxim Martynov
7a9e58438c
Fix send2trash tests failing on Windows 2021-08-09 11:11:43 +03:00
Jeremy Tuloup
96671df358
Update to jupyter-packaging 0.10 (#179)
* Update to jupyter-packaging 0.10

* Update to jupyter-packaging 0.10 on CI

* Update pyproject metadata

* Update target

* Update targets

* Update build command

* Update MANIFEST.in

* Fix build backend

* Add build:prod command to packages

* Update RELEASE.md

* Enable server extension in dev mode

* Enable for the notebook server

* Fix typo

* Add jupyter labextension develop . to the Binder

* Update dev instructions
2021-07-14 15:11:46 +02:00
Jeremy Tuloup
4504721f73 Update lab Python package to rc1 2021-07-13 21:25:08 +02:00
Jeremy Tuloup
aee20dc4d9 Update to beta 0 2021-07-05 11:15:12 +02:00
Jeremy Tuloup
2e8cfe4799 Update to jupyterlab~=3.1.0a13 2021-06-16 20:08:47 +02:00
Jeremy Tuloup
fd73915a59
Follow-up to the move to the jupyterlab organization (#137)
* Update repo links to the jupyterlab org

* Fix permissions for the binder workflow

* Project Jupyter Contributors

* Add community guidelines to the README
2021-05-26 21:35:22 +02:00
Jeremy Tuloup
a47da616ab
Update to the 3.1.0-alpha.x upstream packages (#127)
* Update packages

* Update Binder

* Add collaborative

* Update to alpha packages

* Integrity

* Add labextension to prettierignore

* Update jest config

* Move file browser lab plugins to a separate file

* Cleanup tree extension

* Fix file editor factory in the edit view

* Integrity

* Fix plugin name
2021-05-20 17:19:55 +02:00
Jeremy Tuloup
2047e3a5e4
Rename to RetroLab (#121)
* Rename text to RetroLab

* More renaming

* More renaming

* Rename files

* Update deps

* Update logo

* Lint

* Update README.md

* Minor CSS fix

* Update tour

* Update screencasts in README.md
2021-05-19 15:13:00 +02:00
Afshin Taylor Darian
c19323de9a
Use Jupyter Releaser (#6048)
* Use Jupyter Releaser

* Automated Changelog Entry for 6.4.0a0 on notebook-releaser

* Publish 6.4.0a0

SHA256 hashes:

dist/notebook-6.4.0a0-py3-none-any.whl: abbbbb02504cedb85c2d5eeac39ea11615360b9b0075126bf180d6011eac14a5

dist/notebook-6.4.0a0.tar.gz: 2984630a020a9396c61b2c3b98f43b1957dd0121b162a926b3d6136fafa7ca16

* Bump to 6.5.0.dev0

* Remove jupyter_packaging as a runtime requirement

* Automated Changelog Entry for 6.4.0a1 on notebook-releaser

* Publish 6.4.0a1

SHA256 hashes:

dist/notebook-6.4.0a1-py3-none-any.whl: 4b0ae5cb972b5b16b18b942810b85859185ef2081017dd495e5f57099ce06ef4

dist/notebook-6.4.0a1.tar.gz: c48e10d34afa35e304e3b7deca1882508195960f35c4661dec044bb8da344ae5

* Bump to 6.5.0.dev0

* Update notebook/_version.py

Co-authored-by: Kevin Bates <kbates4@gmail.com>

* Update pyproject.toml

Co-authored-by: Kevin Bates <kbates4@gmail.com>

Co-authored-by: GitHub Action <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
Co-authored-by: Kevin Bates <kbates4@gmail.com>
2021-05-12 11:04:31 -05:00
Lumír 'Frenzy' Balhar
ec4969eed1
Fixes related to the recent changes in the documentation (#6021)
* Add myst-parser to setup.py extras_require

* Include new location of CHANGELOG.md in MANIFEST.in
2021-03-23 05:02:11 -05:00
Karolina Surma
92a388c04a
Add square logo and desktop entry files (#6010)
* Add square logo and desktop entry files

* Install desktop file and icon using data files.

Co-authored-by: Karolina Surma <ksurma@redhat.com>
2021-03-17 11:30:45 -05:00
Jeremy Tuloup
78b572a136
Open a notebook via the command line (#98)
* Open a notebook via the command line

* Assign default_url to self.serverapp

* Update to latest jupyter server to open via the cli

* Add redirect handler to open non notebook files
2021-02-28 17:20:47 +01:00
Kevin Bates
2a90e23434
Drop Python 3.5 2021-01-27 11:57:09 -08:00
Jeremy Tuloup
35fe416c65 Rename builder to app 2021-01-18 23:43:28 +01:00
Kevin Bates
245ca66603
Increase minimum tornado version (#5933) 2021-01-10 22:33:10 -08:00
Nicholas Bollweg
77b5023183
move utf-8 to open 2021-01-01 12:20:41 -05:00
Nicholas Bollweg
a3e24bb30b
consume readme with utf-8 2021-01-01 12:04:44 -05:00
Jeremy Tuloup
338c9341e3 Fix package_data_spec 2020-12-24 15:17:43 +01:00
Jeremy Tuloup
e989e1d036 Use skip_if_exists from jupyter-packaging 2020-12-24 14:46:09 +01:00
Jeremy Tuloup
6d560f60ca Update to JupyterLab 3 final 2020-12-24 10:32:11 +01:00
Jeremy Tuloup
6044221a00 Update to JupyterLab Classic Contributors 2020-12-22 14:55:26 +01:00
Jeremy Tuloup
cc9db51edb Update to JupyterLab 3.0.0rc15 2020-12-19 11:10:18 +01:00
Jeremy Tuloup
55496de59d Update to JupyterLab 3.0.0rc14 2020-12-18 19:24:09 +01:00
Jeremy Tuloup
1156d0bbdc Add jupyter classic entrypoint 2020-12-11 01:12:24 +01:00
Jeremy Tuloup
9bb290d1a9 Update to rc13 2020-12-10 00:47:58 +01:00
Jeremy Tuloup
895df0ab5e Fix build commands in setup.py 2020-12-09 23:13:28 +01:00
Jeremy Tuloup
f111d973aa Build all packages 2020-12-09 23:07:36 +01:00
Jeremy Tuloup
a25da139f4 Ensure static 2020-12-09 22:56:09 +01:00
Jeremy Tuloup
deee0bd750
Add Binder (#2)
* Add Binder

* Build from source on Binder

* Add support for notebook server extensions

* Add notebook shim

* Remove python from deps

* Add templates to MANIFEST

* Binder

* Add matplotlib and numpy to Binder
2020-12-07 19:55:10 +01:00
Jeremy Tuloup
374f497242 Add toolbar button to open in classic 2020-12-07 17:31:37 +01:00
Jeremy Tuloup
519fcee7a3 Add entrypoint 2020-12-07 17:31:36 +01:00
Jeremy Tuloup
ddcf687a78 Initial commit 2020-12-04 15:15:41 +02:00
Stefano Rivera
6a46458f1f Check for TrashPermissionError rather than guess
_check_trash() was added (in #3304) because TrashPermissionError didn't
exist, yet.

Now that it does, we can use it, and stop guessing what will cause a
permission problem.

Closes: #3374
2020-12-01 13:17:36 -08:00
pgajdos
fdf14b4ab3 run tests with pytest 2020-10-23 11:45:28 +02:00
Matt Riedemann
67ad5a1c06 Merge remote-tracking branch 'origin/master' into 5798-json-logging 2020-10-13 18:21:02 -05:00
Sai Rahul Poruri
9dd2af27de CLN : Remove utf8 coding cookies
On Python 3, the default source file encoding for Python files is utf-8
and because Python 2 is no longer supported, the utf8 coding cookies can
be removed
2020-10-10 15:30:06 +01:00
Matt Riedemann
1929fb53b8 Add support for JSON formatted logs
This adds a new extra package dependency on `json-logging`
and an environment variable, which when set to "true" regardless
of case, will try to use the json-logging non-web app log formatter.

If the `json-logging` package is not installed but the environment
variable is True, something like this will be logged but it will not
crash the application:

```
$ ENABLE_JSON_LOGGING=true jupyter notebook
Unable to use json logging due to missing packages. Run "pip install notebook[json-logging]" to fix.
Traceback (most recent call last):
  File "/home/osboxes/jupyter/notebook/notebook/notebookapp.py", line 144, in <module>
    import json_logging
ModuleNotFoundError: No module named 'json_logging'
```

Initially I tried to add a new Bool config option to toggle this but
the problem is (from my limited understanding of traitlets and tornado)
is that `_log_formatter_cls` needs to be set early and trying to se the
log formatter later in `init_logging` is too late - or at least I couldn't
figure out a way to reset the log formatter dynamically (I tried calling
`_log_format_changed` [1] but that didn't work).

With this working you get logs like this:

```
{"written_at": "2020-10-07T21:10:51.606Z", "written_ts": 1602105051606265000, "msg": "404 GET /nbextensions/widgets/notebook/js/extension.js (127.0.0.1) 9.26ms referer=http://localhost:8888/notebooks/Untitled.ipynb", "type": "log", "logger": "NotebookApp", "thread": "MainThread", "level": "WARNING", "module": "log", "line_no": 49}
{"written_at": "2020-10-07T21:10:54.443Z", "written_ts": 1602105054443309000, "msg": "Starting buffering for f260ddd7-938c-42d0-ac3b-455bea76694f:49f30b53fc4b4ec6a8f2fb748a171613", "type": "log", "logger": "NotebookApp", "thread": "MainThread", "level": "INFO", "module": "kernelmanager", "line_no": 222}
{"written_at": "2020-10-07T21:10:54.446Z", "written_ts": 1602105054446264000, "msg": "Kernel shutdown: f260ddd7-938c-42d0-ac3b-455bea76694f", "type": "log", "logger": "NotebookApp", "thread": "MainThread", "level": "INFO", "module": "multikernelmanager", "line_no": 201}
```

An obvious improvement here would to be able to split the `msg` fields apart
so that we can log things like response status code, request method, request
URL, response_time_ms etc. That should be possible with the `JSONLogWebFormatter`
from `json-logging` but when I tried using that I was getting errors from
the library about a correlation id (which is based on a request header we
don't use). The `json-logging` library supports several web frameworks like
Flask but unfortunately does not have built in support for Tornado, but it does
support custom formatters so that might be a follow up option to improve on this.

[1] https://github.com/ipython/traitlets/blob/4.3.3/traitlets/config/application.py#L195

Closes #5798
2020-10-07 16:27:16 -05:00
Tomas Hrnciar
cdb103c3f0 Add sphinx_rtd_theme to documentation dependencies in setup.py
Fixes: #5781
2020-09-30 13:06:31 +02:00
Kevin Bates
73e6c27369
Prevent inclusion of requests_unixsocket on Windows (#5650)
* Prevent inclusion of requests_unixsocket on Windows

* lazily import

Co-authored-by: Steven Silvester <stslve@amazon.com>
2020-08-03 13:47:09 -05:00
Kevin Bates
681497fb7b
Release 6.1.0 2020-07-31 10:59:17 -07:00