Skip to content

Commit

Permalink
Merge branch 'main' into kerl/query-shape
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Dec 1, 2023
2 parents 8d1df03 + e52f094 commit 0f46b63
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 29 deletions.
9 changes: 7 additions & 2 deletions apis/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,16 @@ def run(self):
"numba==0.56.4; python_version<'3.8'",
"numpy>=1.18,<1.24; python_version<'3.8'",
"pandas",
"pyarrow>=9.0.0",
# TODO: once we no longer support Python 3.7, remove this and pin to pyarrow >= 14.0.1
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926
"pyarrow_hotfix",
# MacOS issue with import pyarrow before import tiledb at >= 13.0:
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926#issuecomment-1834695149
"pyarrow>=9.0.0,<13.0.0",
"scanpy>=1.9.2",
"scipy",
"somacore==1.0.4",
"tiledb~=0.23.4",
"tiledb~=0.24.0",
"typing-extensions", # Note "-" even though `import typing_extensions`
],
extras_require={
Expand Down
5 changes: 5 additions & 0 deletions apis/python/src/tiledbsoma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@
from somacore import AxisColumnNames, AxisQuery, ExperimentAxisQuery
from somacore.options import ResultOrder

# TODO: once we no longer support Python 3.7, remove this and pin to pyarrow >= 14.0.1
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926
# ruff: noqa
import pyarrow_hotfix

from ._collection import Collection
from ._constants import SOMA_JOINID
from ._dataframe import DataFrame
Expand Down
2 changes: 1 addition & 1 deletion apis/r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Imports:
Matrix,
stats,
bit64,
tiledb (>= 0.21.3),
tiledb (>= 0.22.0),
arrow,
utils,
fs,
Expand Down
6 changes: 4 additions & 2 deletions apis/r/R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ tiledbsoma_stats_dump <- function() {
#' libtiledbsoma version
#'
#' Returns a string with version information for libtiledbsoma and the linked TileDB Embedded library.
#' If argument `compact` is set to `TRUE`, shorter version of just the TileDB Embedded library
#' version is returned,
#' @noRd
libtiledbsoma_version <- function() {
.Call(`_tiledbsoma_libtiledbsoma_version`)
libtiledbsoma_version <- function(compact = FALSE) {
.Call(`_tiledbsoma_libtiledbsoma_version`, compact)
}

#' TileDB embedded version
Expand Down
2 changes: 1 addition & 1 deletion apis/r/R/utils-tiledb.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ show_package_versions <- function() {
cat("tiledbsoma: ", toString(utils::packageVersion("tiledbsoma")), "\n",
"tiledb-r: ", toString(utils::packageVersion("tiledb")), "\n",
"tiledb core: ", as.character(tiledb::tiledb_version(compact=TRUE)), "\n",
"libtiledbsoma: ", libtiledbsoma_version(), "\n",
"libtiledbsoma: ", libtiledbsoma_version(compact=TRUE), "\n",
"R: ", R.version.string, "\n",
"OS: ", utils::osVersion, "\n",
sep="")
Expand Down
9 changes: 5 additions & 4 deletions apis/r/src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,13 @@ BEGIN_RCPP
END_RCPP
}
// libtiledbsoma_version
std::string libtiledbsoma_version();
RcppExport SEXP _tiledbsoma_libtiledbsoma_version() {
std::string libtiledbsoma_version(const bool compact);
RcppExport SEXP _tiledbsoma_libtiledbsoma_version(SEXP compactSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
rcpp_result_gen = Rcpp::wrap(libtiledbsoma_version());
Rcpp::traits::input_parameter< const bool >::type compact(compactSEXP);
rcpp_result_gen = Rcpp::wrap(libtiledbsoma_version(compact));
return rcpp_result_gen;
END_RCPP
}
Expand Down Expand Up @@ -213,7 +214,7 @@ static const R_CallMethodDef CallEntries[] = {
{"_tiledbsoma_tiledbsoma_stats_disable", (DL_FUNC) &_tiledbsoma_tiledbsoma_stats_disable, 0},
{"_tiledbsoma_tiledbsoma_stats_reset", (DL_FUNC) &_tiledbsoma_tiledbsoma_stats_reset, 0},
{"_tiledbsoma_tiledbsoma_stats_dump", (DL_FUNC) &_tiledbsoma_tiledbsoma_stats_dump, 0},
{"_tiledbsoma_libtiledbsoma_version", (DL_FUNC) &_tiledbsoma_libtiledbsoma_version, 0},
{"_tiledbsoma_libtiledbsoma_version", (DL_FUNC) &_tiledbsoma_libtiledbsoma_version, 1},
{"_tiledbsoma_tiledb_embedded_version", (DL_FUNC) &_tiledbsoma_tiledb_embedded_version, 0},
{NULL, NULL, 0}
};
Expand Down
13 changes: 11 additions & 2 deletions apis/r/src/rutilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,19 @@ std::string tiledbsoma_stats_dump() {
//' libtiledbsoma version
//'
//' Returns a string with version information for libtiledbsoma and the linked TileDB Embedded library.
//' If argument `compact` is set to `TRUE`, a shorter version of just the TileDB Embedded library
//' version is returned,
//' @noRd
// [[Rcpp::export]]
std::string libtiledbsoma_version() {
return tiledbsoma::version::as_string();
std::string libtiledbsoma_version(const bool compact = false) {
if (compact) {
auto v = tiledbsoma::version::embedded_version_triple();
std::ostringstream txt;
txt << std::get<0>(v) << "." << std::get<1>(v) << "." << std::get<2>(v);
return txt.str();
} else {
return tiledbsoma::version::as_string();
}
}

//' TileDB embedded version
Expand Down
4 changes: 2 additions & 2 deletions apis/r/tools/get_tarball.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env Rscript

## version pinning info
tiledb_core_version <- "2.17.4"
tiledb_core_sha1 <- "a1f648e"
tiledb_core_version <- "2.18.2"
tiledb_core_sha1 <- "9ae6e1a"

if ( ! dir.exists("inst/") ) {
stop("No 'inst/' directory. Exiting.", call. = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion apis/system/tests/test_version_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def test_version_match(self):
library("tiledb")
version = tiledb_version()
stopifnot(as.integer(version["major"]) == {major})
stopifnot(as.integer(version["minor"]) == {minor})
stopifnot(as.integer(version["minor"]) >= {minor})
"""
)
28 changes: 14 additions & 14 deletions libtiledbsoma/cmake/Modules/FindTileDB_EP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ else()
# NB When updating the pinned URLs here, please also update in file apis/r/tools/get_tarball.R
if(DOWNLOAD_TILEDB_PREBUILT)
if (WIN32) # Windows
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.17.4/tiledb-windows-x86_64-2.17.4-a1f648e.zip")
SET(DOWNLOAD_SHA1 "d82a090d231e5cebd10205af8b80884e934b9e9f")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.18.2/tiledb-windows-x86_64-2.18.2-9ae6e1a.zip")
SET(DOWNLOAD_SHA1 "c440403fde701e5014a7ffa046d38bb49b141e55")
elseif(APPLE) # OSX

# Status quo as of 2023-05-18:
Expand All @@ -76,22 +76,22 @@ else()
# o CMAKE_SYSTEM_PROCESSOR is x86_64

if (CMAKE_OSX_ARCHITECTURES STREQUAL x86_64)
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.17.4/tiledb-macos-x86_64-2.17.4-a1f648e.tar.gz")
SET(DOWNLOAD_SHA1 "9e3807e1b63b21849a374c6d9c9f161b46a9cc5a")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.18.2/tiledb-macos-x86_64-2.18.2-9ae6e1a.tar.gz")
SET(DOWNLOAD_SHA1 "6ba986407b2d0e25fb5df19d08ed22fefeac1c2a")
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL arm64)
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.17.4/tiledb-macos-arm64-2.17.4-a1f648e.tar.gz")
SET(DOWNLOAD_SHA1 "e6ec0634f665943ff9879041ab122bdaa96349df")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.18.2/tiledb-macos-arm64-2.18.2-9ae6e1a.tar.gz")
SET(DOWNLOAD_SHA1 "4395a283db57844a944f02dab5bd0f0001eb7e30")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(AMD64|amd64)|(^i.86$)")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.17.4/tiledb-macos-x86_64-2.17.4-a1f648e.tar.gz")
SET(DOWNLOAD_SHA1 "9e3807e1b63b21849a374c6d9c9f161b46a9cc5a")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.18.2/tiledb-macos-x86_64-2.18.2-9ae6e1a.tar.gz")
SET(DOWNLOAD_SHA1 "6ba986407b2d0e25fb5df19d08ed22fefeac1c2a")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.17.4/tiledb-macos-arm64-2.17.4-a1f648e.tar.gz")
SET(DOWNLOAD_SHA1 "e6ec0634f665943ff9879041ab122bdaa96349df")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.18.2/tiledb-macos-arm64-2.18.2-9ae6e1a.tar.gz")
SET(DOWNLOAD_SHA1 "4395a283db57844a944f02dab5bd0f0001eb7e30")
endif()

else() # Linux
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.17.4/tiledb-linux-x86_64-2.17.4-a1f648e.tar.gz")
SET(DOWNLOAD_SHA1 "7849cbbf19f5f9252e4be5350328754b01938aaa")
SET(DOWNLOAD_URL "https://github.com/TileDB-Inc/TileDB/releases/download/2.18.2/tiledb-linux-x86_64-2.18.2-9ae6e1a.tar.gz")
SET(DOWNLOAD_SHA1 "6386504a58d52330f41fa688a2b259b67824e2c8")
endif()

ExternalProject_Add(ep_tiledb
Expand All @@ -113,8 +113,8 @@ else()
else() # Build from source
ExternalProject_Add(ep_tiledb
PREFIX "externals"
URL "https://github.com/TileDB-Inc/TileDB/archive/2.17.4.zip"
URL_HASH SHA1=a6a848cd3d3f19ed1dd6057e3f05fb7b54740016
URL "https://github.com/TileDB-Inc/TileDB/archive/2.18.2.zip"
URL_HASH SHA1=70bb2e9a7603675849830b763d1a0d17fce4bafa
DOWNLOAD_NAME "tiledb.zip"
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${EP_INSTALL_PREFIX}
Expand Down

0 comments on commit 0f46b63

Please sign in to comment.