Skip to content

MAST: get_product_urls for Observations - #3639

Open
cpparts wants to merge 3 commits into
astropy:mainfrom
cpparts:mast-obs-get-product-urls
Open

cpparts wants to merge 3 commits into
astropy:mainfrom
cpparts:mast-obs-get-product-urls

Conversation

@cpparts

@cpparts cpparts commented Jul 28, 2026 •

Copy link
Copy Markdown

Adds a MAST Observation method (get_product_urls) that returns a list of URLs for products without downloading them. This addresses #2850. These changes have been reviewed/guided by @snbianco, and I am looking forward to feedback!

@codecov

codecov Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.87179% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.07%. Comparing base (7f2fd33) to head (7e1caf0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/mast/observations.py 94.87% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3639      +/-   ##
==========================================
+ Coverage   74.04%   74.07%   +0.02%     
==========================================
  Files         228      228              
  Lines       21649    21677      +28     
==========================================
+ Hits        16031    16058      +27     
- Misses       5618     5619       +1     

☔ View full report in Codecov by Harness.
📢 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 requested a review from snbianco July 29, 2026 04:30
@bsipocz bsipocz added the mast label Jul 29, 2026
@snbianco

Copy link
Copy Markdown
Contributor

Hey Celia! This looks great (I've already reviewed this PR on a different branch in my repository). To get the two failing checks to pass, you need to add an entry to the CHANGES.rst file. Put in under the "Service fixes and enhancements" subheading, and then "mast."

For the docs build, you can find the warning on line 748 of the output. I think in this case, you need to add a second layer of backticks to the text it's highlighting in the function docstring.

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This needs a rebase as I see a lot of deprecations that have been fixed are popping up when testing.

Other than that, a few minor comments and this should be ready to go.

Comment thread astroquery/mast/observations.py Resolved

return manifest

def get_product_urls(self, products, *, mrp_only=False, cloud_only=False, include_bucket=True,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe have uri in the name rather than url so we will be more self consistent (e.g. with the other open PR that adds get_cloud_uris

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I will defer to @snbianco on this decision -- happy to implement whatever meshes well with any changes

Comment thread astroquery/mast/observations.py Resolved
Comment thread docs/mast/mast_obsquery.rst Outdated
For convenience, `~astroquery.mast.ObservationsClass.get_product_urls` supports the same filtering options as
`~astroquery.mast.ObservationsClass.filter_products`, allowing users to retrieve URLs for only a selected subset of products.

.. doctest-skip::

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please don't skip code examples, or provide a reasoning for it (preferably in a comment so our future self will know about it, too)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oops! I originally copied the example block styling from elsewhere, which included skip

@bsipocz bsipocz added this to the 0.4.13 milestone Nov 5, 2026
@cpparts
cpparts force-pushed the mast-obs-get-product-urls branch from 2532c02 to 7e1caf0 Compare November 5, 2026 16:00

This branch has not been deployed

No deployments
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.

3 participants