-
Notifications
You must be signed in to change notification settings - Fork 24k
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
Create a recommended template for collection Readme files #68119
Create a recommended template for collection Readme files #68119
Comments
Files identified in the description: If these files are inaccurate, please update the |
This comment will be updated as we decide on the overall structure of the README.md file. Please note it must be .md not .rst. Collection Title-- Add CI and code coverage badges. Sample included below: -- Describe the collection and why a user would want to use it. What does the collection do? Tested with Ansible-- List which versions of Ansible this has been tested with. Must match what is in galaxy.yml. Requirements-- List any external requirements that the collection depends on. This should not be the collections that would be auto-installed, but other requirements, such as a minimum version of an OS etc. Supported connections--An optional section for network/cloud etc collections that support only specific connection types (such as HTTPAPI, netconf, etc). Included content-- Galaxy will eventually list the module docs within the UI, but until that is ready, you may need to either describe your plugins etc here, or point to an external docsite to cover that information. Using the collection-- Include some quick examples that cover the most common use cases for your collection content. Contributing to the collection-- _Describe how the community can contribute to your collection. At a minimum, include how and where to create issues so users can report problems or enhancement requests for the collection. You should also list any requirements/recommended workflow, and testing you want for a smooth merge experience of community PRs. If you are following general Ansible contributor guidelines, you can link to - https://docs.ansible.com/ansible/latest/community/index.html Release Notes-- Add a link to a changelog.md file or an external docsite to cover this information. Roadmap-- an optional section to include the roadmap for this collection, and the proposed release/versioning strategy so users can anticipate the upgrade/update cycle. More information-- List out where the user can find additional information, such as working group meeting times, slack/IRC channels, a documentation site for a product this collection works with, etc. The following links should be included:
Licensing--_ Include the appropriate license information here and a pointer to the full licensing details. See the GNU license example below._ GNU General Public License v3.0 or later See LICENCE to see the full text. |
Note - Galaxy currently uses a conservative markdown as follows: Tags suitable for rendering markdownmarkdown_tags = [ |
A couple of thoughts
Some of this stuff are best to be documented in separate files, have we settled down on the functionality of the |
I'd vote for a standalone "Tested with Ansible versions" section, which should already be in metadata? |
@jborean93 - codecov.io looks to be used for a number of collections so that seems common already and I'll add to the template above. For CI status, we have a two types - Kubernetes uses github action, windows uses shippable. Do we need to find common ground there? (@geerlingguy ) or do we just want to suggest a CI badge should be added in general?
|
For generic collections then it could really be anything, even Travis-CI or Azure DevOps Pipelines as it's up to the author of the collection to decide. A few of the migrated collections will continue to use Shippable because that's what |
Okay I've added the comments thus far to the README.md template comment. |
For users just getting started with a collection with the intent to debug or contribute, should we point to a "running from source" doc, that shows the clone of the collection and 1) a link to their .ansible folder 2) playbook ajacent or 3) and entry in an ansible.cfg file? I suspect we may already have this somewhere but as a link in each collection it may be useful rather than each collection owner reinventing the wheel |
Can we leverage the Ansible code of conduct for each collection moving forward? (link to it) https://docs.ansible.com/ansible/latest/community/code_of_conduct.html#community-code-of-conduct |
Some of this may be applicable, and need to be updated as well https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_checklist.html |
For collection that have a documented release and versioning strategy, we should include a section for this. Version and release guidelines are WIP for a number of collections... |
Also, I was wondering whether it'd make sense to at least add a 'default suggested license', such Apache2.0 or GPLv3 to the template. I guess we can assume if people doesn't want to use it they'd just remove it and I'd rather have that than no license ;) |
Specific to networking collections and even if it'd be on the metadata, it might be worth adding something akin to 'tested with {network_os} {network_os_version} |
how about a section for |
Is supported connection something that extends beyond network collections? |
Yes, HTTPAPI is something that can be used beyond network. Also, local as well. WinRM for Windows, etc. https://docs.ansible.com/ansible/latest/plugins/connection.html |
I don’t see how supported connection methods really is a thing outside of networking. For Windows you can use any connection plugin that works with Windows regardless of the module. |
To @jborean93's point, none of the collections I work on care much about supported connection methods (most use SSH, local, or docker but it doesn't affect much real-world use or expectations. I think the README's should have an ideal / recommended structure, but any individual collection may choose to diverge as needed (e.g. networking collections might want to add a section on supported connection methods). In Galaxy for roles, roles get a default README but a lot of people change them a bit to suit their needs. I think the same thing can/should happen for collections. The only major difference is I know some collections will make their way to Automation Hub and be more strictly maintained, where more uniformity might be desirable. |
Approximately a third of all modules in 2.9 are network related, and connection methods will become more important with the various means to do so (local, network_cli, httpapi, netconf, grpc tbd, etc). If it isn't applicable for others that's fine but it's a big piece for network and a few others. |
+1 to that, @abenokraitis , that's something I'm frequently asked over the irc. |
Okay I've added the comments to date to the template. @gundalow, @abenokraitis @jborean93 @geerlingguy @cidrblock @danielmellado please take another look before we finalize this! Thanks! |
Thanks for doing this, it looks really good.
The Code of Conduct exists in the special .github repo so it's automagically linked in all repos under github.com/ansible-collections, etc https://github.com/ansible-collections/kubernetes/community We can (should?) link to the CoC from each README as well.
|
LGTM |
PR now exists for this at ansible-collections/collection_template#1 |
SUMMARY
As developers create or migrate to collections, we want to give them guidance on what makes for a good/reasonable README.md file in their collection such that it:
This issue will be used to debate/discuss/settle on a structure for this README.md template, but we will also need do decide on where it should live so developers can find/copy it with ease.
ISSUE TYPE
COMPONENT NAME
docs.ansible.com
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
ADDITIONAL INFORMATION
The text was updated successfully, but these errors were encountered: