Skip to content
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

new function write_qsf(), closes #299, #302 #319

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

new function write_qsf(), closes #299, #302 #319

wants to merge 1 commit into from

Conversation

jmobrien
Copy link
Collaborator

No description provided.

@juliasilge
Copy link
Collaborator

It looks like this is ready for me to try it out, review, merge, etc. Is that right @jmobrien?

@jmobrien
Copy link
Collaborator Author

Yep. Should be ready to go as long as you agree.

Copy link
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great! 🙌 I've got just a couple of thoughts for changes.

Comment on lines +205 to +206
file = NULL,
save = TRUE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we've got a little bit of interacting arguments here between file and save. I think the best option is to make file = NULL do the same thing as the current save = FALSE. That means the default behavior (with file = NULL) would be to return the JSON content but not save it, but if someone provides a file then it will save it.

#' default), or returned as output (\code{FALSE})? Even when \code{TRUE},
#' downloaded JSON is returned invisibly.
#'
#'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an example? It would be a nice way to re-emphasize how to save as a file vs. only return the content. It will likely need to be wrapped so it doesn't execute like basically all our other examples.

@jmobrien
Copy link
Collaborator Author

Makes sense, easy enough to change. I'll add some examples, too.

url = description_url,
query = list(format = "qsf"),
as = "text",
encoding = "UTF-8" # Prevents a warning from guessing encoding
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead make encoding an argument to this function so folks can pass in the encoding they need, as outlined in #336? We can still use UTF-8 as the argument default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my reply in #336 about this--we can definitely do this if it's valuable, but I think we may have some other things to fix first before being able to properly decide on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants