Skip to content

Conversation

@h-mayorquin
Copy link
Collaborator

@h-mayorquin h-mayorquin commented Nov 4, 2025

During a conversation with Matthew A. Smith, I suggested that the simplest path for converting MATLAB trial data to NWB is to export to CSV and use the CsvTimeIntervalsInterface interface.

I took a look a the conversion gallery and realize that the current documentation doesn't adequately explain the expected CSV format or how to customize the conversion. This PR improves the conversion gallery by clarifying the input format and demonstrating the available conversion options.

The new how-to documentation:
https://neuroconv--1572.org.readthedocs.build/en/1572/conversion_examples_gallery/text/csv.html

@h-mayorquin h-mayorquin self-assigned this Nov 4, 2025
@h-mayorquin h-mayorquin requested a review from Copilot November 4, 2025 19:48
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 enhances the CSV/Excel TimeIntervals interface with comprehensive documentation improvements and a fix for in-memory access to trials and epochs. The changes improve user experience by providing detailed tutorial-style examples and fixing a gap in how TimeIntervals data is accessed before file save/load.

  • Enhanced documentation with detailed CSV format requirements, examples, and usage patterns
  • Fixed in-memory access to nwbfile.trials and nwbfile.epochs by setting direct properties
  • Improved docstrings for TimeIntervalsInterface.add_to_nwbfile() and convert_df_to_time_intervals()

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/neuroconv/tools/text.py Expanded docstring for convert_df_to_time_intervals() with comprehensive parameter descriptions, examples, and notes
src/neuroconv/datainterfaces/text/timeintervalsinterface.py Improved docstrings and added direct property assignment for trials/epochs to enable in-memory access
docs/conversion_examples_gallery/text/csv.rst Major documentation enhancement with CSV format requirements, multiple usage examples, and customization options
CHANGELOG.md Added changelog entry describing the improvements

@h-mayorquin h-mayorquin marked this pull request as ready for review November 4, 2025 20:31
@h-mayorquin h-mayorquin changed the title improve documentation of csv interface improve conversion gallery documentation for CsvTimeIntervalsInterface Nov 4, 2025
@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.27%. Comparing base (00c1efd) to head (cc32223).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...conv/datainterfaces/text/timeintervalsinterface.py 80.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1572   +/-   ##
=======================================
  Coverage   88.27%   88.27%           
=======================================
  Files         156      156           
  Lines       10695    10747   +52     
=======================================
+ Hits         9441     9487   +46     
- Misses       1254     1260    +6     
Flag Coverage Δ
unittests 88.27% <80.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/neuroconv/tools/text.py 95.23% <ø> (ø)
...conv/datainterfaces/text/timeintervalsinterface.py 92.30% <80.00%> (-1.03%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants