Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rdev 1.10.10 #205

Merged
merged 5 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rdev
Title: R Development Tools
Version: 1.10.9
Version: 1.10.10
Authors@R:
person("John", "Benninghoff", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-6230-4742"))
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# rdev 1.10.10

* Bug fixes

# rdev 1.10.9

* Add support for single URL in DESCRIPTION
Expand Down
6 changes: 3 additions & 3 deletions R/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ use_analysis_package <- function(use_quarto = TRUE, prompt = FALSE) {
fields <- list(
repo = github_repo$repo,
description = desc::desc_get_field("Description"),
site_url = ifelse(!is.na(urls[2]), urls[1], "~"),
site_url = ifelse(!is.na(urls[2]), urls[1], "."),
repo_url = ifelse(!is.na(urls[2]), urls[2], urls[1]),
year = format(Sys.Date(), "%Y"),
author = paste(desc::desc_get_author()$given, desc::desc_get_author()$family)
Expand All @@ -604,7 +604,7 @@ use_analysis_package <- function(use_quarto = TRUE, prompt = FALSE) {
} else {
if (!fs::file_exists("pkgdown/_base.yml")) {
yaml::write_yaml(
list(url = ifelse(!is.na(urls[2]), urls[1], "~"), template = list(bootstrap = 5L)),
list(url = ifelse(!is.na(urls[2]), urls[1], "."), template = list(bootstrap = 5L)),
"pkgdown/_base.yml"
)
}
Expand Down Expand Up @@ -661,7 +661,7 @@ use_rdev_pkgdown <- function(config_file = "_pkgdown.yml", destdir = "docs") {
usethis::use_template("extra.css", save_as = "pkgdown/extra.css", package = "rdev")
pkg <- yaml::read_yaml(config_file)
urls <- desc::desc_get_urls()
pkg$url <- ifelse(!is.na(urls[2]), urls[1], "~")
pkg$url <- ifelse(!is.na(urls[2]), urls[1], ".")
# workaround for RStudio race condition
if (rlang::is_interactive()) {
writeLines(paste0("\nupdating ", config_file, "..."), sep = "")
Expand Down
15 changes: 11 additions & 4 deletions R/to_document.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,21 @@
urls <- desc::desc_get_urls()
if (length(urls) < 1) {
stop("no URL found in DESCRIPTION")
} else if (length(urls) == 1) {
# assume urls[1] is repository URL, no GitHub Pages URL
base_url <- "."
ext <- ".Rmd"

Check warning on line 148 in R/to_document.R

View check run for this annotation

Codecov / codecov/patch

R/to_document.R#L147-L148

Added lines #L147 - L148 were not covered by tests
} else {
# assume urls[1] is GitHub Pages URL, urls[2] is repository URL
base_url <- urls[1]
ext <- ".html"
}
base_url <- ifelse(!is.na(urls[2]), urls[1], "~")
# set separator to "/" only if first URL doesn't end with "/"
sep <- ifelse(endsWith(base_url, "/"), "", "/")
# add analysis to path if using Quarto
sep <- ifelse(quarto, paste0(sep, "analysis/"), sep)
# add analysis to path if using Quarto or no GitHub Pages URL
sep <- ifelse(quarto || length(urls) == 1, paste0(sep, "analysis/"), sep)
gh_url <- paste0(
base_url, sep, fs::path_ext_remove(fs::path_file(file_path)), ".html"
base_url, sep, fs::path_ext_remove(fs::path_file(file_path)), ext
)

list(title = yaml$title, url = gh_url, date = yaml$date, description = notebook[desc_line])
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ ci()
#> * creating vignettes ... OK
#> * checking for LF line-endings in source and make files and shell scripts
#> * checking for empty or unneeded directories
#> * building ‘rdev_1.10.9.tar.gz’
#> * building ‘rdev_1.10.10.tar.gz’
#>
#> ── R CMD check ─────────────────────────────────────────────────────────────────
#> * using log directory ‘/private/var/folders/vn/cw5f9gws42v9m8mdsds_zbl00000gp/T/Rtmp9PKibi/file10b015c59645a/rdev.Rcheck’
#> * using log directory ‘/private/var/folders/vn/cw5f9gws42v9m8mdsds_zbl00000gp/T/RtmpLddd7C/file16ec935d24789/rdev.Rcheck’
#> * using R version 4.4.0 (2024-04-24)
#> * using platform: aarch64-apple-darwin20
#> * R was compiled by
Expand All @@ -243,7 +243,7 @@ ci()
#> * using session charset: UTF-8
#> * using option ‘--no-manual’
#> * checking for file ‘rdev/DESCRIPTION’ ... OK
#> * this is package ‘rdev’ version ‘1.10.9
#> * this is package ‘rdev’ version ‘1.10.10
#> * package encoding: UTF-8
#> * checking package namespace information ... OK
#> * checking package dependencies ... OK
Expand Down Expand Up @@ -298,8 +298,8 @@ ci()
#> * DONE
#>
#> Status: OK
#> ── R CMD check results ─────────────────────────────────────── rdev 1.10.9 ────
#> Duration: 33.5s
#> ── R CMD check results ─────────────────────────────────────── rdev 1.10.10 ────
#> Duration: 32.8s
#>
#> 0 errors ✔ | 0 warnings ✔ | 0 notes ✔
```
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/TODO.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/analysis-package-layout.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/rdev.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/style-guide.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ articles:
analysis-package-layout: analysis-package-layout.html
rdev: rdev.html
style-guide: style-guide.html
last_built: 2024-05-08T19:30Z
last_built: 2024-05-08T21:05Z
urls:
reference: https://jabenninghoff.github.io/rdev/reference
article: https://jabenninghoff.github.io/rdev/articles
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/build_analysis_site.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/build_quarto_site.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/build_rdev_site.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/check_renv.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/ci.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/create_github_repo.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/deps_check.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/get_license.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/get_release.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/html_url_check.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading