pirant icon indicating copy to clipboard operation
pirant copied to clipboard

Generate Docs

Open aayush26 opened this issue 7 years ago • 9 comments

Generate Docs with examples

aayush26 avatar Oct 01 '17 11:10 aayush26

One awesome (but sometimes painful) way of creating documentation in python is with sphinx. The cool thing about it is that it can be hosted in https://readthedocs.org/, so it will look like this: http://docs.readthedocs.io/en/latest/getting_started.html. readthedocs works like travis, so the server will build the documentation every time we push to github.

Maybe we can wait until there is actually something to document, but I leave this here for the future

joserc87 avatar Oct 01 '17 20:10 joserc87

@joserc87 Cool. Great idea. Lets push some more codes and release a production ready version 1. Then we will look into it.

aayush26 avatar Oct 01 '17 20:10 aayush26

PR: https://github.com/aayush26/pirant/pull/28

aayush26 avatar Nov 05 '17 20:11 aayush26

Barebones done. working url for documentation: http://pirant.readthedocs.io

aayush26 avatar Nov 05 '17 20:11 aayush26

I have added docstrings in my PR #29 - you could auto-generate the API reference with autodocs, if you guys are using sphinx ?

deepbrook avatar Nov 22 '17 09:11 deepbrook

@nlsdfnbch Thanks for adding docstrings. We are using sphinx and hosting it at readthedoc, though its in very initial stage with almost no documentation. All setup has been done. Your PR seems to add good amount of docstring. I am looking into it.

I am looking for someone who likes and writes good documentation ( I really wonder if I can find one though considering everyone hate documenting and I am very poor in it.) Including Getting started and code examples. Most probably, I will end up doing it. Haha..

aayush26 avatar Nov 22 '17 14:11 aayush26

@aayush26 , luckily you'll only need to document the public methods properly (with examples and such). The private methods and objects don't need that sort of documentation - usually a brief explanation of params and their expected type is sufficient.

Since you guys are using sphinx then, you should be able to build the documentation (from the docstrings) doing this:

.. automodule:pirant
    :members:

.. automodule:pirant.apps
    :members:
etc

That would allow you to write the documentation directly in the source code as well, sparing you the need to maintain two documentations.

deepbrook avatar Nov 22 '17 15:11 deepbrook

Hello: I'd like to help the community with some doc help. WHat are you looking for at this point?

radhikasundararaman24 avatar Mar 29 '18 15:03 radhikasundararaman24

@radhikasundararaman24 Sure. You can look the existing docstrings and check if they are generating docs correctly. If no, you can add automodule:* as mentioned above to create docs.

aayush26 avatar Apr 14 '18 18:04 aayush26