Skip to content
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

Enhance unit test coverage #2031

Open
wants to merge 32 commits into
base: dev
Choose a base branch
from
Open

Enhance unit test coverage #2031

wants to merge 32 commits into from

Conversation

oruebel
Copy link
Contributor

@oruebel oruebel commented Feb 6, 2025

Motivation

Add unit tests to enhance overall test coverage for

  • Added unit tests for missed logic in core.py, image.py, spec.py, icephys.py, epoch.py
  • Fixed bug in IntracellularRecordingsTable, the IntracellularResponseTable was not being initialized correctly when empty category tables were provided
  • Fixed shape check in SpikeEventSeries to handle the case where AbstractDataChunkIterator are used for timestamps/data

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.

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.22%. Comparing base (bc12931) to head (a06e9d4).

Files with missing lines Patch % Lines
src/pynwb/ecephys.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2031      +/-   ##
==========================================
+ Coverage   91.73%   94.22%   +2.48%     
==========================================
  Files          27       27              
  Lines        2722     2718       -4     
  Branches      710      708       -2     
==========================================
+ Hits         2497     2561      +64     
+ Misses        149       94      -55     
+ Partials       76       63      -13     
Flag Coverage Δ
integration 73.14% <27.27%> (+0.18%) ⬆️
unit 84.76% <90.90%> (+2.47%) ⬆️

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.

@oruebel oruebel marked this pull request as draft February 6, 2025 22:51
@oruebel oruebel marked this pull request as ready for review February 7, 2025 04:56
@oruebel oruebel requested review from rly and stephprince February 7, 2025 04:56
@oruebel oruebel changed the title Enhance unit test for core.py Enhance unit test coverage Feb 7, 2025
@oruebel
Copy link
Contributor Author

oruebel commented Feb 7, 2025

@stephprince should this PR target the dev or the release branch for the 3.0 release?

@stephprince
Copy link
Contributor

@stephprince should this PR target the dev or the release branch for the 3.0 release?

Since you mentioned there are breaking changes, I think this should target the 3.0 release branch. But I can review and take a closer look.

@oruebel
Copy link
Contributor Author

oruebel commented Feb 7, 2025

I think this should target the 3.0 release branch. But I can review and take a closer look.

Sounds good. Feel free to modify the PR as necessary.

If you prefer, it should be pretty straight forward to just move the breaking changes to a separate PR since its just removes a few functions that were no longer used anywhere.

@oruebel oruebel mentioned this pull request Feb 7, 2025
6 tasks
@oruebel
Copy link
Contributor Author

oruebel commented Feb 7, 2025

@stephprince @rly to simplify things I have moved all breaking changes to a new PR #2036. This PR is good to go from my end.

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.

2 participants