-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Deprecating image and spectrum as registry servicetype-s #449
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #449 +/- ##
==========================================
- Coverage 80.38% 80.10% -0.28%
==========================================
Files 52 52
Lines 6189 6027 -162
==========================================
- Hits 4975 4828 -147
+ Misses 1214 1199 -15 ☔ View full report in Codecov by Sentry. |
On Fri, Aug 04, 2023 at 11:37:56AM -0700, Brigitta Sipőcz wrote:
E.g. I strongly feel instead of this, one should be able to do one
`image` search, that returns the ~90 services.
```
import pyvo
image_services_v1 = pyvo.regsearch(servicetype='sia')
image_services_v2 = pyvo.regsearch(servicetype='sia2')
v2_irsa = [s for s in image_services_v2 if 'irsa' in s.ivoid]
v1_irsa = [s for s in image_services_v1 if 'irsa' in s.ivoid]
```
[for the record: I'd much rather do the ivoid constraint on the
server side; if what you're doing here is something people want to
do, let's add a ``partial`` option to the registry.Ivoid constraint]
Well, the trouble with this is: What would you do with such a
resource list? I think almost always people would do this kind of
thing to query all these services. This then would look like this:
for rec in pyvo.regsearch(servicetype='image-meaning-any-sia'):
svc = reg.get_service() # trouble if there's two sia caps: which
# one do we return here?
res = svc.query(????) # depending on what SIA version we have,
# users have to pass different parameters
for rec in res:
???? # depending on the SIA main version, you get different
# sorts of records you need to treat in totally different
# ways
Frankly, I simply don't see a use case where this
image-meaning-any-sia constraint would yield behaviour useful to any
user – unless we abstracted the various versions away with a
pyVO-specific ImageService class.
And even with that, you still haven't started with obscore -- which
can also contain images.
My conclusion is that way the VO has worked out, normal astronomers
have an almost zero chance of successfully doing an "All-VO image
search" just using the pyvo.registry and pyvo.dal modules themselves.
I'm now more convinced of that than ever, because I've just written a
bit of code that I hope will evolve into an All-VO querier. See
PR#470 to get an idea what's involved (and for a number of items
where I'd be grateful for good ideas).
And so I'd still like to warn people already in the next release that
neither 'image' nor 'spectrum' does not do what they could think it
does and that it likely never will. And I'd appreciate contributions
to the my global-discovery branch.
|
8c9c011
to
7cabd98
Compare
7cabd98
to
e4e8c9f
Compare
I'm also promising all-VO-searches in some other way in the docs.
e4e8c9f
to
723bd0a
Compare
I'm also promising all-VO-searches in some other way in the docs (which perhaps I shouldn't).
This is supposed to address bug #429.