Skip to content

Conversation

@samuelbray32
Copy link
Collaborator

This pull request adds an optional YAML validation utility for users of the spyglass data 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:

  • Added a new function yaml_database_validation in database_validation.py that checks a YAML file against the CameraDevice, Task, and BrainRegion tables in the spyglass database, reporting mismatches and missing regions.
  • Implemented a helper function check_for_brain_region to identify brain regions in the YAML that are missing from the database.

Documentation update:

  • Updated the README.md to include instructions for using the new YAML validation feature, emphasizing that it is optional and only relevant for spyglass users.

@samuelbray32 samuelbray32 requested review from Copilot and edeno October 9, 2025 22:29
Copy link
Contributor

Copilot AI left a 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_validation function 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
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 8.88889% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.65%. Comparing base (5359ff6) to head (5a43911).

Files with missing lines Patch % Lines
src/trodes_to_nwb/database_validation.py 8.88% 41 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@edeno
Copy link
Collaborator

edeno commented Oct 15, 2025

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.

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