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

add two simple additional validation functions #261

Merged
merged 12 commits into from
Apr 8, 2024

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Mar 26, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
No validation is currently performed on the contents of the annotation or the reference images.

What does this PR do?
This PR adds

  • a validation function that ensures mismatches between annotation and reference image size are flagged
  • a validation function that flags if reference and additional reference images contains the same data (see [BUG] both Zebrafish atlas additional references are the same as reference #230 for a real-life example where this happened)
  • tests for both these validation functions, and fixtures mocking the failing situations.

References

Closes #207
Should flag #230

How has this PR been tested?

Tests added for new functionality, tests pass locally and on CI.

Is this a breaking change?

No.

Does this PR require an update to the documentation?

API docstrings added for both functions and tests.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Co-authored-by: Vasco Schiavo <[email protected]>
@alessandrofelder alessandrofelder self-assigned this Apr 4, 2024
@alessandrofelder alessandrofelder marked this pull request as ready for review April 5, 2024 09:19
@alessandrofelder alessandrofelder requested a review from a team April 5, 2024 09:19
@willGraham01 willGraham01 self-requested a review April 8, 2024 14:25
Copy link
Collaborator

@willGraham01 willGraham01 left a comment

Choose a reason for hiding this comment

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

One thing re: comparing all the elements of an atlas, otherwise some VSCode things that crept in.

brainglobe_atlasapi/atlas_generation/validate_atlases.py Outdated Show resolved Hide resolved
tests/atlasgen/test_validation.py Outdated Show resolved Hide resolved
tests/atlasgen/test_validation.py Outdated Show resolved Hide resolved
tests/atlasgen/test_validation.py Outdated Show resolved Hide resolved
@alessandrofelder alessandrofelder merged commit 53795e2 into main Apr 8, 2024
8 checks passed
@alessandrofelder alessandrofelder deleted the validate-atlas-images branch April 8, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

validation function checking size of annotation and template image are the same
3 participants