diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 91dcbf8b91..0000000000 --- a/.coveragerc +++ /dev/null @@ -1,11 +0,0 @@ -[run] -omit = - */.tox/* - packages/fetchai/contracts/fet_erc20/* - packages/fetchai/contracts/oracle/* - packages/fetchai/contracts/oracle_client/* - packages/fetchai/contracts/staking_erc20/* - packages/fetchai/skills/fipa_dummy_buyer/* - packages/fetchai/skills/error_test_skill/* - packages/fetchai/skills/task_test_skill/* - plugins/aea-ledger-cosmos/aea_ledger_cosmos/cosmos.py diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 6829271ef7..654a3ef416 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,12 +1,12 @@ name: 🐛 Bug Report -description: Report a reproducible bug. -title: "Bug report: " +description: Report a reproducible bug +title: "" labels: ["bug", "unconfirmed"] body: - type: markdown attributes: value: | - Thank you for reporting the issue you are facing. Please complete the following so we can have the details necessary to assist you. + Thank you for reporting the issue you are facing. Please complete this form so we can have the necessary information to assist you. - type: checkboxes id: prerequisites attributes: @@ -46,11 +46,11 @@ body: id: context attributes: label: Context - description: Any relevant information about your setup (this is important in case the issue is not reproducible except for under certain conditions) + description: Any relevant information about your setup (this is important in case the issue is not reproducible except under certain conditions) placeholder: | Operating system [e.g. MacOS], Python version [e.g. 3.8.5], AEA version [e.g. 1.2.0], ... validations: - required: true + required: false - type: textarea id: logs attributes: diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 6644e84923..6cd7f1bf3c 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -1,12 +1,12 @@ name: ☝️ Feature request description: Suggest an idea for this project -title: "Feature request: " -labels: ["enhancement", "unconfirmed"] +title: "" +labels: ["feature-request", "unconfirmed"] body: - type: markdown attributes: value: | - Thank you for suggesting a new idea for this project. Please complete the following to ensure we have all the details to get things started. + Thank you for suggesting a new idea for the AEA project. Please complete this form so we can have the necessary information about the feature you are requesting. - type: checkboxes id: prerequisites attributes: diff --git a/.github/PULL_REQUEST_TEMPLATE/release.md b/.github/PULL_REQUEST_TEMPLATE/release.md new file mode 100644 index 0000000000..1b4b7ba0cc --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/release.md @@ -0,0 +1,29 @@ +## Release summary + +Version number: [e.g. 1.0.1] + +## Release details + +Describe in short the main changes with the new release. + +## Checklist + +_Put an `x` in the boxes that apply._ + +- [ ] I am making a pull request against the `main` branch from `develop`. +- [ ] Lint and unit tests pass locally. +- [ ] I have checked the fingerprint hashes are correct by running (`scripts/generate_ipfs_hashes.py`). +- [ ] I have regenerated and updated the latest API docs. +- [ ] I built the documentation and updated it with the latest changes. +- [ ] I have added an item in `HISTORY.md` for this release. +- [ ] I bumped the version number in the `aea/__version__.py` file. +- [ ] I bumped the version number in every Docker image of the repo and published it. Also, I built and published them with tag `latest` + (check the READMEs of [`aea-develop`](https://github.com/fetchai/agents-aea/blob/master/develop-image/README.md#publish) + and [`aea-user`](https://github.com/fetchai/agents-aea/blob/master/develop-image/user-image/README.md#publish)) +- [ ] I have pushed the latest packages to the registry. +- [ ] I have uploaded the latest `aea` to PyPI. +- [ ] I have uploaded the latest plugins to PyPI. + +## Further comments + +Write here any other comment about the release, if any. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d82b10200f..b9994fd3d1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,67 +1,36 @@ ## Proposed changes -Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. +Describe the changes here. -## Fixes +## Issues -If it fixes a bug or resolves a feature request, be sure to link to that issue. +Links to any issues resolved. ## Types of changes What types of changes does your code introduce to agents-aea? _Put an `x` in the boxes that apply_ -- [ ] Bugfix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Bugfix (non-breaking change that fixes an issue) +- [ ] New feature (non-breaking change that adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to stop working as expected) +- [ ] Something else (e.g. test, package, script, example, deployment, infrastructure, ...) ## Checklist _Put an `x` in the boxes that apply._ -- [ ] I have read the [CONTRIBUTING](https://github.com/fetchai/agents-aea/blob/main/CONTRIBUTING.md) doc -- [ ] I am making a pull request against the `develop` branch (left side). Also you should start your branch off our `develop`. -- [ ] Lint and unit tests pass locally with my changes and CI passes too -- [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] I have checked that code coverage does not decrease. -- [ ] I have added necessary documentation (if appropriate) -- [ ] Any dependent changes have been merged and published in downstream modules - -## Further comments - -If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... - - -DELETE INCLUSIVE THIS AND BELOW FOR STANDARD PR ------- - -## Release summary +- [ ] I have read the [CONTRIBUTING](https://github.com/fetchai/agents-aea/blob/main/CONTRIBUTING.md) document. +- [ ] I have based my branch, and I am making a pull request against, the `develop` branch. +- [ ] Lint and unit tests pass locally with my changes. -Version number: [e.g. 1.0.1] +### If applicable -## Release details - -Describe in short the main changes with the new release. - -## Checklist - -_Put an `x` in the boxes that apply._ - -- [ ] I have read the [CONTRIBUTING](https://github.com/fetchai/agents-aea/blob/master/CONTRIBUTING.md) doc -- [ ] I am making a pull request against the `main` branch (left side), from `develop` -- [ ] Lint and unit tests pass locally and in CI -- [ ] I have checked the fingerprint hashes are correct by running (`scripts/generate_ipfs_hashes.py`) -- [ ] I have regenerated the latest API docs -- [ ] I built the documentation and updated it with the latest changes -- [ ] I have added an item in `HISTORY.md` for this release -- [ ] I bumped the version number in the `aea/__version__.py` file. -- [ ] I bumped the version number in every Docker image of the repo and published it. Also, I built and published them with tag `latest` - (check the READMEs of [`aea-develop`](https://github.com/fetchai/agents-aea/blob/master/develop-image/README.md#publish) - and [`aea-user`](https://github.com/fetchai/agents-aea/blob/master/develop-image/user-image/README.md#publish)) -- [ ] I have pushed the latest packages to the registry. -- [ ] I have uploaded the latest `aea` to PyPI. -- [ ] I have uploaded the latest plugins to PyPI. +- [ ] I have added tests that prove my fix is effective or that my feature works. +- [ ] I have checked that code coverage does not decrease. +- [ ] I have added/updated the documentations. +- [ ] Dependent changes have been merged and published in downstream modules. ## Further comments -Write here any other comment about the release, if any. +If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did, what alternatives you considered, etc. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e92a39dcd8..b499599ffd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/docs_pr_preview.yml b/.github/workflows/docs_pr_preview.yml index 45c0d6f129..2d08db84cd 100644 --- a/.github/workflows/docs_pr_preview.yml +++ b/.github/workflows/docs_pr_preview.yml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - name: Use python 3.7 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.7' diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 407b913b49..914f76a6f4 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Setup GCloud - sandbox uses: google-github-actions/setup-gcloud@v0 diff --git a/.github/workflows/upload_docker_images.yaml b/.github/workflows/upload_docker_images.yaml index 7475d40b81..0c097847de 100644 --- a/.github/workflows/upload_docker_images.yaml +++ b/.github/workflows/upload_docker_images.yaml @@ -10,7 +10,7 @@ jobs: BASE_TAG: fetchai/aea-develop runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up tag run: echo export TAG=${BASE_TAG}:$(python3 -c "from setup import about; print(about[\"__version__\"])") > env.sh - name: docker login diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 29267cdb2c..a431b74cef 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,14 +1,9 @@ name: AEA framework sanity checks and tests -on: - push: - branches: - - develop - - main - pull_request: +on: pull_request jobs: - python_code_quality_checks: + python_checks: continue-on-error: False runs-on: '${{ matrix.os }}' strategy: @@ -25,7 +20,6 @@ jobs: - black-check - isort-check - flake8 - - darglint - vulture - mypy - pylint @@ -41,13 +35,13 @@ jobs: run: | tox -e ${{ matrix.tox-job }} - go_code_checks: + go_checks: continue-on-error: False runs-on: ubuntu-latest timeout-minutes: 20 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: 3.8 - uses: actions/setup-go@v3 @@ -127,8 +121,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: 3.8 - uses: actions/setup-go@v3 @@ -152,8 +146,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: 3.8 - uses: actions/setup-node@v1 @@ -169,13 +163,13 @@ jobs: - name: Install markdown-spellcheck run: sudo npm install -g markdown-spellcheck - name: Check Docs links - run: tox -e check_doc_links + run: tox -e check-doc-links - name: Check API Docs updated run: tox -e check_api_docs - name: Check spelling run: tox -e spell_check - plugins_install_check: + plugins_install: continue-on-error: False runs-on: ${{ matrix.sys.os }} strategy: @@ -187,10 +181,10 @@ jobs: python_version: [3.8] timeout-minutes: 10 steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 - if: matrix.sys.os == 'windows-latest' uses: msys2/setup-msys2@v2 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python_version }} - if: matrix.os == 'ubuntu-latest' @@ -221,8 +215,8 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: 3.8 - uses: actions/setup-go@v3 @@ -238,19 +232,72 @@ jobs: run: | make protolint - integration_checks: + integration_tests: + if: github.base_ref == 'main' + continue-on-error: True + needs: + - python_checks + - go_checks + - misc_checks + - misc_checks_extra + - plugins_install + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - uses: actions/setup-go@v3 + with: + go-version: "^1.17.0" + - name: Setup GCloud - production + uses: google-github-actions/setup-gcloud@v0 + with: + project_id: ${{ secrets.GCLOUD_FETCH_AI_PROD_PROJECT }} + service_account_key: ${{ secrets.GCLOUD_FETCH_AI_PROD_KEY }} + - name: Install dependencies (ubuntu-latest) + run: | + sudo apt-get update --fix-missing + sudo apt-get install libmbedtls-dev + sudo apt-get autoremove + sudo apt-get autoclean + pip install tox + # install Protobuf compiler + wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip + unzip protoc-3.19.4-linux-x86_64.zip -d protoc + sudo mv protoc/bin/protoc /usr/local/bin/protoc + - name: Configure Docker + run: | + gcloud auth configure-docker + - name: Pull SOEF Image + run: | + docker pull gcr.io/fetch-ai-images/soef:9e78611 # change this to latest tag + - name: Pull fetchd + run: | + docker pull fetchai/fetchd:0.10.2 + - name: Pull ganache + run: | + docker pull trufflesuite/ganache-cli:latest + - name: Async integration tests + run: tox -e py3.8 -- -m 'integration and not unstable and not ledger' ./tests --ignore=tests/test_aea_core_packages + + + core_packages_tests: + # tests intersection with ledger and integration + # limited tests set for quick checking primary functionality of the AEA continue-on-error: True needs: - - python_code_quality_checks - - go_code_checks + - python_checks + - go_checks - misc_checks - misc_checks_extra - - plugins_install_check + - plugins_install runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: 3.8 - uses: actions/setup-go@v3 @@ -278,25 +325,29 @@ jobs: - name: Pull SOEF Image run: | docker pull gcr.io/fetch-ai-images/soef:9e78611 # change this to latest tag - - name: Sync AEA loop integration tests + - name: Pull fetchd + run: | + docker pull fetchai/fetchd:0.10.2 + - name: Pull ganache run: | - tox -e py3.8 -- -m 'sync' # --aea-loop sync + docker pull trufflesuite/ganache-cli:latest - name: Async integration tests - run: tox -e py3.8 -- -m 'integration and not unstable and not ledger' + run: tox -e py3.8 -- tests/test_aea_core_packages/ - integration_checks_ledger: + integration_ledger_tests: + if: github.base_ref == 'main' continue-on-error: True needs: - - python_code_quality_checks - - go_code_checks + - python_checks + - go_checks - misc_checks - misc_checks_extra - - plugins_install_check + - plugins_install runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: 3.8 - name: Setup GCloud - production @@ -317,16 +368,16 @@ jobs: run: | docker pull gcr.io/fetch-ai-images/soef:9e78611 # change this to latest tag - name: Integration tests - run: tox -e py3.8 -- -m 'integration and not unstable and ledger' + run: tox -e py3.8 -- -m 'integration and not unstable and ledger' ./tests --ignore=tests/test_aea_core_packages - platform_checks: + aea-tests: continue-on-error: True needs: - - python_code_quality_checks - - go_code_checks + - python_checks + - go_checks - misc_checks - misc_checks_extra - - plugins_install_check + - plugins_install runs-on: ${{ matrix.os }} strategy: matrix: @@ -334,8 +385,8 @@ jobs: python_version: [3.8, 3.9, "3.10"] timeout-minutes: 90 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python_version }} - uses: actions/setup-go@v3 @@ -392,48 +443,192 @@ jobs: - if: True name: Unit tests run: | - tox -e py${{ matrix.python_version }} -- -m 'not integration and not unstable' + tox -e py${{ matrix.python_version }} -- -m 'not integration and not unstable and not ledger' ./tests/test_docs ./tests/test_aea - name: Plugin tests run: | tox -e plugins-py${{ matrix.python_version }} -- -m 'not integration and not unstable' - - platform_checks_sync_aea_loop: + examples-tests: + if: github.base_ref == 'main' continue-on-error: True needs: - - python_code_quality_checks - - go_code_checks + - python_checks + - go_checks - misc_checks - misc_checks_extra - - plugins_install_check + - plugins_install runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 90 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: 3.8 - uses: actions/setup-go@v3 with: go-version: "^1.17.0" - name: Install dependencies (ubuntu-latest) + run: | + sudo apt-get update --fix-missing + sudo apt-get autoremove + sudo apt-get autoclean + pip install tox + - name: Unit tests + run: tox -e py3.8 -- tests/test_examples + + aea-extras-tests: + continue-on-error: True + needs: + - python_checks + - go_checks + - misc_checks + - misc_checks_extra + - plugins_install + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python_version: [3.8, 3.9, "3.10"] + timeout-minutes: 90 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python_version }} + - uses: actions/setup-go@v3 + with: + go-version: "^1.17.0" + - if: matrix.os == 'ubuntu-latest' + name: Install dependencies (ubuntu-latest) run: | sudo apt-get update --fix-missing sudo apt-get install libmbedtls-dev sudo apt-get autoremove sudo apt-get autoclean pip install tox + # install Protobuf compiler wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip unzip protoc-3.19.4-linux-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc make protolint_install - - name: Unit tests with sync agent loop + # sudo apt-get install -y protobuf-compiler + # use sudo rm /var/lib/apt/lists/lock above in line above update if dependency install failures persist + # use sudo apt-get dist-upgrade above in line below update if dependency install failures persist + - if: matrix.os == 'macos-latest' + name: Install dependencies (macos-latest) run: | - tox -e py3.8 -- --aea-loop sync -m 'not integration and not unstable' + pip install tox + brew install gcc + # brew install protobuf + # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb + wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-osx-x86_64.zip + unzip protoc-3.19.4-osx-x86_64.zip -d protoc + sudo mv protoc/bin/protoc /usr/local/bin/protoc + brew tap yoheimuta/protolint + brew install protolint + - if: matrix.os == 'windows-latest' + name: Install dependencies (windows-latest) + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + run: | + python -m pip install -U pip + echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" + choco install protoc --version 3.19.4 + choco install mingw -y + choco install make -y + # to check make was installed + make --version + pip install tox + # wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip + # unzip protoc-3.19.4-win64.zip -d protoc + # sudo mv protoc/bin/protoc /usr/local/bin/protoc + python scripts/update_symlinks_cross_platform.py + make protolint_install_win + # just check protolint runs + protolint version + - name: Unit tests + run: | + tox -e py${{ matrix.python_version }} -- ./tests/test_aea_extra - golang_checks: + packages-tests: + if: github.base_ref == 'main' continue-on-error: True needs: - - go_code_checks + - python_checks + - go_checks + - misc_checks + - misc_checks_extra + - plugins_install + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python_version: [3.8, 3.9, "3.10"] + timeout-minutes: 90 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python_version }} + - uses: actions/setup-go@v3 + with: + go-version: "^1.17.0" + - if: matrix.os == 'ubuntu-latest' + name: Install dependencies (ubuntu-latest) + run: | + sudo apt-get update --fix-missing + sudo apt-get install libmbedtls-dev + sudo apt-get autoremove + sudo apt-get autoclean + pip install tox + # install Protobuf compiler + wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip + unzip protoc-3.19.4-linux-x86_64.zip -d protoc + sudo mv protoc/bin/protoc /usr/local/bin/protoc + make protolint_install + # sudo apt-get install -y protobuf-compiler + # use sudo rm /var/lib/apt/lists/lock above in line above update if dependency install failures persist + # use sudo apt-get dist-upgrade above in line below update if dependency install failures persist + - if: matrix.os == 'macos-latest' + name: Install dependencies (macos-latest) + run: | + pip install tox + brew install gcc + # brew install protobuf + # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb + wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-osx-x86_64.zip + unzip protoc-3.19.4-osx-x86_64.zip -d protoc + sudo mv protoc/bin/protoc /usr/local/bin/protoc + brew tap yoheimuta/protolint + brew install protolint + - if: matrix.os == 'windows-latest' + name: Install dependencies (windows-latest) + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + run: | + python -m pip install -U pip + echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" + choco install protoc --version 3.19.4 + choco install mingw -y + choco install make -y + # to check make was installed + make --version + pip install tox + # wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip + # unzip protoc-3.19.4-win64.zip -d protoc + # sudo mv protoc/bin/protoc /usr/local/bin/protoc + python scripts/update_symlinks_cross_platform.py + make protolint_install_win + # just check protolint runs + protolint version + - if: True + name: Unit tests + run: | + tox -e py${{ matrix.python_version }} -- --cov=packages/fetchai/connections --cov=packages/fetchai/contracts --cov=packages/fetchai/protocols --cov=packages/fetchai/skills -m 'not integration and not unstable' ./tests/test_packages_for_aea_tests ./tests/test_packages + + golang_tests: + continue-on-error: True + needs: + - go_checks runs-on: ${{ matrix.os }} strategy: matrix: @@ -444,8 +639,8 @@ jobs: python-version: [3.8] timeout-minutes: 45 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - uses: actions/setup-go@v3 @@ -472,12 +667,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go 1.17 - uses: actions/setup-go@v1 + uses: actions/setup-go@v3 with: go-version: 1.17 id: go - name: Check out code into the Go module directory - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Install dependencies (ubuntu-latest) run: | sudo apt-get update --fix-missing @@ -500,17 +695,17 @@ jobs: coverage_checks: continue-on-error: True needs: - - python_code_quality_checks - - go_code_checks + - python_checks + - go_checks - misc_checks - misc_checks_extra - docs_check - - plugins_install_check + - plugins_install runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/checkout@master - - uses: actions/setup-python@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: 3.8 - uses: actions/setup-go@v3 @@ -531,7 +726,7 @@ jobs: make protolint_install - name: Run all tests run: | - tox -e py3.8-cov -- --ignore=tests/test_docs --ignore=tests/test_examples --ignore=tests/test_packages/test_skills_integration -m 'not unstable' + tox -e py3.8-cov -- --ignore=tests/test_docs --ignore=tests/test_examples --ignore=tests/test_packages/test_skills_integration -m 'not unstable' ./tests tox -e plugins-py3.8-cov -- --cov-append -m 'not unstable' continue-on-error: true - name: Show full coverage report diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index fa152a55ad..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "docker-images"] - path = docker-images - url = https://github.com/fetchai/docker-images.git diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index a5cadf23ad..0000000000 --- a/.pylintrc +++ /dev/null @@ -1,48 +0,0 @@ -[MASTER] -ignore-patterns=__main__.py,.*_pb2.py,tac.sh,tac_local.sh - -[MESSAGES CONTROL] -disable=C0103,C0201,C0301,C0302,W0105,W0707,W1202,W1203,R0801,C0209,R1735 - -# See here for more options: https://www.codeac.io/documentation/pylint-configuration.html -## Eventually resolve these: -# W0707: raise-missing-from - -## Eventually decide on a logging policy: -# W1202: logging-format-interpolation -# W1203: logging-fstring-interpolation - -## Keep the following: -# C0103: invalid-name, # kept as no harm -# C0201: consider-iterating-dictionary, # kept as no harm -# C0301: http://pylint-messages.wikidot.com/messages:c0301 > Line too long (%s/%s), # kept as no harm -# C0302: http://pylint-messages.wikidot.com/messages:c0302 > Too many lines in module (%s) , # kept as no harm -# W0105: pointless-string-statement, # kept as no harm -# R0801: similar lines, # too granular -# C0209: Formatting a regular string which could be a f-string (consider-using-f-string) # to many usage atm -# R1735: Consider using {} instead of dict() (use-dict-literal) - -[IMPORTS] -ignored-modules=bech32,ecdsa,lru,eth_typing,eth_keys,eth_account,ipfshttpclient,werkzeug,openapi_spec_validator,aiohttp,multidict,yoti_python_sdk,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,web3,aioprometheus,pyaes,Crypto,asn1crypto,cosmpy,google - -[DESIGN] -min-public-methods=1 -max-public-methods=36 -max-returns=10 -max-bool-expr=7 -max-args=27 -max-locals=31 -max-statements=80 -max-parents=11 -max-branches=24 -max-attributes=38 - -[REFACTORING] -max-nested-blocks=6 - -[SPELLING] -# uncomment to enable -# spelling-dict=en_US - -# List of comma separated words that should not be checked. -spelling-ignore-words=nocover,pragma,params,multiaddress,multihash,OEF,wrt,Protobuf,protobuf,backend,coroutine,noqa,ascii,asyncio,awaitable,kwargs,multihashing,interoperable,inlining,datamodel,str,sqlite,sql,async,json,boolean,config,pytest,counterparty,Unregister,unregister,behaviours,crypto,cryptos,args,url,tx,testnet,decrypt,validator,env,jsonschema,URI,uri,entrypoint,initialise,ethereum,traceback,fetchai,apis,api,TCPSocketProtocol,instantiation,ip,Haversine,instantiation,enum,nosec,Init,init,Behaviour,className,AEA,aea,schemas,vendorized,subcommand,filesystem,workdir,ctx,yaml,representer,multiprocess,Struct,struct,Serializers,ValueType,serializer,filepath,subprocesses,Teardown,namespace,LF,maddr,profiler,cpu,myfunction,prepend,mydecorator,CLI,subprocess,ComponentId,bool,satisfiable,unsatisfiable,dicts,utils,entrypoints,prepended,coroutines,functools,ctrl,posix,stdin,Posix,tcp,AbstractServer,StreamReaderProtocol,StreamReader,cli,reraise,SafeLoader,SafeDumper,pathlib,coro,runnable,Runnable,PublicId,stdout,netloc,dest,subgraph,subdict,behaviour,Popen,Interprocess,datetime,isort,runtime,toplevel,callables,Enqueue,Kahn's,myagent,fn,cwd,disjunction,cancelled,Pythonic,pythonic,prepends,subclasses,protolint,Protolint,performatives,programmatically,behaviour's,AsyncResult,sys,enqueued,multithread,teardown,satisfiability,dep,overridables,arg,stderr,multithreading,configs,getters,getter,classmethods,enqueue,interprocess,exc,pydocstyle,linter,programme,compositional,formatter,counterparty's,endstates,EndState,AgentContext,disambiguated,prepending,dir,tarfiles,docstyle,msg,func,ComponentType,PosixNamedPipeProtocol,ungrouped,reformats,protoc,DialogueLabel,Metaclass,responder,UtilityParams,ExchangeParams,GoodHoldings,CurrencyHoldings,rb,auth,dirs,symlink,BadParameter,metavar,readme,multithreads,upgrader,src,pid,mypy,outstream,CliRunner,semver,VersionInfo,reinstantiate,pre,ItemId,serializable,repo,upgraders,addr,endstate,performative's,proto,uncomment,Deserialize,fnctl,Sym,cd,ACN,os,ok,SDK,subtypes,JS,fifos,preprocess,dst,overridable,Mixin,unregistration,multithreaded,iterable,txt,ln,py,Util,ClickException,ai,ABI,approver,deployer,trustless,wei,AppRunner,TCPSite,webhook,Webhook,Webhooks,hostname,http,ClientResponse,TLS,soef,xml,unregisters,FET,eth,nft,AbstractEventLoop,aiohttp,uris,StreamWriter,msgs,oef,watchdogging,webhooks,RequestValidator,ACA,alice,faber,RegisterDialogue,fipa,prometheus,TAC,fet,tac,CFP,GymDialogue,RL,LedgerApiDialogue,faber's,AWx,parametrized,FipaDialogue,MlTradeDialogue,carpark,blockchain,counterparties,dec,mins,Calc,vyper,SigningDialogue,modelling,ContractApiDialogue,alice's,quickfix,StateUpdateDialogue,hacky,aea's,dataset,MessageId,cfp,rl,TacDialogue,BaseFipaDialogue,von,maths,Deque,unregistering,yoti,copyable,deepcopy,multiaddresses,logfile,Vous,ipaddress,clargs,IPCChannel,MultiAddr,Rendez,gcc,aioprometheus,getattr,noop,Noop,multiagent,ttfb,rtt,mem,xaxis,superclass,docstring,execreport,benchmarked,ReportPrinter,plt,kb,num,initialised,bytecode,wasm,denom,mainnet,fp,uid,cosmwasm,Conftest,decrypted,initialisation,hmac,plaintext,aes,ipfs,unlinked,ipfshttpclient,gasstation,Ganache,hexbytes,txs,LRU diff --git a/.spelling b/.spelling index faf5b38656..51374201c4 100644 --- a/.spelling +++ b/.spelling @@ -241,6 +241,19 @@ golang basecontracttesttool linter stargateworld +faq +fetchai +agents-aea +ci +perf +scipy +numpy +scikit-image +hello_world +pis +prebuilt +jsonschema +tox - docs/language-agnostic-definition.md fetchai protocol_id @@ -301,3 +314,6 @@ dorado-1 ACA-Py ACA-Py-based prover + - CODE_OF_CONDUCT.md +color +behavior diff --git a/AUTHORS.md b/AUTHORS.md index efd70f9023..8ce0ab12a4 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,16 +1,16 @@ # Authors -This is the official list of Fetch.ai authors for copyright purposes. +This is the official list of the AEA Framework authors: +* Ali Hosseini [5A11](https://github.com/5A11) +* Yuri Turchenkov [solarw](https://github.com/solarw) +* James Riehl [jrriehl](https://github.com/jrriehl) * Marco Favorito [MarcoFavorito](https://github.com/MarcoFavorito) * David Minarsch [DavidMinarsch](https://github.com/DavidMinarsch) -* Ali Hosseini [5A11](https://github.com/5A11) * Aristotelis Triantafyllidis [Totoual](https://github.com/Totoual) * Diarmid Campbell [dishmop](https://github.com/dishmop) * Oleg Panasevych [Panasevychol](https://github.com/panasevychol) * Kevin Chen [Kevin-Chen0](https://github.com/Kevin-Chen0) -* Yuri Turchenkov [solarw](https://github.com/solarw) * Lokman Rahmani [lrahmani](https://github.com/lrahmani) * Jiří Vestfál [MissingNO57](https://github.com/MissingNO57) * Ed Fitzgerald [ejfitzgerald](https://github.com/ejfitzgerald) -* James Riehl [jrriehl](https://github.com/jrriehl) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f165561d96..374cb495d9 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,75 +2,77 @@ ## Our Pledge -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards -Examples of behaviour that contributes to creating a positive environment -include: +Examples of behavior that contributes to a positive environment for our community include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community -Examples of unacceptable behaviour by participants include: +Examples of unacceptable behavior include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +* Publishing others’ private information, such as a physical or email address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting -## Our Responsibilities +## Enforcement Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable -behaviour and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behaviour. +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviours that they deem inappropriate, -threatening, offensive, or harmful. +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behaviour may be -reported by contacting the project team at developer@fetch.ai. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at developer@fetch.ai. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. +**Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +This Code of Conduct is adapted from the [Contributor Covenant][https://www.contributor-covenant.org], version 2.1, +available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html). -[homepage]: https://www.contributor-covenant.org +Community Impact Guidelines were inspired by [Mozilla’s code of conduct enforcement ladder](https://github.com/mozilla/diversity). -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq +For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 279d70996f..d94f481fb2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,71 +1,154 @@ # Contributing -Contributions to the framework, its plugins, related tools and packages are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. +Contributions to the framework, plugins, related tools and packages are welcome! Every little helps and credit will always be given. -There are various ways to contribute: +As a contributor, here are the guidelines we would like you to follow: -- If you need support, want to report a bug or ask for features, you can check the [Issues page](https://github.com/fetchai/agents-aea/issues) and raise an issue, if applicable. +- [Code of Conduct](#coc) +- [Question or Problem?](#question) +- [Issues and Bugs](#issue) +- [Feature Requests](#feature) +- [Submission Guidelines](#submit) +- [Coding Rules](#rules) +- [Commit Message Guidelines](#commit) +- [Development Guidelines](#dev) -- If you would like to contribute a bug fix of feature then [submit a Pull request](https://github.com/fetchai/agents-aea/pulls). +## Code of Conduct -For other kinds of feedback, you can contact one of the -[authors](https://github.com/fetchai/agents-aea/blob/main/AUTHORS.md) by email. +Please read and follow our [Code of Conduct][coc]. -Before reading on, please have a look at the [code of conduct](https://github.com/fetchai/agents-aea/blob/main/CODE_OF_CONDUCT.md). +## Question or Problem? -## A few simple rules +Use [Github Discussions][ghdiscussion] to ask support-related questions. This is because: -- All Pull Requests should be opened against the `develop` branch. Do **not** open a Pull Request against `main`! +- Questions and answers stay available for public viewing so your question/answer might help someone else. +- Github Discussions voting system ensures the best answers are prominently visible. -- Before working on a feature, reach out to one of the core developers or discuss the feature in an issue. The framework caters a diverse audience and new features require upfront coordination. +Do not open issues for general support questions; they are used for bug reports and feature requests. -- Include unit tests for 100% coverage when you contribute new features, as they help to a) prove that your code works correctly, and b) guard against future breaking changes to lower the maintenance cost. +## Found a Bug? -- Bug fixes also generally require unit tests, because the presence of bugs usually indicates insufficient test coverage. +If you find a bug in the source code, [submit a bug report issue](#submit-issue) to our [GitHub repository][github]. +Even better, you can [submit a Pull Request](#submit-pr) with a fix. -- Keep API compatibility in mind when you change code in the `aea`. The `aea` has passed version 1.0 and hence cannot make non-backward-compatible API changes without a major release. Reviewers of your pull request will comment on any API compatibility issues. +## Missing a Feature? +You can *request* a new feature by [submitting a feature request issue](#submit-issue) to our [GitHub repository][github]. +If you would like to *implement* a new feature: -- When you contribute a new feature to `aea`, the maintenance burden is transferred to the core team. This means that the benefit of the contribution must be compared against the cost of maintaining the feature. +* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. +* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr). -- Where possible, add new functionality via plugins. Currently, CLI and ledger plugins are supported. Furthermore, the `aea` native packages also allow for extensibility. +## Submission Guidelines -- All files must include a license header. +### Submitting an Issue -- Before committing and opening a PR, run all tests locally. This saves CI hours and ensures you only commit clean code. +Before you submit an issue, please search the [issue tracker][issues]. An issue for your problem might already exist and the discussion might inform you of workarounds readily available. -## Contributing code +For bug reports, it is important that we can reproduce and confirm it. For this, we need you to provide a minimal reproduction instruction (this is part of the bug report issue template). -If you have improvements, send us your pull requests! +You can file new issues by selecting from our [new issue templates](https://github.com/fetchai/agents-aea/issues/new/choose) and filling out the issue template. -A team member will be assigned to review your pull requests. All tests are run as part of CI as well as various other checks (linters, static type checkers, security checkers, etc). If there are any problems, feedback is provided via GitHub. Once the pull requests is approved and passes continuous integration checks, you or a team member can merge it. +### Submitting a Pull Request (PR) -If you want to contribute, start working through the codebase, navigate to the Github "issues" tab and start looking through interesting issues. If you are not sure of where to start, then start by trying one of the smaller/easier issues here i.e. issues with the "good first issue" label and then take a look at the issues with the "contributions welcome" label. These are issues that we believe are particularly well suited for outside contributions, often because we probably won't get to them right now. If you decide to start on an issue, leave a comment so that other people know that you're working on it. If you want to help out, but not alone, use the issue comment thread to coordinate. +Before you submit your Pull Request (PR) consider the following guidelines: -## Development setup +1. All Pull Requests should be based off of and opened against the `develop` branch. Do **not** open a Pull Request against `main`! -First, setup your environment by either using the `develop-image` or by following these steps: +2. Search [Existing PRs](https://github.com/fetchai/agents-aea/pulls) for an open or closed PR that relates to your submission. + You don't want to duplicate existing efforts. -- The simplest way to get setup for development on the framework is to install Python `>=3.6` and `pipenv`, then run the following: +3. Be sure that an issue describes the problem you're fixing, or the design for the feature you'd like to add. - make new_env - pipenv shell +4. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the fetchai/agents-aea repo. + +5. In your forked repository, make your changes in a new git branch created from the `develop` branch. + +6. Make your changes, **including appropriate test cases**. + +7. Follow our [coding rules](#rules). + +8. Run all tests and checks locally, as described in the [development guide](#dev), and ensure they pass. This saves CI hours and ensures you only commit clean code. + +9. Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). + +10. Push your branch to GitHub. + +11. In GitHub, send a pull request to `fetchai:develop`. + +> Where possible, try to take advantage of the modularity of the framework and add new functionality via a new module. Currently, ledger plugins are supported and packages (skills, connections, protocols, contracts) allow for extensibility. + +#### Reviewing a Pull Request + +The AEA team reserves the right not to accept pull requests from community members who haven't been good citizens of the community. Such behavior includes not following our [code of conduct][coc] and applies within or outside of the managed channels. + +When you contribute a new feature, the maintenance burden is transferred to the core team. This means that the benefit of the contribution must be compared against the cost of maintaining the feature. + +#### Addressing review feedback + +If we ask for changes via code reviews then: + +1. Make the required updates to the code. + +2. Re-run the tests and checks to ensure they are still passing. + +3. Create a new commit and push to your GitHub repository (this will update your Pull Request). + +#### After your pull request is merged + +After your pull request is merged, you can safely delete your branch and pull the changes from the (upstream) repository. + +## Coding Rules +To ensure consistency throughout the source code, keep these rules in mind as you are working: + +* All code must pass our code quality checks (linters, formatters, etc). See the [development guide](#dev) section for more detail. +* All features or bug fixes **must be tested** via unit-tests and if applicable integration-tests. These help to, a) prove that your code works correctly, and b) guard against future breaking changes and lower the maintenance cost. +* All public features **must be documented**. +* All files must include a license header. + +## Commit Message Format + +Please follow the [Conventional Commits v1.0.0][convcommit]. + +##### Types + +The commit types (see [Conventional Commits v1.0.0][convcommit]) must be one of the following: + +* **build**: Changes that affect the build system or external dependencies +* **ci**: Changes to our CI configuration files and scripts +* **docs**: Documentation only changes +* **feat**: A new feature +* **fix**: A bug fix +* **perf**: A code change that improves performance +* **refactor**: A code change that neither fixes a bug nor adds a feature +* **test**: Adding missing tests or correcting existing tests + +## Development Guide + +### To set up + +First, set up your environment by either using the `develop-image` or by following these steps: + +- Install Python (version `3.8`, `3.9` or `3.10`) and `poetry`. Then run: + + make new-env + poetry shell - The project uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) compiler for message serialization. A guide on how to install it is found [here](https://fetchai.github.io/oef-sdk-python/user/install.html#protobuf-compiler). -## Further commands needed during development +### During development We have various commands which are helpful during development. - For linting and static analysis use: make lint - make static + make mypy make pylint make security - For checking packages integrity: - make package_checks + make package-checks - To run tests: `make test`. @@ -79,7 +162,7 @@ We have various commands which are helpful during development. - When making changes to one of the `packages`, then use `python scripts/generate_ipfs_hashes.py` to generate the latest hashes. -### Go Development +#### Go Development - The `fetchai/p2p_libp2p` package is partially developed in Go. @@ -88,3 +171,11 @@ We have various commands which are helpful during development. - We use [`golines`](https://github.com/segmentio/golines) and [`golangci-lint`](https://golangci-lint.run) for linting. - To run tests, use `go test -p 1 -timeout 0 -count 1 -v ./...` from the root directory of the package. If you experience installation or build issues run `go clean -modcache`. + +[coc]: https://github.com/fetchai/agents-aea/blob/main/CODE_OF_CONDUCT.md +[ghdiscussion]: https://github.com/fetchai/agents-aea/discussions +[issues]: https://github.com/fetchai/agents-aea/issues +[convcommit]: https://www.conventionalcommits.org/en/v1.0.0/ +[dev-doc]: https://github.com/angular/angular/blob/main/docs/DEVELOPER.md +[github]: https://github.com/fetchai/agents-aea +[discord]: https://bit.ly/3ra5uMI \ No newline at end of file diff --git a/HISTORY.md b/HISTORY.md index 6cf817ad87..7565698b4b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,19 @@ # Release History +## 1.2.4(2022-11-30) + +Agents: +- Add hello_world skill and agent + +Docs: +- Update repository documentations +- Update installation guide for Raspberry Pis (add a link to prebuilt image for Raspberry Pis) + +Misc: +- Update the dependencies (protobuf, jsonschema, cosmpy) +- Various improvements in the repository structure (e.g. makefile, tox, workflows) +- Speed up CI/CD +- Various bug fixes ## 1.2.3(2022-11-03) diff --git a/Makefile b/Makefile index 8fd6a98ab0..9899a35d26 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,250 @@ +AEA_SRC_DIR := aea +BENCHMARK_DIR := benchmark +EXAMPLES_DIR := examples +LIBS_DIR := libs +PACKAGES_DIR := packages +PLUGINS_DIR := plugins +SCRIPTS_DIR := scripts +AEA_TESTS_DIR := tests +AEA_CORE_TESTS_DIRS := tests/test_aea tests/test_aea_extra ./tests/test_docs +EXAMPLES_TESTS_DIRS := tests/test_examples +PACKAGES_TESTS_DIRS := packages/fetchai/protocols packages/fetchai/connections packages/fetchai/skills ./tests/test_packages ./tests/test_packages_for_aea_tests ./tests/test_aea_core_packages +DOCS_TESTS_DIR := tests/test_docs +CONNECTIONS_DIR := packages/fetchai/connections +CONTRACTS_DIR := packages/fetchai/contracts +PROTOCOLS_DIR := packages/fetchai/protocols +SKILLS_DIR := packages/fetchai/skills + +PLUGIN_FETCHAI_SRC := plugins/aea-ledger-fetchai/aea_ledger_fetchai +PLUGIN_ETHEREUM_SRC := plugins/aea-ledger-ethereum/aea_ledger_ethereum +PLUGIN_COSMOS_SRC := plugins/aea-ledger-cosmos/aea_ledger_cosmos +PLUGIN_CLI_IPFS_SRC := plugins/aea-cli-ipfs/aea_cli_ipfs +PLUGINS_SRC := $(PLUGIN_FETCHAI_SRC) $(PLUGIN_ETHEREUM_SRC) $(PLUGIN_COSMOS_SRC) $(PLUGIN_CLI_IPFS_SRC) + +PLUGIN_FETCHAI_TESTS := plugins/aea-ledger-fetchai/tests +PLUGIN_ETHEREUM_TESTS := plugins/aea-ledger-ethereum/tests +PLUGIN_COSMOS_TESTS := plugins/aea-ledger-cosmos/tests +PLUGIN_CLI_IPFS_TESTS := plugins/aea-cli-ipfs/tests +PLUGINS_TESTS := $(PLUGIN_FETCHAI_TESTS) $(PLUGIN_ETHEREUM_TESTS) $(PLUGIN_COSMOS_TESTS) $(PLUGIN_CLI_IPFS_TESTS) + +PLUGIN_FETCHAI := plugins/aea-ledger-fetchai +PLUGIN_ETHEREUM := plugins/aea-ledger-ethereum +PLUGIN_COSMOS := plugins/aea-ledger-cosmos +PLUGIN_CLI_IPFS := plugins/aea-cli-ipfs + +PYTHON_CODE_DIRS := $(AEA_SRC_DIR) $(BENCHMARK_DIR) $(EXAMPLES_DIR) $(PACKAGES_DIR) $(PLUGINS_DIR) $(SCRIPTS_DIR) $(AEA_TESTS_DIR) + +######################################## +### Initialise dev environment +######################################## + +# Create a new poetry virtual environment with all the necessary dependencies installed. +# Once finished, `poetry shell` to enter the virtual environment +v := $(shell pip -V | grep virtualenvs) + +.PHONY: new-env +new-env: clean + if [ -z "$v" ];\ + then\ + poetry install --with dev,docs,packages,tools,testing,types;\ + poetry run pip install --no-deps file:plugins/aea-ledger-ethereum;\ + poetry run pip install --no-deps file:plugins/aea-ledger-cosmos;\ + poetry run pip install --no-deps file:plugins/aea-ledger-fetchai;\ + poetry run pip install --no-deps file:plugins/aea-cli-ipfs;\ + echo "Enter virtual environment with all development dependencies now: 'poetry shell'.";\ + else\ + echo "In a virtual environment! Exit first: 'exit'.";\ + fi + +######################################## +### Tests +######################################## + +# Run all tests +.PHONY: test +test: test-aea-all test-plugins + +# Run all aea tests +.PHONY: test-aea-all +test-aea-all: + pytest -rfE --doctest-modules $(AEA_TESTS_DIR) --cov=$(AEA_SRC_DIR) --cov=$(CONNECTIONS_DIR) --cov=$(CONTRACTS_DIR) --cov=$(PROTOCOLS_DIR) --cov=$(SKILLS_DIR) --cov-report=html --cov-report=term-missing --cov-config=pyproject.toml + find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; + +.PHONY: test-aea-core +test-aea-core: + pytest -rfE --doctest-modules $(AEA_CORE_TESTS_DIRS) --cov=$(AEA_SRC_DIR) --cov-report=html --cov-report=term-missing --cov-config=pyproject.toml + find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; + +.PHONY: test-packages +test-packages: + pytest -rfE --doctest-modules $(PACKAGES_TESTS_DIRS) --cov=$(AEA_SRC_DIR) --cov=$(CONNECTIONS_DIR) --cov=$(CONTRACTS_DIR) --cov=$(PROTOCOLS_DIR) --cov=$(SKILLS_DIR) --cov-report=html --cov-report=term-missing --cov-config=pyproject.toml + find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; + +.PHONY: test-docs +test-docs: + pytest -rfE --doctest-modules $(DOCS_TESTS_DIR) --cov=$(AEA_SRC_DIR) --cov-report=html --cov-report=term-missing --cov-config=pyproject.toml + find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; + +.PHONY: test-examples +test-examples: + pytest -rfE --doctest-modules $(EXAMPLES_TESTS_DIRS) --cov=$(AEA_SRC_DIR) --cov=$(CONNECTIONS_DIR) --cov=$(CONTRACTS_DIR) --cov=$(PROTOCOLS_DIR) --cov=$(SKILLS_DIR) --cov-report=html --cov-report=term-missing --cov-config=pyproject.toml + find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; + +# Run all plugin tests +.PHONY: test-plugins +test-plugins: + pytest -rfE $(PLUGIN_FETCHAI_TESTS) --cov=aea_ledger_fetchai --cov-report=term-missing --cov-config=pyproject.toml + pytest -rfE $(PLUGIN_ETHEREUM_TESTS) --cov=aea_ledger_ethereum --cov-report=term-missing --cov-config=pyproject.toml + pytest -rfE $(PLUGIN_COSMOS_TESTS) --cov=aea_ledger_cosmos --cov-report=term-missing --cov-config=pyproject.toml + pytest -rfE $(PLUGIN_CLI_IPFS_TESTS) --cov=aea_cli_ipfs --cov-report=term-missing --cov-config=pyproject.toml + find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; + +# Run tests for a particular python package +.PHONY: test-sub +test-sub: + pytest -rfE --doctest-modules $(AEA_TESTS_DIR)/test_$(tdir) --cov=aea.$(dir) --cov-report=html --cov-report=term-missing --cov-config=pyproject.toml + find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; + +# Run tests for a particular aea package +.PHONY: test-sub-p +test-sub-p: + pytest -rfE --doctest-modules $(AEA_TESTS_DIR)/test_packages/test_$(tdir) --cov=packages.fetchai.$(dir) --cov-report=html --cov-report=term-missing --cov-config=pyproject.toml + find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; + +# Produce the coverage report. Can see a report summary on the terminal. +# Detailed report on all modules are placed under /htmlcov +.PHONY: coverage-report +coverage-report: + coverage report -m -i + coverage html + +######################################## +### Code Styling +######################################## + +# Automatically run black and isort to format the code, and run flake8 and vulture checks +.PHONY: lint +lint: black isort flake8 vulture + +# Automatically format the code using black +.PHONY: black +black: + black $(PYTHON_CODE_DIRS) + +# Automatically sort the imports +.PHONY: isort +isort: + isort $(PYTHON_CODE_DIRS) + +# Check the code format +.PHONY: black-check +black-check: + black --check --verbose $(PYTHON_CODE_DIRS) + +# Check the imports are sorted +.PHONY: isort-check +isort-check: + isort --check-only --verbose $(PYTHON_CODE_DIRS) + +# Run flake8 linter +.PHONY: flake8 +flake8: + flake8 $(PYTHON_CODE_DIRS) + +# Check for unused code +.PHONY: vulture +vulture: + vulture $(AEA_SRC_DIR) scripts/whitelist.py --exclude '*_pb2.py' + +######################################## +### Security & safety checks +######################################## + +# Run bandit and safety +.PHONY: security +security: bandit safety + +# Check the security of the code +.PHONY: bandit +bandit: + bandit -r $(AEA_SRC_DIR) $(BENCHMARK_DIR) $(EXAMPLES_DIR) $(PACKAGES_DIR) $(PLUGIN_FETCHAI_SRC) $(PLUGIN_ETHEREUM_SRC) $(PLUGIN_COSMOS_SRC) $(PLUGIN_CLI_IPFS_SRC) + bandit -s B101 -r $(AEA_TESTS_DIR) $(SCRIPTS_DIR) + +# Check the security of the code for known vulnerabilities +.PHONY: safety +safety: + safety check -i 44610 -i 50473 + +######################################## +### Linters +######################################## + +# Check types (statically) using mypy +.PHONY: mypy +mypy: + mypy aea packages benchmark --disallow-untyped-defs + mypy examples --check-untyped-defs + mypy scripts + mypy tests --exclude "serialization.py" + +# Lint the code using pylint +.PHONY: pylint +pylint: + pylint -j0 -d E1136 $(AEA_SRC_DIR) $(BENCHMARK_DIR) $(EXAMPLES_DIR) $(PACKAGES_DIR) $(SCRIPTS_DIR) $(PLUGIN_FETCHAI_SRC) $(PLUGIN_ETHEREUM_SRC) $(PLUGIN_COSMOS_SRC) $(PLUGIN_CLI_IPFS_SRC) + +######################################## +### License and copyright checks +######################################## + +# Check dependency licenses +.PHONY: liccheck +liccheck: + poetry export > tmp-requirements.txt + liccheck -s strategy.ini -r tmp-requirements.txt -l PARANOID + rm -frv tmp-requirements.txt + +# Check that the relevant files have appropriate Copyright header +.PHONY: copyright-check +copyright-check: + python scripts/check_copyright_notice.py --directory . + +######################################## +### Docs +######################################## + +# Build documentation +.PHONY: docs +docs: + mkdocs build --clean + +# Live documentation server +.PHONY: docs-live +docs-live: + mkdocs serve + +# Generate API documentation (ensure you add the new pages created into /mkdocs.yml --> nav) +.PHONY: generate-api-docs +generate-api-docs: + python scripts/generate_api_docs.py $(args) + +# Check links are live in the documentation +.PHONY: check-doc-links +check-doc-links: + python scripts/check_doc_links.py + +######################################## +### Poetry Lock +######################################## + +# Updates the poetry lock +poetry.lock: pyproject.toml + poetry lock + +######################################## +### Clear the caches and temporary files +######################################## + +# clean the caches and temporary files and directories .PHONY: clean clean: clean-build clean-pyc clean-test clean-docs @@ -9,7 +256,6 @@ clean-build: rm -fr pip-wheel-metadata find . -name '*.egg-info' -exec rm -fr {} + find . -name '*.egg' -exec rm -fr {} + - rm -fr Pipfile.lock rm -rf plugins/*/build rm -rf plugins/*/dist @@ -40,108 +286,60 @@ clean-test: find . -name 'log.txt' -exec rm -fr {} + find . -name 'log.*.txt' -exec rm -fr {} + -.PHONY: lint -lint: - black aea benchmark examples packages plugins scripts tests - isort aea benchmark examples packages plugins scripts tests - flake8 aea benchmark examples packages plugins scripts tests - vulture aea scripts/whitelist.py --exclude "*_pb2.py" - darglint aea benchmark examples libs packages plugins scripts - -.PHONY: pylint -pylint: - pylint -j4 aea benchmark packages scripts plugins/aea-ledger-fetchai/aea_ledger_fetchai plugins/aea-ledger-ethereum/aea_ledger_ethereum plugins/aea-ledger-cosmos/aea_ledger_cosmos plugins/aea-cli-ipfs/aea_cli_ipfs examples/* +######################################## +### Packages +######################################## -.PHONY: security -security: - bandit -r aea benchmark examples packages \ - plugins/aea-ledger-fetchai/aea_ledger_fetchai \ - plugins/aea-ledger-ethereum/aea_ledger_ethereum \ - plugins/aea-ledger-cosmos/aea_ledger_cosmos \ - plugins/aea-cli-ipfs/aea_cli_ipfs - bandit -s B101 -r tests scripts - safety check -i 37524 -i 38038 -i 37776 -i 38039 -i 39621 -i 40291 -i 39706 -i 44610 -i 50473 - -.PHONY: static -static: - mypy aea benchmark examples packages plugins/aea-ledger-fetchai/aea_ledger_fetchai plugins/aea-ledger-ethereum/aea_ledger_ethereum plugins/aea-ledger-cosmos/aea_ledger_cosmos plugins/aea-cli-ipfs/aea_cli_ipfs scripts --disallow-untyped-defs - mypy tests - -.PHONY: package_checks -package_checks: - python scripts/generate_ipfs_hashes.py --check - python scripts/check_package_versions_in_docs.py - python scripts/check_packages.py +# Update package hashes +.PHONY: update-package-hashes +update-package-hashes: + python scripts/generate_ipfs_hashes.py -.PHONY: docs -docs: - mkdocs build --clean +# Run all package checks +.PHONY: package-checks +package-checks: check-package-hashes check-package-versions-in-docs check-packages -.PHONY: common_checks -common_checks: security misc_checks lint static docs +# Check package hashes +.PHONY: check-package-hashes +check-package-hashes: + python scripts/generate_ipfs_hashes.py --check -.PHONY: test -test: - pytest -rfE plugins/aea-ledger-fetchai/tests --cov=aea_ledger_fetchai --cov-report=term --cov-report=term-missing --cov-config=.coveragerc - pytest -rfE plugins/aea-ledger-ethereum/tests --cov=aea_ledger_ethereum --cov-report=term --cov-report=term-missing --cov-config=.coveragerc - pytest -rfE plugins/aea-ledger-cosmos/tests --cov=aea_ledger_cosmos --cov-report=term --cov-report=term-missing --cov-config=.coveragerc - pytest -rfE plugins/aea-cli-ipfs/tests --cov=aea_cli_ipfs --cov-report=term --cov-report=term-missing --cov-config=.coveragerc - pytest -rfE --doctest-modules aea packages/fetchai/protocols packages/fetchai/connections packages/fetchai/skills tests/ --cov=aea --cov=packages/fetchai/connections --cov=packages/fetchai/contracts --cov=packages/fetchai/protocols --cov=packages/fetchai/skills --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov=aea --cov=packages/fetchai/protocols --cov=packages/fetchai/connections --cov=packages/fetchai/skills --cov-config=.coveragerc - find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; +# Check correct package version in the docs +.PHONY: check-package-versions-in-docs +check-package-versions-in-docs: + python scripts/check_package_versions_in_docs.py -.PHONY: test-sub -test-sub: - pytest -rfE --doctest-modules aea packages/fetchai/connections packages/fetchai/protocols packages/fetchai/skills tests/test_$(tdir) --cov=aea.$(dir) --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov-config=.coveragerc - find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; +# Perform various checks on packages +.PHONY: check-packages +check-packages: + python scripts/check_packages.py -.PHONY: test-sub-p -test-sub-p: - pytest -rfE --doctest-modules aea packages/fetchai/connections packages/fetchai/protocols packages/fetchai/skills tests/test_packages/test_$(tdir) --cov=packages.fetchai.$(dir) --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov-config=.coveragerc - find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \; +######################################## +### Other checks +######################################## +# Check that libp2p code in libs and connection aren't different +.PHONY: libp2p-diffs +libp2p-diffs: + diff libs/go/libp2p_node packages/fetchai/connections/p2p_libp2p/libp2p_node -r -.PHONY: test-all -test-all: - tox +# Check that plugins for Cosmos and Fetch.ai, and Plugins' and main Licenses aren't different +.PHONY: plugin-diffs +plugin-diffs: + diff $(PLUGIN_COSMOS_SRC)/cosmos.py $(PLUGIN_FETCHAI_SRC)/_cosmos.py + diff LICENSE $(PLUGIN_COSMOS)/LICENSE + diff LICENSE $(PLUGIN_ETHEREUM)/LICENSE + diff LICENSE $(PLUGIN_FETCHAI)/LICENSE -.PHONY: install -install: clean - pip install .[all] +######################################## +### Build +######################################## +# Build the project .PHONY: dist dist: clean poetry build - -h := $(shell git rev-parse --abbrev-ref HEAD) - -.PHONY: release_check -release: - if [ "$h" = "main" ];\ - then\ - echo "Please ensure everything is merged into main & tagged there";\ - pip install twine;\ - twine upload dist/*;\ - else\ - echo "Please change to main branch for release.";\ - fi - -v := $(shell pip -V | grep virtualenvs) - -.PHONY: new_env -new_env: clean - if [ -z "$v" ];\ - then\ - poetry install --with dev,docs,packages,tools,testing;\ - poetry run pip install -e .[all];\ - poetry run pip install --no-deps file:plugins/aea-ledger-ethereum;\ - poetry run pip install --no-deps file:plugins/aea-ledger-cosmos;\ - poetry run pip install --no-deps file:plugins/aea-ledger-fetchai;\ - poetry run pip install --no-deps file:plugins/aea-cli-ipfs;\ - echo "Enter virtual environment with all development dependencies now: 'pipenv shell'.";\ - else\ - echo "In a virtual environment! Exit first: 'exit'.";\ - fi protolint_install: GO111MODULE=on GOPATH=~/go go install github.com/yoheimuta/protolint/cmd/protolint@v0.27.0 protolint: diff --git a/README.md b/README.md index 1cefcce68e..4b1a670722 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,12 @@ PyPI - Python Version - - PyPI - Wheel - License License - - Slack -

@@ -29,29 +23,20 @@ Codecov - - flake8 - - - mypy - - - Black - - - mypy + + Discord conversation

-A framework for autonomous economic agent (AEA) development +A framework for developing autonomous economic agents (AEAs)

AEA Description

-## Get started developing AEAs +## To install 1. Create and launch a clean virtual environment with Python 3.7 (any Python `>=` 3.6 works): diff --git a/aea/__version__.py b/aea/__version__.py index 3abd5eabb6..4c0eef94f7 100644 --- a/aea/__version__.py +++ b/aea/__version__.py @@ -22,7 +22,7 @@ __title__ = "aea" __description__ = "Autonomous Economic Agent framework" __url__ = "https://github.com/fetchai/agents-aea.git" -__version__ = "1.2.3" +__version__ = "1.2.4" __author__ = "Fetch.AI Limited" __license__ = "Apache-2.0" __copyright__ = "2022 Fetch.AI Limited" diff --git a/aea/cli/registry/fetch.py b/aea/cli/registry/fetch.py index e1e1af4409..d004befe63 100644 --- a/aea/cli/registry/fetch.py +++ b/aea/cli/registry/fetch.py @@ -96,7 +96,7 @@ def fetch_agent( # initialize fetched agent with empty folders for custom packages custom_items_folder = os.path.join(ctx.cwd, item_type_plural) - os.makedirs(custom_items_folder) + os.makedirs(custom_items_folder, exist_ok=True) config = getattr(ctx.agent_config, item_type_plural) for item_public_id in config: diff --git a/aea/protocols/generator/common.py b/aea/protocols/generator/common.py index c81b32cbf8..2b07539e49 100644 --- a/aea/protocols/generator/common.py +++ b/aea/protocols/generator/common.py @@ -89,7 +89,8 @@ - ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH - PACKAGE_NAME_LOWER_CASE - REPEATED_FIELD_NAMES_PLURALIZED - - FIELD_NAMES_LOWER_SNAKE_CASE""" + - FIELD_NAMES_LOWER_SNAKE_CASE + - ENUM_FIELD_NAMES_PREFIX""" PROTOLINT_INDENTATION_ERROR_STR = "incorrect indentation style" PROTOLINT_ERROR_WHITELIST = [PROTOLINT_INDENTATION_ERROR_STR] diff --git a/docs/aggregation-demo.md b/docs/aggregation-demo.md index a8ba82d26d..c5bf1c7b58 100644 --- a/docs/aggregation-demo.md +++ b/docs/aggregation-demo.md @@ -19,7 +19,7 @@ Repeat the following process four times in four different terminals (for each {` Fetch the aggregator AEA: ``` bash agent_name="agg$i" -aea fetch fetchai/simple_aggregator:0.5.3 --alias $agent_name +aea fetch fetchai/simple_aggregator:0.5.4 --alias $agent_name cd $agent_name aea install aea build @@ -34,15 +34,15 @@ Create the AEA. agent_name="agg$i" aea create agent_name cd agent_name -aea add connection fetchai/http_client:0.24.4 -aea add connection fetchai/http_server:0.23.4 -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/prometheus:0.9.4 -aea add skill fetchai/advanced_data_request:0.7.4 -aea add skill fetchai/simple_aggregation:0.3.4 - -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea add connection fetchai/http_client:0.24.5 +aea add connection fetchai/http_server:0.23.5 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/prometheus:0.9.5 +aea add skill fetchai/advanced_data_request:0.7.5 +aea add skill fetchai/simple_aggregation:0.3.5 + +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea install aea build ``` @@ -126,8 +126,8 @@ aea config set vendor.fetchai.connections.http_server.config.port $((8000+i)) To publish the aggregated value to an oracle smart contract, add the ledger connection and simple oracle skill to one of the aggregators: ``` bash -aea add connection fetchai/ledger:0.21.3 -aea add skill fetchai/simple_oracle:0.16.3 +aea add connection fetchai/ledger:0.21.4 +aea add skill fetchai/simple_oracle:0.16.4 ``` Configure the simple oracle skill for the `fetchai` ledger: diff --git a/docs/api/protocols/dialogue/base.md b/docs/api/protocols/dialogue/base.md index 7809722096..8d3d3a186d 100644 --- a/docs/api/protocols/dialogue/base.md +++ b/docs/api/protocols/dialogue/base.md @@ -200,3 +200,1103 @@ Construct a new type. ## Dialogue Objects +```python +class Dialogue(metaclass=_DialogueMeta) +``` + +The dialogue class maintains state of a dialogue and manages it. + + + +## Rules Objects + +```python +class Rules() +``` + +This class defines the rules for the dialogue. + + + +#### `__`init`__` + +```python +def __init__( + initial_performatives: FrozenSet[Message.Performative], + terminal_performatives: FrozenSet[Message.Performative], + valid_replies: Dict[Message.Performative, FrozenSet[Message.Performative]] +) -> None +``` + +Initialize a dialogue. + +**Arguments**: + +- `initial_performatives`: the set of all initial performatives. +- `terminal_performatives`: the set of all terminal performatives. +- `valid_replies`: the reply structure of speech-acts. + + + +#### initial`_`performatives + +```python +@property +def initial_performatives() -> FrozenSet[Message.Performative] +``` + +Get the performatives one of which the terminal message in the dialogue must have. + +**Returns**: + +the valid performatives of an terminal message + + + +#### terminal`_`performatives + +```python +@property +def terminal_performatives() -> FrozenSet[Message.Performative] +``` + +Get the performatives one of which the terminal message in the dialogue must have. + +**Returns**: + +the valid performatives of an terminal message + + + +#### valid`_`replies + +```python +@property +def valid_replies( +) -> Dict[Message.Performative, FrozenSet[Message.Performative]] +``` + +Get all the valid performatives which are a valid replies to performatives. + +**Returns**: + +the full valid reply structure. + + + +#### get`_`valid`_`replies + +```python +def get_valid_replies( + performative: Message.Performative) -> FrozenSet[Message.Performative] +``` + +Given a `performative`, return the list of performatives which are its valid replies in a dialogue. + +**Arguments**: + +- `performative`: the performative in a message + +**Returns**: + +list of valid performative replies + + + +## Role Objects + +```python +class Role(Enum) +``` + +This class defines the agent's role in a dialogue. + + + +#### `__`str`__` + +```python +def __str__() -> str +``` + +Get the string representation. + + + +## EndState Objects + +```python +class EndState(Enum) +``` + +This class defines the end states of a dialogue. + + + +#### `__`str`__` + +```python +def __str__() -> str +``` + +Get the string representation. + + + +#### `__`init`__` + +```python +def __init__(dialogue_label: DialogueLabel, message_class: Type[Message], + self_address: Address, role: Role) -> None +``` + +Initialize a dialogue. + +**Arguments**: + +- `dialogue_label`: the identifier of the dialogue +- `message_class`: the message class used +- `self_address`: the address of the entity for whom this dialogue is maintained +- `role`: the role of the agent this dialogue is maintained for + + + +#### add`_`terminal`_`state`_`callback + +```python +def add_terminal_state_callback(fn: Callable[["Dialogue"], None]) -> None +``` + +Add callback to be called on dialogue reach terminal state. + +**Arguments**: + +- `fn`: callable to be called with one argument: Dialogue + + + +#### `__`eq`__` + +```python +def __eq__(other: Any) -> bool +``` + +Compare two dialogues. + + + +#### json + +```python +def json() -> dict +``` + +Get json representation of the dialogue. + + + +#### from`_`json + +```python +@classmethod +def from_json(cls, message_class: Type[Message], data: dict) -> "Dialogue" +``` + +Create a dialogue instance with all messages from json data. + +**Arguments**: + +- `message_class`: type of message used with this dialogue +- `data`: dict with data exported with Dialogue.to_json() method + +**Returns**: + +Dialogue instance + + + +#### dialogue`_`label + +```python +@property +def dialogue_label() -> DialogueLabel +``` + +Get the dialogue label. + +**Returns**: + +The dialogue label + + + +#### incomplete`_`dialogue`_`label + +```python +@property +def incomplete_dialogue_label() -> DialogueLabel +``` + +Get the dialogue label. + +**Returns**: + +The incomplete dialogue label + + + +#### dialogue`_`labels + +```python +@property +def dialogue_labels() -> Set[DialogueLabel] +``` + +Get the dialogue labels (incomplete and complete, if it exists). + +**Returns**: + +the dialogue labels + + + +#### self`_`address + +```python +@property +def self_address() -> Address +``` + +Get the address of the entity for whom this dialogues is maintained. + +**Returns**: + +the address of this entity + + + +#### role + +```python +@property +def role() -> "Role" +``` + +Get the agent's role in the dialogue. + +**Returns**: + +the agent's role + + + +#### rules + +```python +@property +def rules() -> "Rules" +``` + +Get the dialogue rules. + +**Returns**: + +the rules + + + +#### message`_`class + +```python +@property +def message_class() -> Type[Message] +``` + +Get the message class. + +**Returns**: + +the message class + + + +#### is`_`self`_`initiated + +```python +@property +def is_self_initiated() -> bool +``` + +Check whether the agent initiated the dialogue. + +**Returns**: + +True if the agent initiated the dialogue, False otherwise + + + +#### last`_`incoming`_`message + +```python +@property +def last_incoming_message() -> Optional[Message] +``` + +Get the last incoming message. + +**Returns**: + +the last incoming message if it exists, None otherwise + + + +#### last`_`outgoing`_`message + +```python +@property +def last_outgoing_message() -> Optional[Message] +``` + +Get the last outgoing message. + +**Returns**: + +the last outgoing message if it exists, None otherwise + + + +#### last`_`message + +```python +@property +def last_message() -> Optional[Message] +``` + +Get the last message. + +**Returns**: + +the last message if it exists, None otherwise + + + +#### is`_`empty + +```python +@property +def is_empty() -> bool +``` + +Check whether the dialogue is empty. + +**Returns**: + +True if empty, False otherwise + + + +#### reply + +```python +def reply(performative: Message.Performative, + target_message: Optional[Message] = None, + target: Optional[int] = None, + **kwargs: Any) -> Message +``` + +Reply to the 'target_message' in this dialogue with a message with 'performative', and contents from kwargs. + +Note if no target_message is provided, the last message in the dialogue will be replied to. + +**Arguments**: + +- `target_message`: the message to reply to. +- `target`: the id of the message to reply to. +- `performative`: the performative of the reply message. +- `kwargs`: the content of the reply message. + +**Returns**: + +the reply message if it was successfully added as a reply, None otherwise. + + + +#### get`_`message`_`by`_`id + +```python +def get_message_by_id(message_id: int) -> Optional[Message] +``` + +Get message by id, if not presents return None. + + + +#### get`_`outgoing`_`next`_`message`_`id + +```python +def get_outgoing_next_message_id() -> int +``` + +Get next outgoing message id. + + + +#### get`_`incoming`_`next`_`message`_`id + +```python +def get_incoming_next_message_id() -> int +``` + +Get next incoming message id. + + + +#### `__`str`__` + +```python +def __str__() -> str +``` + +Get the string representation. + +**Returns**: + +The string representation of the dialogue + + + +## DialogueStats Objects + +```python +class DialogueStats() +``` + +Class to handle statistics on default dialogues. + + + +#### `__`init`__` + +```python +def __init__(end_states: FrozenSet[Dialogue.EndState]) -> None +``` + +Initialize a StatsManager. + +**Arguments**: + +- `end_states`: the list of dialogue endstates + + + +#### self`_`initiated + +```python +@property +def self_initiated() -> Dict[Dialogue.EndState, int] +``` + +Get the stats dictionary on self initiated dialogues. + + + +#### other`_`initiated + +```python +@property +def other_initiated() -> Dict[Dialogue.EndState, int] +``` + +Get the stats dictionary on other initiated dialogues. + + + +#### add`_`dialogue`_`endstate + +```python +def add_dialogue_endstate(end_state: Dialogue.EndState, + is_self_initiated: bool) -> None +``` + +Add dialogue endstate stats. + +**Arguments**: + +- `end_state`: the end state of the dialogue +- `is_self_initiated`: whether the dialogue is initiated by the agent or the opponent + + + +#### find`_`caller`_`object + +```python +def find_caller_object(object_type: Type) -> Any +``` + +Find caller object of certain type in the call stack. + + + +## BasicDialoguesStorage Objects + +```python +class BasicDialoguesStorage() +``` + +Dialogues state storage. + + + +#### `__`init`__` + +```python +def __init__(dialogues: "Dialogues") -> None +``` + +Init dialogues storage. + + + +#### dialogues`_`in`_`terminal`_`state + +```python +@property +def dialogues_in_terminal_state() -> List["Dialogue"] +``` + +Get all dialogues in terminal state. + + + +#### dialogues`_`in`_`active`_`state + +```python +@property +def dialogues_in_active_state() -> List["Dialogue"] +``` + +Get all dialogues in active state. + + + +#### is`_`terminal`_`dialogues`_`kept + +```python +@property +def is_terminal_dialogues_kept() -> bool +``` + +Return True if dialogues should stay after terminal state. + + + +#### dialogue`_`terminal`_`state`_`callback + +```python +def dialogue_terminal_state_callback(dialogue: "Dialogue") -> None +``` + +Method to be called on dialogue terminal state reached. + + + +#### setup + +```python +def setup() -> None +``` + +Set up dialogue storage. + + + +#### teardown + +```python +def teardown() -> None +``` + +Tear down dialogue storage. + + + +#### add + +```python +def add(dialogue: Dialogue) -> None +``` + +Add dialogue to storage. + +**Arguments**: + +- `dialogue`: dialogue to add. + + + +#### remove + +```python +def remove(dialogue_label: DialogueLabel) -> None +``` + +Remove dialogue from storage by it's label. + +**Arguments**: + +- `dialogue_label`: label of the dialogue to remove + + + +#### get + +```python +def get(dialogue_label: DialogueLabel) -> Optional[Dialogue] +``` + +Get dialogue stored by it's label. + +**Arguments**: + +- `dialogue_label`: label of the dialogue + +**Returns**: + +dialogue if presents or None + + + +#### get`_`dialogues`_`with`_`counterparty + +```python +def get_dialogues_with_counterparty(counterparty: Address) -> List[Dialogue] +``` + +Get the dialogues by address. + +**Arguments**: + +- `counterparty`: the counterparty + +**Returns**: + +The dialogues with the counterparty. + + + +#### is`_`in`_`incomplete + +```python +def is_in_incomplete(dialogue_label: DialogueLabel) -> bool +``` + +Check dialogue label presents in list of incomplete. + + + +#### set`_`incomplete`_`dialogue + +```python +def set_incomplete_dialogue(incomplete_dialogue_label: DialogueLabel, + complete_dialogue_label: DialogueLabel) -> None +``` + +Set incomplete dialogue label. + + + +#### is`_`dialogue`_`present + +```python +def is_dialogue_present(dialogue_label: DialogueLabel) -> bool +``` + +Check dialogue with label specified presents in storage. + + + +#### get`_`latest`_`label + +```python +def get_latest_label(dialogue_label: DialogueLabel) -> DialogueLabel +``` + +Get latest label for dialogue. + + + +## PersistDialoguesStorage Objects + +```python +class PersistDialoguesStorage(BasicDialoguesStorage) +``` + +Persist dialogues storage. + +Uses generic storage to load/save dialogues data on setup/teardown. + + + +#### `__`init`__` + +```python +def __init__(dialogues: "Dialogues") -> None +``` + +Init dialogues storage. + + + +#### get`_`skill`_`component + +```python +@staticmethod +def get_skill_component() -> Optional[SkillComponent] +``` + +Get skill component dialogues storage constructed for. + + + +#### setup + +```python +def setup() -> None +``` + +Set up dialogue storage. + + + +#### teardown + +```python +def teardown() -> None +``` + +Tear down dialogue storage. + + + +#### remove + +```python +def remove(dialogue_label: DialogueLabel) -> None +``` + +Remove dialogue from memory and persistent storage. + + + +## PersistDialoguesStorageWithOffloading Objects + +```python +class PersistDialoguesStorageWithOffloading(PersistDialoguesStorage) +``` + +Dialogue Storage with dialogues offloading. + + + +#### dialogue`_`terminal`_`state`_`callback + +```python +def dialogue_terminal_state_callback(dialogue: "Dialogue") -> None +``` + +Call on dialogue reaches terminal state. + + + +#### get + +```python +def get(dialogue_label: DialogueLabel) -> Optional[Dialogue] +``` + +Try to get dialogue by label from memory or persists storage. + + + +#### get`_`dialogues`_`with`_`counterparty + +```python +def get_dialogues_with_counterparty(counterparty: Address) -> List[Dialogue] +``` + +Get the dialogues by address. + +**Arguments**: + +- `counterparty`: the counterparty + +**Returns**: + +The dialogues with the counterparty. + + + +#### dialogues`_`in`_`terminal`_`state + +```python +@property +def dialogues_in_terminal_state() -> List["Dialogue"] +``` + +Get all dialogues in terminal state. + + + +## Dialogues Objects + +```python +class Dialogues() +``` + +The dialogues class keeps track of all dialogues for an agent. + + + +#### `__`init`__` + +```python +def __init__(self_address: Address, + end_states: FrozenSet[Dialogue.EndState], + message_class: Type[Message], + dialogue_class: Type[Dialogue], + role_from_first_message: Callable[[Message, Address], + Dialogue.Role], + keep_terminal_state_dialogues: Optional[bool] = None) -> None +``` + +Initialize dialogues. + +**Arguments**: + +- `self_address`: the address of the entity for whom dialogues are maintained +- `end_states`: the list of dialogue endstates +- `message_class`: the message class used +- `dialogue_class`: the dialogue class used +- `role_from_first_message`: the callable determining role from first message +- `keep_terminal_state_dialogues`: specify do dialogues in terminal state should stay or not + + + +#### is`_`keep`_`dialogues`_`in`_`terminal`_`state + +```python +@property +def is_keep_dialogues_in_terminal_state() -> bool +``` + +Is required to keep dialogues in terminal state. + + + +#### self`_`address + +```python +@property +def self_address() -> Address +``` + +Get the address of the agent for whom dialogues are maintained. + + + +#### dialogue`_`stats + +```python +@property +def dialogue_stats() -> DialogueStats +``` + +Get the dialogue statistics. + +**Returns**: + +dialogue stats object + + + +#### message`_`class + +```python +@property +def message_class() -> Type[Message] +``` + +Get the message class. + +**Returns**: + +the message class + + + +#### dialogue`_`class + +```python +@property +def dialogue_class() -> Type[Dialogue] +``` + +Get the dialogue class. + +**Returns**: + +the dialogue class + + + +#### get`_`dialogues`_`with`_`counterparty + +```python +def get_dialogues_with_counterparty(counterparty: Address) -> List[Dialogue] +``` + +Get the dialogues by address. + +**Arguments**: + +- `counterparty`: the counterparty + +**Returns**: + +The dialogues with the counterparty. + + + +#### new`_`self`_`initiated`_`dialogue`_`reference + +```python +@classmethod +def new_self_initiated_dialogue_reference(cls) -> Tuple[str, str] +``` + +Return a dialogue label for a new self initiated dialogue. + +**Returns**: + +the next nonce + + + +#### create + +```python +def create(counterparty: Address, performative: Message.Performative, + **kwargs: Any) -> Tuple[Message, Dialogue] +``` + +Create a dialogue with 'counterparty', with an initial message whose performative is 'performative' and contents are from 'kwargs'. + +**Arguments**: + +- `counterparty`: the counterparty of the dialogue. +- `performative`: the performative of the initial message. +- `kwargs`: the content of the initial message. + +**Returns**: + +the initial message and the dialogue. + + + +#### create`_`with`_`message + +```python +def create_with_message(counterparty: Address, + initial_message: Message) -> Dialogue +``` + +Create a dialogue with 'counterparty', with an initial message provided. + +**Arguments**: + +- `counterparty`: the counterparty of the dialogue. +- `initial_message`: the initial_message. + +**Returns**: + +the initial message and the dialogue. + + + +#### update + +```python +def update(message: Message) -> Optional[Dialogue] +``` + +Update the state of dialogues with a new incoming message. + +If the message is for a new dialogue, a new dialogue is created with 'message' as its first message, and returned. +If the message is addressed to an existing dialogue, the dialogue is retrieved, extended with this message and returned. +If there are any errors, e.g. the message dialogue reference does not exists or the message is invalid w.r.t. the dialogue, return None. + +**Arguments**: + +- `message`: a new incoming message + +**Returns**: + +the new or existing dialogue the message is intended for, or None in case of any errors. + + + +#### get`_`dialogue + +```python +def get_dialogue(message: Message) -> Optional[Dialogue] +``` + +Retrieve the dialogue 'message' belongs to. + +**Arguments**: + +- `message`: a message + +**Returns**: + +the dialogue, or None in case such a dialogue does not exist + + + +#### get`_`dialogue`_`from`_`label + +```python +def get_dialogue_from_label( + dialogue_label: DialogueLabel) -> Optional[Dialogue] +``` + +Retrieve a dialogue based on its label. + +**Arguments**: + +- `dialogue_label`: the dialogue label + +**Returns**: + +the dialogue if present + + + +#### setup + +```python +def setup() -> None +``` + +Set up. + + + +#### teardown + +```python +def teardown() -> None +``` + +Tear down. + diff --git a/docs/aries-cloud-agent-demo.md b/docs/aries-cloud-agent-demo.md index 08266d258c..d81f0d9de3 100644 --- a/docs/aries-cloud-agent-demo.md +++ b/docs/aries-cloud-agent-demo.md @@ -180,7 +180,7 @@ Now you can create **Alice_AEA** and **Faber_AEA** in terminals 3 and 4 respecti In the third terminal, fetch **Alice_AEA** and move into its project folder: ``` bash -aea fetch fetchai/aries_alice:0.32.3 +aea fetch fetchai/aries_alice:0.32.4 cd aries_alice ``` @@ -191,11 +191,11 @@ The following steps create Alice_AEA from scratch: ``` bash aea create aries_alice cd aries_alice -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/http_client:0.24.4 -aea add connection fetchai/webhook:0.20.4 -aea add skill fetchai/aries_alice:0.26.4 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/http_client:0.24.5 +aea add connection fetchai/webhook:0.20.5 +aea add skill fetchai/aries_alice:0.26.5 ```

@@ -257,14 +257,14 @@ Finally run **Alice_AEA**: aea run ``` -Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.3 -u public_uri` to retrieve the address.) We will refer to this as **Alice_AEA's P2P address**. +Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.4 -u public_uri` to retrieve the address.) We will refer to this as **Alice_AEA's P2P address**. ### Faber_AEA In the fourth terminal, fetch **Faber_AEA** and move into its project folder: ``` bash -aea fetch fetchai/aries_faber:0.32.3 +aea fetch fetchai/aries_faber:0.32.4 cd aries_faber ``` @@ -275,11 +275,11 @@ The following steps create Faber_AEA from scratch: ``` bash aea create aries_faber cd aries_faber -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/http_client:0.24.4 -aea add connection fetchai/webhook:0.20.4 -aea add skill fetchai/aries_faber:0.24.3 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/http_client:0.24.5 +aea add connection fetchai/webhook:0.20.5 +aea add skill fetchai/aries_faber:0.24.4 ```

diff --git a/docs/build-aea-programmatically.md b/docs/build-aea-programmatically.md index 891f6163a9..4b9afdb69d 100644 --- a/docs/build-aea-programmatically.md +++ b/docs/build-aea-programmatically.md @@ -62,7 +62,7 @@ We will use the stub connection to pass envelopes in and out of the AEA. Ensure ``` ## Initialise the AEA -We use the `AEABuilder` to readily build an AEA. By default, the `AEABuilder` adds the `fetchai/default:1.1.4`, `fetchai/state_update:1.1.4` and `fetchai/signing:1.1.4` protocols. +We use the `AEABuilder` to readily build an AEA. By default, the `AEABuilder` adds the `fetchai/default:1.1.6`, `fetchai/state_update:1.1.6` and `fetchai/signing:1.1.6` protocols. ``` python # Instantiate the builder and build the AEA # By default, the default protocol, error skill and stub connection are added diff --git a/docs/car-park-skills.md b/docs/car-park-skills.md index 8062a754f3..7fffa1bb1f 100644 --- a/docs/car-park-skills.md +++ b/docs/car-park-skills.md @@ -57,9 +57,9 @@ Install the AEA ManagerDorado block explorer and request some test tokens via `Get Funds`. @@ -97,7 +97,7 @@ Follow the Preliminaries and =1.0.0"} }' -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea config set --type dict agent.default_routing \ '{ - "fetchai/ledger_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/oef_search:1.1.4": "fetchai/soef:0.27.4" + "fetchai/ledger_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/oef_search:1.1.6": "fetchai/soef:0.27.5" }' aea install aea build @@ -135,7 +135,7 @@ aea build Then, fetch the car data client AEA: ``` bash -aea fetch fetchai/car_data_buyer:0.33.3 +aea fetch fetchai/car_data_buyer:0.33.4 cd car_data_buyer aea install aea build @@ -148,19 +148,19 @@ The following steps create the car data client from scratch: ``` bash aea create car_data_buyer cd car_data_buyer -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/ledger:0.21.3 -aea add skill fetchai/carpark_client:0.27.4 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/ledger:0.21.4 +aea add skill fetchai/carpark_client:0.27.5 aea config set --type dict agent.dependencies \ '{ "aea-ledger-fetchai": {"version": "<2.0.0,>=1.0.0"} }' -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea config set --type dict agent.default_routing \ '{ - "fetchai/ledger_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/oef_search:1.1.4": "fetchai/soef:0.27.4" + "fetchai/ledger_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/oef_search:1.1.6": "fetchai/soef:0.27.5" }' aea install aea build @@ -225,7 +225,7 @@ First, run the car data seller AEA: aea run ``` -Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.3 -u public_uri` to retrieve the address.) +Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.4 -u public_uri` to retrieve the address.) This is the entry peer address for the local agent communication network created by the car data seller. Then, in the car data buyer, run this command (replace `SOME_ADDRESS` with the correct value as described above): diff --git a/docs/cli-vs-programmatic-aeas.md b/docs/cli-vs-programmatic-aeas.md index bb47bea29d..1779944f73 100644 --- a/docs/cli-vs-programmatic-aeas.md +++ b/docs/cli-vs-programmatic-aeas.md @@ -33,7 +33,7 @@ If you want to create the weather station AEA step by step you can follow this g Fetch the weather station AEA with the following command : ``` bash -aea fetch fetchai/weather_station:0.32.3 +aea fetch fetchai/weather_station:0.32.4 cd weather_station aea install aea build diff --git a/docs/config.md b/docs/config.md index eafea32332..6b53437969 100644 --- a/docs/config.md +++ b/docs/config.md @@ -24,10 +24,10 @@ connections: # The list of connection public - fetchai/stub:0.21.2 contracts: [] # The list of contract public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). protocols: # The list of protocol public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). -- fetchai/default:1.1.4 +- fetchai/default:1.1.6 skills: # The list of skill public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). -- fetchai/error:0.18.4 -default_connection: fetchai/p2p_libp2p:0.27.3 # The default connection used for envelopes sent by the AEA (must satisfy PUBLIC_ID_REGEX). +- fetchai/error:0.18.5 +default_connection: fetchai/p2p_libp2p:0.27.4 # The default connection used for envelopes sent by the AEA (must satisfy PUBLIC_ID_REGEX). default_ledger: fetchai # The default ledger identifier the AEA project uses (must satisfy LEDGER_ID_REGEX) required_ledgers: [fetchai] # the list of identifiers of ledgers that the AEA project requires key pairs for (each item must satisfy LEDGER_ID_REGEX) default_routing: {} # The default routing scheme applied to envelopes sent by the AEA, it maps from protocol public ids to connection public ids (both keys and values must satisfy PUBLIC_ID_REGEX) diff --git a/docs/connect-a-frontend.md b/docs/connect-a-frontend.md index fcb8246fb8..8f151af39f 100644 --- a/docs/connect-a-frontend.md +++ b/docs/connect-a-frontend.md @@ -3,7 +3,7 @@ This page lays out two options for connecting a front-end to an AEA. The followi How to connect front-end to your AEA ## Case 1 -The first option is to create a `HTTP Server` connection that handles incoming requests from a REST API. In this scenario, the REST API communicates with the AEA and requests are handled by the `HTTP Server` connection package. The REST API should send CRUD requests to the `HTTP Server` connection (`fetchai/http_server:0.23.4`) which translates these into Envelopes to be consumed by the correct skill. +The first option is to create a `HTTP Server` connection that handles incoming requests from a REST API. In this scenario, the REST API communicates with the AEA and requests are handled by the `HTTP Server` connection package. The REST API should send CRUD requests to the `HTTP Server` connection (`fetchai/http_server:0.23.5`) which translates these into Envelopes to be consumed by the correct skill. ## Case 2 -The second option is to create a front-end comprising a stand-alone `Multiplexer` with a `P2P` connection (`fetchai/p2p_libp2p:0.27.3`). In this scenario the Agent Communication Network can be used to send Envelopes from the AEA to the front-end. \ No newline at end of file +The second option is to create a front-end comprising a stand-alone `Multiplexer` with a `P2P` connection (`fetchai/p2p_libp2p:0.27.4`). In this scenario the Agent Communication Network can be used to send Envelopes from the AEA to the front-end. \ No newline at end of file diff --git a/docs/connection.md b/docs/connection.md index 66f1bb641b..3d612afacb 100644 --- a/docs/connection.md +++ b/docs/connection.md @@ -36,7 +36,7 @@ The developer needs to implement four public coroutines: - The `receive` coroutine is continuously called by the AEA framework. It either returns `None` or an envelope. The `receive` coroutine must implement the logic of data being received by the agent, and if necessary, its translation into a relevant protocol. -The framework provides a demo `stub` connection which implements an I/O reader and writer to send and receive messages between the agent and a local file. To gain inspiration and become familiar with the structure of connection packages, you may find it useful to check out `fetchai/stub:0.21.2`, `fetchai/http_server:0.23.4` or `fetchai/http_client:0.24.4` connections. The latter two connections are for external clients to connect with an agent, and for the agent to connect with external servers, respectively. +The framework provides a demo `stub` connection which implements an I/O reader and writer to send and receive messages between the agent and a local file. To gain inspiration and become familiar with the structure of connection packages, you may find it useful to check out `fetchai/stub:0.21.2`, `fetchai/http_server:0.23.5` or `fetchai/http_client:0.24.5` connections. The latter two connections are for external clients to connect with an agent, and for the agent to connect with external servers, respectively. ### Primary methods to develop - sync connection interface diff --git a/docs/contract.md b/docs/contract.md index 7186ef47fd..327941a55d 100644 --- a/docs/contract.md +++ b/docs/contract.md @@ -18,9 +18,9 @@ Interacting with contracts in almost all cases requires network access. Therefor Message flow for contract and ledger interactions -In particular, the `fetchai/ledger:0.21.3` connection can be used to execute contract related logic. The skills communicate with the `fetchai/ledger:0.21.3` connection via the `fetchai/contract_api:1.0.0` protocol. This protocol implements a request-response pattern to serve the four types of methods listed above: +In particular, the `fetchai/ledger:0.21.4` connection can be used to execute contract related logic. The skills communicate with the `fetchai/ledger:0.21.4` connection via the `fetchai/contract_api:1.0.0` protocol. This protocol implements a request-response pattern to serve the four types of methods listed above: -- the `get_deploy_transaction` message is used to request a deploy transaction for a specific contract. For instance, to request a deploy transaction for the deployment of the smart contract wrapped in the `fetchai/erc1155:0.23.2` package, we send the following message to the `fetchai/ledger:0.21.3`: +- the `get_deploy_transaction` message is used to request a deploy transaction for a specific contract. For instance, to request a deploy transaction for the deployment of the smart contract wrapped in the `fetchai/erc1155:0.23.2` package, we send the following message to the `fetchai/ledger:0.21.4`: ``` python contract_api_msg = ContractApiMessage( @@ -37,7 +37,7 @@ contract_api_msg = ContractApiMessage( Any additional arguments needed by the contract's constructor method should be added to `kwargs`. -This message will be handled by the `fetchai/ledger:0.21.3` connection and then a `raw_transaction` message will be returned with the matching raw transaction. To send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.21.3` connection using the `fetchai/ledger_api:1.0.0` protocol. For details on how to implement the message handling, see the handlers in the `erc1155_deploy` skill. +This message will be handled by the `fetchai/ledger:0.21.4` connection and then a `raw_transaction` message will be returned with the matching raw transaction. To send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.21.4` connection using the `fetchai/ledger_api:1.0.0` protocol. For details on how to implement the message handling, see the handlers in the `erc1155_deploy` skill.

CosmWasm based smart contract deployments

@@ -45,7 +45,7 @@ This message will be handled by the `fetchai/ledger:0.21.3` connection and then

-- the `get_raw_transaction` message is used to request any transaction for a specific contract which changes state in the contract. For instance, to request a transaction for the creation of token in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.23.2` package, we send the following message to the `fetchai/ledger:0.21.3`: +- the `get_raw_transaction` message is used to request any transaction for a specific contract which changes state in the contract. For instance, to request a transaction for the creation of token in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.23.2` package, we send the following message to the `fetchai/ledger:0.21.4`: ``` python contract_api_msg = ContractApiMessage( @@ -64,9 +64,9 @@ contract_api_msg = ContractApiMessage( ) ``` -This message will be handled by the `fetchai/ledger:0.21.3` connection and then a `raw_transaction` message will be returned with the matching raw transaction. For this to be executed correctly, the `fetchai/erc1155:0.23.2` contract package needs to implement the `get_create_batch_transaction` method with the specified key word arguments (see example in *Deploy your own*, below). Similarly to above, to send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.21.3` connection using the `fetchai/ledger_api:1.0.0` protocol. +This message will be handled by the `fetchai/ledger:0.21.4` connection and then a `raw_transaction` message will be returned with the matching raw transaction. For this to be executed correctly, the `fetchai/erc1155:0.23.2` contract package needs to implement the `get_create_batch_transaction` method with the specified key word arguments (see example in *Deploy your own*, below). Similarly to above, to send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.21.4` connection using the `fetchai/ledger_api:1.0.0` protocol. -- the `get_raw_message` message is used to request any contract method call for a specific contract which does not change state in the contract. For instance, to request a call to get a hash from some input data in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.23.2` package, we send the following message to the `fetchai/ledger:0.21.3`: +- the `get_raw_message` message is used to request any contract method call for a specific contract which does not change state in the contract. For instance, to request a call to get a hash from some input data in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.23.2` package, we send the following message to the `fetchai/ledger:0.21.4`: ``` python contract_api_msg = ContractApiMessage( @@ -89,10 +89,10 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.21.3` connection and then a `raw_message` message will be returned with the matching raw message. For this to be executed correctly, the `fetchai/erc1155:0.23.2` contract package needs to implement the `get_hash_single` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.21.3` connection using the `fetchai/ledger_api:1.0.0` protocol. In this case, signing is not required. +This message will be handled by the `fetchai/ledger:0.21.4` connection and then a `raw_message` message will be returned with the matching raw message. For this to be executed correctly, the `fetchai/erc1155:0.23.2` contract package needs to implement the `get_hash_single` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.21.4` connection using the `fetchai/ledger_api:1.0.0` protocol. In this case, signing is not required. -- the `get_state` message is used to request any contract method call to query state in the deployed contract. For instance, to request a call to get the balances in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.23.2` package, we send the following message to the `fetchai/ledger:0.21.3`: +- the `get_state` message is used to request any contract method call to query state in the deployed contract. For instance, to request a call to get the balances in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.23.2` package, we send the following message to the `fetchai/ledger:0.21.4`: ``` python contract_api_msg = ContractApiMessage( @@ -107,7 +107,7 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.21.3` connection and then a `state` message will be returned with the matching state. For this to be executed correctly, the `fetchai/erc1155:0.23.2` contract package needs to implement the `get_balance` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.21.3` connection using the `fetchai/ledger_api:1.0.0` protocol. In this case, signing is not required. +This message will be handled by the `fetchai/ledger:0.21.4` connection and then a `state` message will be returned with the matching state. For this to be executed correctly, the `fetchai/erc1155:0.23.2` contract package needs to implement the `get_balance` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.21.4` connection using the `fetchai/ledger_api:1.0.0` protocol. In this case, signing is not required. ## Developing your own @@ -180,6 +180,6 @@ class MyContract(Contract): tx = cls._try_estimate_gas(ledger_api, tx) return tx ``` -Above, we implement a method to create a transaction, in this case a transaction to create a batch of tokens. The method will be called by the framework, specifically the `fetchai/ledger:0.21.3` connection once it receives a message (see bullet point 2 above). The method first gets the latest transaction nonce of the `deployer_address`, then constructs the contract instance, then uses the instance to build the transaction and finally updates the gas on the transaction. +Above, we implement a method to create a transaction, in this case a transaction to create a batch of tokens. The method will be called by the framework, specifically the `fetchai/ledger:0.21.4` connection once it receives a message (see bullet point 2 above). The method first gets the latest transaction nonce of the `deployer_address`, then constructs the contract instance, then uses the instance to build the transaction and finally updates the gas on the transaction. -It helps to look at existing contract packages, like `fetchai/erc1155:0.23.2`, and skills using them, like `fetchai/erc1155_client:0.11.0` and `fetchai/erc1155_deploy:0.31.4`, for inspiration and guidance. +It helps to look at existing contract packages, like `fetchai/erc1155:0.23.2`, and skills using them, like `fetchai/erc1155_client:0.11.0` and `fetchai/erc1155_deploy:0.31.5`, for inspiration and guidance. diff --git a/docs/core-components-1.md b/docs/core-components-1.md index 23c85cd2e1..2ded1b513d 100644 --- a/docs/core-components-1.md +++ b/docs/core-components-1.md @@ -34,7 +34,7 @@ An `Envelope` is the core object * `Dialogues`, which define rules over `Message` sequences. -The framework provides one default `Protocol`, called `default` (current version `fetchai/default:1.1.4`). This `Protocol` provides a bare-bones implementation for an AEA `Protocol` which includes a `DefaultMessage` class and associated `DefaultSerializer` and `DefaultDialogue` classes. +The framework provides one default `Protocol`, called `default` (current version `fetchai/default:1.1.6`). This `Protocol` provides a bare-bones implementation for an AEA `Protocol` which includes a `DefaultMessage` class and associated `DefaultSerializer` and `DefaultDialogue` classes. Additional `Protocols`, for new types of interactions, can be added as packages. For more details on `Protocols` you can read the protocol guide. To learn how you can easily automate protocol definition, head to the guide for the protocol generator. diff --git a/docs/erc1155-skills.md b/docs/erc1155-skills.md index 9ff1c016ee..2ccb214906 100644 --- a/docs/erc1155-skills.md +++ b/docs/erc1155-skills.md @@ -25,7 +25,7 @@ The scope of this guide is demonstrating how you can deploy a smart contract and Fetch the AEA that will deploy the contract: ``` bash -aea fetch fetchai/erc1155_deployer:0.34.3 +aea fetch fetchai/erc1155_deployer:0.34.4 cd erc1155_deployer aea install aea build @@ -39,22 +39,22 @@ Create the AEA that will deploy the contract. ``` bash aea create erc1155_deployer cd erc1155_deployer -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/ledger:0.21.3 -aea add skill fetchai/erc1155_deploy:0.31.4 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/ledger:0.21.4 +aea add skill fetchai/erc1155_deploy:0.31.5 aea config set --type dict agent.dependencies \ '{ "aea-ledger-fetchai": {"version": "<2.0.0,>=1.0.0"}, "aea-ledger-ethereum": {"version": "<2.0.0,>=1.0.0"}, "aea-ledger-cosmos": {"version": "<2.0.0,>=1.0.0"} }' -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea config set --type dict agent.default_routing \ '{ - "fetchai/contract_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/ledger_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/oef_search:1.1.4": "fetchai/soef:0.27.4" + "fetchai/contract_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/ledger_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/oef_search:1.1.6": "fetchai/soef:0.27.5" }' aea config set --type list vendor.fetchai.connections.p2p_libp2p.cert_requests \ '[{"identifier": "acn", "ledger_id": "ethereum", "not_after": "2023-01-01", "not_before": "2022-01-01", "public_key": "fetchai", "save_path": ".certs/conn_cert.txt"}]' @@ -95,7 +95,7 @@ aea issue-certificates In another terminal, fetch the client AEA which will receive some tokens from the deployer. ``` bash -aea fetch fetchai/erc1155_client:0.34.3 +aea fetch fetchai/erc1155_client:0.34.4 cd erc1155_client aea install aea build @@ -109,22 +109,22 @@ Create the AEA that will get some tokens from the deployer. ``` bash aea create erc1155_client cd erc1155_client -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/ledger:0.21.3 -aea add skill fetchai/erc1155_client:0.29.4 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/ledger:0.21.4 +aea add skill fetchai/erc1155_client:0.29.5 aea config set --type dict agent.dependencies \ '{ "aea-ledger-fetchai": {"version": "<2.0.0,>=1.0.0"}, "aea-ledger-ethereum": {"version": "<2.0.0,>=1.0.0"}, "aea-ledger-cosmos": {"version": "<2.0.0,>=1.0.0"} }' -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea config set --type dict agent.default_routing \ '{ - "fetchai/contract_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/ledger_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/oef_search:1.1.4": "fetchai/soef:0.27.4" + "fetchai/contract_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/ledger_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/oef_search:1.1.6": "fetchai/soef:0.27.5" }' aea config set --type list vendor.fetchai.connections.p2p_libp2p.cert_requests \ '[{"identifier": "acn", "ledger_id": "ethereum", "not_after": "2023-01-01", "not_before": "2022-01-01", "public_key": "fetchai", "save_path": ".certs/conn_cert.txt"}]' @@ -199,7 +199,7 @@ aea run Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of this address. -Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.3 -u public_uri` to retrieve the address. The output will be something like `/dns4/127.0.0.1/tcp/9000/p2p/16Uiu2HAm2JPsUX1Su59YVDXJQizYkNSe8JCusqRpLeeTbvY76fE5`. +Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.4 -u public_uri` to retrieve the address. The output will be something like `/dns4/127.0.0.1/tcp/9000/p2p/16Uiu2HAm2JPsUX1Su59YVDXJQizYkNSe8JCusqRpLeeTbvY76fE5`. This is the entry peer address for the local agent communication network created by the deployer. diff --git a/docs/generic-skills-step-by-step.md b/docs/generic-skills-step-by-step.md index 8512a49ad1..0e2eea4fe6 100644 --- a/docs/generic-skills-step-by-step.md +++ b/docs/generic-skills-step-by-step.md @@ -11,16 +11,16 @@ Follow the Preliminaries and Preliminaries and =1.0.0"} }' -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea config set --type dict agent.default_routing \ '{ - "fetchai/ledger_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/oef_search:1.1.4": "fetchai/soef:0.27.4" + "fetchai/ledger_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/oef_search:1.1.6": "fetchai/soef:0.27.5" }' aea install aea build @@ -96,7 +96,7 @@ aea build Then, in another terminal fetch the buyer AEA: ``` bash -aea fetch fetchai/generic_buyer:0.30.3 --alias my_buyer_aea +aea fetch fetchai/generic_buyer:0.30.4 --alias my_buyer_aea cd my_buyer_aea aea install aea build @@ -109,19 +109,19 @@ The following steps create the buyer from scratch: ``` bash aea create my_buyer_aea cd my_buyer_aea -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/ledger:0.21.3 -aea add skill fetchai/generic_buyer:0.27.4 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/ledger:0.21.4 +aea add skill fetchai/generic_buyer:0.27.5 aea config set --type dict agent.dependencies \ '{ "aea-ledger-fetchai": {"version": "<2.0.0,>=1.0.0"} }' -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea config set --type dict agent.default_routing \ '{ - "fetchai/ledger_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/oef_search:1.1.4": "fetchai/soef:0.27.4" + "fetchai/ledger_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/oef_search:1.1.6": "fetchai/soef:0.27.5" }' aea install aea build @@ -252,7 +252,7 @@ First, run the seller AEA: aea run ``` -Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of this address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.3 -u public_uri` to retrieve the address.) +Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of this address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.4 -u public_uri` to retrieve the address.) This is the entry peer address for the local agent communication network created by the seller. Then, configure the buyer to connect to this same local ACN by running the following command in the buyer terminal, replacing `SOME_ADDRESS` with the value you noted above: diff --git a/docs/gym-skill.md b/docs/gym-skill.md index 573203cdfa..882ef0a4c5 100644 --- a/docs/gym-skill.md +++ b/docs/gym-skill.md @@ -32,7 +32,7 @@ pip install numpy gym First, fetch the gym AEA: ``` bash -aea fetch fetchai/gym_aea:0.26.3 --alias my_gym_aea +aea fetch fetchai/gym_aea:0.26.4 --alias my_gym_aea cd my_gym_aea aea install ``` @@ -49,12 +49,12 @@ cd my_gym_aea ### Add the gym skill ``` bash -aea add skill fetchai/gym:0.21.4 +aea add skill fetchai/gym:0.21.5 ``` ### Set gym connection as default ``` bash -aea config set agent.default_connection fetchai/gym:0.20.4 +aea config set agent.default_connection fetchai/gym:0.20.5 ``` ### Install the skill dependencies diff --git a/docs/http-connection-and-skill.md b/docs/http-connection-and-skill.md index 226744c5f5..cd3ed4f14f 100644 --- a/docs/http-connection-and-skill.md +++ b/docs/http-connection-and-skill.md @@ -8,7 +8,7 @@ The HTTP server connection allows you to run a server inside the connection itse ## HTTP Client -The `fetchai/simple_data_request:0.14.4` skill demonstrates a simple use case of the HTTP Client connection. +The `fetchai/simple_data_request:0.14.5` skill demonstrates a simple use case of the HTTP Client connection. The `HttpRequestBehaviour` in `behaviours.py` periodically sends HTTP envelops to the HTTP client connection. Its `act()` method, periodically called, simply calls `_generate_http_request` which contains the logic for enqueueing an HTTP request envelop. @@ -26,13 +26,13 @@ cd my_aea Add the http server connection package: ``` bash -aea add connection fetchai/http_server:0.23.4 +aea add connection fetchai/http_server:0.23.5 ``` Update the default connection: ``` bash -aea config set agent.default_connection fetchai/http_server:0.23.4 +aea config set agent.default_connection fetchai/http_server:0.23.5 ``` Modify the `api_spec_path`: @@ -317,7 +317,7 @@ models: Run the fingerprinter (note, you will have to replace the author name with your author handle): ``` bash -aea fingerprint skill fetchai/http_echo:0.21.4 +aea fingerprint skill fetchai/http_echo:0.21.5 ``` diff --git a/docs/language-agnostic-definition.md b/docs/language-agnostic-definition.md index cdc670d413..4ee4b6b428 100644 --- a/docs/language-agnostic-definition.md +++ b/docs/language-agnostic-definition.md @@ -71,7 +71,7 @@ message Envelope{
  • It MUST implement protocols according to their specification (see here for details). -
  • It SHOULD implement the fetchai/default:1.1.4 protocol which satisfies the following protobuf schema: +
  • It SHOULD implement the fetchai/default:1.1.6 protocol which satisfies the following protobuf schema: ``` proto syntax = "proto3"; @@ -121,7 +121,7 @@ message DefaultMessage{
  • It MUST have an identity in the form of, at a minimum, an address derived from a public key and its associated private key (where the elliptic curve must be of type SECP256k1).
  • -
  • It SHOULD implement handling of errors using the fetchai/default:1.1.4 protocol. The protobuf schema is given above. +
  • It SHOULD implement handling of errors using the fetchai/default:1.1.6 protocol. The protobuf schema is given above.
  • It MUST implement the following principles when handling messages:
      diff --git a/docs/ledger-integration.md b/docs/ledger-integration.md index 27fae94d5d..29f56b5270 100644 --- a/docs/ledger-integration.md +++ b/docs/ledger-integration.md @@ -146,7 +146,7 @@ Stargate World is our stable, public testnet for the Fetch Ledger v2. As such, m You can access more details on docs section. -The configurations can be specified for the `fetchai/ledger:0.21.3` connection. +The configurations can be specified for the `fetchai/ledger:0.21.4` connection. ## CosmWasm supporting chains diff --git a/docs/logging.md b/docs/logging.md index 52cd984351..660b8d21a6 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -25,9 +25,9 @@ connections: - fetchai/stub:0.21.2 contracts: [] protocols: -- fetchai/default:1.1.4 +- fetchai/default:1.1.6 skills: -- fetchai/error:0.18.4 +- fetchai/error:0.18.5 default_connection: fetchai/stub:0.21.2 default_ledger: fetchai required_ledgers: diff --git a/docs/ml-skills.md b/docs/ml-skills.md index 1bc8124f25..43e7eec21a 100644 --- a/docs/ml-skills.md +++ b/docs/ml-skills.md @@ -106,7 +106,7 @@ Follow this approach when using the `aea` CLI. First, fetch the data provider AEA: ``` bash -aea fetch fetchai/ml_data_provider:0.32.3 +aea fetch fetchai/ml_data_provider:0.32.4 cd ml_data_provider aea install aea build @@ -119,19 +119,19 @@ The following steps create the data provider from scratch: ``` bash aea create ml_data_provider cd ml_data_provider -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/ledger:0.21.3 -aea add skill fetchai/ml_data_provider:0.27.4 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/ledger:0.21.4 +aea add skill fetchai/ml_data_provider:0.27.5 aea config set --type dict agent.dependencies \ '{ "aea-ledger-fetchai": {"version": "<2.0.0,>=1.0.0"} }' -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea config set --type dict agent.default_routing \ '{ - "fetchai/ledger_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/oef_search:1.1.4": "fetchai/soef:0.27.4" + "fetchai/ledger_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/oef_search:1.1.6": "fetchai/soef:0.27.5" }' aea install aea build @@ -144,7 +144,7 @@ aea build Then, fetch the model trainer AEA: ``` bash -aea fetch fetchai/ml_model_trainer:0.33.3 +aea fetch fetchai/ml_model_trainer:0.33.4 cd ml_model_trainer aea install aea build @@ -157,19 +157,19 @@ The following steps create the model trainer from scratch: ``` bash aea create ml_model_trainer cd ml_model_trainer -aea add connection fetchai/p2p_libp2p:0.27.3 -aea add connection fetchai/soef:0.27.4 -aea add connection fetchai/ledger:0.21.3 -aea add skill fetchai/ml_train:0.29.4 +aea add connection fetchai/p2p_libp2p:0.27.4 +aea add connection fetchai/soef:0.27.5 +aea add connection fetchai/ledger:0.21.4 +aea add skill fetchai/ml_train:0.29.5 aea config set --type dict agent.dependencies \ '{ "aea-ledger-fetchai": {"version": "<2.0.0,>=1.0.0"} }' -aea config set agent.default_connection fetchai/p2p_libp2p:0.27.3 +aea config set agent.default_connection fetchai/p2p_libp2p:0.27.4 aea config set --type dict agent.default_routing \ '{ - "fetchai/ledger_api:1.1.4": "fetchai/ledger:0.21.3", - "fetchai/oef_search:1.1.4": "fetchai/soef:0.27.4" + "fetchai/ledger_api:1.1.6": "fetchai/ledger:0.21.4", + "fetchai/oef_search:1.1.6": "fetchai/soef:0.27.5" }' aea install aea build @@ -234,7 +234,7 @@ First, run the data provider AEA: aea run ``` -Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.3 -u public_uri` to retrieve the address.) +Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.27.4 -u public_uri` to retrieve the address.) This is the entry peer address for the local agent communication network created by the ML data provider.