-
-
Notifications
You must be signed in to change notification settings - Fork 391
Store display outputs in history for %notebook
magic
#1435
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
Conversation
00846af
to
8dc02a8
Compare
Would it make sense to bump the IPython version to >9.1.0 (where |
I think a conditional block (could be conditional on version) would be preferred, especially because it would be great to backport to 6.x branch. |
Kicking CI |
@ianthomas23 I think the test failures are unrelated. Do you think we could merge this and backport to 6.x? I do not have merge rights here. |
Yes, I will do that. Do you want a 6.30.2 release for this, I cannot tell how important it is? |
Thinking more about this I wonder if we should add this as opt-in behind a traitlet for now and backport to My reasoning is that I would like to avoid increasing memory usage for notebook users who do not need |
Yes, I agree. I believe very few users will use |
tests/test_zmq_shell.py
Outdated
mock_shell.display_pub._in_post_execute = False | ||
|
||
self.disp_pub.shell = mock_shell | ||
self.disp_pub.store_display_history = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you repeat the test using store_display_history = False
to confirm that mock_shell.history_manager.outputs
is empty for it? I guess we cannot use @pytest.mark.parametrize
as this is unittest
, perhaps it could just be a for enable in [False, True]
within this test function.
Other than this, I think it is good to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Darshan808.
I'll backport to the 6.x
branch and aim for a 6.31.0
release in the next few days. Feel free to ping me if I am being too slow.
Can we or the bot help? @meeseeksdev please backport to 6.x |
Awww, sorry krassowski you do not seem to be allowed to do that, please ask a repository maintainer. |
@meeseeksdev please backport to 6.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…agic (#1461) Co-authored-by: Darshan Poudel <[email protected]>
Manually backported to |
|
Fixes #1433
Summary
Fixes issue where display outputs (plots) were not included when using
%notebook
magic to save session as .ipynb file.Changes
ZMQDisplayPublisher.publish()
to store display data inhistory_manager.outputs