Skip to content

Fix cbin_file_path#3524

Merged
alejoe91 merged 4 commits intoSpikeInterface:mainfrom
alejoe91:fix-cbin-file-path
Nov 19, 2024
Merged

Fix cbin_file_path#3524
alejoe91 merged 4 commits intoSpikeInterface:mainfrom
alejoe91:fix-cbin-file-path

Conversation

@alejoe91
Copy link
Copy Markdown
Member

@alejoe91 alejoe91 commented Nov 7, 2024

Fixes #3523

@alejoe91 alejoe91 added the extractors Related to extractors module label Nov 7, 2024
if cbin_file is None:
if cbin_file is not None:
warnings.warn(
"The `cbin_file` argument is deprecated, please use `cbin_file_path` instead", DeprecationWarning
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we need a stack level for this? I forget?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

Comment thread src/spikeinterface/extractors/cbin_ibl.py Outdated
"folder_path": str(Path(folder_path).resolve()),
"load_sync_channel": load_sync_channel,
"cbin_file": str(Path(cbin_file).resolve()),
"cbin_file_path": str(Path(cbin_file_path).resolve()),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more question because I forget the json mechanics. Is this breaking for trying to read the extractor or will this just work?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this is back compatible since we kept both arguments

Copy link
Copy Markdown
Member

@zm711 zm711 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would be nice for provenance to explain why this PR worked. The changes here by themselves don't make sense without doing that the tools scan for "path" in the name. I guess in the future people can read my comment and the issue.

But as the user said this fixes it.

Copy link
Copy Markdown
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I would suggest adding the date on the deprecation warnings so we eventually remove them. and a minor typing thing on the docstring.

Comment thread src/spikeinterface/extractors/cbin_ibl.py Outdated
if cbin_file is None:
if cbin_file is not None:
warnings.warn(
"The `cbin_file` argument is deprecated, please use `cbin_file_path` instead",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's say when?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately I think we'll have to keep this forever because of back-compatibility...

Co-authored-by: Heberto Mayorquin <h.mayorquin@gmail.com>
@alejoe91 alejoe91 merged commit ad45248 into SpikeInterface:main Nov 19, 2024
@alejoe91 alejoe91 deleted the fix-cbin-file-path branch March 20, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extractors Related to extractors module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CompressedBinaryIblExtractor does not save cbin_file relative

3 participants