generated from r4ds/bookclub-template
-
Notifications
You must be signed in to change notification settings - Fork 18
/
22-releasing-to-cran.Rmd
138 lines (100 loc) · 3.79 KB
/
22-releasing-to-cran.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Releasing to CRAN
**Learning objectives:**
- Prepare a new package for release to CRAN.
- Prepare to update a package on CRAN.
- Release a new package to CRAN.
- Update a package on CRAN.
- Deal with CRAN failures.
- Wrap up a CRAN release.
## Preparing for 1st submission {-}
1. `usethis::use_release_issue()` (adds checklist issue to GH)
2. Polish `NEWS.md`
3. `usethis::use_cran_comments()`
4. Update installation instructions in README
5. Proofread DESCRIPTION
6. `@return` & `@examples` for all `@export`
7. `cph` in `Authors@R`
8. Check licensing
9. Review [extrachecks](https://github.com/DavisVaughan/extrachecks)
## Preparing for update {-}
1. `usethis::use_release_issue()` (adds checklist issue to GH)
2. Check current CRAN check results
3. Advance deprecation
4. Polish `NEWS.md`
5. `urlchecker::url_check()`
6. `devtools::build_readme()`
7. `revdepcheck::revdep_check(num_workers = 4)` (`usethis::use_revdep()`)
8. Update `cran-comments.md`
## Test environments {-}
- CRAN checks on Win, MacOS, Linux, Solaris, various versions
- This is now different from book!
- [R-hub v2 is faster & better](https://blog.r-hub.io/2024/04/11/rhub2/)
- Need to merge into main (or tell it which branch)
- rhub = more complete/CRAN-like checks than usual GHA
- `rhub::rhub_setup()`
- `rhub::rhub_check()`
## Check results {-}
- No `ERROR`s or `WARNING`s
- Avoid `NOTE`s where possible
- Describe in `cran-comments.md`
- 1 `NOTE` on 1st submission (in `cran-comments.md` by default)
## CRAN policies {-}
- Stable email address
- Copyright in `DESCRIPTION` file
- Reasonable efforts for all platforms
- Explicit user permission:
- Global environment
- File system
- Package installation
- Sending info over internet
- Opening other programs
- Submissions ~1/month or 1/(2 monts)
## Release {-}
- `usethis::use_version("minor")` (or maybe we did this before rhub now?)
- `devtools::release()` = does checks we already did
- `devtools::submit_cran()`
- Click link in confirmation email
## Failure {-}
- Take a deep breath
- Fix problems
- `usethis::use_version("patch")` (can't resubmit same version)
- `## Resubmission` section at top of `cran-comments.md`
- List changes since previous submission
- `devtools::submit_cran()`
Only reply to email if there is nothing to fix.
## Success! {-}
- `git push`
- `usethis::use_github_release()`
- `usethis::use_dev_version()`
- `git push`
- Finish blog post, share on social media, etc. (`#RStats`)
- Add link to blog post in pkgdown news menu
## Meeting Videos {-}
### Cohort 1 {-}
`r knitr::include_url("https://www.youtube.com/embed/isKbovi62k4")`
### Cohort 2 {-}
`r knitr::include_url("https://www.youtube.com/embed/5VAvPvL18I0")`
### Cohort 3 {-}
`r knitr::include_url("https://www.youtube.com/embed/QOKMXNn1X5o")`
<details>
<summary> Meeting chat log </summary>
```
00:48:13 Brendan Lam: I don't know what CRAN reviews, but ROpenSci is pretty transparent about how they do software review: https://devguide.ropensci.org/
01:00:06 Arun Chavan: omg
01:03:13 Brendan Lam: Thanks Collin! You've done an exceptionally good job leading this cohort.
01:05:48 Arun Chavan: https://dslcio.slack.com/archives/C0183F9UC2V/p1659977487900379
01:06:22 collinberke: https://dslcio.slack.com/archives/C0183F9UC2V/p1659977487900379
01:08:19 collinberke: https://avehtari.github.io/ROS-Examples/
01:11:12 Brendan Lam: Same
```
</details>
### Cohort 4 {-}
`r knitr::include_url("https://www.youtube.com/embed/eK1YB8Lmgws")`
<details>
<summary> Meeting chat log </summary>
```
00:15:26 Olivier Leroy: See cran.r-project.org you have the cran team
00:34:21 Toryn Schafer: https://parsnip.tidymodels.org/reference/rand_forest.html
00:47:46 Olivier Leroy: cowsay
```
</details>