Notes on setting up this GitHub repository, including R command history.
Create the GitHub repository from the RStudio console, with no project open: "Project: (none)"
create_github_repo( "siracon2022", repo_desc = 'Notebooks for my SiRAcon 2022 presentation, "Making R work for you (with automation!)"' )
On macOS, the automation will open the repository in GitHub Desktop, RStudio, and open the repository settings on github.com in the default browser.
Set up the package as an
R Analysis Package.
First run rdev::use_rdev_package()
to add the common package conventions I use.
The remaining commands are run from the RStudio console with the new project open: "siracon2022"
gert::git_branch_create("package-setup") gert::git_add(".") gert::git_commit("rdev::create_github_repo()") gert::git_push() rdev::use_rdev_package()
After rdev::use_rdev_package()
is run, the R Session will automatically restart after
renv::init()
completes.
To complete setup, commands are run to:
gert::git_add(".") gert::git_commit("rdev::use_rdev_package()") gert::git_push() # 1 use_analysis_package() gert::git_add(".") gert::git_commit("rdev::use_analysis_package()") gert::git_push() # 2 use_spelling() gert::git_add(".") gert::git_commit("rdev::use_spelling()") gert::git_push() # 3 fs::file_delete("tests/testthat/test-package.R") gert::git_add(".") gert::git_commit("remove obsolete test-package.R") gert::git_push() # 4 check_renv() test() ci() # 5 file.edit("TODO.md", "NEWS.md", "README.Rmd", "DESCRIPTION", ".gitignore")
Final package setup is done manually. A summary of git commits is listed in the table below.
Commit Summary
Update .gitignore Add line breaks (not automated yet)
Fix spell_check_notebooks() test Fix a bug in tests/testthat/test-spelling.R (also fixed in rdev)
renv::update() Save updated packages after running rdev::check_renv
and
renv::snapshot
Update DESCRIPTION Update Title and Description. Also add fs, purrr from README.Rmd to Suggests (also fixed in rdev).
Add SiRAcon 2022 Setup Log Notebook Added SiRAcon 2022 Setup Log Notebook
renv::update() Update rdev package (with new bug fixes)
Add siracon2022 0.1.0 release notes Add release notes for initial development release
Final setup-log updates Add final updates to setup-log.Rmd before release
Switch from HEAD to default branch renv works better with the RemoteRef in renv.lock set to the
default branch. To fix this, I ran
renv::install(c("r-lib/lintr","jabenninghoff/rdev"))
.
Since stage_release()
calls build_analysis_site()
, which currently requires at least one
notebook in the analysis directory, we add the first notebook before running the release automation
scripts:
get_release() stage_release() # validate that all pull request checks (GitHub Actions) pass merge_release()
The automation scripts automatically create the release and GitHub pages site, including the following commits:
The site can now be accessed at https://jabenninghoff.github.io/siracon2022/ !
From here, we continue development and release as needed. The first step is to create a new branch:
new_branch("analysis-updates")
Feel free to browse the commit history to see progress towards the 1.0 release prior to SiRAcon.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.