Skip to content

Accept lists for MastMissions query criteria#3319

Merged
bsipocz merged 2 commits into
astropy:mainfrom
snbianco:missions-filter-lists
Jun 5, 2025
Merged

Accept lists for MastMissions query criteria#3319
bsipocz merged 2 commits into
astropy:mainfrom
snbianco:missions-filter-lists

Conversation

@snbianco

@snbianco snbianco commented May 15, 2025

Copy link
Copy Markdown
Contributor

Previously, in order to filter by multiple values for a criterion in MastMissions, users would have to pass in a comma-delimited string. This PR adds support for a list of values. It also allows users to pass in a single string for the sort_by keyword and a single boolean for the sort_desc keyword rather than a list.

In addition, this PR does some additional error handling to be more helpful to users when they make invalid queries. If the request comes back with a HTTP 400 or 500 error (both indicative of bad input), an InvalidQueryError is raised that advises the user to check their query.

@snbianco snbianco added the mast label May 15, 2025
@codecov

codecov Bot commented May 15, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.89%. Comparing base (823e49f) to head (97643ee).
⚠️ Report is 130 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/mast/services.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3319   +/-   ##
=======================================
  Coverage   69.88%   69.89%           
=======================================
  Files         232      232           
  Lines       19761    19767    +6     
=======================================
+ Hits        13810    13816    +6     
  Misses       5951     5951           

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

@snbianco snbianco marked this pull request as ready for review May 15, 2025 19:29
@snbianco snbianco requested a review from bsipocz May 15, 2025 19:29
@bsipocz bsipocz added this to the v0.4.11 milestone Jun 5, 2025

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

All looks good. Thanks!

@bsipocz bsipocz merged commit 6cd09dd into astropy:main Jun 5, 2025
@snbianco snbianco deleted the missions-filter-lists branch December 11, 2025 15:47
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