Skip to content

request_url handling of default args and other args #84

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

Closed
dshemetov opened this issue Apr 11, 2023 · 2 comments · Fixed by #81
Closed

request_url handling of default args and other args #84

dshemetov opened this issue Apr 11, 2023 · 2 comments · Fixed by #81
Labels
enhancement New feature or request P1 medium priority

Comments

@dshemetov
Copy link
Contributor

print(call) did provide "the" request_url by default before, but the problem is that the request URL changes based on what further options we provide; see the args to request_url. If you think if a better name for request-URL-with-default-args-for-request_url-but-other-arguments-baked-in, please add it!

Originally posted by @brookslogan in #81 (comment)

Ideal workflow is something like: print(call) by default pretty prints the args and the request url with all the correct arguments set. Implementation details unclear though.

@brookslogan
Copy link
Contributor

More context:

Question: what do you think of having print(call) provide the request_url by default (along with a pretty print of its params)? Or did you try this and run into a bug? It would be nice if the call pretty print was small enough to be viewable without scrolling (like a tibble preview). Maybe there's a pretty print package for lists that accomplishes that?

Originally posted by @dshemetov in #81 (comment)

cli is supposed to take care of line wrapping, which is mostly why I used it there. (R has some built-in utilities that help for line wrapping but to still get things exactly how you want them it requires some work; we have helpers for it in epiprocess but probably want to move to using cli since it's probably now a transitive Imports: rather than Suggests:.) Is there an issue with how it's formatting things for you? What list are you thinking of pretty-printing?

@dshemetov
Copy link
Contributor Author

dshemetov commented Apr 18, 2023

Oh, so the list I was thinking about was the list of all params that epidata_call object used to print, before you cleaned it up in #81. So not needed anymore. Also in #81, I modified print.epidata_call to automatically print the request_url using the classic format (I figure someone who wants to get a different format url can just call request_url with a format arg), so that will close this issue.

@dshemetov dshemetov added enhancement New feature or request P1 medium priority labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants