Skip to content

Conversation

juanmcloaiza
Copy link
Contributor

@juanmcloaiza juanmcloaiza commented Jun 5, 2025

Closes #3138

Changes:

Switch querying interface from WDB to TAP in querying functions:

  • query_main
  • query_instruments
  • query_surveys
  • query_apex_quicklooks
  • list_instruments
  • list_surveys

Deprecate arguments:

  • open_form
  • cache

New functionality:

  • Allow plain ADQL queries via query_tap_service (with authentication as well)
  • Cone search using cone_ra, cone_dec, cone_radius arguments
  • Retrieve record count before querying the archive, via count_only argument
  • Ask query functions to print the underlying ADQL queries without issuing them

@juanmcloaiza juanmcloaiza force-pushed the feature/ISSUE-3138-TAP branch from 720fbd9 to 22d0c30 Compare June 5, 2025 12:55
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

❌ Patch coverage is 84.11552% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.16%. Comparing base (c588b25) to head (bb15ee7).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/eso/core.py 77.14% 40 Missing ⚠️
astroquery/eso/utils.py 96.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3339      +/-   ##
==========================================
+ Coverage   70.54%   71.16%   +0.61%     
==========================================
  Files         232      233       +1     
  Lines       20022    19963      -59     
==========================================
+ Hits        14125    14206      +81     
+ Misses       5897     5757     -140     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@juanmcloaiza juanmcloaiza force-pushed the feature/ISSUE-3138-TAP branch 3 times, most recently from a987745 to 4b775f8 Compare June 5, 2025 13:49
@juanmcloaiza juanmcloaiza mentioned this pull request Jun 5, 2025
8 tasks
@juanmcloaiza
Copy link
Contributor Author

Hi @bsipocz , could you please give us a time estimate of the review process? No pressure at all though, we only need to plan our activities internally. Thanks a lot in advance.

@bsipocz
Copy link
Member

bsipocz commented Jul 21, 2025

@juanmcloaiza - sorry for the delay. I'll try to get to the review this week.

@bsipocz bsipocz added the eso label Jul 31, 2025
@bsipocz bsipocz added this to the v0.4.11 milestone Jul 31, 2025
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.

I'm sorry to have this many comments and thank you for your patience while waiting for this review.

I acknowledge that this seems to a lot, but most of them are minor and/or helping API consistency with the other modules and/or making the code cleaner and easier to read and follow; which will be helpful for the future maintenance.

@juanmcloaiza juanmcloaiza force-pushed the feature/ISSUE-3138-TAP branch from 3742bb9 to d3be2af Compare August 5, 2025 12:15
@juanmcloaiza
Copy link
Contributor Author

@bsipocz, thanks a lot for your comments, I have addressed most of them (the easy ones); for the rest, I'd still need some feedback from you. If you can give me feedback today, I can work immediately on it and push and update by tomorrow. Afterwards, I won't be able to work on Astroquery for the next couple of weeks. Just so you know, in case you can squeeze this review in your day 🤓 Thanks again! 👍

@bsipocz
Copy link
Member

bsipocz commented Aug 5, 2025

@juanmcloaiza - I'm sorry, it's very unlikely that I can get back to this today, but I'll try to do it soon so you can pick it up again in a few weeks time.

@juanmcloaiza
Copy link
Contributor Author

Hi @bsipocz , just a ping about the second review round. Have you had some time for it? We're looking forward to hearing back from you.

@bsipocz bsipocz modified the milestones: v0.4.11, 0.4.12 Sep 18, 2025
@juanmcloaiza
Copy link
Contributor Author

juanmcloaiza commented Sep 24, 2025

There's no field for me to reply to your las two comments (strange...), but here are my replies:


About the maxrec - Sure thing, I'll make the change I've replaced maxrec by ROW_LIMIT.


About the deprecated keys message - The problem is that the astroquery ESO module (like many others) is currently using the keywords of the underlying querying engine directly in its API (like box, coord1, coord2 of WDB). These are not python arguments, but keys of a very normal dictionary that is passed to the python API and transformed internally to a WDB or TAP query. Since these are not python arguments, we need ad-hoc cecking, and we do it only for the most common WDB keywords.

The messages users get are, for example, "box, coord1 and coord2 are deprecated; use cone_ra, cone_dec and cone_radius instead."

Without _raise_if_has_deprecated_keys, the code would explode later on with a message about a bad TAP query, printing the query itself, but without saying explicitly that the problem is in the keywords.

@ashleythomasbarnes has already an extensive documentation with examples ready to be submitted after this PR. For the moment, the changes to the documentation in this PR, include a warning and a how-to regarding the incompatibility between WDB and TAP:


Thanks for the feedback, @keflavich, I'll get everything done this week. Please just let me know about my question regarding the deprecation of arguments; for the rest everything is clear 👍

@juanmcloaiza
Copy link
Contributor Author

juanmcloaiza commented Sep 26, 2025

@keflavich, your comments have been taken into account, thanks for having taken the time. [cc @bsipocz, @ashleythomasbarnes, @szampier]. -- EDIT: Apologies, I went again one by one through all the conversations and I noticed three comments that had escaped my sight. I have taken them into account now. Please double check and let me know if anything is still missing.

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

Successfully merging this pull request may close these issues.

ESO - Enable Table Access Protocol (TAP) queries
3 participants