Add argument ask_special_io to enable skipping user input prompt#334
Open
pot-belly-mole wants to merge 1 commit into
Open
Add argument ask_special_io to enable skipping user input prompt#334pot-belly-mole wants to merge 1 commit into
pot-belly-mole wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When requesting one of the input-output tables, like "naio_10_cp1750", in an interactive R session, one currently receives a prompt for user input: "The requested product id is a special input-output matrix. To keep the matrix structure for further use, download it with iotables::iotables_download(). The iotables package is an extension for such cases to the eurostat package. Do you want to stop downloading now? [y/n]"
It was not possible to skip this prompt in an interactive session, which causes issues when used eg. in a pipeline with
targetspackage. Also, there is no (good) way to fake a non-interactive session or otherwise fake input toreadline.This pull request addresses that issue by introducing a new argument
ask_special_iotoget_eurostat_json, which enables to skip the prompt, if given the valueFALSE.Open questions:
get_eurostatI would be fine with this solution that enables skipping the prompt by using the lower level
get_eurostat_jsonfunction, but of course it could be exposed to the general function as well.