-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
|
This is ready for review... the deprecated release script is still failing, but that might be a bug in pydoctor. The result is available here https://twisted--1466.org.readthedocs.build/en/1466/ |
|
related, twisted-infra/braid#264
@adiroiban when we do the redirect there will be no apidocs for any of the older builds |
|
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. |
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.
|
This is ready for review. See PR description. |
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.
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. | |||
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.
| # 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 ] |
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.
Those spaces before ] are probably harmless, but it looks a bit odd.
.readthedocs.yml
Outdated
| # This should not fail on errors so that we can view the rended Read The Docs. | ||
| # pages even on errors. |
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.
| # 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. |
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
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-apidocsand 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 apidocsCheck that Sphinx docs now has API docs included in the index this is the before last.
Also check that source links for API work.
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:
tox -e lintto format my patch to meet the Twisted Coding Standardreviewto the keywords field in Trac, and putting a link to this PR in the comment; it shows up in https://twisted.reviews/ now.