-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
PyPI Integration Planning #1957
Comments
We should probably work the ability to build GitHub pull requests into this project as well, as it requires breaking up the "Version" concept as well. |
Another interesting library: https://github.com/PyCQA/pydocstyle |
Another AST parsing option: https://github.com/irskep/computerwords/blob/master/computerwords/source_parsers/python35.py |
This issue is following the AST issue here, we should adopt whatever gets created: davidhalter/jedi#630 |
Another sizable issue with pydocstyle is that it doesn't support variables defined at the module or class level. This is a useful thing that epydoc does. Redbaron seems to do it too in my initial exploration, but is quite slow. |
PyPI API's:
dstufft: there's no new APIs in Warehouse as of yet-- plan on doing up a new one at some point and deprecating old stuff (particularly xmlrpc...) but been more focused on feature parity |
Good intensive way to scrape version data: https://github.com/librariesio/libraries.io/blob/11f01015b53b30682671db3a4b78d53ce7a496be/app/models/repositories/pypi.rb#L7 |
Interesting design decisions here: http://www.rubydoc.info/gems/yard/file/docs/Overview.md |
Had a chat in the
|
Initial deploy is now live at https://www.pydoc.io |
Thanks @ericholscher for your blog post announcing pydoc.io. Happy to see something like this moving forward, and the effort you are putting behind this. First I want to just letting you know (informally) that some people in the bay area are considering hosting a "Docathon" probably around end of january. Would you be interested in participating ? If so I can try to contact the organizers and see if you can join. The exact scope of this is still not really set yet, but I'm thinking a project like this could be interesting. Second I see that the IPython docs returns a 404. Our docs is a bit weird for API generating because of metaclasses and traitlets. Let me know if I can do anything for that. Third. I would use a subfolder for versions to potentially get aliases. 5.1.0/5.x/stable to redirect to the same version. Fourth. There Seem to some similar efforts as a cross-language way in http://devdocs.io/ and DashApp. I completely see the interest in having a pydoc.io, are you aware of above tools ? Is there any consideration of generating fileformats for these tools directly ? Fifth, I had other comments, but I forgot now. Thanks ! |
Interesting. Definitely something I'd be interested in. Perhaps we should follow up in Twitter or email about that.
Yea, this is one of the issues with the AST tooling we're using. It is pretty naive and breaks on a lot of the larger and more popular libraries.
This is an issue I'm quite familiar with. I meant to fix that before this went live, and will definitely fix here soon.
Yep, super familiar. There are already a few ways of turning eg. Sphinx documentation into Dash and other formats. In general, once we get a standard way of introspecting code via parse-only AST's, we can output multiple different formats from there. We're starting with Sphinx just so that it can plug into the existing Python ecosystem (with intersphinx, etc.) -- but definitely happy to extend that functionality into other formats. |
Sorry for the noise, but: It would be amazing if this supported pydoctor. I understand why sphinx-autoapi is the more popular option but pydoctor has a lot of features we really like and rewriting all of Twisted's epytext to be sphinx is probably not tractable. Please let us know over at https://twistedmatrix.com/ if there's something we could change, or some metadata we could add to our project, to make this easier on your end. |
Or over at https://github.com/twisted/pydoctor if you would like to file tool issues on pydoctor itself to make integration easier. |
@glyph I've looked into Pydoctor before, in this ticket: twisted/pydoctor#93 |
Granted, that was for using it to just get the docstring data, not actually do rendering of pydoctor-style rST. It sounds like what you want is for us to support pydoctor style docstrings in rST? |
Pydoctor's input format is epytext, not rST. However, pydoctor also does a few things Sphinx doesn't, like correct rendering of zope interface relationships (implements, provides) and I believe a few other decorators. I don't know where the appropriate integration point would be for that stuff. |
Is this issue where you want feedback? The blog post asks for feedback, but I can't see any particular indication of where to send it. ;-) Looking through some of the docs on the beta, I see that On the flip side, we need a way to include certain variables which are not functions or classes in the documentation. For instance, the possible values of some enums. Other than that, 👍 to the overall concept of autogenerated API docs for Python packages. Thanks for working on it! |
Oh, and also possibly a way to opt out of autogenerated API docs. For some packages on PyPI, such as (This would force projects to think more about what is actually a public interface: I often release primarily command-line tools without really deciding whether I also expect people to use the Python API.) |
@takluyver Thanks for the feedback. We definitely need to do more thinking about the display of private methods, methods with no docstrings, and other edge cases. We'll probably end up doing some kind of blacklist for modules that don't make sense to document, like pip perhaps. Still need to think that through! |
I'm going to close this issue here as we have a repo for this at rtfd/pydoc.io. I think we should be tracking work and additional changes to the site there. |
PyPI Integration Planning
This ticket will track the planning of our integration with PyPI.
It will act as a design document for now,
and track progress over time.
Large Questions
<pypi-slug>.pydoc.org
,<pypi-slug>.pypi.readthedocs.org
?pydoc.org
?), or generic (apidocs.org
?)readthedocs-build
?readthedocs.yml
in the PyPI distribution tarball?Implementation
Parsing
We currently plan to generate API documentation for all packages uploaded to PyPI.
This will be done in a parse-only way,
instead of attempting to import every package that exists,
which would be folly.
Currently there are two packages that might work for this with modifications:
Both are currently Python 2 only,
and don't fully support what we need them to do.
We might also end up just building our own implementation that works for our specific use case,
instead of trying to hack something else that exists but doesn't quite do what we want.
Code
We will abstract the Project object, allowing it to specify how it gets versions:
This will then simplify the Doc building Tasks, and allow us to have a proper build abstraction. Also unify the VCS code to use standard build environments (and get logging for commands)
We should build some kind of "immutable" object type that applies to Pypi packages and VCS tags. This will allow us to have special logic (CDN, ignoring future builds) that apply to those types of packages.
Planned Implementation Phases
Notes
Warehouse currently doesn't have an API, but we can poll this RSS feed, and keep track of updates that way: https://warehouse.python.org/rss/updates.xml
Checklist
The text was updated successfully, but these errors were encountered: