Skip to content

Don't follow symlinks when storing extractor paths - #4812

Merged
alejoe91 merged 1 commit into
SpikeInterface:mainfrom
h-mayorquin:fix_paths_and_tesgs
Oct 2, 2026
Merged

alejoe91 merged 1 commit into
SpikeInterface:mainfrom
h-mayorquin:fix_paths_and_tesgs

Conversation

@h-mayorquin

Copy link
Copy Markdown
Contributor

This is the solution for the failing tests on #4809 @alejoe91.

As mentioned, the reason the tests fail there is that with the recent changes on gin the annexed files are stored locked, as symlinks, and the resolve() on the extractor kwargs follows them. So the Intan path goes from a name like intan/intan_fpc_test_231117_052630/info.rhd to a name like .git/annex/objects/vf/J8/MD5E-s8082--faf8e5811c5e68da6c2fec030f6bb0f9.rhd/MD5E-s8082--faf8e5811c5e68da6c2fec030f6bb0f9.rhd. After unpickling neo no longer sees a file named info.rhd so it doesn't look for the amplifier.dat and time.dat files next to it and the recording comes back with 0 samples (NeuroNexus has the same problem with its _data.xdat file).

The solution is to use absolute() instead of resolve() which is what most of the extractors already do. This PR does that for the 12 places that used resolve().

I think that relative dumps and containers have the same problem but solving them needs more than absolute() but this will have to wait. I will open an issue when I have some time.

@h-mayorquin h-mayorquin self-assigned this Oct 2, 2026
@h-mayorquin
h-mayorquin requested a review from alejoe91 October 2, 2026 02:50
@alejoe91 alejoe91 added the extractors Related to extractors module label Oct 2, 2026
@alejoe91

alejoe91 commented Oct 2, 2026

Copy link
Copy Markdown
Member

I think that relative dumps and containers have the same problem but solving them needs more than absolute() but this will have to wait. I will open an issue when I have some time.

I think this is an issue only for the testing suite. Using locked annexed files in containers is not a use case I would take into consideration

@alejoe91
alejoe91 merged commit 1666a0e into SpikeInterface:main Oct 2, 2026
20 checks passed
@h-mayorquin
h-mayorquin deleted the fix_paths_and_tesgs branch October 2, 2026 14:32
@h-mayorquin

Copy link
Copy Markdown
Contributor Author

Yes, actually, it is a problem that requires 1) simlinks to another mounts (which I use) but also 2) renaming (which only git-annex does).

I think this fix here is probably enough until we get a user case of it breaking beyond it.

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.

2 participants