Closed tlambert03 closed 3 years ago
Merging #92 (59b2ecb) into main (a04d1b4) will increase coverage by
15.44%
. The diff coverage is93.47%
.
@@ Coverage Diff @@
## main #92 +/- ##
===========================================
+ Coverage 74.93% 90.37% +15.44%
===========================================
Files 18 20 +2
Lines 718 810 +92
===========================================
+ Hits 538 732 +194
+ Misses 180 78 -102
Impacted Files | Coverage Δ | |
---|---|---|
napari_animation/_qt/frame_widget.py | 90.90% <0.00%> (+59.65%) |
:arrow_up: |
napari_animation/animation.py | 76.92% <50.00%> (-4.73%) |
:arrow_down: |
napari_animation/key_frame.py | 92.98% <90.00%> (-1.89%) |
:arrow_down: |
...pari_animation/_qt/_tests/test_animation_widget.py | 100.00% <100.00%> (ø) |
|
napari_animation/_qt/animation_widget.py | 88.73% <100.00%> (+60.73%) |
:arrow_up: |
napari_animation/_tests/conftest.py | 100.00% <100.00%> (ø) |
|
napari_animation/_tests/test_animation.py | 100.00% <100.00%> (ø) |
|
napari_animation/_tests/test_frame_sequence.py | 100.00% <100.00%> (ø) |
|
napari_animation/frame_sequence.py | 100.00% <100.00%> (ø) |
|
napari_animation/interpolation.py | 97.95% <100.00%> (-2.05%) |
:arrow_down: |
... and 10 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a04d1b4...59b2ecb. Read the comment docs.
this is all set for another look
ok, all set again... added a few more tests to cover some of these errors
just waiting on tests then will merge!
~Not done here, but curious how you feel about this pattern.~
In looking at the animation slider, I noticed that the
animationSliderWidget
itself had a lot of control over the creation of interpolated frames. and that whenever anything about the full movie changes, the slider widget triggers interpolation of the full movie:This PR adds a new object (
FrameSequence(Sequence[ViewerState])
). It acts as an (immutable) sequence ofViewerStates
. You can index into it (frame_sequence[n]
) to get the nth interpolatedViewerState
of the final movie... and it will only calculate the state that is being requested (and it will cache it until the underlying key_frame list changes) You can get the length withlen(frame_sequence)
... This means that the animation slider can be a plainQSlider
that just sets the animation state to the corresponding index of theFrameSequence
~probably a couple lingering bugs to work out. but wanted to get your thoughts first:~