Skip to content

Commit

Permalink
Adorn top-level files with a '.rst' suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Sep 14, 2023
1 parent 42f2c9f commit 655bd15
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ jobs:
sphinx-lint
--enable line-too-long
--max-line-length 85
CHANGES
AUTHORS.rst
CHANGES.rst
CODE_OF_CONDUCT.rst
CONTRIBUTING.rst
README.rst
doc/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type-check:

.PHONY: doclinter
doclinter:
sphinx-lint --enable line-too-long --max-line-length 85 CHANGES *.rst doc/
sphinx-lint --enable line-too-long --max-line-length 85 *.rst doc/

.PHONY: test
test:
Expand Down
2 changes: 1 addition & 1 deletion doc/authors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
Sphinx authors
==============

.. include:: ../AUTHORS
.. include:: ../AUTHORS.rst
2 changes: 1 addition & 1 deletion doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Changelog
\makeatother


.. include:: ../CHANGES
.. include:: ../CHANGES.rst
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def linkify_issues_in_changelog(app, docname, source):
""" Linkify issue references like #123 in changelog to GitHub. """

if docname == 'changes':
changelog_path = os.path.join(os.path.dirname(__file__), "../CHANGES")
changelog_path = os.path.join(os.path.dirname(__file__), "../CHANGES.rst")
# this path trickery is needed because this script can
# be invoked with different working directories:
# * running make in docs/
Expand All @@ -227,7 +227,7 @@ def linkify(match):

linkified_changelog = re.sub(r'(?:PR)?#([0-9]+)\b', linkify, changelog)

source[0] = source[0].replace('.. include:: ../CHANGES', linkified_changelog)
source[0] = source[0].replace('.. include:: ../CHANGES.rst', linkified_changelog)


def setup(app):
Expand Down
2 changes: 1 addition & 1 deletion doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

.. _examples:

.. include:: ../EXAMPLES
.. include:: ../EXAMPLES.rst
2 changes: 1 addition & 1 deletion doc/internals/code-of-conduct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

.. _code_of_conduct:

.. include:: ../../CODE_OF_CONDUCT
.. include:: ../../CODE_OF_CONDUCT.rst
4 changes: 2 additions & 2 deletions doc/internals/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ These are the basic steps needed to start developing on Sphinx.
Write your code along with tests that shows that the bug was fixed or that
the feature works as expected.

#. Add a bullet point to :file:`CHANGES` if the fix or feature is not trivial
#. Add a bullet point to :file:`CHANGES.rst` if the fix or feature is not trivial
(small doc updates, typo fixes), then commit::

git commit -m '#42: Add useful new feature that does this.'
Expand Down Expand Up @@ -142,7 +142,7 @@ Please follow these guidelines when writing code for Sphinx:

* Try to use the same code style as used in the rest of the project.

* For non-trivial changes, please update the :file:`CHANGES` file. If your
* For non-trivial changes, please update the :file:`CHANGES.rst` file. If your
changes alter existing behavior, please document this.

* New features should be documented. Include examples and use cases where
Expand Down
2 changes: 1 addition & 1 deletion doc/internals/organization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The following are some general guidelines for core developers:
in a good working state and that all tests pass before pushing your changes.

* When committing code written by someone else, please attribute the original
author in the commit message and any relevant :file:`CHANGES` entry.
author in the commit message and any relevant :file:`CHANGES.rst` entry.

Membership
~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion doc/internals/release-process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ Date Python
Release procedures
------------------

The release procedures are listed in ``utils/release-checklist``.
The release procedures are listed in :file:`utils/release-checklist.rst`.
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ name = "sphinx"

[tool.flit.sdist]
include = [
"LICENSE",
"AUTHORS",
"CHANGES",
"LICENSE.rst",
"AUTHORS.rst",
"CHANGES.rst",
# Documentation
"doc/",
"CODE_OF_CONDUCT", # used as an include in the Documentation
"EXAMPLES", # used as an include in the Documentation
"CODE_OF_CONDUCT.rst", # used as an include in the Documentation
"EXAMPLES.rst", # used as an include in the Documentation
# Tests
"tests/",
"tox.ini",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions utils/bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def add_release(self, version_info):
f'{RELEASE_TYPE.get(reltype, reltype)}{version_info[4] or ""}')
heading = 'Release %s (in development)' % version

with open(os.path.join(script_dir, 'CHANGES_template'), encoding='utf-8') as f:
with open(os.path.join(script_dir, 'CHANGES_template.rst'), encoding='utf-8') as f:
f.readline() # skip first two lines
f.readline()
tmpl = f.read()
Expand Down Expand Up @@ -166,7 +166,7 @@ def main():
options.version, options.in_develop)

with processing('Rewriting CHANGES'):
changes = Changes(os.path.join(package_dir, 'CHANGES'))
changes = Changes(os.path.join(package_dir, 'CHANGES.rst'))
if changes.version_info == options.version:
if changes.in_development:
changes.finalize_release_date()
Expand Down
File renamed without changes.

0 comments on commit 655bd15

Please sign in to comment.