-
Notifications
You must be signed in to change notification settings - Fork 370
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
Add custom Sphinx extension that lists examples based on model name #2859
Add custom Sphinx extension that lists examples based on model name #2859
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.
I think sorting the list of files by title text rather than the filenames is more useful. I see that it's listed as a TODO in this PR. Is that planned to be addressed here?
@pnbabu I finally managed to sort the examples by title; this required a fair bit of reworking the extension script so its quite different now |
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.
Looks good to me! This list is super helpful for someone browsing through the models. I think we could add the directive to all model files once you have approval from other reviewers as well.
…ulator into add-ext-sphinx
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.
Two bytes to cut, then I think it's ready to go.
Thanks for the cool upgrade! 👍
Co-authored-by: Dennis Terhorst <[email protected]>
This PR adds a custom Sphinx extension that displays a list of examples based on model name.
How to use it
Add directive to reStructured Text with required argument - the model_name:
.. listexamples:: model_name
This was used in
models/iaf_psc_alpha.h
andaeif_cond_alpha
See output here
Updated
TODO