Skip to content

Commit

Permalink
correct kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Nov 23, 2023
1 parent 292fb4c commit 59da3f8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/spikeinterface/extractors/nwbextractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def read_nwbfile(
file_path: str | Path,
stream_mode: Literal["ffspec", "ros3"] | None = None,
cache: bool = True,
stream_cache_path: str | Path | bool = True,
stream_cache_path: str | Path | None = None,
) -> NWBFile:
"""
Read an NWB file and return the NWBFile object.
Expand All @@ -87,7 +87,8 @@ def read_nwbfile(
If True, the file is cached in the file passed to stream_cache_path
if False, the file is not cached.
stream_cache_path : str or None, default: None
The path to the cache storage
The path to the cache storage, when default to None it uses the a temporary
folder.
Returns
-------
nwbfile : NWBFile
Expand Down Expand Up @@ -452,7 +453,7 @@ class NwbSortingExtractor(BaseSorting):
If True, the file is cached in the file passed to stream_cache_path
if False, the file is not cached.
stream_cache_path: str or Path or None, default: None
Local path for caching. If None it uses cwd
Local path for caching. If None it uses the system temporary directory.
Returns
-------
Expand Down Expand Up @@ -539,7 +540,9 @@ def __init__(
if stream_mode not in ["fsspec", "ros3"]:
file_path = str(Path(file_path).absolute())
if stream_mode == "fsspec":
stream_cache_path = str(Path(self.stream_cache_path).absolute())
# only add stream_cache_path to kwargs if it was passed as an argument
if stream_cache_path is not None:
stream_cache_path = str(Path(self.stream_cache_path).absolute())
self._kwargs = {
"file_path": file_path,
"electrical_series_name": self._electrical_series_name,
Expand Down

0 comments on commit 59da3f8

Please sign in to comment.