-
Notifications
You must be signed in to change notification settings - Fork 1
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
DM-45860: Expand support for SIAv2 and VOTable #18
Conversation
5f3c642
to
44d39ea
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18 +/- ##
===========================================
+ Coverage 62.03% 82.30% +20.27%
===========================================
Files 11 16 +5
Lines 461 1074 +613
Branches 107 276 +169
===========================================
+ Hits 286 884 +598
+ Misses 166 165 -1
- Partials 9 25 +16 ☔ View full report in Codecov by Sentry. |
75b80cc
to
1e534cc
Compare
44661ba
to
9b66b4f
Compare
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.
Jsu commenting, as this is still a draft PR. Looks good, one concern is handling of regexes for collection names in obscore config, this is not going to work with the new query system. And there are assumptions about dimension names, but you know this already.
I designed it so that the assumptions about dimension names are isolated in SIAv2Handler. In the future the handler class will be a parameter of the SIAv2 obscore configuration. Butler ObsCore itself is a much bigger issue though because I'm sure "visit" is assume all over the place. |
69adc61
to
73c37d3
Compare
Comes from sdm_schemas
Uses felis to describe the table metadata.
Supports POS, BAND, TIME, INSTRUMENT
Now track the WHERE and bind information discretely and combine as needed.
Use WhereBind class to specify the specific query for export.
Otherwise every query will reload the YAML file.
Rather than diverting through astropy Table to get the masked array, convert to Arrow Table and use Eli Rykoff's conversion code in daf_butler to generate the masked array directly.
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 great, few minor comments.
|
||
Returns | ||
------- | ||
info : `dict` [ `str`, `typing.Any` ] |
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.
Maybe make a simple dataclass
or NamedTuple
for this return type to make it type-safer?
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 contents are universe-dependent. In our case we are returning a dict of filters and bands that match the query parameters. SphereX won't be returning that though since they don't have physical filters in their data model. I suppose a could define an empty BandInfo
model and then return a subclass in this method but that wouldn't really help with the type safety problem since "filters" and "bands" would be properties of the subclass.
region = regions[0] | ||
if len(regions) > 1: | ||
for r in regions[1:]: | ||
region = UnionRegion(region, r) |
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 be nice if UnionRegion
could take any number of regions in its constructor.
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.
Indeed it would.
Co-authored-by: stvoutsin <steliosvoutsinas@yahoo.com>
Co-authored-by: Andy Salnikov <salnikov@slac.stanford.edu>
This is sometimes fine but when combining a where="" with another where we were getting "x = y AND ()" which is invalid. In this commit we trap and raise. Another option is to ignore it when the combining happens.
Co-authored-by: stvoutsin <steliosvoutsinas@yahoo.com>
Requires lsst/daf_butler#1066 and lsst/daf_butler#1087.