-
Notifications
You must be signed in to change notification settings - Fork 129
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
Close 1239: More devtools and usethis commands for R package development #1242
base: master
Are you sure you want to change the base?
Close 1239: More devtools and usethis commands for R package development #1242
Conversation
…nto jooyoungseo/issue1239
I agree that these are useful functions to have available, but I'm not sure this is the best way to implement them. If I'm not mistaken, most (or all) of these commands are independent of the current R session and should therefore better be run in a separate process, not the user's R terminal. Furthermore, users might want to customize the specific commands being run by passing arguments to the functions called. A more intuitive way to implement this behaviour would be the vscode tasks API, e.g. as follows: {
"type": "R",
"code": [
"devtools::install(quick=TRUE, upgrade=FALSE, keepSource=TRUE)"
],
"group": "build",
"problemMatcher": [],
"label": "R: Install"
} |
Thanks for the suggestions. These commands that I am adding here require interactions. For example, |
Is there a criterion that determines which one goes into the list of commands while others don't? |
In general, tasks can be interactive. To check this, you can try e.g. the following task definition (requires the github cli installed, but that can be replaced by any other interactive command). {
"type": "shell",
"label": "test",
"command": "gh repo create"
} Implementing this for R commands could be a bit more difficult, since R usually goes into non-interactive mode if you call it using e.g. |
@jooyoungseo I implemented a proof of concept for interactive R tasks in #1267. Please let me know if this works to run the tasks you have in mind. |
Thanks for the task implementation, @ManuelHentschel ! It looks good to me. However, we may want to keep |
What problem did you solve?
I have added the following commands which are frequently used for R package developpment:
devtools::dev_mode()
devtools::spell_check()
devtools::check_rhub()
devtools::check_win_devel()
devtools::release()
usethis::use_version()
usethis::use_cran_comments()
usethis::use_news_md()
usethis::use_git()
usethis::use_github()
pkgdown::build_site()
I did not use task because these commands require interaction.
(If you have)Screenshot
N/A
(If you do not have screenshot) How can I check this pull request?
In the command palette, use the following commands: