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

feat: update validation for uns['spatial'] #1129

Merged
merged 15 commits into from
Nov 26, 2024

Conversation

ejmolinelli
Copy link
Contributor

@ejmolinelli ejmolinelli commented Nov 25, 2024

Reason for Change

Changes

  • add test cases for Visium siblings, descendants and ancestors to validate uns
  • added custom image max resolution for 11m Visium

Testing

  • test__validate_spatial_required_if_visium
  • test__validate_is_single_required_visium_error
  • test__validate_library_id_required_if_visium
  • test__validate_images_hires_max_dimension_greater_than_error
  • test__validate_images_hires_max_dimension_less_than_error
pip install git+https://github.com/chanzuckerberg/single-cell-curation/@main#subdirectory=cellxgene_schema_cli

Notes for Reviewer

  • here is a fix unrelated to this ticket, in which the schema was mutated in place, causing order dependent results when running tests.

@ejmolinelli ejmolinelli requested a review from joyceyan November 25, 2024 19:43
@ejmolinelli ejmolinelli requested a review from joyceyan November 25, 2024 20:15
# if spatial, MUST specify `is_single`
assert "uns['spatial'] must contain the key 'is_single'." in validator.errors[0]
else:
# if not spatial, MUST NOT speciffy `is_single`
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: specify

cellxgene_schema_cli/tests/test_validate.py Outdated Show resolved Hide resolved
Copy link
Contributor

@nayib-jose-gloria nayib-jose-gloria left a comment

Choose a reason for hiding this comment

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

couple of small rename suggestions + one test idea, but overall this looks good! thanks!

@ejmolinelli ejmolinelli merged commit 478648e into main Nov 26, 2024
7 of 8 checks passed
@ejmolinelli ejmolinelli deleted the ejmolinelli/visium-vldt-uns branch November 26, 2024 16:41
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.

3 participants