Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/GitHub_Actions_CI.yaml
#	RLumBuild.BuildResults/RLumBuild-TimingExamples.0.1.7.pdf
#	RLumBuild.BuildResults/RLumBuild_0.1.6.pdf
#	RLumBuild.BuildResults/RLumBuild_0.1.6.tar.gz
  • Loading branch information
RLumSK committed Feb 12, 2024
2 parents d7b5cb5 + b83bf3f commit c12db96
Show file tree
Hide file tree
Showing 60 changed files with 347 additions and 790 deletions.
112 changes: 31 additions & 81 deletions .github/workflows/GitHub_Actions_CI.yaml
Original file line number Diff line number Diff line change
@@ -1,109 +1,59 @@
# CI GitHub Action ... adapted from usethis::use_github_actions()
on:
push:
branches:
- master
- dev_*
- devel
branches: [master, devel]

pull_request:
branches:
- master
- dev_*
- devel
branches: [master, devel]

name: GitHub Actions CI

## change if caches needs to be refreshed
env:
cache-version: v2

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'oldrel'}
- {os: ubuntu-16.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: windows-latest, r: 'devel'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel'}

- {os: windows-latest, r: 'oldrel', not_cran: 'true'}
- {os: windows-latest, r: 'release', not_cran: 'true'}
- {os: windows-latest, r: 'devel', not_cran: 'true'}
- {os: windows-2019, r: 'oldrel', not_cran: 'true'}
- {os: macos-12, r: 'release', not_cran: 'true'}
- {os: macos-11, r: 'oldrel', not_cran: 'true'}
- {os: ubuntu-latest, r: 'devel', not_cran: 'true'}
- {os: ubuntu-latest, r: 'release', not_cran: 'true'} #OK
- {os: ubuntu-latest, r: 'oldrel', not_cran: 'true'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_FORCE_SUGGESTS_: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
- name: Install jags (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install jags
- name: Install jags (macOS)
if: runner.os == 'macOS'
run: |
brew install jags
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
remotes::install_cran("covr")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
extra-packages: |
any::rcmdcheck
needs: check

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
upload-snapshots: true
40 changes: 20 additions & 20 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
Package: RLumBuild
Type: Package
Title: RLum Universe Package Building
Version: 0.1.6
Date: 2021-07-15
Version: 0.1.7
Date: 2024-02-12
Author: Sebastian Kreutzer [aut, cre] (<https://orcid.org/0000-0002-0734-2199>),
Christoph Burow [aut] (<https://orcid.org/0000-0002-5023-4046>)
Authors@R: c(
person("Sebastian", "Kreutzer", role = c("aut", "cre"), email = "sebastian.kreutzer@aber.ac.uk", comment = c(ORCID = "0000-0002-0734-2199")),
person("Sebastian", "Kreutzer", role = c("aut", "cre"), email = "sebastian.kreutzer@uni-heidelberg.de", comment = c(ORCID = "0000-0002-0734-2199")),
person("Christoph", "Burow", role = c("aut"), comment = c(ORCID = "0000-0002-5023-4046")))
Maintainer: Sebastian Kreutzer <sebastian.kreutzer@aber.ac.uk>
Maintainer: Sebastian Kreutzer <sebastian.kreutzer@uni-heidelberg.de>
Description: Build packages from the RLum-universe.
A collection of tools and scripts to unify the building of packages.
License: GPL-3
BugReports: https://github.com/R-Lum/RLumBuild/issues
URL: https://github.com/R-Lum/RLumBuild
Depends:
R (>= 4.0.0),
R (>= 4.2.0),
utils
Imports:
crayon (>= 1.4.1),
rmarkdown (>= 2.9),
cli (>= 3.0.0),
codemetar (>= 0.3.1),
devtools (>= 2.4.2),
jsonlite (>= 1.7.2),
miniCRAN (>= 0.2.14),
pander (>= 0.6.4),
pkgbuild (>= 1.2.0),
roxygen2 (>= 7.1.1),
Rcpp (>= 1.0.7),
R2HTML (>= 2.3.2),
stringi (>= 1.7.2),
stringr (>= 1.4.0),
crayon (>= 1.5.2),
rmarkdown (>= 2.25),
cli (>= 3.6.2),
codemetar (>= 0.3.5),
devtools (>= 2.4.5),
jsonlite (>= 1.8.8),
miniCRAN (>= 0.2.16),
pander (>= 0.6.5),
pkgbuild (>= 1.4.3),
roxygen2 (>= 7.3.1),
Rcpp (>= 1.0.12),
R2HTML (>= 2.3.3),
stringi (>= 1.8.3),
stringr (>= 1.5.1),
tools,
xtable (>= 1.8-4)
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
RoxygenNote: 7.3.1
53 changes: 3 additions & 50 deletions NEWS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,6 @@ header-includes:
# News for package 'RLumBuild'

## Changes in version `r RLumBuild::.get_pkg_version()` (`r Sys.Date()`)
* Add new import from the package `'jsonlite'`
* Add support to automatically update relevant information in the `.zenodo.json` file
(if such a file exists) which are: title, description and version number.
* Remove `Rplot.pdf` files eventually produced by manual `'testthat'` runs

## Changes in version 0.1.5 (2020-12-06)
* Minimum R version requirement >= 3.5.0
* Make sure that we catch all `.Rhistory` and `.RData` files in the folder
* `.Rbuildignore` knows about the zenodo

## Changes in version 0.1.4 (2020-05-25)

* Add new module to automatically update `data/datalist` if data are shipped with the package
* Add support for code meta data: https://ropensci.github.io/codemetar
* Swap order: install now comes after the outro
* `.Rbuildignore` update to exclude log-files that needed to be excluded
* Slightly improve `module_add_HowToCite()` to avoid missing whitespace between the package name and the package version
* Add `module_compactVignette()` to ensure that the PDF vignettes are not larger in size than needed

## Changes in version 0.1.3 (2019-07-31)

* Remote checks were not activated by default if `as-cran` was `TRUE`, this
led to less rigour tests.

## Changes in version 0.1.2 (2019-07-30)

### `module_add_HowToCite()`

* Silence warnings by removing the cause
* Function now creates and addiational BIB-file with all the function citations in it
* If now patter `URL` was set in the DESCRIPTION file this module did not work

## Changes in version 0.1.1 (2019-05-08)

* Add build order: NEWS and README are created after the documentation was
created, this allows customised scripts in the RMD-files and the version number
is always consistent with the number from the build.

* Update and complete documentation

* `module_add_HowToCite()` now checks the URL field in the DESCRIPTION file and double
checks this URL

* `module_add_RLumTeam()` was never working and activated; now ok.


## Changes in version 0.1.0 (2019-05-03)

* Initial version

* `module_add_HowToCite()`: remove argument defunct by `stringi`
* `module_add_HowToCite()`: exclude `-package` file from parsing
* `module_add_RLumTeam()`: exclude `-package` file from parsing
64 changes: 4 additions & 60 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,64 +7,8 @@

# News for package ‘RLumBuild’

## Changes in version 0.1.6 (2021-07-15)
## Changes in version 0.1.7 (2024-02-12)

- Add new import from the package `'jsonlite'`
- Add support to automatically update relevant information in the
`.zenodo.json` file (if such a file exists) which are: title,
description and version number.
- Remove `Rplot.pdf` files eventually produced by manual `'testthat'`
runs

## Changes in version 0.1.5 (2020-12-06)

- Minimum R version requirement >= 3.5.0
- Make sure that we catch all `.Rhistory` and `.RData` files in the
folder
- `.Rbuildignore` knows about the zenodo

## Changes in version 0.1.4 (2020-05-25)

- Add new module to automatically update `data/datalist` if data are
shipped with the package
- Add support for code meta data:
<https://ropensci.github.io/codemetar>
- Swap order: install now comes after the outro
- `.Rbuildignore` update to exclude log-files that needed to be
excluded
- Slightly improve `module_add_HowToCite()` to avoid missing
whitespace between the package name and the package version
- Add `module_compactVignette()` to ensure that the PDF vignettes are
not larger in size than needed

## Changes in version 0.1.3 (2019-07-31)

- Remote checks were not activated by default if `as-cran` was `TRUE`,
this led to less rigour tests.

## Changes in version 0.1.2 (2019-07-30)

### `module_add_HowToCite()`

- Silence warnings by removing the cause
- Function now creates and addiational BIB-file with all the function
citations in it
- If now patter `URL` was set in the DESCRIPTION file this module did
not work

## Changes in version 0.1.1 (2019-05-08)

- Add build order: NEWS and README are created after the documentation
was created, this allows customised scripts in the RMD-files and the
version number is always consistent with the number from the build.

- Update and complete documentation

- `module_add_HowToCite()` now checks the URL field in the DESCRIPTION
file and double checks this URL

- `module_add_RLumTeam()` was never working and activated; now ok.

## Changes in version 0.1.0 (2019-05-03)

- Initial version
- `module_add_HowToCite()`: remove argument defunct by `stringi`
- `module_add_HowToCite()`: exclude `-package` file from parsing
- `module_add_RLumTeam()`: exclude `-package` file from parsing
2 changes: 1 addition & 1 deletion R/build_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#'
#' @param as_cran [logical] (with default): enable/disable `--as-cran` check
#'
#' @author Sebastian Kreutzer, Geography & Earth Sciences, Aberystwyth University (United Kingdom)
#' @author Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany)
#'
#'
#' @section Function version: 0.1.0
Expand Down
2 changes: 1 addition & 1 deletion R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#'@description Helper functions which are used internally to visualise the console output.
#'Those functions are not in the overview, but are, however, documented
#'
#'@author Sebastian Kreutzer, Geography & Earth Sciences, Aberystwyth University (United Kingdom)
#'@author Sebastian Kreutzer, Institute of Geography, Heidelberg University (Germany)
#'
#'@keywords internal
#'@md
Expand Down
10 changes: 6 additions & 4 deletions R/module_add_HowToCite.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module_add_HowToCite <- function(){
str <- stringi::stri_replace_all_coll(str, pattern = "Author: ", replacement = "")
# remove all role contributions given in square brackets
str <- strtrim(str, min(unlist(gregexpr("\\[|<", str))) - 2)
# remove all leading whitespaces
# remote whitespace
str <- stringi::stri_trim(str, "left")

# get surname
Expand All @@ -79,10 +79,12 @@ module_add_HowToCite <- function(){
## -------------------------------------------------------------------------- ##
## ADD CITATION ----
## -------------------------------------------------------------------------- ##

##add citation section
file.list.man <- list.files("man/", recursive = TRUE, include.dirs = FALSE, pattern = "\\.Rd")

## remove package Rd, this causes some problems
file.list.man <- file.list.man[grepl("-package", file.list.man, fixed = TRUE)]

# build package citation
pkg.authors <- character()
author.list.authorsOnly <- author.list[which(author.list$author),]
Expand Down Expand Up @@ -115,9 +117,9 @@ module_add_HowToCite <- function(){
paste(temp.file.man[title.start:c(title.end - 1)], collapse = " ")
title <- stringi::stri_replace_all_regex(title, "\\\\title|\\{|\\}", "")
title <-
stringi::stri_replace_all_regex(title, "\\\\code", "", ignore.case = TRUE)
stringi::stri_replace_all_regex(title, "\\\\code", "")
title <-
stringi::stri_replace_all_regex(title, '"', "'", ignore.case = TRUE)
stringi::stri_replace_all_regex(title, '"', "'")

##search for start and end author field
author.start <- which(grepl("\\\\author", temp.file.man))
Expand Down
Loading

0 comments on commit c12db96

Please sign in to comment.