Skip to content

Accept lists for MastMissions query criteria #3319

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

Merged
merged 2 commits into from
Jun 5, 2025

Conversation

snbianco
Copy link
Contributor

@snbianco snbianco commented May 15, 2025

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
Copy link

codecov bot commented May 15, 2025

Codecov Report

Attention: 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 57 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
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.

All looks good. Thanks!

@bsipocz bsipocz merged commit 6cd09dd into astropy:main Jun 5, 2025
12 checks passed
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