Skip to content
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

Download Products with MastMissions #3155

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

snbianco
Copy link
Contributor

@snbianco snbianco commented Dec 18, 2024

This MR adds methods to MastMissions that allow users to retrieve and download products from the Missions-MAST API.

  • Retrieve products for datasets with get_product_list
  • Retrieve only unique products with get_unique_product_list
  • Filter products based on extension and other properties with filter_products
  • Download products with download_products
  • Download a single product with download_file

A few notes:

  • Added a setter for the mission property so that users can use the same MastMissions object to query multiple missions.
  • Although not ideal, some values are hard-coded in (dataset_kwds and _default_ullyses_cols, for example). These are due to limitations in the API, and I've reported these problems internally at MAST.
  • Added the missions_request_async function to services.py to handle API requests coming from MastMissions.

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 91.48936% with 16 lines in your changes missing coverage. Please review.

Project coverage is 67.74%. Comparing base (04c6069) to head (d098e39).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/mast/missions.py 93.42% 10 Missing ⚠️
astroquery/mast/services.py 86.95% 3 Missing ⚠️
astroquery/mast/observations.py 50.00% 2 Missing ⚠️
astroquery/mast/utils.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3155      +/-   ##
==========================================
+ Coverage   67.54%   67.74%   +0.20%     
==========================================
  Files         233      233              
  Lines       18493    18634     +141     
==========================================
+ Hits        12491    12624     +133     
- Misses       6002     6010       +8     

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

@snbianco
Copy link
Contributor Author

Tagging @astrojimig and @dr-rodriguez for visibility

@snbianco snbianco marked this pull request as ready for review December 19, 2024 00:28
@snbianco snbianco requested a review from bsipocz December 19, 2024 00:35
@snbianco snbianco added the mast label Dec 19, 2024
@bsipocz bsipocz added this to the v0.4.8 milestone Dec 19, 2024
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.

2 participants