convert docstrings of directives to sphinx format
ClosedPublic

Authored by garretraziel on Jun 4 2014, 12:06 PM.

Details

Summary

Convert docstrings of modules in libtaskotron/directives/
directory into sphinx format.

Test Plan

generate sphinx documentation for every module in
directives directory with ":members:", ":undoc-members:" and
":private-members:"

Diff Detail

Repository
rLTRN libtaskotron
Lint
Lint Skipped
Unit
Unit Tests Skipped
garretraziel retitled this revision from to convert docstrings of directives to sphinx format.Jun 4 2014, 12:06 PM
garretraziel updated this object.
garretraziel edited the test plan for this revision. (Show Details)
garretraziel added reviewers: tflink, kparal.
kparal requested changes to this revision.Jun 4 2014, 12:30 PM
kparal added inline comments.
libtaskotron/directives/bodhi_comment_directive.py
142–143

This must be

:param parsed_comments: already existing AutoQA comments for
 the update
:type parsed_comments: list of dict
295–306

You can use a proper reST "bold" here.

299
``noarch``

looks better

303–305

It's nice to use

``True``

and similarly for False. It's not required, but it looks better (denotes the values) in the generated docs. Similarly for the 0 above. And similarly in other docstrings.

369–373

This gets distorted, you need to make it a preformatted block.

374
``checkname`` in ``env_data``
This revision now requires changes to proceed.Jun 4 2014, 12:30 PM
garretraziel updated this revision to Diff 351.Jun 5 2014, 9:13 AM
  • correct sphinx formating in directives
kparal added a comment.EditedJun 5 2014, 9:21 AM

Looks good, no problems spotted.

@tflink: Are the directives expected to be added into library.rst? Because otherwise it's in Sphinx format, but not visible anywhere.

libtaskotron/directives/bodhi_comment_directive.py
142

I guess this should read Taskotron :-)

@tflink: another thing is, from what I understand, classes without "main" docstring (that docstring right after class XY:) won't appear in result at all, even when they have docstrings in some of their methods. And methods/classes with underscore at the beginning of their name won't appear there either. To include both, one must add :undoc-members: and
:private-members: besides :members:. Are we planning to ad these into library.rst too?

garretraziel updated this revision to Diff 364.Jun 6 2014, 7:56 AM
  • AutoQA -> Taskotron
tflink added a subscriber: roshi.Jun 9 2014, 10:50 AM

Are the directives expected to be added into library.rst?

I hadn't been planning on it, no. The plan had been to use the directive documentation stuff that @roshi is working on in D93 instead. Do you think that it would be better to add them to library.rst?

another thing is, from what I understand, classes without "main" docstring (that docstring right after class XY:) won't appear in result at all, even when they have docstrings in some of their methods. And methods/classes with underscore at the beginning of their name won't appear there either. To include both, one must add :undoc-members: and :private-members: besides :members:.

I thought that just using :members: would pull in everything that had a docstring, regardless of whether the class itself had a docstring but I could be wrong on that one.

kparal accepted this revision.Jun 10 2014, 8:22 AM

OK, let's commit this as it is and deal with the rest in D93.

This revision is now accepted and ready to land.Jun 10 2014, 8:22 AM
garretraziel closed this revision.Jun 10 2014, 8:34 AM
garretraziel updated this revision to Diff 372.

Closed by commit rLTRN8c82af1eea32 (authored by Garret Raziel <boloomka@gmail.com>).