-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
DOC: document onset, duration, description, and ch_names attributes of mne.Annotations #13680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Famous077
wants to merge
32
commits into
mne-tools:main
Choose a base branch
from
Famous077:doc/annotations-onset-duration-description
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+195
−33
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
0f70809
DOC: document onset, duration, description, ch_names attrs of Annotat…
Famous077 31c138e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6cef5a6
DOC: trigger CircleCI build
Famous077 aa3c052
Merge branch 'doc/annotations-onset-duration-description' of https://…
Famous077 0de9d78
DOC: add validation to onset, duration, description setters
Famous077 9dab228
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 bd5e6ab
DOC: remove length validation from setters to avoid internal conflicts
Famous077 161838f
Merge branch 'doc/annotations-onset-duration-description' of https://…
Famous077 1edf047
DOC: fix contributor name format in changelog
Famous077 34c420f
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 2396495
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 5732911
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 5b59b56
DOC: fix changelog filename and add Famous077 to names.inc
Famous077 430e408
DOC: remove duplicate Famous Raj Bhat entry from names.inc
Famous077 74f44f6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 519c401
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 43adc6c
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 dd449ac
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 144bf1c
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 e80b4a4
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 05e6f66
DOC: fix setter validation for duration/description and fix contribut…
Famous077 a014f91
DOC: revert contributor name to Famous077 for consistency
Famous077 05ae8c3
Merge branch 'main' into doc/annotations-onset-duration-description
Famous077 b20ab9f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 58816a0
ENH: validate array lengths in onset/duration/description/ch_names se…
Famous077 a5aa6a0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 40ab2d2
FIX: use private attributes in HEDAnnotations __setstate__ to avoid s…
Famous077 9157d6d
DOC: add cross-reference hyperlinks in See Also sections and clarify …
Famous077 5db54f2
DOC: use :attr: cross-references in See Also sections of Annotations …
Famous077 eb45f5b
ENH: add length validation to _check_onset, fix description setter, m…
Famous077 dc2516d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8b5a5dc
FIX: add length validation to _check_duration and restore hed_string …
Famous077 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Document :attr:`~mne.Annotations.onset`, :attr:`~mne.Annotations.duration`, :attr:`~mne.Annotations.description`, and :attr:`~mne.Annotations.ch_names` attributes of :class:`mne.Annotations`, by `Famous077`_. |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any instances in which we pass
_check_onset(..., n=None).Do we really need to make it optional?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @scott-huberty , The n=None default is needed because _check_onset is called in two places - once inside _check_o_d_s_c_e without n, since length validation is handled there separately, and once in the onset setter with n=len(self._onset) to validate against existing duration. So making it optional lets us reuse the same function in both contexts without duplicating code. Happy to refactor if you prefer a different approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok!