-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
#10066 Update pydoctor version and remove Twisted pydoctor custom code that is now available as standard features. #11578
Conversation
tox.ini
Outdated
|
||
extras = dev_release | ||
commands = {toxinidir}/bin/admin/build-apidocs {toxinidir}/src/ apidocs | ||
commands = | ||
pydoctor --quiet \ |
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 is missing --template-dir
option.
Many thanks for the review. I will try to reduce the things changed in this PR. For now, I just want to update the pydoctor version and see that CI fails on pydoctor errors. In a separate ticket we can look at fixing the pydoctor errors and also cleaning the things that are no longer needed. I will see how hard is to fix the current pydoctor errors. The extra cleanup can be done in a separate PR. |
The build is currently failing with error: I'de suggest to simply drop the custom |
thanks @tristanlatr I have updated twisted/twisted-contributors team. Not sure why you weren't there. If you have time. Can you make the required changes to get pydoctor working ? Thanks |
Alright, but there is one thing that bother me. It’s like the |
I don't know why it is not included. In the code, I see that the intention is to have it included. Lines 40 to 44 in fc20692
and it was installed in my environment |
Ok, maybe the twisted package is not correctly installed in the tox environment then. |
for more information, see https://pre-commit.ci
…ed into 10066-pydoctor-and-docs-ci
The pydoctor build is fixed, I believe. Though, I haven't read the logs in the CI, but This leaves the warnings to fix:
Let's note that pydoctor has this known bug: twisted/pydoctor#295 which might explain some of the errors. Also: |
2942f22
to
cc52861
Compare
Ok, One test failing
|
Yes, this is normal, pydoctor 22.7 introduced a breaking change in this regards, but we never had a stable API, that was clear from the beginning. I'll just cleanup |
Yes. Thanks. Feel free to push anything. I can then see how to break this PR to get these changes reviewed and merged. |
Newer versions of pydoctor includes support for twisted.python.deprecate and allows to tweak the privacy of some objects.
for more information, see https://pre-commit.ci
The tests are now all successful. The only thing that bothers me is that we’re not actually using the custom system, we just have tests for it. And more, I don’t think it’s required anymore, meaning zope has fixed it’s wrong inventory links: because I can’t see any warnings that refers to the zope api. So I believe we can trash it all together. |
We can remove the custom system code if not used. less is more :) |
for more information, see https://pre-commit.ci
…ed into 10066-pydoctor-and-docs-ci
Ok, I believe it's pretty clean now. |
I've enabled the |
These changes are awesome. I love the config file. The theme is also ok. Just some feedback for the theme. There are now 2 main links:
Maybe instead of Now, in order to have this merged ASAP, as you mentioned on the issue, I think that is best to reduce the scope of this PR. Instead of pydoctor upgrade + ci fail, we should use this PR only to upgrade the pydoctor version. I/we can look to fix the pydoctor errors in a separate PR. |
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.
LGTM. Love to see all this unnecessary support code getting zapped.
"--project-name=Twisted", | ||
"--project-url=https://twistedmatrix.com/", | ||
"--system-class=twisted.python._pydoctor.TwistedSystem", | ||
"--docformat=epytext", | ||
"--intersphinx=https://docs.python.org/3/objects.inv", | ||
"--intersphinx=https://cryptography.io/en/latest/objects.inv", | ||
"--intersphinx=https://pyopenssl.readthedocs.io/en/stable/objects.inv", | ||
"--intersphinx=https://hyperlink.readthedocs.io/en/stable/objects.inv", | ||
"--intersphinx=https://twisted.org/constantly/docs/objects.inv", | ||
"--intersphinx=https://twisted.org/incremental/docs/objects.inv", | ||
"--intersphinx=https://python-hyper.org/projects/hyper-h2/en/stable/objects.inv", | ||
"--intersphinx=https://priority.readthedocs.io/en/stable/objects.inv", | ||
"--intersphinx=https://zopeinterface.readthedocs.io/en/latest/objects.inv", | ||
"--intersphinx=https://automat.readthedocs.io/en/latest/objects.inv", |
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.
yay for getting this to be declarative data in setup.cfg
and not stuffed into command-line args!
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.
Thanks
@@ -1,19 +0,0 @@ | |||
#!/usr/bin/env python |
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.
Love to see all the ./build/admin
scripts get replaced with tox environments. Much more discoverable and less error-prone.
HIDDEN:twisted.words.test | ||
HIDDEN:twisted.web.test | ||
HIDDEN:twisted.spread.test | ||
HIDDEN:twisted.scripts.test | ||
HIDDEN:twisted.runner.test | ||
HIDDEN:twisted.python.test | ||
HIDDEN:twisted.protocols.haproxy.test | ||
HIDDEN:twisted.protocols.test | ||
HIDDEN:twisted.positioning.test | ||
HIDDEN:twisted.persisted.test | ||
HIDDEN:twisted.pair.test | ||
HIDDEN:twisted.names.test | ||
HIDDEN:twisted.mail.test | ||
HIDDEN:twisted.logger.test | ||
HIDDEN:twisted.cred.test | ||
HIDDEN:twisted.conch.test | ||
HIDDEN:twisted.application.runner.test | ||
HIDDEN:twisted.application.twist.test | ||
HIDDEN:twisted.application.test | ||
HIDDEN:twisted._threads.test | ||
HIDDEN:twisted.trial._dist.test | ||
HIDDEN:twisted.trial.test | ||
HIDDEN:twisted.internet.test | ||
HIDDEN:twisted.test.* | ||
PUBLIC:twisted.test.proto_helpers |
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.
Beautiful. Self-documenting!
Auto-merge set so we can land this as soon as static check and api doc build issues are corrected. (Looks like maybe an intersphinx thing for the docs build?) |
No, it looks like months of not checking the pydoctor warnings ;-) should we fix the docstring links in this PR? |
Ok. The plan is to land this PR asap. The remaining pydoctor "compilation" error should be fixed as a followup in #11590 Those errors already exist in trunk, so they are not errors introduced in this PR. Is just that with this PR, pydoctor is detecting more errors. |
Scope and purpose
Fixes #10066
If the epydoc API markup is invalid, the CI is happy and green.
We need to update the CI to fail on pydoctor build errors.
This should help make sure the API doc is valid and sane :)
As part of this PR I have updated the pydoctor version.
Also, instead of using the custom python script to call pydoctor, this calls pydoctor directly from tox.
I hope that in this way it should be easier to understand what is going on there, with fewer redirection layers.
Contributor Checklist:
tox -e lint
to format my patch to meet the Twisted Coding Standard#
character).The first line is automatically generated by GitHub based on PR ID and branch name.
The other lines generated by GitHub should be replaced.