ESA HST module PyVO migration#3367
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3367 +/- ##
==========================================
+ Coverage 70.08% 70.48% +0.39%
==========================================
Files 232 232
Lines 19890 19977 +87
==========================================
+ Hits 13940 14080 +140
+ Misses 5950 5897 -53 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @JorgeHigueraFombuena , great to see your first PR to Astroquery! @bsipocz , he is a new team member at ESA and I have been supporting him on this branch. It seems all the checks are passing now, great! Please let us know if you have comments or concerns. Thanks! |
|
Welcome @JorgeHigueraFombuena! And straight into the deep end. I have some deadlines to meet before the long weekend and will be at a conference next week. But I'll try to get this reviewed quickly (passing the tests is already a great sign, but I expect to have some comments on making the API more consistent with the other modules). |
|
Hi @bsipocz I hope the code is clear enough to make reviewing easy! |
|
Hi @bsipocz ! |
|
@JorgeHigueraFombuena - There is another big PR in front of this one, hopefully I can clear both this week. |
|
@bsipocz |
bsipocz
left a comment
There was a problem hiding this comment.
The property/attribute renames are blockers for the merge, the rest of the inline comments are minor.
Also, I do see 2 test failures (on main, too, so it's separate), but two other ones triggered only with this PR. Could you please have a look into them?
(pytest -P esa.hubble -R should pick them up once all the test requirements are installed)
=============================================== short test summary info ================================================
FAILED astroquery/esa/hubble/tests/test_esa_hubble_remote.py::TestEsaHubbleRemoteData::test_query_tap_async - pyvo.dal.exceptions.DALServiceError: 500 Server Error: 500 for url: https://hst.esac.esa.int/tap-server/tap/async/0...
FAILED astroquery/esa/hubble/tests/test_esa_hubble_remote.py::TestEsaHubbleRemoteData::test_cone_search - AttributeError: 'ESAHubbleClass' object has no attribute '_tap'
FAILED astroquery/esa/hubble/tests/test_esa_hubble_remote.py::TestEsaHubbleRemoteData::test_get_datalabs_path_image - UserWarning: File ib4x04ivq_flt.jpg is not accessible. Please ensure the WFC3/UVIS volume is mounted in your ESA Da...
FAILED astroquery/esa/hubble/tests/test_esa_hubble_remote.py::TestEsaHubbleRemoteData::test_get_datalabs_path_fits - UserWarning: File ib4x04ivq_flt.fits.gz is not accessible. Please ensure the WFC3/UVIS volume is mounted in your ES...
| self.get_status_messages() | ||
|
|
||
| @property | ||
| def vo(self) -> pyvo.dal.TAPService: |
There was a problem hiding this comment.
call this tap to be consistent with the other modules
| def __init__(self, *, show_messages=True, auth_session=None): | ||
| super().__init__() | ||
|
|
||
| self._vo = None |
There was a problem hiding this comment.
call this self._tap to be consistent with the other modules
| while job.phase == 'EXECUTING': | ||
| time.sleep(3) |
There was a problem hiding this comment.
I don't think you need to add a manual sleep in here. Also, why not just run it with run_async instead of doing the submission/run/fetch cycle? (genuine question, you may have good reasons to prefer this way)
There was a problem hiding this comment.
I've changed it to the method you proposed, and it works fine. Thank you!
| @deprecated(since="0.4.7", alternative="query_tap") | ||
| def query_hst_tap(self, query, *, async_job=False, output_file=None, |
There was a problem hiding this comment.
unrelated so can be done in a separate PR, but given this backend change, the deprecations could be also cleaned up (but we can also keep them in longer if you prefer that)
There was a problem hiding this comment.
The method was cleaned up!
|
|
||
|
|
||
| ESAHubble = ESAHubbleClass() | ||
| # Neet to be false in order to avoid errors in tests |
There was a problem hiding this comment.
I would rephrase
| # Neet to be false in order to avoid errors in tests | |
| # Need to be False in order to avoid reaching out to the remote server at import time |
|
Hi @bsipocz ! |
|
Hi @bsipocz |
bsipocz
left a comment
There was a problem hiding this comment.
Thank you @JorgeHigueraFombuena! I have two very minor comments, will just add them and then merge this PR.
f80e854 to
b918da4
Compare
Dear astroquery team, this ticket aims to update the HST to make use of the PyVO module.
Happy to contribute!!
CC @esdc-esac-esa-int