Skip to content

Conversation

@samuelbray32
Copy link
Collaborator

@samuelbray32 samuelbray32 commented Sep 2, 2025

  • Call add_optogenetic_epochs within _create__nwb
  • Fix write error caused by differently shaped spatial nodes arrays between optogenetic epochs
  • add a changelog to the repo

@edeno edeno requested review from Copilot and edeno September 2, 2025 22:45

This comment was marked as outdated.

edeno
edeno previously approved these changes Sep 2, 2025
Copy link
Collaborator

@edeno edeno left a comment

Choose a reason for hiding this comment

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

looks good to me with a changelog update

@codecov
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.53%. Comparing base (cff697b) to head (08f704a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/trodes_to_nwb/convert_optogenetics.py 90.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #135      +/-   ##
==========================================
+ Coverage   89.48%   89.53%   +0.05%     
==========================================
  Files          13       13              
  Lines        1693     1711      +18     
==========================================
+ Hits         1515     1532      +17     
- Misses        178      179       +1     

☔ 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.

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

This PR implements a quickfix to properly call add_optogenetic_epochs within the NWB creation process and addresses a write error caused by differently shaped spatial node arrays between optogenetic epochs.

  • Integrate add_optogenetic_epochs function call into the main NWB creation workflow
  • Fix array shape inconsistencies in optogenetic epoch spatial filter data by padding arrays to uniform dimensions
  • Add fs_gui_dir parameter support throughout the conversion pipeline to enable optogenetic file discovery

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/trodes_to_nwb/convert.py Adds fs_gui_dir parameter and calls add_optogenetic_epochs in _create_nwb
src/trodes_to_nwb/convert_optogenetics.py Implements array padding logic to fix spatial node shape inconsistencies
src/trodes_to_nwb/tests/test_convert.py Updates test calls to include fs_gui_dir parameter
src/trodes_to_nwb/tests/test_convert_optogenetics.py Updates test to expect corrected array shape
CHANGELOG.md Documents the optogenetics-related fixes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

edeno
edeno previously approved these changes Sep 3, 2025
@edeno edeno merged commit 9541a17 into main Sep 3, 2025
7 checks passed
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