Skip to content

Conversation

@melonora
Copy link
Collaborator

This PR implements one of the tasks in #750 to improve the handling of channel names. It moves the c_coords parameter out of kwargs and also adds a validation for a mismatch in length between c_coords and the length of the c dimension.

@codecov
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.84%. Comparing base (42f7b6a) to head (088dec2).
Report is 68 commits behind head on main.

Files with missing lines Patch % Lines
src/spatialdata/models/models.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #779      +/-   ##
==========================================
- Coverage   91.85%   91.84%   -0.01%     
==========================================
  Files          45       45              
  Lines        6885     6893       +8     
==========================================
+ Hits         6324     6331       +7     
- Misses        561      562       +1     
Files with missing lines Coverage Δ
src/spatialdata/datasets.py 100.00% <ø> (ø)
src/spatialdata/models/models.py 87.76% <88.88%> (-0.01%) ⬇️

@melonora
Copy link
Collaborator Author

still need to see how we can have c_coords only in docstring when dealing with images and not labels.

@LucaMarconato
Copy link
Member

LucaMarconato commented Nov 13, 2024

still need to see how we can have c_coords only in docstring when dealing with images and not labels.

Does this work now?

Btw, looks great, pre-approving. Only missing thing, please add some tests (testing that it works for images and testing that it gives an error for labels, and for images when there is a mismatch). Then feel free to merge, thanks!

@melonora
Copy link
Collaborator Author

Main problem is that the docstring must be a literal so you can't use f strings or anything.

@melonora melonora merged commit 6694c91 into scverse:main Nov 13, 2024
8 checks passed
@melonora melonora deleted the c_coords branch November 22, 2024 05:39
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.

2 participants