Skip to content

Commit 07f0672

Browse files
bendichterclaude
andcommitted
Support NeuroConv 0.6.5
- Bump neuroconv version from 0.6.1 to 0.6.5 in all environment files - Update NWBMetaDataEncoder imports to use private _NWBMetaDataEncoder - Add spikeinterface to PyInstaller modules_to_collect for lazy imports - Pin pandas < 3.0 to avoid Arrow backend read-only array issue Closes #960 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b994976 commit 07f0672

6 files changed

Lines changed: 14 additions & 9 deletions

File tree

environments/environment-Linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ dependencies:
1515
- flask-cors == 4.0.0
1616
- flask_restx == 1.1.0
1717
- werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask.
18-
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.1
18+
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.5
19+
- pandas < 3.0 # pandas 3.0 uses Arrow backend by default, returning read-only arrays that break spikeinterface Phy extractor
1920
- neo == 0.14.1 # 0.14.2 is not compatible with neuroconv < 0.7.5
2021
- scikit-learn == 1.4.0 # Tutorial data generation
2122
- tqdm_publisher >= 0.0.1 # Progress bars

environments/environment-MAC-apple-silicon.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ dependencies:
2323
- werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask.
2424
# NOTE: the NeuroConv wheel on PyPI includes sonpy which is not compatible with arm64, so build and install
2525
# NeuroConv from GitHub, which will remove the sonpy dependency when building from Mac arm64
26-
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.1
26+
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.5
27+
- pandas < 3.0 # pandas 3.0 uses Arrow backend by default, returning read-only arrays that break spikeinterface Phy extractor
2728
- neo == 0.14.1 # 0.14.2 is not compatible with neuroconv < 0.7.5
2829
- scikit-learn == 1.4.0 # Tutorial data generation
2930
- tqdm_publisher >= 0.0.1 # Progress bars

environments/environment-MAC-intel.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ dependencies:
1818
- flask-cors == 4.0.0
1919
- flask_restx == 1.1.0
2020
- werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask.
21-
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.1
21+
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.5
22+
- pandas < 3.0 # pandas 3.0 uses Arrow backend by default, returning read-only arrays that break spikeinterface Phy extractor
2223
- neo == 0.14.1 # 0.14.2 is not compatible with neuroconv < 0.7.5
2324
- scikit-learn == 1.4.0 # Tutorial data generation
2425
- tqdm_publisher >= 0.0.1 # Progress bars

environments/environment-Windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ dependencies:
1818
- flask-cors === 3.0.10
1919
- flask_restx == 1.1.0
2020
- werkzeug < 3.0 # werkzeug 3.0 deprecates features used by flask 2.3.2. Remove this when updating flask.
21-
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.1
21+
- neuroconv[dandi,compressors,ecephys,ophys,behavior,text] == 0.6.5
22+
- pandas < 3.0 # pandas 3.0 uses Arrow backend by default, returning read-only arrays that break spikeinterface Phy extractor
2223
- neo == 0.14.1 # 0.14.2 is not compatible with neuroconv < 0.7.5
2324
- scikit-learn == 1.4.0 # Tutorial data generation
2425
- tqdm_publisher >= 0.0.1 # Progress bars

nwb-guide.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ modules_to_collect = [
4646
'ScanImageTiffReader',
4747
'deprecated',
4848
'probeinterface',
49+
'spikeinterface',
4950
]
5051
for module_name in modules_to_collect:
5152
collection = collect_all(module_name)

src/pyflask/manageNeuroconv/manage_neuroconv.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def coerce_schema_compliance_recursive(obj, schema):
205205

206206
def autocomplete_format_string(info: dict) -> str:
207207
from neuroconv.tools.path_expansion import construct_path_template
208-
from neuroconv.utils.json_schema import NWBMetaDataEncoder
208+
from neuroconv.utils.json_schema import _NWBMetaDataEncoder as NWBMetaDataEncoder
209209

210210
base_directory = info["base_directory"]
211211
filesystem_entry_path = info["path"]
@@ -240,7 +240,7 @@ def autocomplete_format_string(info: dict) -> str:
240240
def locate_data(info: dict) -> dict:
241241
"""Locate data from the specifies directories using fstrings."""
242242
from neuroconv.tools import LocalPathExpander
243-
from neuroconv.utils.json_schema import NWBMetaDataEncoder
243+
from neuroconv.utils.json_schema import _NWBMetaDataEncoder as NWBMetaDataEncoder
244244

245245
expander = LocalPathExpander()
246246

@@ -431,7 +431,7 @@ def map_interfaces(callback, converter, to_match: Union["BaseDataInterface", Non
431431

432432
def get_metadata_schema(source_data: Dict[str, dict], interfaces: dict) -> Dict[str, dict]:
433433
"""Function used to fetch the metadata schema from a CustomNWBConverter instantiated from the source_data."""
434-
from neuroconv.utils import NWBMetaDataEncoder
434+
from neuroconv.utils import _NWBMetaDataEncoder as NWBMetaDataEncoder
435435

436436
resolved_source_data = replace_none_with_nan(
437437
source_data, resolve_references(get_custom_converter(interfaces).get_source_schema())
@@ -1842,7 +1842,7 @@ def get_unit_table_json(interface) -> List[Dict[str, Any]]:
18421842
A convenience function for collecting and organizing the property values of the underlying sorting extractor.
18431843
"""
18441844

1845-
from neuroconv.utils import NWBMetaDataEncoder
1845+
from neuroconv.utils import _NWBMetaDataEncoder as NWBMetaDataEncoder
18461846

18471847
sorting = interface.sorting_extractor
18481848

@@ -1943,7 +1943,7 @@ def get_electrode_table_json(interface) -> List[Dict[str, Any]]:
19431943
A convenience function for collecting and organizing the property values of the underlying recording extractor.
19441944
"""
19451945

1946-
from neuroconv.utils import NWBMetaDataEncoder
1946+
from neuroconv.utils import _NWBMetaDataEncoder as NWBMetaDataEncoder
19471947

19481948
recording = interface.recording_extractor
19491949

0 commit comments

Comments
 (0)