Prevent absolute paths from propagating into EEGLAB setname#23
Merged
larsoner merged 2 commits intojackz314:mainfrom Jan 20, 2026
Merged
Prevent absolute paths from propagating into EEGLAB setname#23larsoner merged 2 commits intojackz314:mainfrom
larsoner merged 2 commits intojackz314:mainfrom
Conversation
4cef5ad to
9437eb3
Compare
Collaborator
|
Sounds totally reasonable, thanks @laemtl ! |
Collaborator
|
@laemtl can you fix the style issues? |
Contributor
Author
|
@larsoner Done! Not sure how are triggered the linting checks :) |
Collaborator
|
Thanks @laemtl ! |
Contributor
Author
|
@larsoner My pleasure! Can I ask when is scheduled the next release? I am using my fork in the meantime, but definitely want to rebase to the official repo as soon as it is available! |
Collaborator
|
Already cut 2h ago! https://pypi.org/project/eeglabio/0.1.3/ |
Contributor
Author
|
@larsoner Very impressive. Thank you!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When exporting EEGLAB .set files, users commonly pass an absolute path as fname.
This path propagates into EEG.setname, resulting in dataset names like:
/full/path/to/sub-01_task-rest.setThis makes EEGLAB datasets non-portable when files are moved or reorganized within a pipeline.
What this PR does
This change ensures that EEG.setname is derived only from the basename stem of fname:
• directory components are removed
• the file extension is stripped
Example:
This keeps dataset names portable while leaving all other export behavior unchanged.
Scope of change
Rationale
This aligns with common EEGLAB usage, where setname is a logical dataset identifier rather than a filesystem path, and improves downstream tooling (including MNE-based exports).