-
Notifications
You must be signed in to change notification settings - Fork 88
add sky centroid column for reingestion #3841
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (51.61%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #3841 +/- ##
==========================================
+ Coverage 86.77% 87.59% +0.81%
==========================================
Files 184 188 +4
Lines 25146 25730 +584
==========================================
+ Hits 21821 22537 +716
+ Misses 3325 3193 -132 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
why are the RA and Dec columns that already exist not sufficient to reingest? And if we're "rebuilding" a SkyCoord, we probably can't assume icrs, but would need to track that internally.
|
@kecnry my first attempt at this was updating the parser logic to allow Ra/Dec if both columns existed in the file loaded. We do explicitly have the names of the columns and can use that to create the SkyCoord when the search function is actually called. We would need to update the documentation and have an additional logic block where if there isn't a sky_centroid column in the file, the to check for Ra/Dec and construct it. I've already thought through this and have a commit that just needs to be cleaned up if we want to go in this route. I chose this since it was the least amount of code change for the desired result, and that in the docs we currently say we require the sky_centroid column, so it felt more natural if we require it that the table that we create should also have it. Let me know if that's the preferred route and I'll get the commit up ASAP (or update the existing logic without the IRCS assumption) |
|
is this specifically for ingesting back into the (soon-to-be-deprecated) catalogs plugin or into the new catalogs importer? |
|
The plugin, this is what @cshanahan1 and I were talking in Slack a bit about, the original bug the ticket was about wasn't reproducible but this one still existed and so trying to find the simplest solution was the goal just to have in working in the meantime |
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 fixes the issue in the plugin, looks good!
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 test coverage be added for the roundtrip?
| ra_candidates = ["Right Ascension (degrees)", "ra", "RA"] | ||
| dec_candidates = ["Declination (degrees)", "dec", "DEC"] |
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.
probably fine for now (I was thinking we could re-use the logic from the catalogs importer, but ultimately that will probably replace this entire plugin soon, so probably not worth generalizing it 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.
I was thinking the same thing, it could and should be more robust than this but held off on it for now.
| if "Right Ascension (degrees)" in tbl.colnames: | ||
| ra = row["Right Ascension (degrees)"] | ||
| elif "ra" in tbl.colnames or "RA" in tbl.colnames: | ||
| ra = row.get("ra", row.get("RA")) |
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.
do we need an else after the elif, or is no other case possible due to logic earlier?
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 file parser gets hit first so if that is able to find both the RA and Dec columns we know that the naming convention for the columns is correct at this point.
Yes I wanted to add a test to boost the codecov coverage but I wanted to make sure we were on the same page about how this should be handled, I'll get that up ASAP. |
Description
This pull request adds the sky centroid column to the catalog search table. When importing from file into the plugin, we require the sky centroid column, but on export, we do not actually store this column, so to enable reingestion this column is added.
Change log entry
CHANGES.rst? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rstbefore merge. If no, maintainershould add a
no-changelog-entry-neededlabel.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.
triviallabel.cache-download.ymlworkflow?