-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: fix X_{suffix} validation and add test coverage #635
Conversation
Codecov Report
@@ Coverage Diff @@
## main #635 +/- ##
==========================================
+ Coverage 83.23% 83.44% +0.21%
==========================================
Files 19 19
Lines 1724 1728 +4
==========================================
+ Hits 1435 1442 +7
+ Misses 289 286 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -822,6 +822,9 @@ def _validate_embedding_dict(self): | |||
|
|||
obsm_with_x_prefix = 0 | |||
for key, value in self.adata.obsm.items(): | |||
if " " in key: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think any keys that have whitespace in them should be invalid, regardless of whether it's an X_{suffix}
key
self.validator.errors, | ||
["ERROR: Embedding key X_ umap has whitespace in it, please remove it."], | ||
) | ||
|
||
def test_obsm_shape(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a test for the other condition on this if conditional? i.e. must have same number of rows as X
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i updated for the case where the number of rows is not the same as the number of cells. it actually seems to fail when setting the key, not when running the validation. but the test should reflect that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thank you! flagged 1 test scenario I think we're missing (from before these additions, but would be good to get coverage on while we're changing this block)
Reason for Change
#590
Changes
isinf
callTesting
version to PyPI without explicit QA + sign-off from Lattice on all functional CLI changes. They may install the package
version at HEAD of main with
Notes for Reviewer