docs: convert various modules to sphinx
ClosedPublic

Authored by kparal on May 14 2014, 5:03 PM.

Details

Summary

Also fix some links in index.

Test Plan

Docs look better.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
roshi accepted this revision.May 15 2014, 12:42 AM

All the included changes look fine to me. It's a good place to work from moving forward.

tflink requested changes to this revision.May 15 2014, 2:56 AM

Overall, it looks really good. Just 2 little things that I think could be improved

libtaskotron/check.py
89–90

The docstring here is appended to the rendered docs in sphinx and is rather confusing. If nothing substantive is being added here, I think it should be removed.

114–115

I'd like to see this docstring changed slightly to make it more clear that this is setting the outcome. The values can stay with the constructor but the param should be listed

kparal added inline comments.May 15 2014, 9:12 AM
libtaskotron/check.py
89–90

We will have to tweak Sphinx rendering, I'd like it to display __init__() method header as well. But in this case, yes, I'll remove it. I was afraid that if you use an IDE capable of displaying docstrings, you wouldn't see any documentation when creating new CheckDetail instance. But at least with Spyder, it displays combined class+init documentation, so it's fine.

114–115

Sphinx solved this for us - it does not include property setter documentation into the generated docs at all:
http://stackoverflow.com/questions/17478040/how-can-i-generate-documentation-for-a-python-property-setter-using-sphinx

So we can either document the property fully in the getter, or in the class docstring. Since all of our other attributes are documented in the class docstring, I think it's more consistent to put it there. So I removed these See class documentation strings, and outcome is no longer visible in the generated docs as a standalone item.

kparal updated this revision.May 15 2014, 9:14 AM
  • address review concerns, add libtaskotron.exceptions docs
kparal updated this revision.May 15 2014, 10:24 AM
  • convert config and config_defaults to sphinx
kparal updated this revision.May 15 2014, 12:34 PM
  • convert file_utils to sphinx
  • convert python_utils to sphinx
  • convert rpm_utils to sphinx
  • convert logger to sphinx
  • convert koji_utils to sphinx
  • convert bodhi_utils to sphinx
tflink added inline comments.May 15 2014, 1:10 PM
libtaskotron/check.py
114–115

is the intent of the outcome() method pair to not be used much? It seems somewhat unwise to not document them at all, otherwise

kparal added inline comments.May 15 2014, 1:25 PM
libtaskotron/check.py
114–115

It's not a method, it's a property, therefore it externally looks and behaves as an attribute. And as all other attributes, it's documented in the class docstring. Do you think it's hard to find?

tflink accepted this revision.May 15 2014, 6:47 PM

Looks good to me, thanks for taking care of this

libtaskotron/check.py
114–115

nvm, I was reading this incorrectly :-/

kparal closed this revision.May 16 2014, 7:12 AM

Closed by commit rLTRN1af4d1ccff72 (authored by @kparal).