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

Doc: Adding contribution guide for eos_cli_config_gen #4730

Open
wants to merge 16 commits into
base: devel
Choose a base branch
from

Conversation

Shivani-gslab
Copy link
Contributor

@Shivani-gslab Shivani-gslab commented Nov 15, 2024

Change Summary

Related Issue(s)

Fixes #3286

Component(s) name

arista.avd.<role-name>

Proposed changes

How to test

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

Copy link

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


### 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor Author

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

Copy link
Contributor

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 :)

Copy link
Contributor

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)

Copy link
Contributor Author

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.

@Shivani-gslab Shivani-gslab marked this pull request as ready for review November 19, 2024 11:42
@Shivani-gslab Shivani-gslab requested review from a team as code owners November 19, 2024 11:42
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.

Copy link
Contributor

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

Copy link

sonarcloud bot commented Nov 21, 2024

Copy link
Contributor

@MaheshGSLAB MaheshGSLAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gmuloc gmuloc added the one approval This PR has one approval and is only missing one more. label Nov 25, 2024
Copy link
Contributor

@gmuloc gmuloc left a 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

  1. 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)
  2. 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)


Follow the [Development Tooling Guide](https://avd.arista.com/5.0/docs/contribution/development-tooling.html).

### Schema creation
Copy link
Contributor

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)

Copy link
Contributor Author

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

### 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.
Copy link
Contributor

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.
Copy link
Contributor

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)

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.
Copy link
Contributor

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.)

Suggested change
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.

Copy link
Contributor Author

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.
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@Shivani-gslab Shivani-gslab marked this pull request as draft November 26, 2024 05:22
@carlbuchmann carlbuchmann removed the one approval This PR has one approval and is only missing one more. label Nov 26, 2024
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
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed!

mkdocs.yml Outdated Show resolved Hide resolved
mkdocs.yml Show resolved Hide resolved
@Shivani-gslab Shivani-gslab marked this pull request as ready for review November 27, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doc: Improve contribution guide
5 participants