#1143 hub: document CG access method arguments
Merged by mikem. Opened by ktdreyer.
ktdreyer/koji doc-hub-cg-access  into  master

Download 1143.patch

Describe each of the arguments to the grant_cg_access() and revoke_cg_access() methods.

:param str user: koji username
:param str cg: content generator name
:param bool create: If true, Koji will create an entirely different content
                    generator in the database. If false (default), Koji
                    will add the user to an existing content generator.

While we use Sphinx for our docs, we don't at the moment use autodoc to generate api docs. We probably should (I'm not sure how much work that would be at this point), but it seems a little strange to have just one docstring with this format.

The documented types are stricter than reality. Both user and cg accept id or name. Frankly id is the safer option. Does Sphinx have syntax for this? Should those :param lines be followed up with multiple :type lines?

rebased onto 26473a3767733a6f998bd607cffcfbeab2170834

Thanks for clarifying that the user and cg params can be ints or strings.

I looked it up in Sphinx, and you can specify it like :type user: int or str

I've amended this pull-request to do that.

@mikem I'm thinking if we could have an API docstring template in contribution guide, then we could have them to be standardized

rebased onto 93ba350203233baa48c91663f9381032fe8cd4f1

rebased onto 02a71c58d509dbc9de4b04ce75dcaa89995c67c4

rebased onto b69629352d508b248e2a8ba2359cf2027c9c6eec

a little clarification
https://github.com/mikem23/koji-playground/commits/pagure/pr/1143

:thumbsup:

:thumbsup:

rebased onto f5f61f02aac40c5bf3fa9ea93e00e4b5a7d54973

Thanks, I've cherry-picked that change to this PR and re-pushed.

Commit 48d2f31c fixes this pull-request

Pull-Request has been merged by mikem

Metadata