Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
de43824
bump up version
harell Dec 9, 2024
5634ffc
update github action to v2
harell Dec 9, 2024
d25f054
update github aCTION
harell Dec 9, 2024
97de698
fix missing qoutes
harell Dec 9, 2024
4cc48b3
create an empty RProfile file
harell Dec 9, 2024
58127ab
fix quotes
harell Dec 9, 2024
440345c
fix quotes
harell Dec 9, 2024
f0b970f
update github actions
harell Dec 21, 2024
bf62ef1
run test on any branch
harell Dec 21, 2024
1cefa76
add testthat
harell Dec 21, 2024
509069c
install-suggests
harell Dec 21, 2024
321701f
dependencies: all
harell Dec 21, 2024
7f8972e
install R
harell Dec 21, 2024
95aed21
delete Rprofile
harell Dec 21, 2024
d192d9f
setup testthat
harell Dec 21, 2024
e57f287
all
harell Dec 21, 2024
28d8e1c
update github action
harell Dec 21, 2024
64a9a1e
run on all branchs
harell Dec 21, 2024
986bf98
remove dependency purrr
harell Dec 21, 2024
001e19c
update pkgdown articles
harell Dec 21, 2024
3bce320
addressing missing documentation warning
harell Dec 21, 2024
dc6ac27
remove warning
harell Dec 21, 2024
4f6636f
build package website
harell Dec 21, 2024
55bd739
update singleton doc
harell Dec 21, 2024
7fc0f21
update file names
harell Dec 21, 2024
09da45c
updsate docus
harell Dec 21, 2024
a9e8531
update docs
harell Dec 21, 2024
2fe07dd
drop markdown from function docs
harell Dec 22, 2024
81b4c89
update package extraneous files
harell Dec 22, 2024
cf6f38a
retrieve files
harell Dec 22, 2024
b475632
lint package
harell Dec 22, 2024
a544b85
fix file paths
harell Dec 22, 2024
2336ff7
fix path
harell Dec 22, 2024
072a1a9
updated function documentation
harell Dec 22, 2024
9441e3f
run devtools::document
harell Dec 22, 2024
9bb2baa
render docs before creating website
harell Dec 22, 2024
372410d
install roxygen2
harell Dec 22, 2024
f132871
run code coverage
harell Dec 22, 2024
c2d1fa1
install usethis
harell Dec 22, 2024
4be2d88
update file paths
harell Dec 22, 2024
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
11 changes: 3 additions & 8 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
^\..*/
^\.Rproj\.user$
.*_cache/
^\.github$
^data-raw/
^inst/snippets/
^revdep/
Expand All @@ -16,16 +17,10 @@
^CRAN-RELEASE$
^README\.Rmd$
^LICENSE\.md$
^vignettes/_common.R$
^vignettes/references.bib$

# Docker
^docker-compose\.yml$
^R/utils-DockerCompose\.R$

# pkgdown$
^docs$
^pkgdown$



# cran
^CRAN-SUBMISSION$
83 changes: 20 additions & 63 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,71 +1,22 @@
assign(".Rprofile", new.env(), envir = globalenv())

# .First ------------------------------------------------------------------
.First <- function(){
try(if(testthat::is_testing()) return())
try(readRenviron(".Renviron"), silent = TRUE)
.First <- function() {
try(if (testthat::is_testing()) {
return()
}, silent = TRUE)
if (file.exists(".Renviron")) readRenviron(".Renviron")

# Package Management System
Date <- as.character(read.dcf("DESCRIPTION", "Date"));
URL <- if(is.na(Date)) "https://cran.rstudio.com/" else paste0("https://mran.microsoft.com/snapshot/", Date)
options(repos = URL)
}

# .Last -------------------------------------------------------------------
.Last <- function(){
try(if(testthat::is_testing()) return())
try(system('docker-compose down'), silent = TRUE)
}

# Docker ------------------------------------------------------------------
.Rprofile$docker$browse_url <- function(service){
path_script <- tempfile("system-", fileext = ".R")
job_name <- paste("Testing", as.character(read.dcf('DESCRIPTION', 'Package')), "in a Docker Container")
define_service <- paste0("service = c(", paste0(paste0("'",service,"'"), collapse = ", "),")")
define_service <- if(is.null(service)) "service = NULL" else define_service
writeLines(c(
"source('./R/utils-DockerCompose.R')",
define_service,
"DockerCompose$new()$browse_url(service)"), path_script)
.Rprofile$utils$run_script(path_script, job_name)
}

.Rprofile$docker$start <- function(service = NULL){
path_script <- tempfile("system-", fileext = ".R")
job_name <- paste("Testing", as.character(read.dcf('DESCRIPTION', 'Package')), "in a Docker Container")
define_service <- paste0("service <- c(", paste0(paste0("'",service,"'"), collapse = ", "),")")
define_service <- if(is.null(service)) "service = NULL" else define_service
writeLines(c(
"source('./R/utils-DockerCompose.R')",
define_service,
"DockerCompose$new()$start(service)"), path_script)
.Rprofile$utils$run_script(path_script, job_name)
}

.Rprofile$docker$stop <- function(){
path_script <- tempfile("system-", fileext = ".R")
job_name <- paste("Testing", as.character(read.dcf('DESCRIPTION', 'Package')), "in a Docker Container")
writeLines(c("source('./R/utils-DockerCompose.R'); DockerCompose$new()$stop()"), path_script)
.Rprofile$utils$run_script(path_script, job_name)
}

.Rprofile$docker$restart <- function(service = NULL){
path_script <- tempfile("system-", fileext = ".R")
job_name <- paste("Testing", as.character(read.dcf('DESCRIPTION', 'Package')), "in a Docker Container")
define_service <- paste0("service <- c(", paste0(paste0("'",service,"'"), collapse = ", "),")")
define_service <- if(is.null(service)) "service = NULL" else define_service
writeLines(c(
"source('./R/utils-DockerCompose.R')",
define_service,
"DockerCompose$new()$restart(service)"), path_script)
.Rprofile$utils$run_script(path_script, job_name)
}

.Rprofile$docker$reset <- function(){
path_script <- tempfile("system-", fileext = ".R")
job_name <- paste("Testing", as.character(read.dcf('DESCRIPTION', 'Package')), "in a Docker Container")
writeLines(c("source('./R/utils-DockerCompose.R'); DockerCompose$new()$reset()"), path_script)
.Rprofile$utils$run_script(path_script, job_name)
# Package Management System
r_version_date <- gsub(".*\\((\\d{4}-\\d{2}-\\d{2}).*", "\\1", R.Version()$version.string)
r_package_date <- as.character(read.dcf("DESCRIPTION", "Date"))
r_cran_date <- ifelse(is.na(r_package_date), r_version_date, r_package_date)
options(repos = c(CRAN = paste0("https://packagemanager.rstudio.com/cran/", r_cran_date)))

# Options
Sys.setenv(`_R_S3_METHOD_REGISTRATION_NOTE_OVERWRITES_` = "false")
Sys.setenv(`_R_CHECK_SYSTEM_CLOCK_` = 0)
}

# pkgdown -----------------------------------------------------------------
Expand Down Expand Up @@ -124,3 +75,9 @@ assign(".Rprofile", new.env(), envir = globalenv())
invisible()
}

# .Last -------------------------------------------------------------------
.Last <- function() {
try(if (testthat::is_testing()) {
return()
})
}
8 changes: 8 additions & 0 deletions .dev/CRAN/prepare-for-release.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Sys.setenv(`_R_DEPENDS_ONLY` = "true")
remotes::install_cran(c("devtools", "urlchecker", "rhub", "revdepcheck"))
# remotes::install_github("r-lib/revdepcheck@master")

# Printing Code -----------------------------------------------------------
# Lint the package
(report = lintr::lint_package(show_progress = TRUE))
styler::style_pkg(
filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "qmd")[c(1,3)],
exclude_dirs = c("packrat", "renv", ".dev", ".git", ".github", ".Rproj.user", "docs", "inst"),
include_roxygen_examples = TRUE,
)

# Steps -------------------------------------------------------------------
# devtools::build_readme()
Expand Down
31 changes: 0 additions & 31 deletions .dev/docker/r-test/Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions .dockerignore

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
pull_request:

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Remove .Rprofile
# Delete .Rprofile if present.
run: rm -f ./.Rprofile

- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::roxygen2
needs: check

- name: Document the package
run: |
roxygen2::roxygenise()
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
98 changes: 0 additions & 98 deletions .github/workflows/R-CMD-check.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: #[main, master]
pull_request:
release:
types: [published]
workflow_dispatch:

name: pkgdown

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- name: Remove .Rprofile
# Delete .Rprofile if present.
run: rm -f ./.Rprofile

- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::pkgdown,
any::roxygen2,
any::covr,
any::usethis,
any::pkgload,
local::.,
needs: website

- name: Build site
run: |
roxygen2::roxygenise()
rmarkdown::render("README.Rmd", output_format = "md_document")
pkgload::load_all()
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
covr::codecov(type = "all")
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
Loading
Loading