Skip to content

Add example of setting Units.resolution in the ecephys tutorial#2174

Open
h-mayorquin wants to merge 3 commits intodevfrom
add_tutorial_for_unit_resolution
Open

Add example of setting Units.resolution in the ecephys tutorial#2174
h-mayorquin wants to merge 3 commits intodevfrom
add_tutorial_for_unit_resolution

Conversation

@h-mayorquin
Copy link
Copy Markdown
Contributor

@h-mayorquin h-mayorquin commented Mar 24, 2026

Motivation

At the inspector we are working on check_units_resolution_is_set check (NeurodataWithoutBorders/nwbinspector#685), which flags Units tables that contain spike_times but have no resolution set. Users running the inspector on files created by following our tutorials would get this warning with no guidance on how to fix it.

I have added a short section to the ecephys tutorial that sets nwbfile.units.resolution right after the existing add_unit loop, with a brief explanation of what the field means and why it matters. I kept the change minimal to avoid restructuring the existing tutorial flow.

What was the reasoning behind this change? Please explain the changes briefly.

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running ruff check . && codespell from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.86%. Comparing base (286de2d) to head (de7e3b1).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2174      +/-   ##
==========================================
- Coverage   95.10%   94.86%   -0.24%     
==========================================
  Files          29       29              
  Lines        2943     2943              
  Branches      443      443              
==========================================
- Hits         2799     2792       -7     
- Misses         86       93       +7     
  Partials       58       58              
Flag Coverage Δ
integration 72.85% <ø> (ø)
unit 85.08% <ø> (-0.28%) ⬇️

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

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

@h-mayorquin h-mayorquin marked this pull request as ready for review March 24, 2026 22:23
@h-mayorquin h-mayorquin self-assigned this Mar 24, 2026
@h-mayorquin h-mayorquin added the topic: docs issues related to documentation label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: docs issues related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant