Repository navigation
Use more intersphinx references & format some links #975
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
Changes from all commits
526ee6d
0c30fba
32f3585
608f286
920c1d3
248a843
e497eb0
f8a55b2
6bdad46
61883a2
7260424
4999c87
a586711
095c966
ca1f735
bb31ffd
b018b14
81823d3
b9a4026
163b5d8
540cc9c
7f3e3b0
adc735d
dbd6d70
c3f7a25
e76c7ed
a5a1ef8
3028d82
ebc217b
62c3982
954931a
1461529
551c562
56297b6
1680240
32681d3
42f8d15
d48a533
f66e402
8d3e77f
6d94b2f
9857621
1edc007
20491e1
1ebe9db
445d609
b046f7f
58fd7bb
f49cf51
fffbed2
c458033
b82a3cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,7 @@ setup.py | |
|
|
||
| The most important file is :file:`setup.py` which exists at the root of your | ||
| project directory. For an example, see the `setup.py | ||
| <https://github.com/pypa/sampleproject/blob/master/setup.py>`_ in the `PyPA | ||
| <https://github.com/pypa/sampleproject/blob/main/setup.py>`_ in the `PyPA | ||
| sample project <https://github.com/pypa/sampleproject>`_. | ||
|
|
||
| :file:`setup.py` serves two primary functions: | ||
|
|
@@ -78,7 +78,7 @@ setup.cfg | |
|
|
||
| :file:`setup.cfg` is an ini file that contains option defaults for | ||
| :file:`setup.py` commands. For an example, see the `setup.cfg | ||
| <https://github.com/pypa/sampleproject/blob/master/setup.cfg>`_ in the `PyPA | ||
| <https://github.com/pypa/sampleproject/blob/main/setup.cfg>`_ in the `PyPA | ||
| sample project <https://github.com/pypa/sampleproject>`_. | ||
|
|
||
|
|
||
|
|
@@ -87,13 +87,13 @@ README.rst / README.md | |
|
|
||
| All projects should contain a readme file that covers the goal of the project. | ||
| The most common format is `reStructuredText | ||
| <http://docutils.sourceforge.net/rst.html>`_ with an "rst" extension, although | ||
| <https://docutils.sourceforge.io/rst.html>`_ with an "rst" extension, although | ||
| this is not a requirement; multiple variants of `Markdown | ||
| <https://daringfireball.net/projects/markdown/>`_ are supported as well (look | ||
| at ``setup()``'s :ref:`long_description_content_type <description>` argument). | ||
|
|
||
| For an example, see `README.md | ||
| <https://github.com/pypa/sampleproject/blob/master/README.md>`_ from the `PyPA | ||
| <https://github.com/pypa/sampleproject/blob/main/README.md>`_ from the `PyPA | ||
| sample project <https://github.com/pypa/sampleproject>`_. | ||
|
|
||
| .. note:: Projects using :ref:`setuptools` 0.6.27+ have standard readme files | ||
|
|
@@ -113,7 +113,7 @@ writing a :file:`MANIFEST.in` file, including a list of what's included by | |
| default, see ":ref:`Using MANIFEST.in`". | ||
|
|
||
| For an example, see the `MANIFEST.in | ||
| <https://github.com/pypa/sampleproject/blob/master/MANIFEST.in>`_ from the `PyPA | ||
| <https://github.com/pypa/sampleproject/blob/main/MANIFEST.in>`_ from the `PyPA | ||
| sample project <https://github.com/pypa/sampleproject>`_. | ||
|
|
||
| .. note:: :file:`MANIFEST.in` does not affect binary distributions such as wheels. | ||
|
|
@@ -128,7 +128,7 @@ If you're unsure which license to choose, you can use resources such as | |
| `GitHub's Choose a License <https://choosealicense.com/>`_ or consult a lawyer. | ||
|
|
||
| For an example, see the `LICENSE.txt | ||
| <https://github.com/pypa/sampleproject/blob/master/LICENSE.txt>`_ from the `PyPA | ||
| <https://github.com/pypa/sampleproject/blob/main/LICENSE.txt>`_ from the `PyPA | ||
| sample project <https://github.com/pypa/sampleproject>`_. | ||
|
|
||
| <your package> | ||
|
|
@@ -139,7 +139,7 @@ Python modules and packages under a single top-level package that has the same | |
| :ref:`name <setup() name>` as your project, or something very close. | ||
|
|
||
| For an example, see the `sample | ||
| <https://github.com/pypa/sampleproject/tree/master/src/sample>`_ package that's | ||
| <https://github.com/pypa/sampleproject/tree/main/src/sample>`_ package that's | ||
| included in the `PyPA sample project <https://github.com/pypa/sampleproject>`_. | ||
|
|
||
|
|
||
|
|
@@ -154,7 +154,7 @@ specific details of your project are defined. | |
|
|
||
| The most relevant arguments are explained below. Most of the snippets given are | ||
| taken from the `setup.py | ||
| <https://github.com/pypa/sampleproject/blob/master/setup.py>`_ contained in the | ||
| <https://github.com/pypa/sampleproject/blob/main/setup.py>`_ contained in the | ||
| `PyPA sample project <https://github.com/pypa/sampleproject>`_. | ||
|
|
||
|
|
||
|
|
@@ -237,7 +237,7 @@ A `content type | |
| can be specified with the ``long_description_content_type`` argument, which can | ||
| be one of ``text/plain``, ``text/x-rst``, or ``text/markdown``, corresponding | ||
| to no formatting, `reStructuredText (reST) | ||
| <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#reference-names>`_, | ||
| <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#reference-names>`_, | ||
| and the Github-flavored Markdown dialect of `Markdown | ||
| <https://daringfireball.net/projects/markdown/>`_ respectively. | ||
|
|
||
|
|
@@ -476,8 +476,8 @@ and it is interpreted relative to the installation prefix | |
| Each file name in ``files`` is interpreted relative to the :file:`setup.py` | ||
| script at the top of the project source distribution. | ||
|
|
||
| For more information see the distutils section on `Installing Additional Files | ||
| <http://docs.python.org/3/distutils/setupscript.html#installing-additional-files>`_. | ||
| For more information see the distutils section on :ref:`Installing Additional Files | ||
| <python:distutils-additional-files>`. | ||
|
|
||
| .. note:: | ||
|
|
||
|
|
@@ -490,8 +490,8 @@ For more information see the distutils section on `Installing Additional Files | |
| ``scripts`` | ||
| ~~~~~~~~~~~ | ||
|
|
||
| Although ``setup()`` supports a `scripts | ||
| <http://docs.python.org/3/distutils/setupscript.html#installing-scripts>`_ | ||
| Although ``setup()`` supports a :ref:`scripts | ||
| <python:distutils-installing-scripts>` | ||
| keyword for pointing to pre-made scripts to install, the recommended approach to | ||
| achieve cross-platform compatibility is to use :ref:`console_scripts` entry | ||
| points (see below). | ||
|
|
@@ -576,7 +576,7 @@ Semantic versioning (preferred) | |
| ******************************* | ||
|
|
||
| For new projects, the recommended versioning scheme is based on `Semantic Versioning | ||
| <http://semver.org>`_, but adopts a different approach to handling pre-releases and | ||
| <https://semver.org/>`_, but adopts a different approach to handling pre-releases and | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should prefer links without a trailing slash for the site roots. |
||
| build metadata. | ||
|
|
||
| The essence of semantic versioning is a 3-part MAJOR.MINOR.MAINTENANCE numbering scheme, | ||
|
|
@@ -592,7 +592,7 @@ Adopting this approach as a project author allows users to make use of :pep:`"co | |
| a matching MAJOR version. | ||
|
|
||
| Python projects adopting semantic versioning should abide by clauses 1-8 of the | ||
| `Semantic Versioning 2.0.0 specification <http://semver.org>`_. | ||
| `Semantic Versioning 2.0.0 specification <https://semver.org/>`_. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (same as above)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, consider declaring detached links and reusing them in text.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. However, they have different names, which one is
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. `new name <old name_>`_
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems that it doesn't work? I got an error from Sphinx:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds like you forgot a trailing underscore. |
||
|
|
||
| Date based versioning | ||
| ********************* | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to the extlinks defined in
conf.py, it's also possible to link GitHub viaThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find any
:gh:in the docs, should I make all references of Github use:gh:?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not in the docs. The built-in extlinks Sphinx extension allows defining arbitrary simple roles. You can find the mapping with all of the project-specific definitions in
conf.py.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use it across the project but only update the links that were broken. Updating anything beyond that is out of the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you plan to change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer changing this in separate PR.