-
Notifications
You must be signed in to change notification settings - Fork 289
Add create_quarto_project()
#2045
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
base: main
Are you sure you want to change the base?
Conversation
Do not claim that `create_quarto_project()` works inside an existing project
#' * `create_project()` creates a non-package project, i.e. a data analysis | ||
#' project | ||
#' project. | ||
#' * `r lifecycle::badge("experimental")` `create_quarto_project()` creates a |
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'm marking this as experimental because, e.g., the behaviour when called inside an existing project is not so nice (mostly a limitation rooted in the quarto cli when called like this). I've also exposed the bare minimum of arguments. I want to make it clear that this might very well need some refinement.
#' If `FALSE`, the goal is to ensure that the directory can be recognized as | ||
#' a project by, for example, the [here](https://here.r-lib.org) package. If | ||
#' the project is neither an R package nor a Quarto project, a sentinel | ||
#' `.here` file is placed to mark the project root. |
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.
This is mildly aspirational. I have only recently added rprojroot::is_quarto_project
to usethis's project-finding criteria and I have a PR in flight to have the here package do the same: r-lib/here#130. But I think this will hopefully be true soon anough.
#' project. | ||
#' * `r lifecycle::badge("experimental")` `create_quarto_project()` creates a | ||
#' Quarto project. It is a simplified convenience wrapper around | ||
#' `quarto::quarto_create_project()`, which you should call directly for |
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't actually link to quarto::quarto_create_project()
because quarto is only in Suggests
.
@focardozom Will you take this for a test drive and see if it feels right? |
- a `_quarto.yml` file, typical of a Quarto project | ||
- an `renv.lock` file, which renv creates | ||
|
||
* `create_quarto_project()` is a new experimental function that combines basic | ||
usage of `quarto::quarto_create_project()` with some of the niceties of |
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 think putting quarto::quarto_create_project()
inside the usethis::create_*()
envelope is the main contribution here. E.g. challenging a project-within-a-project and opening / switching to the newly created Quarto project.
create_quarto_project()
Closes #1891
This PR evolved into making this more like the otherquarto::quarto_create_project()
does not set a new directory; it only creates a folder containing the_qmd
and.qmd
files. I’m not sure ifusethis
should be used to set the new directory and restar the session as increate_project()
.create_*()
functions.