Title: [MNT]: Specify ordering in file in gallery folder · Issue #25032 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Specify ordering in file in gallery folder · Issue #25032 · matplotlib/matplotlib
X Title: [MNT]: Specify ordering in file in gallery folder · Issue #25032 · matplotlib/matplotlib
Description: 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-gall...
Open Graph Description: 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 re...
X Description: 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 comme...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/25032
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Specify ordering in file in gallery folder","articleBody":"\u003e 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.\r\n_Originally posted by @QuLogic in https://github.com/matplotlib/matplotlib/issues/24746#issuecomment-1396482343_\r\n\r\nI think it's a relatively good first issue following #25028 because each readme can be parsed into its respective gallery list. Steps involved are \r\n1. figure out the reST comment notation that allows for easy specification of ordering + a consistent sentinel for placing unsorted files\r\n2. write a parser that translates the set of comments into a list that preserves the order (including sentinel)\r\n3. parse each file into its respective list in https://github.com/matplotlib/matplotlib/blob/be7ea76c49f19ce48958de82a82b3951d9b7f0d2/doc/sphinxext/gallery_order.py#L48\r\n4. add documentation on doing this ordering to https://github.com/matplotlib/matplotlib/blob/main/doc/devel/documenting_mpl.rst?plain=1#L933\r\n\r\nMedium 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](https://www.sphinx-doc.org/en/master/development/tutorials/index.html#extension-tutorials-index)\r\n\r\n And yes, down the line we should maybe spin a maintain docs page off from the writing docs page. \n\nAn alternative to using the readme is using a special purpose 'gallery_order' file https://github.com/matplotlib/matplotlib/issues/24746#issuecomment-1399116931\r\n ","author":{"url":"https://github.com/story645","@type":"Person","name":"story645"},"datePublished":"2023-01-19T16:58:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/25032/matplotlib/issues/25032"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:32dc35ac-5faf-86d9-7046-7d423ae767f4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C906:15F4EE:56D159:76CA08:6A527ED5 |
| html-safe-nonce | 59aa141ec8906b41072d1f6c0d0e9b3347f12546580883e21e6752abcb09234c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTA2OjE1RjRFRTo1NkQxNTk6NzZDQTA4OjZBNTI3RUQ1IiwidmlzaXRvcl9pZCI6IjQzMTEwOTc5NjY1ODY5MjA2NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6c245eadd1dc0124bf26b4c04014f1d4f90152920137ffa69e9c41ba5990d9fa |
| hovercard-subject-tag | issue:1549563250 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/25032/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c70b18ba5659d4259604d5e898515fa3d1c88bd425aa6115135d1a7da1201932/matplotlib/matplotlib/issues/25032 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c70b18ba5659d4259604d5e898515fa3d1c88bd425aa6115135d1a7da1201932/matplotlib/matplotlib/issues/25032 |
| og:image:alt | 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 re... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | story645 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width