-
Notifications
You must be signed in to change notification settings - Fork 4
Validate metadata against database #148
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
Adds an optional YAML validation utility for spyglass users to validate YAML metadata files against existing database entries to help reduce duplication and errors.
- Introduces a new
yaml_database_validationfunction that validates YAML files against spyglass database tables - Implements helper function to check for brain regions missing from the database
- Updates README with documentation for the new optional validation feature
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/trodes_to_nwb/database_validation.py | New module containing YAML validation functions for spyglass database integration |
| README.md | Added documentation section explaining the optional YAML validation feature for spyglass users |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #148 +/- ##
==========================================
- Coverage 89.73% 87.65% -2.08%
==========================================
Files 13 14 +1
Lines 1704 1749 +45
==========================================
+ Hits 1529 1533 +4
- Misses 175 216 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <[email protected]>
|
I'm sort of hesitant to bring in spyglass as a dependency here, even as an optional one, but we should discuss. Maybe there are ways we can better validate. |
This pull request adds an optional YAML validation utility for users of the
spyglassdata management system. The new feature allows users to validate their YAML files against existing database entries to help reduce duplication and errors. Documentation has also been updated to describe this new functionality.New YAML validation for spyglass users:
yaml_database_validationindatabase_validation.pythat checks a YAML file against theCameraDevice,Task, andBrainRegiontables in the spyglass database, reporting mismatches and missing regions.check_for_brain_regionto identify brain regions in the YAML that are missing from the database.Documentation update:
README.mdto include instructions for using the new YAML validation feature, emphasizing that it is optional and only relevant for spyglass users.