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

No commits found

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

5 years ago

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

5 years ago

rebased onto 02a71c58d509dbc9de4b04ce75dcaa89995c67c4

5 years ago

rebased onto b69629352d508b248e2a8ba2359cf2027c9c6eec

5 years ago

rebased onto f5f61f0

5 years ago

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

Commit 48d2f31 fixes this pull-request

Pull-Request has been merged by mikem

5 years ago