-
Notifications
You must be signed in to change notification settings - Fork 220
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
Doc: Adding contribution guide for eos_cli_config_gen #4730
base: devel
Are you sure you want to change the base?
Doc: Adding contribution guide for eos_cli_config_gen #4730
Conversation
Review docs on Read the Docs To test this pull request: # Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4730
# Activate the virtual environment
source test-avd-pr-4730/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/Shivani-gslab/avd.git@contribution_guide#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/Shivani-gslab/avd.git#/ansible_collections/arista/avd/,contribution_guide --force
# Optional: Install AVD examples
cd test-avd-pr-4730
ansible-playbook arista.avd.install_examples |
a8fd2f4
to
a43aa6d
Compare
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
|
||
### Run Pre-commit Checks | ||
|
||
Run all pre-commit checks `pre-commit run --all` to ensure that all files added or modified are correctly following the coding standards and formatting rules. |
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.
Run all pre-commit checks `pre-commit run --all` to ensure that all files added or modified are correctly following the coding standards and formatting rules. | |
Run all pre-commit checks `pre-commit run` to ensure that all files added or modified are correctly following the coding standards and formatting rules. |
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.
pre-commit run
checks staged files only
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.
right. But pre-commit run --all takes forever :)
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 see it still reads --all
is it expected? (conversation was resolved)
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.
Since it was resolved, I didn't update it, assuming it's fine to keep it as it is.
48f50f1
to
49d0f13
Compare
4. **Type Conversion:** Add `convert_types: [str]` for `type: int` keys. | ||
5. **Defaults:** Avoid using `defaults` in eos_cli_config_gen. | ||
6. **Min/Max:** Specify min/max values in the schema if they are defined in the EOS CLI. | ||
|
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.
Lets add the the use of required key
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
2ef2650
to
b89cdc0
Compare
Quality Gate passedIssues Measures |
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.
LGTM
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 would add some general notes in some places stating
- For PR writer to tag maintainers with questions even once they have pushed and to use draft PRs when things are not ready yet. (We can also discuss in the issue if requried)
- For PR reviewer - to tag maintainers when they have questions
I think you are missing to introduce the new md file in the TOC for mkdocs (you need tp modify the mkdocs.yml)
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
|
||
Follow the [Development Tooling Guide](https://avd.arista.com/5.0/docs/contribution/development-tooling.html). | ||
|
||
### Schema creation |
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 would add an overview of whats needed as a list before this like
- schema
- templates (eos and documentation)
- molecule (tests)
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.
Added a list of steps
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
### Update Documentation | ||
|
||
If the proposed feature requires any changes to the documentation, make sure to update it accordingly. | ||
If there are any breaking changes introduced, document them in the porting guide. |
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.
@ClausHolbechArista / @carlbuchmann - porting guide for major releases / release-notes for minor and maintenance releases?
|
||
### Run Pre-commit Checks | ||
|
||
Run all pre-commit checks `pre-commit run --all` to ensure that all files added or modified are correctly following the coding standards and formatting rules. |
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 see it still reads --all
is it expected? (conversation was resolved)
ansible_collections/arista/avd/docs/contribution/authoring_eos_cli_config_gen.md
Outdated
Show resolved
Hide resolved
6. Ensure that Jinja2 templates follow all the guidelines mentioned above. | ||
7. Check that the template generates valid configuration and documentation, maintaining the same configuration order and indentation as EOS CLI. | ||
8. Check out the PR in a local IDE and run all tests to ensure functionality. | ||
9. Test the generated configuration through EAPI or CVP in the ATD lab. |
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.
not everybody may have an ATD lab - you can state in a relevant lab (if availbale otherwise indicate you could not verify in a lab in your review comment.)
9. Test the generated configuration through EAPI or CVP in the ATD lab. | |
9. Test the generated configuration through EAPI or CVP in the ATD lab. |
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.
Updated
7. Check that the template generates valid configuration and documentation, maintaining the same configuration order and indentation as EOS CLI. | ||
8. Check out the PR in a local IDE and run all tests to ensure functionality. | ||
9. Test the generated configuration through EAPI or CVP in the ATD lab. | ||
10. If providing code suggestions, test them locally to ensure that your proposals work as intended. |
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.
Add something to state to add inline suggestions whenever possible
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.
added
mkdocs.yml
Outdated
@@ -192,6 +192,7 @@ nav: | |||
- External Resources: | |||
- Ansible Collection User Guide: https://docs.ansible.com/ansible/latest/user_guide/collections_using.html | |||
- Ansible User Guide: https://docs.ansible.com/ansible/latest/user_guide/index.html | |||
- Authoring eos_cli_config_gen Role Guide: docs/contribution/authoring_eos_cli_config_gen.md |
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 should be in the Contributing to AVD:
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.
Thanks, fixed!
for more information, see https://pre-commit.ci
Co-authored-by: Claus Holbech <[email protected]>
Co-authored-by: Guillaume Mulocher <[email protected]>
9c96f08
to
9553793
Compare
Change Summary
Related Issue(s)
Fixes #3286
Component(s) name
arista.avd.<role-name>
Proposed changes
How to test
Checklist
User Checklist
Repository Checklist