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

[10035] Build apidocs inside Read the docs environment. #1466

Merged
merged 18 commits into from
Dec 11, 2020

Conversation

adiroiban
Copy link
Member

@adiroiban adiroiban commented Oct 23, 2020

Scope

The result is available here https://twisted--1466.org.readthedocs.build/en/1466/

To simplify the release process we want to host the API docs inside read the docs.

I find that the Read the Docs theme is easier to read than the Twisted Trac theme for Sphinx.

This provides support for creating API docs via both the old bin/admin/build-apidocs and the Read The Docs build.
In this way we can transition with the next release

Followup work

How to test

Make sure the old script continues to work tox -e apidocs

Check that Sphinx docs now has API docs included in the index this is the before last.

Also check that source links for API work.

tox  -e apidocs
firefox docs/_build/index.html

Check read the docs

Main https://twisted--1466.org.readthedocs.build/en/1466/
API https://twisted--1466.org.readthedocs.build/en/1466/api/index.html

Apilinks https://twisted--1466.org.readthedocs.build/en/1466/core/howto/servers.html link at "Your protocol handling class will usually subclass twisted.internet.protocol.Protocol. "

Contributor Checklist:

@adiroiban
Copy link
Member Author

This is ready for review... the deprecated release script is still failing, but that might be a bug in pydoctor.
Those tests were enabled for a very long time.

The result is available here https://twisted--1466.org.readthedocs.build/en/1466/

setup.cfg Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
@graingert
Copy link
Member

related, twisted-infra/braid#264

There will be a second PR to redirect twistedmatrix.com/documents/current to the new domain, but first we should have this pushed to PROD and make sure it works and later we can push the redirection.

@adiroiban when we do the redirect there will be no apidocs for any of the older builds

@adiroiban
Copy link
Member Author

My plan is to only redirect "current" URL fragment. Older version docs will continue to be on the same server without redirecting.

Later we can see how we can push to RTD tags to rebuild the docs for very old versions.

We already have some older version on RTD and the have absolute URL to apidocs.

mthuurne added a commit that referenced this pull request Oct 28, 2020
These were always skipped because every value other than None for
the 'skip' attribute was evaluated as True, even the empty string.

Based on work @adiroiban did in #1466.
@adiroiban
Copy link
Member Author

This is ready for review. See PR description.

Copy link
Contributor

@mthuurne mthuurne left a comment

Choose a reason for hiding this comment

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

Looks good, only some minor comments (typo + formatting).

I don't know much about Sphinx, so I skimmed over most of the conf.py file.

.readthedocs.yml Outdated
@@ -1,7 +1,11 @@
version: 2

sphinx:
fail_on_warning: true
# This should not fail on errors so that we can view the rended Read The Docs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# This should not fail on errors so that we can view the rended Read The Docs.
# This should not fail on errors so that we can view the rendered Read The Docs

tox.ini Outdated
# API docs build errors are visible to stdout
# The resulting files can be viewed with web browsers from the local `apidocs`
# path.
[testenv:apidocs ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Those spaces before ] are probably harmless, but it looks a bit odd.

.readthedocs.yml Outdated
Comment on lines 4 to 5
# This should not fail on errors so that we can view the rended Read The Docs.
# pages even on errors.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# This should not fail on errors so that we can view the rended Read The Docs.
# pages even on errors.
# This should not fail on errors so that we can view the rendered Read The Docs.
# pages even on errors.

docs/conf.py Outdated Show resolved Hide resolved
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
@adiroiban adiroiban merged commit 8cbd150 into trunk Dec 11, 2020
@adiroiban adiroiban deleted the 10035-apidocs-on-rtd branch December 11, 2020 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants