Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nbconvert handler #2981

Merged
merged 3 commits into from Oct 27, 2017
Merged

Fix nbconvert handler #2981

merged 3 commits into from Oct 27, 2017

Conversation

@mpacer
Copy link
Member

@mpacer mpacer commented Oct 25, 2017

closes #2974,

Other small improvements while I was doing this:

Building the resources dict separately from invocation is more readable.

resources['metadata']['name'] now will use the notebook level metadata.title value as passed through to name (if present) and fall bad to stripping the extension using os.path.splitext. This notion of name is only used in the html and slides exporters to create a <title/> tag.

@mpacer
Copy link
Member Author

@mpacer mpacer commented Oct 25, 2017

I can't restart the Appveyor build… it looks like that error might just go away since i just verified that the conda-forge package does exist…

But for some reason I can't log in to appveyor.

Loading

@mpacer
Copy link
Member Author

@mpacer mpacer commented Oct 25, 2017

@gnestor Pdf exports were broken with 5.2 (#2974), so this should be prioritised in a patch release.

Loading

@mpacer
Copy link
Member Author

@mpacer mpacer commented Oct 25, 2017

Can someone please add me to the list of those with permissions to restart appveyor builds? I don't understand why it doesn't just use github permissions, but it seems to not do that.

Loading

@gnestor gnestor added this to the 5.3 milestone Oct 25, 2017
@gnestor
Copy link
Contributor

@gnestor gnestor commented Oct 25, 2017

@Carreau Do you have those powers?

Loading

@mpacer
Copy link
Member Author

@mpacer mpacer commented Oct 25, 2017

@gnestor I really don't think this should wait until 5.3… instead aiming at 5.2.1 or are you using 5.3 to also organise patch releases for 5.2.x?

Loading

@Carreau
Copy link
Member

@Carreau Carreau commented Oct 25, 2017

@Carreau Do you have those powers?

Not sure. I tried something, @mpacer you should receive an invite I guess from AppVeyor, if it does not work I think we need to as Kyle.

Loading

@gnestor
Copy link
Contributor

@gnestor gnestor commented Oct 25, 2017

We don't have a milestone for 5.2.1 so I marked it as 5.3. I'll create one now and shoot for releasing 5.2.1 tomorrow.

Loading

@gnestor gnestor removed this from the 5.3 milestone Oct 25, 2017
@gnestor gnestor added this to the 5.2.1 milestone Oct 25, 2017
@gnestor gnestor mentioned this pull request Oct 26, 2017
9 tasks
self.set_header('Last-Modified', model['last_modified'])

# create resources dictionary
mod_date = model['last_modified'].strftime(text.date_format)
nb_title = nb.metadata.get("title","") or os.path.splitext(name)[0]
Copy link
Member

@takluyver takluyver Oct 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not convinced about the title from notebook metadata taking precedence over the filename used to identify it. The notebook metadata is already available in the template, it doesn't need to be added to resources.

Loading

Copy link
Member Author

@mpacer mpacer Oct 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine, this was a fix that I had added on the nbconvert side for the LaTeX interpreter and was just trying to keep it consistent here. But I'm not wedded to it.

Loading

@gnestor
Copy link
Contributor

@gnestor gnestor commented Oct 27, 2017

The 5.2.1 branch is ready for release so we're just waiting on this PR 👍

Loading

@mpacer
Copy link
Member Author

@mpacer mpacer commented Oct 27, 2017

fixed!

Loading

@gnestor
Copy link
Contributor

@gnestor gnestor commented Oct 27, 2017

I tested and export to PDF is working 👍

@mpacer Shall I merge?

Loading

minrk
minrk approved these changes Oct 27, 2017
@minrk
Copy link
Member

@minrk minrk commented Oct 27, 2017

@gnestor 🚢

Loading

@gnestor gnestor merged commit 600d57f into jupyter:master Oct 27, 2017
1 of 2 checks passed
Loading
@gnestor
Copy link
Contributor

@gnestor gnestor commented Oct 27, 2017

@meeseeksdev backport to 5.2.1

Loading

@meeseeksdev
Copy link

@meeseeksdev meeseeksdev bot commented Oct 27, 2017

Oops, something went wrong applying the patch... Please have a look at my logs.

Loading

gnestor added a commit that referenced this issue Oct 27, 2017
* get the directory for external resources to pass in as path to nbconvert

* build up resources dict elements separately, combine before passing to from_notebook_node

* Use filename (not title) for the name used as the title in html export
@gnestor
Copy link
Contributor

@gnestor gnestor commented Oct 27, 2017

I backported this manually to 5.2.1 👍

Loading

@mpacer
Copy link
Member Author

@mpacer mpacer commented Nov 4, 2017

Apologies! didn't see you ask me if it could be merged — I had intended it to be done, yes. Any thoughts as to why the meseeksdev backport didn't work?

Loading

@gnestor
Copy link
Contributor

@gnestor gnestor commented Nov 4, 2017

No prob! No I don't have access to the meseeksdev logs but there must've been a merge conflict

Loading

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants