-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
103 lines (76 loc) · 3.5 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rdev <img src="man/figures/logo.png" align="right" alt="logo" width="120" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/jabenninghoff/rdev/workflows/R-CMD-check/badge.svg)](https://github.com/jabenninghoff/rdev/actions)
[![lint](https://github.com/jabenninghoff/rdev/workflows/lint/badge.svg)](https://github.com/jabenninghoff/rdev/actions)
[![Codecov test coverage](https://codecov.io/gh/jabenninghoff/rdev/branch/main/graph/badge.svg)](https://app.codecov.io/gh/jabenninghoff/rdev?branch=main)
<!-- badges: end -->
## Overview
**`r desc::desc_get_field("Title")`:** `r desc::desc_get_field("Description")`
Feel free to use and/or fork this project!
## Installation
You can install the development version of rdev from [GitHub](https://github.com/) with:
``` r
# install.packages("remotes")
remotes::install_github("jabenninghoff/rdev")
```
Or using renv:
``` r
# install.packages("renv")
renv::install("jabenninghoff/rdev")
```
## Development
- Changelog: See "Changelog" or `NEWS.md`.
- Planned: [TODO](TODO.md)
## Creating Packages
rdev supports creation of new R packages following rdev conventions as well as new
[R Analysis](https://jabenninghoff.github.io/rdev/articles/analysis-package-layout.html) packages.
The typical setup workflow (per `?quickstart`) is:
1. Use `available::available()` to check package name
1. With no project open, run `create_github_repo()` to initialize the GitHub R repository
1. Without committing to git, run `init()` in the newly created project
1. Manually update the Title and Description fields in the `DESCRIPTION` file without committing
1. Run `setup_analysis()` or `setup_rdev()` to configure the package as an analysis package or
rdev package respectively.
1. Update TODO.md, NEWS.md, README.Rmd, and DESCRIPTION as needed
1. Re-run `check_renv()`, `ci()` to validate package
1. Commit to git and begin development
## GitHub Releases
rdev automates the workflow for creating GitHub releases along with updating GitHub pages for either
standard R packages or R analysis packages, using the release notes format in NEWS.md. A typical
development workflow is:
1. Bump version and create new feature branch with `new_branch()`
1. *Write all the things*
1. Update the release notes for the new version in NEWS.md, following the conventions described in
`get_release()`
1. Finalize the release and merge all changes to git
1. Run `stage_release()` to create a new pull request on GitHub using details derived from NEWS.md,
including updating the README and GitHub pages
1. After the pull request has been reviewed and passes all required status checks, accept the staged
release with `merge_release()`, which merges the pull request, cleans up branches, and publishes
a new GitHub release
Feature branches *can* be merged without starting a new release; `stage_release()` just requires
that everything is committed, including new release notes in NEWS.md before running. When ready to
release, `stage_release()` will use the existing branch if on a feature branch, and create a new
release branch if on the default.
## Workflow
For my workflow, I typically check renv when I start:
```{r check_renv}
library(rdev)
check_renv()
```
I also have a `ci()` function to run all my continuous integration tests locally:
```{r ci}
ci()
```