[python] Support default-coord reads of corner-written dense ND arrays #1810
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue and/or context: In support of PR #1768 with issue #1769.
Needles to thread for
update_uns
:The existing
tiledbsoma.io.update_obs
,tiledbsoma.io.update_var
,tiledbsoma.io.add_X_layer
methods all take as argument atiledbsoma.Experiment
which is already open for writing. Goal: do the same fortiledbsoma.io.update_uns
.Common use-case:
Technical factors:
X
,obsm
,varm
,obsp
,varp
areSparseNDArray
,uns
can containDenseNDArray
which are ingested fromnumpy.ndarray
numpy.ndarray
that the before-uns didn't (new data on update), there is no problemnumpy.ndarray
of the same dimensions as the before-uns, there is no problemtiledb.Array.delete_array
of the array accompanied by tiledb-group operations to delete the key/URI pair and re-add the key/URI pairdel collection[key]
andcollection[key] = new_dense_nd_array
then we gettiledbsoma._exception.SOMAError: replacing key 'a' is unsupported
which is a check that must remain (see links below)write_timestamp
#919update_uns
do two opens-for-write: one to remove any shape-changing dense arrays, and one shifted by a millisecond to do the rest of the worktiledbsoma.io.update_uns
would take a URI as first argument, different from all the other updaters intiledbsoma.io
which take anExperiment
opened for write as first argumentGood feedback from @isaiah and @seth: simply have
tiledbsoma.io
'suns
-ingestion logic write bigger-than-necessary arrays for dense ND arrays -- as we already do for sparse.This is compliant with the SOMA specification.
Changes: As above.
Notes for Reviewer: