-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Making use of Sphinx autodoc for API docs #454
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
Comments
Hi there, Thanks for chipping in and sharing your thoughts. I admit to being kind of torn on the issue of in-code documentation. It does have some nice upsides as you describe, but my main issue with it is adding bloat to files that should aspire to be as concise as possible (I know But I would love to hear other people's opinions on this, as like I said, I can see both sides of the argument here. |
I've been using Sphinx for a long while now and it's great. I think docstrings make everything more easily understandable. You don't have to skip to the md files everytime you wanna understand what's going on within the code. Sphinx does require that you write RST (other than for the auto-generated API pages) unless you're willing to work with pandoc (I do). Bottom line is, I'd definitely move from mkdocs to sphinx. |
I don't care as much to argue about which documentation system to use (though I do subjectively prefer Sphinx), but almost any modern editor is able to collapse (or auto-collapse) docstrings. As a consequence, I tend to see the "bloat" counter-argument as a weak one. As @nir0s says, you do get some maintainability benefits, and you also pick up on nice features like being able to cross-reference other modules/classes/functions in the docs ( |
|
Fixed in #1186! |
I was trolling through the docs on RTD and noticed that the Client API section is currently being done manually. Since I am a glutton for punishment, I figured I'd see if you would be interested in a pull request that converts this to use Sphinx's autodoc. This would involve moving a lot of what is in that api.md to the source itself.
The benefit of this is that you end up with detailed documentation within the source itself, and it becomes very easy to update docstrings as code is touched.
Just in case an example is needed, we'll continue using boto+dynamodb as an example.
I'd suggest starting with this, then working on a more conversational How-To page that shows some usage examples. I can't promise anything, but I'd potentially be interested in helping as I learn docker-py (and Docker) better.
If you were interested in the autodoc'd API page, that's probably something I could volunteer a pull request for.
The text was updated successfully, but these errors were encountered: