Skip to content

Commit

Permalink
Deprecate old iterator (v1) from ecephys pipeline (#876)
Browse files Browse the repository at this point in the history
Co-authored-by: Cody Baker <[email protected]>
  • Loading branch information
h-mayorquin and CodyCBakerPhD authored May 25, 2024
1 parent 5efe5e3 commit 4e4d900
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* The usage of `compression` and `compression_opts` directly through the `neuroconv.tools.spikeinterface` submodule are now deprecated - users should refer to the new `configure_backend` method for a general approach for setting compression. [PR #805](https://github.com/catalystneuro/neuroconv/pull/805)
* Dropped the testing of Python 3.8 on the CI. Dropped support for Python 3.8 in setup. [PR #853](https://github.com/catalystneuro/neuroconv/pull/853)
* Deprecated skip_features argument in `add_sorting`. [PR #872](https://github.com/catalystneuro/neuroconv/pull/872)
* Deprecate old (v1) iterator from the ecephys pipeline [PR #876](https://github.com/catalystneuro/neuroconv/pull/876)

### Features
* Added `backend` control to the `make_or_load_nwbfile` helper method in `neuroconv.tools.nwb_helpers`. [PR #800](https://github.com/catalystneuro/neuroconv/pull/800)
Expand Down
12 changes: 12 additions & 0 deletions src/neuroconv/tools/spikeinterface/spikeinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,18 @@ def _recording_traces_to_hdmf_iterator(
ValueError
If the iterator_type is not 'v1', 'v2' or None.
"""

if iterator_type == "v1":
# Deprecation warning
warnings.warn(
message=(
"The 'v1' iterator is deprecated and will be removed after November 2024"
"Please use the 'v2' iterator instead."
),
category=DeprecationWarning,
stacklevel=2,
)

supported_iterator_types = ["v1", "v2", None]
if iterator_type not in supported_iterator_types:
message = f"iterator_type {iterator_type} should be either 'v1', 'v2' (recommended) or None"
Expand Down

0 comments on commit 4e4d900

Please sign in to comment.