-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
Vectorize HEASARC object queries #3013
base: main
Are you sure you want to change the base?
Conversation
Hello @nkphysics! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2024-05-27 21:40:54 UTC |
b4bacb3
to
7824d3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. This is a very simple improvement, and it's nice that HEASARC supports this.
object_name : str | ||
Object to query around. To set search radius use the 'radius' | ||
object_name : str or iterable | ||
Objects to query around. To set search radius use the 'radius' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you specify what the iterable is here? i.e., the iterable must be an iterable (list, tuple, ...) of strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do. I tested with lists and tuples, but should work with any iterable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the wording here to object_name : str or iterable (list or tuple) of strings
556943b
to
4cfb9c2
Compare
# Assert that there are indeed numerous tables from ISDC | ||
# Qunatity of tables could change due to breakdown of the descriptions | ||
# Accessing via isdc returns only Integral related tables from HEASARC | ||
assert len(missions) >= 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this change to test_mission_list
since it wasn't passing and the previous comment was inaccurate. In short, accessing heasarc from isdc will just return stuff related to the integral mission. The 5 tables that were expected before have now grown to 8 since some have been added with proposal and description info.
I just followed the lead of the heasarc remote tests and just asserted that as long as we are getting multiple tables (from what was previously seen), that should be ok.
Lmk if there's anything else yall are looking for with this. Thanks! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would push back on this as suggest closing the PR without merging, and maybe revisit the issue once the complete rewrite of the module have been merged. For more see #2997
Howdy all, been a while since I last contributed.
I've been sitting on this PR for a little while and figured its better late than never to contribute it. It refactors Heasarc.query_object_async()'s object arg to accept iterables of multiple objects (see example below). I think its a step in the right direction of what #682 is all about, but looking at recent PRs it might conflict with #2997.
The changes here are small and something similar could certainly be applied to region queries and maybe the mission fields too, but more discussion might be needed for the mission fields since the table columns don't always match which could make responses messy.
Idk if the changes in this PR is something we're still interested in, but if so here's a small start.