-
-
Notifications
You must be signed in to change notification settings - Fork 412
ENH: returning (Q)Table for Alma.query_sia #3261
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -464,7 +464,9 @@ def test_sia(): | |
sia_mock = Mock() | ||
empty_result = Table.read(os.path.join(DATA_DIR, 'alma-empty.txt'), | ||
format='ascii') | ||
sia_mock.search.return_value = Mock(table=empty_result) | ||
mock_result = Mock() | ||
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. To be backwards compatible, this should work without any changes. 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. Yeap, it will all be backwards incompatible as the whole point was to not return pyvo objects but tables. 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. OTOH, I expect the only change users need to do is to drop their own 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. But it's a rather abrupt change. We could use the |
||
mock_result.to_table.return_value = empty_result | ||
sia_mock.search.return_value = mock_result | ||
alma = Alma() | ||
alma._get_dataarchive_url = Mock() | ||
alma._sia = sia_mock | ||
|
@@ -477,7 +479,7 @@ def test_sia(): | |
target_name='J0423-013', | ||
publisher_did='ADS/JAO.ALMA#2013.1.00546.S', | ||
exptime=25) | ||
assert len(result.table) == 0 | ||
assert len(result) == 0 | ||
assert_called_with(sia_mock.search, calib_level=[0, 1], | ||
band=(300, 400), data_type='cube', | ||
pos='CIRCLE 1 2 1', | ||
|
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.
This will make it backwards compatible.