docs: pip upgrade recommonmark and CommonMark

Summary:
- recommonmark: 0.4.0 -> 0.5.0
- CommonMark: 0.5.4 -> 0.9.0
- Fixed links getting their .md file extension cut off
- Supressed 262 new warnings

Details:
Appended #anchors to markdown github links as a workaround to
recommonmark 0.5.0 cutting off the ".md" part from them.
Sphinx build would fail as follows

[documentation_crawler] ERROR: Please check link:
<404 https://github.com/zulip/zulipbot/blob/master/.github/CONTRIBUTING>
<404 https://github.com/zulip/zulip/blob/master/requirements/README>
<404 https://github.com/zulip/python-zulip-api/blob/master/zulip_bots/README>

sphinx build would also log a "WARNING: None:any reference target not found"
for every link ending in .html
So a good temporary solution is to suppress all warnings with the method suggested here:
https://stackoverflow.com/questions/37359407/suppress-warnings-for-unfound-references-with-default-role-any-in-sphinx

A better solution would be to edit all links ending .html and use .md instead;
which would also solve PR #11719.

Fixes #11395.
This commit is contained in:
David Rosa
2019-08-15 18:14:05 -07:00
committed by Tim Abbott
parent 262e5c6400
commit 0d52d24d64
7 changed files with 19 additions and 9 deletions

View File

@@ -308,8 +308,18 @@ source_parsers = {
# You can specify multiple suffix as a list of string:
source_suffix = ['.rst', '.md']
# Temporary workaround to supress warnings after upgrading to recommonmark==0.5.0
# Otherwise, sphinx build complains about all the links ending in .html
# See PR # for more details
def on_missing_reference(app, env, node, contnode):
if node['reftype'] == 'any':
return contnode
else:
return None
def setup(app: Any) -> None:
app.connect('missing-reference', on_missing_reference)
app.add_config_value('recommonmark_config', {
'enable_eval_rst': True,
# Turn off recommonmark features we aren't using.

View File

@@ -96,5 +96,5 @@ label "travis updates"`, and **@zulipbot** will let you know the build status
If you wish to help develop and contribute to **@zulipbot**, check out the
[zulip/zulipbot](https://github.com/zulip/zulipbot) repository on GitHub and read
the project's [contributing
guidelines](https://github.com/zulip/zulipbot/blob/master/.github/CONTRIBUTING.md) for
guidelines](https://github.com/zulip/zulipbot/blob/master/.github/CONTRIBUTING.md#contributing) for
more information.

View File

@@ -307,7 +307,7 @@ We want to make it easier to deploy **Zulip Readers** on
Zulip hardware. The following document talks about how we want to enable this
from a code structuring standpoint:
[Writing contrib bots](https://github.com/zulip/python-zulip-api/blob/master/zulip_bots/README.md)
[Writing contrib bots](https://github.com/zulip/python-zulip-api/blob/master/zulip_bots/README.md#zulip-bots)
This document, on the other hand, is more about designing the Zulip backend
system to support eventual deployment of reader apps on the Zulip server.

View File

@@ -231,7 +231,7 @@ super fast internet. You can use tmux or screen to make sure that the
from the SSH session.
[mypy-docs]: ../testing/mypy.html
[requirements-readme]: https://github.com/zulip/zulip/blob/master/requirements/README.md
[requirements-readme]: https://github.com/zulip/zulip/blob/master/requirements/README.md#requirements
[stack-overflow]: https://askubuntu.com/questions/8653/how-to-keep-processes-running-after-ending-ssh-session
[caching]: https://help.github.com/en/articles/caching-your-github-password-in-git

View File

@@ -38,7 +38,7 @@ cffi==1.12.3 # via argon2-cffi, cryptography
cfn-lint==0.22.3 # via moto
chardet==3.0.4 # via requests
click==7.0 # via gitlint, pip-tools
commonmark==0.5.4
commonmark==0.9.0
constantly==15.1.0 # via twisted
coverage==4.5.3
cryptography==2.6.1 # via apns2, moto, pyopenssl, requests, service-identity, sshpubkeys
@@ -145,7 +145,7 @@ pytz==2019.1
pyyaml==5.1.1 # via cfn-lint, moto, yamole
qrcode==6.1 # via django-two-factor-auth
queuelib==1.5.0 # via scrapy
recommonmark==0.4.0
recommonmark==0.5.0
redis==3.2.1
regex==2019.6.8
requests-oauthlib==1.0.0 # via python-twitter, social-auth-core

View File

@@ -12,9 +12,9 @@ sphinx==1.8.4
sphinx-rtd-theme==0.4.3
# Needed to build markdown docs
recommonmark==0.4.0
recommonmark==0.5.0
# Upgrading to the latest version of CommonMark breaks the
# compatibility with recommonmark. See
# https://github.com/rtfd/recommonmark/issues/24
CommonMark==0.5.4
CommonMark==0.9.0

View File

@@ -11,7 +11,7 @@ alabaster==0.7.12 # via sphinx
babel==2.5.3 # via sphinx
certifi==2019.6.16 # via requests
chardet==3.0.4 # via requests
commonmark==0.5.4
commonmark==0.9.0
docutils==0.14 # via recommonmark, sphinx
idna==2.8 # via requests
imagesize==1.1.0 # via sphinx
@@ -21,7 +21,7 @@ packaging==19.0 # via sphinx
pygments==2.4.2 # via sphinx
pyparsing==2.4.0 # via packaging
pytz==2019.1 # via babel
recommonmark==0.4.0
recommonmark==0.5.0
requests==2.22.0 # via sphinx
six==1.12.0 # via packaging, sphinx
snowballstemmer==1.2.1 # via sphinx