-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[r/ci] Utilize pin of tiledb-r during install (#2540)
* [r/ci] Utilize pin of tiledb-r during install Update `r-ci.yml` to respect the doublepin of tiledb-r in `DESCRIPTION`; this is accomplished by doing the following: - setting environment variable `R_REMOTES_UPGRADE` to `"never"` to prevent upgrading of dependencies in `tools/r-ci.sh install_all` - setting `tiledb-inc.r-universe.dev` as an additional repo for installing dependencies - parsing `apis/r/DESCRIPTION` to find constraints on tiledb-r - searching through all repos to find all accessible versions of tiledb-r - identifying the version of tiledb-r that matches our constraints - installing upstream dependencies of tiledb-r from all accessible repos - installing the correctly-constrained version of tiledb-r * Minor fixes * Minor fixes * [r] Suppress Warnings on SOMA -> `Seurat` Outgestion (#2539) SeuratObject v5.0.2 throws a warning when the layer requested does not exist. During SOMA -> `Seurat` outgestion, this occurs when running `SeuratObject::.CalcN` eg. ```r > obj <- query$to_seurat(X_layers = c('data' = 'data')) Warning: Layer counts isn't present in the assay object; returning NULL ``` Since the results of `.CalcN()` should already exist in the SOMA, we can disable this processing and suppress the warning * Move installation of tiledb-r into standalone R script
- Loading branch information
1 parent
d8cac0b
commit 8c7863c
Showing
5 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env Rscript | ||
|
||
options(bspm.version.check = TRUE) | ||
|
||
# Find tiledb-r constraints | ||
deps <- read.dcf('DESCRIPTION', fields = 'Imports')[1, ] | ||
deps <- trimws(strsplit(gsub(pattern = ',', replacement = '\n', x = deps), split = '\n')[[1L]]) | ||
deps <- Filter(nzchar, deps) | ||
deps <- Filter(function(x) grepl('^tiledb', x), deps) | ||
deps <- gsub(pattern = '[[:space:]]', replacement = '', x = deps) | ||
deps <- gsub(pattern = '.*\\(|\\)', replacement = '', x = deps) | ||
const <- data.frame(comp = gsub(pattern = '[[:digit:]\\.]*', replacement = '', x = deps)) | ||
const$vers <- gsub(pattern = paste(const$comp, collapse = '|'), replacement = '', x = deps) | ||
(const) | ||
|
||
# Find correct version of tiledb-r | ||
db <- utils::available.packages(filters = c("R_version", "OS_type", "subarch")) | ||
idx <- which(rownames(db) == 'tiledb') | ||
valid <- vapply( | ||
X = idx, | ||
FUN = function(i) { | ||
v <- db[i, 'Version'] | ||
res <- vector(mode = 'logical', length = nrow(const)) | ||
for (i in seq_along(res)) { | ||
res[i] <- do.call(const$comp[i], args = list(v, const$vers[i])) | ||
} | ||
return(all(res)) | ||
}, | ||
FUN.VALUE = logical(1L) | ||
) | ||
if (!any(valid)) { | ||
stop("No valid versions of tiledb-r found") | ||
} | ||
db <- db[-idx[!valid], , drop = FALSE] | ||
|
||
# Install upstream deps | ||
(ups <- tools::package_dependencies("tiledb", db = db, recursive = TRUE)$tiledb) | ||
utils::install.packages(intersect(ups, rownames(db))) | ||
|
||
# Install correct version of tiledb-r | ||
ctb <- contrib.url(getOption("repos")) | ||
names(ctb) <- getOption("repos") | ||
dbr <- db[idx[valid], 'Repository'] | ||
(repos <- names(ctb[ctb %in% dbr])) | ||
utils::install.packages("tiledb", repos = repos) |