WIP: use scenex#276
Draft
gselzer wants to merge 15 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #276 +/- ##
==========================================
+ Coverage 85.38% 86.77% +1.38%
==========================================
Files 53 44 -9
Lines 7192 5180 -2012
==========================================
- Hits 6141 4495 -1646
+ Misses 1051 685 -366 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Since we aren't running within a notebook, vispy will try to use glfw over jupyter unless we force jupyter with the environment variable. This is the same thing we do in scenex
Needed to get SignalGroupDesciptor.connect_child_events
This avoids some scenex errors from casting very large values into 32-bit floats
Will probably move them to a different file later
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.
Overview
This PR aims to replace the references to multiple canvas backends (vispy, pygfx) with a single implementation against scenex models. It's a large change, deserving lots of review and scrutiny.
Reasoning
One canvas implementation The flexibility ndv offers users presents significant effort for ndv developers who want to enable a feature across both canvas implementations. Both
src/ndv/views/_vispyandsrc/ndv/views/_pygfxhave thousands of lines of code and separate test bases. As this PR shows, adopting scenex results in far fewer raw lines of code to maintain.Robust scene models Adding more functionality (including the ability to display multiple datasets, multiscale data as suggested in multiscale chunked rendering #275, orthoviews, etc.) will require knowledge of the scenegraph state. There are already bits and pieces of this in ndv (e.g.
ImageHandle,RectangularROIHandle), but scenex exists for this purpose.Implementation Goals
The primary goal of this PR is to condense down to a single canvas implementation, removing dependencies on vispy and pygfx in favor of dependencies of scenex, while maintaining the same public API, and all (excluding tests aimed at removed behavior) tests.
@tlambert03 your review is always welcome, but might be good to wait a little longer, as I fear that despite passing tests on my machine this PR will show me that there are many more things to clean up!