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

Clarify/remove use of collection_prep for collection documentation #113

Open
felixfontein opened this issue May 13, 2024 · 3 comments
Open

Comments

@felixfontein
Copy link

#66 added "Include a README file in each collection", which mentions

Generating the README's plugin documentation from the plugin code helps eliminate documentation errors.
Supplemental documentation such as user guides may be written in reStructured Text (rst) and located in the docs/docsite/rst/ directory of the collection.

and then recommends (via Examples:)

Use https://github.com/ansible-network/collection_prep to generate the documentation for the collection

collection_prep's collection_prep_add_docs tool (which I guess is meant here) does multiple things:

  1. It updates the collection's README file;
  2. It creates docs/*.rst files for all plugins and modules contained in the collection (see https://github.com/ansible-collections/ansible.utils/tree/main/docs for an example).

While the README part is totally fine, I have several problems with 2.:

Considering all this, recommending collection_prep in its current state is a bad idea in my opinion. If it would allow to only update the README, using it only for that would be fine IMO. But adding the .rst files to docs/... considering the points above, I think it is more bad practice. Maybe there are also good reasons for doing it, but I haven't heard of any so far.

@ericzolf
Copy link
Contributor

ericzolf commented Jun 4, 2024

The arguments are conclusive to me. @jillr you created the initial PR, you want to react to those comments?

@jillr
Copy link
Contributor

jillr commented Jun 4, 2024

collection_prep was the solution we had at the time, but we have been moving more towards github actions for publishing docs. I agree that collection_prep is no longer the best solution and https://github.com/ansible-community/github-docs-build is a better choice for what we had been using it for.

@yurnov
Copy link

yurnov commented Jun 10, 2024

They are not updated after every PR, but often only on release time, so you cannot use them in the collection's repo to look at docs for the latest commit. (If someone wants that, there are other tools for that: https://github.com/ansible-community/github-docs-build)

They should be updated every PR, to do that in each collections repo it should be something like CONTRIBUTION.md with a guide that each PR should include documentation update and a clear instruction on how to do it, like here.

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

No branches or pull requests

4 participants