Skip to content

Commit

Permalink
Doc Smallfix: Updated the BIDSPath in-place update method example (#1026
Browse files Browse the repository at this point in the history
)

* Updated the BIDSPath in-place update example

I updated the `BIDSPath` in-place update example to perhaps make it clearer to users what in-place updating means.
It's a small change, but should make the message clearer.

* Missing printout in BIDSPath example and indentation

* Remove additional tab at EOL

* Added datatype to BIDSPath update after #1030

Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>

* Added BHV name to CITATION.cff

Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
  • Loading branch information
bhvieira and sappelhoff authored Aug 26, 2022
1 parent 18999ca commit 3f77995
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ authors:
orcid: 'https://orcid.org/0000-0001-8316-7436'
- given-names: Anand
family-names: Saini
- given-names: Bruno
family-names: Hebling Vieira
affiliation: 'Methods of Plasticity Research, Department of Psychology, University of Zurich, Zurich, Switzerland'
orcid: 'https://orcid.org/0000-0002-8770-7396'
- given-names: Alexandre
family-names: Gramfort
affiliation: 'Université Paris-Saclay, Inria, CEA, Palaiseau, France'
Expand Down
9 changes: 7 additions & 2 deletions mne_bids/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,13 @@ def update(self, *, check=None, **kwargs):
>>> print(bids_path.basename)
sub-test_ses-two_task-mytask_channels.tsv
>>> # Then, one can update this `BIDSPath` object in place
>>> bids_path = bids_path.update(acquisition='test', suffix='ieeg',
... extension='.vhdr', task=None)
>>> bids_path.update(acquisition='test', suffix='ieeg',
... datatype='ieeg',
... extension='.vhdr', task=None)
BIDSPath(
root: None
datatype: ieeg
basename: sub-test_ses-two_acq-test_ieeg.vhdr)
>>> print(bids_path.basename)
sub-test_ses-two_acq-test_ieeg.vhdr
"""
Expand Down

0 comments on commit 3f77995

Please sign in to comment.