-
Notifications
You must be signed in to change notification settings - Fork 2
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
create_project() #71
create_project() #71
Conversation
…project with pre-populated files
…so changed example lib load
…creation message.
Thanks! To answer your points:
|
…ackages, also included new var to delete project if unsuccessful creation
…nore to ignore tests folder. Improving opening message in .Rprofile.
All looks good @JT-39, happy for this to get merged in once a couple of small last bits have been tidied:
Once the above is done, assuming the CI checks all pass I'll approve, and once merged I'll release the GitHub version to match. I've also raised #76 to cover the vignette separately, if that goes in before anything else, it can go in as a patch update so would then be v0.4.1 (though we can agree this on the PR at the time it's ready) |
Think this has all been done now! 😀 There are conflicts but from the update of the DESCRIPTION and NEWS file due to the increment in version, assume this is fine? |
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.
Happy to approve! Raised #77 to look more into the linting as it shouldn't affect usage so we can deal with it separately
Brief overview of changes
Two main files have been added to create the new function
create_project()
.R/create_project.R
inst/rstudio/templates/project/create_project.dcf
The first includes the function to create and populate a new R project. It includes several files and folders by default such as
_analysis/analysis.qmd
, arenv.lock
andtests/
. There are options that allow one to alter the structure of the project (for example for package development or a publication pipeline).The second file provides the binding to create a GUI option to create the R project. This appear when one clicks the "New project" at the top right of the RStudio IDE.
Why are these changes being made?
These changes are being made as the solution for the issue - Pre-populated project template #70
Detailed description of changes
R/create_project.R
added which is the main function to create the pre-populated project.inst/rstudio/templates/project/create_project.dcf
which builds the GUI to start the project.DESCRIPTION
file to facilitatecreate_project()
.{renv}
is not installed.devtools::check()
has been re-run, creating thecreate_project()
vignette.Additional information for reviewers
A set of tests have been added, however these are not exhaustive and could include more.
Currently the
init_renv
parameter of the function is set to TRUE as default. This initiates{renv}
in the created project, which is best practice. However, therenv.lock
is setup to record several packages ({rmarkdown}
,{testthat}
,{renv}
,{stringr}
). There is a minor issue that these packages are not installed in the new project and so the message appears:"- None of the packages recorded in the lockfile are currently installed."
This can be rectified by executing
renv::restore()
which will install those packages. These packages are needed to create the tests and run the Quarto file. They could be reviewed. Potentially theinit_renv
is set toFALSE
so it is more optional but I think promoting{renv}
is best practice.More documentation will be necessary to describe and explain how the function work, especially the above.
The actual structure of the project created should also be reviewed, especially for the publication project pipeline option (I have just guessed this and assume there is an existing project template which would go better there).
Issue ticket number/s and link
Pre-populated project template #70