-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update seeing profile/aperture settings notebook to use new infrastructure #358
Conversation
To perform the initial review of the functionality of this PR, I entered the following commands on the command line:
Addressing some of your suggested "things to try:"
|
The broken test should be fixed now, @JuanCab. Not sure I like the fix, which was to save a camera if it is passed into the seeing profile widget and is not already saved... |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #358 +/- ##
==========================================
+ Coverage 75.25% 76.42% +1.17%
==========================================
Files 27 27
Lines 3601 3657 +56
==========================================
+ Hits 2710 2795 +85
+ Misses 891 862 -29 ☔ View full report in Codecov by Sentry. |
I'll note again this issue (stated above): "if you click at several locations far from stars, multiple error messages show up and they actually push the image down the page." |
@@ -256,6 +306,29 @@ def load_fits(self): | |||
) | |||
self.exposure = np.nan | |||
|
|||
def save(self): |
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.
Looks like this function/method is not tested according to codecov, I am seeing a bunch of warnings about that inline with the code review.
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.
About to push a fix for this....
self.aperture_settings.savebuttonbar.unsaved_changes = True | ||
def _set_save_box_title(self, _): | ||
if self.aperture_settings.savebuttonbar.unsaved_changes: | ||
self.ap_title.value = self._format_title(DEFAULT_SAVE_TITLE + " ❗️") |
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.
Just for maintainability, couldn't these two lines that change the self.ap_title.value
use the AP_SETTING_NEEDS_SAVE
and AP_SETTING_SAVED
constants you defined? Might even make the code more readable. :)
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.
Used, including in the incoming tests
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.
Here is my review of the code mostly focusing on the UI/UX aspects and trying to break the notebook:
- Just a minor note but the waffle image does not show up for either notebook in the launcher, not sure if that is intended.
- In windows Shift-click has the same functionality as CRTL-Click
- We may want to include instructions of what right clicking does and how to restore the image to the default.
- As @JuanCab had noted above if you click repeatedly where there is no star the error message will move the image box. This does reset after 4 messages and the image box reverts back to its initial position.
- May want to adjust the wording of the
Radius
setting to beAperture Radius
or adjust the description of it. It confused me for a little bit.
Overall everything passed, I did try breaking the camera selector some again but it passed with blinding colors.
@JuanCab @Tanner728 -- I'll open a separate PR today to add the waffle image to the repo. |
Does right-click reset the zoom? |
holding right-click and dragging adjusts brightness and contrast of the image depending on which way you drag your cursor while holding right-click. Then I think its just right-click to reset contrast and brightness, it could be shift right-click as well. I forgot. |
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.
Looks good, only suggested edit is my usual request for clearer comments, this time just explaining what a test is testing.
|
||
|
||
def test_seeing_profile_error_messages_no_star(tmp_path): | ||
# Make sure the appropriate error message is displayed when a click happens on |
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.
Logic for this test seems sound.
This PR does a few things:
Some things to try: