Skip to content

Commit

Permalink
Requirements update + relocation (aristanetworks#824)
Browse files Browse the repository at this point in the history
* Add a requirements file
This PR is a follow up to an email sent to the maintainers of this certified collection notifying them of a few new changes that will be needed for the next Ansible Automation Platform release. Contained in this PR is an example python requirements file built specifically for your collection. You can elect to merge this as is and edit as needed or close the PR and use it as an example to base your own commit off of. if you have any questions about why this PR was sent or confused about its necessity, please don't hesitate to ask in the comments here or email us at [email protected]

* Move requirements to collection root + Req update

* fix PR template document

* Update Release notes about Python requirements

* dep(cvprac): Set cvprac to v1.0.5

Co-authored-by: Anshul Behl <[email protected]>
  • Loading branch information
titom73 and anshulbehl authored Mar 22, 2021
1 parent e30b977 commit f5c7b6d
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 60 deletions.
7 changes: 4 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Change Summary

<!-- Enter short PR description -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
Expand All @@ -11,17 +13,16 @@
- [ ] Other (please describe):

## Related Issue(s)
<!-- If PR is linked to one or more issues, please list issues below -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->

Fixes issue #<ISSUE ID>
Fixes #<ISSUE ID>

## Component(s) name

`arista.avd.<role-name>`

## Proposed changes
<!--- Describe your changes in detail -->
<!--- Describe data model implemented for new features -->

## How to test
<!--- Please describe in detail how you tested your changes. -->
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- 'releases/**'
paths:
- '.github/workflows/docker_build.yml'
- 'development/requirements.txt'
- 'development/requirements-dev.txt'
- 'ansible_collections/arista/avd/requirements.txt'
- 'ansible_collections/arista/avd/requirements-dev.txt'
jobs:
'rebuild-docker-avd':
name: Instruct Docker Hub to build image
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ github-configure-ci-python3: ## Configure Python3 environment to run GA (Ubuntu:
.PHONY: install-requirements
install-requirements: ## Install python requirements for generic purpose
pip3 install --upgrade wheel
pip3 install -r development/requirements.txt
pip3 install -r development/requirements-dev.txt
pip3 install -r ansible_collections/arista/avd/requirements.txt
pip3 install -r ansible_collections/arista/avd/requirements-dev.txt

.PHONY: install-docker
install-docker: ## Install docker
Expand Down
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,36 @@ The documentation how to leverage ansible-avd collection is located here:

**Additional Python Libraries required:**

- Jinja2 `2.10.3`
- netaddr `0.7.19`
- requests `2.22.0`
- Jinja2 `2.11.3`
- treelib `1.5.5`
- pytest `5.3.4`
- pytest-html `2.0.1`
- cvprac `1.0.4`
- cvprac `1.0.5`
- paramiko `2.7.1`
- jsonschema `3.2.0`
- requests `2.25.1`
- PyYAML `5.4.1`
- md-toc `7.1.0`

**Ansible + Additional Python Libraries Installation:**

```shell
pip3 install -r development/requirements.txt
$ pip3 install ansible==2.9.6

$ pip3 install -r ansible_collections/arista/avd/requirements.txt
```

requirements.txt content:

```text
ansible==2.9.2
Jinja2==2.10.3
netaddr==0.7.19
requests==2.22.0
Jinja2==2.11.3
treelib==1.5.5
pytest==5.3.4
pytest-html==2.0.1
cvprac==1.0.4
cvprac==1.0.5
paramiko==2.7.1
jsonschema==3.2.0
requests==2.25.1
PyYAML==5.4.1
md-toc==7.1.0
```

**Ansible Configuration INI file:**
Expand Down
11 changes: 6 additions & 5 deletions ansible_collections/arista/avd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,29 @@ This repository provides custom plugins for Ansible's collection __arista.avd__

**Additional Python Libraries required:**

- Jinja2 `2.10.3`
- netaddr `0.7.19`
- requests `2.25.1`
- Jinja2 `2.11.3`
- treelib `1.5.5`
- cvprac `1.0.5`
- paramiko `2.7.1`
- jsonschema `3.2.0`
- requests `2.25.1`
- PyYAML `5.4.1`
- md-toc `7.1.0`

**Ansible + Additional Python Libraries Installation:**

```shell
pip3 install -r requirements.txt
$ pip3 isntall ansible==2.9.6

$ pip3 install -r requirements.txt
```

requirements.txt content:

```text
ansible==2.9.6
netaddr==0.7.19
Jinja2==2.10.3
Jinja2==2.11.3
treelib==1.5.5
cvprac==1.0.5
paramiko==2.7.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ $ source bin/activate
$ pip3 install psutil

# Install project requirements
$ curl -fsSL https://raw.githubusercontent.com/aristanetworks/ansible-avd/devel/development/requirements.txt -o requirements.txt
$ curl -fsSL https://raw.githubusercontent.com/aristanetworks/ansible-avd/devel/ansible_collections/arista/avd/requirements.txt -o requirements.txt
$ pip3 install -r requirements.txt
```

Expand Down
33 changes: 21 additions & 12 deletions ansible_collections/arista/avd/docs/installation/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,41 @@ If you leverage [Cloudvision](https://www.arista.com/en/products/eos/eos-cloudvi

## Additional Python Libraries required

- [Jinja2](https://pypi.org/project/Jinja2/) `2.10.3`
- [netaddr](https://pypi.org/project/netaddr/) `0.7.19`
- [requests](https://pypi.org/project/requests/) `2.22.0`
- [treelib](https://pypi.org/project/treelib/) `1.5.5`
- [cvprac](https://github.com/aristanetworks/cvprac) `1.0.4`
- netaddr `0.7.19`
- Jinja2 `2.11.3`
- treelib `1.5.5`
- cvprac `1.0.5`
- paramiko `2.7.1`
- jsonschema `3.2.0`
- requests `2.25.1`
- PyYAML `5.4.1`
- md-toc `7.1.0`

### Python requirements installation

In a shell, run following command:

```shell
$ pip3 install -r development/requirements.txt
$ pip3 install -r ansible_collections/arista/avd/requirements.txt
```

[`requirements.txt`](https://github.com/aristanetworks/ansible-avd/blob/devel/development/requirements.txt) has the following content:
[`requirements.txt`](https://github.com/aristanetworks/ansible-avd/blob/devel/ansible_collections/arista/avd/requirements.txt) has the following content:

```text
ansible==2.9.6
netaddr==0.7.19
Jinja2==2.10.3
requests==2.22.0
Jinja2==2.11.3
treelib==1.5.5
cvprac==1.0.4
cvprac==1.0.5
paramiko==2.7.1
jsonschema==3.2.0
requests==2.25.1
PyYAML==5.4.1
md-toc==7.1.0
```

> Depending of your operating system settings, `pip3` might be replaced by `pip`.
!!! warning
Depending of your operating system settings, `pip3` might be replaced by `pip`.

## Ansible runner requirements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,6 @@ $ virtualenv -p python3 .venv
$ source .venv/bin/activate

# Install Python requirements
$ pip3 install -r ansible-avd/development/requirements.txt
$ pip3 install -r ansible-avd/ansible_collections/arista/avd/requirements.txt
...
```
2 changes: 1 addition & 1 deletion ansible_collections/arista/avd/docs/release-notes/2.0.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Documentation for AVD version `2.0.x` [available here](https://www.avd.sh/en/rel

```cfg
netaddr==0.7.19
Jinja2==2.10.3
Jinja2==2.11.3
treelib==1.5.5
cvprac==1.0.5
paramiko==2.7.1
Expand Down
12 changes: 12 additions & 0 deletions ansible_collections/arista/avd/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ansible==2.9.6
ansible-lint==4.2.0
pycodestyle
flake8
pylint==2.4.4
twine
pre-commit==2.9.2
pre-commit-hooks==3.3.0
identify==1.4.20
docker
molecule==3.2.0
molecule-docker==0.2.4
9 changes: 9 additions & 0 deletions ansible_collections/arista/avd/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
netaddr==0.7.19
Jinja2==2.11.3
treelib==1.5.5
cvprac==1.0.5
paramiko==2.7.1
jsonschema==3.2.0
requests==2.25.1
PyYAML==5.4.1
md-toc==7.1.0
11 changes: 0 additions & 11 deletions development/requirements-dev.txt

This file was deleted.

1 change: 1 addition & 0 deletions development/requirements-dev.txt
10 changes: 0 additions & 10 deletions development/requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions development/requirements.txt

0 comments on commit f5c7b6d

Please sign in to comment.