-
Notifications
You must be signed in to change notification settings - Fork 87
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
Control example order via explicit list, not via sorting titles #1321
base: main
Are you sure you want to change the base?
Conversation
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.
quick self-review to call out / fix a couple things
"rename_brainvision_files.py", | ||
"convert_mri_and_trans.py", | ||
"convert_ieeg_to_bids.py", | ||
"convert_nirs_to_bids.py", |
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.
this is the one that was previously a duplicate "13" and appearing last. I thought it made more sense to group it with other "converting XXX to BIDS" examples.
Aside: if anyone has strong feelings about order / wants to take this opportunity to shuffle the order a bit more, feel free to push a commit changing this file.
mne_bids/utils.py
Outdated
# better example sorting, without relying on numbers in example titles | ||
with open(Path(__file__).parents[1] / "doc" / "example_order.json") as fid: | ||
EXAMPLE_ORDER = json.load(fid) |
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.
NB: the JSON file won't be included in the built wheel, but that shouldn't matter as it's only needed when building our docs, so we can assume a clone of the repo in that case.
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.
Great, thanks a lot Dan. I like the changes, +1 to merge once CIs are green.
just a note that this needs sphinx-gallery/sphinx-gallery#1391 before the CIs will pass. |
PR Description
This PR removes numbering from the titles of the examples, and switches the example ordering heuristic from relying on the (no-longer-numbered) titles, to instead relying on a JSON file containing example filenames in a fixed order. Motivation is that:
Safeguards:
closes #1320
Merge checklist
Maintainer, please confirm the following before merging.
If applicable: