Skip to content

Commit

Permalink
[r] Prepare for 1.15.0rc3 (#3257)
Browse files Browse the repository at this point in the history
* [r] Prepare for 1.15.0rc3

* backport #3252
  • Loading branch information
johnkerl authored Oct 29, 2024
1 parent e24bfe0 commit 0ddfb3c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apis/r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description: Interface for working with 'TileDB'-based Stack of Matrices,
like those commonly used for single cell data analysis. It is documented at
<https://github.com/single-cell-data>; a formal specification available is at
<https://github.com/single-cell-data/SOMA/blob/main/abstract_specification.md>.
Version: 1.14.99.6
Version: 1.14.99.7
Authors@R: c(
person(given = "Aaron", family = "Wolen",
role = c("cre", "aut"), email = "aaron@tiledb.com",
Expand Down
3 changes: 3 additions & 0 deletions apis/r/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
* Implement missing `domain` argument to `SOMADataFrame` `create` [#3032](https://github.com/single-cell-data/TileDB-SOMA/pull/3032)
* Remove unused `fragment_count` accessor [#3054](https://github.com/single-cell-data/TileDB-SOMA/pull/3054)
* Bulk-sync `main` to `release-1.15` in prep for 1.15.0rc3
* New-shape mods [#2407](https://github.com/single-cell-data/TileDB-SOMA/issues/2407)
* Run `clang-format` for C++ source and `styler::style_pkg()` for R source
* Fix context/config bug [#3252](https://github.com/single-cell-data/TileDB-SOMA/pull/3252)

# tiledbsoma 1.14.5

Expand Down
33 changes: 28 additions & 5 deletions apis/r/R/TileDBObject.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,35 @@ TileDBObject <- R6::R6Class(
private$.tiledb_platform_config <- platform_config

# Set context
tiledbsoma_ctx <- tiledbsoma_ctx %||% SOMATileDBContext$new()
if (!inherits(x = tiledbsoma_ctx, what = "SOMATileDBContext")) {
stop("'tiledbsoma_ctx' must be a SOMATileDBContext object", call. = FALSE)
if (!is.null(x = tiledbsoma_ctx)) {
if (!inherits(x = tiledbsoma_ctx, what = 'SOMATileDBContext')) {
stop(
"'tiledbsoma_ctx' must be a SOMATileDBContext object",
call. = FALSE
)
}
# TODO: Deprecate tiledbsoma_ctx in favor of soma_context
# warning("'tiledbsoma_ctx' is deprecated, use 'soma_context' instead")
# Set the old context
private$.tiledbsoma_ctx <- tiledbsoma_ctx
private$.tiledb_ctx <- self$tiledbsoma_ctx$context()
# Also plumb through to the new context
if (!is.null(soma_context)) {
warning(
"Both 'soma_context' and 'tiledbsoma_ctx' were provided,",
"using 'soma_context' only"
)
} else {
# why we named the parameter and function the same thing is beyond me
soma_context <- tiledbsoma::soma_context(
config = unlist(tiledbsoma_ctx$to_list())
)
}
} else {
tiledbsoma_ctx <- SOMATileDBContext$new()
private$.tiledbsoma_ctx <- tiledbsoma_ctx
private$.tiledb_ctx <- self$tiledbsoma_ctx$context()
}
private$.tiledbsoma_ctx <- tiledbsoma_ctx
private$.tiledb_ctx <- self$tiledbsoma_ctx$context()

# TODO: re-enable once new UX is worked out
# soma_context <- soma_context %||% soma_context()
Expand Down

0 comments on commit 0ddfb3c

Please sign in to comment.