refactor: Move examples for notebook viewer and callbacks to examples/python#11416
Merged
ntjohnson1 merged 6 commits intorerun-io:mainfrom Oct 6, 2025
Merged
Conversation
ntjohnson1
reviewed
Oct 6, 2025
Member
ntjohnson1
left a comment
There was a problem hiding this comment.
Can you update the import in notebook_viewer to be from rerun.notebook instead of directly from our notebooks package? Otherwise LGTM. Thanks!
ntjohnson1
reviewed
Oct 6, 2025
Member
ntjohnson1
left a comment
There was a problem hiding this comment.
Sorry for the double review. Looking at the CI failure made me realize there were a few more issues but this should be it.
b2acb22 to
9df19b1
Compare
ntjohnson1
approved these changes
Oct 6, 2025
ntjohnson1
added a commit
that referenced
this pull request
Oct 8, 2025
### Related #11416 I requested the notebooks get moved so our automated examples test would make sure the notebooks aren't broken. Unfortunately we don't test any of our notebooks so most were broken. A little bit related to broader notebook testing improvement https://linear.app/rerun/issue/RR-1880/test-our-jupyter-notebooks-on-ci ### What I highly recommend reviewing with rich diff for notebooks enabled. * Adds nbqa so we can run mypy on the notebooks to at least ensure the apis align * I couldn't get the config working so unfortunately I just have the directories to search listed in the pixi command * Adds nbstripout but doesn't yet tie it to our py-fmt. Jupyter notebook outputs are just binary so that will bloat the repo and complicate diffs. Unfortunately nbstripout doesn't have a nice config setup so I just put together a simple wrapper. * I made two actual code changes not just in tests since it made sense to resolve notebook mypy errors 1. I made component_type a class method. We basically have component type raw strings everywhere probably because it wasn't easy before to grab them from the class definition rather than instance 2. If we have a recording string the api should actually be a little different than asking globally. I assume we'll always find the id so we universally return a string. This still doesn't execute our notebooks which is probably a worthwhile followup issue.
Wumpf
pushed a commit
that referenced
this pull request
Oct 8, 2025
### Related #11416 I requested the notebooks get moved so our automated examples test would make sure the notebooks aren't broken. Unfortunately we don't test any of our notebooks so most were broken. A little bit related to broader notebook testing improvement https://linear.app/rerun/issue/RR-1880/test-our-jupyter-notebooks-on-ci ### What I highly recommend reviewing with rich diff for notebooks enabled. * Adds nbqa so we can run mypy on the notebooks to at least ensure the apis align * I couldn't get the config working so unfortunately I just have the directories to search listed in the pixi command * Adds nbstripout but doesn't yet tie it to our py-fmt. Jupyter notebook outputs are just binary so that will bloat the repo and complicate diffs. Unfortunately nbstripout doesn't have a nice config setup so I just put together a simple wrapper. * I made two actual code changes not just in tests since it made sense to resolve notebook mypy errors 1. I made component_type a class method. We basically have component type raw strings everywhere probably because it wasn't easy before to grab them from the class definition rather than instance 2. If we have a recording string the api should actually be a little different than asking globally. I assume we'll always find the id so we universally return a string. This still doesn't execute our notebooks which is probably a worthwhile followup issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related
Closes #10711
What