Skip to content

Commit 81d8afd

Browse files
drammocksappelhoff
andauthored
Control example order via explicit list, not via sorting titles (#1321)
* remove numbers from all example titles * sort examples via JSON file, not title * nest JSON loading so it isn't attempted on import * clearer docstring * use sphinx-gallery master --------- Co-authored-by: Stefan Appelhoff <[email protected]>
1 parent 2b9b8cc commit 81d8afd

18 files changed

+77
-44
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
},
186186
"backreferences_dir": "generated",
187187
"examples_dirs": "../examples",
188-
"within_subsection_order": "ExampleTitleSortKey",
188+
"within_subsection_order": "mne_bids.utils._example_sorter",
189189
"gallery_dirs": "auto_examples",
190190
"filename_pattern": "^((?!sgskip).)*$",
191191
}

doc/example_order.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
"read_bids_datasets.py",
3+
"convert_mne_sample.py",
4+
"mark_bad_channels.py",
5+
"convert_eeg_to_bids.py",
6+
"convert_group_studies.py",
7+
"rename_brainvision_files.py",
8+
"convert_mri_and_trans.py",
9+
"convert_ieeg_to_bids.py",
10+
"convert_nirs_to_bids.py",
11+
"convert_empty_room.py",
12+
"bidspath.py",
13+
"create_bids_folder.py",
14+
"update_bids_datasets.py",
15+
"anonymize_dataset.py"
16+
]

examples/anonymize_dataset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
==============================
3-
13. Anonymizing a BIDS dataset
4-
==============================
2+
==========================
3+
Anonymizing a BIDS dataset
4+
==========================
55
66
Consider the following scenario:
77

examples/bidspath.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
.. _bidspath-example:
33
4-
===============================
5-
10. An introduction to BIDSPath
6-
===============================
4+
===========================
5+
An introduction to BIDSPath
6+
===========================
77
88
BIDSPath is MNE-BIDS's working horse when it comes to file and folder
99
operations. Learn here how to use it.

examples/convert_eeg_to_bids.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
===================================
3-
04. Convert EEG data to BIDS format
4-
===================================
2+
===============================
3+
Convert EEG data to BIDS format
4+
===============================
55
66
In this example, we use MNE-BIDS to create a BIDS-compatible directory of EEG
77
data. Specifically, we will follow these steps:

examples/convert_empty_room.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
.. _ex-convert-empty-room:
33
4-
====================================
5-
09. Manually storing empty room data
6-
====================================
4+
================================
5+
Manually storing empty room data
6+
================================
77
88
This example demonstrates how to store empty room data "manually" in the BIDS
99
format and how to retrieve them.

examples/convert_group_studies.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
=====================================
3-
05. BIDS conversion for group studies
4-
=====================================
2+
=================================
3+
BIDS conversion for group studies
4+
=================================
55
66
Here, we show how to do BIDS conversion for group studies.
77
We will use the

examples/convert_ieeg_to_bids.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
44
.. currentmodule:: mne_bids
55
6-
====================================
7-
08. Convert iEEG data to BIDS format
8-
====================================
6+
================================
7+
Convert iEEG data to BIDS format
8+
================================
99
1010
In this example, we use MNE-BIDS to create a BIDS-compatible directory of iEEG
1111
data. Specifically, we will follow these steps:

examples/convert_mne_sample.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
44
.. _ex-convert-mne-sample:
55
6-
==========================================
7-
02. Convert MNE sample data to BIDS format
8-
==========================================
6+
======================================
7+
Convert MNE sample data to BIDS format
8+
======================================
99
1010
In this example we will use MNE-BIDS to organize the MNE sample data according
1111
to the BIDS standard.

examples/convert_mri_and_trans.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
==============================================================================
3-
07. Save and load T1-weighted MRI scan along with anatomical landmarks in BIDS
4-
==============================================================================
2+
==========================================================================
3+
Save and load T1-weighted MRI scan along with anatomical landmarks in BIDS
4+
==========================================================================
55
66
When working with MEEG data in the domain of source localization, we usually
77
have to deal with aligning several coordinate systems, such as the coordinate

0 commit comments

Comments
 (0)