Skip to content
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

Auto-generated online API documentation #754

Closed
jdpipe opened this issue May 13, 2020 · 8 comments
Closed

Auto-generated online API documentation #754

jdpipe opened this issue May 13, 2020 · 8 comments

Comments

@jdpipe
Copy link

jdpipe commented May 13, 2020

Exchangelib looks like a nice and comprehensive implementation of the Exchange API in Python. The README.md gives a pretty good sense of the range of options that are provided, but it would be huge help for familiarising oneself with the code if there were also some more extensive class docs generated, eg using Sphinx and Readthedocs.

And while I have your attention, are you aware of any attempts by anyone to use exchangelib to provide a CalDAV interface to EWS calendar data, in a similar way to what Davmail does?

@ecederstrand
Copy link
Owner

I agree with the need for more formal docs. It's been on my todo since forever :-)

I don't know of anyone using exchangelib to create interfaces like CalDAV.

@ecederstrand
Copy link
Owner

Useful thread at pdoc3/pdoc#55 (comment)

@ecederstrand ecederstrand changed the title would be great to have some complete class documentation, eg sphinx/readthedocs? Auto-generated online documentation May 14, 2020
@ecederstrand ecederstrand changed the title Auto-generated online documentation Auto-generated online API documentation May 14, 2020
@ecederstrand
Copy link
Owner

I've used pdoc3 in the past and like it for its simplicity.

If we use that, we need to change the params and return value documentation in docstrings, since pdoc doesn't support the ReST-style that we (actually, pycharm) defaults to. Here's an example of a format supported by pdoc: http://google.github.io/styleguide/pyguide.html#383-functions-and-methods

@spotlesstofu
Copy link
Contributor

Hi! I recently discovered this project (thanks for sharing) and I'd really like this issue to be solved.
I opened a pull request, please let me know what you think!

@ecederstrand
Copy link
Owner

I merged your changes. Thanks!

Now we need to generate the HTML documentation and make it available somewhere.

@spotlesstofu
Copy link
Contributor

Thank you! I'm glad you appreciated my work.
A way to publish the HTML is to use Github Pages.

If you run

pdoc3 --html exchangelib -o docs

all the HTML will be in the docs folder. Then you go in repo settings and enable Github Pages. Quite easy.

Every time the docstrings change, HTML must be re-generated. Maybe it can be done automatically with git hooks.

pdoc3 --html exchangelib -o docs --force

How does this sound?

@ecederstrand
Copy link
Owner

Thanks for the explanation. There's now a link to the generated documentation at https://ecederstrand.github.io/exchangelib/

@ecederstrand
Copy link
Owner

I moved most of the README to the docs site, added a ToC and made some CSS adjustments to the docs site. Closing, but feel free to suggest further improvements :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants