-
Notifications
You must be signed in to change notification settings - Fork 92
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
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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1321 +/- ##
==========================================
- Coverage 97.47% 97.42% -0.06%
==========================================
Files 40 40
Lines 8876 8883 +7
==========================================
+ Hits 8652 8654 +2
- Misses 224 229 +5 ☔ View full report in Codecov by Sentry. |
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.
@drammock I pushed a commit making sphing_gallery master a temporary dependency (until their next release). Tests seem to pass and everything is looking good. Thanks for your work!
Was there anything you wanted to add? If not, please feel free to merge!
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: