-
-
Notifications
You must be signed in to change notification settings - Fork 418
Enable TAP for ESO module #3141
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
base: main
Are you sure you want to change the base?
Conversation
Hello @juanmcloaiza! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2025-01-17 14:13:03 UTC |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3141 +/- ##
==========================================
+ Coverage 69.87% 75.19% +5.31%
==========================================
Files 232 3 -229
Lines 19770 520 -19250
==========================================
- Hits 13815 391 -13424
+ Misses 5955 129 -5826 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
One comment for now regarding the deprecation, otherwise is looking good so far (I didn't dive into the details, but had a quick look
eb83ef2
to
1829e1c
Compare
@bsipocz, hi, I'd like to ask for your feedback regarding deprecated functionality. This PR's scope is to switch the back-end of the ESO module from WDB to TAP. In doing so, many of the functions will be renamed and their signatures changed (i.e. completely new functions are being written, while others are being removed). If I understand correctly, astroquery requires that deprecated features are handled via The question I'd like to ask you as an astroquery maintainer is the following: Would it be admissible for this time to avoid adding deprecated decorators to each of the functions and arguments that we are discontinuing? My impression is that the Please let us know what you think (cc @szampier). Thanks in advance for your feedback ;) |
a769979
to
71d4681
Compare
Given this is a full refactoring and switching out what backend to use on the server side, it should be OK to do it without decorating with deprecations and remove methods that don't make sense any more. |
Also let me know when I should come in and do a first round of review. I already noticed a few things that are odd and would preferably done differently, e.g. the custom caching functions (e.g. it would be nice to either reuse what we already have, or generalize these and put it into a more central location). Also, I see some workaround for the tests that preferably should be resolved, e.g. don't filter warnings but if they are legit, then check if they are raised, also, empty tests should not be around for the sake of fooling codecov (you can just ignore the report for now, it doesn't report on the remote tests) |
Hi @bsipocz , thanks for the feedback. I reply each of your points here:
I will ping you again when we're ready with our internal feedback rounds, so you can go through it more thoroughly. Thanks again for your preliminary feedback! 👍 |
@bsipocz , hi, one quick question. Preparing for the future, we are thinking on developing ESO submodules, so that we can query ESO data in the following way: import astroquery.eso.observations as observations # Current Pull Request
import astroquery.eso.catalogues as catalogues # To be developed in the future
raw_datasets = observations.list_raw_instruments()
# >>> ['MUSE', 'VVV', 'SPHERE', ... ]
# Query raw data:
raw_data = observations.Raw() # Raw data from table dbo.raw
my_astropy_table = raw_data.query(instrument="MUSE")
# Query raw data from an IST:
muse_data = observations.Raw("MUSE") # Raw data from table ist.muse
my_astropy_table = muse_data.query(...)
# Query Phase 3 data:
processed_data = observations.Processed() # Processed data from table ivoa.ObsCore
my_astropy_table = processed_data.query(collections=["MUSE"]) Would this be OK for astroquery standards? |
I'd recommend that some of what you're proposing should be keywords. e.g. If you're going to use Other archives generally split their queries by Observation first, Processed State next (e.g., MAST). Is there a structural reason you need to split by processed state first, or could you also support queries that return everything associated with a given observation, then filter from there? If you can support both ways, I think that's better - the average user will not want raw data, so your approach looks possibly better. |
I would really like to keep the facility name in the name of classes, etc, so while submodules are fine I think it would be better to keep calling them something ESO.
(I know that mast is an outlier in this sense, and then gemini copied their approach, but I haven't given up on getting the renamed done as outlined in #1748) |
Strongly agree @bsipocz . What you've suggested is a documentation (suggested usage) change, right? i.e., |
No, I would strongly recommend to rename the class itself. |
Hi @bsipocz and @keflavich , thanks for the attention given to my question. My takeaway is as follows:
To quickly answer your questions:
Not to deviate the discussion, I'm not going into more detailed answers, but am happy to discuss further elsewhere if you're interested. For the rest of your comments, I don't have a clear answer now but they gave important insights as to what external users expect. We will discuss internally and come back with a solution. Thanks a lot! 👍 |
@bsipocz, @keflavich, hi, thanks again for the discussion last time. We will implement a new interface, but to streamline the review process, we won't do it in this pull request. I will open a new one shortly. @bsipocz, could you please start giving a more thorough look at this pull request? @szampier is also looking at it in parallel, but we don't expect large changes. Thanks in advance, looking forward to your feedback! |
612fd82
to
34ba3c4
Compare
@keflavich , thanks for the comments. About the docstrings: I asked you-know-who to format them in "reStructuredText Sphinx style" as opposed to NumPy or Google styles because we are using Sphinx (https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html), so it renders nicely (perhaps a bit packed for some tastes), but I must admit I didn't pay attention to the convention followed in the rest of the modules beforehand. I am adding here two screenshots with the renders of the docstrings written in the two different styles: reStructuredText Sphinx style -- compact, with bullet points and links to datatypes docsNumPy style -- not so cluttered; each parameter is a "subsection" rather than a bullet point.I prefer the Sphinx style, but have no strong opinions at all, so we can push whatever style you and @bsipocz decide (changing the docstring style is basically 1-click away from my side), just let me know. |
The way the docstrings get formatted in the end should be independent of how they're input, but you've shown that's not the case. In any case, my concern is that the docstrings are consistently formatted internally because mixing formats in a package is a bad idea (doubles the possibility of bugs, and is definitely unexpected for the end user). So please use the format that looks like this:
|
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.
First round without looking into the content, it's just about what unrelated changes need to be removed, and some data file bookkeeping comments.
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.
Please don't add any changes to the CI or other config files, and remove all these changes from the history.
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.
please don't store data files as pickles, write them out to a data file format (anything you would expect the server to return), but never a pickle.
If possible remove these from the history, too.
testpaths = astroquery docs | ||
testpaths = | ||
docs/eso | ||
astroquery/eso |
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.
remove these changes from the history. You can run just ESO test with pytest out of the box as pytest -P eso -R
which will pick up only the ESO tests.
(this is also mentioned in the docs, but we may need to add a bit more explanation to that if you think it would have helped you to find the correct command: https://astroquery.readthedocs.io/en/latest/testing.html#running-only-the-remote-data-tests)
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.
remove these changes from the history
yes, please follow numpydoc formatting. Also, I wonder if this is ready for review, as there are commits still coming in. Also, I wonder if you would consider reorging a commits with a bit of cleanup would be useful as there are a lot going on through the 160+ commits (see my comments about changes to the CI and configs, none of those should be in this PR or in fact left in the history). |
Addresses #3138
Changes:
open_form
andcache
arguments