-
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
WIP Build pydoctor API docs via Read the docs system. #1422
Conversation
|
OK. We got the API docs in Read The docs. The build link is here https://readthedocs.org/projects/twisted/builds/12020401/ Total build time 665 seconds... so about 10 minutes The HTML version is at https://twisted--1422.org.readthedocs.build/en/1422/ with API docs at https://twisted--1422.org.readthedocs.build/en/1422/api/ |
The reason Twisted has so many API doc files is that it passes I don't know why separate function pages are being generated, since those pages are not linked from any other page and therefore only reachable if you jump directly to a function's exact URL. I also don't know why my file count is slightly lower; did you include documentation files not written by pydoctor perhaps? |
|
Thanks @mthuurne for your feedback. It helped identify a big issue. Sphinx API links inside the narrative documentation are generated using absolute link. The number was a quick and crude count which I found when I tried to remove the output 'apidocs' dir. As a test, I have updated the buildscript to not create the separate HTML files. Will try to refactor that doc release code (ex merge APIBuilder and BuildAPIDocsScript ). I have already started but I didn't want to create a big diff, and just focus on the proof of concept for getting apidocs on Read The docs. Without separate HTML files the build is much faster:
For reference, without the API docs builds the Read The docs times are:
The separate HTML files change was introduced by exarkun here 828cb42 And was requested here https://twistedmatrix.com/trac/ticket/3241 The issue is "The howto docs generate links to functions." I think that this is the way Sphinx API link builder works. So... I think that we need a separate PR to see if we can fix the the I have updated the PR description with the current known issues |
|
I think that we have a good start for the next release The links from Sphinx narrative docs are generated using absolute URLs, and in this PR it was updated to use relative links. For example, if you go to https://twisted--1422.org.readthedocs.build/en/1422/conch/howto/conch_client.html and then you click o the first link at The links from Sphinx narrative docs are generated using function HTML page, rather than anchors to class page. For example if you go to https://twisted--1422.org.readthedocs.build/en/1422/core/howto/servers.html and then click on the link from |
|
This was moved to #1466 |
This is just a proof of concept. Trying to see if I can hack read the docs system to get apidocs together with narrative docs.
The result can be tested at https://twisted--1422.org.readthedocs.build/en/1422/
The changes from here should be moved to separate PRs each fixing a single issue.
The GitHub actions builds for narrative docs and apidocs are still used to make it easy to debug errors as the log output is nicer than Read The Docs... and at the same time, even if there are warnings, you can still see the result on read the docs.
Drive by fixes: