-
Notifications
You must be signed in to change notification settings - Fork 80
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
Catalogs plugin results table #2915
Conversation
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.
Happy to see that the diff isn't too big, nice work! Just have a few suggestions from skimming the code and then once they're addressed I'll do some local tests.
There are also a bunch of codestyle failures, if you scroll down to the section below and click "Details" on the "CI / Code style checks (pull_request)" row (see screenshot) you can see the list of them and address them.

Co-authored-by: P. L. Lim <[email protected]>
Co-authored-by: Kyle Conroy <[email protected]>
Co-authored-by: Kyle Conroy <[email protected]>
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 left one suggestion for the documentation. Additionally, the UI in my testing doesn't seem to be sizing the table and associated elements correctly:


You can see in the first screenshot that it's overflowing the space on the left and right, and in the second screenshot when I expand the plugin, some of the words end up overlapping. One of us can help you tweak the .vue
file to try to improve this.
Co-authored-by: Ricky O'Steen <[email protected]>
Co-authored-by: Ricky O'Steen <[email protected]>
… twice to show the differences between displaying at the top and bottom. I am unsure of how to fix the issue with the display on the bottom.
The UI looks good now, looks like the failing test is because the table column names in the catalog file are not "ra" and "dec" - I think they're something like "sky_centroid.ra" instead. |
Yes, this works! I pushed those changes. Do you have any ideas on how to also access the object id? I talked to Cami this morning about it and the example catalog she showed me used 'label' but that fails the tests. |
What should happen when a user searches through the SDSS catalog and then tries to search through their own file? Should the table automatically be cleared? |
That's a good question. I think my first instinct is to append to the existing table, since there's a Edit: athough maybe in that case we would want a "source" column in the table to show where each row came from 🤔 |
I would say for now the table should do whatever behavior currently exists for the markers so that they relate directly to each other. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2915 +/- ##
==========================================
- Coverage 88.76% 88.73% -0.04%
==========================================
Files 111 111
Lines 17172 17262 +90
==========================================
+ Hits 15243 15317 +74
- Misses 1929 1945 +16 ☔ View full report in Codecov by Sentry. |
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 is looking great! Just two suggestions to consider, but I think they could both be deferred to the follow-up effort if you'd rather.
# find new to add in a way to append the source id to the table | ||
# 'Object ID': row['label']} ; 'label' is failing 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.
you can always do something like:
'Object ID': row.get('label', '')
which will then use the "label" column if it exists, and otherwise will fill that entry with an empty string.
# adding in coordinates and Source IDs into the catalog table | ||
if self.catalog_selected == "SDSS": | ||
for row in self.app._catalog_source_table: | ||
row_info = {'Right Ascension (degrees)': row['ra'], | ||
'Declination (degrees)': row['dec'], | ||
'Object ID': row['objid']} | ||
self.table.add_item(row_info) | ||
|
||
if self.catalog_selected == 'From File...': | ||
for row in self.app._catalog_source_table: | ||
# find new to add in a way to append the source id to the table | ||
# 'Object ID': row['label']} ; 'label' is failing 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.
instead of repeating these if-statements, can we move this logic into the previous if/elif statements and reference the object directly instead of having to rely on self.app._catalog_source_table
?
Or would SkyCoordTable
which is populated for each case and then used for the markers be able to take the object IDs as well, in which case we wouldn't need separate cases at all and would also benefit from being able to act on filtered_skycoord_table
in case any entries have been removed (otherwise we'll have to deal with this later when implementing click-to-zoom functionality since some entries might be missing marks)?
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.
Hey Kyle, I moved the code into the original if/elif statements. Could you further explain what you mean when you say "reference the object directly"? Are you referring to query_region_result?
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.
Awesome thanks! I just meant that you could use skycoord_table
and table
instead of self.app._catalog_source_table
since I'm guessing we'll need to get rid of that eventually, but that really doesn't matter and I can see arguments both ways - feel free to leave it as is now!
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 to me - you can let my approval stand if you do end up taking Kyle's suggestions and he approves.
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 to me now - thanks for all your hard work!
Description
This pull request is to add a table of results to the catalogs plugin in Imviz.
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.