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

Retrieve program number and category efficiently #1455

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

bhilbert4
Copy link
Collaborator

Resolves #1428

This PR fixes a problem where our MAST query to retrieve program numbers + categories was really inefficient, and was running into the maximum number of rows that MAST would return (even with our increased limit).

With this, get_proposals_by_category() now gets information by querying pyvo, rather than MAST itself. I have confirmed that the dictionary returned with the new function matches that from the old function (and the new function executes many times faster than the old function).

@mfixstsci this is ready for review.

@bhilbert4 bhilbert4 self-assigned this Jan 29, 2024
@pep8speaks
Copy link

Hello @bhilbert4, Thank you for submitting the Pull Request !

Line 416:13: E128 continuation line under-indented for visual indent
Line 427:17: E128 continuation line under-indented for visual indent

If you have not done so, please consult the jwql Style Guide

Copy link
Collaborator

@mfixstsci mfixstsci left a comment

Choose a reason for hiding this comment

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

Not only is the code more elegant than what I submitted, it will be more consistent. Thanks for the changes @bhilbert4

@mfixstsci mfixstsci merged commit 70ba40d into spacetelescope:develop Jan 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better way to get a list of instrument proposals and categories
3 participants