Skip to content

Commit 8f05c60

Browse files
committed
Update workflows and documentation for version 0.2.0.9000; add quarto setup and improve error handling in tests
1 parent 18873a3 commit 8f05c60

13 files changed

Lines changed: 62 additions & 24 deletions

.github/workflows/R-CMD-check-HTML5.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ jobs:
1616
R_KEEP_PKG_SOURCE: yes
1717
_R_CHECK_RD_VALIDATE_RD2HTML_: TRUE
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020

2121
- name: Install pdflatex
2222
run: sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
2323

2424
- name: Install tidy
2525
run: sudo apt install tidy
2626

27+
- uses: quarto-dev/quarto-actions/setup@v2
28+
2729
- uses: r-lib/actions/setup-r@v2
2830
with:
2931
r-version: 'devel'

.github/workflows/R-CMD-check.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535

3636
- uses: r-lib/actions/setup-pandoc@v2
3737

38+
- uses: quarto-dev/quarto-actions/setup@v2
39+
3840
- uses: r-lib/actions/setup-r@v2
3941
with:
4042
r-version: ${{ matrix.config.r }}

.github/workflows/pkgdown.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828

2929
- uses: r-lib/actions/setup-pandoc@v2
3030

31+
- uses: quarto-dev/quarto-actions/setup@v2
32+
3133
- uses: r-lib/actions/setup-r@v2
3234
with:
3335
use-public-rspm: true

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type: software
99
license: MIT
1010
title: 'rdocdump: Dump ''R'' Package Source, Documentation, and Vignettes into One
1111
File'
12-
version: 0.2.0
12+
version: 0.2.0.9000
1313
doi: 10.32614/CRAN.package.rdocdump
1414
identifiers:
1515
- type: doi

R/set_cache_path.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#' Set `rdocdump` Cache Path in the Current R Session
22
#'
33
#' @description
4-
#' This function sets the cache path used by `rdocdump` to store temporary files
5-
#' (downloaded tar.gz archives and/or extracted directories) for the current R
6-
#' session. The cache path is stored in the option `"rdocdump.cache_path"`, which
7-
#' can be checked with `getOption("rdocdump.cache_path")`. The path is created if
8-
#' it does not exist.
4+
#' This function sets the cache path used by `rdocdump` to store temporary
5+
#' files (downloaded tar.gz archives and/or extracted directories) for the
6+
#' current R session. The cache path is stored in the option
7+
#' `"rdocdump.cache_path"`, which can be checked with
8+
#' `getOption("rdocdump.cache_path")`. The path is created if it does not
9+
#' exist.
910
#'
1011
#' @param path A `character` string specifying the directory to be used as the
1112
#' cache path.

R/to_txt.R

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@
7676
#' @export
7777
#'
7878
#' @examples
79-
#' # Extract documentation for built-in `stats` package (both docs and vignettes).
79+
#' # Extract documentation for built-in `stats` package (both docs and
80+
#' # vignettes).
8081
#' docs <- rdd_to_txt("splines")
8182
#' cat(substr(docs, 1, 500))
8283
#'
83-
#' \dontrun{
84+
#' \donttest{
8485
#' # Extract from GitHub repository
8586
#' docs <- rdd_to_txt("r-lib/rlang")
8687
#'
@@ -125,7 +126,10 @@ rdd_to_txt <- function(
125126
# Validate keep_files argument.
126127
if (!keep_files %in% c("none", "tgz", "extracted", "both")) {
127128
stop(
128-
'Invalid value for keep_files. Choose one of "none", "tgz", "extracted", "both".'
129+
paste(
130+
'Invalid value for keep_files.',
131+
'Choose one of "none", "tgz", "extracted", "both".'
132+
)
129133
)
130134
}
131135

@@ -179,7 +183,8 @@ rdd_to_txt <- function(
179183
force_fetch = force_fetch || !is.null(version),
180184
version = version,
181185
cache_path = cache_path,
182-
keep_files = "both" # make sure the files are not deleted prematurely, as rdd_to_txt will take care of that later
186+
keep_files = "both" # make sure files are not deleted prematurely,
187+
# as rdd_to_txt will take care of that later
183188
)
184189
}
185190

R/util_resolve_pkg_path.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ resolve_pkg_path <- function(
137137
) {
138138
warning(
139139
"Using a repository URL from posit.co or r-universe.dev may result ",
140-
"in pre-built binaries being downloaded instead of the package source."
140+
"in pre-built binaries being downloaded instead of the package ",
141+
"source."
141142
)
142143
}
143144

@@ -251,7 +252,9 @@ is_binary_pkg <- function(pkg_dir) {
251252
}
252253

253254
has_help_binaries <- if (dir.exists(help_dir)) {
254-
length(list.files(help_dir, pattern = "\\.(rdx|rdb)$", ignore.case = TRUE)) > 0
255+
length(
256+
list.files(help_dir, pattern = "\\.(rdx|rdb)$", ignore.case = TRUE)
257+
) > 0
255258
} else {
256259
FALSE
257260
}

R/util_resolve_remote.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ resolve_remote_pkg <- function(pkg_ref, cache_path = NULL) {
3232
# Check if remotes package is installed
3333
if (!requireNamespace("remotes", quietly = TRUE)) {
3434
stop(
35-
"The 'remotes' package is required to download from remote repositories. ",
35+
"The 'remotes' package is required to download from remote ",
36+
"repositories. ",
3637
"Please install it with: install.packages('remotes')"
3738
)
3839
}

codemeta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/e-kotov/rdocdump",
99
"issueTracker": "https://github.com/e-kotov/rdocdump/issues",
1010
"license": "https://spdx.org/licenses/MIT",
11-
"version": "0.2.0",
11+
"version": "0.2.0.9000",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",
@@ -115,7 +115,7 @@
115115
"softwareRequirements": {
116116
"SystemRequirements": null
117117
},
118-
"fileSize": "278.121KB",
118+
"fileSize": "289.194KB",
119119
"citation": [
120120
{
121121
"@type": "SoftwareSourceCode",
@@ -139,6 +139,6 @@
139139
"releaseNotes": "https://github.com/e-kotov/rdocdump/blob/main/NEWS.md",
140140
"readme": "https://github.com/e-kotov/rdocdump/blob/main/README.md",
141141
"contIntegration": ["https://github.com/e-kotov/rdocdump/actions/workflows/R-CMD-check.yaml", "https://github.com/e-kotov/rdocdump/actions?query=workflow%3Apkgcheck"],
142-
"developmentStatus": ["https://www.repostatus.org/#active", "https://lifecycle.r-lib.org/articles/stages.html#experimental"],
142+
"developmentStatus": ["https://www.repostatus.org/#active", "https://lifecycle.r-lib.org/articles/stages.html#stable"],
143143
"keywords": ["llm", "r-package", "rag", "text"]
144144
}

man/rdd_set_cache_path.Rd

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)