Skip to content
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

Resurrect docs interlinking #2427

Merged
merged 5 commits into from Oct 17, 2020

Conversation

webknjaz
Copy link
Member

Summary of changes

This change eliminates all the sphinx warnings and recovers
all the broken interdoc references, and gets rid of the
syntactic typos.

Fixes #2424

Pull Request Checklist

  • Changes have tests
  • News fragment added in changelog.d. See documentation for details

@webknjaz
Copy link
Member Author

This change includes a commit from #2425 so if it's accepted earlier, it's okay to close that PR.

I've recovered references to orphans in order for nitpicks to be satisfied. I hope that @alvyjudy will clean that up once we have automatic breakage enforcement in place. I've also noticed some document duplicates that will probably need to be dropped but I'm not trying to decide on any refactoring as a part of this PR: I just want the build to be green and correct.

In general, this should prevent contributors from supporting broken docs.

@@ -31,5 +31,4 @@ setuptools changes. You have been warned.
:maxdepth: 1

developer-guide
formats
Copy link
Member Author

Choose a reason for hiding this comment

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

This one was renamed to python_eggs and is currently linked from deprecated/index TOC.

Comment on lines +13 to +17
build_meta
pkg_resources
references/keywords
roadmap
setuptools
Copy link
Member Author

Choose a reason for hiding this comment

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

I've linked the orphans here but they'll need to be cleaned up separately. I think it's out of scope of this PR.

cc @alvyjudy

Comment on lines +1 to +4
========
Keywords
========

Copy link
Member Author

Choose a reason for hiding this comment

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

Needed to be linkable from TOC

To peek into how this legacy keyword is used, consult our :ref:`guide on
deprecated practice (WIP)`
To peek into how this legacy keyword is used, consult our :doc:`guide on
deprecated practice (WIP) <../deprecated/index>`
Copy link
Member Author

@webknjaz webknjaz Oct 15, 2020

Choose a reason for hiding this comment

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

best guess since archeology wasn't helpful

Example WIP
Copy link
Member Author

Choose a reason for hiding this comment

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

cc @alvyjudy ^

@@ -46,7 +46,7 @@ that were built most recently.

If you have to manage automated builds for multiple packages, each with
different tagging and rotation policies, you may also want to check out the
`alias`_ command, which would let each package define an alias like ``daily``
:ref:`alias <alias>` command, which would let each package define an alias like ``daily``
Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly, the markup for the commands has to be remade to use the built-in command/option roles but I just used the existing labels for now. Quick and dirty.

Comment on lines +27 to +28
functionalities_rewrite
miscellaneous
Copy link
Member Author

Choose a reason for hiding this comment

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

@alvyjudy this may need a careful cleanup in the future

@@ -8,19 +8,19 @@ unless you need the associated ``setuptools`` feature.
``include_package_data``
If set to ``True``, this tells ``setuptools`` to automatically include any
data files it finds inside your package directories that are specified by
your ``MANIFEST.in`` file. For more information, see the section below on
Copy link
Member Author

Choose a reason for hiding this comment

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

@alvyjudy here and in many other places (even outside of this PR) the text keeps referring to sections "below" and "above" while those are no longer in the same document. JFYI if you're up to reading through the whole documentation to find such places...

@@ -98,9 +98,9 @@ unless you need the associated ``setuptools`` feature.
added to the tests to be run. If the named suite is a package, any
submodules and subpackages are recursively added to the overall test suite.

Specifying this argument enables use of the `test`_ command to run the
Specifying this argument enables use of the :ref:`test <test>` command to run the
Copy link
Member Author

Choose a reason for hiding this comment

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

<test> is necessary to have test as an anchor and not the title that may be set in the other document under the label.

@@ -1,3 +1,5 @@
.. _Automatic Resource Extraction:
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to re-add some labels that have been removed in the original refactoring to make such places linkable. We need to consider enabling sphinx's built-in autolabel extension instead. But this would be a separate effort because it would involve cleaning everything up and making sure there are no title duplicates.

cc @alvyjudy

@@ -6,13 +6,13 @@ Package Discovery and Namespace Package

.. note::
a full specification for the keyword supplied to ``setup.cfg`` or
``setup.py`` can be found at :ref:`keywords reference <keywords_ref>`
``setup.py`` can be found at :doc:`keywords reference <keywords>`
Copy link
Member Author

Choose a reason for hiding this comment

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

:ref: links labels, while :doc: links documents (by filename)

@@ -82,8 +82,8 @@ Automatic package discovery
For simple projects, it's usually easy enough to manually add packages to
the ``packages`` keyword in ``setup.cfg``. However, for very large projects
, it can be a big burden to keep the package list updated. ``setuptools``
therefore provides two convenient tools to ease the burden: ``find: `` and
``find_namespace: ``. To use it in your project:
therefore provides two convenient tools to ease the burden: :literal:`find:\ ` and
Copy link
Member Author

Choose a reason for hiding this comment

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

w/o :literal:, escaping the spaces does not work.

Comment on lines +56 to +58
-a \
-n \
-W \
Copy link
Member Author

Choose a reason for hiding this comment

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

these are especially important in our goal to make sphinx strict

@alvyjudy
Copy link
Contributor

alvyjudy commented Oct 15, 2020

@webknjaz it really cringes me how many mistakes I have made while working on the docs. I had planned on getting an outline out there and add in the details later (obviously the second step didn't happen and I feel quite embarrassed by such work ethics:(. I think I will go through them these days and fix the issues. Again big thanks for pointing them out

@webknjaz webknjaz force-pushed the maintenance/resurrect-docs-interlinking branch from 79168bd to 0cff2e7 Compare October 15, 2020 23:42
@webknjaz webknjaz force-pushed the maintenance/resurrect-docs-interlinking branch from 0cff2e7 to 3d9fc0b Compare October 16, 2020 00:16
@webknjaz
Copy link
Member Author

@alvyjudy hey! Don't feel ashamed. Your initial contribution was good, it's okay to miss things sometimes. I only added comments for you so that it'd be easier to track stuff when you get to it in the spirit of collaboration :)

Also, it's totally not your fault that strict mode was off in the sphinx setup. Now that it'll be fixed and enforced, it'll be a helpful tool for everyone to catch mistakes.

@webknjaz
Copy link
Member Author

@jaraco mind labeling this PR as hacktoberfest-accepted?

webknjaz added a commit to webknjaz/setuptools that referenced this pull request Oct 17, 2020
This was caused by pypa#2399 CI invocation happening before
merging PR pypa#2427 that made Sphinx nitpicky.
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.

Sphinx setup should be stricter
3 participants