-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add docs for the filter reveal_ansible_type and the test ansible_type. #8645
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vbotka thanks for your contribution! It does look like you imagined a dynamic way to generate documentations within the repository, and that is not something we would like to do. There are processes that read (and expect) .rst files only within that directory.
Moreover, it looks like there are parts of a test for your plugins and tests based in Ansible YAML, as opposed to unit testing python code, should be placed in the tests/integration/targets// directory.
This PR is quite irregular and not in conformance with our practices.
Please review the documentation (a good starting point being: https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md) and see how other documentation was written.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removes existing documentation for existing plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I restored the origin and added new section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is out of place. There are scripts and processes that work with the documentation files that will not execute playbooks in this context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests "roles" should be place in the tests/integration/target directory, not here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
Well, that was then. I have not spent more time on the PR after that commenting. TBH, I will not have much time in the upcoming days. And that question seems to be a bit out of context in this PR. |
Hi @russoz. Thank you for the review! There are only docs/docsite/rst/*.rst files and BOTMETA.yml changes left. This should be in conformance now.
|
Why not? I think it's a good idea to generate example outputs in documentation using the actual code, if possible. (It would be great if there would be a more generic way to do this instead of having to do so much templating, but right now there isn't. There used to be https://github.com/ansible-community/sphinx-ansible, but that's dead, and wouldn't have worked here anyway since the RST files are consumed by Sphinx without that extension.)
I agree that testing should not be mixed up with documentation generation. (I already mentioned that in this thread: #8482 (comment)) |
@@ -1460,6 +1460,10 @@ files: | |||
maintainers: vbotka | |||
docs/docsite/rst/filter_guide_abstract_informations_merging_lists_of_dictionaries.rst: | |||
maintainers: vbotka | |||
docs/docsite/rst/filter_guide-abstract_informations-types.rst: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use underscores:
docs/docsite/rst/filter_guide-abstract_informations-types.rst: | |
docs/docsite/rst/filter_guide-abstract_informations_types.rst: |
Same below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
The name of the file is a concatenation of three headings' levels:
- filter_guide
- abstract_informations
- type
The concatenation by dash "-" keeps this information. I've already created a couple of files this way. Should all of them be renamed?
You kept the first dash. Do you think this one should be replaced too?
For the record: This name is used in filter_guide_abstract_informations.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't catch the dashes in the previous PR. Generally all filenames in docs/docsite/rst/ use underscores instead of dashes. It would be great to keep it that way.
Types | ||
^^^^^ | ||
|
||
Filters to manage Ansible types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filters to manage Ansible types | |
Filters to manage Ansible types. |
|
||
.. versionadded:: 9.2.0 | ||
|
||
**Substitution converts str to AnsibleUnicode** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a heading, so it should be a heading and not a paragraph with manual formatting applied:
**Substitution converts str to AnsibleUnicode** | |
Substitution converts str to AnsibleUnicode | |
------------------------------------------- |
Similar below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would violate the heading levels:
community.general Filter Guide
==============================
Abstract transformations
------------------------
Types
^^^^^
Filter reveal_ansible_type
""""""""""""""""""""""""""
I'm afraid there are no more levels left.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RST allows quite a few different levels. You can use ~~~~~~~~
or .....
or ******
or +++++++
or ... then :)
|
||
**Substitution converts str to AnsibleUnicode** | ||
|
||
* String. AnsibleUnicode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean? (I know what it means, but regular users do not.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll improve all the comments.
Hi @vbotka , are you still working on this? |
SUMMARY
Add below files to docs/docsite/rst:
Update the below files in docs/docsite/rst:
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION