diff --git a/.github/workflows/pull-request-management.yml b/.github/workflows/pull-request-management.yml index 413342524ea..ca0cba4f09a 100644 --- a/.github/workflows/pull-request-management.yml +++ b/.github/workflows/pull-request-management.yml @@ -112,7 +112,7 @@ jobs: python-version: ${{ matrix.python_version }} - name: 'Install Python requirements' run: | - pip install -r ansible_collections/arista/avd/requirements-dev.txt -r ansible_collections/arista/avd/requirements.txt --upgrade + pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade # ----------------------------------- # # EOS CLI CONFIG GEN MOLECULE @@ -433,7 +433,7 @@ jobs: 3.13 - name: 'Install Python & Ansible requirements' run: | - pip install -r ansible_collections/arista/avd/requirements-dev.txt -r ansible_collections/arista/avd/requirements.txt --upgrade + pip install -r .github/requirements-ci.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade ansible-galaxy collection install -r ansible_collections/arista/avd/collections.yml - name: 'Run ansible-test integration test cases' run: | diff --git a/ansible_collections/arista/avd/docs/contribution/development-tooling.md b/ansible_collections/arista/avd/docs/contribution/development-tooling.md index 7c0d7d0d641..59389bca301 100644 --- a/ansible_collections/arista/avd/docs/contribution/development-tooling.md +++ b/ansible_collections/arista/avd/docs/contribution/development-tooling.md @@ -56,7 +56,7 @@ Developing with your local Python environment requires you to configure and inst Recommended steps with Python virtual environment: 1. Create and activate a Python virtual environment. -2. Install Python requirements located in the AVD repository: [requirements-dev.txt](https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/requirements-dev.txt) and [requirements.txt](https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/requirements.txt). +2. Install Python requirements located in the AVD repository: [requirements-dev.txt](https://github.com/aristanetworks/avd/blob/devel/ansible_collections/arista/avd/requirements-dev.txt). !!! note Ensure the virtual environment is located outside of the AVD project directory. @@ -72,7 +72,7 @@ source avd-venv/bin/activate # The installation _must_ be performed from the root of the cloned avd repository. cd avd # Requirements files are located in `ansible_collections/arista/avd` of the avd repository. -pip3 install -r ansible_collections/arista/avd/requirements-dev.txt -r ansible_collections/arista/avd/requirements.txt --upgrade +pip3 install -r ansible_collections/arista/avd/requirements-dev.txt --upgrade ``` !!! note diff --git a/containers/dev/.devcontainer/entrypoint.sh b/containers/dev/.devcontainer/entrypoint.sh index 5bae915c88e..211f761e4ee 100644 --- a/containers/dev/.devcontainer/entrypoint.sh +++ b/containers/dev/.devcontainer/entrypoint.sh @@ -14,9 +14,9 @@ if [ -z "$(command -v ansible)" ]; then pip install "pyavd[ansible] @ ${PYAVD_INSTALL_LOCATION}" ansible-galaxy collection install --force ${AVD_INSTALL_PATH} # otherwise install requirements and collection from container workspace - elif [ -f ${CONTAINER_WSF_AVD_PATH}/requirements.txt ] && [ -f ${CONTAINER_WSF_AVD_PATH}/requirements-dev.txt ] ; then + elif [ -f ${CONTAINER_WORKSPACE}/python-avd/pyproject.toml ] && [ -f ${CONTAINER_WSF_AVD_PATH}/requirements-dev.txt ] ; then # use editable install for requirements - pip install -r ${CONTAINER_WSF_AVD_PATH}/requirements-dev.txt -r ${CONTAINER_WSF_AVD_PATH}/requirements.txt + pip install -e ${CONTAINER_WORKSPACE}/python-avd[ansible-collection] --config-settings editable_mode=compat -r ${CONTAINER_WSF_AVD_PATH}/requirements-dev.txt ansible-galaxy collection install --force ${CONTAINER_WSF_AVD_PATH} fi