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

dynutils v1.0.6 #33

Merged
merged 12 commits into from Mar 22, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Expand Up @@ -10,3 +10,4 @@
^vignettes/.*\.md$
^vignettes/.*/.*\.png$
^LICENSE\.md$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
@@ -0,0 +1 @@
*.html
83 changes: 83 additions & 0 deletions .github/workflows/R-CMD-check.yml
@@ -0,0 +1,83 @@
on:
push:
branches:
- master
- devel
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * 1"

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: windows-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: ubuntu-16.04, r: '3.6', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: 'release', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

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

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

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

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

54 changes: 54 additions & 0 deletions .github/workflows/test_coverage.yml
@@ -0,0 +1,54 @@
on:
push:
branches:
- master
- devel
pull_request:
branches:
- master

name: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ubuntu-r-release-${{ hashFiles('depends.Rds') }}
restore-keys: ubuntu-r-release-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('rcannood/sysreqs')"
sysreqs=$(Rscript -e "pkgs <- unique(c(sysreqs:::get_cran_sysreqs(sysreqs:::get_cran_deps('covr')), sysreqs::sysreqs('DESCRIPTION'))); cat(sysreqs:::sysreq_commands_pkgs(pkgs))")
sudo -s eval "$sysreqs"

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}

15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: dynutils
Type: Package
Title: Common Functionality for the 'dynverse' Packages
Version: 1.0.5
Version: 1.0.6
Authors@R: c(
person(
"Robrecht",
Expand All @@ -26,7 +26,7 @@ License: MIT + file LICENSE
URL: https://github.com/dynverse/dynutils
BugReports: https://github.com/dynverse/dynutils/issues
LazyData: TRUE
RoxygenNote: 7.0.2
RoxygenNote: 7.1.1
Depends:
R (>= 3.0.0)
Imports:
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -62,6 +62,7 @@ importFrom(assertthat,assert_that)
importFrom(crayon,bold)
importFrom(crayon,green)
importFrom(crayon,red)
importFrom(desc,desc)
importFrom(dplyr,enquo)
importFrom(dplyr,n)
importFrom(dplyr,slice)
Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
@@ -1,4 +1,10 @@
# dynutils 1.0.5
# dynutils 1.0.6

* MINOR CHANGE `calculate_distance()`: Allow for many more distance measures.

* BUG FIX: Import `desc::desc()` where needed.

# dynutils 1.0.5 (2020-02-21)

* BUG FIX `install_packages()`: will not try to install packages when the session is not interactive.

Expand Down
5 changes: 4 additions & 1 deletion R/calculate_distance.R
Expand Up @@ -25,7 +25,8 @@
calculate_distance <- function(
x,
y = NULL,
method = c("pearson", "spearman", "cosine", "euclidean", "manhattan"),
method = c("pearson", "spearman", "cosine", "euclidean", "chisquared",
"hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski"),
margin = 1
) {
method <- match.arg(method)
Expand Down Expand Up @@ -149,11 +150,13 @@ list_similarity_methods <- function() eval(formals(calculate_similarity)$method)
#' @export
#' @rdname deprecated
euclidean_distance <- function(x, y = NULL) {
.Deprecated("calculate_distance")
as.matrix(calculate_distance(x, y, method = "euclidean"))
}

#' @export
#' @rdname deprecated
correlation_distance <- function(x, y = NULL) {
.Deprecated("calculate_distance")
as.matrix(calculate_distance(x, y, method = "spearman"))
}
1 change: 1 addition & 0 deletions R/development.R
Expand Up @@ -37,6 +37,7 @@ switch_devel <- function(file = "DESCRIPTION", desc = desc::desc(file = file)) {
#' @export
#' @rdname switch_devel
#' @importFrom stringr str_replace_all str_subset str_detect
#' @importFrom desc desc
switch_master <- function(file = "DESCRIPTION", desc = desc::desc(file = file)) {
# set version to 9000
version <- as.character(desc$get_version())
Expand Down
22 changes: 8 additions & 14 deletions README.md
Expand Up @@ -21,27 +21,21 @@ check out [dynverse.org](https://dynverse.org).
## Latest changes

Check out `news(package = "dynutils")` or [NEWS.md](NEWS.md) for a full
list of
changes.
list of changes.

<!-- This section gets automatically generated from inst/NEWS.md, and also generates inst/NEWS -->

### Recent changes in dynutils 1.0.5
### Recent changes in dynutils 1.0.6

- BUG FIX `install_packages()`: will not try to install packages when
the session is not interactive.

- LICENSE: Change to MIT.
- MINOR CHANGE `calculate_distance()`: Allow for many more distance
measures.

### Recent changes in dynutils 1.0.4 (2019-10-03)
### Recent changes in dynutils 1.0.5 (2020-02-21)

- BUG FIX `recent_news()`: do not prepend subsections.

- BUG FIX `switch_cran()`: add missing version variable.
- BUG FIX `install_packages()`: will not try to install packages when
the session is not interactive.

- REMOVAL `update_news()` remove this function as R 3.6 natively
supports markdown news
format.
- LICENSE: Change to MIT.

## Dynverse dependencies

Expand Down
42 changes: 0 additions & 42 deletions appveyor.yml

This file was deleted.

33 changes: 18 additions & 15 deletions cran-comments.md
@@ -1,8 +1,8 @@
# dynutils 1.0.5
# dynutils 1.0.6

* BUG FIX `install_packages()`: will not try to install packages when the session is not interactive.
* LICENSE: Change to MIT.
* MINOR CHANGE `calculate_distance()`: Allow for many more distance measures.

* BUG FIX: Import `desc::desc()` where needed.

## Test environments
* local Fedora 31 installation, R 3.6.2
Expand All @@ -26,21 +26,24 @@ 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(60, units = "mins"), num_workers = 8)
── INSTALL ─────────────────────────────────────────────────────── 2 versions ──
> revdepcheck::revdep_check(timeout = as.difftime(600, units = "mins"), num_workers = 30)
── INIT ────────────────────────────────────────────────────────────────────────
── INSTALL ─────────────────────────────────────────────────────────────────────
Installing CRAN version of dynutils
also installing the dependencies ‘cli’, ‘utf8’, ‘R6’, ‘rprojroot’, ‘ellipsis’, ‘generics’, ‘lifecycle’, ‘rlang’, ‘tidyselect’, ‘vctrs’, ‘RcppParallel’, ‘RcppArmadillo’, ‘fansi’, ‘pillar’, ‘pkgconfig’, ‘assertthat’, ‘crayon’, ‘desc’, ‘dplyr’, ‘proxyC’, ‘purrr’, ‘Rcpp’, ‘remotes’, ‘tibble’

Installing DEV version of dynutils
Installing 30 packages: assertthat, crayon, desc, dplyr, magrittr, proxyC, purrr, Rcpp, remotes, stringr, tibble, backports, rlang, cli, fansi, pillar, pkgconfig, glue, utf8, vctrs, ellipsis, digest, R6, rprojroot, tidyselect, BH, plogr, RcppParallel, RcppArmadillo, stringi
── CHECK ───────────────────────────────────────────────────────── 6 packages ──
babelwhale 1.0.1 ── E: 1 | W: 0 | N: 0
lmds 0.1.0 ── E: 0 | W: 0 | N: 1
✔ GillespieSSA2 0.2.5 ── E: 0 | W: 0 | N: 1
✔ dynparam 1.0.0 ── E: 0 | W: 0 | N: 1
I SCORPIUS 1.0.5 ── E: 1 | W: 0 | N: 0
✔ dynwrap 1.1.4 ── E: 1 | W: 0 | N: 0
Installing 26 packages: digest, assertthat, vctrs, utf8, rlang, lifecycle, fansi, ellipsis, crayon, cli, Rcpp, magrittr, purrr, pkgconfig, pillar, RcppArmadillo, RcppParallel, tidyselect, tibble, R6, generics, rprojroot, remotes, proxyC, dplyr, desc
── CHECK ───────────────────────────────────────────────────────────────────────
babelwhale 1.0.1 ── E: 1 | W: 0 | N: 0
lmds 0.1.0 ── E: 0 | W: 0 | N: 1
✓ dynparam 1.0.2 ── E: 0 | W: 0 | N: 0
✓ dynwrap 1.2.1 ── E: 1 | W: 0 | N: 2
✓ GillespieSSA2 0.2.7 ── E: 0 | W: 0 | N: 1
✓ SCORPIUS 1.0.7 ── E: 0 | W: 0 | N: 0
OK: 6
BROKEN: 0
Total time: 27 min
Total time: 6 min
── REPORT ──────────────────────────────────────────────────────────────────────
Writing summary to 'revdep/README.md'
Writing problems to 'revdep/problems.md'
Expand Down
3 changes: 2 additions & 1 deletion man/calculate_distance.Rd

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