Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Sort examples by title, not by filename. #14953

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

Closed
wants to merge 1 commit into from

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 1, 2019

Sorting by filename results in a gallery nearly ordered by title, but
not really (because most title names are directly derived from the
filename, with some exceptions), which is slightly jarring.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Sorting by filename results in a gallery nearly ordered by title, but
not really (because most title names are directly derived from the
filename, with some exceptions), which is slightly jarring.
@jklymak
Copy link
Member

jklymak commented Aug 1, 2019

Yeah the only problem w this is we can’t control the order of tutorials?

@anntzer
Copy link
Contributor Author

anntzer commented Aug 1, 2019

Aren't they still sorted by the explicit_subsection_order?

@ImportanceOfBeingErnest
Copy link
Member

If I remember correctly I did think about this in #11257 but decided for filenames instead of titles, because filenames are actually more likely to give the desired order.

E.g.

filename title
bar_stacked.py Stacked Bar Graph
barchart.py Grouped bar chart with labels
barh.py Horizontal bar chart

@anntzer
Copy link
Contributor Author

anntzer commented Aug 1, 2019

I guess this basically depends on to what extent the examples have good filenames vs. sortable titles... The problem with filenames is that we can't even change them (link rot etc.) whereas we can at least try to reword the titles to make them sortable.

In any case I'm not extremely attached to the proposal here either.

@ImportanceOfBeingErnest
Copy link
Member

That's what the list_all is for; if someone feels strongly about a certain order they can fill in that list. Or we could create a good-first-issue to invite someone to do it for all examples.

@tacaswell tacaswell added this to the v3.3.0 milestone Aug 12, 2019
@NelleV
Copy link
Member

NelleV commented Sep 5, 2019

It is also easier to change the filenames to match the wished order than to find good title names that also preserve the order we want. I'm 👎 on that one.

@NelleV NelleV added the status: needs comment/discussion needs consensus on next step label Sep 5, 2019
@anntzer
Copy link
Contributor Author

anntzer commented Sep 5, 2019

I'm not particularly attached to this PR, was just a suggestion.

@anntzer anntzer closed this Sep 5, 2019
@anntzer anntzer deleted the sortorder branch September 5, 2019 10:19
@tacaswell tacaswell modified the milestones: v3.3.0, unassigned Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants