-
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: {column}_colors validation #625
Conversation
1e8c5a8
to
ee167df
Compare
Codecov Report
@@ Coverage Diff @@
## main #625 +/- ##
==========================================
+ Coverage 83.45% 83.68% +0.23%
==========================================
Files 19 19
Lines 1710 1735 +25
==========================================
+ Hits 1427 1452 +25
Misses 283 283
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 |
category_mapping[column_name] = df[column_name].nunique() | ||
|
||
for column_name, num_unique_vals in category_mapping.items(): | ||
colors_options = uns_dict.get(f"{column_name}_colors", []) |
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.
We should only run validation against {column_name}_colors if it exists, as having a corresponding {column}_colors column is optional. As written, this will fail if a categorical column opts out of {column}_colors
https://app.zenhub.com/workspaces/single-cell-5e2a191dad828d52cc78b028/issues/gh/chanzuckerberg/single-cell-curation/513
i generated the new
example_valid.h5ad
by running this in a python notebook. basically i just copied everything inexamples_validate.py
and wrote to an h5ad file