Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[MNT]: Specify ordering in file in gallery folder #25032

Copy link
Copy link
Open
@story645

Description

@story645
Issue body actions

Since we wrote this extension to do the ordering, there's no reason we can't change it to read from README.txt in each directory. We could have it look for something that looks like a comment to reST so it does nothing in the sphinx-gallery-processed reST without having to do anything extra.
Originally posted by @QuLogic in #24746 (comment)

I think it's a relatively good first issue following #25028 because each readme can be parsed into its respective gallery list. Steps involved are

  1. figure out the reST comment notation that allows for easy specification of ordering + a consistent sentinel for placing unsorted files
  2. write a parser that translates the set of comments into a list that preserves the order (including sentinel)
  3. parse each file into its respective list in
    folder_lists = [examples_order, tutorials_order, plot_types_order]
  4. add documentation on doing this ordering to https://github.com/matplotlib/matplotlib/blob/main/doc/devel/documenting_mpl.rst?plain=1#L933

Medium difficulty because some familiarity with sphinx would be helpful, but not strictly necessary. I think a medium to advanced version of this would be implementing a .. gallery-toc custom directive

And yes, down the line we should maybe spin a maintain docs page off from the writing docs page.

An alternative to using the readme is using a special purpose 'gallery_order' file #24746 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesDocumentation: buildbuilding the docsbuilding the docsGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.