-
Notifications
You must be signed in to change notification settings - Fork 567
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
Remove output metadata in ClearOutputPreprocessor. #569
Conversation
This seems reasonable, though I hope this doesn't become an ever-expanding list. |
What sets ExecuteTime? |
ExecuteTime is set by the ExecuteTime extension. I wasn't sure about which approach to take because updating the preprocessor for each extension seems odd but ExecuteTime seems like a reasonably popular extension. |
I'm going to suggest that we make this a configurable traitlet rather than a static list that we are providing, and then individual extensions can determine whether they want to exclude their own metadata from outputs by default or not. @tillahoffmann if you look at https://github.com/tillahoffmann/nbconvert/blob/c73eec79199584c0663189c28a7c15139f7ec515/nbconvert/preprocessors/extractoutput.py#L38 you'll see an example of this as used by the extract output preprocessor to describe the set of outputs that are to actually be extracted. Then I'd remove the ExecuteTime entry here and make a PR on |
You'll need to update the test, also it'd be good to test the traitlet functionality directly (so, for example you would want to have a custom value in a test notebook and configure the traitlet instance in the test to watch for and exclude that value). |
Regarding the traitlet test: The The 2.7 test seems to have failed because of some version conflict with |
Yep, setting the attribute is the standard way to change traitlet values. |
To avoid it trying to install an incompatible version of IPython on Python 2.
Upgrade pip on Travis CI
Ah, seems that the tests are not failing because of |
Yup, I just merged another pull request into master to use a newer version of pip on Travis, which installs the correct version of IPython. |
This looks OK to me, I'll give others a chance to have another look over it too. |
This looks good to me now. |
This PR removes metadata associated with outputs in the
ClearOutputPreprocessor
.