Skip to content

Conversation

jsaizsantos
Copy link

@jsaizsantos jsaizsantos commented Oct 8, 2025

Dear Astroquery community:
This is my first PR to this repository. I am a developer working for the Euclid archive at ESAC.

The purpose of this PR is to add a new method get_datalinks_metadata to the Euclid class, to return additional columns on top of the ones returned by the plain get_datalinks method, which is left untouched as it complies with the IVOA standard.

The actual new columns to return are left to the datalinks service of the Euclid archive; currently it is datalabs_path, to be used for Datalabs, but two more will come in a new release of the archive (with no further required change on the Astroquery interface): file_name and hdu_index.

cc @esdc-esac-esa-int

Copy link

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.54%. Comparing base (aaa6e53) to head (671956f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/utils/tap/core.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3438   +/-   ##
=======================================
  Coverage   70.54%   70.54%           
=======================================
  Files         232      232           
  Lines       20022    20026    +4     
=======================================
+ Hits        14125    14128    +3     
- Misses       5897     5898    +1     

☔ 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.

@bsipocz bsipocz added this to the 0.4.12 milestone Oct 8, 2025
@jespinosaar
Copy link
Contributor

Great, thanks @jsaizsantos ! Please let us know if you have further comments, @bsipocz . We are preparing for an internal release at the end of this month, so it would be great if we could have this reviewed and merged by next week.

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.

Thanks @jsaizsantos for the PR and welcome to astroquery!

I have some comment for the content here, namely to consider not having the separate method just the new kwarg to get_datalinks. And maybe calling it something else then option, maybe extra_options (I'm not really sold on this idea) or something else that best describes it.

options=options,
verbose=verbose)

def get_datalinks_metadata(self, ids, *, linking_parameter='SOURCE_ID', verbose=False):
Copy link
Member

Choose a reason for hiding this comment

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

Why have this as a separate method rather than just documenting the one needs to have use options='METADATA'? The narrative documentation example below throw me off the track as starting with that one, and based on the method name I expected only metadata rather than it having the same result as using get_datalinks and some extra metadata.

Comment on lines +1431 to +1432
options : str, optional, default None
To let customize the server behaviour
Copy link
Member

Choose a reason for hiding this comment

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

options feels very generic; could we be more specific naming this?
Also, I would find it useful to mention what valid values could be for this, from the example below 'METADATA' is one, but how could the user know what else works?

Copy link
Member

Choose a reason for hiding this comment

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

In addition, adding a new kwarg is an API change, thus will need to be mentioned in the changelog

return user.startswith(f"{user_id}:") and user.count("\\n") == 0

def get_datalinks(self, ids, *, linking_parameter=None, verbose=False):
def get_datalinks(self, ids, *, linking_parameter=None, options=None, verbose=False):
Copy link
Member

Choose a reason for hiding this comment

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

This will need to be mentioned in the changelog

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.

3 participants