-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[r] Metadata read/write support via libtiledbsoma #2819
Conversation
a766df7
to
8ef872e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2819 +/- ##
==========================================
+ Coverage 90.06% 90.16% +0.10%
==========================================
Files 37 37
Lines 3945 3957 +12
==========================================
+ Hits 3553 3568 +15
+ Misses 392 389 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
8a00177
to
fa733f7
Compare
Passes all tests
fa733f7
to
2caa2d4
Compare
Why are the metadata accessors implemented as static methods? You should be able to use |
Can you point to line and file? In std::unique_ptr<tdbs::SOMAObject> getObjectUniquePointer(bool is_array, OpenMode mode,
std::string& uri,
std::shared_ptr<tdbs::SOMAContext> ctx) {
if (is_array) {
return tdbs::SOMAArray::open(mode, uri, ctx);
} else {
return tdbs::SOMAGroup::open(mode, uri, ctx);
}
}
// .... more lines omitted ...
// [[Rcpp::export]]
bool has_metadata(std::string& uri, std::string& key, bool is_array,
Rcpp::XPtr<somactx_wrap_t> ctxxp) {
// shared pointer to SOMAContext from external pointer wrapper
std::shared_ptr<tdbs::SOMAContext> sctx = ctxxp->ctxptr;
// SOMA Object unique pointer (aka soup)
auto soup = getObjectUniquePointer(is_array, OpenMode::read, uri, sctx);
return soup->has_metadata(key);
} I don't think I add static methods. Am I overlooking something? |
Issue and/or context:
This PR adds support for metadata reading and writing via libtiledbsoma. It does not yet add support for timestamp'ed create / write / read which will follow in subsequent PR building on this.
Changes:
The write-path for object creation and write is now fully utilizing the libtiledbsoma facilities (though the additional timestamp feature is yet to come, work in progress).
Notes for Reviewer:
SC 51949
#2698