Skip to content

Commit d5c3aa4

Browse files
committed
Bump to 0.2.5
- Update Readme and NEWS
1 parent 8e7c4b0 commit d5c3aa4

File tree

6 files changed

+59
-33
lines changed

6 files changed

+59
-33
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: attachment
22
Title: Deal with Dependencies
3-
Version: 0.2.4.9001
3+
Version: 0.2.5
44
Authors@R:
55
c(person(given = "Sébastien",
66
family = "Rochette",

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# attachment 0.2.4.900x
1+
# attachment 0.2.5
22
## Major changes
33

44
* add `create_renv_for_dev()` and `create_renv_for_prod()` function to create `renv.lock` file based on development project (@VincentGuyader and @statnmap).

R/att_from_rmds.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ att_from_rmd <- function(path, temp_dir = tempdir(), warn = -1,
6060
yaml <- c("\n# yaml to parse \n",
6161
paste(yaml_pkg, "\n"))
6262
cat(yaml, file = r_file, append = TRUE)
63-
att_from_rscript(r_file)
63+
res <- att_from_rscript(r_file)
64+
65+
# clean tempdir
66+
file.remove(runR)
67+
file.remove(r_file)
68+
69+
return(res)
6470
}
6571

6672
#' Get all packages called in vignettes folder

README.Rmd

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,27 @@ for (i in to_install) {
108108
}
109109
```
110110

111-
### For bookdown
111+
### For bookdown, pagedown, quarto
112112

113-
If you write a {bookdown} and want to publish it on Github using Travis for instance, you will need a DESCRIPTION file with list of dependencies just like for a package. In this case, you can use the function to description from import/suggest: `att_to_desc_from_is()`.
113+
If you write a {bookdown} and want to publish it on Github using GitHub Actions or GitLab CI for instance, you will need a DESCRIPTION file with list of dependencies just like for a package. In this case, you can use the function to description from import/suggest: `att_to_desc_from_is()`.
114114

115115
```{r, eval=FALSE}
116+
usethis::use_description()
116117
# bookdown Imports are in Rmds
117118
imports <- c("bookdown", attachment::att_from_rmds("."))
118119
attachment::att_to_desc_from_is(path.d = "DESCRIPTION",
119120
imports = imports, suggests = NULL)
120121
```
121122

123+
Then, install dependencies with
124+
```{r, eval=FALSE}
125+
remotes::install_deps()
126+
```
127+
122128

123129
### To list information
124-
Of course, you can also use {attachment} out of a package to list all package dependencies of R scripts using `att_from_rscripts()` or Rmd files using `att_from_rmds()`.
130+
131+
Of course, you can also use {attachment} out of a package to list all package dependencies of R scripts using `att_from_rscripts()` or Rmd/qmd files using `att_from_rmds()`.
125132
If you are running this inside a Rmd, you may need parameter `inside_rmd = TRUE`.
126133

127134
```{r, eval=TRUE}
@@ -131,17 +138,18 @@ att_from_rscripts(path = dummypackage)
131138
att_from_rmds(path = file.path(dummypackage, "vignettes"), inside_rmd = TRUE)
132139
```
133140

134-
## Vignette
141+
## Vignettes
135142

136-
Package {attachment} has a vignette to present the different functions available. There is also a recommendation to have a `dev_history.R` in the root directory of your package. (*Have a look at [dev_history.R](https://github.com/ThinkR-open/attachment/blob/main/dev/dev_history.R) in the present package*)
143+
Package {attachment} has vignettes to present the different functions available. There is also a recommendation to have a `dev_history.R` in the root directory of your package. (*Have a look at [dev_history.R](https://github.com/ThinkR-open/attachment/blob/main/dev/dev_history.R) in the present package*)
137144

138145
```{r, eval=FALSE}
139-
vignette("fill-pkg-description", package = "attachment")
146+
vignette("a-fill-pkg-description", package = "attachment")
147+
vignette("b-bookdown-and-scripts", package = "attachment")
148+
vignette("use_renv", package = "attachment")
140149
```
141150

142-
The vignette is available on the {pkgdown} page: <https://thinkr-open.github.io/attachment/articles/fill-pkg-description.html>
151+
The vignettes are available on the {pkgdown} page, in the "Articles" menu: <https://thinkr-open.github.io/attachment/>
143152

144-
See full documentation realized using {pkgdown} at <https://thinkr-open.github.io/attachment/>
145153

146154
## Code of Conduct
147155

README.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ dummypackage <- file.path(tmpdir, "dummypackage")
8585
# browseURL(dummypackage)
8686
att_amend_desc(path = dummypackage, inside_rmd = TRUE)
8787
#> Updating dummypackage documentation
88-
#> Updating roxygen version in /tmp/RtmpdAJaCu/dummypackage/DESCRIPTION
88+
#> Updating roxygen version in /tmp/RtmpK2L9Ud/dummypackage/DESCRIPTION
8989
#> ℹ Loading dummypackage
9090
#> Writing NAMESPACE
9191
#> Writing NAMESPACE
9292
#> Package(s) Rcpp is(are) in category 'LinkingTo'. Check your Description file to be sure it is really what you want.
9393
#> [-] 1 package(s) removed: utils.
94-
#> [+] 2 package(s) added: stats, ggplot2.
94+
#> [+] 2 package(s) added: stats, glue.
9595
```
9696

9797
### For installation
@@ -130,24 +130,32 @@ for (i in to_install) {
130130
}
131131
```
132132

133-
### For bookdown
133+
### For bookdown, pagedown, quarto
134134

135-
If you write a {bookdown} and want to publish it on Github using Travis
136-
for instance, you will need a DESCRIPTION file with list of dependencies
137-
just like for a package. In this case, you can use the function to
138-
description from import/suggest: `att_to_desc_from_is()`.
135+
If you write a {bookdown} and want to publish it on Github using GitHub
136+
Actions or GitLab CI for instance, you will need a DESCRIPTION file with
137+
list of dependencies just like for a package. In this case, you can use
138+
the function to description from import/suggest:
139+
`att_to_desc_from_is()`.
139140

140141
``` r
142+
usethis::use_description()
141143
# bookdown Imports are in Rmds
142144
imports <- c("bookdown", attachment::att_from_rmds("."))
143145
attachment::att_to_desc_from_is(path.d = "DESCRIPTION",
144146
imports = imports, suggests = NULL)
145147
```
146148

149+
Then, install dependencies with
150+
151+
``` r
152+
remotes::install_deps()
153+
```
154+
147155
### To list information
148156

149157
Of course, you can also use {attachment} out of a package to list all
150-
package dependencies of R scripts using `att_from_rscripts()` or Rmd
158+
package dependencies of R scripts using `att_from_rscripts()` or Rmd/qmd
151159
files using `att_from_rmds()`.
152160
If you are running this inside a Rmd, you may need parameter
153161
`inside_rmd = TRUE`.
@@ -158,26 +166,25 @@ dummypackage <- system.file("dummypackage", package = "attachment")
158166
att_from_rscripts(path = dummypackage)
159167
#> [1] "stats" "testthat" "dummypackage"
160168
att_from_rmds(path = file.path(dummypackage, "vignettes"), inside_rmd = TRUE)
161-
#> [1] "knitr" "rmarkdown" "ggplot2"
169+
#> [1] "knitr" "rmarkdown" "glue"
162170
```
163171

164-
## Vignette
172+
## Vignettes
165173

166-
Package {attachment} has a vignette to present the different functions
174+
Package {attachment} has vignettes to present the different functions
167175
available. There is also a recommendation to have a `dev_history.R` in
168176
the root directory of your package. (*Have a look at
169-
[dev\_history.R](https://github.com/ThinkR-open/attachment/blob/main/dev/dev_history.R)
177+
[dev_history.R](https://github.com/ThinkR-open/attachment/blob/main/dev/dev_history.R)
170178
in the present package*)
171179

172180
``` r
173-
vignette("fill-pkg-description", package = "attachment")
181+
vignette("a-fill-pkg-description", package = "attachment")
182+
vignette("b-bookdown-and-scripts", package = "attachment")
183+
vignette("use_renv", package = "attachment")
174184
```
175185

176-
The vignette is available on the {pkgdown} page:
177-
<https://thinkr-open.github.io/attachment/articles/fill-pkg-description.html>
178-
179-
See full documentation realized using {pkgdown} at
180-
<https://thinkr-open.github.io/attachment/>
186+
The vignettes are available on the {pkgdown} page, in the “Articles”
187+
menu: <https://thinkr-open.github.io/attachment/>
181188

182189
## Code of Conduct
183190

dev/dev_history.R

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"))
111111

112112
# Check content
113113
# remotes::install_github("ThinkR-open/checkhelper")
114-
checkhelper::find_missing_tags()
114+
out <- checkhelper::find_missing_tags()
115+
View(out)
115116

116117
# Check spelling
117118
# usethis::use_spell_check()
@@ -137,6 +138,7 @@ aa
137138
# _win devel
138139
devtools::check_win_devel()
139140
devtools::check_win_release()
141+
devtools::check_mac_release()
140142

141143
# Check reverse dependencies
142144
# remotes::install_github("r-lib/revdepcheck")
@@ -146,14 +148,17 @@ usethis::use_build_ignore("revdep/")
146148
devtools::revdep()
147149
library(revdepcheck)
148150
# In another session
151+
revdepcheck::revdep_todo()
152+
# revdepcheck::revdep_add(packages = "fusen")
149153
id <- rstudioapi::terminalExecute("Rscript -e 'revdepcheck::revdep_check(num_workers = 4)'")
150154
rstudioapi::terminalKill(id)
151155
# See outputs
152-
revdep_details(revdep = "pkg")
153-
revdep_summary() # table of results by package
156+
revdep_details(revdep = "fusen")
157+
revdep_summary()
158+
# table of results by package
154159
revdep_report() # in revdep/
155160
# Clean up when on CRAN
156-
revdep_reset()
161+
revdepcheck::revdep_reset()
157162

158163
# Update NEWS
159164
# Bump version manually and add list of changes

0 commit comments

Comments
 (0)