single-cell-data / TileDB-SOMA

Python and R SOMA APIs using TileDB’s cloud-native format. Ideal for single-cell data at any scale.
https://tiledbsoma.readthedocs.io
MIT License
90 stars 25 forks source link

[r] Use cached SOMA context rather than re-creating #2988

Closed mojaveazure closed 1 month ago

mojaveazure commented 1 month ago

Cache a SOMA context during $new() as a private field when instantiating new objects. This cached context can then be used in other methods. Note, this PR is not yet changing the UX of config/context options. As the context from soma_context() is cached globally, we can modify the global one before instantiating to test customized cached contexts

Modified SOMA methods:

SC-55084

eddelbuettel commented 1 month ago

Good additions in the last comit.