-
-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,9 +162,10 @@ def test_mission_list(self): | |
with self.isdc_context: | ||
missions = heasarc.query_mission_list() | ||
|
||
# Assert that there are indeed a large number of tables | ||
# Number of tables could change, but should be > 900 (currently 956) | ||
assert len(missions) == 5 | ||
# 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 commentThe reason will be displayed to describe this comment to others. Learn more. I made this change to 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. |
||
|
||
def test_mission_cols(self): | ||
heasarc = Heasarc() | ||
|
@@ -184,10 +185,10 @@ def test_mission_cols(self): | |
|
||
def test_query_object_async(self): | ||
mission = 'integral_rev3_scw' | ||
object_name = '3c273' | ||
object_names = ['3c273', "Crab"] | ||
|
||
heasarc = Heasarc() | ||
response = heasarc.query_object_async(object_name, mission=mission) | ||
response = heasarc.query_object_async(object_names, mission=mission) | ||
assert response is not None | ||
assert isinstance(response, (requests.models.Response, MockResponse)) | ||
|
||
|
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