8000 MNT: Rename README.rst to GALLERY_HEADER.rst by timhoffm · Pull Request #1321 · sphinx-gallery/sphinx-gallery · GitHub
[go: up one dir, main page]

Skip to content

MNT: Rename README.rst to GALLERY_HEADER.rst #1321

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

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

timhoffm
Copy link
Contributor
@timhoffm timhoffm commented Jun 5, 2024

Closes #1209.

Comments:

  • All existing README variants are still supported without deprecation. Documentation is rewritten to consistently use
    GALLERY_HEADER and mention backward compatibility with README.
  • I've chosen the capitalized form GALLERY_HEADER because it stands out more between all the example files. If you rather keep it lowercase, that'd be fine as well, but to keep it more standardized, I suggest not to support both.
  • I've chosen to still support all extensions that README supported ('txt' plus sphinx_gallery_conf["source_suffix"]), but except for a full definition in configuration.rst, I only use GALLERY_HEADER.rst everywhere in the docs. This is to converge to one default, and .rst seems better because the content must be ReST. (Not quite whether Markdown could be added as an alternative, but if so, it's still clearer that you switch to GALLERY_HEADER.md rather than keep using GALLERY_HEADER.txt but having to switch it's content to Markdown.

Open issues:

  • Tests still only contain the README. Is it ok to just switch to to GALLERY_HEADER or do we need to test both variants (which would be more work?
  • Is there a place to write a specific change note on this or is the PR title in https://sphinx-gallery.github.io/stable/changes.html all we have? - If the latter, do you want any specific wording?

@timhoffm timhoffm marked this pull request as draft June 5, 2024 10:21
@timhoffm timhoffm force-pushed the gallery_header_file branch from c2b2216 to 14546bd Compare June 5, 2024 10:33
@timhoffm timhoffm marked this pull request as ready for review June 5, 2024 11:05
@lucyleeow
Copy link
Contributor

For these name change improvements (also #1315) I wonder if we should go through a deprecation cycle and then deprecate the old names?

@timhoffm
Copy link
Contributor Author
timhoffm commented Jun 5, 2024

I wasn't sure how much effort you want burden on existing projects. Sure, the change is quite easy and projects should be able to control which version they use for building, but OTOH every project has to adapt their config.
Deprecation would make the docs simpler, because we don't have to keep the filename variants around. It also makes it easier not to support GALLERY_HEADER.txt, which I've basically accepted for simplicity of the code. And finally, we may get away with just switching the tests to GALLERY_HEADER and leave README untested for the deprecation period.

If a deprecation is acceptable, I'm happy to add it. However, I suggest to collect all possible deprecations (this and #1315) so that they land in one release and projects only have to adapt once, not piecemeal across multiple releases. Therefore, let's now decide whether deprecation is planned, but defer the actual deprecation to a separate PR, that comes after #1315 and ensures all deprecations land in one release.

@larsoner
Copy link
Contributor
larsoner commented Jun 5, 2024

I don't think it's a lot of for us to maintain to keep backward compat here. On the other hand it will require a lot of code churn for people at the other end for what is a pretty small gain in consistency/readibility. So I'm not convinced deprecation is worth the pain we'd inflict here.

@timhoffm
Copy link
Contributor Author
timhoffm commented Jun 5, 2024

Ok, let's not deprecate for now. Could be a v1.0 topic.

@timhoffm timhoffm force-pushed the gallery_header_file branch 4 times, most recently from df166e3 to 1532783 Compare June 5, 2024 23:16
Copy link
Contributor
@lucyleeow lucyleeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Just a nit

timhoffm added 2 commits June 6, 2024 09:19
mostly; keep some tests for README for ensuring
backward compatibility
@timhoffm timhoffm force-pushed the gallery_header_file branch from 1156b32 to aa4a405 Compare June 6, 2024 07:19
@lucyleeow lucyleeow merged commit 0903dbe into sphinx-gallery:master Jun 11, 2024
17 checks passed
@lucyleeow
Copy link
Contributor

Sorry forgot about this. Thanks @timhoffm !

@timhoffm timhoffm deleted the gallery_header_file branch June 11, 2024 04:21
clrpackages referenced this pull request in clearlinux-pkgs/pypi-sphinx_gallery Jul 23, 2024
… to version 0.17.0

v0.17.0
-------

Support for Python 3.8 and Sphinx 4 dropped in this release.
Requirement is now Python >= 3.9 and Sphinx >= 5.

**Implemented enhancements:**

-  Introduction tooltip corresponds to the first paragraph `#1344 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1344>`__ (`fgmacedo <https://github.com/fgmacedo>`__)
-  FIX Jupyterlite in CircleCI artifact `#1336 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1336>`__ (`lesteve <https://github.com/lesteve>`__)
-  MNT: Rename README.rst to GALLERY_HEADER.rst `#1321 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1321>`__ (`timhoffm <https://github.com/timhoffm>`__)
-  [ENH] Add custom thumbnails for failing examples `#1313 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1313>`__ (`tsbinns <https://github.com/tsbinns>`__)
-  ENH integrate download/launcher links into ``pydata-sphinx-theme`` secondary sidebar `#1312 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1312>`__ (`Charlie-XIAO <https://github.com/Charlie-XIAO>`__)
-  add option for zip downloads `#1299 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1299>`__ (`jamiecook <https://github.com/jamiecook>`__)
-  Allow setting animation format from gallery config `#1243 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1243>`__ (`QuLogic <https://github.com/QuLogic>`__)

(NEWS truncated at 15 lines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename README.rst to gallery_header.rst
3 participants
0