Skip to content

Commit

Permalink
manual fix-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Sep 24, 2024
1 parent e55b938 commit f371d9b
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 36 deletions.
3 changes: 2 additions & 1 deletion apis/r/src/arrow.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <nanoarrow/r.h> // for C/C++ interface to Arrow (via header exported from the R package)
#include <Rcpp/Lighter> // for R interface to C++

#include <nanoarrow/r.h> // for C/C++ interface to Arrow (via header exported from the R package)
#include <RcppInt64> // for fromInteger64
#include <nanoarrow/nanoarrow.hpp> // for C/C++ interface to Arrow (vendored)

Expand Down
11 changes: 7 additions & 4 deletions apis/r/src/metadata.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <nanoarrow/r.h> // for C/C++ interface to Arrow (via header exported from the R package)
#include <Rcpp/Lighter> // for R interface to C++

#include <nanoarrow/r.h> // for C/C++ interface to Arrow (via header exported from the R package)
#include <RcppInt64> // for fromInteger64
#include <nanoarrow/nanoarrow.hpp> // for C/C++ interface to Arrow (vendored)

Expand Down Expand Up @@ -54,9 +55,11 @@ int32_t get_metadata_num(
//' Read all metadata (as named list)
//'
//' This function currently supports metadata as either a string or an 'int64'
//(or 'int32'). ' It will error if a different datatype is encountered. ' @param
//uri The array URI ' @param is_array A boolean to indicate array or group '
//@param ctxxp An external pointer to the SOMAContext wrapper ' @export
//' (or 'int32'). ' It will error if a different datatype is encountered.
//' @param uri The array URI
//' @param is_array A boolean to indicate array or group
//' @param ctxxp An external pointer to the SOMAContext wrapper
//' @export
// [[Rcpp::export]]
Rcpp::List get_all_metadata(
std::string& uri, bool is_array, Rcpp::XPtr<somactx_wrap_t> ctxxp) {
Expand Down
1 change: 1 addition & 0 deletions apis/r/src/reindexer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <Rcpp/Lightest> // for R interface to C++

#include <RcppInt64> // for fromInteger64

#include <tiledbsoma/tiledbsoma>
Expand Down
55 changes: 32 additions & 23 deletions apis/r/src/riterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,43 @@

namespace tdbs = tiledbsoma;

// clang-format off
//' Iterator-Style Access to SOMA Array via SOMAArray
//'
//' The `sr_*` functions provide low-level access to an instance of the
//SOMAArray ' class so that iterative access over parts of a (large) array is
//possible. ' \describe{ ' \item{\code{sr_setup}}{instantiates and by default
//also submits a query} ' \item{\code{sr_complete}}{checks if more data is
//available} ' \item{\code{sr_next}}{returns the next chunk} ' }
//' The `sr_*` functions provide low-level access to an instance of the SOMAArray
//' class so that iterative access over parts of a (large) array is possible.
//' \describe{
//' \item{\code{sr_setup}}{instantiates and by default also submits a query}
//' \item{\code{sr_complete}}{checks if more data is available}
//' \item{\code{sr_next}}{returns the next chunk}
//' }
//'
//' @param uri Character value with URI path to a SOMA data set
//' @param config Named chracter vector with \sQuote{key} and \sQuote{value}
//pairs ' used as TileDB config parameters. ' @param colnames Optional vector of
//character value with the name of the columns to retrieve ' @param qc Optional
//external Pointer object to TileDB Query Condition, defaults to \sQuote{NULL}
//i.e. ' no query condition ' @param dim_points Optional named list with vector
//of data points to select on the given ' dimension(s). Each dimension can be
//one entry in the list. ' @param dim_ranges Optional named list with two-column
//matrix where each row select a range ' for the given dimension. Each dimension
//can be one entry in the list. ' @param batch_size Optional argument for size
//of data batches, defaults to \sQuote{auto} ' @param result_order Optional
//argument for query result order, defaults to \sQuote{auto} ' @param loglevel
//Character value with the desired logging level, defaults to \sQuote{auto} '
//which lets prior setting prevail, any other value is set as new logging level.
//' @param timestamprange Optional POSIXct (i.e. Datetime) vector with start and
//end of ' interval for which data is considered. ' @param sr An external
//pointer to a TileDB SOMAArray object
//' @param config Named chracter vector with \sQuote{key} and \sQuote{value} pairs
//' used as TileDB config parameters.
//' @param colnames Optional vector of character value with the name of the
//' columns to retrieve
//' @param qc Optional external Pointer object to TileDB Query Condition,
//' defaults to \sQuote{NULL} i.e. no query condition
//' @param dim_points Optional named list with vector of data points to select
//' on the given dimension(s). Each dimension can be one entry in the list.
//' @param dim_ranges Optional named list with two-column matrix where each row
//' select a range for the given dimension. Each dimension can be one entry in
//'the list.
//' @param batch_size Optional argument for size of data batches, defaults to
//'\sQuote{auto}
//' @param result_order Optional argument for query result order, defaults to
//' \sQuote{auto}
//' @param loglevel Character value with the desired logging level, defaults to
//' \sQuote{auto} which lets prior setting prevail, any other value is set as
//new logging level.
//' @param timestamprange Optional POSIXct (i.e. Datetime) vector with start
//' and end of ' interval for which data is considered.
//' @param sr An external pointer to a TileDB SOMAArray object.
//'
//' @return \code{sr_setup} returns an external pointer to a SOMAArray.
//\code{sr_complete} ' returns a boolean, and \code{sr_next} returns an Arrow
//array helper object.
//' \code{sr_complete} ' returns a boolean, and \code{sr_next} returns an Arrow
//' array helper object.
//'
//' @examples
//' \dontrun{
Expand All @@ -64,6 +72,7 @@ namespace tdbs = tiledbsoma;
//' summary(rl)
//' }
//' @noRd
// clang-format on
// [[Rcpp::export]]
Rcpp::XPtr<tdbs::SOMAArray> sr_setup(
const std::string& uri,
Expand Down
15 changes: 8 additions & 7 deletions apis/r/src/rutilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,13 @@ std::vector<int64_t> i64_from_rcpp_numeric(const Rcpp::NumericVector& input) {
//' TileDB SOMA statistics
//'
//' These functions expose the TileDB Core functionality for performance
//measurements ' and statistics.
//' measurements and statistics.
//'
//' - `tiledbsoma_stats_enable()`/`tiledbsoma_stats_disable()`: Enable and
//disable TileDB's internal statistics. ' - `tiledbsoma_stats_reset()`: Reset
//all statistics to 0. ' - `tiledbsoma_stats_dump()`: Dump all statistics to a
//JSON string. ' - `tiledbsoma_stats_show()`: Print all statistics to the
//console.
//' disable TileDB's internal statistics.
//' - `tiledbsoma_stats_reset()`: Reset all statistics to 0.
//' - `tiledbsoma_stats_dump()`: Dump all statistics to a JSON string.
//' - `tiledbsoma_stats_show()`: Print all statistics to the console.
//'
//' @name tiledbsoma_stats
//' @export
Expand Down Expand Up @@ -348,8 +348,9 @@ 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
// 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(
const bool compact = false, const bool major_minor_only = false) {
Expand Down
3 changes: 2 additions & 1 deletion apis/r/src/soma.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <nanoarrow/r.h> // for C/C++ interface to Arrow (via header exported from the R package)
#include <Rcpp/Lighter> // for R interface to C++

#include <nanoarrow/r.h> // for C/C++ interface to Arrow (via header exported from the R package)
#include <RcppInt64> // for fromInteger64
#include <nanoarrow/nanoarrow.hpp> // for C/C++ interface to Arrow (vendored)

Expand Down

0 comments on commit f371d9b

Please sign in to comment.