Skip to content

Commit c0cb0c1

Browse files
committed
rename build_html_mans to build_dbs
1 parent 25dae8a commit c0cb0c1

File tree

4 files changed

+10
-78
lines changed

4 files changed

+10
-78
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ Maintainer: Bioconductor Package Maintainer <[email protected]>
1919
Depends: R (>= 3.6.0)
2020
Imports: Biobase, graph (>= 1.9.26), methods, RBGL (>= 1.13.5), tools,
2121
utils, XML, RCurl, RUnit, BiocManager
22-
Suggests: BiocGenerics, knitr, commonmark, BiocStyle
22+
Suggests: BiocGenerics, BiocPkgTools, knitr, commonmark, BiocStyle
2323
Collate: AllClasses.R AllGenerics.R as-methods.R htmlDoc-methods.R
2424
htmlFilename-methods.R htmlValue-methods.R show-methods.R
2525
getPackNames.R packageDetails.R pump.R repository.R showvoc.R
2626
getPackageNEWS.R validation_tests.R recommendBiocViews.R
27-
dump_concept.R build_html_mans.R
27+
dump_concept.R build_dbs.R
2828
VignetteBuilder: knitr
2929
RoxygenNote: 7.3.2
3030
Encoding: UTF-8

NAMESPACE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ exportMethods("coerce", "show", "htmlDoc", "htmlValue", "htmlFilename")
3939

4040
export("writeBiocViews", "getBiocViews", "write_VIEWS", "write_REPOSITORY",
4141
"genReposControlFiles", "extractVignettes", "extractManuals",
42-
## html manual functions
43-
"build_db_from_source", "build_meta_aliases_db",
44-
"build_meta_rdxrefs_db", "build_html_mans",
42+
## build db functions
43+
"build_db_from_source", "build_meta_aliases_db", "build_meta_rdxrefs_db",
4544
##
4645
"extractCitations", "getCurrentbiocViews",
4746
"extractNEWS", "extractHTMLDocuments", "extractTopLevelFiles",

R/build_html_mans.R renamed to R/build_dbs.R

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
#' @name html-manuals
1+
#' @name build-dbs
32
#'
43
#' @title Helper functions to generate HTML pages for reference manuals
54
#'
@@ -81,7 +80,7 @@ build_db_from_source <- function(package_dir, reposRoot) {
8180
message(xtofile)
8281
}
8382

84-
#' @rdname html-manuals
83+
#' @rdname build-dbs
8584
#'
8685
#' @param web_dir `character(1)` The `web/packages` local directory that is
8786
#' also hosted on the website e.g., for CRAN
@@ -132,7 +131,7 @@ build_meta_aliases_db <-
132131

133132
is_file <- function(x) file.exists(x) && !file.info(x)[["isdir"]]
134133

135-
#' @rdname html-manuals
134+
#' @rdname build-dbs
136135
#'
137136
#' @param rdxrefs_db_file `character(1)` The file path to `rdxrefs.rds` file
138137
#' generated by the `build_db_from_source` function.
@@ -172,49 +171,3 @@ build_meta_rdxrefs_db <-
172171

173172
db[sort(names(db))]
174173
}
175-
176-
#' @rdname html-manuals
177-
#'
178-
#' @param package_dirs `character()` A vector of local source package
179-
#' directories.
180-
#'
181-
#' @examples
182-
#' if (interative()) {
183-
#' library(BiocPkgTools)
184-
#' bioc_sub <- pkgBiocDeps(
185-
#' "SummarizedExperiment", pkgType = "software",
186-
#' recursive = TRUE, only.bioc = TRUE
187-
#' )
188-
#' bioc_sub <- unlist(bioc_sub, use.names = FALSE)
189-
#'
190-
#' ## generate from Bioc package source dirs
191-
#' packages <- file.path(normalizePath("~/bioc"), bioc_sub)
192-
#' reposRoot <- "~/minibioc/packages/3.20/bioc"
193-
#'
194-
#' build_html_mans(packages, reposRoot)
195-
#' }
196-
#' @export
197-
build_html_mans <- function(package_dirs, reposRoot) {
198-
packages <- basename(package_dirs)
199-
man_dir <- file.path(reposRoot, "manuals")
200-
if (!dir.exists(man_dir)) dir.create(man_dir, recursive = TRUE)
201-
outfiles <- file.path(man_dir, packages, "man", paste0(packages, ".html"))
202-
outdirs <- dirname(outfiles)
203-
for (i in seq_along(package_dirs)) {
204-
if (!dir.exists(outdirs[i]))
205-
dir.create(outdirs[i], recursive = TRUE)
206-
tools::pkg2HTML(
207-
dir = package_dirs[i],
208-
out = outfiles[i],
209-
hooks = list(
210-
pkg_href = function(pkg) {
211-
sprintf(
212-
"../../%s/man/%s.html",
213-
pkg, pkg
214-
)
215-
}
216-
)
217-
)
218-
}
219-
outfiles
220-
}

man/html-manuals.Rd renamed to man/build-dbs.Rd

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

0 commit comments

Comments
 (0)