-
Notifications
You must be signed in to change notification settings - Fork 75
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
Generalize units in slice plugin #2706
Conversation
* in prep for unit conversion (where spectral axis can be in frequency instead of wavelength) and for downstream use (ie lcviz)
and instead use a mixin to create and access the slice indicator
cd0bb09
to
3d42737
Compare
b353764
to
70c4722
Compare
* may need to be re-introduced later, but out of scope for now
736beed
to
40f5bc1
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2706 +/- ##
==========================================
- Coverage 90.82% 90.79% -0.03%
==========================================
Files 163 164 +1
Lines 21503 21592 +89
==========================================
+ Hits 19530 19605 +75
- Misses 1973 1987 +14 ☔ View full report in Codecov by Sentry. |
@@ -1,6 +1,6 @@ | |||
<template> | |||
<j-tray-plugin | |||
description='Select slice (or wavelength) of the cube to show in the image viewers and highlighted in the spectrum viewer. The slice can also be changed interactively in the spectrum viewer by activating the slice tool.' | |||
:description="docs_description || 'Select slice of the cube to show in the image viewers. The slice can also be changed interactively in the spectrum viewer by activating the slice tool.'" |
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.
This (docs_description
) doesn't seem related?
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.
It is, it's covered in the bullet "allowing overriding the plugin header text when inherited by downstream apps" and coupled with setting docs_description
as an empty traitlet in the plugin template mixin.
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.
would you rather I split this into a separate PR (and then add the hookups for all the plugins there)?
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.
moved (and applied to all plugins) in #2709
hint="Show slice wavelength in label to right of indicator." | ||
v-model="show_wavelength" | ||
label="Show Value" | ||
:hint="'Show slice '+value_label.toLowerCase()+' in label to right of indicator.'" |
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 don't understand the need for toLowerCase
here.
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.
Because we want lower case here (not "Show slice Wavelength in label..."), but we want title case in the actual input widget, without defining two different strings on the python-side.
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, just to make sure, this does not affect string representation of the unit, right? Because "MJy" is not the same as "mjy".
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.
right, this is the label (Wavelength, Frequency, Time, etc), not the unit.
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.
In principle, looks fine. Just a couple of minor comments above.
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.
LGTM. Thanks for the clarifications!
will be covered across all plugins in a separate PR
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.
Very useful for myself to see both for immediate implementation and long term planning. I am excited to see the follow-up PR(s)!
Description
This pull request generalizes the slice plugin for:
It does so by:
allowing overriding the plugin header text when inherited by downstream apps(moved to allow downstream apps or config-specific override to docs description #2709)select_wavelength
.slice_indicator
property to a mixin so that it can be used by other viewers that are not spectral.Coming as a follow-up PR:
Before PR:
After PR:
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.