-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
User selections #311
User selections #311
Conversation
…well as adding callbacks for when widget fields change.
…k when the selection state is changed.
OK, some details might have to evolve pending discussion in WorldWideTelescope/wwt-webgl-engine#133, but I like the overall approach here. I think it makes a lot of sense to have the message-handling code primarily support futures, but also provide callback hooks when there's a demonstrated need in a downstream user that can't go full async. |
I've updated this to match the final version in WorldWideTelescope/wwt-webgl-engine#133 - namely, I've removed the field for selected HiPS catalogs, as well as the JSON parsing of the source fields that was previously present. I've also added a It looks like there's now an issue with one of the Qt tests, though, so I need to figure out what the issue is there. |
CI failure has to do with some differences of the image tests on Linux — might be spurious? I've told Azure to relaunch those tests to find out. |
Hmm, looks like the errors are reproducible. You should be able to go to the artifacts of the CI run and download packages of data showing the images generated during the failing runs, along with diffs against the reference images. (If you can't download the files there might be a permissions problem. If so, let me know.) There seem to be some teeny-tiny changes, just enough to fail the test, but nothing obviously broken. Azure might have upgraded its Linux builders recently? In which case, the solution would be to add the new image variations to the test corpus. |
I was able to download the generated images and diffs from Azure. The four images that failed all look 'good' to me (in the sense that, visually, I can't see any real difference between them and the reference images in The latest release on the Azure Pipelines agent repository is marked as being from 27 days ago, which is one day after the last commit here on |
OK. I think you'll have to update the test corpus. Can you take the images that are currently failing and add them to the repo with filenames like Within the |
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.
Code changes look great now, just need to update the test corpus.
Codecov Report
@@ Coverage Diff @@
## master #311 +/- ##
==========================================
- Coverage 59.39% 59.24% -0.16%
==========================================
Files 24 24
Lines 2490 2520 +30
==========================================
+ Hits 1479 1493 +14
- Misses 1011 1027 +16
Continue to review full report at Codecov.
|
Overview
This PR adds fields in the pywwt widget for observing changes in selection in the WWT app (the
SelectionStateMessage
proposed in WorldWideTelescope/wwt-webgl-engine#133). Additionally, this adds functionality for a user client to add a callback to be called when the widget receives a selection message.So this is what I was thinking for the basic callback setup. The callback function runs after the state is updated (and after any futures are resolved as well), and is passed two arguments: the widget itself, and a list of the names of properties that were updated. This gives the caller access to the updated state and the flexibility to do whatever they want with it, but minimizes the number of attached callbacks (I'm thinking that a user could attach one callback for each message type).
Checklist