Fix SDSS CrossID method not working for spec data and for DR17 (photo and spec)#2258
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2258 +/- ##
==========================================
+ Coverage 62.60% 62.68% +0.07%
==========================================
Files 131 131
Lines 16784 16818 +34
==========================================
+ Hits 10508 10542 +34
Misses 6276 6276
Continue to review full report at Codecov.
|
keflavich
left a comment
There was a problem hiding this comment.
Nice! Looks good to me. Thanks for the thorough writeup.
ceb8
left a comment
There was a problem hiding this comment.
I think this looks great! Would be nice to have an added test for the new option.
|
Hello @nmcardoso! 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 2022-01-18 21:21:49 UTC |
|
Thanks @nmcardoso ! |
|
@ceb8 😀👍 |
|
The test added here were never actually worked. It wasn't picked up by CI by design as remote tests are not run in CI, but they should have been checked before the merge. I'm opening a fix separately. |
|
Actually, before doing a fix, I wonder how this ever worked for you @nmcardoso? As I actually run into the issue that the raw SQL doesn't work with the error |
|
The fixes and changelog is added for this in #2304 |
Sumary
This PR aims to fix the following errors in the
astroquery.sdss.SDSS.query_crossid_async()method:radiusparam (bcef716)Details about each fix
1. Documentation typo
Changed documentation to the right value of the default radius param
Commit: bcef716
2. Spec query for DR >= 12
Spec queries for DR >= 12 are resulting in a 500 (Internal Server Error) HTTP response
becouse the query string formed by this method is invalid when requesting columns of
SpecObj table. The query properly includes the spec columns but forgot the
JOINstatement with the SpecObj table.Commit: 777f80b
3. Photo and spec query for DR 17
Both kind of queries to the DR 17 API results in a 500 (Internal Server Error) HTTP response
becouse this API requires parameters to be sent in the request body as a payload.
Passing the parans via
dataattribute instead of theparamsattribute of thehttp client solves the issue, since previous data releases (DR >= 12) allows this approach too.
Commit: 4fb7217
Tests Results
All DR >= 12 where tested for photo and spec query.
All requests returned 200 status code and the method returned an correct
astropy.table.table.Tableinstance.Test code:
DR 12 (200 OK)
DR 13 (200 OK)
DR 14 (200 OK)
DR 15 (200 OK)
DR 16 (200 OK)
DR 17 (200 OK)