Skip to content

Commit

Permalink
Merge branch 'dev' into nwb-schema-2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oruebel authored Feb 24, 2024
2 parents 905ef65 + 65b2a7d commit 4014f62
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PyNWB Changelog

## PyNWB 2.6.0 (Upcoming)
## PyNWB 2.6.0 (February 21, 2024)

### Enhancements and minor changes
- Added support for NWB schema 2.7.0. See [2.7.0 release notes](https://nwb-schema.readthedocs.io/en/latest/format_release_notes.html) for details
Expand Down
2 changes: 1 addition & 1 deletion Legal.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
“pynwb” Copyright (c) 2017-2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
“pynwb” Copyright (c) 2017-2024, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Innovation & Partnerships Office at [email protected].

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Citing NWB
LICENSE
=======

"pynwb" Copyright (c) 2017-2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
"pynwb" Copyright (c) 2017-2024, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

(1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Expand All @@ -124,7 +124,7 @@ You are under no obligation whatsoever to provide any bug fixes, patches, or upg
COPYRIGHT
=========

"pynwb" Copyright (c) 2017-2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
"pynwb" Copyright (c) 2017-2024, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Innovation & Partnerships Office at [email protected].

NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit other to do so.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def __call__(self, filename):

# General information about the project.
project = u'PyNWB'
copyright = u'2017-2023, Neurodata Without Borders'
copyright = u'2017-2024, Neurodata Without Borders'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
2 changes: 1 addition & 1 deletion license.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
“pynwb” Copyright (c) 2017-2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
“pynwb” Copyright (c) 2017-2024, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
4 changes: 3 additions & 1 deletion src/pynwb/testing/mock/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def mock_TimeSeries(
conversion: float = 1.0,
timestamps=None,
starting_time: Optional[float] = None,
rate: Optional[float] = 10.0,
rate: Optional[float] = None,
comments: str = "no comments",
description: str = "no description",
control=None,
Expand All @@ -24,6 +24,8 @@ def mock_TimeSeries(
nwbfile: Optional[NWBFile] = None,
offset=0.,
) -> TimeSeries:
if timestamps is None and rate is None:
rate = 10.0 # Hz
time_series = TimeSeries(
name=name or name_generator("TimeSeries"),
data=data if data is not None else np.array([1, 2, 3, 4]),
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/test_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ def test_mock(mock_function):
mock_function()


def test_mock_TimeSeries_w_timestamps():
ts = mock_TimeSeries(timestamps=[0, 1, 2, 3])
assert ts.timestamps is not None
assert len(ts.timestamps) == 4


def test_mock_TimeSeries_w_no_time():
ts = mock_TimeSeries()
assert ts.rate == 10.0


@pytest.mark.parametrize("mock_function", mock_functions)
def test_mock_write(mock_function, tmp_path):
if mock_function is mock_NWBFile:
Expand Down

0 comments on commit 4014f62

Please sign in to comment.