Skip to content
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

Relaxed baseurl requirements in SIA2Service #500

Merged
merged 2 commits into from
Dec 1, 2023
Merged

Conversation

andamian
Copy link
Contributor

@andamian andamian commented Nov 28, 2023

Solution for #450.

Still not sure that it's correct to relax the adherence to the spec in order to accommodate services that don't, but here you have it.

SIA2 was not wrong in what it was doing, just that it didn't expect the access URL to contain a query. It can deal with that now. Note that the service is still required to have a capabilities end point.

@andamian andamian added this to the v1.5 milestone Nov 28, 2023
@andamian andamian added the bug label Nov 28, 2023
@msdemlei
Copy link
Contributor

msdemlei commented Nov 29, 2023 via email

@andamian
Copy link
Contributor Author

andamian commented Nov 29, 2023

That first attempt was wrong indeed. Here is another one in which capabilities can be bypassed all together.

If capabilities is not to be used, then this should also be pushed out of the standard. @msdemlei do you mind opening an issue if there isn't one already? I would, except that I don't know how to justify it since to me that end point makes perfect sense.

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a non-mocked test, too? E.g. we have a bunch of SIA2 services at IRSA, e.g. the one in #450 could be added as is to the test suite (or to the documentation, as that would be picked up by the tests, too)

Copy link
Contributor

@msdemlei msdemlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current tally of my all-VO tester has the following broken services:

  • ivo://au.csiro/casda/sia2 -- that's geofencing, I think
  • ivo://esavo/hst/siap -- needs investigation: I got a 503 from them, so it's probably not our fault
  • Everything from ipac -- again, needs investigation; these are read timeouts. Hu?
  • ivo://ned.ipac/sia -- that's a 500; we should look into it, but that's not a showstopper
  • ivo://pds-ppi/system/siap2/sitewide -- that's accidentally published and should vanish soon.

So... what's left in terms of failures looks like it's not pyVO's fault. If you understand the remaining CI failures (there are ~ two in general pyVO code ATM), I'd say let's go.

@bsipocz
Copy link
Member

bsipocz commented Dec 1, 2023

Everything from ipac -- again, needs investigation; these are read timeouts. Hu?

weird, I'll have a look at this or propagate it to the right persons internally.

@bsipocz
Copy link
Member

bsipocz commented Dec 1, 2023

@msdemlei - could you please go into more details about the queries you try and see for IRSA? E.g. the following one works for me, as well as the one in #450 :

In [6]: import pyvo
   ...: irsa_SIA = pyvo.dal.SIA2Service('https://irsa.ipac.caltech.edu/SIA')
   ...: from astropy.coordinates import SkyCoord
   ...: coords = SkyCoord('150.01d 2.2d', frame='icrs')
   ...: seip_results = irsa_SIA.search((coords, 0.05), collection='spitzer_seip')

@bsipocz
Copy link
Member

bsipocz commented Dec 1, 2023

If you understand the remaining CI failures (there are ~ two in general pyVO code ATM), I'd say let's go.

The CI for the main branch has been now fixed, so rebasing this PR should fix CI here, too.

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the bug indeed. I have one unrelated comment having 1.5 in mind.

The only actually blocker I see is the need for one archive accessing test, and sorting out the currently failing CI jobs.

@@ -156,7 +156,7 @@ class SIA2Service(DALService, AvailabilityMixin, CapabilityMixin):
generally not notice that, though.
"""

def __init__(self, baseurl, session=None):
def __init__(self, baseurl, session=None, check_baseurl=True):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seaparate, but I would like to make optional arguments keyword only, systematically, and before the 1.5 release.

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (7682a18) 80.08% compared to head (bfa0587) 80.08%.
Report is 2 commits behind head on main.

Files Patch % Lines
pyvo/dal/sia2.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #500   +/-   ##
=======================================
  Coverage   80.08%   80.08%           
=======================================
  Files          52       52           
  Lines        6071     6077    +6     
=======================================
+ Hits         4862     4867    +5     
- Misses       1209     1210    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andamian
Copy link
Contributor Author

andamian commented Dec 1, 2023

@bsipocz - OK now?

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more minor comment, I'll go ahead and commit it and then merge this PR.

Thank you @andamian!

pyvo/dal/tests/test_sia2_remote.py Outdated Show resolved Hide resolved
@bsipocz bsipocz merged commit a035576 into astropy:main Dec 1, 2023
12 checks passed
@andamian
Copy link
Contributor Author

andamian commented Dec 1, 2023

Awesome. Appreciated @bsipocz

@andamian andamian deleted the sia2 branch December 1, 2023 21:29
@msdemlei
Copy link
Contributor

msdemlei commented Dec 5, 2023 via email

@msdemlei
Copy link
Contributor

msdemlei commented Dec 5, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants