Skip to content
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

[python] Mutable-X mods, and explicit shaping of SparseNDArray #131

Merged
merged 13 commits into from
Feb 18, 2023

Conversation

johnkerl
Copy link
Member

@johnkerl johnkerl commented Feb 16, 2023

Implements the spec side of the plan laid out in issue single-cell-data/TileDB-SOMA#931.

This PR addresses only explicit shaping of SparseNDArray -- explicit shaping of DataFrame will be on a separate PR.

@johnkerl johnkerl marked this pull request as ready for review February 16, 2023 13:29
README.md Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
Copy link
Contributor

@thetorpedodog thetorpedodog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semantics look good; one formatting fix before this goes in and a few optional suggestions.

python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
@@ -454,15 +467,6 @@ class SparseRead:

__slots__ = ()

def coos(self) -> ReadIter[pa.SparseCOOTensor]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a note to keep a pin in this depending upon the results of single-cell-data/TileDB-SOMA#952 (comment)

(if it does get spuriously removed here, it's not a huge problem; implementations are allowed to provide extra methods and features, and we can just re-add it)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah @thetorpedodog totally not gonna land this PR until that one is resolved

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved on latest commit: see also
single-cell-data/TileDB-SOMA#952 (comment)

@johnkerl
Copy link
Member Author

@bkmartinjr given
#131
and latest commit on this PR
2fa64b9
can you take another look please?

@bkmartinjr
Copy link
Member

bkmartinjr commented Feb 16, 2023

can you take another look please

I have not had a chance to take any look - sorry, lots of threads.

Given the confusion on the design change, I would prefer we let that settle out, then review this PR.

@johnkerl
Copy link
Member Author

johnkerl commented Feb 16, 2023

@bkmartinjr when you click through the links I wrote you'll see that restoration of COO is a go

Pending changes on single-cell-data/TileDB-SOMA#952 include:

  • restore COO
  • unit-test coverage
  • some impl-repo code-factoring questions

-- none of which affect the spec

I had hoped to merge this PR but, sure, take all the time you need.

Afternote: indeed there is one more mod, good call. :)

@johnkerl johnkerl changed the title Mutable-X mods, and .shape as explicit capacity Mutable-X mods, and .shape as explicit capacity [WIP / please do not review] Feb 17, 2023
@johnkerl johnkerl marked this pull request as draft February 17, 2023 06:08
@johnkerl johnkerl changed the title Mutable-X mods, and .shape as explicit capacity [WIP / please do not review] Mutable-X mods, and .shape as explicit SparseNDArray capacity [WIP / please do not review] Feb 17, 2023
@johnkerl johnkerl changed the title Mutable-X mods, and .shape as explicit SparseNDArray capacity [WIP / please do not review] Mutable-X mods, and explicit shaping of SparseNDArray [WIP / please do not review] Feb 17, 2023
@johnkerl johnkerl marked this pull request as ready for review February 17, 2023 14:06
@johnkerl johnkerl changed the title Mutable-X mods, and explicit shaping of SparseNDArray [WIP / please do not review] Mutable-X mods, and explicit shaping of SparseNDArray Feb 17, 2023
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
python-spec/src/somacore/data.py Outdated Show resolved Hide resolved
@johnkerl johnkerl merged commit 9fc37ab into main Feb 18, 2023
@johnkerl johnkerl deleted the kerl/mutable-x branch February 18, 2023 20:38
@johnkerl johnkerl changed the title Mutable-X mods, and explicit shaping of SparseNDArray [python] Mutable-X mods, and explicit shaping of SparseNDArray Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants