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

[Bug]: Create test data for checking TimeSeries data has same length as timestamps differently #555

Closed
3 tasks done
rly opened this issue Jan 28, 2025 · 1 comment
Closed
3 tasks done
Assignees
Labels
category: bug errors in the code or code behavior

Comments

@rly
Copy link
Contributor

rly commented Jan 28, 2025

What happened?

When NeurodataWithoutBorders/pynwb#1538, is merged, pynwb will no longer allow the creation of TimeSeries objects where the data has a different length (of the first dimension) than the timestamps. This is used in the nwbinspector tests to create test data:

def test_check_timestamps_match_first_dimension_bad():

We can create the invalid data to bypass the pynwb check by setting _in_construct_mode=True:

ts = TimeSeries.__new__(TimeSeries, in_construct_mode=True)
ts.__init__(name="invalid_timeseries", description="", data=[1, 2, 3], timestamps=[1, 2], unit="test")

Operating System

None

Python Version

3.12

Were you streaming with ROS3?

No

Package Versions

Copy and paste your output here

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • Have you ensured this bug was not already reported?
  • To the best of your ability, have you ensured this is a bug within the code that checks the NWBFile, rather than a bug in the NWBFile reader (e.g., PyNWB or MatNWB)?
@rly rly added the category: bug errors in the code or code behavior label Jan 28, 2025
@rly rly self-assigned this Jan 28, 2025
@stephprince
Copy link
Contributor

Addressed by #556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior
Projects
None yet
Development

No branches or pull requests

2 participants