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

fix: only validate colors if the key is specified #647

Merged
merged 3 commits into from
Sep 26, 2023
Merged

Conversation

joyceyan
Copy link
Contributor

Reason for Change

  • based on feedback here and here, it looks like we should only do validation on these fields if the key is specified in uns

Changes

  • updating the validation to only run the validation on the colors fields if the key is set and the value is not an empty array

Testing

  • added a test to verify that if uns["suspension_colors"] is removed, we'll still pass validation

Notes for Reviewer

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #647 (43d0e5e) into main (40d56c8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 43d0e5e differs from pull request most recent head 1aa127d. Consider uploading reports for the commit 1aa127d to get more accurate results

@@           Coverage Diff           @@
##             main     #647   +/-   ##
=======================================
  Coverage   83.70%   83.71%           
=======================================
  Files          19       19           
  Lines        1737     1738    +1     
=======================================
+ Hits         1454     1455    +1     
  Misses        283      283           
Flag Coverage Δ
unittests 83.71% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cellxgene_schema_cli/cellxgene_schema/validate.py 94.61% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@joyceyan joyceyan merged commit 518d7e6 into main Sep 26, 2023
6 checks passed
@joyceyan joyceyan deleted the joyce/fix-colors branch September 26, 2023 21:00
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