Commit graph

8 commits

Author SHA1 Message Date
Nathaniel Nicandro
403c70c83c Bump version 2020-04-07 15:13:51 -05:00
Nathaniel Nicandro
989e17c706 Remove unnecessary Version headers in test files
* test/jupyter-server-test.el: Do it.

* test/jupyter-test.el: Do it.

* test/jupyter-tramp-test.el: Do it.

* test/test-helper.el: Do it.
2020-03-29 03:08:53 -05:00
Nathaniel Nicandro
98adac6d31 Fix definitions of jupyter-tramp-file-name(-method)?-p
Fixes #155.

* jupyter-tramp.el (jupyter-tramp-file-name-method-p):
(jupyter-tramp-file-name-p): Adhere to documentation.

* test/jupyter-tramp-test.el (jupyter-tramp-file-name-p): Add test.
2019-07-27 12:22:47 -05:00
Nathaniel Nicandro
fa3f7c8b31 Handle encoding when making REST API requests
* jupyter-rest-api.el: Ensure strings are encoded before making HTTP request.
(jupyter-api-http-request): Encode JSON as utf-8.
(jupyter-api-xsrf-header-from-cookies): Ensure header isn't multibyte.
(jupyter-api-authenticate): For the token method, ensure token isn't multibyte.
(jupyter-api-copy-file): Encode string before encoding to base64 for binary content.
(jupyter-api-read-file-content): Decode content as utf-8 when necessary.

* jupyter-tramp.el
(jupyter-tramp-write-region): Ensure only `utf-8` or `binary` coding systems
are used since Jupyter only supports those.

* test/jupyter-tramp-test.el: Update for above changes.
2019-07-24 16:59:04 -05:00
Nathaniel Nicandro
933e5c65a6 Cache file model contents in a buffer
* jupyter-rest-api.el (jupyter-api-content-buffer): New function.
(jupyter-api-insert-model-content): Use it.

* jupyter-tramp.el (jupyter-tramp-file-local-copy): Use it.
2019-07-24 16:59:04 -05:00
Nathaniel Nicandro
8d45a0242d Refactor notebook server related tests
* Start notebook on-demand during tests

* Do cleanup of sockets/processes when killing Emacs

  * This should work around intermittent core dumps on Travis due to epoll
    reconnect attempts.

* Simplify tests by creating and using setup/teardown macros
2019-07-24 16:59:04 -05:00
Nathaniel Nicandro
194df39643 Separate tests that use a notebook server from the main tests 2019-07-24 16:59:04 -05:00
Nathaniel Nicandro
4a87d35f76 Jupyter notebook contents API integration with TRAMP 2019-07-24 16:59:04 -05:00