Skip to content

Commit

Permalink
change version used to trigger deprecation error
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrue committed Jun 26, 2024
1 parent 7025429 commit aa520b4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: velociraptor
Title: Toolkit for Single-Cell Velocity
Version: 1.14.2
Date: 2024-06-18
Version: 1.14.3
Date: 2024-06-26
Authors@R: c(person("Kevin", "Rue-Albrecht", role = c("aut", "cre"), email = "kevinrue67@gmail.com", comment = c(ORCID = "0000-0003-3899-3872")),
person("Aaron", "Lun", role="aut", email="infinite.monkeys.with.keyboards@gmail.com", comment = c(ORCID = '0000-0002-3564-4813')),
person("Charlotte", "Soneson", role="aut", email="charlottesoneson@gmail.com", comment = c(ORCID = '0000-0003-3833-2169')),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# velociraptor 1.14.3

* Set scvelo version triggering deprecation error to `0.3.1`.

# velociraptor 1.14.2

* Revert environment for Linux to the one of Bioconductor release 3.18.
Expand Down
12 changes: 9 additions & 3 deletions R/scvelo.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,19 @@ NULL
# Less elegant but faster than `listPackages(velo.env)`
scvelo_version <- package_version(gsub("scvelo==", "", grep("scvelo==", velo.env@packages, value = TRUE)))

if (scvelo_version >= package_version("0.4.0")) {
if (scvelo_version >= package_version("0.3.1")) {
if (!is.null(scvelo.params$moments)) {
if (!is.null(scvelo.params$moments$n_neighbors)) {
stop("scvelo.params$moments$n_neighbors is deprecated since scvelo==0.4.0; use scvelo.params$neighbors$n_neighbors instead")
stop(paste0(
"scvelo.params$moments$n_neighbors is deprecated; use scvelo.params$neighbors$n_neighbors instead.","\n",
" See <https://github.com/theislab/scvelo/issues/1212#issuecomment-1979120563> for details."
))
}
if (!is.null(scvelo.params$moments$n_pcs)) {
stop("scvelo.params$moments$n_pcs is deprecated since scvelo==0.4.0; use scvelo.params$neighbors$n_pcs instead")
stop(paste0(
"scvelo.params$moments$n_pcs is deprecated since scvelo==0.4.0; use scvelo.params$neighbors$n_pcs instead.","\n",
" See <https://github.com/theislab/scvelo/issues/1212#issuecomment-1979120563> for details."
))
}
} else {
# if unspecified, set to NULL (= None)
Expand Down

0 comments on commit aa520b4

Please sign in to comment.