-
Notifications
You must be signed in to change notification settings - Fork 76
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
aperture photometry: do not hide prev results when resetting #2112
aperture photometry: do not hide prev results when resetting #2112
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2112 +/- ##
==========================================
+ Coverage 91.90% 91.95% +0.05%
==========================================
Files 143 143
Lines 15605 15665 +60
==========================================
+ Hits 14342 14405 +63
+ Misses 1263 1260 -3
... and 4 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@pllim - I originally was just going to move the table out of the And I'm not sure how to milestone or where to put the changelog - does this count as a bugfix or a change in behavior? |
Will not clearing get confusing at some point? You have result from previous run, but then unsuccessful but don't bother reading the snackbar. Now you still see numbers and you are in a rush, won't you mistaken the numbers for the new run? |
@@ -249,7 +238,6 @@ def _bg_subset_selected_changed(self, event={}): | |||
|
|||
def vue_do_aper_phot(self, *args, **kwargs): | |||
if self._selected_data is None or self._selected_subset is None: | |||
self.reset_results() |
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.
I still think you need to reset when new calculation is requested.
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.
can you show a case where that is needed? I think everything just gets overwritten for a successful run and the code is redundant, but I'm not 100% sure.
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.
The point is, when this button is pressed, things should be cleared and only show new calculated results. If there is any failure at all (this, or the except Exception as e
below), no numbers should show, to make it clear that something has gone wrong.
The logic here should not affect the issue you are trying to fix. Deleting a Subset should not trigger this method.
Or am I misunderstanding the situtation?
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.
Deleting all subsets does trigger resetting the results and ends up hiding both the most recent results and the entire table. I can move the entire table outside of that logic and to its own logic (just checking the length of the table or something), but that feels like extraneous logic and inconsistent behavior to me.
Screen.Recording.2023-03-24.at.11.13.49.AM.mov
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.
Delete subset event triggers vue_do_aper_phot
? 🤯
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.
No, but the subset selection itself becomes blank, and then _subset_selected_changed
clears the results.
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.
Okay, we can stop clearing for that. But I am saying it should still clear within vue_do_aper_phot
.
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.
Should all the previous results (including the table) disappear? What if instead we show a message that the previous run failed above all of those so they are not lost?
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.
Ok, so what if we show the error message in the UI in place of the results and keep the table?
This might be a good enough compromise.
Ok, so what if we show the error message in the UI in place of the results and keep the table? |
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.
Tried this a few times adding and deleting subsets and all data stayed in the table and the results from the previous run persisted until there was a new subset selected for analysis. All of that makes sense to me!
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.
Thanks!
…v results when resetting
…2-on-v3.4.x Backport PR #2112 on branch v3.4.x (aperture photometry: do not hide prev results when resetting)
Description
This pull request prevents resetting the internal traitlets in aperture photometry when failing to find a dataset/subset or raising an error, and only clears them when needed for the next successful run. This also then keeps the log table visible.
Fixes #2111
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.