-
-
Notifications
You must be signed in to change notification settings - Fork 425
Added get_query_payload kwarg to skyview
#3318
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
Added get_query_payload kwarg to skyview
#3318
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3318 +/- ##
==========================================
- Coverage 69.88% 69.87% -0.01%
==========================================
Files 232 232
Lines 19761 19769 +8
==========================================
+ Hits 13810 13814 +4
- Misses 5951 5955 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bsipocz
left a comment
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.
There are bunch of superflous kwargs added, otherwise this PR looks good.
It would be nice to add a test though.
| show_progress=show_progress) | ||
| height=height, width=width, cache=cache, | ||
| get_query_payload=get_query_payload) | ||
| if get_query_payload: |
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.
The code is now a bit confusing as the return from e.g. get_image_list is now not URLs any more, but felt back a couple layers down as is the payload from above. I mean it kind of follows what the other modules do, so I'll go ahead and merge it, but it may be a place for some future cleanup work to make it more obvious at first read.
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 can take a look at changing this in a future PR.
I have the same feeling about it being confusing. Its my understanding though that the xternal request needs to be made in order to get the list of urls.
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.
Yeah, I did a quick review of this earlier and was also confused, but if the query needs to be made to get the URLs, I get it.... just, the original intent was for get_query_payload to return only those components of the query generated locally, since _async would naturally include the payload sent to the server. I can see a need for an exception here, though.
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.
Oh, I'm sorry I made this even more confusing. As I see the code will indeed and correctly return the payload without sending it to the server. The confusing part is only coming from the naming of the variables as they will be e.g. URLs in normal mode, but the payload when the kwarg is passed along. I suspect the rest of the codebase has some level of this confusion bubbling up, so let's indeed table this for now.
0ad8555 to
89d801e
Compare
89d801e to
8d3320d
Compare
|
I've gone ahead and made the following changes from the other comments and code review:
The returned payload using |
bsipocz
left a comment
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.
Thanks @nkphysics, and extra thanks for the clean commit history!
Hi yall!
This is a small PR, but I added in the
get_query_payloadkwarg to SkyView.Long story short, I was trying to do some debugging and noticed the kwarg wasn't there and found #2040.
I looked through and didn't see testing for other services/catalogs/archives that used
get_query_payloadso I didn't add any but I can if you would like. With the changes I made I used the kwarg in the examples to debug and it helped me out.There's a couple of places where
if get_query_payload:seems kinda redundant, but I ended up needing them to get this working. Let me know if you want me to find a workaround to clean this up a bit.