Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Get the list of exporters from entrypoints#3879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
minrk merged 1 commit intojupyter:masterfromstarcruiseromega:exporters
Sep 7, 2018

Conversation

@starcruiseromega
Copy link
Contributor

exporter_map is deprecated, so let's use the list of exporters fetched
from the installed entrypoints.

There's a supposed attributeexport_from_notebook that should be set
to a friendly string name if the exporter should be exposed in the
front-end. However, the exporters defined innbconvert don't have it
set, so I haven't used it to determine inclusion in the list. Instead,
I've used the entrypoint name as the friendly name, which looks like it
was the intention from the way they are named.

I ran the unit tests and tried starting up the notebook server and
accessing the API endpoint to verify the JSON looked correct.

`exporter_map` is deprecated, so let's use the list of exporters fetchedfrom the installed entrypoints.There's a supposed attribute `export_from_notebook` that should be setto a friendly string name if the exporter should be exposed in thefront-end. However, the exporters defined in `nbconvert` don't have itset, so I haven't used it to determine inclusion in the list. Instead,I've used the entrypoint name as the friendly name, which looks like itwas the intention from the way they are named.I ran the unit tests and tried starting up the notebook server andaccessing the API endpoint to verify the JSON looked correct.
@starcruiseromega
Copy link
ContributorAuthor

The JSON from my test run athttp://localhost:8888/api/nbconvert looks like this:

{"asciidoc": {"output_mimetype":"text/asciidoc"},"custom": {"output_mimetype":""},"html": {"output_mimetype":"text/html"},"latex": {"output_mimetype":"text/latex"},"markdown": {"output_mimetype":"text/markdown"},"notebook": {"output_mimetype":"application/json"},"pdf": {"output_mimetype":"text/latex"},"python": {"output_mimetype":"text/x-python"},"rst": {"output_mimetype":"text/restructuredtext"},"script": {"output_mimetype":""},"slides": {"output_mimetype":"text/html"}}

starcruiseromega added a commit to starcruiseromega/nbconvert that referenced this pull requestAug 25, 2018
I was working onjupyter/notebook#3879 and itlooks like the intended way to determine whether the exporter shouldshow up in the list generated by the notebook server was by checking`export_from_notebook`, but it isn't defined for any of the builtinexporters.The docs also say this specifies a friendly name for the exporter. Inthe PR mentioned above, I used the name defined by the entrypoint to keythe exporter. It sounds like maybe we should use the value in`export_from_notebook` instead, so I've made them match, but perhapsit's confusing to have a "name" for the entrypoint in two places.
@starcruiseromega
Copy link
ContributorAuthor

@starcruiseromega
Copy link
ContributorAuthor

I openedjupyter/nbconvert#864 to add theexport_from_notebook so that we could get rid of that XXX. I'm not sure if, in that case, it's better to use the value ofexport_from_notebook as the name in the list instead of the entrypoint name, so I'd be happy to have some guidance on that. :)

@minrk
Copy link
Member

This is great, thank you!

@minrkminrk merged commit6c0ee1b intojupyter:masterSep 7, 2018
@minrkminrk added this to the5.7 milestoneSep 13, 2018
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMar 30, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

5.7

Development

Successfully merging this pull request may close these issues.

2 participants

@starcruiseromega@minrk

[8]ページ先頭

©2009-2025 Movatter.jp