mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Adorn top-level files with a '.rst' suffix
This commit is contained in:
parent
42f2c9fe98
commit
655bd15749
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@ -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/
|
||||
|
2
Makefile
2
Makefile
@ -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:
|
||||
|
@ -6,4 +6,4 @@
|
||||
Sphinx authors
|
||||
==============
|
||||
|
||||
.. include:: ../AUTHORS
|
||||
.. include:: ../AUTHORS.rst
|
||||
|
@ -19,4 +19,4 @@ Changelog
|
||||
\makeatother
|
||||
|
||||
|
||||
.. include:: ../CHANGES
|
||||
.. include:: ../CHANGES.rst
|
||||
|
@ -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/
|
||||
@ -227,7 +227,7 @@ def linkify_issues_in_changelog(app, docname, source):
|
||||
|
||||
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):
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
.. _examples:
|
||||
|
||||
.. include:: ../EXAMPLES
|
||||
.. include:: ../EXAMPLES.rst
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
.. _code_of_conduct:
|
||||
|
||||
.. include:: ../../CODE_OF_CONDUCT
|
||||
.. include:: ../../CODE_OF_CONDUCT.rst
|
||||
|
@ -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.'
|
||||
@ -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
|
||||
|
@ -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
|
||||
~~~~~~~~~~
|
||||
|
@ -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`.
|
||||
|
@ -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",
|
||||
|
@ -129,7 +129,7 @@ class Changes:
|
||||
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()
|
||||
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user