diff --git a/.Rbuildignore b/.Rbuildignore index c592c34..fba6598 100755 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -11,3 +11,4 @@ ^vignettes/.*/.*\.png$ ^LICENSE\.md$ ^\.github$ +^CRAN-SUBMISSION$ diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..562fe0f --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,51 @@ +# 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: + +name: R-CMD-check.yaml + +permissions: read-all + +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: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - 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-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/R-CMD-check.yml b/.github/workflows/R-CMD-check.yml deleted file mode 100644 index 687f495..0000000 --- a/.github/workflows/R-CMD-check.yml +++ /dev/null @@ -1,58 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/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 - -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: 'devel'} - - {os: macOS-latest, r: 'release'} - - {os: macOS-latest, r: 'oldrel'} - - {os: windows-latest, r: 'devel'} - - {os: windows-latest, r: 'release'} - - {os: windows-latest, r: 'oldrel'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-latest, r: 'release'} - - {os: ubuntu-latest, r: 'oldrel-1'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-pandoc@v1 - - - uses: r-lib/actions/setup-r@v1 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v1 - with: - extra-packages: rcmdcheck - - - uses: r-lib/actions/check-r-package@v1 - - - name: Show testthat output - if: always() - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml deleted file mode 100644 index 3514f48..0000000 --- a/.github/workflows/test_coverage.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -on: [push, pull_request] - -name: test-coverage - -jobs: - test-coverage: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v1 - with: - extra-packages: covr - - - name: Test coverage - run: covr::codecov() - shell: Rscript {0} diff --git a/DESCRIPTION b/DESCRIPTION index fb5d70c..cfd6a6e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,21 +1,21 @@ Package: dynutils Type: Package Title: Common Functionality for the 'dynverse' Packages -Version: 1.0.11 +Version: 1.0.12 Authors@R: c( person( "Robrecht", "Cannoodt", email = "rcannood@gmail.com", role = c("aut", "cre"), - comment = c(ORCID = "0000-0003-3641-729X", github = "rcannood") + comment = c(ORCID = "0000-0003-3641-729X") ), person( "Wouter", "Saelens", email = "wouter.saelens@gmail.com", role = c("aut"), - comment = c(ORCID = "0000-0002-7114-6248", github = "zouter") + comment = c(ORCID = "0000-0002-7114-6248") ) ) Description: @@ -25,7 +25,7 @@ Description: License: MIT + file LICENSE URL: https://github.com/dynverse/dynutils BugReports: https://github.com/dynverse/dynutils/issues -RoxygenNote: 7.2.1 +RoxygenNote: 7.3.2 Depends: R (>= 3.0.0) Imports: diff --git a/NEWS.md b/NEWS.md index 7df6f61..3b95ad0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# dynutils 1.0.12 + +* DOCUMENTATION: Fix roxygen docs (PR #36). + # dynutils 1.0.11 * MINOR CHANGE: Always set `use_nan` to `TRUE`. Replace NaNs with 0 for `calculate_similarity()`. diff --git a/R/mapdf.R b/R/mapdf.R index 45de605..c9f5728 100644 --- a/R/mapdf.R +++ b/R/mapdf.R @@ -12,7 +12,7 @@ mapdf_fun <- function(purrrfun) { #' Apply a function to each row of a data frame #' #' The mapdf functions transform their input by applying a function to each row of a data frame and returning a vector the same length as the input. -#' These functions work a lot like purrr's [map()] functions. +#' These functions work a lot like purrr's `map()` functions. #' #' * `mapdf()` always returns a list. #' diff --git a/README.Rmd b/README.Rmd index 759b36e..debbed4 100644 --- a/README.Rmd +++ b/README.Rmd @@ -13,10 +13,10 @@ set.seed(1) # dynutils -[](https://travis-ci.org/dynverse/dynutils) -[](https://ci.appveyor.com/project/dynverse/dynutils) + + [](https://github.com/dynverse/dynutils/actions/workflows/R-CMD-check.yaml) [](https://cran.r-project.org/package=dynutils) -[](https://app.codecov.io/gh/dynverse/dynutils?branch=master) + Provides common functionality for the dynverse packages. An overview of this functionality is available using the `?dynutils` command or in the [examples vignette](https://CRAN.R-project.org/package=dynutils/vignettes/functionality.html). diff --git a/README.md b/README.md index 59df08c..2dc1b0b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,10 @@ # dynutils -[](https://travis-ci.org/dynverse/dynutils) -[](https://ci.appveyor.com/project/dynverse/dynutils) + +[](https://github.com/dynverse/dynutils/actions/workflows/R-CMD-check.yaml) [](https://cran.r-project.org/package=dynutils) -[](https://app.codecov.io/gh/dynverse/dynutils?branch=master) + Provides common functionality for the dynverse packages. An overview of this functionality is available using the `?dynutils` command or in the diff --git a/cran-comments.md b/cran-comments.md index af50994..7cb266c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,9 +1,6 @@ -# dynutils 1.0.11 +# dynutils 1.0.12 -Apologies for the quick resubmission. This version release is a bug fix for the changes -made in the previous release. - -* BUG FIX: Also pass `use_nan` from `calculate_distance()` to `calculate_similarity()`. +Fix CRAN notes. ## Test environments * local Fedora installation, R release @@ -13,7 +10,7 @@ made in the previous release. ## R CMD check results ``` -── R CMD check results ──────────────────────────────────── dynutils 1.0.11 ──── +── R CMD check results ──────────────────────────────────── dynutils 1.0.12 ──── Duration: 53.4s 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ @@ -21,25 +18,3 @@ Duration: 53.4s R CMD check succeeded ``` -## Reverse dependencies - -A reverse dependency check was run on all downstream dependencies. -(Summary at [revdep/README.md](revdep/README.md)). No new problems were found. - -``` -> revdepcheck::revdep_check(timeout = as.difftime(600, units = "mins"), num_workers = 30) -── CHECK ──────────────────────────────────────────────────────── 10 packages ── -✔ dynwrap 1.2.2 ── E: 1 | W: 0 | N: 0 -I dynfeature 1.0.0 ── E: 1 | W: 0 | N: 0 -✔ babelwhale 1.1.0 ── E: 1 | W: 0 | N: 0 -I SCORPIUS 1.0.8 ── E: 1 | W: 0 | N: 0 -✔ dynparam 1.0.2 ── E: 0 | W: 0 | N: 1 -✔ dynplot 1.1.2 ── E: 1 | W: 0 | N: 0 -✔ lmds 0.1.0 ── E: 0 | W: 0 | N: 2 -✔ dyngen 1.0.3 ── E: 1 | W: 0 | N: 0 -✔ GillespieSSA2 0.2.10 ── E: 0 | W: 0 | N: 1 -✔ dyndimred 1.0.4 ── E: 0 | W: 0 | N: 2 -OK: 10 -BROKEN: 0 -Total time: 4 min -``` diff --git a/man/add_class.Rd b/man/add_class.Rd index 8cef4b5..7001311 100644 --- a/man/add_class.Rd +++ b/man/add_class.Rd @@ -7,7 +7,7 @@ add_class(x, class) } \arguments{ -\item{x}{a \R object} +\item{x}{an \R object.} \item{class}{A character vector naming classes} } diff --git a/man/calculate_distance.Rd b/man/calculate_distance.Rd index cca54a1..b2d0cfe 100644 --- a/man/calculate_distance.Rd +++ b/man/calculate_distance.Rd @@ -44,8 +44,8 @@ indicates rows or 2 indicates columns.} similarity/distance matrix; useful when comparing corresponding rows or columns of \code{x} and \code{y}.} -\item{drop0}{if \code{TRUE}, zero values are removed regardless of -\code{min_simil} or \code{rank}.} +\item{drop0}{if \code{TRUE}, removes zero values to make the +similarity/distance matrix sparse. It has no effect when \code{dense = TRUE}.} } \description{ These matrices can be dense or sparse. diff --git a/man/dynutils.Rd b/man/dynutils.Rd index 902e907..a25a9b8 100644 --- a/man/dynutils.Rd +++ b/man/dynutils.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/package.R \docType{package} \name{dynutils} +\alias{dynutils-package} \alias{dynutils} \title{Common functionality for the dynverse packages} \description{ @@ -99,3 +100,20 @@ For more information, check out \href{https://dynverse.org}{dynverse.org}. } } +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/dynverse/dynutils} + \item Report bugs at \url{https://github.com/dynverse/dynutils/issues} +} + +} +\author{ +\strong{Maintainer}: Robrecht Cannoodt \email{rcannood@gmail.com} (\href{https://orcid.org/0000-0003-3641-729X}{ORCID}) + +Authors: +\itemize{ + \item Wouter Saelens \email{wouter.saelens@gmail.com} (\href{https://orcid.org/0000-0002-7114-6248}{ORCID}) +} + +} diff --git a/man/mapdf.Rd b/man/mapdf.Rd index 9f975be..f69cf72 100644 --- a/man/mapdf.Rd +++ b/man/mapdf.Rd @@ -37,11 +37,23 @@ walkdf(.x, .f, ...) If a function, the first argument will be the row as a list. If a formula, e.g. \code{~ .$a}, the \code{.} is a placeholder for the row as a list.} -\item{...}{Additional arguments passed on to the mapped function.} +\item{...}{Additional arguments passed on to the mapped function. + +We now generally recommend against using \code{...} to pass additional +(constant) arguments to \code{.f}. Instead use a shorthand anonymous function: + +\if{html}{\out{