Repository navigation
Getters improvements - #702
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
thewtex
left a comment
There was a problem hiding this comment.
💪
Let's exclude the Getter's notebook from the ones executed in CI until browser support is available.
Sounds good! |
|
@thewtex One more thing to note: It's not a bug per-se, but if cells are run quickly or with something like The last cell will actually fail because |
3754f18 to
e28af43
Compare
|
@bnmajor thanks for the note! Yes, I think we should wait for the image to be loaded before returning from a getter, if possible. I know you have been iterating on the async queue handling lately, but if it is possible to add all the set's and get's to the queue and "await" all the tasks before invoking the next getter, or a similar approach, we could have "Run All" work as expected? |
e28af43 to
42fc322
Compare
I may be missing something in your question (maybe you have a specific case in mind?) but this should already be the case once the changes in this branch are in. With the exception of data not being loaded like I was explaining above, everything is essentially "set aside" until it can be run, and it should all be run in order. As an example you should be able to run the first 4 cells of the GettersAndSetters notebook and wait for the data to load, then use |
42fc322 to
5efe59f
Compare
|
A few additional updates:
UPDATE: This is fixed now. Depends on Kitware/itk-vtk-viewer#725. |
An update on this: This is actually a standing issue and not introduced by the This will fail to update the first viewer. I think that this may have slipped under the radar because unlike the getters, no exception is raised. |
0dec8bb to
422c46d
Compare
| from queue import Queue | ||
| from imjoy_rpc.utils import FuturePromise | ||
|
|
||
| import itkwidgets |
Improved testing is a current work in progress (as discussed in issue InsightSoftwareConsortium#587). Until we resolve the outstanding issues no viewer is actually being created, so the queue that waits for cell completion before progressing causes all subsequent cells after the first viewer is created to fail. This temporarily ignores those cells in the CI tests. These changes should be removed after testing is fixed.
If image data is provided on initialization the viewer is not marked as ready until the data has been rendered. If set_image or set_label_image are called the viewer is again marked as "not ready" until the new data is rendered.
Update set_layer_visibility and set_image_component_visibility to include missing parameters.
d0f92a3 to
e29b162
Compare
|
NOTE: As discussed in #587, testing needs some updates in order for notebooks to pass. As it stands, no viewer is actually being created during testing. This means that the queue that now waits for cell completion (including viewer creation) before progressing will cause all subsequent cells after the first viewer is created to fail. Commit 806e6e821179bc80c1a72eb21c936dc626616e5e "fixes" this by simply not running the cells after the first viewer is created. These changes will need to be reversed once testing is fixed. |
NOTE: There is still an outstanding bug that is produced when multiple viewers are created in the same notebook. References to the first viewer will fail after the second viewer is created.
Fixes #466, #564, #568