diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36f3673023..ab392bb007 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -172,46 +172,110 @@ jobs: aea init --reset --author valory --ipfs --remote aea push-all - publish-images: - name: Publish Docker Images + publish-docs-images: + name: Publish Docs Images runs-on: ubuntu-latest needs: - publish-aea-packages steps: - uses: actions/checkout@v2 + - name: Docker login + env: + DOCKER_USER: ${{secrets.DOCKER_USER}} + DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} + run: | + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + - name: Set up support for multi platform build + run: | + docker run --privileged --rm tonistiigi/binfmt --install all + docker buildx create --use --name multibuild + docker buildx inspect --bootstrap - name: Set up tag run: echo export TAG=$(python3 -c "from setup import about; print(about[\"__version__\"])") > env.sh - - name: Build version tagged images + - name: Build and push version tagged images run: | + # export `TAG` variable source env.sh - docker build -t valory/open-aea-docs:$TAG -f docs-image/Dockerfile . && \ - docker build -t valory/open-aea-develop:$TAG -f develop-image/Dockerfile . && \ - docker build -t valory/open-aea-user:$TAG -f user-image/Dockerfile . && \ - docker build -t valory/open-aea-deploy:$TAG -f deploy-image/Dockerfile . - - name: Tag to latest + docker build -t valory/open-aea-docs:$TAG -f docs-image/Dockerfile . --push + docker build -t valory/open-aea-docs:latest -f docs-image/Dockerfile . --push + + publish-user-images: + name: Publish User Images + runs-on: ubuntu-latest + needs: + - publish-aea-packages + steps: + - uses: actions/checkout@v2 + - name: Docker login + env: + DOCKER_USER: ${{secrets.DOCKER_USER}} + DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} + run: | + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + - name: Set up support for multi platform build run: | + docker run --privileged --rm tonistiigi/binfmt --install all + docker buildx create --use --name multibuild + docker buildx inspect --bootstrap + - name: Set up tag + run: echo export TAG=$(python3 -c "from setup import about; print(about[\"__version__\"])") > env.sh + - name: Build and push version tagged images + run: | + # export `TAG` variable source env.sh - docker tag valory/open-aea-docs:$TAG valory/open-aea-docs:latest - docker tag valory/open-aea-develop:$TAG valory/open-aea-develop:latest - docker tag valory/open-aea-user:$TAG valory/open-aea-user:latest - docker tag valory/open-aea-deploy:$TAG valory/open-aea-deploy:latest + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t valory/open-aea-user:$TAG -f user-image/Dockerfile . --push + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t valory/open-aea-user:latest -f user-image/Dockerfile . --push + + publish-deploy-images: + name: Publish Deploy Images + runs-on: ubuntu-latest + needs: + - publish-aea-packages + steps: + - uses: actions/checkout@v2 - name: Docker login env: DOCKER_USER: ${{secrets.DOCKER_USER}} DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} run: | docker login -u $DOCKER_USER -p $DOCKER_PASSWORD - - name: Docker Push + - name: Set up support for multi platform build + run: | + docker run --privileged --rm tonistiigi/binfmt --install all + docker buildx create --use --name multibuild + docker buildx inspect --bootstrap + - name: Set up tag + run: echo export TAG=$(python3 -c "from setup import about; print(about[\"__version__\"])") > env.sh + - name: Build and push version tagged images run: | + # export `TAG` variable source env.sh - docker push valory/open-aea-docs:$TAG - docker push valory/open-aea-docs:latest + docker buildx build --platform linux/amd64,linux/arm64 -t valory/open-aea-deploy:$TAG -f deploy-image/Dockerfile . --push + docker buildx build --platform linux/amd64,linux/arm64 -t valory/open-aea-deploy:latest -f deploy-image/Dockerfile . --push - docker push valory/open-aea-develop:$TAG - docker push valory/open-aea-develop:latest - - docker push valory/open-aea-user:$TAG - docker push valory/open-aea-user:latest - - docker push valory/open-aea-deploy:$TAG - docker push valory/open-aea-deploy:latest + publish-develop-images: + name: Publish Develop Images + runs-on: ubuntu-latest + needs: + - publish-aea-packages + steps: + - uses: actions/checkout@v2 + - name: Docker login + env: + DOCKER_USER: ${{secrets.DOCKER_USER}} + DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} + run: | + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + - name: Set up support for multi platform build + run: | + docker run --privileged --rm tonistiigi/binfmt --install all + docker buildx create --use --name multibuild + docker buildx inspect --bootstrap + - name: Set up tag + run: echo export TAG=$(python3 -c "from setup import about; print(about[\"__version__\"])") > env.sh + - name: Build and push version tagged images + run: | + # export `TAG` variable + source env.sh + docker build -t valory/open-aea-develop:$TAG -f develop-image/Dockerfile . --push + docker build -t valory/open-aea-develop:latest -f develop-image/Dockerfile . --push diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b76870f425..888253cbae 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -60,7 +60,7 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 - name: Security Check run: tox -e bandit - name: Safety Check @@ -99,7 +99,7 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 - name: Pylint check run: | tox -e pylint @@ -120,11 +120,11 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 pip install --user --upgrade setuptools # 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 + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip + unzip protoc-24.3-linux-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc # install IPFS sudo apt-get install -y wget @@ -162,7 +162,7 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 pip install --user --upgrade setuptools - name: Copyright Check run: tox -e check-copyright @@ -187,7 +187,7 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 - name: Install markdown-spellcheck run: sudo npm install -g markdown-spellcheck - name: Check API Docs updated @@ -215,7 +215,7 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 - name: Check Docs links and IPFS hashes run: tox -e check-doc-links-hashes @@ -249,7 +249,7 @@ jobs: python-version: ${{ matrix.python_version }} - name: Install tox run: | - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 - name: Check Pipfile and tox.ini consistency run: | python ./scripts/check_pipfile_and_toxini.py @@ -281,7 +281,7 @@ jobs: python-version: ${{ matrix.python_version }} - name: Install tox run: | - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 - name: Check plugin aea-ledger-cosmos run: | tox -r -e plugins_env -- sh -c "pip install ./plugins/aea-ledger-cosmos && aea generate-key cosmos && echo aea-ledger-cosmos checked!" @@ -345,10 +345,10 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 # 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 + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip + unzip protoc-24.3-linux-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc # pull pre-built images @@ -382,10 +382,10 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 # 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 + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip + unzip protoc-24.3-linux-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc - name: Framework integration tests run: tox -e py3.10 -- -m 'profiling' @@ -411,7 +411,7 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 - name: Framework integration tests run: tox -e py3.10 -- -m 'integration and not unstable and ledger and not profiling' - name: Packages integration tests @@ -432,7 +432,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python_version: ['3.7', '3.8', '3.9', '3.10'] + python_version: ['3.8', '3.9', '3.10', '3.11'] timeout-minutes: 120 steps: - uses: actions/checkout@master @@ -448,10 +448,10 @@ jobs: sudo apt-get update --fix-missing sudo apt-get autoremove sudo apt-get autoclean - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 # 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 + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip + unzip protoc-24.3-linux-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc make protolint_install # install ipfs @@ -470,12 +470,12 @@ jobs: - if: matrix.os == 'macos-latest' name: Install dependencies (macos-latest) run: | - pip install tomte[tox]==0.2.4 + pip install tomte[tox]==0.2.13 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 + wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip + unzip protoc-24.3-osx-x86_64.zip -d protoc sudo mv protoc/bin/protoc /usr/local/bin/protoc brew tap yoheimuta/protolint brew install protolint @@ -496,14 +496,14 @@ jobs: 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 protoc --version 24.3 choco install mingw -y choco install make -y # to check make was installed make --version - pip install tomte[tox]==0.2.4 - # 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 + pip install tomte[tox]==0.2.13 + # wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-win64.zip + # unzip protoc-24.3-win64.zip -d protoc # sudo mv protoc/bin/protoc /usr/local/bin/protoc python scripts/update_symlinks_cross_platform.py make protolint_install_win @@ -531,7 +531,7 @@ jobs: - if: matrix.os == 'ubuntu-latest' && matrix.python_version == '3.10' name: Show full coverage report run: | - pip install tomte[tests]==0.2.4 + pip install tomte[tests]==0.2.13 coverage report -m -i - if: matrix.os == 'ubuntu-latest' && matrix.python_version == '3.10' @@ -567,7 +567,3 @@ jobs: - uses: actions/setup-go@v3 with: go-version: "1.17.7" - # - if: matrix.python-version == '3.7' - # name: Golang unit tests (aealite) - # working-directory: ./libs/go/aealite - # run: go test -p 1 -timeout 0 -count 1 -v ./... diff --git a/.gitignore b/.gitignore index e9040821c1..87caa4be97 100644 --- a/.gitignore +++ b/.gitignore @@ -154,4 +154,5 @@ coverage.txt temp/ agent_name/ +agent/ leak_report diff --git a/.pylintrc b/.pylintrc index 4735c2b29e..6dba6f0946 100644 --- a/.pylintrc +++ b/.pylintrc @@ -36,7 +36,7 @@ disable=C0103,C0201,C0301,C0302,W0105,W0707,W1202,W1203,R0801,E1136,E0611,C0209, # C0206: consider-using-dict-items [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,coverage,pylint,pytest,gitpython,protobuf,docker,signal,anchorpy,cryptography.fernet,solana,solders +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,coverage,pylint,pytest,gitpython,protobuf,docker,signal,anchorpy,cryptography.fernet,solana,solders,flashbots,hexbytes [DESIGN] min-public-methods=1 diff --git a/.spelling b/.spelling index df66c8ba93..21eed09e26 100644 --- a/.spelling +++ b/.spelling @@ -372,4 +372,11 @@ ABI ERC20 WETH Solana -plug-in \ No newline at end of file +plug-in +0.6.0 +cosmpy +tomte +pyyaml +1.36.0 +1.39.0.post1 +1.41.0.post1 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60bc37d2cb..32689bcfd1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ If you want to contribute, start working through the codebase, navigate to the G First, setup your environment by either using the `develop-image` or by following these steps: -- The simplest way to get setup for development on the framework is to install Python `>=3.7` and `pipenv`, then run the following: +- The simplest way to get setup for development on the framework is to install Python `>=3.8` and `pipenv`, then run the following: make new_env pipenv shell diff --git a/HISTORY.md b/HISTORY.md index a8c4197f58..a76c749e00 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,78 @@ # Release History - open AEA + +## 1.41.0.post1 (2023-10-23) + +Packages: +- Use `kwargs.pop` instead of `kwargs.get` to avoid extra argument error on ledger connection + +## 1.41.0 (2023-10-10) + +AEA: +- Fixes the source repository validation regex +- Updates the `generate-key` command to prompt before overwriting the existing keys file +- Fixes the inconsistent hashing caused by the `CRLF` line endings +- Updates the component loader to ignore the test modules when loading the component +- Adds support for overriding dependencies +- Updates the `sync` command to download missing dependencies and update `packages.json` +- Updates the error messages for missing ledger plugins on `generate-key` command + +Plugins: +- Adds missing `py.typed` markers +- Backports the changes from the `agent-academy-2` repository on the ledger connection +- Ports `http_server` as a valory connection + +## 1.40.0 (2023-09-26) + +AEA: +- Adds support for specifying extra dependencies and overriding dependencies via `-e` flag on `aea install` +- Updates the selection of dependencies in `aea install` command to override the dependencies in the `extra dependencies provided by flag > agent > skill > connection > contract > protocol` order instead of merging them. + +## 1.40.0 (2023-09-26) + +AEA: +- Removes the `web3py` fork as a dependency +- Bumps the protobuf to `protobuf>=4.21.6,<5.0.0` +- Updates protocol buffers compiler to `v24.3` +- Updates the protocol generator +- Removes unused layers from the user image and uses minimal python image as base + +## 1.39.0.post1 (2023-09-21) + +AEA: +- Pins `jsonschema<=4.19.0,>=4.16.0` + +## 1.39.0 (2023-09-07) + +AEA: +- Removes the rust installation layer from the user image + +## 1.38.0 (2023-08-09) + +Framework: +- Deprecates the support for `Python 3.7` and adds support for `Python 3.11` +- Adds support for multi platform docker images + +Plugins: +- Replaces `web3py==5.31.4` with `open-aea-web3==6.0.1` +- Replaces `flashbots==1.1.1` with `open-aea-flashbots==1.3.0` +- Bumps `open-aea-cosmpy` to `v0.6.5` +- Deprecates the `apduboy` as a dependency +- Pins `ledgerwallet==0.1.3` + +## 1.37.0 (2023-07-25) + +Plugins: +- Replaces `cosmpy` with `open-aea-cosmpy` + +## 1.36.0 (2023-07-19) + +AEA: +- pyyaml updated, tomte updated + +Plugins: +- cosmpy updated to 0.6.0 + ## 1.35.0 (2023-06-20) Plugins: diff --git a/Makefile b/Makefile index 5bf5f7b419..587e58b132 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,7 @@ dist: clean python setup.py bdist_wheel --plat-name=manylinux1_x86_64 python setup.py bdist_wheel --plat-name=manylinux2014_aarch64 python setup.py bdist_wheel --plat-name=macosx_10_9_x86_64 + python setup.py bdist_wheel h := $(shell git rev-parse --abbrev-ref HEAD) @@ -182,3 +183,17 @@ common-checks-1: common-checks-2: tox -e check-api-docs tox -e check-doc-links-hashes + +.PHONY: build-proto +build-proto: + @# Usage: INCLUDE=PATH_TO_PROTOC_INCLUDE_DIRECTORY make build-proto + @echo "Building aea/mail/base.proto" + @protoc --proto_path=aea/mail/ --python_out=aea/mail/ aea/mail/base.proto -I $$INCLUDE + @echo "Building aea/ipfs/pb/merkledag.proto" + @protoc --proto_path=aea/helpers/ipfs/pb/ --python_out=aea/helpers/ipfs/pb/ aea/helpers/ipfs/pb/merkledag.proto -I $$INCLUDE + @echo "Building aea/ipfs/pb/unixfs.proto" + @protoc --proto_path=aea/helpers/ipfs/pb/ --python_out=aea/helpers/ipfs/pb/ aea/helpers/ipfs/pb/unixfs.proto -I $$INCLUDE + @echo "Building aea/helpers/search/models.proto" + @protoc --proto_path=aea/helpers/search/ --python_out=aea/helpers/search/ aea/helpers/search/models.proto -I $$INCLUDE + @echo "Building aea/helpers/multiaddr/crypto.proto" + @protoc --proto_path=aea/helpers/multiaddr/ --python_out=aea/helpers/multiaddr/ aea/helpers/multiaddr/crypto.proto -I $$INCLUDE diff --git a/Pipfile b/Pipfile index 9a5df20096..8145cc2fe3 100644 --- a/Pipfile +++ b/Pipfile @@ -11,14 +11,14 @@ name = "test-pypi" [dev-packages] # we fix exact versions as it's sufficient to have at least one set of compatible dependencies for development setuptools = "==59.6.0" -aiohttp = "==3.7.4.post0" +aiohttp = ">=3.8.5,<4.0.0" asn1crypto = "==1.4.0" bech32 = "==1.2.0" defusedxml = "==0.6.0" # ^ still used? docker = "==4.2.0" ecdsa = ">=0.15" -eth-account = ">=0.5.9,<0.6.0" +eth-account = ">=0.8.0,<0.9.0" gym = "==0.15.6" hypothesis = "==6.21.6" ipfshttpclient = "==0.8.0a2" @@ -29,28 +29,28 @@ memory-profiler = "==0.57.0" numpy = ">=1.18.1" openapi-core = "==0.13.2" openapi-spec-validator = "==0.2.8" -packaging = "==21.3" +packaging = ">=23.1,<24.0" pexpect = "==4.8.0" -protobuf = "==3.19.5" +protobuf = ">=4.21.6,<5.0.0" psutil = "==5.7.0" pycryptodome = ">=3.10.1" pytest-custom-exit-code = "==0.3.0" -GitPython = "==3.1.27" +GitPython = "<4.0.0,>=3.1.37" requests = "==2.28.1" idna = "<=3.3" -web3 = "==5.31.4" -cosmpy = ">=0.4.1,<0.5.0" +open-aea-cosmpy = "==0.6.7" +web3 = ">=6.0.0,<7" semver = "<3.0.0,>=2.9.1" py-multibase = ">=1.0.0" py-multicodec = ">=0.2.0" google-api-python-client = "<=2.60.0" certifi = "<=2022.6.15.1" mistune = "==2.0.3" -tomte = {version = "==0.2.4", extras = ["tox", "tests"]} -docspec = "==2.0.2" -docspec-python = "==2.0.2" +tomte = {version = "==0.2.13", extras = ["tox", "tests"]} +docspec = "==2.2.1" +docspec-python = "==2.2.1" hexbytes = "==0.3.0" -apduboy = ">=0.5.0" +ledgerwallet = "==0.1.3" construct = "<=2.10.61" [packages] diff --git a/README.md b/README.md index 1ce855ce62..c23de7589f 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ This is a fork of the original A ## Get started developing AEAs -1. Create and launch a clean virtual environment with Python 3.10 (any Python `>=` 3.7 works): +1. Create and launch a clean virtual environment with Python 3.10 (any Python `>=` 3.8 works): pipenv --python 3.10 && pipenv shell @@ -96,7 +96,7 @@ You can have more control on the installed dependencies by leveraging the setupt ### Preliminaries -- Create and launch a virtual environment with Python 3.10 (any Python `>=` 3.7 works): +- Create and launch a virtual environment with Python 3.10 (any Python `>=` 3.8 works): pipenv --python 3.10 && pipenv shell diff --git a/SECURITY.md b/SECURITY.md index f877354fc0..612982f8c7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,8 +8,8 @@ The following table shows which versions of `open-aea` are currently being suppo | Version | Supported | | --------- | ------------------ | -| `1.35.x` | :white_check_mark: | -| `< 1.35.0` | :x: | +| `1.41.x` | :white_check_mark: | +| `< 1.41.0` | :x: | ## Reporting a Vulnerability diff --git a/aea/__init__.py b/aea/__init__.py index 79530569bb..67726a1332 100644 --- a/aea/__init__.py +++ b/aea/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,8 +20,23 @@ """Contains the AEA package.""" +# pylint: disable=wrong-import-position + import inspect import os +import sys + + +# Patch to fix https://github.com/protocolbuffers/protobuf/issues/3276 + +_google_upb_message = sys.modules.pop("google._upb._message", None) + +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + + +if _google_upb_message is not None: + sys.modules["google._upb._message"] = _google_upb_message + from packaging.version import Version diff --git a/aea/__version__.py b/aea/__version__.py index 1ad9d362df..e022e5d53e 100644 --- a/aea/__version__.py +++ b/aea/__version__.py @@ -23,7 +23,7 @@ __title__ = "open-aea" __description__ = "Open Autonomous Economic Agent framework (without vendor lock-in)" __url__ = "https://github.com/valory-xyz/open-aea.git" -__version__ = "1.35.0" +__version__ = "1.41.0.post1" __author__ = "Valory AG" __license__ = "Apache-2.0" __copyright__ = "2021 Valory AG, 2019 Fetch.AI Limited" diff --git a/aea/aea.py b/aea/aea.py index 461f2bd9a4..6da233d635 100644 --- a/aea/aea.py +++ b/aea/aea.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -308,7 +308,6 @@ def _handle_decoding( protocol: Protocol, error_handler: AbstractErrorHandler, ) -> Tuple[Optional[Message], List[Handler]]: - handlers = self.filter.get_active_handlers( protocol.public_id, envelope.to_as_public_id ) @@ -330,7 +329,9 @@ def _handle_decoding( msg.sender = envelope.sender msg.to = envelope.to return msg, handlers - except Exception as e: # pylint: disable=broad-except # thats ok, because we send the decoding error back + except ( + Exception # pylint: disable=broad-except + ) as e: # thats ok, because we send the decoding error back error_handler.send_decoding_error(envelope, e, self.logger) return None, [] @@ -425,6 +426,7 @@ def exception_handler(self, exception: Exception, function: Callable) -> bool: :return: bool, propagate exception if True otherwise skip it. """ + # docstyle: ignore # noqa: E800 def log_exception(e: Exception, fn: Callable, is_debug: bool = False) -> None: if is_debug: diff --git a/aea/cli/__init__.py b/aea/cli/__init__.py index 234d16c4f6..5a3d89bec2 100644 --- a/aea/cli/__init__.py +++ b/aea/cli/__init__.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # +# Copyright 2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,4 +20,5 @@ """This module contains the implementation of command-line tool 'aea'.""" + from .core import cli diff --git a/aea/cli/check_packages.py b/aea/cli/check_packages.py index a78d5141c3..db72f33192 100644 --- a/aea/cli/check_packages.py +++ b/aea/cli/check_packages.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -603,16 +603,7 @@ def check_pypi_dependencies(configuration_file: Path) -> None: @click.option("--vendor", type=str, default=None, required=False) @pass_ctx def check_packages(ctx: Context, vendor: Optional[str]) -> None: - """ - Run different checks on AEA packages. - - Namely: - - Check that every package has existing dependencies - - Check that every package has non-empty description - - :param ctx: AEA cli context. - :param vendor: filter by author name - """ + """Run different checks on AEA packages.""" packages_dir = Path(ctx.registry_path).absolute() all_packages_ids_ = find_all_packages_ids(packages_dir) failed: bool = False diff --git a/aea/cli/fetch.py b/aea/cli/fetch.py index d01a338a6a..3e881a3a09 100644 --- a/aea/cli/fetch.py +++ b/aea/cli/fetch.py @@ -268,9 +268,21 @@ def _fetch_agent_deps(ctx: Context) -> None: """ for item_type in (PROTOCOL, CONTRACT, CONNECTION, SKILL): item_type_plural = "{}s".format(item_type) - required_items = getattr(ctx.agent_config, item_type_plural) - for item_id in required_items: - add_item(ctx, item_type, item_id) + required_items = cast(set, getattr(ctx.agent_config, item_type_plural)) + required_items_check = required_items.copy() + try: + for item_id in required_items: + add_item(ctx, item_type, item_id) + except RuntimeError as e: + missing_deps = required_items_check.symmetric_difference(required_items) + error = "\n- ".join( + [ + "Size of the dependency set changed during the iteration; " + "Following dependencies are missing from the agent configuration: ", + *map(lambda x: str(x.without_hash()), missing_deps), + ] + ) + raise click.ClickException(error) from e def fetch_mixed( diff --git a/aea/cli/generate_all_protocols.py b/aea/cli/generate_all_protocols.py index 2e75a1b564..6f5bf9993b 100644 --- a/aea/cli/generate_all_protocols.py +++ b/aea/cli/generate_all_protocols.py @@ -63,7 +63,7 @@ SPECIFICATION_REGEX = re.compile(r"(---\nname.*\.\.\.)", re.DOTALL) -LIBPROTOC_VERSION = "libprotoc 3.19.4" +LIBPROTOC_VERSION = "libprotoc 24.3" CUSTOM_TYPE_MODULE_NAME = "custom_types.py" PROTOCOL_GENERATOR_DOCSTRING_REGEX = "It was created with protocol buffer compiler version `libprotoc .*` and aea protocol generator version `.*`." diff --git a/aea/cli/generate_key.py b/aea/cli/generate_key.py index 4646e9c2c2..4281b770df 100644 --- a/aea/cli/generate_key.py +++ b/aea/cli/generate_key.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2020 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,24 +18,30 @@ # # ------------------------------------------------------------------------------ """Implementation of the 'aea generate_key' subcommand.""" +import json from pathlib import Path from typing import Dict, Optional, Union import click from aea.cli.add_key import _add_private_key -from aea.cli.utils.click_utils import password_option +from aea.cli.utils.click_utils import LedgerChoice, password_option from aea.cli.utils.decorators import _check_aea_project -from aea.configurations.constants import PRIVATE_KEY_PATH_SCHEMA -from aea.crypto.helpers import create_private_key, generate_multiple_keys -from aea.crypto.registries import crypto_registry +from aea.configurations.constants import ( + ADDRESS, + MULTIKEY_FILENAME, + PRIVATE_KEY, + PRIVATE_KEY_PATH_SCHEMA, +) +from aea.crypto.helpers import create_private_key +from aea.crypto.registries import crypto_registry, make_crypto @click.command() @click.argument( "type_", metavar="TYPE", - type=click.Choice([*list(crypto_registry.supported_ids), "all"]), + type=LedgerChoice(), required=True, ) @click.argument( @@ -84,7 +90,7 @@ def generate_key( ) return - generate_multiple_keys( + _generate_multiple_keys( n=n, type_=type_, password=password, @@ -142,6 +148,30 @@ def _generate_private_key( return keys +def _generate_multiple_keys( + n: int, + type_: str, + password: Optional[str] = None, + extra_entropy: Union[str, bytes, int] = "", + file: Optional[str] = None, +) -> None: + """Generate n key pairs.""" + + key_pairs = [] + for _ in range(n): + crypto = make_crypto(type_, extra_entropy=extra_entropy) + priv_key = ( + crypto.encrypt(password=password) + if password is not None + else crypto.private_key + ) + key_pairs.append({ADDRESS: crypto.address, PRIVATE_KEY: priv_key}) + + file = file or MULTIKEY_FILENAME + if _can_write(file): + Path(file).write_text(json.dumps(obj=key_pairs, indent=2), encoding="utf-8") + + def _can_write(path: str) -> bool: if Path(path).exists(): value = click.confirm( diff --git a/aea/cli/install.py b/aea/cli/install.py index 7bf2bb1f89..e4b728178b 100644 --- a/aea/cli/install.py +++ b/aea/cli/install.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,15 +19,15 @@ # ------------------------------------------------------------------------------ """Implementation of the 'aea install' subcommand.""" -from typing import Optional, cast +from typing import Optional, Tuple, cast import click +from aea.cli.utils.click_utils import PyPiDependency from aea.cli.utils.context import Context from aea.cli.utils.decorators import check_aea_project from aea.cli.utils.loggers import logger -from aea.configurations.data_types import Dependencies -from aea.configurations.pypi import is_satisfiable, is_simple_dep, to_set_specifier +from aea.configurations.data_types import Dependency from aea.exceptions import AEAException from aea.helpers.install_dependency import call_pip, install_dependencies @@ -41,66 +41,56 @@ default=None, help="Install from the given requirements file.", ) +@click.option( + "-e", + "--extra-dependency", + "extra_dependencies", + type=PyPiDependency(), + help="Provide extra dependency.", + multiple=True, +) @click.pass_context @check_aea_project -def install(click_context: click.Context, requirement: Optional[str]) -> None: +def install( + click_context: click.Context, + requirement: Optional[str], + extra_dependencies: Tuple[Dependency], +) -> None: """Install the dependencies of the agent.""" ctx = cast(Context, click_context.obj) - do_install(ctx, requirement) + do_install(ctx, requirement, extra_dependencies) -def do_install(ctx: Context, requirement: Optional[str] = None) -> None: +def do_install( + ctx: Context, + requirement: Optional[str] = None, + extra_dependencies: Optional[Tuple[Dependency]] = None, +) -> None: """ Install necessary dependencies. :param ctx: context object. :param requirement: optional str requirement. + :param extra_dependencies: List of the extra dependencies to use :raises ClickException: if AEAException occurs. """ try: if requirement: + if extra_dependencies is not None and len(extra_dependencies) > 0: + logger.debug( + "Extra dependencies will be ignored while installing from requirements file" + ) logger.debug("Installing the dependencies in '{}'...".format(requirement)) _install_from_requirement(requirement) else: logger.debug("Installing all the dependencies...") - dependencies = ctx.get_dependencies() - - logger.debug("Preliminary check on satisfiability of version specifiers...") - unsat_dependencies = _find_unsatisfiable_dependencies(dependencies) - if len(unsat_dependencies) != 0: - raise AEAException( - "cannot install the following dependencies " - + "as the joint version specifier is unsatisfiable:\n - " - + "\n -".join( - [ - f"{name}: {to_set_specifier(dep)}" - for name, dep in unsat_dependencies.items() - ] - ) - ) + dependencies = ctx.get_dependencies(extra_dependencies=extra_dependencies) install_dependencies(list(dependencies.values()), logger=logger) except AEAException as e: raise click.ClickException(str(e)) -def _find_unsatisfiable_dependencies(dependencies: Dependencies) -> Dependencies: - """ - Find unsatisfiable dependencies. - - It only checks among 'simple' dependencies (i.e. if it has no field specified, - or only the 'version' field set.) - - :param dependencies: the dependencies to check. - :return: the unsatisfiable dependencies. - """ - return { - name: dep - for name, dep in dependencies.items() - if is_simple_dep(dep) and not is_satisfiable(to_set_specifier(dep)) - } - - def _install_from_requirement(file: str, install_timeout: float = 300) -> None: """ Install from requirements. diff --git a/aea/cli/utils/click_utils.py b/aea/cli/utils/click_utils.py index 18d81d64fd..51851c13c2 100644 --- a/aea/cli/utils/click_utils.py +++ b/aea/cli/utils/click_utils.py @@ -18,7 +18,6 @@ # # ------------------------------------------------------------------------------ """Module with click utils of the aea cli.""" - import os from collections import OrderedDict from contextlib import contextmanager @@ -45,7 +44,8 @@ PROTOCOL, SKILL, ) -from aea.configurations.data_types import PackageType, PublicId +from aea.configurations.data_types import Dependency, PackageType, PublicId +from aea.crypto.registries import crypto_registry from aea.helpers.io import open_file from aea.package_manager.base import PACKAGE_SOURCE_RE @@ -244,6 +244,49 @@ def convert(self, value: str, param: Any, ctx: click.Context) -> str: return value +class PyPiDependency(click.ParamType): + """Click parameter for PyPy dependency string""" + + def get_metavar(self, param: Any) -> str: + """Return the metavar default for this param if it provides one.""" + return "DEPENDENCY" # pragma: no cover + + def convert(self, value: str, param: Any, ctx: click.Context) -> Dependency: + """Convert the value.""" + try: + return Dependency.from_string(value) + except ValueError as e: + raise click.ClickException(str(e)) from e + + +class LedgerChoice(click.ParamType): + """Ledger choice flag.""" + + ALL = "all" + + def get_metavar(self, param: click.Parameter) -> str: + """Get metavar name.""" + return "LEDGER_ID" + + def convert( + self, + value: str, + param: Optional[click.Parameter] = None, + ctx: Optional[click.Context] = None, + ) -> str: + """Convert to ledger id.""" + if len(crypto_registry.supported_ids) == 0: + raise click.ClickException("No ledger installation found") + + if value not in crypto_registry.supported_ids and value != self.ALL: + raise click.ClickException( + f"Invalid identifier provided `{value}`; " + f"Available ledger identifiers {crypto_registry.supported_ids}" + ) + + return value + + def registry_flag( mark_default: bool = True, default_registry: Optional[str] = None, diff --git a/aea/cli/utils/context.py b/aea/cli/utils/context.py index b68a96be9a..34613ca657 100644 --- a/aea/cli/utils/context.py +++ b/aea/cli/utils/context.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,28 +20,31 @@ """A module with context tools of the aea cli.""" import os from pathlib import Path -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Tuple, cast from aea.cli.registry.settings import REGISTRY_LOCAL, REGISTRY_TYPES from aea.cli.utils.loggers import logger from aea.configurations.base import ( AgentConfig, Dependencies, + Dependency, PackageType, PublicId, _get_default_configuration_file_name_from_type, ) from aea.configurations.constants import ( - CONNECTION, - CONTRACT, DEFAULT_AEA_CONFIG_FILE, DEFAULT_REGISTRY_NAME, - PROTOCOL, - SKILL, VENDOR, ) from aea.configurations.loader import ConfigLoader -from aea.configurations.pypi import merge_dependencies_list +from aea.configurations.pypi import ( + is_satisfiable, + is_simple_dep, + merge_dependencies_list, + to_set_specifier, +) +from aea.exceptions import AEAException from aea.helpers.io import open_file @@ -184,39 +187,96 @@ def _get_item_dependencies(item_type: str, public_id: PublicId) -> Dependencies: deps = cast(Dependencies, config.dependencies) return deps - def get_dependencies(self) -> Dependencies: + @staticmethod + def _find_unsatisfiable_dependencies(dependencies: Dependencies) -> Dependencies: + """ + Find unsatisfiable dependencies. + + It only checks among 'simple' dependencies (i.e. if it has no field specified, + or only the 'version' field set.) + + :param dependencies: the dependencies to check. + :return: the unsatisfiable dependencies. + """ + return { + name: dep + for name, dep in dependencies.items() + if is_simple_dep(dep) and not is_satisfiable(to_set_specifier(dep)) + } + + def _get_dependencies_by_item_type(self, item_type: PackageType) -> Dependencies: + """Get the dependencies from item type and public id.""" + if item_type == PackageType.AGENT: + return self.agent_config.dependencies + dependency_to_package: Dict[str, List[Tuple[PublicId, Dependency]]] = {} + dependencies = [] + for item_id in getattr(self.agent_config, item_type.to_plural()): + package_dependencies = self._get_item_dependencies(item_type.value, item_id) + dependencies += [package_dependencies] + for dep, spec in package_dependencies.items(): + if dep not in dependency_to_package: + dependency_to_package[dep] = [] + dependency_to_package[dep].append((item_id, spec)) + + merged_dependencies = merge_dependencies_list(*dependencies) + unsat_dependencies = self._find_unsatisfiable_dependencies(merged_dependencies) + if len(unsat_dependencies) > 0: + error = f"Error while merging dependencies for {item_type.to_plural()}" + error += "; Joint version specifier is unsatisfiable for following dependencies:\n" + error += "======================================\n" + for name, spec in unsat_dependencies.items(): + error += f"Dependency: {name}\n" + error += f"Specifier: {to_set_specifier(spec)}\n" + error += "Packages containing dependency: \n" + for package, dep_spec in dependency_to_package[name]: + error += f" - {package.without_hash()}: {dep_spec.get_pip_install_args()[0]}\n" + error += "======================================\n" + + raise AEAException(error[:-1]) + return merged_dependencies + + def get_dependencies( + self, + extra_dependencies: Optional[Tuple[Dependency]] = None, + ) -> Dependencies: """ Aggregate the dependencies from every component. + :param extra_dependencies: List of the extra dependencies to use, if the + extra dependencies and agent dependencies have conflicts + the packages from extra dependencies list will be prefered + over the agent dependencies :return: a list of dependency version specification. e.g. ["gym >= 1.0.0"] """ - protocol_dependencies = [ - self._get_item_dependencies(PROTOCOL, protocol_id) - for protocol_id in self.agent_config.protocols - ] - connection_dependencies = [ - self._get_item_dependencies(CONNECTION, connection_id) - for connection_id in self.agent_config.connections - ] - skill_dependencies = [ - self._get_item_dependencies(SKILL, skill_id) - for skill_id in self.agent_config.skills - ] - contract_dependencies = [ - self._get_item_dependencies(CONTRACT, contract_id) - for contract_id in self.agent_config.contracts - ] - - all_dependencies = [ - self.agent_config.dependencies, - *protocol_dependencies, - *connection_dependencies, - *skill_dependencies, - *contract_dependencies, - ] - - result = merge_dependencies_list(*all_dependencies) - return result + dependencies: Dependencies = {} + + def _update_dependencies(updates: Dependencies) -> None: + """Update dependencies.""" + for dep, spec in updates.items(): + if dep in dependencies and dependencies[dep] != spec: + logger.debug( + f"`{dependencies[dep].get_pip_install_args()}` " + f"will be overridden by {spec.get_pip_install_args()}" + ) + dependencies[dep] = spec + + for item_type in ( + PackageType.PROTOCOL, + PackageType.CONTRACT, + PackageType.CONNECTION, + PackageType.SKILL, + PackageType.AGENT, + ): + logger.debug(f"Loading {item_type.value} dependencies") + type_deps = self._get_dependencies_by_item_type(item_type) + _update_dependencies(type_deps) + + if extra_dependencies is not None and len(extra_dependencies) > 0: + logger.debug("Loading extra dependencies") + type_deps = {spec.name: spec for spec in extra_dependencies} + _update_dependencies(type_deps) + + return dependencies def dump_agent_config(self) -> None: """Dump the current agent configuration.""" diff --git a/aea/cli/utils/decorators.py b/aea/cli/utils/decorators.py index d64885f289..ab712492a3 100644 --- a/aea/cli/utils/decorators.py +++ b/aea/cli/utils/decorators.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2020 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -80,7 +80,6 @@ def _validate_config_consistency(ctx: Context, check_aea_version: bool = True) - ) # type: Dict[PublicId, PackageType] for public_id, item_type in packages_public_ids_to_types.items(): - # find the configuration file. try: # either in vendor/ or in personal packages. diff --git a/aea/components/base.py b/aea/components/base.py index db51307a03..afe4b58bc6 100644 --- a/aea/components/base.py +++ b/aea/components/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -350,8 +350,10 @@ def perform_load_aea_package( ) prefix_pkg = prefix_pkg_type + f".{package_name}" - for subpackage_init_file in dir_.rglob("__init__.py"): + if subpackage_init_file.parent.name == "tests": + continue + parent_dir = subpackage_init_file.parent relative_parent_dir = parent_dir.relative_to(dir_) if relative_parent_dir == Path("."): diff --git a/aea/configurations/constants.py b/aea/configurations/constants.py index c4d864e1e8..8ef993a3df 100644 --- a/aea/configurations/constants.py +++ b/aea/configurations/constants.py @@ -30,7 +30,7 @@ _SOLANA_IDENTIFIER = "solana" SIGNING_PROTOCOL = "open_aea/signing:latest" SIGNING_PROTOCOL_WITH_HASH = ( - "open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4" + "open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii" ) DEFAULT_LEDGER = _ETHEREUM_IDENTIFIER PRIVATE_KEY_PATH_SCHEMA = "{}_private_key.txt" diff --git a/aea/configurations/data_types.py b/aea/configurations/data_types.py index d53609bc38..78d4da52e1 100644 --- a/aea/configurations/data_types.py +++ b/aea/configurations/data_types.py @@ -62,6 +62,9 @@ T = TypeVar("T") PackageVersionLike = Union[str, semver.VersionInfo] +PYPI_RE = r"(?P[a-zA-Z0-9_-]+)(?P(>|<|=|~).+)?" +GIT_RE = r"git\+(?Phttps://github.com/([a-z-_0-9A-Z]+\/[a-z-_0-9A-Z]+)\.git)@(?P.+)#egg=(?P.+)" + class JSONSerializable(ABC): """Interface for JSON-serializable objects.""" @@ -838,6 +841,28 @@ def _parse_version(version: Union[str, SpecifierSet]) -> SpecifierSet: """ return version if isinstance(version, SpecifierSet) else SpecifierSet(version) + @classmethod + def from_string(cls, string: str) -> "Dependency": + """Parse from string.""" + match = re.match(GIT_RE, string) + if match is not None: + data = match.groupdict() + return cls(name=data["name"], git=data["git"], ref=data["ref"]) + + match = re.match(PYPI_RE, string) + if match is None: + raise ValueError(f"Cannot parse the dependency string '{string}'") + + data = match.groupdict() + return Dependency( + name=data["name"], + version=( + SpecifierSet(data["version"]) + if data["version"] is not None + else SpecifierSet("") + ), + ) + @classmethod def from_json(cls, obj: Dict[str, Dict[str, str]]) -> "Dependency": """Parse a dependency object from a dictionary.""" diff --git a/aea/configurations/utils.py b/aea/configurations/utils.py index 59f30988cf..3f276a9015 100644 --- a/aea/configurations/utils.py +++ b/aea/configurations/utils.py @@ -80,7 +80,6 @@ def _( protocol_replacements = replacements.get(ComponentType.PROTOCOL, {}) connection_replacements = replacements.get(ComponentType.CONNECTION, {}) for protocol_id, connection_id in list(arg.default_routing.items()): - # update protocol (if replacements provides it) new_protocol_id = protocol_replacements.get(protocol_id, protocol_id) old_value = arg.default_routing.pop(protocol_id) diff --git a/aea/crypto/helpers.py b/aea/crypto/helpers.py index 33d7935596..9d14a3e225 100644 --- a/aea/crypto/helpers.py +++ b/aea/crypto/helpers.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,19 +18,13 @@ # # ------------------------------------------------------------------------------ """Module wrapping the helpers of public and private key cryptography.""" -import json import logging import os from pathlib import Path from typing import Dict, Optional, Union from aea.configurations.base import AgentConfig -from aea.configurations.constants import ( - ADDRESS, - MULTIKEY_FILENAME, - PRIVATE_KEY, - PRIVATE_KEY_PATH_SCHEMA, -) +from aea.configurations.constants import PRIVATE_KEY_PATH_SCHEMA from aea.crypto.registries import crypto_registry, make_crypto, make_faucet_api from aea.crypto.wallet import Wallet from aea.helpers.base import ensure_dir @@ -214,27 +208,3 @@ def hex_to_bytes_for_key(data: str) -> bytes: return bytes.fromhex(data) except ValueError as e: raise KeyIsIncorrect(str(e)) from e - - -def generate_multiple_keys( - n: int, - type_: str, - password: Optional[str] = None, - extra_entropy: Union[str, bytes, int] = "", - file: Optional[str] = None, -) -> None: - """Generate n key pairs.""" - - key_pairs = [] - for _ in range(n): - crypto = make_crypto(type_, extra_entropy=extra_entropy) - priv_key = ( - crypto.encrypt(password=password) - if password is not None - else crypto.private_key - ) - key_pairs.append({ADDRESS: crypto.address, PRIVATE_KEY: priv_key}) - - file = file or MULTIKEY_FILENAME - with open(file, mode="w", encoding="utf-8") as fp: - json.dump(obj=key_pairs, fp=fp, indent=2) diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 539d1a268a..8f333dcae5 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -130,6 +130,7 @@ def _remove_watcher(self, watcher: Future) -> None: @staticmethod def _watcher_result_callback(watcher: Future) -> Callable: """Create callback for watcher result.""" + # docstyle. def _callback(result: Any) -> None: if watcher.done(): # pragma: nocover diff --git a/aea/helpers/base.py b/aea/helpers/base.py index d0a861fd74..0594494d7a 100644 --- a/aea/helpers/base.py +++ b/aea/helpers/base.py @@ -371,7 +371,9 @@ def decorator(fn: Callable) -> Callable: def wrapper(*args: Any, **kwargs: Any) -> Callable: try: return fn(*args, **kwargs) - except Exception as e: # pylint: disable=broad-except # pragma: no cover # generic code + except ( + Exception # pylint: disable=broad-except + ) as e: # pragma: no cover # generic code if kwargs.get("raise_on_try", False): raise e if error_message: @@ -414,7 +416,9 @@ def wrapper(*args: Any, **kwargs: Any) -> Callable: for retry in range(number_of_retries): try: return fn(*args, **kwargs) - except Exception as e: # pylint: disable=broad-except # pragma: no cover # generic code + except ( + Exception # pylint: disable=broad-except + ) as e: # pragma: no cover # generic code if error_message: log(error_message.format(retry=retry + 1, error=e)) if delay: @@ -437,7 +441,9 @@ def exception_log_and_reraise(log_method: Callable, message: str) -> Generator: """ try: yield - except BaseException as e: # pylint: disable=broad-except # pragma: no cover # generic code + except ( + BaseException + ) as e: # pylint: disable=broad-except # pragma: no cover # generic code log_method(message.format(e)) raise @@ -518,7 +524,6 @@ def perform_dict_override( :param new_configuration: Configuration from which the method will perform the update """ for path in overrides[component_id]: - will_be_updated = updated_configuration[component_id] update = new_configuration[component_id] @@ -666,7 +671,9 @@ def __get__(self, instance: Any, _: Optional[Any] = None) -> Any: ) try: cache = instance.__dict__ - except AttributeError: # not all objects have __dict__ (e.g. class defines slots) + except ( + AttributeError + ): # not all objects have __dict__ (e.g. class defines slots) msg = ( f"No '__dict__' attribute on {type(instance).__name__!r} " f"instance to cache {self.attrname!r} property." diff --git a/aea/helpers/exec_timeout.py b/aea/helpers/exec_timeout.py index baf1bcf696..b2bfd6644f 100644 --- a/aea/helpers/exec_timeout.py +++ b/aea/helpers/exec_timeout.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -225,6 +225,7 @@ def _set_stopped_future(cls) -> None: @classmethod def _supervisor_event_loop(cls) -> None: """Start supervisor thread to execute asyncio task controlling execution time.""" + # pydocstyle: noqa # cause black reformats with pydocstyle conflict # noqa: E800 async def wait_stopped() -> None: cls._stopped_future = Future() diff --git a/aea/helpers/ipfs/__init__.py b/aea/helpers/ipfs/__init__.py index c9ce02a594..78f8884bf5 100644 --- a/aea/helpers/ipfs/__init__.py +++ b/aea/helpers/ipfs/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,10 +23,10 @@ # fix for ipfs hashes, preload protobuf classes with protobuf python implementation with _protobuf_python_implementation(): - from aea.helpers.ipfs.pb import ( # noqa: F401 # pylint: disable=import-outside-toplevel,unused-import + from aea.helpers.ipfs.pb import ( # type: ignore # noqa: F401 # pylint: disable=import-outside-toplevel,unused-import merkledag_pb2, unixfs_pb2, ) - from aea.helpers.ipfs.pb.merkledag_pb2 import ( # noqa: F401 # pylint: disable=import-outside-toplevel,unused-import + from aea.helpers.ipfs.pb.merkledag_pb2 import ( # type: ignore # noqa: F401 # pylint: disable=import-outside-toplevel,unused-import PBNode, ) diff --git a/aea/helpers/ipfs/base.py b/aea/helpers/ipfs/base.py index 4c0c6ea5b5..df78e090df 100644 --- a/aea/helpers/ipfs/base.py +++ b/aea/helpers/ipfs/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,6 +22,7 @@ import hashlib import io import os +import platform import re from pathlib import Path from typing import Any, Dict, Generator, Optional, Sized, Tuple, cast @@ -40,7 +41,17 @@ with _protobuf_python_implementation(): # pylint: disable=import-outside-toplevel from aea.helpers.ipfs.pb import merkledag_pb2, unixfs_pb2 - from aea.helpers.ipfs.pb.merkledag_pb2 import PBNode + from aea.helpers.ipfs.pb.merkledag_pb2 import PBNode # type: ignore + + +def _is_text(file_path: str) -> bool: + """Check if a file can be read as text or not.""" + try: + with open_file(file_path, "r") as f: + f.readline() + return True + except UnicodeDecodeError: + return False def _dos2unix(file_content: bytes) -> bytes: @@ -53,25 +64,15 @@ def _dos2unix(file_content: bytes) -> bytes: return re.sub(b"\r\n", b"\n", file_content, flags=re.M) -def _is_text(file_path: str) -> bool: - """Check if a file can be read as text or not.""" - try: - with open_file(file_path, "r") as f: - f.read() - return True - except UnicodeDecodeError: - return False - - def _read(file_path: str) -> bytes: - """Read a file, replacing Windows line endings if it is a text file.""" - is_text = _is_text(file_path) + """Read and verify the file is not empty.""" with open(file_path, "rb") as file: - file_b = file.read() - if is_text: - file_b = _dos2unix(file_b) - - return file_b + data = file.read() + if len(data) == 0: + raise ValueError(f"File cannot be empty: {file_path}") + if platform.system() == "Windows" and _is_text(file_path=file_path): + data = _dos2unix(data) + return data def chunks(data: Sized, size: int) -> Generator: @@ -179,7 +180,7 @@ def hash_directory( @staticmethod def create_link(link_hash: bytes, tsize: int, name: str) -> Any: """Create PBLink object.""" - link = merkledag_pb2.PBLink() + link = merkledag_pb2.PBLink() # type: ignore # pylint: disable=no-member link.Hash = link_hash link.Tsize = tsize link.Name = name @@ -192,9 +193,9 @@ def wrap_in_a_node(cls, link: Any) -> str: wrapper_node = PBNode() wrapper_node.Links.append(link) # type: ignore # pylint: disable=no-member - wrapper_node_data = unixfs_pb2.Data() + wrapper_node_data = unixfs_pb2.Data() # type: ignore # pylint: disable=no-member # type: ignore # pylint: disable=no-member - wrapper_node_data.Type = unixfs_pb2.Data.Directory + wrapper_node_data.Type = unixfs_pb2.Data.Directory # type: ignore wrapper_node.Data = wrapper_node_data.SerializeToString( deterministic=True ) # type: ignore # pylint: disable=no-member @@ -241,9 +242,9 @@ def _hash_directory_recursively(cls, root: Path) -> Dict: cls.create_link(child_hash, file_length, child_path.name) ) - root_node_data = unixfs_pb2.Data() + root_node_data = unixfs_pb2.Data() # type: ignore # pylint: disable=no-member # type: ignore # pylint: disable=no-member - root_node_data.Type = unixfs_pb2.Data.Directory + root_node_data.Type = unixfs_pb2.Data.Directory # type: ignore root_node.Data = root_node_data.SerializeToString( deterministic=True ) # type: ignore # pylint: disable=no-member @@ -263,7 +264,7 @@ def _hash_directory_recursively(cls, root: Path) -> Dict: def _make_unixfs_pb2(cls, data: bytes) -> bytes: if len(data) > cls.DEFAULT_CHUNK_SIZE: # pragma: nocover raise ValueError("Data is too big! use chunks!") - data_pb = unixfs_pb2.Data() # type: ignore + data_pb = unixfs_pb2.Data() # type: ignore # pylint: disable=no-member data_pb.Type = unixfs_pb2.Data.File # type: ignore # pylint: disable=no-member data_pb.Data = data data_pb.filesize = len(data) @@ -299,8 +300,8 @@ def _pb_serialize_bytes(cls, data: bytes) -> Tuple[bytes, int]: if len(data) > cls.DEFAULT_CHUNK_SIZE: content_size = 0 outer_node = PBNode() # type: ignore - data_pb = unixfs_pb2.Data() # type: ignore - data_pb.Type = unixfs_pb2.Data.File # type: ignore # pylint: disable=no-member + data_pb = unixfs_pb2.Data() # type: ignore # pylint: disable=no-member + data_pb.Type = unixfs_pb2.Data.File # type: ignore # pylint: disable=no-member data_pb.filesize = len(data) for chunk in chunks(data, cls.DEFAULT_CHUNK_SIZE): block = cls._pb_serialize_data(chunk) diff --git a/aea/helpers/ipfs/pb/merkledag_pb2.py b/aea/helpers/ipfs/pb/merkledag_pb2.py index e58b9a94c8..d64f04006b 100644 --- a/aea/helpers/ipfs/pb/merkledag_pb2.py +++ b/aea/helpers/ipfs/pb/merkledag_pb2.py @@ -1,188 +1,27 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: merkledag.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database - +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor.FileDescriptor( - name="merkledag.proto", - package="merkledag.pb", - syntax="proto2", - serialized_options=None, - serialized_pb=_b( - '\n\x0fmerkledag.proto\x12\x0cmerkledag.pb"3\n\x06PBLink\x12\x0c\n\x04Hash\x18\x01 \x01(\x0c\x12\x0c\n\x04Name\x18\x02 \x01(\t\x12\r\n\x05Tsize\x18\x03 \x01(\x04";\n\x06PBNode\x12#\n\x05Links\x18\x02 \x03(\x0b\x32\x14.merkledag.pb.PBLink\x12\x0c\n\x04\x44\x61ta\x18\x01 \x01(\x0c' - ), -) - - -_PBLINK = _descriptor.Descriptor( - name="PBLink", - full_name="merkledag.pb.PBLink", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="Hash", - full_name="merkledag.pb.PBLink.Hash", - index=0, - number=1, - type=12, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b(""), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="Name", - full_name="merkledag.pb.PBLink.Name", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="Tsize", - full_name="merkledag.pb.PBLink.Tsize", - index=2, - number=3, - type=4, - cpp_type=4, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto2", - extension_ranges=[], - oneofs=[], - serialized_start=33, - serialized_end=84, -) - - -_PBNODE = _descriptor.Descriptor( - name="PBNode", - full_name="merkledag.pb.PBNode", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="Links", - full_name="merkledag.pb.PBNode.Links", - index=0, - number=2, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="Data", - full_name="merkledag.pb.PBNode.Data", - index=1, - number=1, - type=12, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b(""), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto2", - extension_ranges=[], - oneofs=[], - serialized_start=86, - serialized_end=145, -) - -_PBNODE.fields_by_name["Links"].message_type = _PBLINK -DESCRIPTOR.message_types_by_name["PBLink"] = _PBLINK -DESCRIPTOR.message_types_by_name["PBNode"] = _PBNODE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -PBLink = _reflection.GeneratedProtocolMessageType( - "PBLink", - (_message.Message,), - dict( - DESCRIPTOR=_PBLINK, - __module__="merkledag_pb2" - # @@protoc_insertion_point(class_scope:merkledag.pb.PBLink) - ), -) -_sym_db.RegisterMessage(PBLink) -PBNode = _reflection.GeneratedProtocolMessageType( - "PBNode", - (_message.Message,), - dict( - DESCRIPTOR=_PBNODE, - __module__="merkledag_pb2" - # @@protoc_insertion_point(class_scope:merkledag.pb.PBNode) - ), -) -_sym_db.RegisterMessage(PBNode) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0fmerkledag.proto\x12\x0cmerkledag.pb\"3\n\x06PBLink\x12\x0c\n\x04Hash\x18\x01 \x01(\x0c\x12\x0c\n\x04Name\x18\x02 \x01(\t\x12\r\n\x05Tsize\x18\x03 \x01(\x04\";\n\x06PBNode\x12#\n\x05Links\x18\x02 \x03(\x0b\x32\x14.merkledag.pb.PBLink\x12\x0c\n\x04\x44\x61ta\x18\x01 \x01(\x0c') +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'merkledag_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_PBLINK']._serialized_start=33 + _globals['_PBLINK']._serialized_end=84 + _globals['_PBNODE']._serialized_start=86 + _globals['_PBNODE']._serialized_end=145 # @@protoc_insertion_point(module_scope) diff --git a/aea/helpers/ipfs/pb/unixfs_pb2.py b/aea/helpers/ipfs/pb/unixfs_pb2.py index 7388936f5a..394f454829 100644 --- a/aea/helpers/ipfs/pb/unixfs_pb2.py +++ b/aea/helpers/ipfs/pb/unixfs_pb2.py @@ -1,260 +1,29 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: unixfs.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database - +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor.FileDescriptor( - name="unixfs.proto", - package="unixfs.pb", - syntax="proto2", - serialized_options=None, - serialized_pb=_b( - '\n\x0cunixfs.proto\x12\tunixfs.pb"\xdc\x01\n\x04\x44\x61ta\x12&\n\x04Type\x18\x01 \x02(\x0e\x32\x18.unixfs.pb.Data.DataType\x12\x0c\n\x04\x44\x61ta\x18\x02 \x01(\x0c\x12\x10\n\x08\x66ilesize\x18\x03 \x01(\x04\x12\x12\n\nblocksizes\x18\x04 \x03(\x04\x12\x10\n\x08hashType\x18\x05 \x01(\x04\x12\x0e\n\x06\x66\x61nout\x18\x06 \x01(\x04"V\n\x08\x44\x61taType\x12\x07\n\x03Raw\x10\x00\x12\r\n\tDirectory\x10\x01\x12\x08\n\x04\x46ile\x10\x02\x12\x0c\n\x08Metadata\x10\x03\x12\x0b\n\x07Symlink\x10\x04\x12\r\n\tHAMTShard\x10\x05"\x1c\n\x08Metadata\x12\x10\n\x08MimeType\x18\x01 \x01(\t' - ), -) - - -_DATA_DATATYPE = _descriptor.EnumDescriptor( - name="DataType", - full_name="unixfs.pb.Data.DataType", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="Raw", index=0, number=0, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="Directory", index=1, number=1, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="File", index=2, number=2, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="Metadata", index=3, number=3, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="Symlink", index=4, number=4, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="HAMTShard", index=5, number=5, serialized_options=None, type=None - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=162, - serialized_end=248, -) -_sym_db.RegisterEnumDescriptor(_DATA_DATATYPE) - - -_DATA = _descriptor.Descriptor( - name="Data", - full_name="unixfs.pb.Data", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="Type", - full_name="unixfs.pb.Data.Type", - index=0, - number=1, - type=14, - cpp_type=8, - label=2, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="Data", - full_name="unixfs.pb.Data.Data", - index=1, - number=2, - type=12, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b(""), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="filesize", - full_name="unixfs.pb.Data.filesize", - index=2, - number=3, - type=4, - cpp_type=4, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="blocksizes", - full_name="unixfs.pb.Data.blocksizes", - index=3, - number=4, - type=4, - cpp_type=4, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="hashType", - full_name="unixfs.pb.Data.hashType", - index=4, - number=5, - type=4, - cpp_type=4, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="fanout", - full_name="unixfs.pb.Data.fanout", - index=5, - number=6, - type=4, - cpp_type=4, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[ - _DATA_DATATYPE, - ], - serialized_options=None, - is_extendable=False, - syntax="proto2", - extension_ranges=[], - oneofs=[], - serialized_start=28, - serialized_end=248, -) - - -_METADATA = _descriptor.Descriptor( - name="Metadata", - full_name="unixfs.pb.Metadata", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="MimeType", - full_name="unixfs.pb.Metadata.MimeType", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto2", - extension_ranges=[], - oneofs=[], - serialized_start=250, - serialized_end=278, -) - -_DATA.fields_by_name["Type"].enum_type = _DATA_DATATYPE -_DATA_DATATYPE.containing_type = _DATA -DESCRIPTOR.message_types_by_name["Data"] = _DATA -DESCRIPTOR.message_types_by_name["Metadata"] = _METADATA -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Data = _reflection.GeneratedProtocolMessageType( - "Data", - (_message.Message,), - dict( - DESCRIPTOR=_DATA, - __module__="unixfs_pb2" - # @@protoc_insertion_point(class_scope:unixfs.pb.Data) - ), -) -_sym_db.RegisterMessage(Data) -Metadata = _reflection.GeneratedProtocolMessageType( - "Metadata", - (_message.Message,), - dict( - DESCRIPTOR=_METADATA, - __module__="unixfs_pb2" - # @@protoc_insertion_point(class_scope:unixfs.pb.Metadata) - ), -) -_sym_db.RegisterMessage(Metadata) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cunixfs.proto\x12\tunixfs.pb\"\xdc\x01\n\x04\x44\x61ta\x12&\n\x04Type\x18\x01 \x02(\x0e\x32\x18.unixfs.pb.Data.DataType\x12\x0c\n\x04\x44\x61ta\x18\x02 \x01(\x0c\x12\x10\n\x08\x66ilesize\x18\x03 \x01(\x04\x12\x12\n\nblocksizes\x18\x04 \x03(\x04\x12\x10\n\x08hashType\x18\x05 \x01(\x04\x12\x0e\n\x06\x66\x61nout\x18\x06 \x01(\x04\"V\n\x08\x44\x61taType\x12\x07\n\x03Raw\x10\x00\x12\r\n\tDirectory\x10\x01\x12\x08\n\x04\x46ile\x10\x02\x12\x0c\n\x08Metadata\x10\x03\x12\x0b\n\x07Symlink\x10\x04\x12\r\n\tHAMTShard\x10\x05\"\x1c\n\x08Metadata\x12\x10\n\x08MimeType\x18\x01 \x01(\t') +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'unixfs_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_DATA']._serialized_start=28 + _globals['_DATA']._serialized_end=248 + _globals['_DATA_DATATYPE']._serialized_start=162 + _globals['_DATA_DATATYPE']._serialized_end=248 + _globals['_METADATA']._serialized_start=250 + _globals['_METADATA']._serialized_end=278 # @@protoc_insertion_point(module_scope) diff --git a/aea/helpers/multiaddr/base.py b/aea/helpers/multiaddr/base.py index 46279589f6..56fd1946cb 100644 --- a/aea/helpers/multiaddr/base.py +++ b/aea/helpers/multiaddr/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,7 +27,7 @@ import multihash # type: ignore from ecdsa import VerifyingKey, curves, keys -from aea.helpers.multiaddr.crypto_pb2 import KeyType, PublicKey +from aea.helpers.multiaddr.crypto_pb2 import KeyType, PublicKey # type: ignore # NOTE: diff --git a/aea/helpers/multiaddr/crypto_pb2.py b/aea/helpers/multiaddr/crypto_pb2.py index 9094243b4c..e8d43c6bdd 100644 --- a/aea/helpers/multiaddr/crypto_pb2.py +++ b/aea/helpers/multiaddr/crypto_pb2.py @@ -1,205 +1,29 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: libp2p/crypto/pb/crypto.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) -from google.protobuf.internal import enum_type_wrapper +# source: crypto.proto +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database - +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor.FileDescriptor( - name="libp2p/crypto/pb/crypto.proto", - package="crypto.pb", - syntax="proto2", - serialized_options=None, - serialized_pb=_b( - '\n\x1dlibp2p/crypto/pb/crypto.proto\x12\tcrypto.pb"?\n\tPublicKey\x12$\n\x08key_type\x18\x01 \x02(\x0e\x32\x12.crypto.pb.KeyType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x02(\x0c"@\n\nPrivateKey\x12$\n\x08key_type\x18\x01 \x02(\x0e\x32\x12.crypto.pb.KeyType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x02(\x0c*9\n\x07KeyType\x12\x07\n\x03RSA\x10\x00\x12\x0b\n\x07\x45\x64\x32\x35\x35\x31\x39\x10\x01\x12\r\n\tSecp256k1\x10\x02\x12\t\n\x05\x45\x43\x44SA\x10\x03' - ), -) - -_KEYTYPE = _descriptor.EnumDescriptor( - name="KeyType", - full_name="crypto.pb.KeyType", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="RSA", index=0, number=0, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="Ed25519", index=1, number=1, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="Secp256k1", index=2, number=2, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="ECDSA", index=3, number=3, serialized_options=None, type=None - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=175, - serialized_end=232, -) -_sym_db.RegisterEnumDescriptor(_KEYTYPE) - -KeyType = enum_type_wrapper.EnumTypeWrapper(_KEYTYPE) -RSA = 0 -Ed25519 = 1 -Secp256k1 = 2 -ECDSA = 3 - - -_PUBLICKEY = _descriptor.Descriptor( - name="PublicKey", - full_name="crypto.pb.PublicKey", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="key_type", - full_name="crypto.pb.PublicKey.key_type", - index=0, - number=1, - type=14, - cpp_type=8, - label=2, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="data", - full_name="crypto.pb.PublicKey.data", - index=1, - number=2, - type=12, - cpp_type=9, - label=2, - has_default_value=False, - default_value=_b(""), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto2", - extension_ranges=[], - oneofs=[], - serialized_start=44, - serialized_end=107, -) - - -_PRIVATEKEY = _descriptor.Descriptor( - name="PrivateKey", - full_name="crypto.pb.PrivateKey", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="key_type", - full_name="crypto.pb.PrivateKey.key_type", - index=0, - number=1, - type=14, - cpp_type=8, - label=2, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="data", - full_name="crypto.pb.PrivateKey.data", - index=1, - number=2, - type=12, - cpp_type=9, - label=2, - has_default_value=False, - default_value=_b(""), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto2", - extension_ranges=[], - oneofs=[], - serialized_start=109, - serialized_end=173, -) - -_PUBLICKEY.fields_by_name["key_type"].enum_type = _KEYTYPE -_PRIVATEKEY.fields_by_name["key_type"].enum_type = _KEYTYPE -DESCRIPTOR.message_types_by_name["PublicKey"] = _PUBLICKEY -DESCRIPTOR.message_types_by_name["PrivateKey"] = _PRIVATEKEY -DESCRIPTOR.enum_types_by_name["KeyType"] = _KEYTYPE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -PublicKey = _reflection.GeneratedProtocolMessageType( - "PublicKey", - (_message.Message,), - { - "DESCRIPTOR": _PUBLICKEY, - "__module__": "libp2p.crypto.pb.crypto_pb2" - # @@protoc_insertion_point(class_scope:crypto.pb.PublicKey) - }, -) -_sym_db.RegisterMessage(PublicKey) -PrivateKey = _reflection.GeneratedProtocolMessageType( - "PrivateKey", - (_message.Message,), - { - "DESCRIPTOR": _PRIVATEKEY, - "__module__": "libp2p.crypto.pb.crypto_pb2" - # @@protoc_insertion_point(class_scope:crypto.pb.PrivateKey) - }, -) -_sym_db.RegisterMessage(PrivateKey) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63rypto.proto\x12\tcrypto.pb\"?\n\tPublicKey\x12$\n\x08key_type\x18\x01 \x02(\x0e\x32\x12.crypto.pb.KeyType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x02(\x0c\"@\n\nPrivateKey\x12$\n\x08key_type\x18\x01 \x02(\x0e\x32\x12.crypto.pb.KeyType\x12\x0c\n\x04\x64\x61ta\x18\x02 \x02(\x0c*9\n\x07KeyType\x12\x07\n\x03RSA\x10\x00\x12\x0b\n\x07\x45\x64\x32\x35\x35\x31\x39\x10\x01\x12\r\n\tSecp256k1\x10\x02\x12\t\n\x05\x45\x43\x44SA\x10\x03') +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'crypto_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_KEYTYPE']._serialized_start=158 + _globals['_KEYTYPE']._serialized_end=215 + _globals['_PUBLICKEY']._serialized_start=27 + _globals['_PUBLICKEY']._serialized_end=90 + _globals['_PRIVATEKEY']._serialized_start=92 + _globals['_PRIVATEKEY']._serialized_end=156 # @@protoc_insertion_point(module_scope) diff --git a/aea/helpers/multiple_executor.py b/aea/helpers/multiple_executor.py index 320234842a..c4612f25b0 100644 --- a/aea/helpers/multiple_executor.py +++ b/aea/helpers/multiple_executor.py @@ -218,7 +218,9 @@ async def wait_future(future: asyncio.futures.Future) -> None: _default_logger.exception("KeyboardInterrupt in task!") if not skip_exceptions: raise - except Exception as e: # pylint: disable=broad-except # handle any exception with own code. + except ( + Exception # pylint: disable=broad-except + ) as e: # handle any exception with own code. _default_logger.exception("Exception in task!") if not skip_exceptions: await self._handle_exception( diff --git a/aea/helpers/profiling.py b/aea/helpers/profiling.py index 69cc9be470..b5d996cecc 100644 --- a/aea/helpers/profiling.py +++ b/aea/helpers/profiling.py @@ -46,7 +46,6 @@ _default_logger = logging.getLogger(__file__) if platform.system() == "Windows": # pragma: nocover - import win32process # type: ignore # pylint: disable=import-error,import-outside-toplevel WIN32_PROCESS_TIMES_TICKS_PER_SECOND = 1e7 diff --git a/aea/helpers/search/models_pb2.py b/aea/helpers/search/models_pb2.py index 055bcb6439..e120cb1ac4 100644 --- a/aea/helpers/search/models_pb2.py +++ b/aea/helpers/search/models_pb2.py @@ -1,2286 +1,84 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: models.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database - +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor.FileDescriptor( - name="models.proto", - package="aea.helpers.search.models", - syntax="proto3", - serialized_options=b"H\001", - serialized_pb=b'\n\x0cmodels.proto\x12\x19\x61\x65\x61.helpers.search.models"\xc1\x19\n\x05Query\x1a\xc0\x01\n\tAttribute\x12\x0c\n\x04name\x18\x01 \x01(\t\x12=\n\x04type\x18\x02 \x01(\x0e\x32/.aea.helpers.search.models.Query.Attribute.Type\x12\x10\n\x08required\x18\x03 \x01(\x08\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t"?\n\x04Type\x12\n\n\x06\x44OUBLE\x10\x00\x12\x07\n\x03INT\x10\x01\x12\x08\n\x04\x42OOL\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0c\n\x08LOCATION\x10\x04\x1an\n\tDataModel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\nattributes\x18\x02 \x03(\x0b\x32*.aea.helpers.search.models.Query.Attribute\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x1a$\n\x08Location\x12\x0b\n\x03lon\x18\x01 \x01(\x01\x12\x0b\n\x03lat\x18\x02 \x01(\x01\x1a\x99\x01\n\x05Value\x12\x10\n\x06string\x18\x01 \x01(\tH\x00\x12\x10\n\x06\x64ouble\x18\x02 \x01(\x01H\x00\x12\x11\n\x07\x62oolean\x18\x03 \x01(\x08H\x00\x12\x11\n\x07integer\x18\x04 \x01(\x03H\x00\x12=\n\x08location\x18\x05 \x01(\x0b\x32).aea.helpers.search.models.Query.LocationH\x00\x42\x07\n\x05value\x1aN\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.aea.helpers.search.models.Query.Value\x1a\x80\x01\n\x08Instance\x12\x39\n\x05model\x18\x01 \x01(\x0b\x32*.aea.helpers.search.models.Query.DataModel\x12\x39\n\x06values\x18\x02 \x03(\x0b\x32).aea.helpers.search.models.Query.KeyValue\x1a+\n\nStringPair\x12\r\n\x05\x66irst\x18\x01 \x01(\t\x12\x0e\n\x06second\x18\x02 \x01(\t\x1a(\n\x07IntPair\x12\r\n\x05\x66irst\x18\x01 \x01(\x03\x12\x0e\n\x06second\x18\x02 \x01(\x03\x1a+\n\nDoublePair\x12\r\n\x05\x66irst\x18\x01 \x01(\x01\x12\x0e\n\x06second\x18\x02 \x01(\x01\x1a\x83\x01\n\x0cLocationPair\x12\x38\n\x05\x66irst\x18\x01 \x01(\x0b\x32).aea.helpers.search.models.Query.Location\x12\x39\n\x06second\x18\x02 \x01(\x0b\x32).aea.helpers.search.models.Query.Location\x1a\xa1\x02\n\x05Range\x12\x42\n\x0bstring_pair\x18\x01 \x01(\x0b\x32+.aea.helpers.search.models.Query.StringPairH\x00\x12@\n\x0cinteger_pair\x18\x02 \x01(\x0b\x32(.aea.helpers.search.models.Query.IntPairH\x00\x12\x42\n\x0b\x64ouble_pair\x18\x03 \x01(\x0b\x32+.aea.helpers.search.models.Query.DoublePairH\x00\x12\x46\n\rlocation_pair\x18\x04 \x01(\x0b\x32-.aea.helpers.search.models.Query.LocationPairH\x00\x42\x06\n\x04pair\x1aW\n\x08\x44istance\x12\x39\n\x06\x63\x65nter\x18\x01 \x01(\x0b\x32).aea.helpers.search.models.Query.Location\x12\x10\n\x08\x64istance\x18\x02 \x01(\x01\x1a\xca\x01\n\x08Relation\x12\x44\n\x08operator\x18\x01 \x01(\x0e\x32\x32.aea.helpers.search.models.Query.Relation.Operator\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.aea.helpers.search.models.Query.Value"A\n\x08Operator\x12\x06\n\x02\x45Q\x10\x00\x12\x06\n\x02LT\x10\x01\x12\x08\n\x04LTEQ\x10\x02\x12\x06\n\x02GT\x10\x03\x12\x08\n\x04GTEQ\x10\x04\x12\t\n\x05NOTEQ\x10\x05\x1a\xca\x05\n\x03Set\x12?\n\x08operator\x18\x01 \x01(\x0e\x32-.aea.helpers.search.models.Query.Set.Operator\x12;\n\x06values\x18\x02 \x01(\x0b\x32+.aea.helpers.search.models.Query.Set.Values\x1a\xa5\x04\n\x06Values\x12\x45\n\x06string\x18\x01 \x01(\x0b\x32\x33.aea.helpers.search.models.Query.Set.Values.StringsH\x00\x12\x45\n\x06\x64ouble\x18\x02 \x01(\x0b\x32\x33.aea.helpers.search.models.Query.Set.Values.DoublesH\x00\x12\x44\n\x07\x62oolean\x18\x03 \x01(\x0b\x32\x31.aea.helpers.search.models.Query.Set.Values.BoolsH\x00\x12\x43\n\x07integer\x18\x04 \x01(\x0b\x32\x30.aea.helpers.search.models.Query.Set.Values.IntsH\x00\x12I\n\x08location\x18\x05 \x01(\x0b\x32\x35.aea.helpers.search.models.Query.Set.Values.LocationsH\x00\x1a\x16\n\x04Ints\x12\x0e\n\x06values\x18\x01 \x03(\x03\x1a\x19\n\x07\x44oubles\x12\x0e\n\x06values\x18\x01 \x03(\x01\x1a\x19\n\x07Strings\x12\x0e\n\x06values\x18\x01 \x03(\t\x1a\x17\n\x05\x42ools\x12\x0e\n\x06values\x18\x01 \x03(\x08\x1a\x46\n\tLocations\x12\x39\n\x06values\x18\x01 \x03(\x0b\x32).aea.helpers.search.models.Query.LocationB\x08\n\x06values"\x1d\n\x08Operator\x12\x06\n\x02IN\x10\x00\x12\t\n\x05NOTIN\x10\x01\x1a\xc3\x06\n\x0e\x43onstraintExpr\x12\x41\n\x03or_\x18\x01 \x01(\x0b\x32\x32.aea.helpers.search.models.Query.ConstraintExpr.OrH\x00\x12\x43\n\x04\x61nd_\x18\x02 \x01(\x0b\x32\x33.aea.helpers.search.models.Query.ConstraintExpr.AndH\x00\x12\x43\n\x04not_\x18\x03 \x01(\x0b\x32\x33.aea.helpers.search.models.Query.ConstraintExpr.NotH\x00\x12P\n\nconstraint\x18\x04 \x01(\x0b\x32:.aea.helpers.search.models.Query.ConstraintExpr.ConstraintH\x00\x1aI\n\x02Or\x12\x43\n\nexpression\x18\x01 \x03(\x0b\x32/.aea.helpers.search.models.Query.ConstraintExpr\x1aJ\n\x03\x41nd\x12\x43\n\nexpression\x18\x01 \x03(\x0b\x32/.aea.helpers.search.models.Query.ConstraintExpr\x1aJ\n\x03Not\x12\x43\n\nexpression\x18\x01 \x01(\x0b\x32/.aea.helpers.search.models.Query.ConstraintExpr\x1a\xa0\x02\n\nConstraint\x12\x16\n\x0e\x61ttribute_name\x18\x01 \x01(\t\x12\x34\n\x04set_\x18\x02 \x01(\x0b\x32$.aea.helpers.search.models.Query.SetH\x00\x12\x38\n\x06range_\x18\x03 \x01(\x0b\x32&.aea.helpers.search.models.Query.RangeH\x00\x12=\n\x08relation\x18\x04 \x01(\x0b\x32).aea.helpers.search.models.Query.RelationH\x00\x12=\n\x08\x64istance\x18\x05 \x01(\x0b\x32).aea.helpers.search.models.Query.DistanceH\x00\x42\x0c\n\nconstraintB\x0c\n\nexpression\x1a\x88\x01\n\x05Model\x12\x44\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32/.aea.helpers.search.models.Query.ConstraintExpr\x12\x39\n\x05model\x18\x02 \x01(\x0b\x32*.aea.helpers.search.models.Query.DataModelB\x02H\x01\x62\x06proto3', -) - - -_QUERY_ATTRIBUTE_TYPE = _descriptor.EnumDescriptor( - name="Type", - full_name="aea.helpers.search.models.Query.Attribute.Type", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="DOUBLE", index=0, number=0, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="INT", index=1, number=1, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="BOOL", index=2, number=2, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="STRING", index=3, number=3, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="LOCATION", index=4, number=4, serialized_options=None, type=None - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=183, - serialized_end=246, -) -_sym_db.RegisterEnumDescriptor(_QUERY_ATTRIBUTE_TYPE) - -_QUERY_RELATION_OPERATOR = _descriptor.EnumDescriptor( - name="Operator", - full_name="aea.helpers.search.models.Query.Relation.Operator", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="EQ", index=0, number=0, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="LT", index=1, number=1, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="LTEQ", index=2, number=2, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="GT", index=3, number=3, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="GTEQ", index=4, number=4, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="NOTEQ", index=5, number=5, serialized_options=None, type=None - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=1550, - serialized_end=1615, -) -_sym_db.RegisterEnumDescriptor(_QUERY_RELATION_OPERATOR) - -_QUERY_SET_OPERATOR = _descriptor.EnumDescriptor( - name="Operator", - full_name="aea.helpers.search.models.Query.Set.Operator", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="IN", index=0, number=0, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="NOTIN", index=1, number=1, serialized_options=None, type=None - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=2303, - serialized_end=2332, -) -_sym_db.RegisterEnumDescriptor(_QUERY_SET_OPERATOR) - - -_QUERY_ATTRIBUTE = _descriptor.Descriptor( - name="Attribute", - full_name="aea.helpers.search.models.Query.Attribute", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="aea.helpers.search.models.Query.Attribute.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="type", - full_name="aea.helpers.search.models.Query.Attribute.type", - index=1, - number=2, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="required", - full_name="aea.helpers.search.models.Query.Attribute.required", - index=2, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="aea.helpers.search.models.Query.Attribute.description", - index=3, - number=4, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[ - _QUERY_ATTRIBUTE_TYPE, - ], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=54, - serialized_end=246, -) - -_QUERY_DATAMODEL = _descriptor.Descriptor( - name="DataModel", - full_name="aea.helpers.search.models.Query.DataModel", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="aea.helpers.search.models.Query.DataModel.name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="attributes", - full_name="aea.helpers.search.models.Query.DataModel.attributes", - index=1, - number=2, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="description", - full_name="aea.helpers.search.models.Query.DataModel.description", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=248, - serialized_end=358, -) - -_QUERY_LOCATION = _descriptor.Descriptor( - name="Location", - full_name="aea.helpers.search.models.Query.Location", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="lon", - full_name="aea.helpers.search.models.Query.Location.lon", - index=0, - number=1, - type=1, - cpp_type=5, - label=1, - has_default_value=False, - default_value=float(0), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="lat", - full_name="aea.helpers.search.models.Query.Location.lat", - index=1, - number=2, - type=1, - cpp_type=5, - label=1, - has_default_value=False, - default_value=float(0), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=360, - serialized_end=396, -) - -_QUERY_VALUE = _descriptor.Descriptor( - name="Value", - full_name="aea.helpers.search.models.Query.Value", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="string", - full_name="aea.helpers.search.models.Query.Value.string", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="double", - full_name="aea.helpers.search.models.Query.Value.double", - index=1, - number=2, - type=1, - cpp_type=5, - label=1, - has_default_value=False, - default_value=float(0), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="boolean", - full_name="aea.helpers.search.models.Query.Value.boolean", - index=2, - number=3, - type=8, - cpp_type=7, - label=1, - has_default_value=False, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="integer", - full_name="aea.helpers.search.models.Query.Value.integer", - index=3, - number=4, - type=3, - cpp_type=2, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="location", - full_name="aea.helpers.search.models.Query.Value.location", - index=4, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="value", - full_name="aea.helpers.search.models.Query.Value.value", - index=0, - containing_type=None, - fields=[], - ), - ], - serialized_start=399, - serialized_end=552, -) - -_QUERY_KEYVALUE = _descriptor.Descriptor( - name="KeyValue", - full_name="aea.helpers.search.models.Query.KeyValue", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="key", - full_name="aea.helpers.search.models.Query.KeyValue.key", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="aea.helpers.search.models.Query.KeyValue.value", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=554, - serialized_end=632, -) - -_QUERY_INSTANCE = _descriptor.Descriptor( - name="Instance", - full_name="aea.helpers.search.models.Query.Instance", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="model", - full_name="aea.helpers.search.models.Query.Instance.model", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="values", - full_name="aea.helpers.search.models.Query.Instance.values", - index=1, - number=2, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=635, - serialized_end=763, -) - -_QUERY_STRINGPAIR = _descriptor.Descriptor( - name="StringPair", - full_name="aea.helpers.search.models.Query.StringPair", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="first", - full_name="aea.helpers.search.models.Query.StringPair.first", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="second", - full_name="aea.helpers.search.models.Query.StringPair.second", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=765, - serialized_end=808, -) - -_QUERY_INTPAIR = _descriptor.Descriptor( - name="IntPair", - full_name="aea.helpers.search.models.Query.IntPair", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="first", - full_name="aea.helpers.search.models.Query.IntPair.first", - index=0, - number=1, - type=3, - cpp_type=2, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="second", - full_name="aea.helpers.search.models.Query.IntPair.second", - index=1, - number=2, - type=3, - cpp_type=2, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=810, - serialized_end=850, -) - -_QUERY_DOUBLEPAIR = _descriptor.Descriptor( - name="DoublePair", - full_name="aea.helpers.search.models.Query.DoublePair", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="first", - full_name="aea.helpers.search.models.Query.DoublePair.first", - index=0, - number=1, - type=1, - cpp_type=5, - label=1, - has_default_value=False, - default_value=float(0), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="second", - full_name="aea.helpers.search.models.Query.DoublePair.second", - index=1, - number=2, - type=1, - cpp_type=5, - label=1, - has_default_value=False, - default_value=float(0), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=852, - serialized_end=895, -) - -_QUERY_LOCATIONPAIR = _descriptor.Descriptor( - name="LocationPair", - full_name="aea.helpers.search.models.Query.LocationPair", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="first", - full_name="aea.helpers.search.models.Query.LocationPair.first", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="second", - full_name="aea.helpers.search.models.Query.LocationPair.second", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=898, - serialized_end=1029, -) - -_QUERY_RANGE = _descriptor.Descriptor( - name="Range", - full_name="aea.helpers.search.models.Query.Range", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="string_pair", - full_name="aea.helpers.search.models.Query.Range.string_pair", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="integer_pair", - full_name="aea.helpers.search.models.Query.Range.integer_pair", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="double_pair", - full_name="aea.helpers.search.models.Query.Range.double_pair", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="location_pair", - full_name="aea.helpers.search.models.Query.Range.location_pair", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="pair", - full_name="aea.helpers.search.models.Query.Range.pair", - index=0, - containing_type=None, - fields=[], - ), - ], - serialized_start=1032, - serialized_end=1321, -) - -_QUERY_DISTANCE = _descriptor.Descriptor( - name="Distance", - full_name="aea.helpers.search.models.Query.Distance", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="center", - full_name="aea.helpers.search.models.Query.Distance.center", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="distance", - full_name="aea.helpers.search.models.Query.Distance.distance", - index=1, - number=2, - type=1, - cpp_type=5, - label=1, - has_default_value=False, - default_value=float(0), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1323, - serialized_end=1410, -) - -_QUERY_RELATION = _descriptor.Descriptor( - name="Relation", - full_name="aea.helpers.search.models.Query.Relation", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="operator", - full_name="aea.helpers.search.models.Query.Relation.operator", - index=0, - number=1, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="value", - full_name="aea.helpers.search.models.Query.Relation.value", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[ - _QUERY_RELATION_OPERATOR, - ], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1413, - serialized_end=1615, -) - -_QUERY_SET_VALUES_INTS = _descriptor.Descriptor( - name="Ints", - full_name="aea.helpers.search.models.Query.Set.Values.Ints", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="values", - full_name="aea.helpers.search.models.Query.Set.Values.Ints.values", - index=0, - number=1, - type=3, - cpp_type=2, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2118, - serialized_end=2140, -) - -_QUERY_SET_VALUES_DOUBLES = _descriptor.Descriptor( - name="Doubles", - full_name="aea.helpers.search.models.Query.Set.Values.Doubles", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="values", - full_name="aea.helpers.search.models.Query.Set.Values.Doubles.values", - index=0, - number=1, - type=1, - cpp_type=5, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2142, - serialized_end=2167, -) - -_QUERY_SET_VALUES_STRINGS = _descriptor.Descriptor( - name="Strings", - full_name="aea.helpers.search.models.Query.Set.Values.Strings", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="values", - full_name="aea.helpers.search.models.Query.Set.Values.Strings.values", - index=0, - number=1, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2169, - serialized_end=2194, -) - -_QUERY_SET_VALUES_BOOLS = _descriptor.Descriptor( - name="Bools", - full_name="aea.helpers.search.models.Query.Set.Values.Bools", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="values", - full_name="aea.helpers.search.models.Query.Set.Values.Bools.values", - index=0, - number=1, - type=8, - cpp_type=7, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2196, - serialized_end=2219, -) - -_QUERY_SET_VALUES_LOCATIONS = _descriptor.Descriptor( - name="Locations", - full_name="aea.helpers.search.models.Query.Set.Values.Locations", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="values", - full_name="aea.helpers.search.models.Query.Set.Values.Locations.values", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2221, - serialized_end=2291, -) - -_QUERY_SET_VALUES = _descriptor.Descriptor( - name="Values", - full_name="aea.helpers.search.models.Query.Set.Values", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="string", - full_name="aea.helpers.search.models.Query.Set.Values.string", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="double", - full_name="aea.helpers.search.models.Query.Set.Values.double", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="boolean", - full_name="aea.helpers.search.models.Query.Set.Values.boolean", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="integer", - full_name="aea.helpers.search.models.Query.Set.Values.integer", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="location", - full_name="aea.helpers.search.models.Query.Set.Values.location", - index=4, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[ - _QUERY_SET_VALUES_INTS, - _QUERY_SET_VALUES_DOUBLES, - _QUERY_SET_VALUES_STRINGS, - _QUERY_SET_VALUES_BOOLS, - _QUERY_SET_VALUES_LOCATIONS, - ], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="values", - full_name="aea.helpers.search.models.Query.Set.Values.values", - index=0, - containing_type=None, - fields=[], - ), - ], - serialized_start=1752, - serialized_end=2301, -) - -_QUERY_SET = _descriptor.Descriptor( - name="Set", - full_name="aea.helpers.search.models.Query.Set", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="operator", - full_name="aea.helpers.search.models.Query.Set.operator", - index=0, - number=1, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="values", - full_name="aea.helpers.search.models.Query.Set.values", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[ - _QUERY_SET_VALUES, - ], - enum_types=[ - _QUERY_SET_OPERATOR, - ], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=1618, - serialized_end=2332, -) - -_QUERY_CONSTRAINTEXPR_OR = _descriptor.Descriptor( - name="Or", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Or", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="expression", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Or.expression", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2640, - serialized_end=2713, -) - -_QUERY_CONSTRAINTEXPR_AND = _descriptor.Descriptor( - name="And", - full_name="aea.helpers.search.models.Query.ConstraintExpr.And", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="expression", - full_name="aea.helpers.search.models.Query.ConstraintExpr.And.expression", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2715, - serialized_end=2789, -) - -_QUERY_CONSTRAINTEXPR_NOT = _descriptor.Descriptor( - name="Not", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Not", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="expression", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Not.expression", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=2791, - serialized_end=2865, -) - -_QUERY_CONSTRAINTEXPR_CONSTRAINT = _descriptor.Descriptor( - name="Constraint", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Constraint", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="attribute_name", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Constraint.attribute_name", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="set_", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Constraint.set_", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="range_", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Constraint.range_", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="relation", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Constraint.relation", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="distance", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Constraint.distance", - index=4, - number=5, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="constraint", - full_name="aea.helpers.search.models.Query.ConstraintExpr.Constraint.constraint", - index=0, - containing_type=None, - fields=[], - ), - ], - serialized_start=2868, - serialized_end=3156, -) - -_QUERY_CONSTRAINTEXPR = _descriptor.Descriptor( - name="ConstraintExpr", - full_name="aea.helpers.search.models.Query.ConstraintExpr", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="or_", - full_name="aea.helpers.search.models.Query.ConstraintExpr.or_", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="and_", - full_name="aea.helpers.search.models.Query.ConstraintExpr.and_", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="not_", - full_name="aea.helpers.search.models.Query.ConstraintExpr.not_", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="constraint", - full_name="aea.helpers.search.models.Query.ConstraintExpr.constraint", - index=3, - number=4, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[ - _QUERY_CONSTRAINTEXPR_OR, - _QUERY_CONSTRAINTEXPR_AND, - _QUERY_CONSTRAINTEXPR_NOT, - _QUERY_CONSTRAINTEXPR_CONSTRAINT, - ], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="expression", - full_name="aea.helpers.search.models.Query.ConstraintExpr.expression", - index=0, - containing_type=None, - fields=[], - ), - ], - serialized_start=2335, - serialized_end=3170, -) - -_QUERY_MODEL = _descriptor.Descriptor( - name="Model", - full_name="aea.helpers.search.models.Query.Model", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="constraints", - full_name="aea.helpers.search.models.Query.Model.constraints", - index=0, - number=1, - type=11, - cpp_type=10, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="model", - full_name="aea.helpers.search.models.Query.Model.model", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=3173, - serialized_end=3309, -) - -_QUERY = _descriptor.Descriptor( - name="Query", - full_name="aea.helpers.search.models.Query", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[], - extensions=[], - nested_types=[ - _QUERY_ATTRIBUTE, - _QUERY_DATAMODEL, - _QUERY_LOCATION, - _QUERY_VALUE, - _QUERY_KEYVALUE, - _QUERY_INSTANCE, - _QUERY_STRINGPAIR, - _QUERY_INTPAIR, - _QUERY_DOUBLEPAIR, - _QUERY_LOCATIONPAIR, - _QUERY_RANGE, - _QUERY_DISTANCE, - _QUERY_RELATION, - _QUERY_SET, - _QUERY_CONSTRAINTEXPR, - _QUERY_MODEL, - ], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=44, - serialized_end=3309, -) - -_QUERY_ATTRIBUTE.fields_by_name["type"].enum_type = _QUERY_ATTRIBUTE_TYPE -_QUERY_ATTRIBUTE.containing_type = _QUERY -_QUERY_ATTRIBUTE_TYPE.containing_type = _QUERY_ATTRIBUTE -_QUERY_DATAMODEL.fields_by_name["attributes"].message_type = _QUERY_ATTRIBUTE -_QUERY_DATAMODEL.containing_type = _QUERY -_QUERY_LOCATION.containing_type = _QUERY -_QUERY_VALUE.fields_by_name["location"].message_type = _QUERY_LOCATION -_QUERY_VALUE.containing_type = _QUERY -_QUERY_VALUE.oneofs_by_name["value"].fields.append( - _QUERY_VALUE.fields_by_name["string"] -) -_QUERY_VALUE.fields_by_name["string"].containing_oneof = _QUERY_VALUE.oneofs_by_name[ - "value" -] -_QUERY_VALUE.oneofs_by_name["value"].fields.append( - _QUERY_VALUE.fields_by_name["double"] -) -_QUERY_VALUE.fields_by_name["double"].containing_oneof = _QUERY_VALUE.oneofs_by_name[ - "value" -] -_QUERY_VALUE.oneofs_by_name["value"].fields.append( - _QUERY_VALUE.fields_by_name["boolean"] -) -_QUERY_VALUE.fields_by_name["boolean"].containing_oneof = _QUERY_VALUE.oneofs_by_name[ - "value" -] -_QUERY_VALUE.oneofs_by_name["value"].fields.append( - _QUERY_VALUE.fields_by_name["integer"] -) -_QUERY_VALUE.fields_by_name["integer"].containing_oneof = _QUERY_VALUE.oneofs_by_name[ - "value" -] -_QUERY_VALUE.oneofs_by_name["value"].fields.append( - _QUERY_VALUE.fields_by_name["location"] -) -_QUERY_VALUE.fields_by_name["location"].containing_oneof = _QUERY_VALUE.oneofs_by_name[ - "value" -] -_QUERY_KEYVALUE.fields_by_name["value"].message_type = _QUERY_VALUE -_QUERY_KEYVALUE.containing_type = _QUERY -_QUERY_INSTANCE.fields_by_name["model"].message_type = _QUERY_DATAMODEL -_QUERY_INSTANCE.fields_by_name["values"].message_type = _QUERY_KEYVALUE -_QUERY_INSTANCE.containing_type = _QUERY -_QUERY_STRINGPAIR.containing_type = _QUERY -_QUERY_INTPAIR.containing_type = _QUERY -_QUERY_DOUBLEPAIR.containing_type = _QUERY -_QUERY_LOCATIONPAIR.fields_by_name["first"].message_type = _QUERY_LOCATION -_QUERY_LOCATIONPAIR.fields_by_name["second"].message_type = _QUERY_LOCATION -_QUERY_LOCATIONPAIR.containing_type = _QUERY -_QUERY_RANGE.fields_by_name["string_pair"].message_type = _QUERY_STRINGPAIR -_QUERY_RANGE.fields_by_name["integer_pair"].message_type = _QUERY_INTPAIR -_QUERY_RANGE.fields_by_name["double_pair"].message_type = _QUERY_DOUBLEPAIR -_QUERY_RANGE.fields_by_name["location_pair"].message_type = _QUERY_LOCATIONPAIR -_QUERY_RANGE.containing_type = _QUERY -_QUERY_RANGE.oneofs_by_name["pair"].fields.append( - _QUERY_RANGE.fields_by_name["string_pair"] -) -_QUERY_RANGE.fields_by_name[ - "string_pair" -].containing_oneof = _QUERY_RANGE.oneofs_by_name["pair"] -_QUERY_RANGE.oneofs_by_name["pair"].fields.append( - _QUERY_RANGE.fields_by_name["integer_pair"] -) -_QUERY_RANGE.fields_by_name[ - "integer_pair" -].containing_oneof = _QUERY_RANGE.oneofs_by_name["pair"] -_QUERY_RANGE.oneofs_by_name["pair"].fields.append( - _QUERY_RANGE.fields_by_name["double_pair"] -) -_QUERY_RANGE.fields_by_name[ - "double_pair" -].containing_oneof = _QUERY_RANGE.oneofs_by_name["pair"] -_QUERY_RANGE.oneofs_by_name["pair"].fields.append( - _QUERY_RANGE.fields_by_name["location_pair"] -) -_QUERY_RANGE.fields_by_name[ - "location_pair" -].containing_oneof = _QUERY_RANGE.oneofs_by_name["pair"] -_QUERY_DISTANCE.fields_by_name["center"].message_type = _QUERY_LOCATION -_QUERY_DISTANCE.containing_type = _QUERY -_QUERY_RELATION.fields_by_name["operator"].enum_type = _QUERY_RELATION_OPERATOR -_QUERY_RELATION.fields_by_name["value"].message_type = _QUERY_VALUE -_QUERY_RELATION.containing_type = _QUERY -_QUERY_RELATION_OPERATOR.containing_type = _QUERY_RELATION -_QUERY_SET_VALUES_INTS.containing_type = _QUERY_SET_VALUES -_QUERY_SET_VALUES_DOUBLES.containing_type = _QUERY_SET_VALUES -_QUERY_SET_VALUES_STRINGS.containing_type = _QUERY_SET_VALUES -_QUERY_SET_VALUES_BOOLS.containing_type = _QUERY_SET_VALUES -_QUERY_SET_VALUES_LOCATIONS.fields_by_name["values"].message_type = _QUERY_LOCATION -_QUERY_SET_VALUES_LOCATIONS.containing_type = _QUERY_SET_VALUES -_QUERY_SET_VALUES.fields_by_name["string"].message_type = _QUERY_SET_VALUES_STRINGS -_QUERY_SET_VALUES.fields_by_name["double"].message_type = _QUERY_SET_VALUES_DOUBLES -_QUERY_SET_VALUES.fields_by_name["boolean"].message_type = _QUERY_SET_VALUES_BOOLS -_QUERY_SET_VALUES.fields_by_name["integer"].message_type = _QUERY_SET_VALUES_INTS -_QUERY_SET_VALUES.fields_by_name["location"].message_type = _QUERY_SET_VALUES_LOCATIONS -_QUERY_SET_VALUES.containing_type = _QUERY_SET -_QUERY_SET_VALUES.oneofs_by_name["values"].fields.append( - _QUERY_SET_VALUES.fields_by_name["string"] -) -_QUERY_SET_VALUES.fields_by_name[ - "string" -].containing_oneof = _QUERY_SET_VALUES.oneofs_by_name["values"] -_QUERY_SET_VALUES.oneofs_by_name["values"].fields.append( - _QUERY_SET_VALUES.fields_by_name["double"] -) -_QUERY_SET_VALUES.fields_by_name[ - "double" -].containing_oneof = _QUERY_SET_VALUES.oneofs_by_name["values"] -_QUERY_SET_VALUES.oneofs_by_name["values"].fields.append( - _QUERY_SET_VALUES.fields_by_name["boolean"] -) -_QUERY_SET_VALUES.fields_by_name[ - "boolean" -].containing_oneof = _QUERY_SET_VALUES.oneofs_by_name["values"] -_QUERY_SET_VALUES.oneofs_by_name["values"].fields.append( - _QUERY_SET_VALUES.fields_by_name["integer"] -) -_QUERY_SET_VALUES.fields_by_name[ - "integer" -].containing_oneof = _QUERY_SET_VALUES.oneofs_by_name["values"] -_QUERY_SET_VALUES.oneofs_by_name["values"].fields.append( - _QUERY_SET_VALUES.fields_by_name["location"] -) -_QUERY_SET_VALUES.fields_by_name[ - "location" -].containing_oneof = _QUERY_SET_VALUES.oneofs_by_name["values"] -_QUERY_SET.fields_by_name["operator"].enum_type = _QUERY_SET_OPERATOR -_QUERY_SET.fields_by_name["values"].message_type = _QUERY_SET_VALUES -_QUERY_SET.containing_type = _QUERY -_QUERY_SET_OPERATOR.containing_type = _QUERY_SET -_QUERY_CONSTRAINTEXPR_OR.fields_by_name[ - "expression" -].message_type = _QUERY_CONSTRAINTEXPR -_QUERY_CONSTRAINTEXPR_OR.containing_type = _QUERY_CONSTRAINTEXPR -_QUERY_CONSTRAINTEXPR_AND.fields_by_name[ - "expression" -].message_type = _QUERY_CONSTRAINTEXPR -_QUERY_CONSTRAINTEXPR_AND.containing_type = _QUERY_CONSTRAINTEXPR -_QUERY_CONSTRAINTEXPR_NOT.fields_by_name[ - "expression" -].message_type = _QUERY_CONSTRAINTEXPR -_QUERY_CONSTRAINTEXPR_NOT.containing_type = _QUERY_CONSTRAINTEXPR -_QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name["set_"].message_type = _QUERY_SET -_QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name["range_"].message_type = _QUERY_RANGE -_QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name[ - "relation" -].message_type = _QUERY_RELATION -_QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name[ - "distance" -].message_type = _QUERY_DISTANCE -_QUERY_CONSTRAINTEXPR_CONSTRAINT.containing_type = _QUERY_CONSTRAINTEXPR -_QUERY_CONSTRAINTEXPR_CONSTRAINT.oneofs_by_name["constraint"].fields.append( - _QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name["set_"] -) -_QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name[ - "set_" -].containing_oneof = _QUERY_CONSTRAINTEXPR_CONSTRAINT.oneofs_by_name["constraint"] -_QUERY_CONSTRAINTEXPR_CONSTRAINT.oneofs_by_name["constraint"].fields.append( - _QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name["range_"] -) -_QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name[ - "range_" -].containing_oneof = _QUERY_CONSTRAINTEXPR_CONSTRAINT.oneofs_by_name["constraint"] -_QUERY_CONSTRAINTEXPR_CONSTRAINT.oneofs_by_name["constraint"].fields.append( - _QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name["relation"] -) -_QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name[ - "relation" -].containing_oneof = _QUERY_CONSTRAINTEXPR_CONSTRAINT.oneofs_by_name["constraint"] -_QUERY_CONSTRAINTEXPR_CONSTRAINT.oneofs_by_name["constraint"].fields.append( - _QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name["distance"] -) -_QUERY_CONSTRAINTEXPR_CONSTRAINT.fields_by_name[ - "distance" -].containing_oneof = _QUERY_CONSTRAINTEXPR_CONSTRAINT.oneofs_by_name["constraint"] -_QUERY_CONSTRAINTEXPR.fields_by_name["or_"].message_type = _QUERY_CONSTRAINTEXPR_OR -_QUERY_CONSTRAINTEXPR.fields_by_name["and_"].message_type = _QUERY_CONSTRAINTEXPR_AND -_QUERY_CONSTRAINTEXPR.fields_by_name["not_"].message_type = _QUERY_CONSTRAINTEXPR_NOT -_QUERY_CONSTRAINTEXPR.fields_by_name[ - "constraint" -].message_type = _QUERY_CONSTRAINTEXPR_CONSTRAINT -_QUERY_CONSTRAINTEXPR.containing_type = _QUERY -_QUERY_CONSTRAINTEXPR.oneofs_by_name["expression"].fields.append( - _QUERY_CONSTRAINTEXPR.fields_by_name["or_"] -) -_QUERY_CONSTRAINTEXPR.fields_by_name[ - "or_" -].containing_oneof = _QUERY_CONSTRAINTEXPR.oneofs_by_name["expression"] -_QUERY_CONSTRAINTEXPR.oneofs_by_name["expression"].fields.append( - _QUERY_CONSTRAINTEXPR.fields_by_name["and_"] -) -_QUERY_CONSTRAINTEXPR.fields_by_name[ - "and_" -].containing_oneof = _QUERY_CONSTRAINTEXPR.oneofs_by_name["expression"] -_QUERY_CONSTRAINTEXPR.oneofs_by_name["expression"].fields.append( - _QUERY_CONSTRAINTEXPR.fields_by_name["not_"] -) -_QUERY_CONSTRAINTEXPR.fields_by_name[ - "not_" -].containing_oneof = _QUERY_CONSTRAINTEXPR.oneofs_by_name["expression"] -_QUERY_CONSTRAINTEXPR.oneofs_by_name["expression"].fields.append( - _QUERY_CONSTRAINTEXPR.fields_by_name["constraint"] -) -_QUERY_CONSTRAINTEXPR.fields_by_name[ - "constraint" -].containing_oneof = _QUERY_CONSTRAINTEXPR.oneofs_by_name["expression"] -_QUERY_MODEL.fields_by_name["constraints"].message_type = _QUERY_CONSTRAINTEXPR -_QUERY_MODEL.fields_by_name["model"].message_type = _QUERY_DATAMODEL -_QUERY_MODEL.containing_type = _QUERY -DESCRIPTOR.message_types_by_name["Query"] = _QUERY -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Query = _reflection.GeneratedProtocolMessageType( - "Query", - (_message.Message,), - { - "Attribute": _reflection.GeneratedProtocolMessageType( - "Attribute", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_ATTRIBUTE, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Attribute) - }, - ), - "DataModel": _reflection.GeneratedProtocolMessageType( - "DataModel", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_DATAMODEL, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.DataModel) - }, - ), - "Location": _reflection.GeneratedProtocolMessageType( - "Location", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_LOCATION, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Location) - }, - ), - "Value": _reflection.GeneratedProtocolMessageType( - "Value", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_VALUE, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Value) - }, - ), - "KeyValue": _reflection.GeneratedProtocolMessageType( - "KeyValue", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_KEYVALUE, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.KeyValue) - }, - ), - "Instance": _reflection.GeneratedProtocolMessageType( - "Instance", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_INSTANCE, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Instance) - }, - ), - "StringPair": _reflection.GeneratedProtocolMessageType( - "StringPair", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_STRINGPAIR, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.StringPair) - }, - ), - "IntPair": _reflection.GeneratedProtocolMessageType( - "IntPair", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_INTPAIR, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.IntPair) - }, - ), - "DoublePair": _reflection.GeneratedProtocolMessageType( - "DoublePair", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_DOUBLEPAIR, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.DoublePair) - }, - ), - "LocationPair": _reflection.GeneratedProtocolMessageType( - "LocationPair", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_LOCATIONPAIR, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.LocationPair) - }, - ), - "Range": _reflection.GeneratedProtocolMessageType( - "Range", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_RANGE, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Range) - }, - ), - "Distance": _reflection.GeneratedProtocolMessageType( - "Distance", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_DISTANCE, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Distance) - }, - ), - "Relation": _reflection.GeneratedProtocolMessageType( - "Relation", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_RELATION, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Relation) - }, - ), - "Set": _reflection.GeneratedProtocolMessageType( - "Set", - (_message.Message,), - { - "Values": _reflection.GeneratedProtocolMessageType( - "Values", - (_message.Message,), - { - "Ints": _reflection.GeneratedProtocolMessageType( - "Ints", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_SET_VALUES_INTS, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Set.Values.Ints) - }, - ), - "Doubles": _reflection.GeneratedProtocolMessageType( - "Doubles", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_SET_VALUES_DOUBLES, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Set.Values.Doubles) - }, - ), - "Strings": _reflection.GeneratedProtocolMessageType( - "Strings", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_SET_VALUES_STRINGS, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Set.Values.Strings) - }, - ), - "Bools": _reflection.GeneratedProtocolMessageType( - "Bools", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_SET_VALUES_BOOLS, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Set.Values.Bools) - }, - ), - "Locations": _reflection.GeneratedProtocolMessageType( - "Locations", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_SET_VALUES_LOCATIONS, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Set.Values.Locations) - }, - ), - "DESCRIPTOR": _QUERY_SET_VALUES, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Set.Values) - }, - ), - "DESCRIPTOR": _QUERY_SET, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Set) - }, - ), - "ConstraintExpr": _reflection.GeneratedProtocolMessageType( - "ConstraintExpr", - (_message.Message,), - { - "Or": _reflection.GeneratedProtocolMessageType( - "Or", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_CONSTRAINTEXPR_OR, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.ConstraintExpr.Or) - }, - ), - "And": _reflection.GeneratedProtocolMessageType( - "And", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_CONSTRAINTEXPR_AND, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.ConstraintExpr.And) - }, - ), - "Not": _reflection.GeneratedProtocolMessageType( - "Not", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_CONSTRAINTEXPR_NOT, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.ConstraintExpr.Not) - }, - ), - "Constraint": _reflection.GeneratedProtocolMessageType( - "Constraint", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_CONSTRAINTEXPR_CONSTRAINT, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.ConstraintExpr.Constraint) - }, - ), - "DESCRIPTOR": _QUERY_CONSTRAINTEXPR, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.ConstraintExpr) - }, - ), - "Model": _reflection.GeneratedProtocolMessageType( - "Model", - (_message.Message,), - { - "DESCRIPTOR": _QUERY_MODEL, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query.Model) - }, - ), - "DESCRIPTOR": _QUERY, - "__module__": "models_pb2" - # @@protoc_insertion_point(class_scope:aea.helpers.search.models.Query) - }, -) -_sym_db.RegisterMessage(Query) -_sym_db.RegisterMessage(Query.Attribute) -_sym_db.RegisterMessage(Query.DataModel) -_sym_db.RegisterMessage(Query.Location) -_sym_db.RegisterMessage(Query.Value) -_sym_db.RegisterMessage(Query.KeyValue) -_sym_db.RegisterMessage(Query.Instance) -_sym_db.RegisterMessage(Query.StringPair) -_sym_db.RegisterMessage(Query.IntPair) -_sym_db.RegisterMessage(Query.DoublePair) -_sym_db.RegisterMessage(Query.LocationPair) -_sym_db.RegisterMessage(Query.Range) -_sym_db.RegisterMessage(Query.Distance) -_sym_db.RegisterMessage(Query.Relation) -_sym_db.RegisterMessage(Query.Set) -_sym_db.RegisterMessage(Query.Set.Values) -_sym_db.RegisterMessage(Query.Set.Values.Ints) -_sym_db.RegisterMessage(Query.Set.Values.Doubles) -_sym_db.RegisterMessage(Query.Set.Values.Strings) -_sym_db.RegisterMessage(Query.Set.Values.Bools) -_sym_db.RegisterMessage(Query.Set.Values.Locations) -_sym_db.RegisterMessage(Query.ConstraintExpr) -_sym_db.RegisterMessage(Query.ConstraintExpr.Or) -_sym_db.RegisterMessage(Query.ConstraintExpr.And) -_sym_db.RegisterMessage(Query.ConstraintExpr.Not) -_sym_db.RegisterMessage(Query.ConstraintExpr.Constraint) -_sym_db.RegisterMessage(Query.Model) -DESCRIPTOR._options = None +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cmodels.proto\x12\x19\x61\x65\x61.helpers.search.models\"\xc1\x19\n\x05Query\x1a\xc0\x01\n\tAttribute\x12\x0c\n\x04name\x18\x01 \x01(\t\x12=\n\x04type\x18\x02 \x01(\x0e\x32/.aea.helpers.search.models.Query.Attribute.Type\x12\x10\n\x08required\x18\x03 \x01(\x08\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\"?\n\x04Type\x12\n\n\x06\x44OUBLE\x10\x00\x12\x07\n\x03INT\x10\x01\x12\x08\n\x04\x42OOL\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0c\n\x08LOCATION\x10\x04\x1an\n\tDataModel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12>\n\nattributes\x18\x02 \x03(\x0b\x32*.aea.helpers.search.models.Query.Attribute\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x1a$\n\x08Location\x12\x0b\n\x03lon\x18\x01 \x01(\x01\x12\x0b\n\x03lat\x18\x02 \x01(\x01\x1a\x99\x01\n\x05Value\x12\x10\n\x06string\x18\x01 \x01(\tH\x00\x12\x10\n\x06\x64ouble\x18\x02 \x01(\x01H\x00\x12\x11\n\x07\x62oolean\x18\x03 \x01(\x08H\x00\x12\x11\n\x07integer\x18\x04 \x01(\x03H\x00\x12=\n\x08location\x18\x05 \x01(\x0b\x32).aea.helpers.search.models.Query.LocationH\x00\x42\x07\n\x05value\x1aN\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.aea.helpers.search.models.Query.Value\x1a\x80\x01\n\x08Instance\x12\x39\n\x05model\x18\x01 \x01(\x0b\x32*.aea.helpers.search.models.Query.DataModel\x12\x39\n\x06values\x18\x02 \x03(\x0b\x32).aea.helpers.search.models.Query.KeyValue\x1a+\n\nStringPair\x12\r\n\x05\x66irst\x18\x01 \x01(\t\x12\x0e\n\x06second\x18\x02 \x01(\t\x1a(\n\x07IntPair\x12\r\n\x05\x66irst\x18\x01 \x01(\x03\x12\x0e\n\x06second\x18\x02 \x01(\x03\x1a+\n\nDoublePair\x12\r\n\x05\x66irst\x18\x01 \x01(\x01\x12\x0e\n\x06second\x18\x02 \x01(\x01\x1a\x83\x01\n\x0cLocationPair\x12\x38\n\x05\x66irst\x18\x01 \x01(\x0b\x32).aea.helpers.search.models.Query.Location\x12\x39\n\x06second\x18\x02 \x01(\x0b\x32).aea.helpers.search.models.Query.Location\x1a\xa1\x02\n\x05Range\x12\x42\n\x0bstring_pair\x18\x01 \x01(\x0b\x32+.aea.helpers.search.models.Query.StringPairH\x00\x12@\n\x0cinteger_pair\x18\x02 \x01(\x0b\x32(.aea.helpers.search.models.Query.IntPairH\x00\x12\x42\n\x0b\x64ouble_pair\x18\x03 \x01(\x0b\x32+.aea.helpers.search.models.Query.DoublePairH\x00\x12\x46\n\rlocation_pair\x18\x04 \x01(\x0b\x32-.aea.helpers.search.models.Query.LocationPairH\x00\x42\x06\n\x04pair\x1aW\n\x08\x44istance\x12\x39\n\x06\x63\x65nter\x18\x01 \x01(\x0b\x32).aea.helpers.search.models.Query.Location\x12\x10\n\x08\x64istance\x18\x02 \x01(\x01\x1a\xca\x01\n\x08Relation\x12\x44\n\x08operator\x18\x01 \x01(\x0e\x32\x32.aea.helpers.search.models.Query.Relation.Operator\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.aea.helpers.search.models.Query.Value\"A\n\x08Operator\x12\x06\n\x02\x45Q\x10\x00\x12\x06\n\x02LT\x10\x01\x12\x08\n\x04LTEQ\x10\x02\x12\x06\n\x02GT\x10\x03\x12\x08\n\x04GTEQ\x10\x04\x12\t\n\x05NOTEQ\x10\x05\x1a\xca\x05\n\x03Set\x12?\n\x08operator\x18\x01 \x01(\x0e\x32-.aea.helpers.search.models.Query.Set.Operator\x12;\n\x06values\x18\x02 \x01(\x0b\x32+.aea.helpers.search.models.Query.Set.Values\x1a\xa5\x04\n\x06Values\x12\x45\n\x06string\x18\x01 \x01(\x0b\x32\x33.aea.helpers.search.models.Query.Set.Values.StringsH\x00\x12\x45\n\x06\x64ouble\x18\x02 \x01(\x0b\x32\x33.aea.helpers.search.models.Query.Set.Values.DoublesH\x00\x12\x44\n\x07\x62oolean\x18\x03 \x01(\x0b\x32\x31.aea.helpers.search.models.Query.Set.Values.BoolsH\x00\x12\x43\n\x07integer\x18\x04 \x01(\x0b\x32\x30.aea.helpers.search.models.Query.Set.Values.IntsH\x00\x12I\n\x08location\x18\x05 \x01(\x0b\x32\x35.aea.helpers.search.models.Query.Set.Values.LocationsH\x00\x1a\x16\n\x04Ints\x12\x0e\n\x06values\x18\x01 \x03(\x03\x1a\x19\n\x07\x44oubles\x12\x0e\n\x06values\x18\x01 \x03(\x01\x1a\x19\n\x07Strings\x12\x0e\n\x06values\x18\x01 \x03(\t\x1a\x17\n\x05\x42ools\x12\x0e\n\x06values\x18\x01 \x03(\x08\x1a\x46\n\tLocations\x12\x39\n\x06values\x18\x01 \x03(\x0b\x32).aea.helpers.search.models.Query.LocationB\x08\n\x06values\"\x1d\n\x08Operator\x12\x06\n\x02IN\x10\x00\x12\t\n\x05NOTIN\x10\x01\x1a\xc3\x06\n\x0e\x43onstraintExpr\x12\x41\n\x03or_\x18\x01 \x01(\x0b\x32\x32.aea.helpers.search.models.Query.ConstraintExpr.OrH\x00\x12\x43\n\x04\x61nd_\x18\x02 \x01(\x0b\x32\x33.aea.helpers.search.models.Query.ConstraintExpr.AndH\x00\x12\x43\n\x04not_\x18\x03 \x01(\x0b\x32\x33.aea.helpers.search.models.Query.ConstraintExpr.NotH\x00\x12P\n\nconstraint\x18\x04 \x01(\x0b\x32:.aea.helpers.search.models.Query.ConstraintExpr.ConstraintH\x00\x1aI\n\x02Or\x12\x43\n\nexpression\x18\x01 \x03(\x0b\x32/.aea.helpers.search.models.Query.ConstraintExpr\x1aJ\n\x03\x41nd\x12\x43\n\nexpression\x18\x01 \x03(\x0b\x32/.aea.helpers.search.models.Query.ConstraintExpr\x1aJ\n\x03Not\x12\x43\n\nexpression\x18\x01 \x01(\x0b\x32/.aea.helpers.search.models.Query.ConstraintExpr\x1a\xa0\x02\n\nConstraint\x12\x16\n\x0e\x61ttribute_name\x18\x01 \x01(\t\x12\x34\n\x04set_\x18\x02 \x01(\x0b\x32$.aea.helpers.search.models.Query.SetH\x00\x12\x38\n\x06range_\x18\x03 \x01(\x0b\x32&.aea.helpers.search.models.Query.RangeH\x00\x12=\n\x08relation\x18\x04 \x01(\x0b\x32).aea.helpers.search.models.Query.RelationH\x00\x12=\n\x08\x64istance\x18\x05 \x01(\x0b\x32).aea.helpers.search.models.Query.DistanceH\x00\x42\x0c\n\nconstraintB\x0c\n\nexpression\x1a\x88\x01\n\x05Model\x12\x44\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32/.aea.helpers.search.models.Query.ConstraintExpr\x12\x39\n\x05model\x18\x02 \x01(\x0b\x32*.aea.helpers.search.models.Query.DataModelB\x02H\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'models_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'H\001' + _globals['_QUERY']._serialized_start=44 + _globals['_QUERY']._serialized_end=3309 + _globals['_QUERY_ATTRIBUTE']._serialized_start=54 + _globals['_QUERY_ATTRIBUTE']._serialized_end=246 + _globals['_QUERY_ATTRIBUTE_TYPE']._serialized_start=183 + _globals['_QUERY_ATTRIBUTE_TYPE']._serialized_end=246 + _globals['_QUERY_DATAMODEL']._serialized_start=248 + _globals['_QUERY_DATAMODEL']._serialized_end=358 + _globals['_QUERY_LOCATION']._serialized_start=360 + _globals['_QUERY_LOCATION']._serialized_end=396 + _globals['_QUERY_VALUE']._serialized_start=399 + _globals['_QUERY_VALUE']._serialized_end=552 + _globals['_QUERY_KEYVALUE']._serialized_start=554 + _globals['_QUERY_KEYVALUE']._serialized_end=632 + _globals['_QUERY_INSTANCE']._serialized_start=635 + _globals['_QUERY_INSTANCE']._serialized_end=763 + _globals['_QUERY_STRINGPAIR']._serialized_start=765 + _globals['_QUERY_STRINGPAIR']._serialized_end=808 + _globals['_QUERY_INTPAIR']._serialized_start=810 + _globals['_QUERY_INTPAIR']._serialized_end=850 + _globals['_QUERY_DOUBLEPAIR']._serialized_start=852 + _globals['_QUERY_DOUBLEPAIR']._serialized_end=895 + _globals['_QUERY_LOCATIONPAIR']._serialized_start=898 + _globals['_QUERY_LOCATIONPAIR']._serialized_end=1029 + _globals['_QUERY_RANGE']._serialized_start=1032 + _globals['_QUERY_RANGE']._serialized_end=1321 + _globals['_QUERY_DISTANCE']._serialized_start=1323 + _globals['_QUERY_DISTANCE']._serialized_end=1410 + _globals['_QUERY_RELATION']._serialized_start=1413 + _globals['_QUERY_RELATION']._serialized_end=1615 + _globals['_QUERY_RELATION_OPERATOR']._serialized_start=1550 + _globals['_QUERY_RELATION_OPERATOR']._serialized_end=1615 + _globals['_QUERY_SET']._serialized_start=1618 + _globals['_QUERY_SET']._serialized_end=2332 + _globals['_QUERY_SET_VALUES']._serialized_start=1752 + _globals['_QUERY_SET_VALUES']._serialized_end=2301 + _globals['_QUERY_SET_VALUES_INTS']._serialized_start=2118 + _globals['_QUERY_SET_VALUES_INTS']._serialized_end=2140 + _globals['_QUERY_SET_VALUES_DOUBLES']._serialized_start=2142 + _globals['_QUERY_SET_VALUES_DOUBLES']._serialized_end=2167 + _globals['_QUERY_SET_VALUES_STRINGS']._serialized_start=2169 + _globals['_QUERY_SET_VALUES_STRINGS']._serialized_end=2194 + _globals['_QUERY_SET_VALUES_BOOLS']._serialized_start=2196 + _globals['_QUERY_SET_VALUES_BOOLS']._serialized_end=2219 + _globals['_QUERY_SET_VALUES_LOCATIONS']._serialized_start=2221 + _globals['_QUERY_SET_VALUES_LOCATIONS']._serialized_end=2291 + _globals['_QUERY_SET_OPERATOR']._serialized_start=2303 + _globals['_QUERY_SET_OPERATOR']._serialized_end=2332 + _globals['_QUERY_CONSTRAINTEXPR']._serialized_start=2335 + _globals['_QUERY_CONSTRAINTEXPR']._serialized_end=3170 + _globals['_QUERY_CONSTRAINTEXPR_OR']._serialized_start=2640 + _globals['_QUERY_CONSTRAINTEXPR_OR']._serialized_end=2713 + _globals['_QUERY_CONSTRAINTEXPR_AND']._serialized_start=2715 + _globals['_QUERY_CONSTRAINTEXPR_AND']._serialized_end=2789 + _globals['_QUERY_CONSTRAINTEXPR_NOT']._serialized_start=2791 + _globals['_QUERY_CONSTRAINTEXPR_NOT']._serialized_end=2865 + _globals['_QUERY_CONSTRAINTEXPR_CONSTRAINT']._serialized_start=2868 + _globals['_QUERY_CONSTRAINTEXPR_CONSTRAINT']._serialized_end=3156 + _globals['_QUERY_MODEL']._serialized_start=3173 + _globals['_QUERY_MODEL']._serialized_end=3309 # @@protoc_insertion_point(module_scope) diff --git a/aea/helpers/serializers.py b/aea/helpers/serializers.py index 08dc68bb23..9012e89f92 100644 --- a/aea/helpers/serializers.py +++ b/aea/helpers/serializers.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -152,7 +152,6 @@ def _patch_dict_restore(cls, dictionary: Dict[str, Any]) -> None: # protobuf Struct doesn't recursively convert Struct to dict need_patch = dictionary.pop(cls.NEED_PATCH, {}) for key, value in dictionary.items(): - # protobuf struct doesn't recursively convert Struct to dict if isinstance(value, Struct): dictionary[key] = cls._restore_value(value) diff --git a/aea/launcher.py b/aea/launcher.py index 37a6b8bb14..affd390bd8 100644 --- a/aea/launcher.py +++ b/aea/launcher.py @@ -66,7 +66,9 @@ def load_agent(agent_dir: Union[PathLike, str], password: Optional[str] = None) def _set_logger( log_level: Optional[str], -) -> None: # pragma: nocover # used in spawned process and pytest does not see this code +) -> ( + None +): # pragma: nocover # used in spawned process and pytest does not see this code from aea.cli.utils.loggers import ( # pylint: disable=import-outside-toplevel default_logging_config, ) diff --git a/aea/mail/base.py b/aea/mail/base.py index 13dade58aa..3f8cbf5524 100644 --- a/aea/mail/base.py +++ b/aea/mail/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -207,7 +207,7 @@ def encode(self, envelope: "Envelope") -> bytes: :param envelope: the envelope to encode :return: the encoded envelope """ - envelope_pb = base_pb2.Envelope() + envelope_pb = base_pb2.Envelope() # type: ignore # pylint: disable=no-member envelope_pb.to = envelope.to envelope_pb.sender = envelope.sender envelope_pb.protocol_id = str(envelope.protocol_specification_id) @@ -227,7 +227,7 @@ def decode(self, envelope_bytes: bytes) -> "Envelope": :param envelope_bytes: the encoded envelope :return: the envelope """ - envelope_pb = base_pb2.Envelope() + envelope_pb = base_pb2.Envelope() # type: ignore # pylint: disable=no-member envelope_pb.ParseFromString(envelope_bytes) to = envelope_pb.to # pylint: disable=no-member diff --git a/aea/mail/base_pb2.py b/aea/mail/base_pb2.py index 6389b56012..75de280d4b 100644 --- a/aea/mail/base_pb2.py +++ b/aea/mail/base_pb2.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: base.proto - +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database - +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,353 +14,17 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor.FileDescriptor( - name="base.proto", - package="aea.base.v0_1_0", - syntax="proto3", - serialized_options=None, - serialized_pb=b'\n\nbase.proto\x12\x0f\x61\x65\x61.base.v0_1_0\x1a\x1cgoogle/protobuf/struct.proto"\x90\x01\n\x0f\x44ialogueMessage\x12\x12\n\nmessage_id\x18\x01 \x01(\x05\x12"\n\x1a\x64ialogue_starter_reference\x18\x02 \x01(\t\x12$\n\x1c\x64ialogue_responder_reference\x18\x03 \x01(\t\x12\x0e\n\x06target\x18\x04 \x01(\x05\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c"{\n\x07Message\x12\'\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12<\n\x10\x64ialogue_message\x18\x02 \x01(\x0b\x32 .aea.base.v0_1_0.DialogueMessageH\x00\x42\t\n\x07message"Y\n\x08\x45nvelope\x12\n\n\x02to\x18\x01 \x01(\t\x12\x0e\n\x06sender\x18\x02 \x01(\t\x12\x13\n\x0bprotocol_id\x18\x03 \x01(\t\x12\x0f\n\x07message\x18\x04 \x01(\x0c\x12\x0b\n\x03uri\x18\x05 \x01(\tb\x06proto3', - dependencies=[ - google_dot_protobuf_dot_struct__pb2.DESCRIPTOR, - ], -) - - -_DIALOGUEMESSAGE = _descriptor.Descriptor( - name="DialogueMessage", - full_name="aea.base.v0_1_0.DialogueMessage", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="message_id", - full_name="aea.base.v0_1_0.DialogueMessage.message_id", - index=0, - number=1, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="dialogue_starter_reference", - full_name="aea.base.v0_1_0.DialogueMessage.dialogue_starter_reference", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="dialogue_responder_reference", - full_name="aea.base.v0_1_0.DialogueMessage.dialogue_responder_reference", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="target", - full_name="aea.base.v0_1_0.DialogueMessage.target", - index=3, - number=4, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="content", - full_name="aea.base.v0_1_0.DialogueMessage.content", - index=4, - number=5, - type=12, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"", - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=62, - serialized_end=206, -) - - -_MESSAGE = _descriptor.Descriptor( - name="Message", - full_name="aea.base.v0_1_0.Message", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="body", - full_name="aea.base.v0_1_0.Message.body", - index=0, - number=1, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="dialogue_message", - full_name="aea.base.v0_1_0.Message.dialogue_message", - index=1, - number=2, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="message", - full_name="aea.base.v0_1_0.Message.message", - index=0, - containing_type=None, - fields=[], - ), - ], - serialized_start=208, - serialized_end=331, -) - - -_ENVELOPE = _descriptor.Descriptor( - name="Envelope", - full_name="aea.base.v0_1_0.Envelope", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="to", - full_name="aea.base.v0_1_0.Envelope.to", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="sender", - full_name="aea.base.v0_1_0.Envelope.sender", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="protocol_id", - full_name="aea.base.v0_1_0.Envelope.protocol_id", - index=2, - number=3, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="message", - full_name="aea.base.v0_1_0.Envelope.message", - index=3, - number=4, - type=12, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"", - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="uri", - full_name="aea.base.v0_1_0.Envelope.uri", - index=4, - number=5, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=b"".decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=333, - serialized_end=422, -) - -_MESSAGE.fields_by_name[ - "body" -].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT -_MESSAGE.fields_by_name["dialogue_message"].message_type = _DIALOGUEMESSAGE -_MESSAGE.oneofs_by_name["message"].fields.append(_MESSAGE.fields_by_name["body"]) -_MESSAGE.fields_by_name["body"].containing_oneof = _MESSAGE.oneofs_by_name["message"] -_MESSAGE.oneofs_by_name["message"].fields.append( - _MESSAGE.fields_by_name["dialogue_message"] -) -_MESSAGE.fields_by_name["dialogue_message"].containing_oneof = _MESSAGE.oneofs_by_name[ - "message" -] -DESCRIPTOR.message_types_by_name["DialogueMessage"] = _DIALOGUEMESSAGE -DESCRIPTOR.message_types_by_name["Message"] = _MESSAGE -DESCRIPTOR.message_types_by_name["Envelope"] = _ENVELOPE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -DialogueMessage = _reflection.GeneratedProtocolMessageType( - "DialogueMessage", - (_message.Message,), - { - "DESCRIPTOR": _DIALOGUEMESSAGE, - "__module__": "base_pb2" - # @@protoc_insertion_point(class_scope:aea.base.v0_1_0.DialogueMessage) - }, -) -_sym_db.RegisterMessage(DialogueMessage) - -Message = _reflection.GeneratedProtocolMessageType( - "Message", - (_message.Message,), - { - "DESCRIPTOR": _MESSAGE, - "__module__": "base_pb2" - # @@protoc_insertion_point(class_scope:aea.base.v0_1_0.Message) - }, -) -_sym_db.RegisterMessage(Message) - -Envelope = _reflection.GeneratedProtocolMessageType( - "Envelope", - (_message.Message,), - { - "DESCRIPTOR": _ENVELOPE, - "__module__": "base_pb2" - # @@protoc_insertion_point(class_scope:aea.base.v0_1_0.Envelope) - }, -) -_sym_db.RegisterMessage(Envelope) - +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nbase.proto\x12\x0f\x61\x65\x61.base.v0_1_0\x1a\x1cgoogle/protobuf/struct.proto\"\x90\x01\n\x0f\x44ialogueMessage\x12\x12\n\nmessage_id\x18\x01 \x01(\x05\x12\"\n\x1a\x64ialogue_starter_reference\x18\x02 \x01(\t\x12$\n\x1c\x64ialogue_responder_reference\x18\x03 \x01(\t\x12\x0e\n\x06target\x18\x04 \x01(\x05\x12\x0f\n\x07\x63ontent\x18\x05 \x01(\x0c\"{\n\x07Message\x12\'\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x12<\n\x10\x64ialogue_message\x18\x02 \x01(\x0b\x32 .aea.base.v0_1_0.DialogueMessageH\x00\x42\t\n\x07message\"Y\n\x08\x45nvelope\x12\n\n\x02to\x18\x01 \x01(\t\x12\x0e\n\x06sender\x18\x02 \x01(\t\x12\x13\n\x0bprotocol_id\x18\x03 \x01(\t\x12\x0f\n\x07message\x18\x04 \x01(\x0c\x12\x0b\n\x03uri\x18\x05 \x01(\tb\x06proto3') +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'base_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_DIALOGUEMESSAGE']._serialized_start=62 + _globals['_DIALOGUEMESSAGE']._serialized_end=206 + _globals['_MESSAGE']._serialized_start=208 + _globals['_MESSAGE']._serialized_end=331 + _globals['_ENVELOPE']._serialized_start=333 + _globals['_ENVELOPE']._serialized_end=422 # @@protoc_insertion_point(module_scope) diff --git a/aea/package_manager/base.py b/aea/package_manager/base.py index 96df69ce59..925e63be07 100644 --- a/aea/package_manager/base.py +++ b/aea/package_manager/base.py @@ -50,7 +50,7 @@ IS_IPFS_PLUGIN_INSTALLED = False PACKAGES_FILE = "packages.json" -PACKAGE_SOURCE_RE = re.compile(r"([a-z-_0-9]+\/[a-z-_0-9]+)((:)([a-z\.0-9_-]+))?") +PACKAGE_SOURCE_RE = re.compile(r"([a-z-_0-9A-Z]+\/[a-z-_0-9A-Z]+)((:)([a-z\.0-9_-]+))?") PackageIdToHashMapping = OrderedDictType[PackageId, str] ConfigLoaderCallableType = Callable[[PackageType, Path], PackageConfiguration] @@ -147,7 +147,7 @@ def _sync( sync_needed = True self._logger.info(f"{package_id} not found locally, downloading...") package_id_with_hash = package_id.with_hash(packages[package_id]) - self.add_package(package_id=package_id_with_hash) + self.add_package(package_id=package_id_with_hash, with_dependencies=True) return sync_needed, hash_updates, package_updates @@ -315,6 +315,7 @@ def add_package( if not actual_package_id: # no package on fs, download one + self._logger.info(f"Adding {package_id.without_hash()}") self._fetch_package(package_id) elif not is_update_needed: # actual version already, nothing to do @@ -324,6 +325,7 @@ def add_package( f"Required package and package in the registry does not match: {package_id} vs {actual_package_id}" ) else: + self._logger.info(f"Updating {package_id.without_hash()}") self._update_package(package_id) if with_dependencies: @@ -357,12 +359,12 @@ def _fetch_package(self, package_id: PackageId) -> None: (package_type_collection / "__init__.py").touch() download_path = package_type_collection / package_id.name - fetch_ipfs( str(package_id.package_type), package_id.public_id, dest=str(download_path), ) + self._logger.debug(f"Downloaded {package_id.without_hash()}") def add_dependencies_for_package( self, package_id: PackageId, allow_update: bool = False diff --git a/aea/package_manager/v1.py b/aea/package_manager/v1.py index ad22fa33a7..3e5c7d808e 100644 --- a/aea/package_manager/v1.py +++ b/aea/package_manager/v1.py @@ -199,7 +199,9 @@ def _update_hashes_from_sources(self, sources: List[str]) -> None: self.dump(file=self._packages_file) def register( - self, package_path: Path, package_type: Optional[PackageType] = None + self, + package_path: Path, + package_type: Optional[PackageType] = None, ) -> "PackageManagerV1": """Add package to the index.""" package_type = package_type or PackageType(package_path.parent.name[:-1]) @@ -241,8 +243,8 @@ def sync( update_hashes=update_hashes, update_packages=update_packages, ) - sync_needed = sync_needed or _sync_needed + sync_needed = sync_needed or _sync_needed if update_hashes and hash_updates_third_party: third_party_package_id = "\n\t- ".join( map(str, hash_updates_third_party) @@ -281,6 +283,8 @@ def sync( if sync_needed: self._logger.info("Sync complete") + self._logger.info("Updating hashes") + self.dump() else: self._logger.info("No package was updated.") diff --git a/aea/protocols/generator/base.py b/aea/protocols/generator/base.py index e7276dc6d9..d18d1c50e4 100644 --- a/aea/protocols/generator/base.py +++ b/aea/protocols/generator/base.py @@ -1658,25 +1658,35 @@ def _serialization_class_str(self) -> str: cls_str += self.indent + "from typing import Any, Dict, cast\n\n" cls_str += ( self.indent - + "from aea.mail.base_pb2 import DialogueMessage, Message as ProtobufMessage\n" + + "from aea.mail.base_pb2 import DialogueMessage # type: ignore\n" + ) + cls_str += ( + self.indent + + "from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore\n" ) cls_str += MESSAGE_IMPORT + "\n" cls_str += SERIALIZER_IMPORT + "\n\n" - cls_str += self.indent + "from {} import (\n {}_pb2,\n)\n".format( - self.dotted_path_to_protocol_package, - self.protocol_specification.name, + cls_str += ( + self.indent + + "from {} import ( # type: ignore\n {}_pb2,\n)\n".format( + self.dotted_path_to_protocol_package, + self.protocol_specification.name, + ) ) for custom_type in self.spec.all_custom_types: cls_str += ( self.indent - + "from {}.custom_types import (\n {},\n)\n".format( + + "from {}.custom_types import ( # type: ignore\n {},\n)\n".format( self.dotted_path_to_protocol_package, custom_type, ) ) - cls_str += self.indent + "from {}.message import (\n {}Message,\n)\n".format( - self.dotted_path_to_protocol_package, - self.protocol_specification_in_camel_case, + cls_str += ( + self.indent + + "from {}.message import ( # type: ignore\n {}Message,\n)\n".format( + self.dotted_path_to_protocol_package, + self.protocol_specification_in_camel_case, + ) ) # Class Header @@ -1707,10 +1717,13 @@ def _serialization_class_str(self) -> str: ) cls_str += self.indent + "message_pb = ProtobufMessage()\n" cls_str += self.indent + "dialogue_message_pb = DialogueMessage()\n" - cls_str += self.indent + "{}_msg = {}_pb2.{}Message()\n\n".format( - self.protocol_specification.name, - self.protocol_specification.name, - self.protocol_specification_in_camel_case, + cls_str += ( + self.indent + + "{}_msg = {}_pb2.{}Message() # type: ignore\n\n".format( + self.protocol_specification.name, + self.protocol_specification.name, + self.protocol_specification_in_camel_case, + ) ) cls_str += self.indent + "dialogue_message_pb.message_id = msg.message_id\n" cls_str += self.indent + "dialogue_reference = msg.dialogue_reference\n" @@ -1787,7 +1800,7 @@ def _serialization_class_str(self) -> str: ) cls_str += self.indent + '"""\n' cls_str += self.indent + "message_pb = ProtobufMessage()\n" - cls_str += self.indent + "{}_pb = {}_pb2.{}Message()\n".format( + cls_str += self.indent + "{}_pb = {}_pb2.{}Message() # type: ignore\n".format( self.protocol_specification.name, self.protocol_specification.name, self.protocol_specification_in_camel_case, diff --git a/aea/protocols/generator/common.py b/aea/protocols/generator/common.py index 6e186c7add..c3e0ba2cb5 100644 --- a/aea/protocols/generator/common.py +++ b/aea/protocols/generator/common.py @@ -55,8 +55,8 @@ "Optional", ] -MESSAGE_IMPORT = "from aea.protocols.base import Message" -SERIALIZER_IMPORT = "from aea.protocols.base import Serializer" +MESSAGE_IMPORT = "from aea.protocols.base import Message # type: ignore" +SERIALIZER_IMPORT = "from aea.protocols.base import Serializer # type: ignore" PATH_TO_PACKAGES = PACKAGES INIT_FILE_NAME = "__init__.py" diff --git a/aea/protocols/generator/extract_specification.py b/aea/protocols/generator/extract_specification.py index 67cc6e559c..3de9b4ad2e 100644 --- a/aea/protocols/generator/extract_specification.py +++ b/aea/protocols/generator/extract_specification.py @@ -195,7 +195,6 @@ def extract( all_performatives_set.add(performative) spec.speech_acts[performative] = {} for content_name, content_type in speech_act_content_config.args.items(): - # determine necessary imports from typing if len(re.findall("pt:set\\[", content_type)) >= 1: spec.typing_imports["FrozenSet"] = True diff --git a/aea/protocols/generator/validate.py b/aea/protocols/generator/validate.py index 110b464b1d..f97ba49240 100644 --- a/aea/protocols/generator/validate.py +++ b/aea/protocols/generator/validate.py @@ -410,7 +410,6 @@ def _validate_speech_acts_section( performative, speech_act_content_config, ) in protocol_specification.speech_acts.read_all(): - # Validate performative name ( result_performative_validation, @@ -427,7 +426,6 @@ def _validate_speech_acts_section( performatives_set.add(performative) for content_name, content_type in speech_act_content_config.args.items(): - # Validate content name ( result_content_name_validation, diff --git a/aea/skills/base.py b/aea/skills/base.py index fab05237ba..f43dc17ca3 100644 --- a/aea/skills/base.py +++ b/aea/skills/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -1083,7 +1083,7 @@ def _match_class_and_configurations( # populate indexes for _path, component_classes in component_classes_by_path.items(): - for (component_classname, _component_class) in component_classes: + for component_classname, _component_class in component_classes: type_ = self._get_skill_component_type(_component_class) class_index.setdefault(component_classname, {}).setdefault( type_, set() diff --git a/aea/test_tools/test_cases.py b/aea/test_tools/test_cases.py index 9a97f6bb1f..26438b9936 100644 --- a/aea/test_tools/test_cases.py +++ b/aea/test_tools/test_cases.py @@ -321,6 +321,7 @@ def difference_to_fetched_agent(cls, public_id: str, agent_name: str) -> List[st :return: list of files differing in the projects """ + # for pydocstyle def is_allowed_diff_in_agent_config( path_to_fetched_aea: str, path_to_manually_created_aea: str diff --git a/benchmark/cases/react_multi_agents_fake_connection.py b/benchmark/cases/react_multi_agents_fake_connection.py index 042a6faaa9..28d1871373 100644 --- a/benchmark/cases/react_multi_agents_fake_connection.py +++ b/benchmark/cases/react_multi_agents_fake_connection.py @@ -42,6 +42,7 @@ def _make_custom_config(name: str = "dummy_agent", skills_num: int = 1) -> dict: :return: dict to be used in AEATestWrapper(**result) """ + # noqa def _make_skill(id_: int) -> Skill: return AEATestWrapper.make_skill( diff --git a/benchmark/cases/react_speed_multi_agents.py b/benchmark/cases/react_speed_multi_agents.py index 490ef33efe..9e31144ed9 100644 --- a/benchmark/cases/react_speed_multi_agents.py +++ b/benchmark/cases/react_speed_multi_agents.py @@ -37,6 +37,7 @@ def _make_custom_config(name: str = "dummy_agent", skills_num: int = 1) -> dict: :return: dict to be used in AEATestWrapper(**result) """ + # noqa def _make_skill(id_: int) -> Skill: return AEATestWrapper.make_skill( diff --git a/deploy-image/Dockerfile b/deploy-image/Dockerfile index a4736b07ec..eb2d9f936e 100644 --- a/deploy-image/Dockerfile +++ b/deploy-image/Dockerfile @@ -16,7 +16,7 @@ RUN apk add --no-cache go # aea installation RUN pip install --upgrade pip -RUN pip install --upgrade --force-reinstall open-aea[all]==1.35.0 "open-aea-cli-ipfs<2.0.0,>=1.35.0" +RUN pip install --upgrade --force-reinstall open-aea[all]==1.41.0.post1 "open-aea-cli-ipfs<2.0.0,>=1.41.0.post1" # directories and aea cli config WORKDIR /home/agents diff --git a/deploy-image/README.md b/deploy-image/README.md index f9c941dcd3..85dc710057 100644 --- a/deploy-image/README.md +++ b/deploy-image/README.md @@ -11,7 +11,7 @@ The example uses the `fetchai/my_first_aea` project. You will likely want to mod Install subversion, then download the example directory to your local working directory ``` bash -svn checkout https://github.com/valory-xyz/open-aea/tags/v1.35.0/packages packages +svn checkout https://github.com/valory-xyz/open-aea/tags/v1.41.0.post1/packages packages ``` ### Modify scripts diff --git a/deploy-image/build.sh b/deploy-image/build.sh index 4b94f6c54f..0040a44c9f 100644 --- a/deploy-image/build.sh +++ b/deploy-image/build.sh @@ -2,7 +2,7 @@ set -e # setup the agent -aea fetch open_aea/my_first_aea:0.1.0:bafybeihhrlcmu6dibftsg36m47uxi4inltsjvmoip5smvevq3caiwm3oo4 --remote +aea fetch open_aea/my_first_aea:0.1.0:bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm --remote cd my_first_aea/ aea install aea build diff --git a/develop-image/docker-env.sh b/develop-image/docker-env.sh index abf6b4cd1b..9a15db8c01 100755 --- a/develop-image/docker-env.sh +++ b/develop-image/docker-env.sh @@ -1,7 +1,7 @@ #!/bin/bash # Swap the following lines if you want to work with 'latest' -DOCKER_IMAGE_TAG=valory/open-aea-develop:1.35.0 +DOCKER_IMAGE_TAG=valory/open-aea-develop:1.41.0.post1 # DOCKER_IMAGE_TAG=valory/open-aea-develop:latest DOCKER_BUILD_CONTEXT_DIR=.. diff --git a/docs-image/Dockerfile b/docs-image/Dockerfile index 905b76dd44..f0be33419c 100644 --- a/docs-image/Dockerfile +++ b/docs-image/Dockerfile @@ -19,7 +19,7 @@ WORKDIR /build COPY docs/ /build/docs COPY mkdocs.yml /build -RUN python3 -m pip install "tomte[docs]==0.2.4" +RUN python3 -m pip install "tomte[docs]==0.2.13" RUN python3 -m pip install git+https://github.com/pugong/mkdocs-mermaid-plugin.git RUN mkdocs build diff --git a/docs/aev-echo-demo.md b/docs/aev-echo-demo.md index 9381b01a09..af93a15eca 100644 --- a/docs/aev-echo-demo.md +++ b/docs/aev-echo-demo.md @@ -23,7 +23,7 @@ aea_version: '>=1.3.0, <2.0.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/http_server:0.22.0 +- valory/http_server:0.22.0 contracts: [] protocols: - fetchai/default:1.0.0 @@ -45,7 +45,7 @@ dependencies: open-aea-ledger-ethereum: {} default_connection: null --- -public_id: fetchai/http_server:0.22.0 +public_id: valory/http_server:0.22.0 type: connection config: host: ${HOST:str:localhost} @@ -53,7 +53,7 @@ config: target_skill_id: ${TARGET_SKILL:str:fetchai/http_echo:0.20.0} ``` -Notice how the ```fetchai/http_server:0.22.0``` has a number of override parameters specified: +Notice how the ```valory/http_server:0.22.0``` has a number of override parameters specified: ``` yaml host: ${HOST:str:localhost} port: ${PORT:int:5000} diff --git a/docs/agent-vs-aea.md b/docs/agent-vs-aea.md index 393fbc6ce4..aeda15b3aa 100644 --- a/docs/agent-vs-aea.md +++ b/docs/agent-vs-aea.md @@ -11,9 +11,9 @@ First, use an empty agent to get the stub connection and default protocol. mkdir packages # packages folder will contain the local package repository aea create my_aea # create an agent cd my_aea -aea add connection fetchai/stub:0.21.0:bafybeiau4vkru44a4gwujp47vjg7kglxcf456dhmcuhi4lsdx2m2ykmv2a --remote # get a connection from the remote registry +aea add connection fetchai/stub:0.21.0:bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi --remote # get a connection from the remote registry aea push connection fetchai/stub --local # push to local registry -aea add protocol fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 --remote +aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local cd .. aea delete my_aea # delete the agent diff --git a/docs/api/aea_builder.md b/docs/api/aea_builder.md index 74958ee457..91e2a2d924 100644 --- a/docs/api/aea_builder.md +++ b/docs/api/aea_builder.md @@ -215,6 +215,12 @@ builder.add_component_instance(...) # second call my_aea_2 = builder.builder() + + +#### DEFAULT`_`AGENT`_`ACT`_`PERIOD + +seconds + #### `__`init`__` diff --git a/docs/api/agent_loop.md b/docs/api/agent_loop.md index f44fab99ce..6e1987701e 100644 --- a/docs/api/agent_loop.md +++ b/docs/api/agent_loop.md @@ -165,6 +165,12 @@ class AsyncAgentLoop(BaseAgentLoop) Asyncio based agent loop suitable only for AEA. + + +#### NEW`_`BEHAVIOURS`_`PROCESS`_`SLEEP + +check new behaviours registered every second. + #### `__`init`__` @@ -212,3 +218,9 @@ If message passed it will be wrapped into envelope with optional envelope contex - `message_or_envelope`: envelope to send to another skill. - `context`: envelope context + + +#### SyncAgentLoop + +temporary solution! + diff --git a/docs/api/configurations/constants.md b/docs/api/configurations/constants.md index d1fff859e4..983c195ec8 100644 --- a/docs/api/configurations/constants.md +++ b/docs/api/configurations/constants.md @@ -4,3 +4,15 @@ Module to declare constants. + + +#### CONFIG`_`FILE`_`TO`_`PACKAGE`_`TYPE + +type: Dict[str, str] + + + +#### PACKAGE`_`TYPE`_`TO`_`CONFIG`_`FILE + +type: Dict[str, str] + diff --git a/docs/api/configurations/data_types.md b/docs/api/configurations/data_types.md index a0e112262c..5dc85a362e 100644 --- a/docs/api/configurations/data_types.md +++ b/docs/api/configurations/data_types.md @@ -1067,6 +1067,17 @@ def ref() -> Optional[str] Get the ref. + + +#### from`_`string + +```python +@classmethod +def from_string(cls, string: str) -> "Dependency" +``` + +Parse from string. + #### from`_`json diff --git a/docs/api/configurations/loader.md b/docs/api/configurations/loader.md index 5d07b96ab5..c59641bb19 100644 --- a/docs/api/configurations/loader.md +++ b/docs/api/configurations/loader.md @@ -4,6 +4,12 @@ Implementation of the parser for configuration file. + + +#### `_` + +for tests compatibility + ## BaseConfigLoader Objects diff --git a/docs/api/configurations/manager.md b/docs/api/configurations/manager.md index 5572dfa4e0..cf8f236637 100644 --- a/docs/api/configurations/manager.md +++ b/docs/api/configurations/manager.md @@ -4,6 +4,12 @@ Implementation of the AgentConfigManager. + + +#### RESOURCE`_`TYPE`_`TO`_`CONFIG`_`FILE + +type: Dict[str, str] + ## VariableDoesNotExist Objects diff --git a/docs/api/configurations/utils.md b/docs/api/configurations/utils.md index 5ed699e5af..ae982bd7dc 100644 --- a/docs/api/configurations/utils.md +++ b/docs/api/configurations/utils.md @@ -24,7 +24,7 @@ This depends on the actual configuration being considered. #### `_` ```python -@replace_component_ids.register(AgentConfig) # type: ignore +@replace_component_ids.register(AgentConfig) def _(arg: AgentConfig, replacements: Dict[ComponentType, Dict[PublicId, PublicId]]) -> None ``` @@ -47,7 +47,7 @@ It breaks down in: #### `_` ```python -@replace_component_ids.register(ProtocolConfig) # type: ignore +@replace_component_ids.register(ProtocolConfig) def _(_arg: ProtocolConfig, _replacements: Dict[ComponentType, Dict[PublicId, PublicId]]) -> None ``` @@ -59,7 +59,7 @@ Do nothing - protocols have no references. #### `_` ```python -@replace_component_ids.register(ConnectionConfig) # type: ignore +@replace_component_ids.register(ConnectionConfig) def _(arg: ConnectionConfig, replacements: Dict[ComponentType, Dict[PublicId, PublicId]]) -> None ``` @@ -71,7 +71,7 @@ Replace references in a connection configuration. #### `_` ```python -@replace_component_ids.register(ContractConfig) # type: ignore +@replace_component_ids.register(ContractConfig) def _(_arg: ContractConfig, _replacements: Dict[ComponentType, Dict[PublicId, PublicId]]) -> None ``` @@ -83,7 +83,7 @@ Do nothing - contracts have no references. #### `_` ```python -@replace_component_ids.register(SkillConfig) # type: ignore +@replace_component_ids.register(SkillConfig) def _(arg: SkillConfig, replacements: Dict[ComponentType, Dict[PublicId, PublicId]]) -> None ``` diff --git a/docs/api/connections/base.md b/docs/api/connections/base.md index 9ace44b542..3b1fca73fc 100644 --- a/docs/api/connections/base.md +++ b/docs/api/connections/base.md @@ -24,6 +24,12 @@ class Connection(Component, ABC) Abstract definition of a connection. + + +#### connection`_`id + +type: PublicId + #### `__`init`__` diff --git a/docs/api/contracts/base.md b/docs/api/contracts/base.md index a17f6cfa10..d5286e4b09 100644 --- a/docs/api/contracts/base.md +++ b/docs/api/contracts/base.md @@ -24,6 +24,12 @@ class Contract(Component) Abstract definition of a contract. + + +#### contract`_`id + +type: PublicId + #### `__`init`__` diff --git a/docs/api/crypto/base.md b/docs/api/crypto/base.md index f28777911f..0faf1787e4 100644 --- a/docs/api/crypto/base.md +++ b/docs/api/crypto/base.md @@ -497,6 +497,12 @@ class LedgerApi(Helper, ABC) Interface for ledger APIs. + + +#### identifier + +type: str + #### api @@ -812,6 +818,18 @@ class FaucetApi(ABC) Interface for testnet faucet APIs. + + +#### identifier + +type: str + + + +#### network`_`name + +type: str + #### get`_`wealth diff --git a/docs/api/crypto/helpers.md b/docs/api/crypto/helpers.md index 25216a4a6f..17fc77678d 100644 --- a/docs/api/crypto/helpers.md +++ b/docs/api/crypto/helpers.md @@ -4,6 +4,12 @@ Module wrapping the helpers of public and private key cryptography. + + +#### `_` + +some modules expect this here + #### try`_`validate`_`private`_`key`_`path @@ -166,17 +172,3 @@ def hex_to_bytes_for_key(data: str) -> bytes Convert hex string to bytes with error handling. - - -#### generate`_`multiple`_`keys - -```python -def generate_multiple_keys(n: int, - type_: str, - password: Optional[str] = None, - extra_entropy: Union[str, bytes, int] = "", - file: Optional[str] = None) -> None -``` - -Generate n key pairs. - diff --git a/docs/api/helpers/constants.md b/docs/api/helpers/constants.md index ac8d5c7033..350787b1f2 100644 --- a/docs/api/helpers/constants.md +++ b/docs/api/helpers/constants.md @@ -4,3 +4,9 @@ Module with helpers constants. + + +#### NETWORK`_`REQUEST`_`DEFAULT`_`TIMEOUT + +in seconds + diff --git a/docs/api/helpers/exception_policy.md b/docs/api/helpers/exception_policy.md index dd6f566fce..5e47f743f9 100644 --- a/docs/api/helpers/exception_policy.md +++ b/docs/api/helpers/exception_policy.md @@ -14,3 +14,15 @@ class ExceptionPolicyEnum(Enum) AEA Exception policies. + + +#### propagate + +just bubble up exception raised. run loop interrupted. + + + +#### stop`_`and`_`exit + +log exception and stop agent with raising AEAException to show it was terminated + diff --git a/docs/api/helpers/http_requests.md b/docs/api/helpers/http_requests.md index 9b2c27ffeb..49f02ad4a0 100644 --- a/docs/api/helpers/http_requests.md +++ b/docs/api/helpers/http_requests.md @@ -14,3 +14,9 @@ def add_default_timeout(fn: Callable, timeout: float) -> Callable Add default timeout for requests methods. + + +#### ConnectionError + +pylint: disable=redefined-builtin + diff --git a/docs/api/helpers/io.md b/docs/api/helpers/io.md index 259854e8e0..76001d3354 100644 --- a/docs/api/helpers/io.md +++ b/docs/api/helpers/io.md @@ -2,6 +2,62 @@ # aea.helpers.io +Wrapper over built-in "open" function. + +This module contains a wrapper to the built-in 'open' +function, the 'open_file' function, that fixes the +keyword argument 'newline' to be equal to "\n" (the UNIX line separator). +This will force the line separator to be "\n" both +for incoming and outgoing data. + +The reason of this is that files written in an AEA package +need to have "\n" as line separator, on all platforms. Otherwise, +the fingerprint of the packages involved would change across platforms +just because the line separators are replaced. + +For instance, the 'open' function on Windows, by default (newline=None), +would replace the line separators "\n" with "\r\n". +This has an impact in the computation of the fingerprint. + +Hence, any usage of file system functionalities +should either use 'open_file', or set 'newline="\n"' when +calling the 'open' or the 'pathlib.Path.open' functions. + + + +#### open`_`file + +```python +def open_file(file: PathNameTypes, + mode: str = "r", + buffering: int = -1, + encoding: Optional[str] = None, + errors: Optional[str] = None) -> TextIO +``` + +Open a file. + +Behaviour, kwargs and return type are the same for built-in 'open' +and pathlib.Path.open, except for 'newline', which is fixed to '\n'. + +For more details on the keyword arguments, please refer +to the documentation for the built-in 'open': + + https://docs.python.org/3/library/functions.html#open + +**Arguments**: + +- `file`: either a pathlib.Path object or the type accepted by 'open', +i.e. a string, bytes or integer. +- `mode`: the mode in which the file is opened. +- `buffering`: the buffering policy. +- `encoding`: the name of the encoding used to decode or encode the file. +- `errors`: how encoding errors are to be handled + +**Returns**: + +the IO object. + #### to`_`csv diff --git a/docs/api/helpers/ipfs/base.md b/docs/api/helpers/ipfs/base.md index e264c6bab3..f90f3ac53b 100644 --- a/docs/api/helpers/ipfs/base.md +++ b/docs/api/helpers/ipfs/base.md @@ -4,6 +4,18 @@ This module contains helper methods and classes for the 'aea' package. + + +#### SHA256`_`ID + +0x12 + + + +#### LEN`_`SHA256 + +0x20 + #### chunks diff --git a/docs/api/helpers/multiple_executor.md b/docs/api/helpers/multiple_executor.md index 73c99c2aeb..61f64c7d24 100644 --- a/docs/api/helpers/multiple_executor.md +++ b/docs/api/helpers/multiple_executor.md @@ -14,6 +14,24 @@ class ExecutorExceptionPolicies(Enum) Runner exception policy modes. + + +#### stop`_`all + +stop all agents on one agent's failure, log exception + + + +#### propagate + +log exception and reraise it to upper level + + + +#### log`_`only + +log exception and skip it + ## AbstractExecutorTask Objects diff --git a/docs/api/manager/manager.md b/docs/api/manager/manager.md index 6eca41d38d..39ed7439a5 100644 --- a/docs/api/manager/manager.md +++ b/docs/api/manager/manager.md @@ -257,6 +257,18 @@ class AgentRunProcessTask(BaseAgentRunTask) Subprocess wrapper to run agent. + + +#### PROCESS`_`JOIN`_`TIMEOUT + +in seconds + + + +#### PROCESS`_`ALIVE`_`SLEEP`_`TIME + +in seconds + #### `__`init`__` diff --git a/docs/api/plugins/aea_cli_benchmark/utils.md b/docs/api/plugins/aea_cli_benchmark/utils.md index 7cd90dc8ce..9339e30f0b 100644 --- a/docs/api/plugins/aea_cli_benchmark/utils.md +++ b/docs/api/plugins/aea_cli_benchmark/utils.md @@ -4,6 +4,12 @@ Performance checks utils. + + +#### ROOT`_`DIR + +type: ignore + #### wait`_`for`_`condition diff --git a/docs/api/plugins/aea_ledger_cosmos/cosmos.md b/docs/api/plugins/aea_ledger_cosmos/cosmos.md index ea3bfcbbab..d4a39798e3 100644 --- a/docs/api/plugins/aea_ledger_cosmos/cosmos.md +++ b/docs/api/plugins/aea_ledger_cosmos/cosmos.md @@ -992,6 +992,30 @@ class CosmosFaucetApi(FaucetApi) Cosmos testnet faucet API. + + +#### FAUCET`_`STATUS`_`PENDING + +noqa: F841 + + + +#### FAUCET`_`STATUS`_`PROCESSING + +noqa: F841 + + + +#### FAUCET`_`STATUS`_`COMPLETED + +noqa: F841 + + + +#### FAUCET`_`STATUS`_`FAILED + +noqa: F841 + #### `__`init`__` diff --git a/docs/api/plugins/aea_ledger_ethereum/ethereum.md b/docs/api/plugins/aea_ledger_ethereum/ethereum.md index 4de10ceff6..6c25cf2bc9 100644 --- a/docs/api/plugins/aea_ledger_ethereum/ethereum.md +++ b/docs/api/plugins/aea_ledger_ethereum/ethereum.md @@ -4,6 +4,24 @@ Ethereum module wrapping the public and private key cryptography and ledger api. + + +#### SPEED`_`FAST + +safeLow, standard, fast + + + +#### PRIORITY`_`FEE`_`INCREASE`_`BOUNDARY + +percentage + + + +#### GAS`_`STATION`_`FALLBACK`_`ESTIMATE + +gwei + #### wei`_`to`_`gwei @@ -949,27 +967,27 @@ Get wealth from the faucet for the provided address. - `address`: the address. - `url`: the url - + -## SessionCacheLockWrapper Objects +## SimpleCacheLockWrapper Objects ```python -class SessionCacheLockWrapper() +class SimpleCacheLockWrapper() ``` Wrapper for session_cache with threading.Lock. - + #### `__`init`__` ```python -def __init__(session_cache: SessionCache) -> None +def __init__(session_cache: SimpleCache) -> None ``` Init wrapper. - + #### `__`contains`__` @@ -979,7 +997,7 @@ def __contains__(*args: Any, **kwargs: Any) -> Any Contain item. - + #### `__`len`__` @@ -989,7 +1007,7 @@ def __len__() -> int Length of the cache - + #### cache @@ -999,7 +1017,7 @@ def cache(key: str, value: Any) -> Dict[str, Any] session_cache Cache. - + #### get`_`cache`_`entry @@ -1009,7 +1027,7 @@ def get_cache_entry(key: str) -> Any Get cache entry. - + #### clear @@ -1019,6 +1037,16 @@ def clear() -> None Clear cache entries. + + +#### items + +```python +def items() -> Dict[str, Any] +``` + +Return session items. + #### set`_`wrapper`_`for`_`web3py`_`session`_`cache diff --git a/docs/api/plugins/aea_ledger_ethereum_hwi/bip32.md b/docs/api/plugins/aea_ledger_ethereum_hwi/bip32.md new file mode 100644 index 0000000000..0d56a55dc9 --- /dev/null +++ b/docs/api/plugins/aea_ledger_ethereum_hwi/bip32.md @@ -0,0 +1,145 @@ + + +# plugins.aea-ledger-ethereum-hwi.aea`_`ledger`_`ethereum`_`hwi.bip32 + +BIP32 utils + +Original implementation: https://github.com/LedgerHQ/apduboy/blob/master/apduboy/lib/bip32.py + + + +## Level Objects + +```python +@dataclass +class Level() +``` + +Level separator. + + + +#### value + +```python +@property +def value() -> int +``` + +Value + + + +#### `__`str`__` + +```python +def __str__() -> str +``` + +String representation. + + + +## Derivation Objects + +```python +@dataclass +class Derivation() +``` + +Path derivation + + + +#### `__`truediv`__` + +```python +def __truediv__(level: int) -> "Derivation" +``` + +Combine multiple path derivations using `/` operator. + + + +#### account + +```python +@property +def account() -> int +``` + +Account value. + + + +#### parent + +```python +@property +def parent() -> "Derivation" +``` + +Parent value. + + + +#### path + +```python +@property +def path() -> str +``` + +Calculated path. + + + +#### to`_`list + +```python +def to_list() -> List[int] +``` + +Convert to list. + + + +#### depth + +```python +@property +def depth() -> int +``` + +Depth. + + + +#### `__`repr`__` + +```python +def __repr__() +``` + +String representation. + + + +#### `__`str`__` + +```python +def __str__() +``` + +String representation. + + + +#### h + +```python +def h(value: int) -> int +``` + +Wrap value. + diff --git a/docs/api/plugins/aea_ledger_fetchai/test_tools/constants.md b/docs/api/plugins/aea_ledger_fetchai/test_tools/constants.md index 83c13893c6..bd23dd07d8 100644 --- a/docs/api/plugins/aea_ledger_fetchai/test_tools/constants.md +++ b/docs/api/plugins/aea_ledger_fetchai/test_tools/constants.md @@ -4,3 +4,9 @@ Constants. + + +#### FETCHAI`_`P2P`_`ADDRESS + +relates to NON_FUNDED_FETCHAI_PRIVATE_KEY_1 + diff --git a/docs/api/plugins/aea_ledger_solana/helper.md b/docs/api/plugins/aea_ledger_solana/helper.md index cc76be13b3..a3d5d9fab7 100644 --- a/docs/api/plugins/aea_ledger_solana/helper.md +++ b/docs/api/plugins/aea_ledger_solana/helper.md @@ -14,6 +14,12 @@ class SolanaHelper(Helper) Helper class usable as Mixin for SolanaApi or as standalone class. + + +#### BlockhashCache + +defined in SolanaAPi.__init__ + #### load`_`contract`_`interface diff --git a/docs/api/plugins/aea_ledger_solana/transaction_instruction.md b/docs/api/plugins/aea_ledger_solana/transaction_instruction.md index e69de29bb2..a62b5be1b6 100644 --- a/docs/api/plugins/aea_ledger_solana/transaction_instruction.md +++ b/docs/api/plugins/aea_ledger_solana/transaction_instruction.md @@ -0,0 +1,66 @@ + + +# plugins.aea-ledger-solana.aea`_`ledger`_`solana.transaction`_`instruction + +This module contains the TransactionInstruction of the solana module. + + + +## TransactionInstruction Objects + +```python +class TransactionInstruction(NamedTuple) +``` + +Transaction Instruction class. + + + +#### keys + +Public keys to include in this transaction Boolean represents whether this +pubkey needs to sign the transaction. + + + +#### program`_`id + +Program Id to execute. + + + +#### data + +Program input. + + + +#### from`_`solders + +```python +@classmethod +def from_solders(cls, + ixn: instruction.Instruction) -> "TransactionInstruction" +``` + +Convert from a `solders` instruction. + +:param ixn: The `solders` instruction. +:param The `solana-py` instruction. +:return: The `solders` instruction. + + + + +#### to`_`solders + +```python +def to_solders() -> instruction.Instruction +``` + +Convert to a `solders` instruction. + +**Returns**: + +The `solders` instruction. + diff --git a/docs/api/protocols/base.md b/docs/api/protocols/base.md index 889f02a489..172189403c 100644 --- a/docs/api/protocols/base.md +++ b/docs/api/protocols/base.md @@ -14,6 +14,24 @@ class Message() This class implements a message. + + +#### protocol`_`id + +type: PublicId + + + +#### protocol`_`specification`_`id + +type: PublicId + + + +#### serializer + +type: Type["Serializer"] + ## Performative Objects diff --git a/docs/api/protocols/dialogue/base.md b/docs/api/protocols/dialogue/base.md index e5e3be427e..203e277dde 100644 --- a/docs/api/protocols/dialogue/base.md +++ b/docs/api/protocols/dialogue/base.md @@ -226,6 +226,24 @@ class Dialogue(metaclass=_DialogueMeta) The dialogue class maintains state of a dialogue and manages it. + + +#### INITIAL`_`PERFORMATIVES + +type: FrozenSet[Message.Performative] + + + +#### TERMINAL`_`PERFORMATIVES + +type: FrozenSet[Message.Performative] + + + +#### VALID`_`REPLIES + +type: Dict[Message.Performative, FrozenSet[Message.Performative]] + ## Rules Objects diff --git a/docs/api/protocols/generator/common.md b/docs/api/protocols/generator/common.md index 4e2244f6b8..42842c1e4a 100644 --- a/docs/api/protocols/generator/common.md +++ b/docs/api/protocols/generator/common.md @@ -4,6 +4,12 @@ This module contains utility code for generator modules. + + +#### CURRENT`_`DIR + +type: ignore + #### is`_`installed diff --git a/docs/api/protocols/signing/tests/test_signing_dialogues.md b/docs/api/protocols/signing/tests/test_signing_dialogues.md index 23144f310f..45eee26b8e 100644 --- a/docs/api/protocols/signing/tests/test_signing_dialogues.md +++ b/docs/api/protocols/signing/tests/test_signing_dialogues.md @@ -14,6 +14,12 @@ class TestDialoguesSigning(BaseProtocolDialoguesTestCase) Test for the 'signing' protocol dialogues. + + +#### ROLE`_`FOR`_`THE`_`FIRST`_`MESSAGE + +CHECK + #### make`_`message`_`content diff --git a/docs/api/test_tools/test_cases.md b/docs/api/test_tools/test_cases.md index fdb77818e3..4e701a7569 100644 --- a/docs/api/test_tools/test_cases.md +++ b/docs/api/test_tools/test_cases.md @@ -25,6 +25,66 @@ def set_capfd_on_cli_runner(capfd: CaptureFixture) -> None Set pytest capfd on CLI runner + + +#### runner + +CLI runner + + + +#### author + +author + + + +#### subprocesses + +list of launched subprocesses + + + +#### threads + +list of started threads + + + +#### old`_`cwd + +current working directory path + + + +#### t + +temporary directory path + + + +#### current`_`agent`_`context + +the name of the current agent + + + +#### agents + +the set of created agents + + + +#### stdout + +dict of process.pid: string stdout + + + +#### stderr + +dict of process.pid: string stderr + #### set`_`agent`_`context @@ -906,6 +966,12 @@ Test case from an existing AEA project. Subclass this class and set `path_to_aea` properly. By default, it is assumed the project is inside the current working directory. + + +#### t + +temporary directory path + #### setup`_`class diff --git a/docs/build-aea-programmatically.md b/docs/build-aea-programmatically.md index 5f057401d0..2e68308406 100644 --- a/docs/build-aea-programmatically.md +++ b/docs/build-aea-programmatically.md @@ -9,7 +9,7 @@ Get the needed packages from IPFS: mkdir packages aea create my_aea cd my_aea -aea add protocol fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 --remote +aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local cd .. aea delete my_aea diff --git a/docs/connect-a-frontend.md b/docs/connect-a-frontend.md index 1f3fc44bc0..9085284814 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.22.0`) 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 (`valory/http_server:0.22.0`) 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.25.0`). In this scenario the Agent Communication Network can be used to send Envelopes from the AEA to the front-end. diff --git a/docs/connection.md b/docs/connection.md index b7de56ad54..3ed79b8b2f 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.0`, `fetchai/http_server:0.22.0` or `valory/http_client:0.23.0` 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.0`, `valory/http_server:0.22.0` or `valory/http_client:0.23.0` 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 29a06b5cbb..cd80629dd5 100644 --- a/docs/contract.md +++ b/docs/contract.md @@ -170,10 +170,10 @@ class MyContract(Contract): instance = cls.get_instance(ledger_api, contract_address) tx = instance.functions.createBatch( deployer_address, token_ids - ).buildTransaction( + ).build_transaction( { "gas": gas, - "gasPrice": ledger_api.api.toWei("50", "gwei"), + "gasPrice": ledger_api.api.to_wei("50", "gwei"), "nonce": nonce, } ) diff --git a/docs/decision-maker-transaction.md b/docs/decision-maker-transaction.md index ab9160f255..3013e14aee 100644 --- a/docs/decision-maker-transaction.md +++ b/docs/decision-maker-transaction.md @@ -6,7 +6,7 @@ First, get the packages directory from IPFS: mkdir packages aea create my_aea cd my_aea -aea add protocol open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 --remote +aea add protocol open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii --remote aea push protocol open_aea/signing --local cd .. aea delete my_aea diff --git a/docs/echo_demo.md b/docs/echo_demo.md index 06ff5a3dad..05ca66b6b8 100644 --- a/docs/echo_demo.md +++ b/docs/echo_demo.md @@ -7,7 +7,7 @@ This demo assumes you have followed the setup guide. The fastest way to have your first AEA is to fetch one that already exists! ``` bash -aea fetch open_aea/my_first_aea:0.1.0:bafybeihhrlcmu6dibftsg36m47uxi4inltsjvmoip5smvevq3caiwm3oo4 --remote +aea fetch open_aea/my_first_aea:0.1.0:bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm --remote cd my_first_aea ``` ### Install AEA dependencies diff --git a/docs/gym-skill.md b/docs/gym-skill.md index 67637a2874..dc035cebf9 100644 --- a/docs/gym-skill.md +++ b/docs/gym-skill.md @@ -19,7 +19,7 @@ Follow the Preliminaries and http connection guide we demonstrate how an AEA with an http server connection (e.g. `fetchai/http_server`) receives http payloads from web clients, translates them to messages conforming with the `fetchai/http` protocol and passes it to a skill (e.g. `fetchai/http_echo`) to process. The `fetchai/http` protocol in this case is used for communication between the connection and the skill. +In the http connection guide we demonstrate how an AEA with an http server connection (e.g. `valory/http_server`) receives http payloads from web clients, translates them to messages conforming with the `fetchai/http` protocol and passes it to a skill (e.g. `fetchai/http_echo`) to process. The `fetchai/http` protocol in this case is used for communication between the connection and the skill. ### Example 2 : AEA <> 3rd party server diff --git a/docs/ipfs_registry.md b/docs/ipfs_registry.md index f605045e13..85658e075e 100644 --- a/docs/ipfs_registry.md +++ b/docs/ipfs_registry.md @@ -38,11 +38,11 @@ Packages can be downloaded using both extended public ids and hashes Add the signing protocol using -`aea add protocol open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 --remote` +`aea add protocol open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii --remote` Or -`aea add protocol open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 --remote` +`aea add protocol open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii --remote` ## Publishing agents diff --git a/docs/multiplexer-standalone.md b/docs/multiplexer-standalone.md index b340a32e43..dde1957e6f 100644 --- a/docs/multiplexer-standalone.md +++ b/docs/multiplexer-standalone.md @@ -6,9 +6,9 @@ First, get the required packages from IPFS. mkdir packages aea create my_aea cd my_aea -aea add protocol fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 --remote +aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push connection fetchai/default --local -aea add connection fetchai/stub:0.21.0:bafybeiau4vkru44a4gwujp47vjg7kglxcf456dhmcuhi4lsdx2m2ykmv2a --remote +aea add connection fetchai/stub:0.21.0:bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi --remote aea push connection fetchai/stub --local cd .. aea delete my_aea diff --git a/docs/p2p-connection.md b/docs/p2p-connection.md index 1082933ecd..5bb5f5e167 100644 --- a/docs/p2p-connection.md +++ b/docs/p2p-connection.md @@ -26,7 +26,7 @@ Create one AEA as follows: ``` bash aea create my_genesis_aea cd my_genesis_aea -aea add connection valory/p2p_libp2p:0.1.0:bafybeiesrebjctihckjc4axtyrrmofidtu7ngaxgzaostd4vokevm7nu6q --remote +aea add connection valory/p2p_libp2p:0.1.0:bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy --remote aea config set agent.default_connection valory/p2p_libp2p:0.1.0 aea install aea build @@ -58,7 +58,7 @@ Create a second AEA: ``` bash aea create my_other_aea cd my_other_aea -aea add connection valory/p2p_libp2p:0.1.0:bafybeiesrebjctihckjc4axtyrrmofidtu7ngaxgzaostd4vokevm7nu6q --remote +aea add connection valory/p2p_libp2p:0.1.0:bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy --remote aea config set agent.default_connection valory/p2p_libp2p:0.1.0 aea install aea build diff --git a/docs/package_list.md b/docs/package_list.md index 5f3a8a031e..1be02360c2 100644 --- a/docs/package_list.md +++ b/docs/package_list.md @@ -1,41 +1,41 @@ | Package name | Package hash | | ------------------------------------------------------------- | ------------------------------------------------------------- | -| protocol/fetchai/gym/1.0.0 | `bafybeiez5c2t6cosejejdvdhozniyqzz3fciuemdzdqhh4zaj3dkhbuunu` | -| connection/fetchai/gym/0.19.0 | `bafybeiajoyj4ono4lsu5qhgkqrk65hyvyqkxnphycutxx4l6alc7hoak2i` | -| protocol/fetchai/default/1.0.0 | `bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4` | -| protocol/valory/acn/1.1.0 | `bafybeignmc5uh3vgpuckljcj2tgg7hdqyytkm6m5b6v6mxtazdcvubibva` | -| protocol/valory/contract_api/1.0.0 | `bafybeidv6wxpjyb2sdyibnmmum45et4zcla6tl63bnol6ztyoqvpl4spmy` | -| protocol/valory/http/1.0.0 | `bafybeifyoio7nlh5zzyn5yz7krkou56l22to3cwg7gw5v5o3vxwklibhty` | -| protocol/valory/ledger_api/1.0.0 | `bafybeibo4bdtcrxi2suyzldwoetjar6pqfzm6vt5xal22ravkkcvdmtksi` | -| connection/fetchai/http_server/0.22.0 | `bafybeihaax5od5zo5jk2l62hv4jwuwtxloh5mijozudpsjombqc4ncmi6i` | -| connection/fetchai/stub/0.21.0 | `bafybeiau4vkru44a4gwujp47vjg7kglxcf456dhmcuhi4lsdx2m2ykmv2a` | -| connection/valory/ledger/0.19.0 | `bafybeicgfupeudtmvehbwziqfxiz6ztsxr5rxzvalzvsdsspzz73o5fzfi` | -| connection/valory/p2p_libp2p/0.1.0 | `bafybeiesrebjctihckjc4axtyrrmofidtu7ngaxgzaostd4vokevm7nu6q` | -| connection/valory/p2p_libp2p_client/0.1.0 | `bafybeidwcobzb7ut3efegoedad7jfckvt2n6prcmd4g7xnkm6hp6aafrva` | -| connection/valory/p2p_libp2p_mailbox/0.1.0 | `bafybeiczoc27iefca3l5fc66e3bpxqu4ntgf5s4qpncbjsrdy4pf7cazlq` | -| contract/fetchai/erc1155/0.22.0 | `bafybeidjvb4ojaw2trxu4rlxq3blppfherkldwz4x5spnpvef5n34jvmmm` | -| protocol/fetchai/fipa/1.0.0 | `bafybeiaoblqdglj4ln4otpmmsrimtxpdxqkzuhttsyabn7gi2rvzcx4pbm` | -| protocol/fetchai/oef_search/1.0.0 | `bafybeieczka2vj76huafg3s5lwyyzvql36onzrhznfgknoo6trmpjwxfka` | -| protocol/fetchai/state_update/1.0.0 | `bafybeicmafbatrvxb3zwu3sareh6rbegjflh3yqqbyftmay73h7btozrlq` | -| protocol/open_aea/signing/1.0.0 | `bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4` | -| skill/fetchai/echo/0.19.0 | `bafybeidixh2eg4bnuvmdbwwhe2m5zq6e2tc6mfn5rwvzh6eqp6v7vxyopi` | +| protocol/fetchai/gym/1.0.0 | `bafybeidepuani7dw6r2wwmtxfeefqwhnctprmwatzqbxg2achstc6kpfke` | +| connection/fetchai/gym/0.19.0 | `bafybeiguq4eduf35lvs3ltmi3jabpokz6raadrje3c274f5dnvfipdl7jm` | +| protocol/fetchai/default/1.0.0 | `bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm` | +| protocol/valory/acn/1.1.0 | `bafybeic2pxzfc3voxl2ejhcqyf2ehm4wm5gxvgx7bliloiqi2uppmq6weu` | +| protocol/valory/contract_api/1.0.0 | `bafybeialhbjvwiwcnqq3ysxcyemobcbie7xza66gaofcvla5njezkvhcka` | +| protocol/valory/http/1.0.0 | `bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe` | +| protocol/valory/ledger_api/1.0.0 | `bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru` | +| connection/fetchai/http_server/0.22.0 | `bafybeihvscddpxjbtqsetngmxo3kiht2wqhosmwiyuh3f6zjti3x3byu5u` | +| connection/fetchai/stub/0.21.0 | `bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi` | +| connection/valory/ledger/0.19.0 | `bafybeigo5vst3zlltkouenwxuzn6c47yr2fbbml6dl2o32rfnsezmalgnu` | +| connection/valory/p2p_libp2p/0.1.0 | `bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy` | +| connection/valory/p2p_libp2p_client/0.1.0 | `bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq` | +| connection/valory/p2p_libp2p_mailbox/0.1.0 | `bafybeieufv6tbei3vza7bg7ggzsvyvwmzps5kghxlar3drhme6d7mxawvy` | +| contract/fetchai/erc1155/0.22.0 | `bafybeiff7a6xncyad53o2r7lekpnhexcspze6ocy55xtpzqeuacnlpunm4` | +| protocol/fetchai/fipa/1.0.0 | `bafybeid6o7dxutkendclxxtxo3pyizrfho3vxyj5j5sowkysmuqamywb24` | +| protocol/fetchai/oef_search/1.0.0 | `bafybeicysyqgag7gsbpvly5mzhlwwiosl7gupgmohx233gynw7xtgsxewy` | +| protocol/fetchai/state_update/1.0.0 | `bafybeiefezh5ei6gntomi6g5iq4raabktari3wc6t4g6jf23bgo7cgwlcq` | +| protocol/open_aea/signing/1.0.0 | `bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii` | +| skill/fetchai/echo/0.19.0 | `bafybeibtjwgshqkgn5og7izogitnc66ug7pfhikcxlf2y46ixknpoxeyee` | | skill/fetchai/error_test_skill/0.1.0 | `bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu` | -| skill/fetchai/gym/0.20.0 | `bafybeiebrkzxf4n7m234nwqvxvoqqsqgq4yb4luv6ehlzy6ljhee74lbqi` | -| skill/fetchai/http_echo/0.20.0 | `bafybeiby2vrgfphhuvthg3kybki4mx5a5mkrpwg4mhdaa3igsr6smuvaoa` | -| agent/fetchai/error_test/0.1.0 | `bafybeibz7yxyxdq5b7kaanecqj5tmorrm6s6gqtvvm3i6jmnh5q43krsea` | -| agent/fetchai/gym_aea/0.25.0 | `bafybeicgf5bpgstpn2exosfiww5cj6jsdv2pr4hjcwbilezsqgexlgih3u` | -| agent/fetchai/my_first_aea/0.27.0 | `bafybeifizl4vayke7xm7v7ubsnffrubslmd5uy4glbcl7petg3kq323o6q` | -| agent/open_aea/gym_aea/0.1.0 | `bafybeiculyr3kbpnqoypt4vqnzthrazcqyu3hnajtdb2fsag53pfhzk3ye` | -| agent/open_aea/http_echo/0.1.0 | `bafybeidnmee6kefsq2nef6gsrg4qmhuky5dfstbg7mi6ophdzedoxbi7au` | -| agent/open_aea/my_first_aea/0.1.0 | `bafybeihhrlcmu6dibftsg36m47uxi4inltsjvmoip5smvevq3caiwm3oo4` | -| connection/fetchai/local/0.20.0 | `bafybeial46nnequrvt2qgjp436lyuviszk6gey3vdc4rojvzx7o7z62pkq` | -| connection/valory/http_client/0.23.0 | `bafybeidykl4elwbcjkqn32wt5h4h7tlpeqovrcq3c5bcplt6nhpznhgczi` | -| connection/valory/test_libp2p/0.1.0 | `bafybeid6hlu6nza3tvxcthannnfjqw3cg74l4nlnwhpubvkdjvrgse6laa` | -| protocol/fetchai/tac/1.0.0 | `bafybeigynloejjtzetheslralqeo32zywm2nta4zuuqksnzly4ochqagca` | -| skill/fetchai/erc1155_client/0.28.0 | `bafybeihmftlqveacu6jp4qywz2bjhffnexltojc236oiyw257xxp7tjbqy` | -| skill/fetchai/erc1155_deploy/0.30.0 | `bafybeiec32rym5eg22w7r6sz5aaypbvmeisccvffjkmamuejty7f5cxww4` | -| skill/fetchai/error/0.17.0 | `bafybeidfjidoly2qqjhp7b7oajuvshkrno5lp2wpsx7iokofenbhtbgn3m` | -| skill/fetchai/fipa_dummy_buyer/0.2.0 | `bafybeiamyqktgoskrwwwcpe45sxnnm4yuwgfbxd72oaahorgkiwrg7gaim` | -| skill/fetchai/generic_buyer/0.26.0 | `bafybeif77cptoz7vajjeseukgijz6m5vbfiocntzu3ktc7y2xomrpqaajy` | -| skill/fetchai/generic_seller/0.27.0 | `bafybeiakmex4ek3cihjc5qqzm2j5x2fd2ybivv5txx24ueil5seie42nsm` | +| skill/fetchai/gym/0.20.0 | `bafybeifaccpsmby27az6geu4d6m7xcjk2hop7ihtleqeeasphnhn2dp234` | +| skill/fetchai/http_echo/0.20.0 | `bafybeieysvwshmy2rlfzqclcfhl263roy6z3skvmy3ikmfcoioxhnhp67i` | +| agent/fetchai/error_test/0.1.0 | `bafybeif6q4pyu4vvtaljm33rw2fft3f5fu33byhku3qkspy4vhgzczqhwy` | +| agent/fetchai/gym_aea/0.25.0 | `bafybeif5c657r3ixuosbyihtsdzr2tqifikxgy5e6t7ur2jmhtiolina3m` | +| agent/fetchai/my_first_aea/0.27.0 | `bafybeicrgya4gln4lqr3ba76t2cuyik37lcgr64kzna2fkoseseobytaa4` | +| agent/open_aea/gym_aea/0.1.0 | `bafybeibyyl4wtnrfxeoed3kjnlftphkcikdqrgf76u34v4wbvwgsqfqrgy` | +| agent/open_aea/http_echo/0.1.0 | `bafybeie6dxx5zbu6bz7at7kqj3thjvvzucj45f3tksbio5dg23ywsbb2ty` | +| agent/open_aea/my_first_aea/0.1.0 | `bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm` | +| connection/fetchai/local/0.20.0 | `bafybeigukufpgy2sdkv5qqde47dhigbjitxcrxwg6sl6unlpbc7wbxqyhm` | +| connection/valory/http_client/0.23.0 | `bafybeifgeqgryx6b3s6eseyzyezygmeitcpt3tkor2eiycozoi6clgdrny` | +| connection/valory/test_libp2p/0.1.0 | `bafybeih4vz7pprbjhe5g4tnf52ttkooii66woxbhifjc7wk5xdt6b6asiu` | +| protocol/fetchai/tac/1.0.0 | `bafybeiaukfwe7wbpikztprlmrfpphsxqpdzgamkbhvqyz54tl3k73kzsvi` | +| skill/fetchai/erc1155_client/0.28.0 | `bafybeibffkywiuz5gwm6yn4v2fhkz35i77zl5ya4tzq4wksvga2mvkeojm` | +| skill/fetchai/erc1155_deploy/0.30.0 | `bafybeif6dmam4pvsdesvgb6n3ga4uf7dxikaynbqomxpswmhqlvcuz7vti` | +| skill/fetchai/error/0.17.0 | `bafybeignei6feootyjzrqdt5j5yx7r4nrzuy6tdgdgsmrncldt5bud2dri` | +| skill/fetchai/fipa_dummy_buyer/0.2.0 | `bafybeid7rzqruvc3fkesueig2mbzy2qsfplieircyjzwbdl7c6q5eauiky` | +| skill/fetchai/generic_buyer/0.26.0 | `bafybeiebwhfzs7vbdrnm7cqu5dc4r3wqdaeirmps5pfwexjd3ms5ss7xk4` | +| skill/fetchai/generic_seller/0.27.0 | `bafybeiapnkdtn3qrh36cxpbhalv2yaunnauieo7sxori46a7ohsp7xuzlq` | | skill/fetchai/task_test_skill/0.1.0 | `bafybeidv77u2xl52mnxakwvh7fuh46aiwfpteyof4eaptfd4agoi6cdble` | diff --git a/docs/quickstart.md b/docs/quickstart.md index 9fcaf8a214..fa389c9ede 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -168,7 +168,7 @@ This is a simple demo that introduces you to the main components of an AEA. The fastest way to have your first AEA is to fetch one that already exists! ``` bash -aea fetch open_aea/my_first_aea:0.1.0:bafybeihhrlcmu6dibftsg36m47uxi4inltsjvmoip5smvevq3caiwm3oo4 --remote +aea fetch open_aea/my_first_aea:0.1.0:bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm --remote cd my_first_aea ``` ### Install AEA dependencies @@ -264,14 +264,14 @@ cd my_first_aea
Second, add the stub connection to the project. ``` bash -aea add connection fetchai/stub:0.21.0:bafybeiau4vkru44a4gwujp47vjg7kglxcf456dhmcuhi4lsdx2m2ykmv2a --remote +aea add connection fetchai/stub:0.21.0:bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi --remote ```
Add the echo skill
Third, add the echo skill to the project. ``` bash -aea add skill fetchai/echo:0.19.0:bafybeidixh2eg4bnuvmdbwwhe2m5zq6e2tc6mfn5rwvzh6eqp6v7vxyopi --remote +aea add skill fetchai/echo:0.19.0:bafybeibtjwgshqkgn5og7izogitnc66ug7pfhikcxlf2y46ixknpoxeyee --remote ``` This copies the fetchai/echo:0.19.0 skill code containing the "behaviours", and "handlers" into the project, ready to run. The identifier of the skill fetchai/echo:0.19.0 consists of the name of the author of the skill, followed by the skill name and its version. @@ -328,7 +328,7 @@ First, get the needed packages directory from IPFS (execute from the working dir ```bash mkdir packages cd my_first_aea -aea add protocol fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 --remote +aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local cd .. aea delete my_aea diff --git a/docs/raspberry-set-up.md b/docs/raspberry-set-up.md index 21beef2fe9..0c5996720a 100644 --- a/docs/raspberry-set-up.md +++ b/docs/raspberry-set-up.md @@ -40,10 +40,10 @@ First, install pipenv: sudo apt-get install pipenv ``` -Once installed, create and launch a clean virtual environment with Python 3.7: +Once installed, create and launch a clean virtual environment with Python 3.8: ``` bash -pipenv --python 3.7 && pipenv shell +pipenv --python 3.8 && pipenv shell ``` Finally, install the AEA framework from PyPI: diff --git a/docs/registry.md b/docs/registry.md index f3b5dea9ad..1b18206934 100644 --- a/docs/registry.md +++ b/docs/registry.md @@ -22,7 +22,7 @@ Successfully added protocol 'open_aea/signing:1.0.0'. Once we have an agent, we can add individual components to the agent as so; ``` -aea add skill fetchai/echo:0.19.0:bafybeidixh2eg4bnuvmdbwwhe2m5zq6e2tc6mfn5rwvzh6eqp6v7vxyopi --remote +aea add skill fetchai/echo:0.19.0:bafybeibtjwgshqkgn5og7izogitnc66ug7pfhikcxlf2y46ixknpoxeyee --remote Registry path not provided and local registry `packages` not found in current (.) and parent directory. Trying remote registry (`--remote`). Adding skill 'fetchai/echo:latest'... diff --git a/docs/upgrading.md b/docs/upgrading.md index fb463fb889..75536b1b95 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -9,6 +9,50 @@ Below we describe the additional manual steps required to upgrade between differ ### Upgrade guide +## `v1.41.0` to `v1.41.0.post1` + +- No backwards incompatible changes + +## `v1.40.0` to `v1.41.0` + +- The way the dependencies will be selected for installation when running `aea install` has changed. Before this version, the versions were being merging all of the versions for a python package and using the most compatible version specifier possible. With this release, this behaviour will be replaced by overriding the dependencies in the following order `extra dependencies provided by flag > agent > skill > connection > contract > protocol` what this means is, let's say you have 3 packages with a same python package as a dependency + +* protocol package with `protobuf>1.0.0` +* connection package with `protobuf==1.0.0` +* skill package with `protobuf>=1.0.0,<2.0.0` + +`protobuf>=1.0.0,<2.0.0` will be used for installation since skill has higher priority over protocol and connection packages. + +## `v1.39.0.post1` to `v1.40.0` + +- `open-aea-web3` has been replaced with `web3py` +- `protobuf` has been bumped to `protobuf>=4.21.6,<5.0.0`, this means you will have to bump your protocol generator to `v24.3` and generate your protocol packages again. +- Because of the protobuf version bump hardware wallet plugin might now work as expected, so please export `PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python"` to use the hardware wallet without any issues +- The `valory/open-aea-user` image will use Python 3.11 as default interpreter for running AEAs + +## `v1.39.0` to `v1.39.0.post1` + +- No backwards incompatible changes + +## `v1.38.0` to `v1.39.0` + +- No backwards incompatible changes + +## `v1.37.0` to `v1.38.0` + +- `web3py` has been replaced with `open-aea-web3` and we forked this from `web3py@v6.0.0`, that means the method names will use the `snake_case` and the `camelCase` naming has been deprecated +- `apduboy` has been deprecated as a dependency +- `flashbots` has been replaced with `open-aea-flashbots` +- Support for `Python 3.7` has been deprecated + +## `v1.36.0` to `v1.37.0` + +- No backwards incompatible changes + +## `v1.35.0` to `v1.36.0` + +- No backwards incompatible changes + ## `v1.34.0` to `v1.35.0` - No backwards incompatible changes diff --git a/examples/gym_ex/proxy/env.py b/examples/gym_ex/proxy/env.py index 25c6cf2453..e547c85b9e 100755 --- a/examples/gym_ex/proxy/env.py +++ b/examples/gym_ex/proxy/env.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -273,7 +273,6 @@ def _decode_status(self, envelope: Envelope) -> None: gym_msg.performative == GymMessage.Performative.STATUS and gym_msg.content.get("reset", "failure") == "success" ): - return None raise ValueError( "Unexpected performative or no step_id: {}".format( diff --git a/examples/tac_deploy/Dockerfile b/examples/tac_deploy/Dockerfile index d2864c0490..d47b945867 100644 --- a/examples/tac_deploy/Dockerfile +++ b/examples/tac_deploy/Dockerfile @@ -19,7 +19,7 @@ RUN apk add --no-cache go # aea installation RUN python -m pip install --upgrade pip -RUN pip install --upgrade --force-reinstall aea[all]==1.35.0 +RUN pip install --upgrade --force-reinstall open-aea[all]==1.41.0.post1 # directories and aea cli config COPY /.aea /home/.aea diff --git a/packages/fetchai/agents/error_test/aea-config.yaml b/packages/fetchai/agents/error_test/aea-config.yaml index e679223357..9ce131997b 100644 --- a/packages/fetchai/agents/error_test/aea-config.yaml +++ b/packages/fetchai/agents/error_test/aea-config.yaml @@ -8,7 +8,7 @@ fingerprint: README.md: bafybeig75bdp2xp2k44ohxt277etnzeqhwdkwsjfciz7upwgymawmfo2vm fingerprint_ignore_patterns: [] connections: -- fetchai/stub:0.21.0:bafybeiau4vkru44a4gwujp47vjg7kglxcf456dhmcuhi4lsdx2m2ykmv2a +- fetchai/stub:0.21.0:bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi contracts: [] protocols: [] skills: diff --git a/packages/fetchai/agents/gym_aea/aea-config.yaml b/packages/fetchai/agents/gym_aea/aea-config.yaml index b2d2c82646..82ae2ce81a 100644 --- a/packages/fetchai/agents/gym_aea/aea-config.yaml +++ b/packages/fetchai/agents/gym_aea/aea-config.yaml @@ -9,15 +9,15 @@ fingerprint: README.md: bafybeiadln5ca6tu6rzbsgjpeluf6nz5efxl3u223c3vxwgf2iynkj5n6q fingerprint_ignore_patterns: [] connections: -- fetchai/gym:0.19.0:bafybeiajoyj4ono4lsu5qhgkqrk65hyvyqkxnphycutxx4l6alc7hoak2i +- fetchai/gym:0.19.0:bafybeiguq4eduf35lvs3ltmi3jabpokz6raadrje3c274f5dnvfipdl7jm contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- fetchai/gym:1.0.0:bafybeiez5c2t6cosejejdvdhozniyqzz3fciuemdzdqhh4zaj3dkhbuunu -- fetchai/state_update:1.0.0:bafybeicmafbatrvxb3zwu3sareh6rbegjflh3yqqbyftmay73h7btozrlq -- open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- fetchai/gym:1.0.0:bafybeidepuani7dw6r2wwmtxfeefqwhnctprmwatzqbxg2achstc6kpfke +- fetchai/state_update:1.0.0:bafybeiefezh5ei6gntomi6g5iq4raabktari3wc6t4g6jf23bgo7cgwlcq +- open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii skills: -- fetchai/gym:0.20.0:bafybeiebrkzxf4n7m234nwqvxvoqqsqgq4yb4luv6ehlzy6ljhee74lbqi +- fetchai/gym:0.20.0:bafybeifaccpsmby27az6geu4d6m7xcjk2hop7ihtleqeeasphnhn2dp234 default_connection: fetchai/gym:0.19.0 default_ledger: fetchai required_ledgers: diff --git a/packages/fetchai/agents/my_first_aea/aea-config.yaml b/packages/fetchai/agents/my_first_aea/aea-config.yaml index 1d79596227..37db03e548 100644 --- a/packages/fetchai/agents/my_first_aea/aea-config.yaml +++ b/packages/fetchai/agents/my_first_aea/aea-config.yaml @@ -8,14 +8,14 @@ fingerprint: README.md: bafybeiftiqiqpxn7ghrurhepquzqzk3su3x6wanlnolt2uj772fzgz574m fingerprint_ignore_patterns: [] connections: -- fetchai/stub:0.21.0:bafybeiau4vkru44a4gwujp47vjg7kglxcf456dhmcuhi4lsdx2m2ykmv2a +- fetchai/stub:0.21.0:bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- fetchai/state_update:1.0.0:bafybeicmafbatrvxb3zwu3sareh6rbegjflh3yqqbyftmay73h7btozrlq -- open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- fetchai/state_update:1.0.0:bafybeiefezh5ei6gntomi6g5iq4raabktari3wc6t4g6jf23bgo7cgwlcq +- open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii skills: -- fetchai/echo:0.19.0:bafybeidixh2eg4bnuvmdbwwhe2m5zq6e2tc6mfn5rwvzh6eqp6v7vxyopi +- fetchai/echo:0.19.0:bafybeibtjwgshqkgn5og7izogitnc66ug7pfhikcxlf2y46ixknpoxeyee default_connection: fetchai/stub:0.21.0 default_ledger: fetchai required_ledgers: diff --git a/packages/fetchai/connections/gym/connection.yaml b/packages/fetchai/connections/gym/connection.yaml index 7b2b8db2b1..72b4bc8d78 100644 --- a/packages/fetchai/connections/gym/connection.yaml +++ b/packages/fetchai/connections/gym/connection.yaml @@ -14,7 +14,7 @@ fingerprint: fingerprint_ignore_patterns: [] connections: [] protocols: -- fetchai/gym:1.0.0:bafybeiez5c2t6cosejejdvdhozniyqzz3fciuemdzdqhh4zaj3dkhbuunu +- fetchai/gym:1.0.0:bafybeidepuani7dw6r2wwmtxfeefqwhnctprmwatzqbxg2achstc6kpfke class_name: GymConnection config: env: '' diff --git a/packages/fetchai/connections/local/connection.yaml b/packages/fetchai/connections/local/connection.yaml index c776a09269..4147ec8cd3 100644 --- a/packages/fetchai/connections/local/connection.yaml +++ b/packages/fetchai/connections/local/connection.yaml @@ -10,14 +10,14 @@ fingerprint: __init__.py: bafybeibojyrqpiw5xkemsnrdie572mixa5ud4sxdtmpgfutl253kj4zjga connection.py: bafybeictfwockpuemdsgkn35o5bmfjmtptffb4xqd2optgyortxpkxa6yi tests/__init__.py: bafybeiecschrd664thii7emksuuziz3xrporjptci4wodsgdavlzpfzhqi - tests/test_misc.py: bafybeidf6xwpthgubtu3bmylggzyvcfetqmp5zlbqdoqp3tes7ucdsriuu + tests/test_misc.py: bafybeielp624jc7vqaikjyshgrpnlbhvdxrlvjezhd2kmthtuhf7atfzx4 tests/test_search_services.py: bafybeibcgnt5db5ms2zbshlxthzralqvmudyzy3llxurqkjg5cm7xhx56m fingerprint_ignore_patterns: [] connections: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- fetchai/fipa:1.0.0:bafybeiaoblqdglj4ln4otpmmsrimtxpdxqkzuhttsyabn7gi2rvzcx4pbm -- fetchai/oef_search:1.0.0:bafybeieczka2vj76huafg3s5lwyyzvql36onzrhznfgknoo6trmpjwxfka +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- fetchai/fipa:1.0.0:bafybeid6o7dxutkendclxxtxo3pyizrfho3vxyj5j5sowkysmuqamywb24 +- fetchai/oef_search:1.0.0:bafybeicysyqgag7gsbpvly5mzhlwwiosl7gupgmohx233gynw7xtgsxewy class_name: OEFLocalConnection config: {} excluded_protocols: [] diff --git a/packages/fetchai/connections/local/tests/test_misc.py b/packages/fetchai/connections/local/tests/test_misc.py index 492abb992d..a7220b02a2 100644 --- a/packages/fetchai/connections/local/tests/test_misc.py +++ b/packages/fetchai/connections/local/tests/test_misc.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -67,7 +67,6 @@ def make_local_connection( def test_connection(): """Test that two OEF local connection can connect to a local node.""" with LocalNode() as node: - multiplexer1 = Multiplexer( [make_local_connection("multiplexer1", "my_public_key_1", node)] ) @@ -143,7 +142,6 @@ async def test_receiving_returns_none_when_error_occurs(): def test_communication(): """Test that two multiplexer can communicate through the node.""" with LocalNode() as node: - multiplexer1 = Multiplexer( [make_local_connection("multiplexer1", "multiplexer1_public_key", node)] ) diff --git a/packages/fetchai/connections/stub/connection.yaml b/packages/fetchai/connections/stub/connection.yaml index ac890bcd82..cc9f5f1a12 100644 --- a/packages/fetchai/connections/stub/connection.yaml +++ b/packages/fetchai/connections/stub/connection.yaml @@ -16,7 +16,7 @@ fingerprint_ignore_patterns: - ./input_file connections: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm class_name: StubConnection config: input_file: ./input_file diff --git a/packages/fetchai/contracts/erc1155/contract.py b/packages/fetchai/contracts/erc1155/contract.py index dff6d939c4..f97d9755d2 100644 --- a/packages/fetchai/contracts/erc1155/contract.py +++ b/packages/fetchai/contracts/erc1155/contract.py @@ -115,10 +115,10 @@ def get_create_batch_transaction( # pylint: disable=unused-argument instance = cls.get_instance(ledger_api, contract_address) tx = instance.functions.createBatch( deployer_address, token_ids - ).buildTransaction( + ).build_transaction( { "gas": gas, - "gasPrice": ledger_api.api.toWei("50", "gwei"), + "gasPrice": ledger_api.api.to_wei("50", "gwei"), "nonce": nonce, } ) @@ -169,11 +169,11 @@ def get_create_single_transaction( nonce = ledger_api.api.eth.get_transaction_count(deployer_address) instance = cls.get_instance(ledger_api, contract_address) tx = instance.functions.createSingle( - deployer_address, token_id, data - ).buildTransaction( + deployer_address, token_id, cast(bytes, data).decode(encoding="utf-8") + ).build_transaction( { "gas": gas, - "gasPrice": ledger_api.api.toWei("50", "gwei"), + "gasPrice": ledger_api.api.to_wei("50", "gwei"), "nonce": nonce, } ) @@ -230,10 +230,10 @@ def get_mint_batch_transaction( instance = cls.get_instance(ledger_api, contract_address) tx = instance.functions.mintBatch( recipient_address, token_ids, mint_quantities, data - ).buildTransaction( + ).build_transaction( { "gas": gas, - "gasPrice": ledger_api.api.toWei("50", "gwei"), + "gasPrice": ledger_api.api.to_wei("50", "gwei"), "nonce": nonce, } ) @@ -328,10 +328,10 @@ def get_mint_single_transaction( instance = cls.get_instance(ledger_api, contract_address) tx = instance.functions.mint( recipient_address, token_id, mint_quantity, data - ).buildTransaction( + ).build_transaction( { "gas": gas, - "gasPrice": ledger_api.api.toWei("50", "gwei"), + "gasPrice": ledger_api.api.to_wei("50", "gwei"), "nonce": nonce, } ) @@ -449,7 +449,7 @@ def get_atomic_swap_single_transaction( gas = gas if gas is not None else DEFAUT_ETH_ATOMIC_SWAP_GAS_LIMIT nonce = ledger_api.api.eth.get_transaction_count(from_address) instance = cls.get_instance(ledger_api, contract_address) - value_eth_wei = ledger_api.api.toWei(value, "ether") + value_eth_wei = ledger_api.api.to_wei(value, "ether") tx = instance.functions.trade( from_address, to_address, @@ -460,12 +460,12 @@ def get_atomic_swap_single_transaction( trade_nonce, signature, data, - ).buildTransaction( + ).build_transaction( { "gas": gas, "from": from_address, "value": value_eth_wei, - "gasPrice": ledger_api.api.toWei("50", "gwei"), + "gasPrice": ledger_api.api.to_wei("50", "gwei"), "nonce": nonce, } ) @@ -670,7 +670,7 @@ def get_atomic_swap_batch_transaction( gas = gas if gas is not None else DEFAUT_ETH_ATOMIC_SWAP_GAS_LIMIT nonce = ledger_api.api.eth.get_transaction_count(from_address) instance = cls.get_instance(ledger_api, contract_address) - value_eth_wei = ledger_api.api.toWei(value, "ether") + value_eth_wei = ledger_api.api.to_wei(value, "ether") tx = instance.functions.tradeBatch( from_address, to_address, @@ -681,12 +681,12 @@ def get_atomic_swap_batch_transaction( trade_nonce, signature, data, - ).buildTransaction( + ).build_transaction( { "gas": gas, "from": from_address, "value": value_eth_wei, - "gasPrice": ledger_api.api.toWei("50", "gwei"), + "gasPrice": ledger_api.api.to_wei("50", "gwei"), "nonce": nonce, } ) @@ -840,7 +840,7 @@ def get_hash_single( instance = cls.get_instance(ledger_api, contract_address) from_address_hash = instance.functions.getAddress(from_address).call() to_address_hash = instance.functions.getAddress(to_address).call() - value_eth_wei = ledger_api.api.toWei(value, "ether") + value_eth_wei = ledger_api.api.to_wei(value, "ether") tx_hash = cls._get_hash_single( _from=from_address_hash, _to=to_address_hash, @@ -935,7 +935,7 @@ def get_hash_batch( instance = cls.get_instance(ledger_api, contract_address) from_address_hash = instance.functions.getAddress(from_address).call() to_address_hash = instance.functions.getAddress(to_address).call() - value_eth_wei = ledger_api.api.toWei(value, "ether") + value_eth_wei = ledger_api.api.to_wei(value, "ether") tx_hash = cls._get_hash_batch( _from=from_address_hash, _to=to_address_hash, diff --git a/packages/fetchai/contracts/erc1155/contract.yaml b/packages/fetchai/contracts/erc1155/contract.yaml index d388e213f6..df399d6eb7 100644 --- a/packages/fetchai/contracts/erc1155/contract.yaml +++ b/packages/fetchai/contracts/erc1155/contract.yaml @@ -11,7 +11,7 @@ fingerprint: build/Migrations.json: bafybeih3i7gw7wekpsw7eylufug26dqphxara7acclv45mgkwy2bsookye build/erc1155.json: bafybeifopttvhbk7gsi3iqwewwfhtytrld6o4ooeb7xjmlons3v6m25zna build/erc1155.wasm: bafybeicabhxaz2syhzmoobrmbi5gt47txtvhkavs5mum2fxcgo2nb2vxl4 - contract.py: bafybeifasrplvubavbk7kjrzbbt3p7edve5foze3kjzchyhpb4q5hr67ni + contract.py: bafybeich7izxsdqrx4ntqgpuydho3v3hdkaysucbw6ms5b6m3vc72ok5b4 contracts/Migrations.sol: bafybeigdr5xyir4mhnqk4vp6hpivu2m2kq4jnlq7orwb7wqtgjzfihw2cm contracts/erc1155.vy: bafybeieoxkgqprmmgvl2xdqtch4payvxzpw3c76thmtrl7vbmc6zxzl2a4 migrations/1_initial_migration.js: bafybeigzg7dadlq7sepncquzoo5hgs7q2pwvbhzilolgkjkr3jacb2owvy diff --git a/packages/fetchai/protocols/default/__init__.py b/packages/fetchai/protocols/default/__init__.py index f43b760cff..e112ce097a 100644 --- a/packages/fetchai/protocols/default/__init__.py +++ b/packages/fetchai/protocols/default/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the default protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.fetchai.protocols.default.message import DefaultMessage diff --git a/packages/fetchai/protocols/default/default_pb2.py b/packages/fetchai/protocols/default/default_pb2.py index 423f18f99c..93e2e34806 100644 --- a/packages/fetchai/protocols/default/default_pb2.py +++ b/packages/fetchai/protocols/default/default_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,102 +16,27 @@ b'\n\rdefault.proto\x12\x1a\x61\x65\x61.fetchai.default.v1_0_0"\xb6\x06\n\x0e\x44\x65\x66\x61ultMessage\x12N\n\x05\x62ytes\x18\x05 \x01(\x0b\x32=.aea.fetchai.default.v1_0_0.DefaultMessage.Bytes_PerformativeH\x00\x12J\n\x03\x65nd\x18\x06 \x01(\x0b\x32;.aea.fetchai.default.v1_0_0.DefaultMessage.End_PerformativeH\x00\x12N\n\x05\x65rror\x18\x07 \x01(\x0b\x32=.aea.fetchai.default.v1_0_0.DefaultMessage.Error_PerformativeH\x00\x1a\xe4\x01\n\tErrorCode\x12V\n\nerror_code\x18\x01 \x01(\x0e\x32\x42.aea.fetchai.default.v1_0_0.DefaultMessage.ErrorCode.ErrorCodeEnum"\x7f\n\rErrorCodeEnum\x12\x18\n\x14UNSUPPORTED_PROTOCOL\x10\x00\x12\x12\n\x0e\x44\x45\x43ODING_ERROR\x10\x01\x12\x13\n\x0fINVALID_MESSAGE\x10\x02\x12\x15\n\x11UNSUPPORTED_SKILL\x10\x03\x12\x14\n\x10INVALID_DIALOGUE\x10\x04\x1a%\n\x12\x42ytes_Performative\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x1a\x85\x02\n\x12\x45rror_Performative\x12H\n\nerror_code\x18\x01 \x01(\x0b\x32\x34.aea.fetchai.default.v1_0_0.DefaultMessage.ErrorCode\x12\x11\n\terror_msg\x18\x02 \x01(\t\x12`\n\nerror_data\x18\x03 \x03(\x0b\x32L.aea.fetchai.default.v1_0_0.DefaultMessage.Error_Performative.ErrorDataEntry\x1a\x30\n\x0e\x45rrorDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x12\n\x10\x45nd_PerformativeB\x0e\n\x0cperformativeb\x06proto3' ) - -_DEFAULTMESSAGE = DESCRIPTOR.message_types_by_name["DefaultMessage"] -_DEFAULTMESSAGE_ERRORCODE = _DEFAULTMESSAGE.nested_types_by_name["ErrorCode"] -_DEFAULTMESSAGE_BYTES_PERFORMATIVE = _DEFAULTMESSAGE.nested_types_by_name[ - "Bytes_Performative" -] -_DEFAULTMESSAGE_ERROR_PERFORMATIVE = _DEFAULTMESSAGE.nested_types_by_name[ - "Error_Performative" -] -_DEFAULTMESSAGE_ERROR_PERFORMATIVE_ERRORDATAENTRY = ( - _DEFAULTMESSAGE_ERROR_PERFORMATIVE.nested_types_by_name["ErrorDataEntry"] -) -_DEFAULTMESSAGE_END_PERFORMATIVE = _DEFAULTMESSAGE.nested_types_by_name[ - "End_Performative" -] -_DEFAULTMESSAGE_ERRORCODE_ERRORCODEENUM = _DEFAULTMESSAGE_ERRORCODE.enum_types_by_name[ - "ErrorCodeEnum" -] -DefaultMessage = _reflection.GeneratedProtocolMessageType( - "DefaultMessage", - (_message.Message,), - { - "ErrorCode": _reflection.GeneratedProtocolMessageType( - "ErrorCode", - (_message.Message,), - { - "DESCRIPTOR": _DEFAULTMESSAGE_ERRORCODE, - "__module__": "default_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.default.v1_0_0.DefaultMessage.ErrorCode) - }, - ), - "Bytes_Performative": _reflection.GeneratedProtocolMessageType( - "Bytes_Performative", - (_message.Message,), - { - "DESCRIPTOR": _DEFAULTMESSAGE_BYTES_PERFORMATIVE, - "__module__": "default_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.default.v1_0_0.DefaultMessage.Bytes_Performative) - }, - ), - "Error_Performative": _reflection.GeneratedProtocolMessageType( - "Error_Performative", - (_message.Message,), - { - "ErrorDataEntry": _reflection.GeneratedProtocolMessageType( - "ErrorDataEntry", - (_message.Message,), - { - "DESCRIPTOR": _DEFAULTMESSAGE_ERROR_PERFORMATIVE_ERRORDATAENTRY, - "__module__": "default_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.default.v1_0_0.DefaultMessage.Error_Performative.ErrorDataEntry) - }, - ), - "DESCRIPTOR": _DEFAULTMESSAGE_ERROR_PERFORMATIVE, - "__module__": "default_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.default.v1_0_0.DefaultMessage.Error_Performative) - }, - ), - "End_Performative": _reflection.GeneratedProtocolMessageType( - "End_Performative", - (_message.Message,), - { - "DESCRIPTOR": _DEFAULTMESSAGE_END_PERFORMATIVE, - "__module__": "default_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.default.v1_0_0.DefaultMessage.End_Performative) - }, - ), - "DESCRIPTOR": _DEFAULTMESSAGE, - "__module__": "default_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.default.v1_0_0.DefaultMessage) - }, -) -_sym_db.RegisterMessage(DefaultMessage) -_sym_db.RegisterMessage(DefaultMessage.ErrorCode) -_sym_db.RegisterMessage(DefaultMessage.Bytes_Performative) -_sym_db.RegisterMessage(DefaultMessage.Error_Performative) -_sym_db.RegisterMessage(DefaultMessage.Error_Performative.ErrorDataEntry) -_sym_db.RegisterMessage(DefaultMessage.End_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "default_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _DEFAULTMESSAGE_ERROR_PERFORMATIVE_ERRORDATAENTRY._options = None _DEFAULTMESSAGE_ERROR_PERFORMATIVE_ERRORDATAENTRY._serialized_options = b"8\001" - _DEFAULTMESSAGE._serialized_start = 46 - _DEFAULTMESSAGE._serialized_end = 868 - _DEFAULTMESSAGE_ERRORCODE._serialized_start = 301 - _DEFAULTMESSAGE_ERRORCODE._serialized_end = 529 - _DEFAULTMESSAGE_ERRORCODE_ERRORCODEENUM._serialized_start = 402 - _DEFAULTMESSAGE_ERRORCODE_ERRORCODEENUM._serialized_end = 529 - _DEFAULTMESSAGE_BYTES_PERFORMATIVE._serialized_start = 531 - _DEFAULTMESSAGE_BYTES_PERFORMATIVE._serialized_end = 568 - _DEFAULTMESSAGE_ERROR_PERFORMATIVE._serialized_start = 571 - _DEFAULTMESSAGE_ERROR_PERFORMATIVE._serialized_end = 832 - _DEFAULTMESSAGE_ERROR_PERFORMATIVE_ERRORDATAENTRY._serialized_start = 784 - _DEFAULTMESSAGE_ERROR_PERFORMATIVE_ERRORDATAENTRY._serialized_end = 832 - _DEFAULTMESSAGE_END_PERFORMATIVE._serialized_start = 834 - _DEFAULTMESSAGE_END_PERFORMATIVE._serialized_end = 852 + _globals["_DEFAULTMESSAGE"]._serialized_start = 46 + _globals["_DEFAULTMESSAGE"]._serialized_end = 868 + _globals["_DEFAULTMESSAGE_ERRORCODE"]._serialized_start = 301 + _globals["_DEFAULTMESSAGE_ERRORCODE"]._serialized_end = 529 + _globals["_DEFAULTMESSAGE_ERRORCODE_ERRORCODEENUM"]._serialized_start = 402 + _globals["_DEFAULTMESSAGE_ERRORCODE_ERRORCODEENUM"]._serialized_end = 529 + _globals["_DEFAULTMESSAGE_BYTES_PERFORMATIVE"]._serialized_start = 531 + _globals["_DEFAULTMESSAGE_BYTES_PERFORMATIVE"]._serialized_end = 568 + _globals["_DEFAULTMESSAGE_ERROR_PERFORMATIVE"]._serialized_start = 571 + _globals["_DEFAULTMESSAGE_ERROR_PERFORMATIVE"]._serialized_end = 832 + _globals[ + "_DEFAULTMESSAGE_ERROR_PERFORMATIVE_ERRORDATAENTRY" + ]._serialized_start = 784 + _globals["_DEFAULTMESSAGE_ERROR_PERFORMATIVE_ERRORDATAENTRY"]._serialized_end = 832 + _globals["_DEFAULTMESSAGE_END_PERFORMATIVE"]._serialized_start = 834 + _globals["_DEFAULTMESSAGE_END_PERFORMATIVE"]._serialized_end = 852 # @@protoc_insertion_point(module_scope) diff --git a/packages/fetchai/protocols/default/message.py b/packages/fetchai/protocols/default/message.py index 3b5cf26ee6..f3dd710757 100644 --- a/packages/fetchai/protocols/default/message.py +++ b/packages/fetchai/protocols/default/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.fetchai.protocols.default.custom_types import ErrorCode as CustomErrorCode diff --git a/packages/fetchai/protocols/default/protocol.yaml b/packages/fetchai/protocols/default/protocol.yaml index f10f736d3a..26d9a2f695 100644 --- a/packages/fetchai/protocols/default/protocol.yaml +++ b/packages/fetchai/protocols/default/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeiaalfafx7ky4iejqpyvm6pm44shf42v2r4ho7xqwm2cr4pym2ujqy - __init__.py: bafybeiasjzw7bluetdh2bpq7774w3j5pc5uwnxeinqtcvwn47k2yi3mc7u + __init__.py: bafybeiadqfl3njcgwrrtqihgc7rgrkgrfxvutdyvb2qbspox4ufk3xngyi custom_types.py: bafybeidl4g4c5dcouqmhiiv7vcrftx3d6at7ljkhcp5a7rgruphz4gkrxq default.proto: bafybeid2a3fq62vzd7no6bfcq6adpt55kcqpzhktw3fag6s2mp2qajx6te - default_pb2.py: bafybeiarrr7dxi2k6lj4ojkcbm22qlnp6ci5or3nhaet3zqm3dreh4jcui + default_pb2.py: bafybeifpgd7it3r45wcpjlu3taitspaq35ayif5cgxubto37rdasarjrl4 dialogues.py: bafybeid34oxweqdn54k5adele47gteynqhdfzespvw7txqn3m4oe35qwpq - message.py: bafybeiftnklfbfqrwiowd7s45xr4bpjwvolxg3hpkzjrxwqb2z4ldbnhv4 - serialization.py: bafybeiblyhzoxojggf4shhedlbw76ecazagnhvzdcdsvk4bon6ykcyojte + message.py: bafybeicm77kwivfjblymosyi3dkl4pwowmtjvrjs3vkq5ei2yqywwk7scq + serialization.py: bafybeifk7odq76jdlf4u324ezzgsfzkmiojrufmkjdwe2twd25vtfdxgs4 tests/__init__.py: bafybeibkpidjsf6nzsd7fgkjzj2mf63xcwb5kua5esbo35x3ojef7dyhm4 tests/test_default.py: bafybeiedwbugubenec4cebkqsbdmwqiggljzj27z4uydhwvekhrf7fuw4e tests/test_default_dialogues.py: bafybeidbeizy46jbnh5imujtscbuhoaafr52lipwpll6jogqb3qckgnlpu diff --git a/packages/fetchai/protocols/default/serialization.py b/packages/fetchai/protocols/default/serialization.py index 45a833071b..4f116e6c18 100644 --- a/packages/fetchai/protocols/default/serialization.py +++ b/packages/fetchai/protocols/default/serialization.py @@ -22,13 +22,14 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.fetchai.protocols.default import default_pb2 -from packages.fetchai.protocols.default.custom_types import ErrorCode -from packages.fetchai.protocols.default.message import DefaultMessage +from packages.fetchai.protocols.default import default_pb2 # type: ignore +from packages.fetchai.protocols.default.custom_types import ErrorCode # type: ignore +from packages.fetchai.protocols.default.message import DefaultMessage # type: ignore class DefaultSerializer(Serializer): @@ -45,7 +46,7 @@ def encode(msg: Message) -> bytes: msg = cast(DefaultMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - default_msg = default_pb2.DefaultMessage() + default_msg = default_pb2.DefaultMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -89,7 +90,7 @@ def decode(obj: bytes) -> Message: :return: the 'Default' message. """ message_pb = ProtobufMessage() - default_pb = default_pb2.DefaultMessage() + default_pb = default_pb2.DefaultMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/fetchai/protocols/fipa/__init__.py b/packages/fetchai/protocols/fipa/__init__.py index 3fd5bd2e92..537bf1bfb3 100644 --- a/packages/fetchai/protocols/fipa/__init__.py +++ b/packages/fetchai/protocols/fipa/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the fipa protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/protocols/fipa/fipa_pb2.py b/packages/fetchai/protocols/fipa/fipa_pb2.py index d01328b723..fcd125c908 100644 --- a/packages/fetchai/protocols/fipa/fipa_pb2.py +++ b/packages/fetchai/protocols/fipa/fipa_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,195 +16,10 @@ b'\n\nfipa.proto\x12\x17\x61\x65\x61.fetchai.fipa.v1_0_0"\xc5\x0c\n\x0b\x46ipaMessage\x12J\n\x06\x61\x63\x63\x65pt\x18\x05 \x01(\x0b\x32\x38.aea.fetchai.fipa.v1_0_0.FipaMessage.Accept_PerformativeH\x00\x12\\\n\x0f\x61\x63\x63\x65pt_w_inform\x18\x06 \x01(\x0b\x32\x41.aea.fetchai.fipa.v1_0_0.FipaMessage.Accept_W_Inform_PerformativeH\x00\x12\x44\n\x03\x63\x66p\x18\x07 \x01(\x0b\x32\x35.aea.fetchai.fipa.v1_0_0.FipaMessage.Cfp_PerformativeH\x00\x12L\n\x07\x64\x65\x63line\x18\x08 \x01(\x0b\x32\x39.aea.fetchai.fipa.v1_0_0.FipaMessage.Decline_PerformativeH\x00\x12\x44\n\x03\x65nd\x18\t \x01(\x0b\x32\x35.aea.fetchai.fipa.v1_0_0.FipaMessage.End_PerformativeH\x00\x12J\n\x06inform\x18\n \x01(\x0b\x32\x38.aea.fetchai.fipa.v1_0_0.FipaMessage.Inform_PerformativeH\x00\x12V\n\x0cmatch_accept\x18\x0b \x01(\x0b\x32>.aea.fetchai.fipa.v1_0_0.FipaMessage.Match_Accept_PerformativeH\x00\x12h\n\x15match_accept_w_inform\x18\x0c \x01(\x0b\x32G.aea.fetchai.fipa.v1_0_0.FipaMessage.Match_Accept_W_Inform_PerformativeH\x00\x12L\n\x07propose\x18\r \x01(\x0b\x32\x39.aea.fetchai.fipa.v1_0_0.FipaMessage.Propose_PerformativeH\x00\x1a(\n\x0b\x44\x65scription\x12\x19\n\x11\x64\x65scription_bytes\x18\x01 \x01(\x0c\x1a\x1c\n\x05Query\x12\x13\n\x0bquery_bytes\x18\x01 \x01(\x0c\x1aM\n\x10\x43\x66p_Performative\x12\x39\n\x05query\x18\x01 \x01(\x0b\x32*.aea.fetchai.fipa.v1_0_0.FipaMessage.Query\x1aZ\n\x14Propose_Performative\x12\x42\n\x08proposal\x18\x01 \x01(\x0b\x32\x30.aea.fetchai.fipa.v1_0_0.FipaMessage.Description\x1a\xa6\x01\n\x1c\x41\x63\x63\x65pt_W_Inform_Performative\x12Y\n\x04info\x18\x01 \x03(\x0b\x32K.aea.fetchai.fipa.v1_0_0.FipaMessage.Accept_W_Inform_Performative.InfoEntry\x1a+\n\tInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xb2\x01\n"Match_Accept_W_Inform_Performative\x12_\n\x04info\x18\x01 \x03(\x0b\x32Q.aea.fetchai.fipa.v1_0_0.FipaMessage.Match_Accept_W_Inform_Performative.InfoEntry\x1a+\n\tInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x94\x01\n\x13Inform_Performative\x12P\n\x04info\x18\x01 \x03(\x0b\x32\x42.aea.fetchai.fipa.v1_0_0.FipaMessage.Inform_Performative.InfoEntry\x1a+\n\tInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x15\n\x13\x41\x63\x63\x65pt_Performative\x1a\x16\n\x14\x44\x65\x63line_Performative\x1a\x1b\n\x19Match_Accept_Performative\x1a\x12\n\x10\x45nd_PerformativeB\x0e\n\x0cperformativeb\x06proto3' ) - -_FIPAMESSAGE = DESCRIPTOR.message_types_by_name["FipaMessage"] -_FIPAMESSAGE_DESCRIPTION = _FIPAMESSAGE.nested_types_by_name["Description"] -_FIPAMESSAGE_QUERY = _FIPAMESSAGE.nested_types_by_name["Query"] -_FIPAMESSAGE_CFP_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name["Cfp_Performative"] -_FIPAMESSAGE_PROPOSE_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name[ - "Propose_Performative" -] -_FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name[ - "Accept_W_Inform_Performative" -] -_FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY = ( - _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE.nested_types_by_name["InfoEntry"] -) -_FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name[ - "Match_Accept_W_Inform_Performative" -] -_FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY = ( - _FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE.nested_types_by_name["InfoEntry"] -) -_FIPAMESSAGE_INFORM_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name[ - "Inform_Performative" -] -_FIPAMESSAGE_INFORM_PERFORMATIVE_INFOENTRY = ( - _FIPAMESSAGE_INFORM_PERFORMATIVE.nested_types_by_name["InfoEntry"] -) -_FIPAMESSAGE_ACCEPT_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name[ - "Accept_Performative" -] -_FIPAMESSAGE_DECLINE_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name[ - "Decline_Performative" -] -_FIPAMESSAGE_MATCH_ACCEPT_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name[ - "Match_Accept_Performative" -] -_FIPAMESSAGE_END_PERFORMATIVE = _FIPAMESSAGE.nested_types_by_name["End_Performative"] -FipaMessage = _reflection.GeneratedProtocolMessageType( - "FipaMessage", - (_message.Message,), - { - "Description": _reflection.GeneratedProtocolMessageType( - "Description", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_DESCRIPTION, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Description) - }, - ), - "Query": _reflection.GeneratedProtocolMessageType( - "Query", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_QUERY, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Query) - }, - ), - "Cfp_Performative": _reflection.GeneratedProtocolMessageType( - "Cfp_Performative", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_CFP_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Cfp_Performative) - }, - ), - "Propose_Performative": _reflection.GeneratedProtocolMessageType( - "Propose_Performative", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_PROPOSE_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Propose_Performative) - }, - ), - "Accept_W_Inform_Performative": _reflection.GeneratedProtocolMessageType( - "Accept_W_Inform_Performative", - (_message.Message,), - { - "InfoEntry": _reflection.GeneratedProtocolMessageType( - "InfoEntry", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Accept_W_Inform_Performative.InfoEntry) - }, - ), - "DESCRIPTOR": _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Accept_W_Inform_Performative) - }, - ), - "Match_Accept_W_Inform_Performative": _reflection.GeneratedProtocolMessageType( - "Match_Accept_W_Inform_Performative", - (_message.Message,), - { - "InfoEntry": _reflection.GeneratedProtocolMessageType( - "InfoEntry", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Match_Accept_W_Inform_Performative.InfoEntry) - }, - ), - "DESCRIPTOR": _FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Match_Accept_W_Inform_Performative) - }, - ), - "Inform_Performative": _reflection.GeneratedProtocolMessageType( - "Inform_Performative", - (_message.Message,), - { - "InfoEntry": _reflection.GeneratedProtocolMessageType( - "InfoEntry", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_INFORM_PERFORMATIVE_INFOENTRY, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Inform_Performative.InfoEntry) - }, - ), - "DESCRIPTOR": _FIPAMESSAGE_INFORM_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Inform_Performative) - }, - ), - "Accept_Performative": _reflection.GeneratedProtocolMessageType( - "Accept_Performative", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_ACCEPT_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Accept_Performative) - }, - ), - "Decline_Performative": _reflection.GeneratedProtocolMessageType( - "Decline_Performative", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_DECLINE_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Decline_Performative) - }, - ), - "Match_Accept_Performative": _reflection.GeneratedProtocolMessageType( - "Match_Accept_Performative", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_MATCH_ACCEPT_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.Match_Accept_Performative) - }, - ), - "End_Performative": _reflection.GeneratedProtocolMessageType( - "End_Performative", - (_message.Message,), - { - "DESCRIPTOR": _FIPAMESSAGE_END_PERFORMATIVE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage.End_Performative) - }, - ), - "DESCRIPTOR": _FIPAMESSAGE, - "__module__": "fipa_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.fipa.v1_0_0.FipaMessage) - }, -) -_sym_db.RegisterMessage(FipaMessage) -_sym_db.RegisterMessage(FipaMessage.Description) -_sym_db.RegisterMessage(FipaMessage.Query) -_sym_db.RegisterMessage(FipaMessage.Cfp_Performative) -_sym_db.RegisterMessage(FipaMessage.Propose_Performative) -_sym_db.RegisterMessage(FipaMessage.Accept_W_Inform_Performative) -_sym_db.RegisterMessage(FipaMessage.Accept_W_Inform_Performative.InfoEntry) -_sym_db.RegisterMessage(FipaMessage.Match_Accept_W_Inform_Performative) -_sym_db.RegisterMessage(FipaMessage.Match_Accept_W_Inform_Performative.InfoEntry) -_sym_db.RegisterMessage(FipaMessage.Inform_Performative) -_sym_db.RegisterMessage(FipaMessage.Inform_Performative.InfoEntry) -_sym_db.RegisterMessage(FipaMessage.Accept_Performative) -_sym_db.RegisterMessage(FipaMessage.Decline_Performative) -_sym_db.RegisterMessage(FipaMessage.Match_Accept_Performative) -_sym_db.RegisterMessage(FipaMessage.End_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "fipa_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY._options = None _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY._serialized_options = b"8\001" @@ -215,34 +29,42 @@ ) _FIPAMESSAGE_INFORM_PERFORMATIVE_INFOENTRY._options = None _FIPAMESSAGE_INFORM_PERFORMATIVE_INFOENTRY._serialized_options = b"8\001" - _FIPAMESSAGE._serialized_start = 40 - _FIPAMESSAGE._serialized_end = 1645 - _FIPAMESSAGE_DESCRIPTION._serialized_start = 791 - _FIPAMESSAGE_DESCRIPTION._serialized_end = 831 - _FIPAMESSAGE_QUERY._serialized_start = 833 - _FIPAMESSAGE_QUERY._serialized_end = 861 - _FIPAMESSAGE_CFP_PERFORMATIVE._serialized_start = 863 - _FIPAMESSAGE_CFP_PERFORMATIVE._serialized_end = 940 - _FIPAMESSAGE_PROPOSE_PERFORMATIVE._serialized_start = 942 - _FIPAMESSAGE_PROPOSE_PERFORMATIVE._serialized_end = 1032 - _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE._serialized_start = 1035 - _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE._serialized_end = 1201 - _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY._serialized_start = 1158 - _FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY._serialized_end = 1201 - _FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE._serialized_start = 1204 - _FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE._serialized_end = 1382 - _FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY._serialized_start = 1158 - _FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY._serialized_end = 1201 - _FIPAMESSAGE_INFORM_PERFORMATIVE._serialized_start = 1385 - _FIPAMESSAGE_INFORM_PERFORMATIVE._serialized_end = 1533 - _FIPAMESSAGE_INFORM_PERFORMATIVE_INFOENTRY._serialized_start = 1158 - _FIPAMESSAGE_INFORM_PERFORMATIVE_INFOENTRY._serialized_end = 1201 - _FIPAMESSAGE_ACCEPT_PERFORMATIVE._serialized_start = 1535 - _FIPAMESSAGE_ACCEPT_PERFORMATIVE._serialized_end = 1556 - _FIPAMESSAGE_DECLINE_PERFORMATIVE._serialized_start = 1558 - _FIPAMESSAGE_DECLINE_PERFORMATIVE._serialized_end = 1580 - _FIPAMESSAGE_MATCH_ACCEPT_PERFORMATIVE._serialized_start = 1582 - _FIPAMESSAGE_MATCH_ACCEPT_PERFORMATIVE._serialized_end = 1609 - _FIPAMESSAGE_END_PERFORMATIVE._serialized_start = 1611 - _FIPAMESSAGE_END_PERFORMATIVE._serialized_end = 1629 + _globals["_FIPAMESSAGE"]._serialized_start = 40 + _globals["_FIPAMESSAGE"]._serialized_end = 1645 + _globals["_FIPAMESSAGE_DESCRIPTION"]._serialized_start = 791 + _globals["_FIPAMESSAGE_DESCRIPTION"]._serialized_end = 831 + _globals["_FIPAMESSAGE_QUERY"]._serialized_start = 833 + _globals["_FIPAMESSAGE_QUERY"]._serialized_end = 861 + _globals["_FIPAMESSAGE_CFP_PERFORMATIVE"]._serialized_start = 863 + _globals["_FIPAMESSAGE_CFP_PERFORMATIVE"]._serialized_end = 940 + _globals["_FIPAMESSAGE_PROPOSE_PERFORMATIVE"]._serialized_start = 942 + _globals["_FIPAMESSAGE_PROPOSE_PERFORMATIVE"]._serialized_end = 1032 + _globals["_FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE"]._serialized_start = 1035 + _globals["_FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE"]._serialized_end = 1201 + _globals[ + "_FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY" + ]._serialized_start = 1158 + _globals[ + "_FIPAMESSAGE_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY" + ]._serialized_end = 1201 + _globals["_FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE"]._serialized_start = 1204 + _globals["_FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE"]._serialized_end = 1382 + _globals[ + "_FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY" + ]._serialized_start = 1158 + _globals[ + "_FIPAMESSAGE_MATCH_ACCEPT_W_INFORM_PERFORMATIVE_INFOENTRY" + ]._serialized_end = 1201 + _globals["_FIPAMESSAGE_INFORM_PERFORMATIVE"]._serialized_start = 1385 + _globals["_FIPAMESSAGE_INFORM_PERFORMATIVE"]._serialized_end = 1533 + _globals["_FIPAMESSAGE_INFORM_PERFORMATIVE_INFOENTRY"]._serialized_start = 1158 + _globals["_FIPAMESSAGE_INFORM_PERFORMATIVE_INFOENTRY"]._serialized_end = 1201 + _globals["_FIPAMESSAGE_ACCEPT_PERFORMATIVE"]._serialized_start = 1535 + _globals["_FIPAMESSAGE_ACCEPT_PERFORMATIVE"]._serialized_end = 1556 + _globals["_FIPAMESSAGE_DECLINE_PERFORMATIVE"]._serialized_start = 1558 + _globals["_FIPAMESSAGE_DECLINE_PERFORMATIVE"]._serialized_end = 1580 + _globals["_FIPAMESSAGE_MATCH_ACCEPT_PERFORMATIVE"]._serialized_start = 1582 + _globals["_FIPAMESSAGE_MATCH_ACCEPT_PERFORMATIVE"]._serialized_end = 1609 + _globals["_FIPAMESSAGE_END_PERFORMATIVE"]._serialized_start = 1611 + _globals["_FIPAMESSAGE_END_PERFORMATIVE"]._serialized_end = 1629 # @@protoc_insertion_point(module_scope) diff --git a/packages/fetchai/protocols/fipa/message.py b/packages/fetchai/protocols/fipa/message.py index 048eab3bed..c5e9ebb8c7 100644 --- a/packages/fetchai/protocols/fipa/message.py +++ b/packages/fetchai/protocols/fipa/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.fetchai.protocols.fipa.custom_types import ( Description as CustomDescription, diff --git a/packages/fetchai/protocols/fipa/protocol.yaml b/packages/fetchai/protocols/fipa/protocol.yaml index 243f2868fc..a39090a5cf 100644 --- a/packages/fetchai/protocols/fipa/protocol.yaml +++ b/packages/fetchai/protocols/fipa/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeih776npzene2jytmixiwgq7xmla7yicp5qzqohbk74eewv6c5banu - __init__.py: bafybeicmwck4tbgeifx4tzo7coenjuqftxcbderlcmexc3gqnjmrpyblde + __init__.py: bafybeicgoac3v55ilmmv26lx7nslk7jayelcc2weyagn757i4tzceftbje custom_types.py: bafybeihzdd5m6h7y6xghpyzp54ddd6b2id7mj5qeafnnrg23tim45g6b2e dialogues.py: bafybeigfobk7mqxnughsnoda66gtbrvtmfbdewjs5chknarrmdeovl55xy fipa.proto: bafybeibycv37qg5eesvmptehsg2uydyxh34fa2xiqgtjfqevhn2fg622ca - fipa_pb2.py: bafybeicgs4xb5aggw7pv5szdcp7jjdvii3hec3savyt2amsjkfjkd4ywja - message.py: bafybeiba7qgkb4uqeg6n45rtzfacasqmkhhksgdp5avb6vledqxxvdb2rm - serialization.py: bafybeif3qw3dbvjfxqwmlfaosps32ysrd4gg2mhgum6ysz6xys7bj6ynme + fipa_pb2.py: bafybeiduuzmhzytgq4yktpj4hvrhq626cuur56ic7tayqeu7r6itlxwmse + message.py: bafybeigzkfuv5wei542zod7lvdbnntxhjxo3hhh6tlahcvf2u5hbpof6wa + serialization.py: bafybeifcnx67ar36v4f5ezgiw2vrzswgmlmsu65aspfqgiqhrrbhnirhe4 tests/__init__.py: bafybeiejmbkzylap7xuv3wbduwwewybasdt6bxq3l3fkaoxazij2rgfre4 tests/test_fipa.py: bafybeihh37hqvueezb56enmpxbithkmboomitt3cxaent6lnlin7ijq5py tests/test_fipa_dialogues.py: bafybeifw4ux7p5o7fxlbj2vhi4wbfrav3xcvtixnattdulthrmqhviiadi diff --git a/packages/fetchai/protocols/fipa/serialization.py b/packages/fetchai/protocols/fipa/serialization.py index 7855887cb2..58fe4b6f45 100644 --- a/packages/fetchai/protocols/fipa/serialization.py +++ b/packages/fetchai/protocols/fipa/serialization.py @@ -22,13 +22,17 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.fetchai.protocols.fipa import fipa_pb2 -from packages.fetchai.protocols.fipa.custom_types import Description, Query -from packages.fetchai.protocols.fipa.message import FipaMessage +from packages.fetchai.protocols.fipa import fipa_pb2 # type: ignore +from packages.fetchai.protocols.fipa.custom_types import ( # type: ignore + Description, + Query, +) +from packages.fetchai.protocols.fipa.message import FipaMessage # type: ignore class FipaSerializer(Serializer): @@ -45,7 +49,7 @@ def encode(msg: Message) -> bytes: msg = cast(FipaMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - fipa_msg = fipa_pb2.FipaMessage() + fipa_msg = fipa_pb2.FipaMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -109,7 +113,7 @@ def decode(obj: bytes) -> Message: :return: the 'Fipa' message. """ message_pb = ProtobufMessage() - fipa_pb = fipa_pb2.FipaMessage() + fipa_pb = fipa_pb2.FipaMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/fetchai/protocols/gym/__init__.py b/packages/fetchai/protocols/gym/__init__.py index 077c3bd79c..64b9ee3983 100644 --- a/packages/fetchai/protocols/gym/__init__.py +++ b/packages/fetchai/protocols/gym/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the gym protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.fetchai.protocols.gym.message import GymMessage diff --git a/packages/fetchai/protocols/gym/gym_pb2.py b/packages/fetchai/protocols/gym/gym_pb2.py index d37848ad0b..55bf42d530 100644 --- a/packages/fetchai/protocols/gym/gym_pb2.py +++ b/packages/fetchai/protocols/gym/gym_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,121 +16,27 @@ b'\n\tgym.proto\x12\x16\x61\x65\x61.fetchai.gym.v1_0_0"\x94\x07\n\nGymMessage\x12\x42\n\x03\x61\x63t\x18\x05 \x01(\x0b\x32\x33.aea.fetchai.gym.v1_0_0.GymMessage.Act_PerformativeH\x00\x12\x46\n\x05\x63lose\x18\x06 \x01(\x0b\x32\x35.aea.fetchai.gym.v1_0_0.GymMessage.Close_PerformativeH\x00\x12J\n\x07percept\x18\x07 \x01(\x0b\x32\x37.aea.fetchai.gym.v1_0_0.GymMessage.Percept_PerformativeH\x00\x12\x46\n\x05reset\x18\x08 \x01(\x0b\x32\x35.aea.fetchai.gym.v1_0_0.GymMessage.Reset_PerformativeH\x00\x12H\n\x06status\x18\t \x01(\x0b\x32\x36.aea.fetchai.gym.v1_0_0.GymMessage.Status_PerformativeH\x00\x1a\x18\n\tAnyObject\x12\x0b\n\x03\x61ny\x18\x01 \x01(\x0c\x1a\x61\n\x10\x41\x63t_Performative\x12<\n\x06\x61\x63tion\x18\x01 \x01(\x0b\x32,.aea.fetchai.gym.v1_0_0.GymMessage.AnyObject\x12\x0f\n\x07step_id\x18\x02 \x01(\x05\x1a\xc4\x01\n\x14Percept_Performative\x12\x0f\n\x07step_id\x18\x01 \x01(\x05\x12\x41\n\x0bobservation\x18\x02 \x01(\x0b\x32,.aea.fetchai.gym.v1_0_0.GymMessage.AnyObject\x12\x0e\n\x06reward\x18\x03 \x01(\x01\x12\x0c\n\x04\x64one\x18\x04 \x01(\x08\x12:\n\x04info\x18\x05 \x01(\x0b\x32,.aea.fetchai.gym.v1_0_0.GymMessage.AnyObject\x1a\x9b\x01\n\x13Status_Performative\x12T\n\x07\x63ontent\x18\x01 \x03(\x0b\x32\x43.aea.fetchai.gym.v1_0_0.GymMessage.Status_Performative.ContentEntry\x1a.\n\x0c\x43ontentEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x14\n\x12Reset_Performative\x1a\x14\n\x12\x43lose_PerformativeB\x0e\n\x0cperformativeb\x06proto3' ) - -_GYMMESSAGE = DESCRIPTOR.message_types_by_name["GymMessage"] -_GYMMESSAGE_ANYOBJECT = _GYMMESSAGE.nested_types_by_name["AnyObject"] -_GYMMESSAGE_ACT_PERFORMATIVE = _GYMMESSAGE.nested_types_by_name["Act_Performative"] -_GYMMESSAGE_PERCEPT_PERFORMATIVE = _GYMMESSAGE.nested_types_by_name[ - "Percept_Performative" -] -_GYMMESSAGE_STATUS_PERFORMATIVE = _GYMMESSAGE.nested_types_by_name[ - "Status_Performative" -] -_GYMMESSAGE_STATUS_PERFORMATIVE_CONTENTENTRY = ( - _GYMMESSAGE_STATUS_PERFORMATIVE.nested_types_by_name["ContentEntry"] -) -_GYMMESSAGE_RESET_PERFORMATIVE = _GYMMESSAGE.nested_types_by_name["Reset_Performative"] -_GYMMESSAGE_CLOSE_PERFORMATIVE = _GYMMESSAGE.nested_types_by_name["Close_Performative"] -GymMessage = _reflection.GeneratedProtocolMessageType( - "GymMessage", - (_message.Message,), - { - "AnyObject": _reflection.GeneratedProtocolMessageType( - "AnyObject", - (_message.Message,), - { - "DESCRIPTOR": _GYMMESSAGE_ANYOBJECT, - "__module__": "gym_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.gym.v1_0_0.GymMessage.AnyObject) - }, - ), - "Act_Performative": _reflection.GeneratedProtocolMessageType( - "Act_Performative", - (_message.Message,), - { - "DESCRIPTOR": _GYMMESSAGE_ACT_PERFORMATIVE, - "__module__": "gym_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.gym.v1_0_0.GymMessage.Act_Performative) - }, - ), - "Percept_Performative": _reflection.GeneratedProtocolMessageType( - "Percept_Performative", - (_message.Message,), - { - "DESCRIPTOR": _GYMMESSAGE_PERCEPT_PERFORMATIVE, - "__module__": "gym_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.gym.v1_0_0.GymMessage.Percept_Performative) - }, - ), - "Status_Performative": _reflection.GeneratedProtocolMessageType( - "Status_Performative", - (_message.Message,), - { - "ContentEntry": _reflection.GeneratedProtocolMessageType( - "ContentEntry", - (_message.Message,), - { - "DESCRIPTOR": _GYMMESSAGE_STATUS_PERFORMATIVE_CONTENTENTRY, - "__module__": "gym_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.gym.v1_0_0.GymMessage.Status_Performative.ContentEntry) - }, - ), - "DESCRIPTOR": _GYMMESSAGE_STATUS_PERFORMATIVE, - "__module__": "gym_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.gym.v1_0_0.GymMessage.Status_Performative) - }, - ), - "Reset_Performative": _reflection.GeneratedProtocolMessageType( - "Reset_Performative", - (_message.Message,), - { - "DESCRIPTOR": _GYMMESSAGE_RESET_PERFORMATIVE, - "__module__": "gym_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.gym.v1_0_0.GymMessage.Reset_Performative) - }, - ), - "Close_Performative": _reflection.GeneratedProtocolMessageType( - "Close_Performative", - (_message.Message,), - { - "DESCRIPTOR": _GYMMESSAGE_CLOSE_PERFORMATIVE, - "__module__": "gym_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.gym.v1_0_0.GymMessage.Close_Performative) - }, - ), - "DESCRIPTOR": _GYMMESSAGE, - "__module__": "gym_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.gym.v1_0_0.GymMessage) - }, -) -_sym_db.RegisterMessage(GymMessage) -_sym_db.RegisterMessage(GymMessage.AnyObject) -_sym_db.RegisterMessage(GymMessage.Act_Performative) -_sym_db.RegisterMessage(GymMessage.Percept_Performative) -_sym_db.RegisterMessage(GymMessage.Status_Performative) -_sym_db.RegisterMessage(GymMessage.Status_Performative.ContentEntry) -_sym_db.RegisterMessage(GymMessage.Reset_Performative) -_sym_db.RegisterMessage(GymMessage.Close_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "gym_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _GYMMESSAGE_STATUS_PERFORMATIVE_CONTENTENTRY._options = None _GYMMESSAGE_STATUS_PERFORMATIVE_CONTENTENTRY._serialized_options = b"8\001" - _GYMMESSAGE._serialized_start = 38 - _GYMMESSAGE._serialized_end = 954 - _GYMMESSAGE_ANYOBJECT._serialized_start = 414 - _GYMMESSAGE_ANYOBJECT._serialized_end = 438 - _GYMMESSAGE_ACT_PERFORMATIVE._serialized_start = 440 - _GYMMESSAGE_ACT_PERFORMATIVE._serialized_end = 537 - _GYMMESSAGE_PERCEPT_PERFORMATIVE._serialized_start = 540 - _GYMMESSAGE_PERCEPT_PERFORMATIVE._serialized_end = 736 - _GYMMESSAGE_STATUS_PERFORMATIVE._serialized_start = 739 - _GYMMESSAGE_STATUS_PERFORMATIVE._serialized_end = 894 - _GYMMESSAGE_STATUS_PERFORMATIVE_CONTENTENTRY._serialized_start = 848 - _GYMMESSAGE_STATUS_PERFORMATIVE_CONTENTENTRY._serialized_end = 894 - _GYMMESSAGE_RESET_PERFORMATIVE._serialized_start = 896 - _GYMMESSAGE_RESET_PERFORMATIVE._serialized_end = 916 - _GYMMESSAGE_CLOSE_PERFORMATIVE._serialized_start = 918 - _GYMMESSAGE_CLOSE_PERFORMATIVE._serialized_end = 938 + _globals["_GYMMESSAGE"]._serialized_start = 38 + _globals["_GYMMESSAGE"]._serialized_end = 954 + _globals["_GYMMESSAGE_ANYOBJECT"]._serialized_start = 414 + _globals["_GYMMESSAGE_ANYOBJECT"]._serialized_end = 438 + _globals["_GYMMESSAGE_ACT_PERFORMATIVE"]._serialized_start = 440 + _globals["_GYMMESSAGE_ACT_PERFORMATIVE"]._serialized_end = 537 + _globals["_GYMMESSAGE_PERCEPT_PERFORMATIVE"]._serialized_start = 540 + _globals["_GYMMESSAGE_PERCEPT_PERFORMATIVE"]._serialized_end = 736 + _globals["_GYMMESSAGE_STATUS_PERFORMATIVE"]._serialized_start = 739 + _globals["_GYMMESSAGE_STATUS_PERFORMATIVE"]._serialized_end = 894 + _globals["_GYMMESSAGE_STATUS_PERFORMATIVE_CONTENTENTRY"]._serialized_start = 848 + _globals["_GYMMESSAGE_STATUS_PERFORMATIVE_CONTENTENTRY"]._serialized_end = 894 + _globals["_GYMMESSAGE_RESET_PERFORMATIVE"]._serialized_start = 896 + _globals["_GYMMESSAGE_RESET_PERFORMATIVE"]._serialized_end = 916 + _globals["_GYMMESSAGE_CLOSE_PERFORMATIVE"]._serialized_start = 918 + _globals["_GYMMESSAGE_CLOSE_PERFORMATIVE"]._serialized_end = 938 # @@protoc_insertion_point(module_scope) diff --git a/packages/fetchai/protocols/gym/message.py b/packages/fetchai/protocols/gym/message.py index c4bf6ff6a6..c6ccb7b1bf 100644 --- a/packages/fetchai/protocols/gym/message.py +++ b/packages/fetchai/protocols/gym/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.fetchai.protocols.gym.custom_types import AnyObject as CustomAnyObject diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index d90a97a4e2..99cd2d23d6 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeie6ybbxlmpqad7pgwbeljnw4fmeee7cjipdk52dahnzskwwplknam - __init__.py: bafybeiervdzxzimqroxkbhzwhjuqtqflzzpavjdetlwps4426nbzummtdy + __init__.py: bafybeidtfpd6rliq4ri3lehdcjf5pk7ohargl7cy2xdz52ajlr7psbfopm custom_types.py: bafybeiclim2o6bqe35sbkjpd3y43iokghvytrrh662jenj3ri5ri2p5rpi dialogues.py: bafybeigvw5qou2ixkgcl7dlwy5dewhe3oduzaplvd63ujk2otuijijkqui gym.proto: bafybeicnwpnryy7afgbimi5yppie7kdcgiephutu5maxjk63ltg7o77gay - gym_pb2.py: bafybeibun7bqxwr45xne3adqyniccrvwwki276ocwstw5pq3f6nlq3wtoi - message.py: bafybeifc7eyahc562zesgs5bwiaqwi2ibrfoieeffqxu2isq2h4oeudbxu - serialization.py: bafybeidjrnjgs5yhzxoc5wfpxmfnnd764rbtugecn4uirmjs6mvtmbva7y + gym_pb2.py: bafybeic5acuh4pxo5q33z4vv6ziwwpxkg5cyn2e2a6f2loobj5sikbfwji + message.py: bafybeihopxv4eyvjfymonsxjzbx4zboyeznxxbee4nsxvwuom6corqvnna + serialization.py: bafybeic7zhgqwn6jt22734krctb7ghhtzszqqwxndqzp5y7ob3fru56yzi tests/__init__.py: bafybeidoxwwkwljoz2xsmv7pif3tksdyhl7tgf4s4aao5ypjg4o4hefk7e tests/test_gym.py: bafybeih7jqhs3exvqfbo5et55pdksp6q44q2tq6edjx7mnesm44mgzmnrq tests/test_gym_dialogues.py: bafybeidvzax3rg2y7nyvaxghraqkfbqw4t5rz2dg4gxsfn2v4mkljd6z4q diff --git a/packages/fetchai/protocols/gym/serialization.py b/packages/fetchai/protocols/gym/serialization.py index a2fe05b82b..8165d27089 100644 --- a/packages/fetchai/protocols/gym/serialization.py +++ b/packages/fetchai/protocols/gym/serialization.py @@ -22,13 +22,14 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.fetchai.protocols.gym import gym_pb2 -from packages.fetchai.protocols.gym.custom_types import AnyObject -from packages.fetchai.protocols.gym.message import GymMessage +from packages.fetchai.protocols.gym import gym_pb2 # type: ignore +from packages.fetchai.protocols.gym.custom_types import AnyObject # type: ignore +from packages.fetchai.protocols.gym.message import GymMessage # type: ignore class GymSerializer(Serializer): @@ -45,7 +46,7 @@ def encode(msg: Message) -> bytes: msg = cast(GymMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - gym_msg = gym_pb2.GymMessage() + gym_msg = gym_pb2.GymMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -103,7 +104,7 @@ def decode(obj: bytes) -> Message: :return: the 'Gym' message. """ message_pb = ProtobufMessage() - gym_pb = gym_pb2.GymMessage() + gym_pb = gym_pb2.GymMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/fetchai/protocols/oef_search/__init__.py b/packages/fetchai/protocols/oef_search/__init__.py index f69183ee35..ef9bee117d 100644 --- a/packages/fetchai/protocols/oef_search/__init__.py +++ b/packages/fetchai/protocols/oef_search/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the oef_search protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/protocols/oef_search/message.py b/packages/fetchai/protocols/oef_search/message.py index b062e7bdf0..6feb77e724 100644 --- a/packages/fetchai/protocols/oef_search/message.py +++ b/packages/fetchai/protocols/oef_search/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.fetchai.protocols.oef_search.custom_types import ( AgentsInfo as CustomAgentsInfo, diff --git a/packages/fetchai/protocols/oef_search/oef_search_pb2.py b/packages/fetchai/protocols/oef_search/oef_search_pb2.py index 0d652c58c5..dc84c30222 100644 --- a/packages/fetchai/protocols/oef_search/oef_search_pb2.py +++ b/packages/fetchai/protocols/oef_search/oef_search_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,171 +16,35 @@ b'\n\x10oef_search.proto\x12\x1d\x61\x65\x61.fetchai.oef_search.v1_0_0"\x89\r\n\x10OefSearchMessage\x12[\n\toef_error\x18\x05 \x01(\x0b\x32\x46.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Oef_Error_PerformativeH\x00\x12i\n\x10register_service\x18\x06 \x01(\x0b\x32M.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Register_Service_PerformativeH\x00\x12\x63\n\rsearch_result\x18\x07 \x01(\x0b\x32J.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Search_Result_PerformativeH\x00\x12g\n\x0fsearch_services\x18\x08 \x01(\x0b\x32L.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Search_Services_PerformativeH\x00\x12W\n\x07success\x18\t \x01(\x0b\x32\x44.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Success_PerformativeH\x00\x12m\n\x12unregister_service\x18\n \x01(\x0b\x32O.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Unregister_Service_PerformativeH\x00\x1a!\n\nAgentsInfo\x12\x13\n\x0b\x61gents_info\x18\x01 \x01(\x0c\x1a(\n\x0b\x44\x65scription\x12\x19\n\x11\x64\x65scription_bytes\x18\x01 \x01(\x0c\x1a\xdb\x01\n\x11OefErrorOperation\x12\x61\n\toef_error\x18\x01 \x01(\x0e\x32N.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.OefErrorOperation.OefErrorEnum"c\n\x0cOefErrorEnum\x12\x14\n\x10REGISTER_SERVICE\x10\x00\x12\x16\n\x12UNREGISTER_SERVICE\x10\x01\x12\x13\n\x0fSEARCH_SERVICES\x10\x02\x12\x10\n\x0cSEND_MESSAGE\x10\x03\x1a\x1c\n\x05Query\x12\x13\n\x0bquery_bytes\x18\x01 \x01(\x0c\x1ay\n\x1dRegister_Service_Performative\x12X\n\x13service_description\x18\x01 \x01(\x0b\x32;.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Description\x1a{\n\x1fUnregister_Service_Performative\x12X\n\x13service_description\x18\x01 \x01(\x0b\x32;.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Description\x1a\x64\n\x1cSearch_Services_Performative\x12\x44\n\x05query\x18\x01 \x01(\x0b\x32\x35.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Query\x1a}\n\x1aSearch_Result_Performative\x12\x0e\n\x06\x61gents\x18\x01 \x03(\t\x12O\n\x0b\x61gents_info\x18\x02 \x01(\x0b\x32:.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.AgentsInfo\x1ag\n\x14Success_Performative\x12O\n\x0b\x61gents_info\x18\x01 \x01(\x0b\x32:.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.AgentsInfo\x1ax\n\x16Oef_Error_Performative\x12^\n\x13oef_error_operation\x18\x01 \x01(\x0b\x32\x41.aea.fetchai.oef_search.v1_0_0.OefSearchMessage.OefErrorOperationB\x0e\n\x0cperformativeb\x06proto3' ) - -_OEFSEARCHMESSAGE = DESCRIPTOR.message_types_by_name["OefSearchMessage"] -_OEFSEARCHMESSAGE_AGENTSINFO = _OEFSEARCHMESSAGE.nested_types_by_name["AgentsInfo"] -_OEFSEARCHMESSAGE_DESCRIPTION = _OEFSEARCHMESSAGE.nested_types_by_name["Description"] -_OEFSEARCHMESSAGE_OEFERROROPERATION = _OEFSEARCHMESSAGE.nested_types_by_name[ - "OefErrorOperation" -] -_OEFSEARCHMESSAGE_QUERY = _OEFSEARCHMESSAGE.nested_types_by_name["Query"] -_OEFSEARCHMESSAGE_REGISTER_SERVICE_PERFORMATIVE = ( - _OEFSEARCHMESSAGE.nested_types_by_name["Register_Service_Performative"] -) -_OEFSEARCHMESSAGE_UNREGISTER_SERVICE_PERFORMATIVE = ( - _OEFSEARCHMESSAGE.nested_types_by_name["Unregister_Service_Performative"] -) -_OEFSEARCHMESSAGE_SEARCH_SERVICES_PERFORMATIVE = _OEFSEARCHMESSAGE.nested_types_by_name[ - "Search_Services_Performative" -] -_OEFSEARCHMESSAGE_SEARCH_RESULT_PERFORMATIVE = _OEFSEARCHMESSAGE.nested_types_by_name[ - "Search_Result_Performative" -] -_OEFSEARCHMESSAGE_SUCCESS_PERFORMATIVE = _OEFSEARCHMESSAGE.nested_types_by_name[ - "Success_Performative" -] -_OEFSEARCHMESSAGE_OEF_ERROR_PERFORMATIVE = _OEFSEARCHMESSAGE.nested_types_by_name[ - "Oef_Error_Performative" -] -_OEFSEARCHMESSAGE_OEFERROROPERATION_OEFERRORENUM = ( - _OEFSEARCHMESSAGE_OEFERROROPERATION.enum_types_by_name["OefErrorEnum"] -) -OefSearchMessage = _reflection.GeneratedProtocolMessageType( - "OefSearchMessage", - (_message.Message,), - { - "AgentsInfo": _reflection.GeneratedProtocolMessageType( - "AgentsInfo", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_AGENTSINFO, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.AgentsInfo) - }, - ), - "Description": _reflection.GeneratedProtocolMessageType( - "Description", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_DESCRIPTION, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Description) - }, - ), - "OefErrorOperation": _reflection.GeneratedProtocolMessageType( - "OefErrorOperation", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_OEFERROROPERATION, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.OefErrorOperation) - }, - ), - "Query": _reflection.GeneratedProtocolMessageType( - "Query", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_QUERY, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Query) - }, - ), - "Register_Service_Performative": _reflection.GeneratedProtocolMessageType( - "Register_Service_Performative", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_REGISTER_SERVICE_PERFORMATIVE, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Register_Service_Performative) - }, - ), - "Unregister_Service_Performative": _reflection.GeneratedProtocolMessageType( - "Unregister_Service_Performative", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_UNREGISTER_SERVICE_PERFORMATIVE, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Unregister_Service_Performative) - }, - ), - "Search_Services_Performative": _reflection.GeneratedProtocolMessageType( - "Search_Services_Performative", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_SEARCH_SERVICES_PERFORMATIVE, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Search_Services_Performative) - }, - ), - "Search_Result_Performative": _reflection.GeneratedProtocolMessageType( - "Search_Result_Performative", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_SEARCH_RESULT_PERFORMATIVE, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Search_Result_Performative) - }, - ), - "Success_Performative": _reflection.GeneratedProtocolMessageType( - "Success_Performative", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_SUCCESS_PERFORMATIVE, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Success_Performative) - }, - ), - "Oef_Error_Performative": _reflection.GeneratedProtocolMessageType( - "Oef_Error_Performative", - (_message.Message,), - { - "DESCRIPTOR": _OEFSEARCHMESSAGE_OEF_ERROR_PERFORMATIVE, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage.Oef_Error_Performative) - }, - ), - "DESCRIPTOR": _OEFSEARCHMESSAGE, - "__module__": "oef_search_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.oef_search.v1_0_0.OefSearchMessage) - }, -) -_sym_db.RegisterMessage(OefSearchMessage) -_sym_db.RegisterMessage(OefSearchMessage.AgentsInfo) -_sym_db.RegisterMessage(OefSearchMessage.Description) -_sym_db.RegisterMessage(OefSearchMessage.OefErrorOperation) -_sym_db.RegisterMessage(OefSearchMessage.Query) -_sym_db.RegisterMessage(OefSearchMessage.Register_Service_Performative) -_sym_db.RegisterMessage(OefSearchMessage.Unregister_Service_Performative) -_sym_db.RegisterMessage(OefSearchMessage.Search_Services_Performative) -_sym_db.RegisterMessage(OefSearchMessage.Search_Result_Performative) -_sym_db.RegisterMessage(OefSearchMessage.Success_Performative) -_sym_db.RegisterMessage(OefSearchMessage.Oef_Error_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "oef_search_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _OEFSEARCHMESSAGE._serialized_start = 52 - _OEFSEARCHMESSAGE._serialized_end = 1725 - _OEFSEARCHMESSAGE_AGENTSINFO._serialized_start = 678 - _OEFSEARCHMESSAGE_AGENTSINFO._serialized_end = 711 - _OEFSEARCHMESSAGE_DESCRIPTION._serialized_start = 713 - _OEFSEARCHMESSAGE_DESCRIPTION._serialized_end = 753 - _OEFSEARCHMESSAGE_OEFERROROPERATION._serialized_start = 756 - _OEFSEARCHMESSAGE_OEFERROROPERATION._serialized_end = 975 - _OEFSEARCHMESSAGE_OEFERROROPERATION_OEFERRORENUM._serialized_start = 876 - _OEFSEARCHMESSAGE_OEFERROROPERATION_OEFERRORENUM._serialized_end = 975 - _OEFSEARCHMESSAGE_QUERY._serialized_start = 977 - _OEFSEARCHMESSAGE_QUERY._serialized_end = 1005 - _OEFSEARCHMESSAGE_REGISTER_SERVICE_PERFORMATIVE._serialized_start = 1007 - _OEFSEARCHMESSAGE_REGISTER_SERVICE_PERFORMATIVE._serialized_end = 1128 - _OEFSEARCHMESSAGE_UNREGISTER_SERVICE_PERFORMATIVE._serialized_start = 1130 - _OEFSEARCHMESSAGE_UNREGISTER_SERVICE_PERFORMATIVE._serialized_end = 1253 - _OEFSEARCHMESSAGE_SEARCH_SERVICES_PERFORMATIVE._serialized_start = 1255 - _OEFSEARCHMESSAGE_SEARCH_SERVICES_PERFORMATIVE._serialized_end = 1355 - _OEFSEARCHMESSAGE_SEARCH_RESULT_PERFORMATIVE._serialized_start = 1357 - _OEFSEARCHMESSAGE_SEARCH_RESULT_PERFORMATIVE._serialized_end = 1482 - _OEFSEARCHMESSAGE_SUCCESS_PERFORMATIVE._serialized_start = 1484 - _OEFSEARCHMESSAGE_SUCCESS_PERFORMATIVE._serialized_end = 1587 - _OEFSEARCHMESSAGE_OEF_ERROR_PERFORMATIVE._serialized_start = 1589 - _OEFSEARCHMESSAGE_OEF_ERROR_PERFORMATIVE._serialized_end = 1709 + _globals["_OEFSEARCHMESSAGE"]._serialized_start = 52 + _globals["_OEFSEARCHMESSAGE"]._serialized_end = 1725 + _globals["_OEFSEARCHMESSAGE_AGENTSINFO"]._serialized_start = 678 + _globals["_OEFSEARCHMESSAGE_AGENTSINFO"]._serialized_end = 711 + _globals["_OEFSEARCHMESSAGE_DESCRIPTION"]._serialized_start = 713 + _globals["_OEFSEARCHMESSAGE_DESCRIPTION"]._serialized_end = 753 + _globals["_OEFSEARCHMESSAGE_OEFERROROPERATION"]._serialized_start = 756 + _globals["_OEFSEARCHMESSAGE_OEFERROROPERATION"]._serialized_end = 975 + _globals["_OEFSEARCHMESSAGE_OEFERROROPERATION_OEFERRORENUM"]._serialized_start = 876 + _globals["_OEFSEARCHMESSAGE_OEFERROROPERATION_OEFERRORENUM"]._serialized_end = 975 + _globals["_OEFSEARCHMESSAGE_QUERY"]._serialized_start = 977 + _globals["_OEFSEARCHMESSAGE_QUERY"]._serialized_end = 1005 + _globals["_OEFSEARCHMESSAGE_REGISTER_SERVICE_PERFORMATIVE"]._serialized_start = 1007 + _globals["_OEFSEARCHMESSAGE_REGISTER_SERVICE_PERFORMATIVE"]._serialized_end = 1128 + _globals[ + "_OEFSEARCHMESSAGE_UNREGISTER_SERVICE_PERFORMATIVE" + ]._serialized_start = 1130 + _globals["_OEFSEARCHMESSAGE_UNREGISTER_SERVICE_PERFORMATIVE"]._serialized_end = 1253 + _globals["_OEFSEARCHMESSAGE_SEARCH_SERVICES_PERFORMATIVE"]._serialized_start = 1255 + _globals["_OEFSEARCHMESSAGE_SEARCH_SERVICES_PERFORMATIVE"]._serialized_end = 1355 + _globals["_OEFSEARCHMESSAGE_SEARCH_RESULT_PERFORMATIVE"]._serialized_start = 1357 + _globals["_OEFSEARCHMESSAGE_SEARCH_RESULT_PERFORMATIVE"]._serialized_end = 1482 + _globals["_OEFSEARCHMESSAGE_SUCCESS_PERFORMATIVE"]._serialized_start = 1484 + _globals["_OEFSEARCHMESSAGE_SUCCESS_PERFORMATIVE"]._serialized_end = 1587 + _globals["_OEFSEARCHMESSAGE_OEF_ERROR_PERFORMATIVE"]._serialized_start = 1589 + _globals["_OEFSEARCHMESSAGE_OEF_ERROR_PERFORMATIVE"]._serialized_end = 1709 # @@protoc_insertion_point(module_scope) diff --git a/packages/fetchai/protocols/oef_search/protocol.yaml b/packages/fetchai/protocols/oef_search/protocol.yaml index 0cc297bbae..adc63183fe 100644 --- a/packages/fetchai/protocols/oef_search/protocol.yaml +++ b/packages/fetchai/protocols/oef_search/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeibwimlpsr55jdty46gmhzvptw3g4rvmcyobdogdsirwwnglcycw6u - __init__.py: bafybeifrq5debsj4zkbevg3bnrhokow4o5eu64aaujsnlhxcd637notq4i + __init__.py: bafybeig5cee66axmo3xfs2b4lsp24ghn2sjmaolrthknvm2lvybpnoxmau custom_types.py: bafybeihxd2m5g4fi5yr3t2zyvjem7qzu6tyuelecr6siinaur2cqxn4xky dialogues.py: bafybeib5wnxkcwhc3zvtauhxb4lakgjbaqv3vlsvxifxayrfjn3zcuaim4 - message.py: bafybeic4dmttygx7knr7wvke55g6mwz4uoruxydewdjnbsgfyqfm26wh3q + message.py: bafybeiaze2r5btmfgeuvkvgvsbmbn2qlsb62q5u6gqjmft7nhusezzyqla oef_search.proto: bafybeifvmxnxg4cuxkj64iqeifyv7jl4ihxgsope7p4j74yotedboai7jm - oef_search_pb2.py: bafybeibzoqlyihqvgvvpz2bbjekf547n6j677ufw3hy2eqlyhedcuqqbjm - serialization.py: bafybeidfmuthotpsavmkwpyixilrz7rjzwinwtbmduufrnsehvvd3ftwsy + oef_search_pb2.py: bafybeiht3pt2xgqmz4tptqlkzf2bus4gqcqkrv7e4was6egbyfydxrbr24 + serialization.py: bafybeia3hdeejtcx7vyzrcqlbq5v4rq2v5aqjrezvsyh6dayzlhsjpxbbm tests/__init__.py: bafybeiebv7wlew4kejoreeddxek6tq3qzejxkxc5kbch5pm4ojvykgd2om tests/test_oef_search.py: bafybeiahbytplglft6nyko3pzufhu4fvjtu2uat5ok5ogzrmdfic6ipaaa tests/test_oef_search_dialogues.py: bafybeidtatsgbixbhvln4jfhbkdvyo6kdq2lec7hagp5vmnqwlpckbgqpe diff --git a/packages/fetchai/protocols/oef_search/serialization.py b/packages/fetchai/protocols/oef_search/serialization.py index 0cc941d853..540e951c5b 100644 --- a/packages/fetchai/protocols/oef_search/serialization.py +++ b/packages/fetchai/protocols/oef_search/serialization.py @@ -22,18 +22,21 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.fetchai.protocols.oef_search import oef_search_pb2 -from packages.fetchai.protocols.oef_search.custom_types import ( +from packages.fetchai.protocols.oef_search import oef_search_pb2 # type: ignore +from packages.fetchai.protocols.oef_search.custom_types import ( # type: ignore AgentsInfo, Description, OefErrorOperation, Query, ) -from packages.fetchai.protocols.oef_search.message import OefSearchMessage +from packages.fetchai.protocols.oef_search.message import ( # type: ignore + OefSearchMessage, +) class OefSearchSerializer(Serializer): @@ -50,7 +53,7 @@ def encode(msg: Message) -> bytes: msg = cast(OefSearchMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - oef_search_msg = oef_search_pb2.OefSearchMessage() + oef_search_msg = oef_search_pb2.OefSearchMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -111,7 +114,7 @@ def decode(obj: bytes) -> Message: :return: the 'OefSearch' message. """ message_pb = ProtobufMessage() - oef_search_pb = oef_search_pb2.OefSearchMessage() + oef_search_pb = oef_search_pb2.OefSearchMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/fetchai/protocols/state_update/__init__.py b/packages/fetchai/protocols/state_update/__init__.py index 18916807d8..4dd8a38086 100644 --- a/packages/fetchai/protocols/state_update/__init__.py +++ b/packages/fetchai/protocols/state_update/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the state_update protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.fetchai.protocols.state_update.message import StateUpdateMessage diff --git a/packages/fetchai/protocols/state_update/message.py b/packages/fetchai/protocols/state_update/message.py index 56b696cec7..27b66a239d 100644 --- a/packages/fetchai/protocols/state_update/message.py +++ b/packages/fetchai/protocols/state_update/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore _default_logger = logging.getLogger( diff --git a/packages/fetchai/protocols/state_update/protocol.yaml b/packages/fetchai/protocols/state_update/protocol.yaml index 4d9f35f438..60fcf97aa0 100644 --- a/packages/fetchai/protocols/state_update/protocol.yaml +++ b/packages/fetchai/protocols/state_update/protocol.yaml @@ -8,12 +8,12 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeieh3nvfgvwdybc7dz44ac3qhleeleaojmwo32o3nticdw24ltdekq - __init__.py: bafybeihdq4a2yugoou24etbyr6ixoxc3k6v2ghanqfhcfq3b5eh5pavxvu + __init__.py: bafybeifsx3dekfcndpw566kcknldbo622ot3j54ebgxprjvxk55zs7knhe dialogues.py: bafybeihybfbnjbknuytpftkluhjdn3wivuvjviv2fblswp2xbqwvns77s4 - message.py: bafybeid2conpcg6hjkj54edg76nuzhqbir4cpzsg7ba3p2fgyiy3nsllvy - serialization.py: bafybeih7g5oqrk2zzn33sl36q3pav6o232cnjlfonn2q7deasebflo4pqu + message.py: bafybeifqkkmjcd5ysw2hlhmul42c7xxdtawwdktvja2e5ibntp7lwpzrke + serialization.py: bafybeigvqjbmwmzu4rmy7sba4lezgwkmek3h4qvdwlwnfapf6krd4fvgwe state_update.proto: bafybeifb4w4hhbfulbsj3uoazthtcywhqkxabhtztwycsx3dtsmq6x43re - state_update_pb2.py: bafybeibkgjhcg2drachxjvnqilqehu4i72nslrdbwqwe6iburtnmbbr7im + state_update_pb2.py: bafybeigxg6dl2sgh2ivlu6my5osijmkkd6rl4ntrdzwd5tv7dwf5zdl73m tests/__init__.py: bafybeicf4p3m6qv3qkvd3ahxemeslvkrzjegetayjwrvjoch4ajoqezgpq tests/test_state_update.py: bafybeicjeibmkt2tsq2qqdmk7xqtkslrk7yavcr3vm7jnytgiog4he5feq tests/test_state_update_dialogues.py: bafybeiadrik76dnme5r3b2idoso3mbygbg245pprphgolifofoig6sxh6i diff --git a/packages/fetchai/protocols/state_update/serialization.py b/packages/fetchai/protocols/state_update/serialization.py index 0870cc6c9c..584f4bb07a 100644 --- a/packages/fetchai/protocols/state_update/serialization.py +++ b/packages/fetchai/protocols/state_update/serialization.py @@ -22,12 +22,15 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.fetchai.protocols.state_update import state_update_pb2 -from packages.fetchai.protocols.state_update.message import StateUpdateMessage +from packages.fetchai.protocols.state_update import state_update_pb2 # type: ignore +from packages.fetchai.protocols.state_update.message import ( # type: ignore + StateUpdateMessage, +) class StateUpdateSerializer(Serializer): @@ -44,7 +47,7 @@ def encode(msg: Message) -> bytes: msg = cast(StateUpdateMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - state_update_msg = state_update_pb2.StateUpdateMessage() + state_update_msg = state_update_pb2.StateUpdateMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -94,7 +97,7 @@ def decode(obj: bytes) -> Message: :return: the 'StateUpdate' message. """ message_pb = ProtobufMessage() - state_update_pb = state_update_pb2.StateUpdateMessage() + state_update_pb = state_update_pb2.StateUpdateMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/fetchai/protocols/state_update/state_update_pb2.py b/packages/fetchai/protocols/state_update/state_update_pb2.py index 704442d0a1..58ae2f5028 100644 --- a/packages/fetchai/protocols/state_update/state_update_pb2.py +++ b/packages/fetchai/protocols/state_update/state_update_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,158 +16,10 @@ b'\n\x12state_update.proto\x12\x1f\x61\x65\x61.fetchai.state_update.v1_0_0"\x93\x0c\n\x12StateUpdateMessage\x12W\n\x05\x61pply\x18\x05 \x01(\x0b\x32\x46.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Apply_PerformativeH\x00\x12S\n\x03\x65nd\x18\x06 \x01(\x0b\x32\x44.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.End_PerformativeH\x00\x12\x61\n\ninitialize\x18\x07 \x01(\x0b\x32K.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_PerformativeH\x00\x1a\xbc\x06\n\x17Initialize_Performative\x12\x93\x01\n\x1e\x65xchange_params_by_currency_id\x18\x01 \x03(\x0b\x32k.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative.ExchangeParamsByCurrencyIdEntry\x12\x89\x01\n\x19utility_params_by_good_id\x18\x02 \x03(\x0b\x32\x66.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative.UtilityParamsByGoodIdEntry\x12\x82\x01\n\x15\x61mount_by_currency_id\x18\x03 \x03(\x0b\x32\x63.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative.AmountByCurrencyIdEntry\x12\x82\x01\n\x15quantities_by_good_id\x18\x04 \x03(\x0b\x32\x63.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative.QuantitiesByGoodIdEntry\x1a\x41\n\x1f\x45xchangeParamsByCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a<\n\x1aUtilityParamsByGoodIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x39\n\x17\x41mountByCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x39\n\x17QuantitiesByGoodIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x88\x03\n\x12\x41pply_Performative\x12}\n\x15\x61mount_by_currency_id\x18\x01 \x03(\x0b\x32^.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Apply_Performative.AmountByCurrencyIdEntry\x12}\n\x15quantities_by_good_id\x18\x02 \x03(\x0b\x32^.aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Apply_Performative.QuantitiesByGoodIdEntry\x1a\x39\n\x17\x41mountByCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x39\n\x17QuantitiesByGoodIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x12\n\x10\x45nd_PerformativeB\x0e\n\x0cperformativeb\x06proto3' ) - -_STATEUPDATEMESSAGE = DESCRIPTOR.message_types_by_name["StateUpdateMessage"] -_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE = _STATEUPDATEMESSAGE.nested_types_by_name[ - "Initialize_Performative" -] -_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY = ( - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE.nested_types_by_name[ - "ExchangeParamsByCurrencyIdEntry" - ] -) -_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY = ( - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE.nested_types_by_name[ - "UtilityParamsByGoodIdEntry" - ] -) -_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY = ( - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE.nested_types_by_name[ - "AmountByCurrencyIdEntry" - ] -) -_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_QUANTITIESBYGOODIDENTRY = ( - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE.nested_types_by_name[ - "QuantitiesByGoodIdEntry" - ] -) -_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE = _STATEUPDATEMESSAGE.nested_types_by_name[ - "Apply_Performative" -] -_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY = ( - _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE.nested_types_by_name[ - "AmountByCurrencyIdEntry" - ] -) -_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_QUANTITIESBYGOODIDENTRY = ( - _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE.nested_types_by_name[ - "QuantitiesByGoodIdEntry" - ] -) -_STATEUPDATEMESSAGE_END_PERFORMATIVE = _STATEUPDATEMESSAGE.nested_types_by_name[ - "End_Performative" -] -StateUpdateMessage = _reflection.GeneratedProtocolMessageType( - "StateUpdateMessage", - (_message.Message,), - { - "Initialize_Performative": _reflection.GeneratedProtocolMessageType( - "Initialize_Performative", - (_message.Message,), - { - "ExchangeParamsByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "ExchangeParamsByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative.ExchangeParamsByCurrencyIdEntry) - }, - ), - "UtilityParamsByGoodIdEntry": _reflection.GeneratedProtocolMessageType( - "UtilityParamsByGoodIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative.UtilityParamsByGoodIdEntry) - }, - ), - "AmountByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "AmountByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative.AmountByCurrencyIdEntry) - }, - ), - "QuantitiesByGoodIdEntry": _reflection.GeneratedProtocolMessageType( - "QuantitiesByGoodIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_QUANTITIESBYGOODIDENTRY, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative.QuantitiesByGoodIdEntry) - }, - ), - "DESCRIPTOR": _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Initialize_Performative) - }, - ), - "Apply_Performative": _reflection.GeneratedProtocolMessageType( - "Apply_Performative", - (_message.Message,), - { - "AmountByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "AmountByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Apply_Performative.AmountByCurrencyIdEntry) - }, - ), - "QuantitiesByGoodIdEntry": _reflection.GeneratedProtocolMessageType( - "QuantitiesByGoodIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_QUANTITIESBYGOODIDENTRY, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Apply_Performative.QuantitiesByGoodIdEntry) - }, - ), - "DESCRIPTOR": _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.Apply_Performative) - }, - ), - "End_Performative": _reflection.GeneratedProtocolMessageType( - "End_Performative", - (_message.Message,), - { - "DESCRIPTOR": _STATEUPDATEMESSAGE_END_PERFORMATIVE, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage.End_Performative) - }, - ), - "DESCRIPTOR": _STATEUPDATEMESSAGE, - "__module__": "state_update_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.state_update.v1_0_0.StateUpdateMessage) - }, -) -_sym_db.RegisterMessage(StateUpdateMessage) -_sym_db.RegisterMessage(StateUpdateMessage.Initialize_Performative) -_sym_db.RegisterMessage( - StateUpdateMessage.Initialize_Performative.ExchangeParamsByCurrencyIdEntry -) -_sym_db.RegisterMessage( - StateUpdateMessage.Initialize_Performative.UtilityParamsByGoodIdEntry -) -_sym_db.RegisterMessage( - StateUpdateMessage.Initialize_Performative.AmountByCurrencyIdEntry -) -_sym_db.RegisterMessage( - StateUpdateMessage.Initialize_Performative.QuantitiesByGoodIdEntry -) -_sym_db.RegisterMessage(StateUpdateMessage.Apply_Performative) -_sym_db.RegisterMessage(StateUpdateMessage.Apply_Performative.AmountByCurrencyIdEntry) -_sym_db.RegisterMessage(StateUpdateMessage.Apply_Performative.QuantitiesByGoodIdEntry) -_sym_db.RegisterMessage(StateUpdateMessage.End_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "state_update_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY._options = ( None @@ -198,48 +49,48 @@ _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_options = ( b"8\001" ) - _STATEUPDATEMESSAGE._serialized_start = 56 - _STATEUPDATEMESSAGE._serialized_end = 1611 - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE._serialized_start = 352 - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE._serialized_end = 1180 - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY._serialized_start = ( - 935 - ) - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY._serialized_end = ( - 1000 - ) - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY._serialized_start = ( - 1002 - ) - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY._serialized_end = ( - 1062 - ) - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_start = ( - 1064 - ) - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_end = ( - 1121 - ) - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_start = ( - 1123 - ) - _STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_end = ( - 1180 - ) - _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE._serialized_start = 1183 - _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE._serialized_end = 1575 - _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_start = ( - 1064 - ) - _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_end = ( - 1121 - ) - _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_start = ( - 1123 - ) - _STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_end = ( - 1180 - ) - _STATEUPDATEMESSAGE_END_PERFORMATIVE._serialized_start = 1577 - _STATEUPDATEMESSAGE_END_PERFORMATIVE._serialized_end = 1595 + _globals["_STATEUPDATEMESSAGE"]._serialized_start = 56 + _globals["_STATEUPDATEMESSAGE"]._serialized_end = 1611 + _globals["_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE"]._serialized_start = 352 + _globals["_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE"]._serialized_end = 1180 + _globals[ + "_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY" + ]._serialized_start = 935 + _globals[ + "_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY" + ]._serialized_end = 1000 + _globals[ + "_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY" + ]._serialized_start = 1002 + _globals[ + "_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY" + ]._serialized_end = 1062 + _globals[ + "_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_start = 1064 + _globals[ + "_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_end = 1121 + _globals[ + "_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_start = 1123 + _globals[ + "_STATEUPDATEMESSAGE_INITIALIZE_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_end = 1180 + _globals["_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE"]._serialized_start = 1183 + _globals["_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE"]._serialized_end = 1575 + _globals[ + "_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_start = 1064 + _globals[ + "_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_end = 1121 + _globals[ + "_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_start = 1123 + _globals[ + "_STATEUPDATEMESSAGE_APPLY_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_end = 1180 + _globals["_STATEUPDATEMESSAGE_END_PERFORMATIVE"]._serialized_start = 1577 + _globals["_STATEUPDATEMESSAGE_END_PERFORMATIVE"]._serialized_end = 1595 # @@protoc_insertion_point(module_scope) diff --git a/packages/fetchai/protocols/tac/__init__.py b/packages/fetchai/protocols/tac/__init__.py index cc5b4741b9..2b34532239 100644 --- a/packages/fetchai/protocols/tac/__init__.py +++ b/packages/fetchai/protocols/tac/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the tac protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.fetchai.protocols.tac.message import TacMessage diff --git a/packages/fetchai/protocols/tac/message.py b/packages/fetchai/protocols/tac/message.py index 0b8690da97..4050f31255 100644 --- a/packages/fetchai/protocols/tac/message.py +++ b/packages/fetchai/protocols/tac/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.fetchai.protocols.tac.custom_types import ErrorCode as CustomErrorCode diff --git a/packages/fetchai/protocols/tac/protocol.yaml b/packages/fetchai/protocols/tac/protocol.yaml index 2695bf15d7..995fc8c869 100644 --- a/packages/fetchai/protocols/tac/protocol.yaml +++ b/packages/fetchai/protocols/tac/protocol.yaml @@ -9,13 +9,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeibmlti3bag4zk4o7nhjglt7nrrujpstfudd7pje4qfgofoxq5vbea - __init__.py: bafybeig2nzegcfrbwtsxu6wc622trcayqmmf3yrubpbyzfoih5hfv4c2bq + __init__.py: bafybeic7yjoolsdbzsmhe2fvho44sqe3tbzi5ezw4kecjvhwinv3kejmqm custom_types.py: bafybeiajzip37odvfonxcalejaxua3un3lzfepk74mltev5jxil4l6t5ae dialogues.py: bafybeigyrtdcjmlklucsbntypw3hdriijwy6f77iguvohwjm3kmzfkexty - message.py: bafybeigklfnwvntvng73nymg7pdj3ybmmigsab7ghmkhtiynkhcvybgjs4 - serialization.py: bafybeihnjre73zvclsc76fxpi6mkk57dz2soulavyp7urtll5doilhqyxm + message.py: bafybeieiygprdamnpa63wtwsq3th54l72epo7ujc5nsz3j6bfpoofxull4 + serialization.py: bafybeieipzx2rqweyhufdilxfmacx7jqxxmqemkejqhtqklpmfpb7yri4a tac.proto: bafybeig5yaqdqk5vzxibwbfkmd2oqsty4nsyhjihphjtq6q3ht7lyc334u - tac_pb2.py: bafybeihz5o5atjzsd23ljhshzsjwmhd5xqrsqb2oh5qgscljcuz2espvwy + tac_pb2.py: bafybeialt4qutqgzcmqbvc7puewz5usf7gl3mewpyn5ren4ocz2odrqkdi tests/__init__.py: bafybeigio4dcbzdb4zxbycaredo4l4a72z4rk6wt5bbvubhu6fdj73t6oe tests/test_tac.py: bafybeicwgqy3xhgaad3m7zlbk5yytoch45lvysf4l4g62hoyvb7lhzqobq tests/test_tac_dialogues.py: bafybeigqdsgi3uecuf2vg3jz6fpowlto36777laz6bnsw5u3dfvbppjdei diff --git a/packages/fetchai/protocols/tac/serialization.py b/packages/fetchai/protocols/tac/serialization.py index 6dc368ea52..8a1485cda0 100644 --- a/packages/fetchai/protocols/tac/serialization.py +++ b/packages/fetchai/protocols/tac/serialization.py @@ -22,13 +22,14 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.fetchai.protocols.tac import tac_pb2 -from packages.fetchai.protocols.tac.custom_types import ErrorCode -from packages.fetchai.protocols.tac.message import TacMessage +from packages.fetchai.protocols.tac import tac_pb2 # type: ignore +from packages.fetchai.protocols.tac.custom_types import ErrorCode # type: ignore +from packages.fetchai.protocols.tac.message import TacMessage # type: ignore class TacSerializer(Serializer): @@ -45,7 +46,7 @@ def encode(msg: Message) -> bytes: msg = cast(TacMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - tac_msg = tac_pb2.TacMessage() + tac_msg = tac_pb2.TacMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -151,7 +152,7 @@ def decode(obj: bytes) -> Message: :return: the 'Tac' message. """ message_pb = ProtobufMessage() - tac_pb = tac_pb2.TacMessage() + tac_pb = tac_pb2.TacMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/fetchai/protocols/tac/tac_pb2.py b/packages/fetchai/protocols/tac/tac_pb2.py index 8d70a07261..7f2aea8d37 100644 --- a/packages/fetchai/protocols/tac/tac_pb2.py +++ b/packages/fetchai/protocols/tac/tac_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,335 +16,10 @@ b'\n\ttac.proto\x12\x16\x61\x65\x61.fetchai.tac.v1_0_0"\xf9\x1f\n\nTacMessage\x12N\n\tcancelled\x18\x05 \x01(\x0b\x32\x39.aea.fetchai.tac.v1_0_0.TacMessage.Cancelled_PerformativeH\x00\x12N\n\tgame_data\x18\x06 \x01(\x0b\x32\x39.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_PerformativeH\x00\x12L\n\x08register\x18\x07 \x01(\x0b\x32\x38.aea.fetchai.tac.v1_0_0.TacMessage.Register_PerformativeH\x00\x12N\n\ttac_error\x18\x08 \x01(\x0b\x32\x39.aea.fetchai.tac.v1_0_0.TacMessage.Tac_Error_PerformativeH\x00\x12R\n\x0btransaction\x18\t \x01(\x0b\x32;.aea.fetchai.tac.v1_0_0.TacMessage.Transaction_PerformativeH\x00\x12l\n\x18transaction_confirmation\x18\n \x01(\x0b\x32H.aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Confirmation_PerformativeH\x00\x12P\n\nunregister\x18\x0b \x01(\x0b\x32:.aea.fetchai.tac.v1_0_0.TacMessage.Unregister_PerformativeH\x00\x1a\x89\x03\n\tErrorCode\x12N\n\nerror_code\x18\x01 \x01(\x0e\x32:.aea.fetchai.tac.v1_0_0.TacMessage.ErrorCode.ErrorCodeEnum"\xab\x02\n\rErrorCodeEnum\x12\x11\n\rGENERIC_ERROR\x10\x00\x12\x15\n\x11REQUEST_NOT_VALID\x10\x01\x12!\n\x1d\x41GENT_ADDR_ALREADY_REGISTERED\x10\x02\x12!\n\x1d\x41GENT_NAME_ALREADY_REGISTERED\x10\x03\x12\x18\n\x14\x41GENT_NOT_REGISTERED\x10\x04\x12\x19\n\x15TRANSACTION_NOT_VALID\x10\x05\x12\x1c\n\x18TRANSACTION_NOT_MATCHING\x10\x06\x12\x1f\n\x1b\x41GENT_NAME_NOT_IN_WHITELIST\x10\x07\x12\x1b\n\x17\x43OMPETITION_NOT_RUNNING\x10\x08\x12\x19\n\x15\x44IALOGUE_INCONSISTENT\x10\t\x1a+\n\x15Register_Performative\x12\x12\n\nagent_name\x18\x01 \x01(\t\x1a\x19\n\x17Unregister_Performative\x1a\xc8\x05\n\x18Transaction_Performative\x12\x16\n\x0etransaction_id\x18\x01 \x01(\t\x12\x11\n\tledger_id\x18\x02 \x01(\t\x12\x16\n\x0esender_address\x18\x03 \x01(\t\x12\x1c\n\x14\x63ounterparty_address\x18\x04 \x01(\t\x12r\n\x15\x61mount_by_currency_id\x18\x05 \x03(\x0b\x32S.aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Performative.AmountByCurrencyIdEntry\x12l\n\x12\x66\x65\x65_by_currency_id\x18\x06 \x03(\x0b\x32P.aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Performative.FeeByCurrencyIdEntry\x12r\n\x15quantities_by_good_id\x18\x07 \x03(\x0b\x32S.aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Performative.QuantitiesByGoodIdEntry\x12\r\n\x05nonce\x18\x08 \x01(\t\x12\x18\n\x10sender_signature\x18\t \x01(\t\x12\x1e\n\x16\x63ounterparty_signature\x18\n \x01(\t\x1a\x39\n\x17\x41mountByCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x36\n\x14\x46\x65\x65\x42yCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x39\n\x17QuantitiesByGoodIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x18\n\x16\x43\x61ncelled_Performative\x1a\xa3\x0c\n\x16Game_Data_Performative\x12p\n\x15\x61mount_by_currency_id\x18\x01 \x03(\x0b\x32Q.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.AmountByCurrencyIdEntry\x12\x81\x01\n\x1e\x65xchange_params_by_currency_id\x18\x02 \x03(\x0b\x32Y.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.ExchangeParamsByCurrencyIdEntry\x12p\n\x15quantities_by_good_id\x18\x03 \x03(\x0b\x32Q.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.QuantitiesByGoodIdEntry\x12w\n\x19utility_params_by_good_id\x18\x04 \x03(\x0b\x32T.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.UtilityParamsByGoodIdEntry\x12j\n\x12\x66\x65\x65_by_currency_id\x18\x05 \x03(\x0b\x32N.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.FeeByCurrencyIdEntry\x12j\n\x12\x61gent_addr_to_name\x18\x06 \x03(\x0b\x32N.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.AgentAddrToNameEntry\x12l\n\x13\x63urrency_id_to_name\x18\x07 \x03(\x0b\x32O.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.CurrencyIdToNameEntry\x12\x64\n\x0fgood_id_to_name\x18\x08 \x03(\x0b\x32K.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.GoodIdToNameEntry\x12\x12\n\nversion_id\x18\t \x01(\t\x12Q\n\x04info\x18\n \x03(\x0b\x32\x43.aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.InfoEntry\x12\x13\n\x0binfo_is_set\x18\x0b \x01(\x08\x1a\x39\n\x17\x41mountByCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x41\n\x1f\x45xchangeParamsByCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x39\n\x17QuantitiesByGoodIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a<\n\x1aUtilityParamsByGoodIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x36\n\x14\x46\x65\x65\x42yCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x36\n\x14\x41gentAddrToNameEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15\x43urrencyIdToNameEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11GoodIdToNameEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a+\n\tInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xb7\x03\n%Transaction_Confirmation_Performative\x12\x16\n\x0etransaction_id\x18\x01 \x01(\t\x12\x7f\n\x15\x61mount_by_currency_id\x18\x02 \x03(\x0b\x32`.aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Confirmation_Performative.AmountByCurrencyIdEntry\x12\x7f\n\x15quantities_by_good_id\x18\x03 \x03(\x0b\x32`.aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Confirmation_Performative.QuantitiesByGoodIdEntry\x1a\x39\n\x17\x41mountByCurrencyIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x39\n\x17QuantitiesByGoodIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\xef\x01\n\x16Tac_Error_Performative\x12@\n\nerror_code\x18\x01 \x01(\x0b\x32,.aea.fetchai.tac.v1_0_0.TacMessage.ErrorCode\x12Q\n\x04info\x18\x02 \x03(\x0b\x32\x43.aea.fetchai.tac.v1_0_0.TacMessage.Tac_Error_Performative.InfoEntry\x12\x13\n\x0binfo_is_set\x18\x03 \x01(\x08\x1a+\n\tInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0e\n\x0cperformativeb\x06proto3' ) - -_TACMESSAGE = DESCRIPTOR.message_types_by_name["TacMessage"] -_TACMESSAGE_ERRORCODE = _TACMESSAGE.nested_types_by_name["ErrorCode"] -_TACMESSAGE_REGISTER_PERFORMATIVE = _TACMESSAGE.nested_types_by_name[ - "Register_Performative" -] -_TACMESSAGE_UNREGISTER_PERFORMATIVE = _TACMESSAGE.nested_types_by_name[ - "Unregister_Performative" -] -_TACMESSAGE_TRANSACTION_PERFORMATIVE = _TACMESSAGE.nested_types_by_name[ - "Transaction_Performative" -] -_TACMESSAGE_TRANSACTION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY = ( - _TACMESSAGE_TRANSACTION_PERFORMATIVE.nested_types_by_name["AmountByCurrencyIdEntry"] -) -_TACMESSAGE_TRANSACTION_PERFORMATIVE_FEEBYCURRENCYIDENTRY = ( - _TACMESSAGE_TRANSACTION_PERFORMATIVE.nested_types_by_name["FeeByCurrencyIdEntry"] -) -_TACMESSAGE_TRANSACTION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY = ( - _TACMESSAGE_TRANSACTION_PERFORMATIVE.nested_types_by_name["QuantitiesByGoodIdEntry"] -) -_TACMESSAGE_CANCELLED_PERFORMATIVE = _TACMESSAGE.nested_types_by_name[ - "Cancelled_Performative" -] -_TACMESSAGE_GAME_DATA_PERFORMATIVE = _TACMESSAGE.nested_types_by_name[ - "Game_Data_Performative" -] -_TACMESSAGE_GAME_DATA_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name["AmountByCurrencyIdEntry"] -) -_TACMESSAGE_GAME_DATA_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name[ - "ExchangeParamsByCurrencyIdEntry" - ] -) -_TACMESSAGE_GAME_DATA_PERFORMATIVE_QUANTITIESBYGOODIDENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name["QuantitiesByGoodIdEntry"] -) -_TACMESSAGE_GAME_DATA_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name[ - "UtilityParamsByGoodIdEntry" - ] -) -_TACMESSAGE_GAME_DATA_PERFORMATIVE_FEEBYCURRENCYIDENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name["FeeByCurrencyIdEntry"] -) -_TACMESSAGE_GAME_DATA_PERFORMATIVE_AGENTADDRTONAMEENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name["AgentAddrToNameEntry"] -) -_TACMESSAGE_GAME_DATA_PERFORMATIVE_CURRENCYIDTONAMEENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name["CurrencyIdToNameEntry"] -) -_TACMESSAGE_GAME_DATA_PERFORMATIVE_GOODIDTONAMEENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name["GoodIdToNameEntry"] -) -_TACMESSAGE_GAME_DATA_PERFORMATIVE_INFOENTRY = ( - _TACMESSAGE_GAME_DATA_PERFORMATIVE.nested_types_by_name["InfoEntry"] -) -_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE = _TACMESSAGE.nested_types_by_name[ - "Transaction_Confirmation_Performative" -] -_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY = ( - _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE.nested_types_by_name[ - "AmountByCurrencyIdEntry" - ] -) -_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY = ( - _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE.nested_types_by_name[ - "QuantitiesByGoodIdEntry" - ] -) -_TACMESSAGE_TAC_ERROR_PERFORMATIVE = _TACMESSAGE.nested_types_by_name[ - "Tac_Error_Performative" -] -_TACMESSAGE_TAC_ERROR_PERFORMATIVE_INFOENTRY = ( - _TACMESSAGE_TAC_ERROR_PERFORMATIVE.nested_types_by_name["InfoEntry"] -) -_TACMESSAGE_ERRORCODE_ERRORCODEENUM = _TACMESSAGE_ERRORCODE.enum_types_by_name[ - "ErrorCodeEnum" -] -TacMessage = _reflection.GeneratedProtocolMessageType( - "TacMessage", - (_message.Message,), - { - "ErrorCode": _reflection.GeneratedProtocolMessageType( - "ErrorCode", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_ERRORCODE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.ErrorCode) - }, - ), - "Register_Performative": _reflection.GeneratedProtocolMessageType( - "Register_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_REGISTER_PERFORMATIVE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Register_Performative) - }, - ), - "Unregister_Performative": _reflection.GeneratedProtocolMessageType( - "Unregister_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_UNREGISTER_PERFORMATIVE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Unregister_Performative) - }, - ), - "Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Transaction_Performative", - (_message.Message,), - { - "AmountByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "AmountByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_TRANSACTION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Performative.AmountByCurrencyIdEntry) - }, - ), - "FeeByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "FeeByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_TRANSACTION_PERFORMATIVE_FEEBYCURRENCYIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Performative.FeeByCurrencyIdEntry) - }, - ), - "QuantitiesByGoodIdEntry": _reflection.GeneratedProtocolMessageType( - "QuantitiesByGoodIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_TRANSACTION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Performative.QuantitiesByGoodIdEntry) - }, - ), - "DESCRIPTOR": _TACMESSAGE_TRANSACTION_PERFORMATIVE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Performative) - }, - ), - "Cancelled_Performative": _reflection.GeneratedProtocolMessageType( - "Cancelled_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_CANCELLED_PERFORMATIVE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Cancelled_Performative) - }, - ), - "Game_Data_Performative": _reflection.GeneratedProtocolMessageType( - "Game_Data_Performative", - (_message.Message,), - { - "AmountByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "AmountByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.AmountByCurrencyIdEntry) - }, - ), - "ExchangeParamsByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "ExchangeParamsByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.ExchangeParamsByCurrencyIdEntry) - }, - ), - "QuantitiesByGoodIdEntry": _reflection.GeneratedProtocolMessageType( - "QuantitiesByGoodIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_QUANTITIESBYGOODIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.QuantitiesByGoodIdEntry) - }, - ), - "UtilityParamsByGoodIdEntry": _reflection.GeneratedProtocolMessageType( - "UtilityParamsByGoodIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.UtilityParamsByGoodIdEntry) - }, - ), - "FeeByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "FeeByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_FEEBYCURRENCYIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.FeeByCurrencyIdEntry) - }, - ), - "AgentAddrToNameEntry": _reflection.GeneratedProtocolMessageType( - "AgentAddrToNameEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_AGENTADDRTONAMEENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.AgentAddrToNameEntry) - }, - ), - "CurrencyIdToNameEntry": _reflection.GeneratedProtocolMessageType( - "CurrencyIdToNameEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_CURRENCYIDTONAMEENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.CurrencyIdToNameEntry) - }, - ), - "GoodIdToNameEntry": _reflection.GeneratedProtocolMessageType( - "GoodIdToNameEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_GOODIDTONAMEENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.GoodIdToNameEntry) - }, - ), - "InfoEntry": _reflection.GeneratedProtocolMessageType( - "InfoEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE_INFOENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative.InfoEntry) - }, - ), - "DESCRIPTOR": _TACMESSAGE_GAME_DATA_PERFORMATIVE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Game_Data_Performative) - }, - ), - "Transaction_Confirmation_Performative": _reflection.GeneratedProtocolMessageType( - "Transaction_Confirmation_Performative", - (_message.Message,), - { - "AmountByCurrencyIdEntry": _reflection.GeneratedProtocolMessageType( - "AmountByCurrencyIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Confirmation_Performative.AmountByCurrencyIdEntry) - }, - ), - "QuantitiesByGoodIdEntry": _reflection.GeneratedProtocolMessageType( - "QuantitiesByGoodIdEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Confirmation_Performative.QuantitiesByGoodIdEntry) - }, - ), - "DESCRIPTOR": _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Transaction_Confirmation_Performative) - }, - ), - "Tac_Error_Performative": _reflection.GeneratedProtocolMessageType( - "Tac_Error_Performative", - (_message.Message,), - { - "InfoEntry": _reflection.GeneratedProtocolMessageType( - "InfoEntry", - (_message.Message,), - { - "DESCRIPTOR": _TACMESSAGE_TAC_ERROR_PERFORMATIVE_INFOENTRY, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Tac_Error_Performative.InfoEntry) - }, - ), - "DESCRIPTOR": _TACMESSAGE_TAC_ERROR_PERFORMATIVE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage.Tac_Error_Performative) - }, - ), - "DESCRIPTOR": _TACMESSAGE, - "__module__": "tac_pb2" - # @@protoc_insertion_point(class_scope:aea.fetchai.tac.v1_0_0.TacMessage) - }, -) -_sym_db.RegisterMessage(TacMessage) -_sym_db.RegisterMessage(TacMessage.ErrorCode) -_sym_db.RegisterMessage(TacMessage.Register_Performative) -_sym_db.RegisterMessage(TacMessage.Unregister_Performative) -_sym_db.RegisterMessage(TacMessage.Transaction_Performative) -_sym_db.RegisterMessage(TacMessage.Transaction_Performative.AmountByCurrencyIdEntry) -_sym_db.RegisterMessage(TacMessage.Transaction_Performative.FeeByCurrencyIdEntry) -_sym_db.RegisterMessage(TacMessage.Transaction_Performative.QuantitiesByGoodIdEntry) -_sym_db.RegisterMessage(TacMessage.Cancelled_Performative) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative.AmountByCurrencyIdEntry) -_sym_db.RegisterMessage( - TacMessage.Game_Data_Performative.ExchangeParamsByCurrencyIdEntry -) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative.QuantitiesByGoodIdEntry) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative.UtilityParamsByGoodIdEntry) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative.FeeByCurrencyIdEntry) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative.AgentAddrToNameEntry) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative.CurrencyIdToNameEntry) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative.GoodIdToNameEntry) -_sym_db.RegisterMessage(TacMessage.Game_Data_Performative.InfoEntry) -_sym_db.RegisterMessage(TacMessage.Transaction_Confirmation_Performative) -_sym_db.RegisterMessage( - TacMessage.Transaction_Confirmation_Performative.AmountByCurrencyIdEntry -) -_sym_db.RegisterMessage( - TacMessage.Transaction_Confirmation_Performative.QuantitiesByGoodIdEntry -) -_sym_db.RegisterMessage(TacMessage.Tac_Error_Performative) -_sym_db.RegisterMessage(TacMessage.Tac_Error_Performative.InfoEntry) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "tac_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _TACMESSAGE_TRANSACTION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._options = None _TACMESSAGE_TRANSACTION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_options = ( @@ -405,72 +79,108 @@ ) _TACMESSAGE_TAC_ERROR_PERFORMATIVE_INFOENTRY._options = None _TACMESSAGE_TAC_ERROR_PERFORMATIVE_INFOENTRY._serialized_options = b"8\001" - _TACMESSAGE._serialized_start = 38 - _TACMESSAGE._serialized_end = 4127 - _TACMESSAGE_ERRORCODE._serialized_start = 647 - _TACMESSAGE_ERRORCODE._serialized_end = 1040 - _TACMESSAGE_ERRORCODE_ERRORCODEENUM._serialized_start = 741 - _TACMESSAGE_ERRORCODE_ERRORCODEENUM._serialized_end = 1040 - _TACMESSAGE_REGISTER_PERFORMATIVE._serialized_start = 1042 - _TACMESSAGE_REGISTER_PERFORMATIVE._serialized_end = 1085 - _TACMESSAGE_UNREGISTER_PERFORMATIVE._serialized_start = 1087 - _TACMESSAGE_UNREGISTER_PERFORMATIVE._serialized_end = 1112 - _TACMESSAGE_TRANSACTION_PERFORMATIVE._serialized_start = 1115 - _TACMESSAGE_TRANSACTION_PERFORMATIVE._serialized_end = 1827 - _TACMESSAGE_TRANSACTION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_start = ( - 1655 - ) - _TACMESSAGE_TRANSACTION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_end = 1712 - _TACMESSAGE_TRANSACTION_PERFORMATIVE_FEEBYCURRENCYIDENTRY._serialized_start = 1714 - _TACMESSAGE_TRANSACTION_PERFORMATIVE_FEEBYCURRENCYIDENTRY._serialized_end = 1768 - _TACMESSAGE_TRANSACTION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_start = ( - 1770 - ) - _TACMESSAGE_TRANSACTION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_end = 1827 - _TACMESSAGE_CANCELLED_PERFORMATIVE._serialized_start = 1829 - _TACMESSAGE_CANCELLED_PERFORMATIVE._serialized_end = 1853 - _TACMESSAGE_GAME_DATA_PERFORMATIVE._serialized_start = 1856 - _TACMESSAGE_GAME_DATA_PERFORMATIVE._serialized_end = 3427 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_start = 1655 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_end = 1712 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY._serialized_start = ( - 2974 - ) - _TACMESSAGE_GAME_DATA_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY._serialized_end = ( - 3039 - ) - _TACMESSAGE_GAME_DATA_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_start = 1770 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_end = 1827 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY._serialized_start = ( - 3100 - ) - _TACMESSAGE_GAME_DATA_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY._serialized_end = 3160 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_FEEBYCURRENCYIDENTRY._serialized_start = 1714 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_FEEBYCURRENCYIDENTRY._serialized_end = 1768 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_AGENTADDRTONAMEENTRY._serialized_start = 3218 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_AGENTADDRTONAMEENTRY._serialized_end = 3272 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_CURRENCYIDTONAMEENTRY._serialized_start = 3274 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_CURRENCYIDTONAMEENTRY._serialized_end = 3329 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_GOODIDTONAMEENTRY._serialized_start = 3331 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_GOODIDTONAMEENTRY._serialized_end = 3382 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_INFOENTRY._serialized_start = 3384 - _TACMESSAGE_GAME_DATA_PERFORMATIVE_INFOENTRY._serialized_end = 3427 - _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE._serialized_start = 3430 - _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE._serialized_end = 3869 - _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_start = ( - 1655 - ) - _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY._serialized_end = ( - 1712 - ) - _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_start = ( - 1770 - ) - _TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY._serialized_end = ( - 1827 - ) - _TACMESSAGE_TAC_ERROR_PERFORMATIVE._serialized_start = 3872 - _TACMESSAGE_TAC_ERROR_PERFORMATIVE._serialized_end = 4111 - _TACMESSAGE_TAC_ERROR_PERFORMATIVE_INFOENTRY._serialized_start = 3384 - _TACMESSAGE_TAC_ERROR_PERFORMATIVE_INFOENTRY._serialized_end = 3427 + _globals["_TACMESSAGE"]._serialized_start = 38 + _globals["_TACMESSAGE"]._serialized_end = 4127 + _globals["_TACMESSAGE_ERRORCODE"]._serialized_start = 647 + _globals["_TACMESSAGE_ERRORCODE"]._serialized_end = 1040 + _globals["_TACMESSAGE_ERRORCODE_ERRORCODEENUM"]._serialized_start = 741 + _globals["_TACMESSAGE_ERRORCODE_ERRORCODEENUM"]._serialized_end = 1040 + _globals["_TACMESSAGE_REGISTER_PERFORMATIVE"]._serialized_start = 1042 + _globals["_TACMESSAGE_REGISTER_PERFORMATIVE"]._serialized_end = 1085 + _globals["_TACMESSAGE_UNREGISTER_PERFORMATIVE"]._serialized_start = 1087 + _globals["_TACMESSAGE_UNREGISTER_PERFORMATIVE"]._serialized_end = 1112 + _globals["_TACMESSAGE_TRANSACTION_PERFORMATIVE"]._serialized_start = 1115 + _globals["_TACMESSAGE_TRANSACTION_PERFORMATIVE"]._serialized_end = 1827 + _globals[ + "_TACMESSAGE_TRANSACTION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_start = 1655 + _globals[ + "_TACMESSAGE_TRANSACTION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_end = 1712 + _globals[ + "_TACMESSAGE_TRANSACTION_PERFORMATIVE_FEEBYCURRENCYIDENTRY" + ]._serialized_start = 1714 + _globals[ + "_TACMESSAGE_TRANSACTION_PERFORMATIVE_FEEBYCURRENCYIDENTRY" + ]._serialized_end = 1768 + _globals[ + "_TACMESSAGE_TRANSACTION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_start = 1770 + _globals[ + "_TACMESSAGE_TRANSACTION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_end = 1827 + _globals["_TACMESSAGE_CANCELLED_PERFORMATIVE"]._serialized_start = 1829 + _globals["_TACMESSAGE_CANCELLED_PERFORMATIVE"]._serialized_end = 1853 + _globals["_TACMESSAGE_GAME_DATA_PERFORMATIVE"]._serialized_start = 1856 + _globals["_TACMESSAGE_GAME_DATA_PERFORMATIVE"]._serialized_end = 3427 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_start = 1655 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_end = 1712 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY" + ]._serialized_start = 2974 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_EXCHANGEPARAMSBYCURRENCYIDENTRY" + ]._serialized_end = 3039 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_start = 1770 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_end = 1827 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY" + ]._serialized_start = 3100 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_UTILITYPARAMSBYGOODIDENTRY" + ]._serialized_end = 3160 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_FEEBYCURRENCYIDENTRY" + ]._serialized_start = 1714 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_FEEBYCURRENCYIDENTRY" + ]._serialized_end = 1768 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_AGENTADDRTONAMEENTRY" + ]._serialized_start = 3218 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_AGENTADDRTONAMEENTRY" + ]._serialized_end = 3272 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_CURRENCYIDTONAMEENTRY" + ]._serialized_start = 3274 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_CURRENCYIDTONAMEENTRY" + ]._serialized_end = 3329 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_GOODIDTONAMEENTRY" + ]._serialized_start = 3331 + _globals[ + "_TACMESSAGE_GAME_DATA_PERFORMATIVE_GOODIDTONAMEENTRY" + ]._serialized_end = 3382 + _globals["_TACMESSAGE_GAME_DATA_PERFORMATIVE_INFOENTRY"]._serialized_start = 3384 + _globals["_TACMESSAGE_GAME_DATA_PERFORMATIVE_INFOENTRY"]._serialized_end = 3427 + _globals[ + "_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE" + ]._serialized_start = 3430 + _globals["_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE"]._serialized_end = 3869 + _globals[ + "_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_start = 1655 + _globals[ + "_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_AMOUNTBYCURRENCYIDENTRY" + ]._serialized_end = 1712 + _globals[ + "_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_start = 1770 + _globals[ + "_TACMESSAGE_TRANSACTION_CONFIRMATION_PERFORMATIVE_QUANTITIESBYGOODIDENTRY" + ]._serialized_end = 1827 + _globals["_TACMESSAGE_TAC_ERROR_PERFORMATIVE"]._serialized_start = 3872 + _globals["_TACMESSAGE_TAC_ERROR_PERFORMATIVE"]._serialized_end = 4111 + _globals["_TACMESSAGE_TAC_ERROR_PERFORMATIVE_INFOENTRY"]._serialized_start = 3384 + _globals["_TACMESSAGE_TAC_ERROR_PERFORMATIVE_INFOENTRY"]._serialized_end = 3427 # @@protoc_insertion_point(module_scope) diff --git a/packages/fetchai/skills/echo/skill.yaml b/packages/fetchai/skills/echo/skill.yaml index 0749de8094..5319d43bf3 100644 --- a/packages/fetchai/skills/echo/skill.yaml +++ b/packages/fetchai/skills/echo/skill.yaml @@ -19,7 +19,7 @@ fingerprint_ignore_patterns: [] connections: [] contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm skills: [] behaviours: echo: diff --git a/packages/fetchai/skills/error/skill.yaml b/packages/fetchai/skills/error/skill.yaml index 3199a6912d..52a5eb3a3c 100644 --- a/packages/fetchai/skills/error/skill.yaml +++ b/packages/fetchai/skills/error/skill.yaml @@ -13,7 +13,7 @@ fingerprint_ignore_patterns: [] connections: [] contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm skills: [] behaviours: {} handlers: diff --git a/packages/fetchai/skills/fipa_dummy_buyer/skill.yaml b/packages/fetchai/skills/fipa_dummy_buyer/skill.yaml index 27eaa19739..3fe2732c31 100644 --- a/packages/fetchai/skills/fipa_dummy_buyer/skill.yaml +++ b/packages/fetchai/skills/fipa_dummy_buyer/skill.yaml @@ -15,7 +15,7 @@ fingerprint_ignore_patterns: [] connections: [] contracts: [] protocols: -- fetchai/fipa:1.0.0:bafybeiaoblqdglj4ln4otpmmsrimtxpdxqkzuhttsyabn7gi2rvzcx4pbm +- fetchai/fipa:1.0.0:bafybeid6o7dxutkendclxxtxo3pyizrfho3vxyj5j5sowkysmuqamywb24 skills: [] behaviours: initializer: diff --git a/packages/fetchai/skills/gym/skill.yaml b/packages/fetchai/skills/gym/skill.yaml index 6354c92303..f953418fa1 100644 --- a/packages/fetchai/skills/gym/skill.yaml +++ b/packages/fetchai/skills/gym/skill.yaml @@ -23,11 +23,11 @@ fingerprint: tests/test_task.py: bafybeic4y7wulvlx2eparks3wyftfsx5ya2xsufoaohxfqhxrabm7zt7pi fingerprint_ignore_patterns: [] connections: -- fetchai/gym:0.19.0:bafybeiajoyj4ono4lsu5qhgkqrk65hyvyqkxnphycutxx4l6alc7hoak2i +- fetchai/gym:0.19.0:bafybeiguq4eduf35lvs3ltmi3jabpokz6raadrje3c274f5dnvfipdl7jm contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- fetchai/gym:1.0.0:bafybeiez5c2t6cosejejdvdhozniyqzz3fciuemdzdqhh4zaj3dkhbuunu +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- fetchai/gym:1.0.0:bafybeidepuani7dw6r2wwmtxfeefqwhnctprmwatzqbxg2achstc6kpfke skills: [] behaviours: {} handlers: diff --git a/packages/fetchai/skills/http_echo/skill.yaml b/packages/fetchai/skills/http_echo/skill.yaml index 8bc78ed056..f0be270bd1 100644 --- a/packages/fetchai/skills/http_echo/skill.yaml +++ b/packages/fetchai/skills/http_echo/skill.yaml @@ -18,8 +18,8 @@ fingerprint_ignore_patterns: [] connections: [] contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- valory/http:1.0.0:bafybeifyoio7nlh5zzyn5yz7krkou56l22to3cwg7gw5v5o3vxwklibhty +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- valory/http:1.0.0:bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe skills: [] behaviours: {} handlers: diff --git a/packages/open_aea/agents/gym_aea/aea-config.yaml b/packages/open_aea/agents/gym_aea/aea-config.yaml index 93a8161db1..406d76cd51 100644 --- a/packages/open_aea/agents/gym_aea/aea-config.yaml +++ b/packages/open_aea/agents/gym_aea/aea-config.yaml @@ -9,15 +9,15 @@ fingerprint: README.md: bafybeiadln5ca6tu6rzbsgjpeluf6nz5efxl3u223c3vxwgf2iynkj5n6q fingerprint_ignore_patterns: [] connections: -- fetchai/gym:0.19.0:bafybeiajoyj4ono4lsu5qhgkqrk65hyvyqkxnphycutxx4l6alc7hoak2i +- fetchai/gym:0.19.0:bafybeiguq4eduf35lvs3ltmi3jabpokz6raadrje3c274f5dnvfipdl7jm contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- fetchai/gym:1.0.0:bafybeiez5c2t6cosejejdvdhozniyqzz3fciuemdzdqhh4zaj3dkhbuunu -- fetchai/state_update:1.0.0:bafybeicmafbatrvxb3zwu3sareh6rbegjflh3yqqbyftmay73h7btozrlq -- open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- fetchai/gym:1.0.0:bafybeidepuani7dw6r2wwmtxfeefqwhnctprmwatzqbxg2achstc6kpfke +- fetchai/state_update:1.0.0:bafybeiefezh5ei6gntomi6g5iq4raabktari3wc6t4g6jf23bgo7cgwlcq +- open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii skills: -- fetchai/gym:0.20.0:bafybeiebrkzxf4n7m234nwqvxvoqqsqgq4yb4luv6ehlzy6ljhee74lbqi +- fetchai/gym:0.20.0:bafybeifaccpsmby27az6geu4d6m7xcjk2hop7ihtleqeeasphnhn2dp234 default_connection: fetchai/gym:0.19.0 default_ledger: ethereum private_key_paths: {} diff --git a/packages/open_aea/agents/http_echo/aea-config.yaml b/packages/open_aea/agents/http_echo/aea-config.yaml index 7e20f954a8..27ad4d6ad4 100644 --- a/packages/open_aea/agents/http_echo/aea-config.yaml +++ b/packages/open_aea/agents/http_echo/aea-config.yaml @@ -8,14 +8,14 @@ fingerprint: README.md: bafybeibkr6ecv5efx3hwxvxposvpmr76ugrj6kydeasb7bppo3ibynnjcu fingerprint_ignore_patterns: [] connections: -- fetchai/http_server:0.22.0:bafybeihaax5od5zo5jk2l62hv4jwuwtxloh5mijozudpsjombqc4ncmi6i +- valory/http_server:0.22.0:bafybeid4nl6ruidpto3ynwjmc76nf42egcroqlhqq6krh2onwktu4ywpne contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 -- valory/http:1.0.0:bafybeifyoio7nlh5zzyn5yz7krkou56l22to3cwg7gw5v5o3vxwklibhty +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii +- valory/http:1.0.0:bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe skills: -- fetchai/http_echo:0.20.0:bafybeiby2vrgfphhuvthg3kybki4mx5a5mkrpwg4mhdaa3igsr6smuvaoa +- fetchai/http_echo:0.20.0:bafybeieysvwshmy2rlfzqclcfhl263roy6z3skvmy3ikmfcoioxhnhp67i default_ledger: ethereum required_ledgers: - ethereum @@ -29,7 +29,7 @@ dependencies: open-aea-ledger-ethereum: {} default_connection: null --- -public_id: fetchai/http_server:0.22.0 +public_id: valory/http_server:0.22.0 type: connection config: host: ${HOST:str:localhost} diff --git a/packages/open_aea/agents/my_first_aea/aea-config.yaml b/packages/open_aea/agents/my_first_aea/aea-config.yaml index bba98e2920..027a53b316 100644 --- a/packages/open_aea/agents/my_first_aea/aea-config.yaml +++ b/packages/open_aea/agents/my_first_aea/aea-config.yaml @@ -8,14 +8,14 @@ fingerprint: README.md: bafybeiftiqiqpxn7ghrurhepquzqzk3su3x6wanlnolt2uj772fzgz574m fingerprint_ignore_patterns: [] connections: -- fetchai/stub:0.21.0:bafybeiau4vkru44a4gwujp47vjg7kglxcf456dhmcuhi4lsdx2m2ykmv2a +- fetchai/stub:0.21.0:bafybeictgpdqbpyppmoxn2g7jkaxvulihew7zaszv4xyhgvsntq7tqs7wi contracts: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- fetchai/state_update:1.0.0:bafybeicmafbatrvxb3zwu3sareh6rbegjflh3yqqbyftmay73h7btozrlq -- open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4 +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- fetchai/state_update:1.0.0:bafybeiefezh5ei6gntomi6g5iq4raabktari3wc6t4g6jf23bgo7cgwlcq +- open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii skills: -- fetchai/echo:0.19.0:bafybeidixh2eg4bnuvmdbwwhe2m5zq6e2tc6mfn5rwvzh6eqp6v7vxyopi +- fetchai/echo:0.19.0:bafybeibtjwgshqkgn5og7izogitnc66ug7pfhikcxlf2y46ixknpoxeyee default_connection: fetchai/stub:0.21.0 default_ledger: ethereum required_ledgers: diff --git a/packages/open_aea/protocols/signing/__init__.py b/packages/open_aea/protocols/signing/__init__.py index 1397f4172f..88f6d3fd8c 100644 --- a/packages/open_aea/protocols/signing/__init__.py +++ b/packages/open_aea/protocols/signing/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the signing protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.open_aea.protocols.signing.message import SigningMessage diff --git a/packages/open_aea/protocols/signing/message.py b/packages/open_aea/protocols/signing/message.py index 9f6ea44ec3..77ed4e14d4 100644 --- a/packages/open_aea/protocols/signing/message.py +++ b/packages/open_aea/protocols/signing/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.open_aea.protocols.signing.custom_types import ( ErrorCode as CustomErrorCode, diff --git a/packages/open_aea/protocols/signing/protocol.yaml b/packages/open_aea/protocols/signing/protocol.yaml index cb8036f77f..30a2a54331 100644 --- a/packages/open_aea/protocols/signing/protocol.yaml +++ b/packages/open_aea/protocols/signing/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeictzqfrs3zlpmirbelejsenkupesqh7nkjncbopkmamk7dkersmrm - __init__.py: bafybeib3ngpxzzdtepuvtx56nu7fsygh6vdqo5wwartke26pl6g3u6w2yq + __init__.py: bafybeidcp2kpdjifcvr6h5fljwmbsv6qvon3fipl3yxpvvvj3czahltn5q custom_types.py: bafybeicbmroddjj6xvtoi6k6d2mt7iqr3uwxvhwt3ecpy5ze52ffc6i7bq dialogues.py: bafybeihoh3bikzlt6trsgjykmi2apvi7heqiws4ilhqeobkabs4pzh6g3y - message.py: bafybeib3gcdkly2o2esud22ejpkklecba5gxnmdbaevqkv3g5j3dtwm6i4 - serialization.py: bafybeiehcx5zw52q7jvhfkflt3umdw2mism6y5444gw3fffc56ttqpzzja + message.py: bafybeies3rwhduysjplchopdisvmw4bgm27bbn2lzk4wi7kwn2cis5s37i + serialization.py: bafybeicti5yv4qqg4u5mqtssstir7ybzljyg5aeevuuzfamtq52yjc5gie signing.proto: bafybeigbzr6x5wdmqzc7eanlz5xmvaoiwb4kwozgg3cugq63b7esicusra - signing_pb2.py: bafybeihph4sio6j7s773dbzc46qrt7hyepxo6banh3c3arwuafoekuaddy + signing_pb2.py: bafybeig5sfgd3zkclg4fwfpkq7mfh2vtv27jjgpmlzrnk2ti2po5ciysiq tests/__init__.py: bafybeiaraxpv2z6r4e5rgmvnvdfv5rlrjdwbhqyjocxm2z2wkzpluezdey tests/test_signing.py: bafybeifaiu6jzymbxhglisc57taub3igt5ftvs6c37s3ddonk7hxr2ni7i tests/test_signing_dialogues.py: bafybeiewiya7lfnq4uiw3g2apa5mrxnzsy6lsu2xrbd5ljrm43rszrue7m diff --git a/packages/open_aea/protocols/signing/serialization.py b/packages/open_aea/protocols/signing/serialization.py index 8760ca89d7..ee17de789a 100644 --- a/packages/open_aea/protocols/signing/serialization.py +++ b/packages/open_aea/protocols/signing/serialization.py @@ -22,12 +22,13 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.open_aea.protocols.signing import signing_pb2 -from packages.open_aea.protocols.signing.custom_types import ( +from packages.open_aea.protocols.signing import signing_pb2 # type: ignore +from packages.open_aea.protocols.signing.custom_types import ( # type: ignore ErrorCode, RawMessage, RawTransaction, @@ -35,7 +36,7 @@ SignedTransaction, Terms, ) -from packages.open_aea.protocols.signing.message import SigningMessage +from packages.open_aea.protocols.signing.message import SigningMessage # type: ignore class SigningSerializer(Serializer): @@ -52,7 +53,7 @@ def encode(msg: Message) -> bytes: msg = cast(SigningMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - signing_msg = signing_pb2.SigningMessage() + signing_msg = signing_pb2.SigningMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -110,7 +111,7 @@ def decode(obj: bytes) -> Message: :return: the 'Signing' message. """ message_pb = ProtobufMessage() - signing_pb = signing_pb2.SigningMessage() + signing_pb = signing_pb2.SigningMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/open_aea/protocols/signing/signing_pb2.py b/packages/open_aea/protocols/signing/signing_pb2.py index 37910d3ff9..f0d03c3a9f 100644 --- a/packages/open_aea/protocols/signing/signing_pb2.py +++ b/packages/open_aea/protocols/signing/signing_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,182 +16,35 @@ b'\n\rsigning.proto\x12\x1b\x61\x65\x61.open_aea.signing.v1_0_0"\xbc\x0c\n\x0eSigningMessage\x12O\n\x05\x65rror\x18\x05 \x01(\x0b\x32>.aea.open_aea.signing.v1_0_0.SigningMessage.Error_PerformativeH\x00\x12]\n\x0csign_message\x18\x06 \x01(\x0b\x32\x45.aea.open_aea.signing.v1_0_0.SigningMessage.Sign_Message_PerformativeH\x00\x12\x65\n\x10sign_transaction\x18\x07 \x01(\x0b\x32I.aea.open_aea.signing.v1_0_0.SigningMessage.Sign_Transaction_PerformativeH\x00\x12\x61\n\x0esigned_message\x18\x08 \x01(\x0b\x32G.aea.open_aea.signing.v1_0_0.SigningMessage.Signed_Message_PerformativeH\x00\x12i\n\x12signed_transaction\x18\t \x01(\x0b\x32K.aea.open_aea.signing.v1_0_0.SigningMessage.Signed_Transaction_PerformativeH\x00\x1a\xbd\x01\n\tErrorCode\x12W\n\nerror_code\x18\x01 \x01(\x0e\x32\x43.aea.open_aea.signing.v1_0_0.SigningMessage.ErrorCode.ErrorCodeEnum"W\n\rErrorCodeEnum\x12 \n\x1cUNSUCCESSFUL_MESSAGE_SIGNING\x10\x00\x12$\n UNSUCCESSFUL_TRANSACTION_SIGNING\x10\x01\x1a!\n\nRawMessage\x12\x13\n\x0braw_message\x18\x01 \x01(\x0c\x1a)\n\x0eRawTransaction\x12\x17\n\x0fraw_transaction\x18\x01 \x01(\x0c\x1a\'\n\rSignedMessage\x12\x16\n\x0esigned_message\x18\x01 \x01(\x0c\x1a/\n\x11SignedTransaction\x12\x1a\n\x12signed_transaction\x18\x01 \x01(\x0c\x1a\x16\n\x05Terms\x12\r\n\x05terms\x18\x01 \x01(\x0c\x1a\xb6\x01\n\x1dSign_Transaction_Performative\x12@\n\x05terms\x18\x01 \x01(\x0b\x32\x31.aea.open_aea.signing.v1_0_0.SigningMessage.Terms\x12S\n\x0fraw_transaction\x18\x02 \x01(\x0b\x32:.aea.open_aea.signing.v1_0_0.SigningMessage.RawTransaction\x1a\xaa\x01\n\x19Sign_Message_Performative\x12@\n\x05terms\x18\x01 \x01(\x0b\x32\x31.aea.open_aea.signing.v1_0_0.SigningMessage.Terms\x12K\n\x0braw_message\x18\x02 \x01(\x0b\x32\x36.aea.open_aea.signing.v1_0_0.SigningMessage.RawMessage\x1a|\n\x1fSigned_Transaction_Performative\x12Y\n\x12signed_transaction\x18\x01 \x01(\x0b\x32=.aea.open_aea.signing.v1_0_0.SigningMessage.SignedTransaction\x1ap\n\x1bSigned_Message_Performative\x12Q\n\x0esigned_message\x18\x01 \x01(\x0b\x32\x39.aea.open_aea.signing.v1_0_0.SigningMessage.SignedMessage\x1a_\n\x12\x45rror_Performative\x12I\n\nerror_code\x18\x01 \x01(\x0b\x32\x35.aea.open_aea.signing.v1_0_0.SigningMessage.ErrorCodeB\x0e\n\x0cperformativeb\x06proto3' ) - -_SIGNINGMESSAGE = DESCRIPTOR.message_types_by_name["SigningMessage"] -_SIGNINGMESSAGE_ERRORCODE = _SIGNINGMESSAGE.nested_types_by_name["ErrorCode"] -_SIGNINGMESSAGE_RAWMESSAGE = _SIGNINGMESSAGE.nested_types_by_name["RawMessage"] -_SIGNINGMESSAGE_RAWTRANSACTION = _SIGNINGMESSAGE.nested_types_by_name["RawTransaction"] -_SIGNINGMESSAGE_SIGNEDMESSAGE = _SIGNINGMESSAGE.nested_types_by_name["SignedMessage"] -_SIGNINGMESSAGE_SIGNEDTRANSACTION = _SIGNINGMESSAGE.nested_types_by_name[ - "SignedTransaction" -] -_SIGNINGMESSAGE_TERMS = _SIGNINGMESSAGE.nested_types_by_name["Terms"] -_SIGNINGMESSAGE_SIGN_TRANSACTION_PERFORMATIVE = _SIGNINGMESSAGE.nested_types_by_name[ - "Sign_Transaction_Performative" -] -_SIGNINGMESSAGE_SIGN_MESSAGE_PERFORMATIVE = _SIGNINGMESSAGE.nested_types_by_name[ - "Sign_Message_Performative" -] -_SIGNINGMESSAGE_SIGNED_TRANSACTION_PERFORMATIVE = _SIGNINGMESSAGE.nested_types_by_name[ - "Signed_Transaction_Performative" -] -_SIGNINGMESSAGE_SIGNED_MESSAGE_PERFORMATIVE = _SIGNINGMESSAGE.nested_types_by_name[ - "Signed_Message_Performative" -] -_SIGNINGMESSAGE_ERROR_PERFORMATIVE = _SIGNINGMESSAGE.nested_types_by_name[ - "Error_Performative" -] -_SIGNINGMESSAGE_ERRORCODE_ERRORCODEENUM = _SIGNINGMESSAGE_ERRORCODE.enum_types_by_name[ - "ErrorCodeEnum" -] -SigningMessage = _reflection.GeneratedProtocolMessageType( - "SigningMessage", - (_message.Message,), - { - "ErrorCode": _reflection.GeneratedProtocolMessageType( - "ErrorCode", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_ERRORCODE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.ErrorCode) - }, - ), - "RawMessage": _reflection.GeneratedProtocolMessageType( - "RawMessage", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_RAWMESSAGE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.RawMessage) - }, - ), - "RawTransaction": _reflection.GeneratedProtocolMessageType( - "RawTransaction", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_RAWTRANSACTION, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.RawTransaction) - }, - ), - "SignedMessage": _reflection.GeneratedProtocolMessageType( - "SignedMessage", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_SIGNEDMESSAGE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.SignedMessage) - }, - ), - "SignedTransaction": _reflection.GeneratedProtocolMessageType( - "SignedTransaction", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_SIGNEDTRANSACTION, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.SignedTransaction) - }, - ), - "Terms": _reflection.GeneratedProtocolMessageType( - "Terms", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_TERMS, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.Terms) - }, - ), - "Sign_Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Sign_Transaction_Performative", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_SIGN_TRANSACTION_PERFORMATIVE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.Sign_Transaction_Performative) - }, - ), - "Sign_Message_Performative": _reflection.GeneratedProtocolMessageType( - "Sign_Message_Performative", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_SIGN_MESSAGE_PERFORMATIVE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.Sign_Message_Performative) - }, - ), - "Signed_Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Signed_Transaction_Performative", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_SIGNED_TRANSACTION_PERFORMATIVE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.Signed_Transaction_Performative) - }, - ), - "Signed_Message_Performative": _reflection.GeneratedProtocolMessageType( - "Signed_Message_Performative", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_SIGNED_MESSAGE_PERFORMATIVE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.Signed_Message_Performative) - }, - ), - "Error_Performative": _reflection.GeneratedProtocolMessageType( - "Error_Performative", - (_message.Message,), - { - "DESCRIPTOR": _SIGNINGMESSAGE_ERROR_PERFORMATIVE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage.Error_Performative) - }, - ), - "DESCRIPTOR": _SIGNINGMESSAGE, - "__module__": "signing_pb2" - # @@protoc_insertion_point(class_scope:aea.open_aea.signing.v1_0_0.SigningMessage) - }, -) -_sym_db.RegisterMessage(SigningMessage) -_sym_db.RegisterMessage(SigningMessage.ErrorCode) -_sym_db.RegisterMessage(SigningMessage.RawMessage) -_sym_db.RegisterMessage(SigningMessage.RawTransaction) -_sym_db.RegisterMessage(SigningMessage.SignedMessage) -_sym_db.RegisterMessage(SigningMessage.SignedTransaction) -_sym_db.RegisterMessage(SigningMessage.Terms) -_sym_db.RegisterMessage(SigningMessage.Sign_Transaction_Performative) -_sym_db.RegisterMessage(SigningMessage.Sign_Message_Performative) -_sym_db.RegisterMessage(SigningMessage.Signed_Transaction_Performative) -_sym_db.RegisterMessage(SigningMessage.Signed_Message_Performative) -_sym_db.RegisterMessage(SigningMessage.Error_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "signing_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _SIGNINGMESSAGE._serialized_start = 47 - _SIGNINGMESSAGE._serialized_end = 1643 - _SIGNINGMESSAGE_ERRORCODE._serialized_start = 551 - _SIGNINGMESSAGE_ERRORCODE._serialized_end = 740 - _SIGNINGMESSAGE_ERRORCODE_ERRORCODEENUM._serialized_start = 653 - _SIGNINGMESSAGE_ERRORCODE_ERRORCODEENUM._serialized_end = 740 - _SIGNINGMESSAGE_RAWMESSAGE._serialized_start = 742 - _SIGNINGMESSAGE_RAWMESSAGE._serialized_end = 775 - _SIGNINGMESSAGE_RAWTRANSACTION._serialized_start = 777 - _SIGNINGMESSAGE_RAWTRANSACTION._serialized_end = 818 - _SIGNINGMESSAGE_SIGNEDMESSAGE._serialized_start = 820 - _SIGNINGMESSAGE_SIGNEDMESSAGE._serialized_end = 859 - _SIGNINGMESSAGE_SIGNEDTRANSACTION._serialized_start = 861 - _SIGNINGMESSAGE_SIGNEDTRANSACTION._serialized_end = 908 - _SIGNINGMESSAGE_TERMS._serialized_start = 910 - _SIGNINGMESSAGE_TERMS._serialized_end = 932 - _SIGNINGMESSAGE_SIGN_TRANSACTION_PERFORMATIVE._serialized_start = 935 - _SIGNINGMESSAGE_SIGN_TRANSACTION_PERFORMATIVE._serialized_end = 1117 - _SIGNINGMESSAGE_SIGN_MESSAGE_PERFORMATIVE._serialized_start = 1120 - _SIGNINGMESSAGE_SIGN_MESSAGE_PERFORMATIVE._serialized_end = 1290 - _SIGNINGMESSAGE_SIGNED_TRANSACTION_PERFORMATIVE._serialized_start = 1292 - _SIGNINGMESSAGE_SIGNED_TRANSACTION_PERFORMATIVE._serialized_end = 1416 - _SIGNINGMESSAGE_SIGNED_MESSAGE_PERFORMATIVE._serialized_start = 1418 - _SIGNINGMESSAGE_SIGNED_MESSAGE_PERFORMATIVE._serialized_end = 1530 - _SIGNINGMESSAGE_ERROR_PERFORMATIVE._serialized_start = 1532 - _SIGNINGMESSAGE_ERROR_PERFORMATIVE._serialized_end = 1627 + _globals["_SIGNINGMESSAGE"]._serialized_start = 47 + _globals["_SIGNINGMESSAGE"]._serialized_end = 1643 + _globals["_SIGNINGMESSAGE_ERRORCODE"]._serialized_start = 551 + _globals["_SIGNINGMESSAGE_ERRORCODE"]._serialized_end = 740 + _globals["_SIGNINGMESSAGE_ERRORCODE_ERRORCODEENUM"]._serialized_start = 653 + _globals["_SIGNINGMESSAGE_ERRORCODE_ERRORCODEENUM"]._serialized_end = 740 + _globals["_SIGNINGMESSAGE_RAWMESSAGE"]._serialized_start = 742 + _globals["_SIGNINGMESSAGE_RAWMESSAGE"]._serialized_end = 775 + _globals["_SIGNINGMESSAGE_RAWTRANSACTION"]._serialized_start = 777 + _globals["_SIGNINGMESSAGE_RAWTRANSACTION"]._serialized_end = 818 + _globals["_SIGNINGMESSAGE_SIGNEDMESSAGE"]._serialized_start = 820 + _globals["_SIGNINGMESSAGE_SIGNEDMESSAGE"]._serialized_end = 859 + _globals["_SIGNINGMESSAGE_SIGNEDTRANSACTION"]._serialized_start = 861 + _globals["_SIGNINGMESSAGE_SIGNEDTRANSACTION"]._serialized_end = 908 + _globals["_SIGNINGMESSAGE_TERMS"]._serialized_start = 910 + _globals["_SIGNINGMESSAGE_TERMS"]._serialized_end = 932 + _globals["_SIGNINGMESSAGE_SIGN_TRANSACTION_PERFORMATIVE"]._serialized_start = 935 + _globals["_SIGNINGMESSAGE_SIGN_TRANSACTION_PERFORMATIVE"]._serialized_end = 1117 + _globals["_SIGNINGMESSAGE_SIGN_MESSAGE_PERFORMATIVE"]._serialized_start = 1120 + _globals["_SIGNINGMESSAGE_SIGN_MESSAGE_PERFORMATIVE"]._serialized_end = 1290 + _globals["_SIGNINGMESSAGE_SIGNED_TRANSACTION_PERFORMATIVE"]._serialized_start = 1292 + _globals["_SIGNINGMESSAGE_SIGNED_TRANSACTION_PERFORMATIVE"]._serialized_end = 1416 + _globals["_SIGNINGMESSAGE_SIGNED_MESSAGE_PERFORMATIVE"]._serialized_start = 1418 + _globals["_SIGNINGMESSAGE_SIGNED_MESSAGE_PERFORMATIVE"]._serialized_end = 1530 + _globals["_SIGNINGMESSAGE_ERROR_PERFORMATIVE"]._serialized_start = 1532 + _globals["_SIGNINGMESSAGE_ERROR_PERFORMATIVE"]._serialized_end = 1627 # @@protoc_insertion_point(module_scope) diff --git a/packages/valory/connections/http_client/connection.yaml b/packages/valory/connections/http_client/connection.yaml index f32d412132..a8499fa92d 100644 --- a/packages/valory/connections/http_client/connection.yaml +++ b/packages/valory/connections/http_client/connection.yaml @@ -15,7 +15,7 @@ fingerprint: fingerprint_ignore_patterns: [] connections: [] protocols: -- valory/http:1.0.0:bafybeifyoio7nlh5zzyn5yz7krkou56l22to3cwg7gw5v5o3vxwklibhty +- valory/http:1.0.0:bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe class_name: HTTPClientConnection config: host: 127.0.0.1 @@ -25,7 +25,7 @@ restricted_to_protocols: - valory/http:1.0.0 dependencies: aiohttp: - version: <3.8,>=3.7.4 + version: <4.0.0,>=3.8.5 certifi: {} multidict: {} is_abstract: false diff --git a/packages/fetchai/connections/http_server/README.md b/packages/valory/connections/http_server/README.md similarity index 54% rename from packages/fetchai/connections/http_server/README.md rename to packages/valory/connections/http_server/README.md index cb16e32cdd..a2947c1384 100644 --- a/packages/fetchai/connections/http_server/README.md +++ b/packages/valory/connections/http_server/README.md @@ -4,4 +4,4 @@ This connection wraps an HTTP server. It consumes requests from clients, transla ## Usage -First, add the connection to your AEA project (`aea add connection fetchai/http_server:0.22.0`). Then, update the `config` in `connection.yaml` by providing a `host` and `port` of the server. Optionally, provide a path to an [OpenAPI specification](https://swagger.io/docs/specification/about/) for request validation. \ No newline at end of file +First, add the connection to your AEA project (`aea add connection valory/http_server:0.22.0`). Then, update the `config` in `connection.yaml` by providing a `host` and `port` of the server. Optionally, provide a path to an [OpenAPI specification](https://swagger.io/docs/specification/about/) for request validation. \ No newline at end of file diff --git a/packages/fetchai/connections/http_server/__init__.py b/packages/valory/connections/http_server/__init__.py similarity index 96% rename from packages/fetchai/connections/http_server/__init__.py rename to packages/valory/connections/http_server/__init__.py index 5378e2084f..031e3523f0 100644 --- a/packages/fetchai/connections/http_server/__init__.py +++ b/packages/valory/connections/http_server/__init__.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # +# Copyright 2022-2023 Valory AG # Copyright 2018-2020 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/packages/fetchai/connections/http_server/connection.py b/packages/valory/connections/http_server/connection.py similarity index 99% rename from packages/fetchai/connections/http_server/connection.py rename to packages/valory/connections/http_server/connection.py index 87cc88734a..7d1bf33118 100644 --- a/packages/fetchai/connections/http_server/connection.py +++ b/packages/valory/connections/http_server/connection.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -67,7 +67,7 @@ _default_logger = logging.getLogger("aea.packages.fetchai.connections.http_server") RequestId = DialogueLabel -PUBLIC_ID = PublicId.from_str("fetchai/http_server:0.22.0") +PUBLIC_ID = PublicId.from_str("valory/http_server:0.22.0") class HttpDialogues(BaseHttpDialogues): @@ -213,7 +213,6 @@ def from_message(cls, http_message: HttpMessage) -> "Response": :return: the response """ if http_message.performative == HttpMessage.Performative.RESPONSE: - if http_message.is_set("headers") and http_message.headers: headers: Optional[dict] = dict( email.message_from_string(http_message.headers).items() diff --git a/packages/fetchai/connections/http_server/connection.yaml b/packages/valory/connections/http_server/connection.yaml similarity index 66% rename from packages/fetchai/connections/http_server/connection.yaml rename to packages/valory/connections/http_server/connection.yaml index ddb995f18d..c48d68829a 100644 --- a/packages/fetchai/connections/http_server/connection.yaml +++ b/packages/valory/connections/http_server/connection.yaml @@ -1,5 +1,5 @@ name: http_server -author: fetchai +author: valory version: 0.22.0 type: connection description: The HTTP server connection that wraps http server implementing a RESTful @@ -7,19 +7,19 @@ description: The HTTP server connection that wraps http server implementing a RE license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: - README.md: bafybeihkuhhsdfw5qqtz2jwpfppub6yvsehzmvmaqjlxnal4v76x47mcrq - __init__.py: bafybeif5pkr5oarwd7yagdgn46miolmdmvgdyxv4kadgws2bf3iwshom24 - connection.py: bafybeicvabh5c6hu6ple5s2peoj2kukxigz6z2uxcz5qo7k7sfw5ebi5sy - tests/__init__.py: bafybeidpthyhnhsvpixejrud77klcfkb3titlmyrssovfzt4a76dn3wnpm + README.md: bafybeifepluovb4so2eem34ulpcp4svegb2dqfpmtojtofhfkb3j2xanui + __init__.py: bafybeifykou5sazojmc7hdqnsdp4mncd4zh3xys3mdgdzwks23mvhzu2ga + connection.py: bafybeidc6zysa47tppkvq3ddq4jgpind7h6zzpsl4s7vukbbj5y4ts2zxm + tests/__init__.py: bafybeifqaf7cnc4oczjkbwmv4ahrkbiqxrojwgowej3kbri3skz4lzt43i tests/data/certs/server.crt: bafybeiev5i3xxkvn36wflf633gkumuxexsw4y2bubwbvl7edrz4igfgv34 tests/data/certs/server.csr: bafybeicvp7xdl5w3o4bzikkudpduitss3bpp6xqfwlxbw6kabdangohy5u tests/data/certs/server.key: bafybeiabvpkpqr4fctrbssfal6pviv5otgmu32qyrfpyhcql5wgmlzjtoe tests/data/petstore_sim.yaml: bafybeiaekkfxljlv57uviz4ug6isdqbzsnuxpsgy3dvhzh22daql3xh2i4 - tests/test_http_server.py: bafybeihxrl4eqgbroqfcrnued3twwx24cfzfpuxrqkkgvirqtqhadbmxzm + tests/test_http_server.py: bafybeia2cax2paqaygr6xgzbgmiqepsyjkdx4joi5qukpg6ewnz5yckk7m fingerprint_ignore_patterns: [] connections: [] protocols: -- valory/http:1.0.0:bafybeifyoio7nlh5zzyn5yz7krkou56l22to3cwg7gw5v5o3vxwklibhty +- valory/http:1.0.0:bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe class_name: HTTPServerConnection config: api_spec_path: null @@ -33,7 +33,7 @@ restricted_to_protocols: - valory/http:1.0.0 dependencies: aiohttp: - version: <3.8,>=3.7.4 + version: <4.0.0,>=3.8.5 openapi-core: version: ==0.13.2 openapi-spec-validator: diff --git a/packages/fetchai/connections/http_server/tests/__init__.py b/packages/valory/connections/http_server/tests/__init__.py similarity index 96% rename from packages/fetchai/connections/http_server/tests/__init__.py rename to packages/valory/connections/http_server/tests/__init__.py index 5dd135e96c..27614bc9e7 100644 --- a/packages/fetchai/connections/http_server/tests/__init__.py +++ b/packages/valory/connections/http_server/tests/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2020 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/packages/fetchai/connections/http_server/tests/data/certs/server.crt b/packages/valory/connections/http_server/tests/data/certs/server.crt similarity index 100% rename from packages/fetchai/connections/http_server/tests/data/certs/server.crt rename to packages/valory/connections/http_server/tests/data/certs/server.crt diff --git a/packages/fetchai/connections/http_server/tests/data/certs/server.csr b/packages/valory/connections/http_server/tests/data/certs/server.csr similarity index 100% rename from packages/fetchai/connections/http_server/tests/data/certs/server.csr rename to packages/valory/connections/http_server/tests/data/certs/server.csr diff --git a/packages/fetchai/connections/http_server/tests/data/certs/server.key b/packages/valory/connections/http_server/tests/data/certs/server.key similarity index 100% rename from packages/fetchai/connections/http_server/tests/data/certs/server.key rename to packages/valory/connections/http_server/tests/data/certs/server.key diff --git a/packages/fetchai/connections/http_server/tests/data/petstore_sim.yaml b/packages/valory/connections/http_server/tests/data/petstore_sim.yaml similarity index 100% rename from packages/fetchai/connections/http_server/tests/data/petstore_sim.yaml rename to packages/valory/connections/http_server/tests/data/petstore_sim.yaml diff --git a/packages/fetchai/connections/http_server/tests/test_http_server.py b/packages/valory/connections/http_server/tests/test_http_server.py similarity index 99% rename from packages/fetchai/connections/http_server/tests/test_http_server.py rename to packages/valory/connections/http_server/tests/test_http_server.py index 0b49359e62..cd08e0d081 100644 --- a/packages/fetchai/connections/http_server/tests/test_http_server.py +++ b/packages/valory/connections/http_server/tests/test_http_server.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -41,7 +41,7 @@ from aea.test_tools.mocks import RegexComparator from aea.test_tools.network import get_host, get_unused_tcp_port -from packages.fetchai.connections.http_server.connection import ( +from packages.valory.connections.http_server.connection import ( APISpec, HTTPServerConnection, Response, diff --git a/packages/valory/connections/ledger/__init__.py b/packages/valory/connections/ledger/__init__.py index b8d719382e..ae0f10868e 100644 --- a/packages/valory/connections/ledger/__init__.py +++ b/packages/valory/connections/ledger/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/packages/valory/connections/ledger/base.py b/packages/valory/connections/ledger/base.py index 49a1c4c697..e5537187cd 100644 --- a/packages/valory/connections/ledger/base.py +++ b/packages/valory/connections/ledger/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -132,6 +132,19 @@ async def wait_for( func_result = await asyncio.wait_for(running_func, timeout=timeout) return func_result + def set_extra_kwargs( # pylint: disable=no-self-use, unused-argument + self, message: Message + ) -> None: + """ + Set extra kwargs for the provided message. + + By default, this method does nothing. Override it in subclasses to set extra kwargs. + + :param message: the message that will be decorated with the extra kwargs. + :return: None + """ + return + def dispatch(self, envelope: Envelope) -> Task: """ Dispatch the request to the right sender handler. @@ -143,7 +156,9 @@ def dispatch(self, envelope: Envelope) -> Task: raise ValueError("Ledger connection expects non-serialized messages.") message = envelope.message ledger_id = self.get_ledger_id(message) - api = self.ledger_api_registry.make(ledger_id, **self.api_config(ledger_id)) + chain_id = self.get_chain_id(message) + self.set_extra_kwargs(message) + api = self.ledger_api_registry.make(ledger_id, **self.api_config(chain_id)) dialogue = self.dialogues.update(message) if dialogue is None: raise ValueError( # pragma: nocover @@ -196,3 +211,7 @@ def ledger_api_registry(self) -> Registry: @abstractmethod def get_ledger_id(self, message: Message) -> str: """Extract the ledger id from the message.""" + + @abstractmethod + def get_chain_id(self, message: Message) -> str: + """Extract the chain id from the message.""" diff --git a/packages/valory/connections/ledger/contract_dispatcher.py b/packages/valory/connections/ledger/contract_dispatcher.py index 4fb3013bc2..dfcb425079 100644 --- a/packages/valory/connections/ledger/contract_dispatcher.py +++ b/packages/valory/connections/ledger/contract_dispatcher.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -161,7 +161,9 @@ def dispatch_request( f"Whilst processing the contract api request:\n{message}\nthe following exception occured:\n{str(exception)}" ) response = self.get_error_message(exception, ledger_api, message, dialogue) - except Exception as exception: # pylint: disable=broad-except # pragma: nocover + except ( + Exception # pylint: disable=broad-except # pragma: nocover + ) as exception: self.logger.debug( f"Whilst processing the contract api request:\n{message}\nthe following error occured:\n{parse_exception(exception)}" ) @@ -415,3 +417,35 @@ def _validate_and_call_callable( raise AEAException( # pragma: nocover f"Unexpected performative: {message.performative}" ) + + def get_chain_id(self, message: Message) -> str: + """ + Get the chain id. For ledger messages this is the same as the ledger id, for now. + + :param message: the message + :return: the chain id + """ + if not isinstance(message, ContractApiMessage): # pragma: nocover + raise ValueError("argument is not a ContractApiMessage instance.") + message = cast(ContractApiMessage, message) + kwargs = cast(JSONLike, message.kwargs.body) + # if the chain id is specified in the message, use it. + # otherwise, use the ledger id. + chain_id = cast(str, kwargs.pop("chain_id", self.get_ledger_id(message))) + return chain_id + + def set_extra_kwargs(self, message: Message) -> None: + """ + Set extra kwargs for the contract api message. + + :param message: the message + """ + if not isinstance(message, ContractApiMessage): + raise ValueError("argument is not a ContractApiMessage instance.") + message = cast(ContractApiMessage, message) + if message.kwargs.body is not None and message.kwargs.body.get( + "set_ledger_api_configs", False + ): + message.kwargs.body.update( + {"ledger_api_configs": cast(dict, self._api_configs).copy()} + ) diff --git a/packages/valory/connections/ledger/ledger_dispatcher.py b/packages/valory/connections/ledger/ledger_dispatcher.py index 7917e3d348..de927acf70 100644 --- a/packages/valory/connections/ledger/ledger_dispatcher.py +++ b/packages/valory/connections/ledger/ledger_dispatcher.py @@ -22,6 +22,7 @@ import logging from typing import Any, cast +from aea.common import JSONLike from aea.connections.base import ConnectionStates from aea.crypto.base import LedgerApi from aea.helpers.transaction.base import RawTransaction, State, TransactionDigest @@ -452,3 +453,22 @@ def get_error_message( ), ) return response + + def get_chain_id(self, message: Message) -> str: + """ + Get the chain id. For ledger messages this is the same as the ledger id, for now. + + :param message: the message + :return: the chain id + """ + if not isinstance(message, LedgerApiMessage): # pragma: nocover + raise ValueError("argument is not a LedgerApiMessage instance.") + message = cast(LedgerApiMessage, message) + kwargs = {} + if message.is_set("kwargs"): + # check if kwargs is set + kwargs = cast(JSONLike, message.kwargs.body) + # if the chain id is specified in the message, use it. + # otherwise, use the ledger id. + chain_id = cast(str, kwargs.pop("chain_id", self.get_ledger_id(message))) + return chain_id diff --git a/packages/valory/connections/ledger/tests/__init__.py b/packages/valory/connections/ledger/tests/__init__.py index cce3f2703a..346bbd4063 100644 --- a/packages/valory/connections/ledger/tests/__init__.py +++ b/packages/valory/connections/ledger/tests/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2020 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/packages/valory/connections/ledger/tests/test_contract_dispatcher.py b/packages/valory/connections/ledger/tests/test_contract_dispatcher.py index 89009e647d..c5549b73f5 100644 --- a/packages/valory/connections/ledger/tests/test_contract_dispatcher.py +++ b/packages/valory/connections/ledger/tests/test_contract_dispatcher.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -151,7 +151,7 @@ def getAddress(ledger_api=None, contract_address=None, _addr=None): # type: ign message.callable = "getAddress" # Call a method present in the ABI but not in the contract package - with mock.patch("web3.contract.ContractFunction.call", return_value=0): + with mock.patch("web3.contract.contract.ContractFunction.call", return_value=0): result = ContractApiRequestDispatcher._validate_and_call_callable( ledger_api, message, contract ) @@ -243,6 +243,7 @@ def test_build_response_fails_on_bad_data_type() -> None: @pytest.mark.asyncio async def test_run_async() -> None: """Test run async error handled.""" + # for pydocstyle def _raise(): # type: ignore raise Exception("Expected") diff --git a/packages/valory/connections/ledger/tests/test_ledger.py b/packages/valory/connections/ledger/tests/test_ledger.py index 19399d3d75..ddfd8e75ca 100644 --- a/packages/valory/connections/ledger/tests/test_ledger.py +++ b/packages/valory/connections/ledger/tests/test_ledger.py @@ -413,6 +413,10 @@ def get_ledger_id(self, message: Message) -> str: raise ValueError("argument is not a `DummyLedgerApiMessage` instance.") return message.ledger_id + def get_chain_id(self, message: Message) -> str: + """Extract the chain id from the message.""" + return self.get_ledger_id(message=message) + class LedgerConnectionWithDummyDispatcher(LedgerConnection): """An extended `LedgerConnection` which utilizes the `DummyDispatcher`.""" diff --git a/packages/valory/connections/p2p_libp2p/connection.py b/packages/valory/connections/p2p_libp2p/connection.py index 5be8e0bfcd..7d54bf0888 100644 --- a/packages/valory/connections/p2p_libp2p/connection.py +++ b/packages/valory/connections/p2p_libp2p/connection.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -172,8 +172,8 @@ async def wait_for_status(self) -> Any: @staticmethod def make_acn_envelope_message(envelope: Envelope) -> bytes: """Make acn message with envelope in.""" - acn_msg = acn_pb2.AcnMessage() - performative = acn_pb2.AcnMessage.Aea_Envelope_Performative() # type: ignore + acn_msg = acn_pb2.AcnMessage() # type: ignore # pylint: disable=no-member + performative = acn_pb2.AcnMessage.Aea_Envelope_Performative() # type: ignore # pylint: disable=no-member performative.envelope = envelope.encode() acn_msg.aea_envelope.CopyFrom(performative) # pylint: disable=no-member buf = acn_msg.SerializeToString() @@ -188,7 +188,7 @@ async def read_envelope(self) -> Optional[Envelope]: return None try: - acn_msg = acn_pb2.AcnMessage() + acn_msg = acn_pb2.AcnMessage() # type: ignore # pylint: disable=no-member acn_msg.ParseFromString(buf) except Exception as e: @@ -225,8 +225,8 @@ async def read_envelope(self) -> Optional[Envelope]: async def write_acn_status_ok(self) -> None: """Send acn status ok.""" - acn_msg = acn_pb2.AcnMessage() - performative = acn_pb2.AcnMessage.Status_Performative() # type: ignore + acn_msg = acn_pb2.AcnMessage() # type: ignore # pylint: disable=no-member + performative = acn_pb2.AcnMessage.Status_Performative() # type: ignore # pylint: disable=no-member status = AcnMessage.StatusBody( status_code=AcnMessage.StatusBody.StatusCode.SUCCESS, msgs=[] ) @@ -243,8 +243,8 @@ async def write_acn_status_error( status_code: AcnMessage.StatusBody.StatusCode = AcnMessage.StatusBody.StatusCode.ERROR_GENERIC, # type: ignore ) -> None: """Send acn status error generic.""" - acn_msg = acn_pb2.AcnMessage() - performative = acn_pb2.AcnMessage.Status_Performative() # type: ignore + acn_msg = acn_pb2.AcnMessage() # type: ignore # pylint: disable=no-member + performative = acn_pb2.AcnMessage.Status_Performative() # type: ignore # pylint: disable=no-member status = AcnMessage.StatusBody(status_code=status_code, msgs=[msg]) AcnMessage.StatusBody.encode( performative.body, status # pylint: disable=no-member @@ -842,7 +842,6 @@ async def disconnect(self) -> None: self.state = ConnectionStates.disconnecting try: - if self._receive_from_node_task is not None: self._receive_from_node_task.cancel() self._receive_from_node_task = None diff --git a/packages/valory/connections/p2p_libp2p/connection.yaml b/packages/valory/connections/p2p_libp2p/connection.yaml index 12fb797ee7..335a1829bf 100644 --- a/packages/valory/connections/p2p_libp2p/connection.yaml +++ b/packages/valory/connections/p2p_libp2p/connection.yaml @@ -11,7 +11,7 @@ fingerprint: README.md: bafybeiabkdibf7iv3y33xkaemvuwiuhrjedrlvuklgjgty3gzggkgr5d5q __init__.py: bafybeibtknmpggpj77fflwndllcqvvbolpds7doymdp4fjd277metq6oxy check_dependencies.py: bafybeiglc4wx26doygocmmaqfy6xgcbbmhaznr5gbngiv4p2e34zhjwrwa - connection.py: bafybeid3g43y7wryyngns4dy2vjrx37xum2cmif2ovvsoycclny6mlrt6u + connection.py: bafybeifc2mkdsnyeygnri3xp52fgq475rmpqqlhbfsfjaef5uvhaduutvu consts.py: bafybeifpc6on6addr4a3qruevt5ykvxd26ehj2bmfncu2aq3bubrmpmdhe libp2p_node/Makefile: bafybeieuy4mut3oz2aqhtgt3dtky23do7g7tjg6fni4e256i3zg2onzmim libp2p_node/README.md: bafybeibke3cczx7lh4cmu4w6ofggrkm32mdzj6isjq4xo7isjproqg3y4y @@ -55,17 +55,17 @@ fingerprint: libp2p_node/utils/utils.go: bafybeihbd2br74nm3pupy4qkijm2tnuyl7pbq3uwasidmql5znhbr575k4 libp2p_node/utils/utils_test.go: bafybeig2kkgqy7miml66w2byomeqjp4czzv45gb4jas76cxildo3lxi4xq tests/__init__.py: bafybeieftcbmxxpe7okvm3ycualpyec6xys4nx5tihcjii7lqxd3w5lx7e - tests/base.py: bafybeibn5afb3fiy2lakt7j53kalfbi22vfd35ls25iqzddm7etwvqmiry - tests/test_aea_cli.py: bafybeicyqnu4pzdl26pd765qcommyqccwvge7uh3keuk6cswpnbc47ovii - tests/test_build.py: bafybeicacwij2ptpg4vbwdwtwrzwnp4afoewtsaq2woxfooipwy7z2hmxe + tests/base.py: bafybeif4bslxqlqz2xppqz6rx44ydh7v4i2n542muip6jzznu36cmn4iwi + tests/test_aea_cli.py: bafybeic3aczdlcvbzdi2l77m36dkbjqva3itv3kbmsiuxrk26va4qtfzli + tests/test_build.py: bafybeigzxvb57sauddmb7t6pwwtxu476wceklktg42bidphl5zkcnghlfu tests/test_errors.py: bafybeigfwg7cmxbgo7j2pce5vy55wvqze7wv67d4v37k3wpcflwbgzege4 tests/test_go_code_matching_acn.py: bafybeificee4dtvgtr2ejegokahlbqyvmvvtgxhs5b3ps4ezyjkz46b23u fingerprint_ignore_patterns: [] build_entrypoint: check_dependencies.py connections: [] protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- valory/acn:1.1.0:bafybeignmc5uh3vgpuckljcj2tgg7hdqyytkm6m5b6v6mxtazdcvubibva +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- valory/acn:1.1.0:bafybeic2pxzfc3voxl2ejhcqyf2ehm4wm5gxvgx7bliloiqi2uppmq6weu class_name: P2PLibp2pConnection config: delegate_uri: 127.0.0.1:11000 diff --git a/packages/valory/connections/p2p_libp2p/tests/base.py b/packages/valory/connections/p2p_libp2p/tests/base.py index 12b696d40c..9566d29c28 100644 --- a/packages/valory/connections/p2p_libp2p/tests/base.py +++ b/packages/valory/connections/p2p_libp2p/tests/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,10 +23,13 @@ import functools import inspect import itertools +import platform import tempfile from typing import Any, Callable, Type from unittest import mock +import pytest + from packages.fetchai.protocols.default.message import DefaultMessage @@ -40,6 +43,11 @@ DefaultMessage.protocol_specification_id ) +SKIP_WINDOWS = pytest.mark.skipif( + condition=(platform.system() == "Windows"), + reason="https://github.com/golang/go/issues/51007", +) + def libp2p_log_on_failure(fn: Callable) -> Callable: """Decorate a method running a libp2p node to print its logs in case test fails.""" diff --git a/packages/valory/connections/p2p_libp2p/tests/test_aea_cli.py b/packages/valory/connections/p2p_libp2p/tests/test_aea_cli.py index 674089323c..fed5c2111f 100644 --- a/packages/valory/connections/p2p_libp2p/tests/test_aea_cli.py +++ b/packages/valory/connections/p2p_libp2p/tests/test_aea_cli.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -38,7 +38,10 @@ LIBP2P_CERT_NOT_AFTER, LIBP2P_CERT_NOT_BEFORE, ) -from packages.valory.connections.p2p_libp2p.tests.base import libp2p_log_on_failure_all +from packages.valory.connections.p2p_libp2p.tests.base import ( + SKIP_WINDOWS, + libp2p_log_on_failure_all, +) p2p_libp2p_path = f"vendor.{p2p_libp2p.__name__.split('.', 1)[-1]}" @@ -46,6 +49,7 @@ LIBP2P_LAUNCH_TIMEOUT = 20 # may downloads up to ~66Mb +@SKIP_WINDOWS class BaseP2PLibp2pConnectionAEATest(AEATestCaseEmpty): """Base class for AEA CLI tests""" diff --git a/packages/valory/connections/p2p_libp2p/tests/test_build.py b/packages/valory/connections/p2p_libp2p/tests/test_build.py index a107ccd84f..fe4e0f3551 100644 --- a/packages/valory/connections/p2p_libp2p/tests/test_build.py +++ b/packages/valory/connections/p2p_libp2p/tests/test_build.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -40,6 +40,7 @@ check_versions as base_check_versions, ) from packages.valory.connections.p2p_libp2p.check_dependencies import version_to_string +from packages.valory.connections.p2p_libp2p.tests.base import SKIP_WINDOWS def check_versions() -> None: @@ -95,6 +96,7 @@ def test_check_versions_negative_cannot_parse_version(capsys: CaptureFixture) -> ) +@SKIP_WINDOWS def test_build_node() -> None: """Test build node function.""" with tempfile.TemporaryDirectory() as build_dir: diff --git a/packages/valory/connections/p2p_libp2p_client/connection.py b/packages/valory/connections/p2p_libp2p_client/connection.py index 06f6b58a8b..be999f719b 100644 --- a/packages/valory/connections/p2p_libp2p_client/connection.py +++ b/packages/valory/connections/p2p_libp2p_client/connection.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -89,7 +89,7 @@ async def wait_for_status(self) -> Any: @staticmethod def make_acn_envelope_message(envelope: Envelope) -> bytes: """Make acn message with envelope in.""" - acn_msg = acn_pb2.AcnMessage() + acn_msg = acn_pb2.AcnMessage() # type: ignore performative = acn_pb2.AcnMessage.Aea_Envelope_Performative() # type: ignore performative.envelope = envelope.encode() acn_msg.aea_envelope.CopyFrom(performative) # pylint: disable=no-member @@ -98,7 +98,7 @@ def make_acn_envelope_message(envelope: Envelope) -> bytes: async def write_acn_status_ok(self) -> None: """Send acn status ok.""" - acn_msg = acn_pb2.AcnMessage() + acn_msg = acn_pb2.AcnMessage() # type: ignore performative = acn_pb2.AcnMessage.Status_Performative() # type: ignore status = AcnMessage.StatusBody( status_code=AcnMessage.StatusBody.StatusCode.SUCCESS, msgs=[] @@ -116,7 +116,7 @@ async def write_acn_status_error( status_code: AcnMessage.StatusBody.StatusCode = AcnMessage.StatusBody.StatusCode.ERROR_GENERIC, # type: ignore ) -> None: """Send acn status error generic.""" - acn_msg = acn_pb2.AcnMessage() + acn_msg = acn_pb2.AcnMessage() # type: ignore performative = acn_pb2.AcnMessage.Status_Performative() # type: ignore status = AcnMessage.StatusBody(status_code=status_code, msgs=[msg]) AcnMessage.StatusBody.encode( @@ -172,7 +172,7 @@ async def read_envelope(self) -> Optional[Envelope]: return None try: - acn_msg = acn_pb2.AcnMessage() + acn_msg = acn_pb2.AcnMessage() # type: ignore acn_msg.ParseFromString(buf) except Exception as e: # pragma: nocover @@ -228,7 +228,7 @@ async def register( ) -> None: """Register agent on the remote node.""" agent_record = self.make_agent_record() - acn_msg = acn_pb2.AcnMessage() + acn_msg = acn_pb2.AcnMessage() # type: ignore performative = acn_pb2.AcnMessage.Register_Performative() # type: ignore AcnMessage.AgentRecord.encode( performative.record, agent_record # pylint: disable=no-member @@ -249,7 +249,7 @@ async def register( raise ConnectionError( "Error on connection setup. Incoming buffer is empty!" ) - acn_msg = acn_pb2.AcnMessage() + acn_msg = acn_pb2.AcnMessage() # type: ignore acn_msg.ParseFromString(buf) performative = acn_msg.WhichOneof("performative") if performative != "status": # pragma: nocover diff --git a/packages/valory/connections/p2p_libp2p_client/connection.yaml b/packages/valory/connections/p2p_libp2p_client/connection.yaml index 7897451fbe..81cf7bb137 100644 --- a/packages/valory/connections/p2p_libp2p_client/connection.yaml +++ b/packages/valory/connections/p2p_libp2p_client/connection.yaml @@ -10,11 +10,11 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeiaf5kdnfdc2jifojgniib76zl2c4utnx7ofewc3szqkrxsby62ulu __init__.py: bafybeid2azroxglu6fl7bxdfcsv3j77vyzgpikjnfwpxg73zeb5orez6ju - connection.py: bafybeif63be64vbsyhy2b6nnxa6td4kptknvkw2fbeppxrzd7pu4j67rhy + connection.py: bafybeiauso3ectgdvbhkt5j6wstfev5mnxiuj6hrkczyqgxurnvva3loqm fingerprint_ignore_patterns: [] connections: [] protocols: -- valory/acn:1.1.0:bafybeignmc5uh3vgpuckljcj2tgg7hdqyytkm6m5b6v6mxtazdcvubibva +- valory/acn:1.1.0:bafybeic2pxzfc3voxl2ejhcqyf2ehm4wm5gxvgx7bliloiqi2uppmq6weu class_name: P2PLibp2pClientConnection config: connect_retries: 3 diff --git a/packages/valory/connections/p2p_libp2p_mailbox/connection.py b/packages/valory/connections/p2p_libp2p_mailbox/connection.py index 8d54d356b8..1d9bffff87 100644 --- a/packages/valory/connections/p2p_libp2p_mailbox/connection.py +++ b/packages/valory/connections/p2p_libp2p_mailbox/connection.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -51,7 +51,9 @@ try: - from asyncio.streams import IncompleteReadError # pylint: disable=ungrouped-imports + from asyncio.streams import ( # type: ignore # pylint: disable=ungrouped-imports + IncompleteReadError, + ) except ImportError: # pragma: nocover from asyncio import IncompleteReadError # pylint: disable=ungrouped-imports @@ -149,7 +151,7 @@ async def read_envelope(self) -> Optional[Envelope]: async def register(self) -> None: """Register agent on the remote node.""" agent_record = self.make_agent_record() - performative = acn_pb2.AcnMessage.Register_Performative() # type: ignore + performative = acn_pb2.AcnMessage.Register_Performative() # type: ignore # pylint: disable=no-member AcnMessage.AgentRecord.encode( performative.record, agent_record # pylint: disable=no-member ) diff --git a/packages/valory/connections/p2p_libp2p_mailbox/connection.yaml b/packages/valory/connections/p2p_libp2p_mailbox/connection.yaml index 26880ba47d..be5e779eea 100644 --- a/packages/valory/connections/p2p_libp2p_mailbox/connection.yaml +++ b/packages/valory/connections/p2p_libp2p_mailbox/connection.yaml @@ -10,11 +10,11 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeibs3yp2sx6ax6h7isibyffq5unamfdxupmrb4wybjrhcjjmoycksq __init__.py: bafybeid2azroxglu6fl7bxdfcsv3j77vyzgpikjnfwpxg73zeb5orez6ju - connection.py: bafybeihh3tdukc2p3f2t27tinlfbo2jk3fg5wfrr7q4lvc3iafezdkwe3m + connection.py: bafybeiau3nqcdaqntr5e5wuz33dwmezog5ejycahxjzngolmlw36djtr3m fingerprint_ignore_patterns: [] connections: [] protocols: -- valory/acn:1.1.0:bafybeignmc5uh3vgpuckljcj2tgg7hdqyytkm6m5b6v6mxtazdcvubibva +- valory/acn:1.1.0:bafybeic2pxzfc3voxl2ejhcqyf2ehm4wm5gxvgx7bliloiqi2uppmq6weu class_name: P2PLibp2pMailboxConnection config: connect_retries: 3 @@ -42,7 +42,7 @@ excluded_protocols: [] restricted_to_protocols: [] dependencies: aiohttp: - version: <3.8,>=3.7.4 + version: <4.0.0,>=3.8.5 asn1crypto: version: <1.5.0,>=1.4.0 ecdsa: {} diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index 0b4066bb4d..d62be32d4e 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -12,19 +12,19 @@ fingerprint: readme.md: bafybeihg5yfzgqvg5ngy7r2o5tfeqnelx2ffxw4po5hmheqjfhumpmxpoq tests/__init__.py: bafybeiarz6mhky6pnkdihibcuqrfpx3qo55roygneoaoq2mndi5lzdlcj4 tests/acn_image.py: bafybeidkaavxkfocmg5c6y3i32fmbdf5i77jmqteoylmutifoh4zig3pr4 - tests/base.py: bafybeiezhwp66aft6332mb34olbtuy2bgjcuit6zn5rrkoidvzqjqlapui + tests/base.py: bafybeicnngqp7pw6thjf4yjewk6kazaezpfumiob6mfwupdvwxaij6xwwm tests/conftest.py: bafybeifkjrvsysdb7ujp2wxurzgytzy3ecu6fv247zfszfymdvb7y7klpu tests/test_certificate_dates.py: bafybeif4t76wsvsfvvplkmi4gecgod6ijff3bbqgtaqmpep6ywfapfptfm tests/test_dht.py: bafybeienykwwpdjlbjzxzttxjhgas2edp2f657gbsexjtkztehoq4yfb7m tests/test_p2p_libp2p/__init__.py: bafybeig7f7s5ptqtscf74y25dtqvhp75joekcxi6qnuzxgxyzictpsp4dm tests/test_p2p_libp2p/test_aea_cli.py: bafybeiej55kwbxuqjvjjz4tc7we54pxur7kvsh5o36lau7b7utltzwkc34 - tests/test_p2p_libp2p/test_communication.py: bafybeihnkle2pokfzfkguegmq4ptatvpcaezxrv564l76atjnuec57b2am - tests/test_p2p_libp2p/test_errors.py: bafybeifyl3anbjjm22xey73vhgdkosnd3nubyyl7xxr4kxbigsiwdsk25u - tests/test_p2p_libp2p/test_fault_tolerance.py: bafybeigbzraksxj35q3q6thnkbvgvybixapkow4dz6vyo7jlbgnyulbv4a - tests/test_p2p_libp2p/test_integration.py: bafybeicuu7nlyksb6ytipmjyuk5v4jhjt7ossegp74t7u5b2ckmlk5swci + tests/test_p2p_libp2p/test_communication.py: bafybeial5x6lzh5a5uvqs7s5p424szsbbkmfmnm7dx5unspxjnx5fwdf4a + tests/test_p2p_libp2p/test_errors.py: bafybeihp3pg25xowtnekz7s4mdhcsalrdpqu4reqlulzaa6zhmg7ahd4by + tests/test_p2p_libp2p/test_fault_tolerance.py: bafybeid3765nbedlwm52463hh42z67ww47f3yepa2cm53wsmn63iipu5om + tests/test_p2p_libp2p/test_integration.py: bafybeicidfdxwbesfamxtpevhq74udl5ne5xeqt523ggc2v2enam7yenyu tests/test_p2p_libp2p/test_slow_queue.py: bafybeihx6dga3bxiy7i67ggf6gnoakygyf5djyzv6prias5tcjpxawlpyy tests/test_p2p_libp2p_client/__init__.py: bafybeihjzl7ireo5rbnxcdbghbncykgcgcbh26m4mjjofsseeflauuf6sy - tests/test_p2p_libp2p_client/test_aea_cli.py: bafybeigcyn7yqcmfsdrrdy4dllqvkyhbdxywkfc3ikofczqqjhz4wsdr4y + tests/test_p2p_libp2p_client/test_aea_cli.py: bafybeie5yaezltj4xydnqghltt7f2t4vicdts5rm6bz4fdpt4kkkd42cyu tests/test_p2p_libp2p_client/test_communication.py: bafybeiceec5zsd2u37t56oiajijgwx7frpo3wzu4qdfd3lcq3lcldyqszq tests/test_p2p_libp2p_client/test_errors.py: bafybeiakajzr6jtecwnlzcrrx7paydz3obmleqzv7am5xbadu6wjtzabmm tests/test_p2p_libp2p_mailbox/__init__.py: bafybeiad64wftnugaahubhqc6bcqzg7om4435dzojdv7oeq4zdmn7kxzui @@ -34,12 +34,12 @@ fingerprint: tests/test_p2p_libp2p_mailbox/test_mailbox_service.py: bafybeibp3bkwkrw57qahvuysjdlumywtlk3te5gsvusgrvhsc75k7rrk4u fingerprint_ignore_patterns: [] connections: -- valory/p2p_libp2p:0.1.0:bafybeiesrebjctihckjc4axtyrrmofidtu7ngaxgzaostd4vokevm7nu6q -- valory/p2p_libp2p_client:0.1.0:bafybeidwcobzb7ut3efegoedad7jfckvt2n6prcmd4g7xnkm6hp6aafrva -- valory/p2p_libp2p_mailbox:0.1.0:bafybeiczoc27iefca3l5fc66e3bpxqu4ntgf5s4qpncbjsrdy4pf7cazlq +- valory/p2p_libp2p:0.1.0:bafybeiaykya7tvir7k5scovjzuagpfcftvptxoi2od5qqqvukwglsrrtzy +- valory/p2p_libp2p_client:0.1.0:bafybeihge56dn3xep2dzomu7rtvbgo4uc2qqh7ljl3fubqdi2lq44gs5lq +- valory/p2p_libp2p_mailbox:0.1.0:bafybeiajf6msadxrr2rgkgebwlzoiznxdccsyzjopm2pkommcgcamsw27m protocols: -- fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 -- valory/acn:1.1.0:bafybeignmc5uh3vgpuckljcj2tgg7hdqyytkm6m5b6v6mxtazdcvubibva +- fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm +- valory/acn:1.1.0:bafybeic2pxzfc3voxl2ejhcqyf2ehm4wm5gxvgx7bliloiqi2uppmq6weu class_name: MyScaffoldAsyncConnection config: foo: bar diff --git a/packages/valory/connections/test_libp2p/tests/base.py b/packages/valory/connections/test_libp2p/tests/base.py index 42bcb623c8..af71953bc6 100644 --- a/packages/valory/connections/test_libp2p/tests/base.py +++ b/packages/valory/connections/test_libp2p/tests/base.py @@ -64,6 +64,7 @@ ) from packages.valory.connections.p2p_libp2p.tests.base import ( MockDefaultMessageProtocol, + SKIP_WINDOWS, TEMP_LIBP2P_TEST_DIR, TIMEOUT, ports, @@ -274,6 +275,7 @@ def _make_libp2p_connection( return connection +@SKIP_WINDOWS class BaseP2PLibp2pTest: """Base class for ACN p2p libp2p tests""" @@ -296,7 +298,7 @@ def setup_class(cls): cls.cwd, cls.tmp = os.getcwd(), TEMP_LIBP2P_TEST_DIR if Path(cls.tmp).exists(): cls.remove_temp_test_dir() - Path(cls.tmp).mkdir() + Path(cls.tmp).mkdir(exist_ok=True) os.chdir(cls.tmp) @classmethod @@ -440,6 +442,7 @@ def mailbox_multiplexers(self) -> List[Multiplexer]: return self._multiplexers_by_connection_type(P2PLibp2pMailboxConnection) +@SKIP_WINDOWS class BaseP2PLibp2pAEATestCaseMany(AEATestCaseMany): """BaseP2PLibp2pAEATestCaseMany""" diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_communication.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_communication.py index 29a4f164e9..cd33e08b40 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_communication.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_communication.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_errors.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_errors.py index 79fa506145..1d2e7d6997 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_errors.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_errors.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ from packages.valory.connections.p2p_libp2p.tests.base import ports from packages.valory.connections.test_libp2p.tests.base import ( BaseP2PLibp2pTest, + SKIP_WINDOWS, _make_libp2p_connection, create_identity, ) @@ -123,6 +124,7 @@ def test_local_uri_provided_when_public_uri_provided(self) -> None: ) +@SKIP_WINDOWS def test_libp2p_connection_mixed_ip_address() -> None: """Test correct public uri ip and entry peers ips configuration.""" assert _ip_all_private_or_all_public([]) is True @@ -134,6 +136,11 @@ def test_libp2p_connection_mixed_ip_address() -> None: assert _ip_all_private_or_all_public(["fetch.ai", "acn.fetch.ai"]) is True +@pytest.mark.skipif( + condition=(platform.system() == "Windows"), + reason="https://github.com/golang/go/issues/51007", +) +@SKIP_WINDOWS def test_libp2p_connection_node_config_registration_delay() -> None: """Test node registration delay configuration""" @@ -141,6 +148,7 @@ def test_libp2p_connection_node_config_registration_delay() -> None: _make_libp2p_connection(peer_registration_delay="must_be_float") +@SKIP_WINDOWS def test_build_dir_not_set() -> None: """Test build dir not set.""" @@ -159,6 +167,7 @@ def test_build_dir_not_set() -> None: @pytest.mark.asyncio +@SKIP_WINDOWS async def test_reconnect_on_write_failed() -> None: """Test node restart on write fail.""" @@ -186,6 +195,7 @@ async def test_reconnect_on_write_failed() -> None: @pytest.mark.asyncio +@SKIP_WINDOWS async def test_reconnect_on_write_failed_reconnect_pipe() -> None: """Test node restart on write fail.""" @@ -219,6 +229,7 @@ async def test_reconnect_on_write_failed_reconnect_pipe() -> None: @pytest.mark.asyncio +@SKIP_WINDOWS async def test_reconnect_on_read_failed() -> None: """Test node restart on read fail.""" @@ -243,6 +254,7 @@ async def test_reconnect_on_read_failed() -> None: @pytest.mark.asyncio +@SKIP_WINDOWS async def test_node_stopped_callback() -> None: """Test node stopped callback called.""" diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_fault_tolerance.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_fault_tolerance.py index e9f8ec661e..2d16d7c52d 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_fault_tolerance.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_fault_tolerance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,13 +27,17 @@ from aea.test_tools.utils import wait_for_condition from packages.valory.connections.p2p_libp2p.check_dependencies import build_node -from packages.valory.connections.p2p_libp2p.tests.base import libp2p_log_on_failure_all +from packages.valory.connections.p2p_libp2p.tests.base import ( + SKIP_WINDOWS, + libp2p_log_on_failure_all, +) from packages.valory.connections.test_libp2p.tests.base import BaseP2PLibp2pTest TIMEOUT = 10 +@SKIP_WINDOWS class BaseTestLibp2pRelay(BaseP2PLibp2pTest): """Base test class for libp2p connection relay.""" diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_integration.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_integration.py index e01c0608c7..0561745a12 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_integration.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p/test_integration.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -95,7 +95,6 @@ def test_send_and_receive(self) -> None: """Test envelope send/received by every pair of connection.""" for sending, receiving in itertools.permutations(self.multiplexers, 2): - sender = next(c.address for c in sending.connections) to = next(c.address for c in receiving.connections) envelope = self.enveloped_default_message(to=to, sender=sender) diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_aea_cli.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_aea_cli.py index 4f58bf7de7..937b4b7022 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_aea_cli.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_aea_cli.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +34,7 @@ from packages.valory.connections.p2p_libp2p.tests.base import libp2p_log_on_failure_all from packages.valory.connections.p2p_libp2p_client.connection import PUBLIC_ID from packages.valory.connections.test_libp2p.tests.base import ( + SKIP_WINDOWS, _make_libp2p_connection, make_cert_request, ports, @@ -45,6 +46,7 @@ DEFAULT_LAUNCH_TIMEOUT = 10 +@SKIP_WINDOWS @libp2p_log_on_failure_all class TestP2PLibp2pClientConnectionAEARunning(AEATestCaseEmpty): """Test AEA with client connection is correctly run""" diff --git a/packages/valory/protocols/acn/__init__.py b/packages/valory/protocols/acn/__init__.py index 5a83aba56b..a4a5e703fa 100644 --- a/packages/valory/protocols/acn/__init__.py +++ b/packages/valory/protocols/acn/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the acn protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.valory.protocols.acn.message import AcnMessage diff --git a/packages/valory/protocols/acn/acn_pb2.py b/packages/valory/protocols/acn/acn_pb2.py index cad6429f19..9047a16eac 100644 --- a/packages/valory/protocols/acn/acn_pb2.py +++ b/packages/valory/protocols/acn/acn_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,128 +16,27 @@ b'\n\tacn.proto\x12\x12\x61\x65\x61.aea.acn.v1_0_0"\x92\x0b\n\nAcnMessage\x12P\n\x0c\x61\x65\x61_envelope\x18\x05 \x01(\x0b\x32\x38.aea.aea.acn.v1_0_0.AcnMessage.Aea_Envelope_PerformativeH\x00\x12T\n\x0elookup_request\x18\x06 \x01(\x0b\x32:.aea.aea.acn.v1_0_0.AcnMessage.Lookup_Request_PerformativeH\x00\x12V\n\x0flookup_response\x18\x07 \x01(\x0b\x32;.aea.aea.acn.v1_0_0.AcnMessage.Lookup_Response_PerformativeH\x00\x12H\n\x08register\x18\x08 \x01(\x0b\x32\x34.aea.aea.acn.v1_0_0.AcnMessage.Register_PerformativeH\x00\x12\x44\n\x06status\x18\t \x01(\x0b\x32\x32.aea.aea.acn.v1_0_0.AcnMessage.Status_PerformativeH\x00\x1a\xac\x01\n\x0b\x41gentRecord\x12\x12\n\nservice_id\x18\x01 \x01(\t\x12\x11\n\tledger_id\x18\x02 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x03 \x01(\t\x12\x12\n\npublic_key\x18\x04 \x01(\t\x12\x17\n\x0fpeer_public_key\x18\x05 \x01(\t\x12\x11\n\tsignature\x18\x06 \x01(\t\x12\x12\n\nnot_before\x18\x07 \x01(\t\x12\x11\n\tnot_after\x18\x08 \x01(\t\x1a\x92\x03\n\nStatusBody\x12\x46\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x38.aea.aea.acn.v1_0_0.AcnMessage.StatusBody.StatusCodeEnum\x12\x0c\n\x04msgs\x18\x02 \x03(\t"\xad\x02\n\x0eStatusCodeEnum\x12\x0b\n\x07SUCCESS\x10\x00\x12\x1d\n\x19\x45RROR_UNSUPPORTED_VERSION\x10\x01\x12\x1c\n\x18\x45RROR_UNEXPECTED_PAYLOAD\x10\x02\x12\x11\n\rERROR_GENERIC\x10\x03\x12\x10\n\x0c\x45RROR_DECODE\x10\x04\x12\x1d\n\x19\x45RROR_WRONG_AGENT_ADDRESS\x10\n\x12\x1a\n\x16\x45RROR_WRONG_PUBLIC_KEY\x10\x0b\x12\x17\n\x13\x45RROR_INVALID_PROOF\x10\x0c\x12\x1c\n\x18\x45RROR_UNSUPPORTED_LEDGER\x10\r\x12\x1f\n\x1b\x45RROR_UNKNOWN_AGENT_ADDRESS\x10\x14\x12\x19\n\x15\x45RROR_AGENT_NOT_READY\x10\x15\x1aS\n\x15Register_Performative\x12:\n\x06record\x18\x01 \x01(\x0b\x32*.aea.aea.acn.v1_0_0.AcnMessage.AgentRecord\x1a\x34\n\x1bLookup_Request_Performative\x12\x15\n\ragent_address\x18\x01 \x01(\t\x1aZ\n\x1cLookup_Response_Performative\x12:\n\x06record\x18\x01 \x01(\x0b\x32*.aea.aea.acn.v1_0_0.AcnMessage.AgentRecord\x1ai\n\x19\x41\x65\x61_Envelope_Performative\x12\x10\n\x08\x65nvelope\x18\x01 \x01(\x0c\x12:\n\x06record\x18\x02 \x01(\x0b\x32*.aea.aea.acn.v1_0_0.AcnMessage.AgentRecord\x1aN\n\x13Status_Performative\x12\x37\n\x04\x62ody\x18\x01 \x01(\x0b\x32).aea.aea.acn.v1_0_0.AcnMessage.StatusBodyB\x0e\n\x0cperformativeb\x06proto3' ) - -_ACNMESSAGE = DESCRIPTOR.message_types_by_name["AcnMessage"] -_ACNMESSAGE_AGENTRECORD = _ACNMESSAGE.nested_types_by_name["AgentRecord"] -_ACNMESSAGE_STATUSBODY = _ACNMESSAGE.nested_types_by_name["StatusBody"] -_ACNMESSAGE_REGISTER_PERFORMATIVE = _ACNMESSAGE.nested_types_by_name[ - "Register_Performative" -] -_ACNMESSAGE_LOOKUP_REQUEST_PERFORMATIVE = _ACNMESSAGE.nested_types_by_name[ - "Lookup_Request_Performative" -] -_ACNMESSAGE_LOOKUP_RESPONSE_PERFORMATIVE = _ACNMESSAGE.nested_types_by_name[ - "Lookup_Response_Performative" -] -_ACNMESSAGE_AEA_ENVELOPE_PERFORMATIVE = _ACNMESSAGE.nested_types_by_name[ - "Aea_Envelope_Performative" -] -_ACNMESSAGE_STATUS_PERFORMATIVE = _ACNMESSAGE.nested_types_by_name[ - "Status_Performative" -] -_ACNMESSAGE_STATUSBODY_STATUSCODEENUM = _ACNMESSAGE_STATUSBODY.enum_types_by_name[ - "StatusCodeEnum" -] -AcnMessage = _reflection.GeneratedProtocolMessageType( - "AcnMessage", - (_message.Message,), - { - "AgentRecord": _reflection.GeneratedProtocolMessageType( - "AgentRecord", - (_message.Message,), - { - "DESCRIPTOR": _ACNMESSAGE_AGENTRECORD, - "__module__": "acn_pb2" - # @@protoc_insertion_point(class_scope:aea.aea.acn.v1_0_0.AcnMessage.AgentRecord) - }, - ), - "StatusBody": _reflection.GeneratedProtocolMessageType( - "StatusBody", - (_message.Message,), - { - "DESCRIPTOR": _ACNMESSAGE_STATUSBODY, - "__module__": "acn_pb2" - # @@protoc_insertion_point(class_scope:aea.aea.acn.v1_0_0.AcnMessage.StatusBody) - }, - ), - "Register_Performative": _reflection.GeneratedProtocolMessageType( - "Register_Performative", - (_message.Message,), - { - "DESCRIPTOR": _ACNMESSAGE_REGISTER_PERFORMATIVE, - "__module__": "acn_pb2" - # @@protoc_insertion_point(class_scope:aea.aea.acn.v1_0_0.AcnMessage.Register_Performative) - }, - ), - "Lookup_Request_Performative": _reflection.GeneratedProtocolMessageType( - "Lookup_Request_Performative", - (_message.Message,), - { - "DESCRIPTOR": _ACNMESSAGE_LOOKUP_REQUEST_PERFORMATIVE, - "__module__": "acn_pb2" - # @@protoc_insertion_point(class_scope:aea.aea.acn.v1_0_0.AcnMessage.Lookup_Request_Performative) - }, - ), - "Lookup_Response_Performative": _reflection.GeneratedProtocolMessageType( - "Lookup_Response_Performative", - (_message.Message,), - { - "DESCRIPTOR": _ACNMESSAGE_LOOKUP_RESPONSE_PERFORMATIVE, - "__module__": "acn_pb2" - # @@protoc_insertion_point(class_scope:aea.aea.acn.v1_0_0.AcnMessage.Lookup_Response_Performative) - }, - ), - "Aea_Envelope_Performative": _reflection.GeneratedProtocolMessageType( - "Aea_Envelope_Performative", - (_message.Message,), - { - "DESCRIPTOR": _ACNMESSAGE_AEA_ENVELOPE_PERFORMATIVE, - "__module__": "acn_pb2" - # @@protoc_insertion_point(class_scope:aea.aea.acn.v1_0_0.AcnMessage.Aea_Envelope_Performative) - }, - ), - "Status_Performative": _reflection.GeneratedProtocolMessageType( - "Status_Performative", - (_message.Message,), - { - "DESCRIPTOR": _ACNMESSAGE_STATUS_PERFORMATIVE, - "__module__": "acn_pb2" - # @@protoc_insertion_point(class_scope:aea.aea.acn.v1_0_0.AcnMessage.Status_Performative) - }, - ), - "DESCRIPTOR": _ACNMESSAGE, - "__module__": "acn_pb2" - # @@protoc_insertion_point(class_scope:aea.aea.acn.v1_0_0.AcnMessage) - }, -) -_sym_db.RegisterMessage(AcnMessage) -_sym_db.RegisterMessage(AcnMessage.AgentRecord) -_sym_db.RegisterMessage(AcnMessage.StatusBody) -_sym_db.RegisterMessage(AcnMessage.Register_Performative) -_sym_db.RegisterMessage(AcnMessage.Lookup_Request_Performative) -_sym_db.RegisterMessage(AcnMessage.Lookup_Response_Performative) -_sym_db.RegisterMessage(AcnMessage.Aea_Envelope_Performative) -_sym_db.RegisterMessage(AcnMessage.Status_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "acn_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _ACNMESSAGE._serialized_start = 34 - _ACNMESSAGE._serialized_end = 1460 - _ACNMESSAGE_AGENTRECORD._serialized_start = 449 - _ACNMESSAGE_AGENTRECORD._serialized_end = 621 - _ACNMESSAGE_STATUSBODY._serialized_start = 624 - _ACNMESSAGE_STATUSBODY._serialized_end = 1026 - _ACNMESSAGE_STATUSBODY_STATUSCODEENUM._serialized_start = 725 - _ACNMESSAGE_STATUSBODY_STATUSCODEENUM._serialized_end = 1026 - _ACNMESSAGE_REGISTER_PERFORMATIVE._serialized_start = 1028 - _ACNMESSAGE_REGISTER_PERFORMATIVE._serialized_end = 1111 - _ACNMESSAGE_LOOKUP_REQUEST_PERFORMATIVE._serialized_start = 1113 - _ACNMESSAGE_LOOKUP_REQUEST_PERFORMATIVE._serialized_end = 1165 - _ACNMESSAGE_LOOKUP_RESPONSE_PERFORMATIVE._serialized_start = 1167 - _ACNMESSAGE_LOOKUP_RESPONSE_PERFORMATIVE._serialized_end = 1257 - _ACNMESSAGE_AEA_ENVELOPE_PERFORMATIVE._serialized_start = 1259 - _ACNMESSAGE_AEA_ENVELOPE_PERFORMATIVE._serialized_end = 1364 - _ACNMESSAGE_STATUS_PERFORMATIVE._serialized_start = 1366 - _ACNMESSAGE_STATUS_PERFORMATIVE._serialized_end = 1444 + _globals["_ACNMESSAGE"]._serialized_start = 34 + _globals["_ACNMESSAGE"]._serialized_end = 1460 + _globals["_ACNMESSAGE_AGENTRECORD"]._serialized_start = 449 + _globals["_ACNMESSAGE_AGENTRECORD"]._serialized_end = 621 + _globals["_ACNMESSAGE_STATUSBODY"]._serialized_start = 624 + _globals["_ACNMESSAGE_STATUSBODY"]._serialized_end = 1026 + _globals["_ACNMESSAGE_STATUSBODY_STATUSCODEENUM"]._serialized_start = 725 + _globals["_ACNMESSAGE_STATUSBODY_STATUSCODEENUM"]._serialized_end = 1026 + _globals["_ACNMESSAGE_REGISTER_PERFORMATIVE"]._serialized_start = 1028 + _globals["_ACNMESSAGE_REGISTER_PERFORMATIVE"]._serialized_end = 1111 + _globals["_ACNMESSAGE_LOOKUP_REQUEST_PERFORMATIVE"]._serialized_start = 1113 + _globals["_ACNMESSAGE_LOOKUP_REQUEST_PERFORMATIVE"]._serialized_end = 1165 + _globals["_ACNMESSAGE_LOOKUP_RESPONSE_PERFORMATIVE"]._serialized_start = 1167 + _globals["_ACNMESSAGE_LOOKUP_RESPONSE_PERFORMATIVE"]._serialized_end = 1257 + _globals["_ACNMESSAGE_AEA_ENVELOPE_PERFORMATIVE"]._serialized_start = 1259 + _globals["_ACNMESSAGE_AEA_ENVELOPE_PERFORMATIVE"]._serialized_end = 1364 + _globals["_ACNMESSAGE_STATUS_PERFORMATIVE"]._serialized_start = 1366 + _globals["_ACNMESSAGE_STATUS_PERFORMATIVE"]._serialized_end = 1444 # @@protoc_insertion_point(module_scope) diff --git a/packages/valory/protocols/acn/message.py b/packages/valory/protocols/acn/message.py index 5fe46dd596..fbc426851d 100644 --- a/packages/valory/protocols/acn/message.py +++ b/packages/valory/protocols/acn/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.valory.protocols.acn.custom_types import AgentRecord as CustomAgentRecord from packages.valory.protocols.acn.custom_types import StatusBody as CustomStatusBody diff --git a/packages/valory/protocols/acn/protocol.yaml b/packages/valory/protocols/acn/protocol.yaml index 6c18b09d94..35e40f903a 100644 --- a/packages/valory/protocols/acn/protocol.yaml +++ b/packages/valory/protocols/acn/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeie7paijucvzemlfhwfmmhorypwuhzbeimgoitlkokdio5c3ne4pjq - __init__.py: bafybeiht3oechljacm3yp6cttdfwysdgl55o5o5cd2fhqhpdpzryarzkaq + __init__.py: bafybeie6wesz6wnihjwdlbkhso6gtnpa4dkqdseb7susz2qseprlmcccam acn.proto: bafybeidkun7o75sxpyk2sixt7dsykgty62f6dnixnes2irbunyamilqsh4 - acn_pb2.py: bafybeihyepqitdvued4in6syi3yj542y6qpi7y5iy6cil2ld2rcpaqxuhi + acn_pb2.py: bafybeialafz3yomunwa3g5xgrdqwodzl7zg5dncvzuetv7xoew4zhw76ni custom_types.py: bafybeigpueuq6mdeyjyayzv3menkmemutfgfiwlozlpl64t67cfnnom24q dialogues.py: bafybeih2kwxi34hcrxbb3cmhtpo5k5fc4hlgsb3qnifpyeefou63c4qc2a - message.py: bafybeiay4e3m3onz6bzv264ph2qwm74zm5qnno7l4ubnuvid7yqxdtwi6e - serialization.py: bafybeifbltdpxj4s62mqollmuea7u2kutfnrfvisrromivco7hi7pew2iy + message.py: bafybeibkjeytosfqptmqph3xwdcnmokgoen2xw2s44736potgrjr43vlmy + serialization.py: bafybeibbs5uepy6s5jb5eyzdav6i2hejy26zkocqe236kxmoknkqpsi7iu tests/__init__.py: bafybeidteufp2npjd77ekcftk5e4gbaquq3gike5nxtk5xfmnusls56keu tests/test_acn.py: bafybeignjgdtlfdnj25hc5necmg7zl3kvngsmzkjgcwfm5qg36liqa63ki tests/test_acn_dialogues.py: bafybeia2kndutaokjpogo4wlb5pf4gkqacvcbngqromf4g4mzu6wyetz7q diff --git a/packages/valory/protocols/acn/serialization.py b/packages/valory/protocols/acn/serialization.py index 5fb5faf341..2163e359bc 100644 --- a/packages/valory/protocols/acn/serialization.py +++ b/packages/valory/protocols/acn/serialization.py @@ -22,13 +22,17 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.valory.protocols.acn import acn_pb2 -from packages.valory.protocols.acn.custom_types import AgentRecord, StatusBody -from packages.valory.protocols.acn.message import AcnMessage +from packages.valory.protocols.acn import acn_pb2 # type: ignore +from packages.valory.protocols.acn.custom_types import ( # type: ignore + AgentRecord, + StatusBody, +) +from packages.valory.protocols.acn.message import AcnMessage # type: ignore class AcnSerializer(Serializer): @@ -45,7 +49,7 @@ def encode(msg: Message) -> bytes: msg = cast(AcnMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - acn_msg = acn_pb2.AcnMessage() + acn_msg = acn_pb2.AcnMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -99,7 +103,7 @@ def decode(obj: bytes) -> Message: :return: the 'Acn' message. """ message_pb = ProtobufMessage() - acn_pb = acn_pb2.AcnMessage() + acn_pb = acn_pb2.AcnMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/valory/protocols/contract_api/__init__.py b/packages/valory/protocols/contract_api/__init__.py index 12f7f49228..037a853f75 100644 --- a/packages/valory/protocols/contract_api/__init__.py +++ b/packages/valory/protocols/contract_api/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the contract_api protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.valory.protocols.contract_api.message import ContractApiMessage diff --git a/packages/valory/protocols/contract_api/contract_api_pb2.py b/packages/valory/protocols/contract_api/contract_api_pb2.py index 982b94733b..f093676216 100644 --- a/packages/valory/protocols/contract_api/contract_api_pb2.py +++ b/packages/valory/protocols/contract_api/contract_api_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,196 +16,47 @@ b'\n\x12\x63ontract_api.proto\x12\x1e\x61\x65\x61.valory.contract_api.v1_0_0"\x84\x11\n\x12\x43ontractApiMessage\x12V\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x45.aea.valory.contract_api.v1_0_0.ContractApiMessage.Error_PerformativeH\x00\x12x\n\x16get_deploy_transaction\x18\x06 \x01(\x0b\x32V.aea.valory.contract_api.v1_0_0.ContractApiMessage.Get_Deploy_Transaction_PerformativeH\x00\x12j\n\x0fget_raw_message\x18\x07 \x01(\x0b\x32O.aea.valory.contract_api.v1_0_0.ContractApiMessage.Get_Raw_Message_PerformativeH\x00\x12r\n\x13get_raw_transaction\x18\x08 \x01(\x0b\x32S.aea.valory.contract_api.v1_0_0.ContractApiMessage.Get_Raw_Transaction_PerformativeH\x00\x12^\n\tget_state\x18\t \x01(\x0b\x32I.aea.valory.contract_api.v1_0_0.ContractApiMessage.Get_State_PerformativeH\x00\x12\x62\n\x0braw_message\x18\n \x01(\x0b\x32K.aea.valory.contract_api.v1_0_0.ContractApiMessage.Raw_Message_PerformativeH\x00\x12j\n\x0fraw_transaction\x18\x0b \x01(\x0b\x32O.aea.valory.contract_api.v1_0_0.ContractApiMessage.Raw_Transaction_PerformativeH\x00\x12V\n\x05state\x18\x0c \x01(\x0b\x32\x45.aea.valory.contract_api.v1_0_0.ContractApiMessage.State_PerformativeH\x00\x1a\x18\n\x06Kwargs\x12\x0e\n\x06kwargs\x18\x01 \x01(\x0c\x1a!\n\nRawMessage\x12\x13\n\x0braw_message\x18\x01 \x01(\x0c\x1a)\n\x0eRawTransaction\x12\x17\n\x0fraw_transaction\x18\x01 \x01(\x0c\x1a\x16\n\x05State\x12\r\n\x05state\x18\x01 \x01(\x0c\x1a\xaa\x01\n#Get_Deploy_Transaction_Performative\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\t\x12\x10\n\x08\x63\x61llable\x18\x03 \x01(\t\x12I\n\x06kwargs\x18\x04 \x01(\x0b\x32\x39.aea.valory.contract_api.v1_0_0.ContractApiMessage.Kwargs\x1a\xc1\x01\n Get_Raw_Transaction_Performative\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\t\x12\x18\n\x10\x63ontract_address\x18\x03 \x01(\t\x12\x10\n\x08\x63\x61llable\x18\x04 \x01(\t\x12I\n\x06kwargs\x18\x05 \x01(\x0b\x32\x39.aea.valory.contract_api.v1_0_0.ContractApiMessage.Kwargs\x1a\xbd\x01\n\x1cGet_Raw_Message_Performative\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\t\x12\x18\n\x10\x63ontract_address\x18\x03 \x01(\t\x12\x10\n\x08\x63\x61llable\x18\x04 \x01(\t\x12I\n\x06kwargs\x18\x05 \x01(\x0b\x32\x39.aea.valory.contract_api.v1_0_0.ContractApiMessage.Kwargs\x1a\xb7\x01\n\x16Get_State_Performative\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\t\x12\x18\n\x10\x63ontract_address\x18\x03 \x01(\t\x12\x10\n\x08\x63\x61llable\x18\x04 \x01(\t\x12I\n\x06kwargs\x18\x05 \x01(\x0b\x32\x39.aea.valory.contract_api.v1_0_0.ContractApiMessage.Kwargs\x1a]\n\x12State_Performative\x12G\n\x05state\x18\x01 \x01(\x0b\x32\x38.aea.valory.contract_api.v1_0_0.ContractApiMessage.State\x1az\n\x1cRaw_Transaction_Performative\x12Z\n\x0fraw_transaction\x18\x01 \x01(\x0b\x32\x41.aea.valory.contract_api.v1_0_0.ContractApiMessage.RawTransaction\x1an\n\x18Raw_Message_Performative\x12R\n\x0braw_message\x18\x01 \x01(\x0b\x32=.aea.valory.contract_api.v1_0_0.ContractApiMessage.RawMessage\x1an\n\x12\x45rror_Performative\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x13\n\x0b\x63ode_is_set\x18\x02 \x01(\x08\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x16\n\x0emessage_is_set\x18\x04 \x01(\x08\x12\x0c\n\x04\x64\x61ta\x18\x05 \x01(\x0c\x42\x0e\n\x0cperformativeb\x06proto3' ) - -_CONTRACTAPIMESSAGE = DESCRIPTOR.message_types_by_name["ContractApiMessage"] -_CONTRACTAPIMESSAGE_KWARGS = _CONTRACTAPIMESSAGE.nested_types_by_name["Kwargs"] -_CONTRACTAPIMESSAGE_RAWMESSAGE = _CONTRACTAPIMESSAGE.nested_types_by_name["RawMessage"] -_CONTRACTAPIMESSAGE_RAWTRANSACTION = _CONTRACTAPIMESSAGE.nested_types_by_name[ - "RawTransaction" -] -_CONTRACTAPIMESSAGE_STATE = _CONTRACTAPIMESSAGE.nested_types_by_name["State"] -_CONTRACTAPIMESSAGE_GET_DEPLOY_TRANSACTION_PERFORMATIVE = ( - _CONTRACTAPIMESSAGE.nested_types_by_name["Get_Deploy_Transaction_Performative"] -) -_CONTRACTAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE = ( - _CONTRACTAPIMESSAGE.nested_types_by_name["Get_Raw_Transaction_Performative"] -) -_CONTRACTAPIMESSAGE_GET_RAW_MESSAGE_PERFORMATIVE = ( - _CONTRACTAPIMESSAGE.nested_types_by_name["Get_Raw_Message_Performative"] -) -_CONTRACTAPIMESSAGE_GET_STATE_PERFORMATIVE = _CONTRACTAPIMESSAGE.nested_types_by_name[ - "Get_State_Performative" -] -_CONTRACTAPIMESSAGE_STATE_PERFORMATIVE = _CONTRACTAPIMESSAGE.nested_types_by_name[ - "State_Performative" -] -_CONTRACTAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE = ( - _CONTRACTAPIMESSAGE.nested_types_by_name["Raw_Transaction_Performative"] -) -_CONTRACTAPIMESSAGE_RAW_MESSAGE_PERFORMATIVE = _CONTRACTAPIMESSAGE.nested_types_by_name[ - "Raw_Message_Performative" -] -_CONTRACTAPIMESSAGE_ERROR_PERFORMATIVE = _CONTRACTAPIMESSAGE.nested_types_by_name[ - "Error_Performative" -] -ContractApiMessage = _reflection.GeneratedProtocolMessageType( - "ContractApiMessage", - (_message.Message,), - { - "Kwargs": _reflection.GeneratedProtocolMessageType( - "Kwargs", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_KWARGS, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.Kwargs) - }, - ), - "RawMessage": _reflection.GeneratedProtocolMessageType( - "RawMessage", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_RAWMESSAGE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.RawMessage) - }, - ), - "RawTransaction": _reflection.GeneratedProtocolMessageType( - "RawTransaction", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_RAWTRANSACTION, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.RawTransaction) - }, - ), - "State": _reflection.GeneratedProtocolMessageType( - "State", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_STATE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.State) - }, - ), - "Get_Deploy_Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Get_Deploy_Transaction_Performative", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_GET_DEPLOY_TRANSACTION_PERFORMATIVE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.Get_Deploy_Transaction_Performative) - }, - ), - "Get_Raw_Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Get_Raw_Transaction_Performative", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.Get_Raw_Transaction_Performative) - }, - ), - "Get_Raw_Message_Performative": _reflection.GeneratedProtocolMessageType( - "Get_Raw_Message_Performative", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_GET_RAW_MESSAGE_PERFORMATIVE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.Get_Raw_Message_Performative) - }, - ), - "Get_State_Performative": _reflection.GeneratedProtocolMessageType( - "Get_State_Performative", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_GET_STATE_PERFORMATIVE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.Get_State_Performative) - }, - ), - "State_Performative": _reflection.GeneratedProtocolMessageType( - "State_Performative", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_STATE_PERFORMATIVE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.State_Performative) - }, - ), - "Raw_Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Raw_Transaction_Performative", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.Raw_Transaction_Performative) - }, - ), - "Raw_Message_Performative": _reflection.GeneratedProtocolMessageType( - "Raw_Message_Performative", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_RAW_MESSAGE_PERFORMATIVE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.Raw_Message_Performative) - }, - ), - "Error_Performative": _reflection.GeneratedProtocolMessageType( - "Error_Performative", - (_message.Message,), - { - "DESCRIPTOR": _CONTRACTAPIMESSAGE_ERROR_PERFORMATIVE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage.Error_Performative) - }, - ), - "DESCRIPTOR": _CONTRACTAPIMESSAGE, - "__module__": "contract_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.contract_api.v1_0_0.ContractApiMessage) - }, -) -_sym_db.RegisterMessage(ContractApiMessage) -_sym_db.RegisterMessage(ContractApiMessage.Kwargs) -_sym_db.RegisterMessage(ContractApiMessage.RawMessage) -_sym_db.RegisterMessage(ContractApiMessage.RawTransaction) -_sym_db.RegisterMessage(ContractApiMessage.State) -_sym_db.RegisterMessage(ContractApiMessage.Get_Deploy_Transaction_Performative) -_sym_db.RegisterMessage(ContractApiMessage.Get_Raw_Transaction_Performative) -_sym_db.RegisterMessage(ContractApiMessage.Get_Raw_Message_Performative) -_sym_db.RegisterMessage(ContractApiMessage.Get_State_Performative) -_sym_db.RegisterMessage(ContractApiMessage.State_Performative) -_sym_db.RegisterMessage(ContractApiMessage.Raw_Transaction_Performative) -_sym_db.RegisterMessage(ContractApiMessage.Raw_Message_Performative) -_sym_db.RegisterMessage(ContractApiMessage.Error_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "contract_api_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _CONTRACTAPIMESSAGE._serialized_start = 55 - _CONTRACTAPIMESSAGE._serialized_end = 2235 - _CONTRACTAPIMESSAGE_KWARGS._serialized_start = 903 - _CONTRACTAPIMESSAGE_KWARGS._serialized_end = 927 - _CONTRACTAPIMESSAGE_RAWMESSAGE._serialized_start = 929 - _CONTRACTAPIMESSAGE_RAWMESSAGE._serialized_end = 962 - _CONTRACTAPIMESSAGE_RAWTRANSACTION._serialized_start = 964 - _CONTRACTAPIMESSAGE_RAWTRANSACTION._serialized_end = 1005 - _CONTRACTAPIMESSAGE_STATE._serialized_start = 1007 - _CONTRACTAPIMESSAGE_STATE._serialized_end = 1029 - _CONTRACTAPIMESSAGE_GET_DEPLOY_TRANSACTION_PERFORMATIVE._serialized_start = 1032 - _CONTRACTAPIMESSAGE_GET_DEPLOY_TRANSACTION_PERFORMATIVE._serialized_end = 1202 - _CONTRACTAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE._serialized_start = 1205 - _CONTRACTAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE._serialized_end = 1398 - _CONTRACTAPIMESSAGE_GET_RAW_MESSAGE_PERFORMATIVE._serialized_start = 1401 - _CONTRACTAPIMESSAGE_GET_RAW_MESSAGE_PERFORMATIVE._serialized_end = 1590 - _CONTRACTAPIMESSAGE_GET_STATE_PERFORMATIVE._serialized_start = 1593 - _CONTRACTAPIMESSAGE_GET_STATE_PERFORMATIVE._serialized_end = 1776 - _CONTRACTAPIMESSAGE_STATE_PERFORMATIVE._serialized_start = 1778 - _CONTRACTAPIMESSAGE_STATE_PERFORMATIVE._serialized_end = 1871 - _CONTRACTAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE._serialized_start = 1873 - _CONTRACTAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE._serialized_end = 1995 - _CONTRACTAPIMESSAGE_RAW_MESSAGE_PERFORMATIVE._serialized_start = 1997 - _CONTRACTAPIMESSAGE_RAW_MESSAGE_PERFORMATIVE._serialized_end = 2107 - _CONTRACTAPIMESSAGE_ERROR_PERFORMATIVE._serialized_start = 2109 - _CONTRACTAPIMESSAGE_ERROR_PERFORMATIVE._serialized_end = 2219 + _globals["_CONTRACTAPIMESSAGE"]._serialized_start = 55 + _globals["_CONTRACTAPIMESSAGE"]._serialized_end = 2235 + _globals["_CONTRACTAPIMESSAGE_KWARGS"]._serialized_start = 903 + _globals["_CONTRACTAPIMESSAGE_KWARGS"]._serialized_end = 927 + _globals["_CONTRACTAPIMESSAGE_RAWMESSAGE"]._serialized_start = 929 + _globals["_CONTRACTAPIMESSAGE_RAWMESSAGE"]._serialized_end = 962 + _globals["_CONTRACTAPIMESSAGE_RAWTRANSACTION"]._serialized_start = 964 + _globals["_CONTRACTAPIMESSAGE_RAWTRANSACTION"]._serialized_end = 1005 + _globals["_CONTRACTAPIMESSAGE_STATE"]._serialized_start = 1007 + _globals["_CONTRACTAPIMESSAGE_STATE"]._serialized_end = 1029 + _globals[ + "_CONTRACTAPIMESSAGE_GET_DEPLOY_TRANSACTION_PERFORMATIVE" + ]._serialized_start = 1032 + _globals[ + "_CONTRACTAPIMESSAGE_GET_DEPLOY_TRANSACTION_PERFORMATIVE" + ]._serialized_end = 1202 + _globals[ + "_CONTRACTAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE" + ]._serialized_start = 1205 + _globals[ + "_CONTRACTAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE" + ]._serialized_end = 1398 + _globals[ + "_CONTRACTAPIMESSAGE_GET_RAW_MESSAGE_PERFORMATIVE" + ]._serialized_start = 1401 + _globals["_CONTRACTAPIMESSAGE_GET_RAW_MESSAGE_PERFORMATIVE"]._serialized_end = 1590 + _globals["_CONTRACTAPIMESSAGE_GET_STATE_PERFORMATIVE"]._serialized_start = 1593 + _globals["_CONTRACTAPIMESSAGE_GET_STATE_PERFORMATIVE"]._serialized_end = 1776 + _globals["_CONTRACTAPIMESSAGE_STATE_PERFORMATIVE"]._serialized_start = 1778 + _globals["_CONTRACTAPIMESSAGE_STATE_PERFORMATIVE"]._serialized_end = 1871 + _globals[ + "_CONTRACTAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE" + ]._serialized_start = 1873 + _globals["_CONTRACTAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE"]._serialized_end = 1995 + _globals["_CONTRACTAPIMESSAGE_RAW_MESSAGE_PERFORMATIVE"]._serialized_start = 1997 + _globals["_CONTRACTAPIMESSAGE_RAW_MESSAGE_PERFORMATIVE"]._serialized_end = 2107 + _globals["_CONTRACTAPIMESSAGE_ERROR_PERFORMATIVE"]._serialized_start = 2109 + _globals["_CONTRACTAPIMESSAGE_ERROR_PERFORMATIVE"]._serialized_end = 2219 # @@protoc_insertion_point(module_scope) diff --git a/packages/valory/protocols/contract_api/message.py b/packages/valory/protocols/contract_api/message.py index 8786b368e4..6126f3bab8 100644 --- a/packages/valory/protocols/contract_api/message.py +++ b/packages/valory/protocols/contract_api/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.valory.protocols.contract_api.custom_types import Kwargs as CustomKwargs from packages.valory.protocols.contract_api.custom_types import ( diff --git a/packages/valory/protocols/contract_api/protocol.yaml b/packages/valory/protocols/contract_api/protocol.yaml index fb05d3ea6d..2b3b079f0f 100644 --- a/packages/valory/protocols/contract_api/protocol.yaml +++ b/packages/valory/protocols/contract_api/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeigaihpzixjv56vbuch6yqk5shzevt3rlpvchgqudmztid5mgchlqy - __init__.py: bafybeieo5jvwe7um4xw7ecxzxdi5o6rf3ld2yhupypuvrgryfqsdcurwse + __init__.py: bafybeic4jxfjxdntzz6evrnxfszpsyyjycomunbzxclj7zryibvb5myvxq contract_api.proto: bafybeiafpnyivdogs7omw2bxxxkmnbqcl3n32oqbzug65p7jimbeubgljy - contract_api_pb2.py: bafybeibienodnmdizkccinyi6ckbzbxsfnawnf7ejug2dd33c2bjvspyja + contract_api_pb2.py: bafybeibjspkls7zjf7x4on2sm2274r355xzodgv3e54ueopz4vgpvg5owa custom_types.py: bafybeiawof5bblaefwui5wgsou2ohvrxi2zrkdthehiet57qguplzsgrhu dialogues.py: bafybeidsba6cyymlwva3cmghworge5gy7rawdhnivugzfzkvwy6unbjqea - message.py: bafybeigl7tyd2xmemv367qp55b63ck4z7giqg7g3tar6ulne3s55kdat4i - serialization.py: bafybeibawi6a4kp2ty2wcahexfkamrn6qwxhdbo7nkiatwbqm4wb2w3ae4 + message.py: bafybeidgjuoq45xwpwhwbj4gdxawdx76b6m7nqidaglx3suujeuapeugra + serialization.py: bafybeia26wlj26hwyrsclhrnbna7ucyrpyhxvuyp7yqdfgzjo62lcwnupy tests/__init__.py: bafybeicc5zmsziu4r5dwjnhckfbgnwbgydn7ekeyqsestutq2tusajqzmu tests/test_contract_api.py: bafybeigszksq7bxi3skvw3zvpatkltgbnvnfatofjn63xnd5xds33iyni4 tests/test_contract_api_dialogues.py: bafybeifalicqk4g44sl5dpeuvls5dqtyfdgc6nwyuf5cl4fofis7fr3mnq diff --git a/packages/valory/protocols/contract_api/serialization.py b/packages/valory/protocols/contract_api/serialization.py index 6dc35efcec..37382300c8 100644 --- a/packages/valory/protocols/contract_api/serialization.py +++ b/packages/valory/protocols/contract_api/serialization.py @@ -22,18 +22,21 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.valory.protocols.contract_api import contract_api_pb2 -from packages.valory.protocols.contract_api.custom_types import ( +from packages.valory.protocols.contract_api import contract_api_pb2 # type: ignore +from packages.valory.protocols.contract_api.custom_types import ( # type: ignore Kwargs, RawMessage, RawTransaction, State, ) -from packages.valory.protocols.contract_api.message import ContractApiMessage +from packages.valory.protocols.contract_api.message import ( # type: ignore + ContractApiMessage, +) class ContractApiSerializer(Serializer): @@ -50,7 +53,7 @@ def encode(msg: Message) -> bytes: msg = cast(ContractApiMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - contract_api_msg = contract_api_pb2.ContractApiMessage() + contract_api_msg = contract_api_pb2.ContractApiMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -155,7 +158,7 @@ def decode(obj: bytes) -> Message: :return: the 'ContractApi' message. """ message_pb = ProtobufMessage() - contract_api_pb = contract_api_pb2.ContractApiMessage() + contract_api_pb = contract_api_pb2.ContractApiMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/valory/protocols/http/__init__.py b/packages/valory/protocols/http/__init__.py index 3ab1874209..ecfceb5a85 100644 --- a/packages/valory/protocols/http/__init__.py +++ b/packages/valory/protocols/http/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the http protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.valory.protocols.http.message import HttpMessage diff --git a/packages/valory/protocols/http/http_pb2.py b/packages/valory/protocols/http/http_pb2.py index b6d5223e98..6c202f9144 100644 --- a/packages/valory/protocols/http/http_pb2.py +++ b/packages/valory/protocols/http/http_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,52 +16,15 @@ b'\n\nhttp.proto\x12\x16\x61\x65\x61.valory.http.v1_0_0"\x91\x03\n\x0bHttpMessage\x12K\n\x07request\x18\x05 \x01(\x0b\x32\x38.aea.valory.http.v1_0_0.HttpMessage.Request_PerformativeH\x00\x12M\n\x08response\x18\x06 \x01(\x0b\x32\x39.aea.valory.http.v1_0_0.HttpMessage.Response_PerformativeH\x00\x1a\x63\n\x14Request_Performative\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x0f\n\x07headers\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x1aq\n\x15Response_Performative\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x13\n\x0bstatus_code\x18\x02 \x01(\x05\x12\x13\n\x0bstatus_text\x18\x03 \x01(\t\x12\x0f\n\x07headers\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\x0c\x42\x0e\n\x0cperformativeb\x06proto3' ) - -_HTTPMESSAGE = DESCRIPTOR.message_types_by_name["HttpMessage"] -_HTTPMESSAGE_REQUEST_PERFORMATIVE = _HTTPMESSAGE.nested_types_by_name[ - "Request_Performative" -] -_HTTPMESSAGE_RESPONSE_PERFORMATIVE = _HTTPMESSAGE.nested_types_by_name[ - "Response_Performative" -] -HttpMessage = _reflection.GeneratedProtocolMessageType( - "HttpMessage", - (_message.Message,), - { - "Request_Performative": _reflection.GeneratedProtocolMessageType( - "Request_Performative", - (_message.Message,), - { - "DESCRIPTOR": _HTTPMESSAGE_REQUEST_PERFORMATIVE, - "__module__": "http_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.http.v1_0_0.HttpMessage.Request_Performative) - }, - ), - "Response_Performative": _reflection.GeneratedProtocolMessageType( - "Response_Performative", - (_message.Message,), - { - "DESCRIPTOR": _HTTPMESSAGE_RESPONSE_PERFORMATIVE, - "__module__": "http_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.http.v1_0_0.HttpMessage.Response_Performative) - }, - ), - "DESCRIPTOR": _HTTPMESSAGE, - "__module__": "http_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.http.v1_0_0.HttpMessage) - }, -) -_sym_db.RegisterMessage(HttpMessage) -_sym_db.RegisterMessage(HttpMessage.Request_Performative) -_sym_db.RegisterMessage(HttpMessage.Response_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "http_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _HTTPMESSAGE._serialized_start = 39 - _HTTPMESSAGE._serialized_end = 440 - _HTTPMESSAGE_REQUEST_PERFORMATIVE._serialized_start = 210 - _HTTPMESSAGE_REQUEST_PERFORMATIVE._serialized_end = 309 - _HTTPMESSAGE_RESPONSE_PERFORMATIVE._serialized_start = 311 - _HTTPMESSAGE_RESPONSE_PERFORMATIVE._serialized_end = 424 + _globals["_HTTPMESSAGE"]._serialized_start = 39 + _globals["_HTTPMESSAGE"]._serialized_end = 440 + _globals["_HTTPMESSAGE_REQUEST_PERFORMATIVE"]._serialized_start = 210 + _globals["_HTTPMESSAGE_REQUEST_PERFORMATIVE"]._serialized_end = 309 + _globals["_HTTPMESSAGE_RESPONSE_PERFORMATIVE"]._serialized_start = 311 + _globals["_HTTPMESSAGE_RESPONSE_PERFORMATIVE"]._serialized_end = 424 # @@protoc_insertion_point(module_scope) diff --git a/packages/valory/protocols/http/message.py b/packages/valory/protocols/http/message.py index fe40a7521a..b3e674311c 100644 --- a/packages/valory/protocols/http/message.py +++ b/packages/valory/protocols/http/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore _default_logger = logging.getLogger("aea.packages.valory.protocols.http.message") diff --git a/packages/valory/protocols/http/protocol.yaml b/packages/valory/protocols/http/protocol.yaml index 8f6b31a531..054aea0b65 100644 --- a/packages/valory/protocols/http/protocol.yaml +++ b/packages/valory/protocols/http/protocol.yaml @@ -8,12 +8,12 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeihkatpicz56ofrvu5fgks7ecrsfzw5toz23o23yvoymhk6l6hl7dy - __init__.py: bafybeidaq624basvfjybdce43zso2bocn4tnuwgoqnwh5zmstngzv2whoi + __init__.py: bafybeiheknwztwp5gvmqv4zjbtobqb4hpemwer6je7spwn3dlrowa73cfi dialogues.py: bafybeiditoi6wtv3ssf5s2fkxg7spfdr44d3qsujaxsyh7tce2hgytu7au http.proto: bafybeigq6ykgxdqi4m65x3rcj4ehdm3usaisejzl2oisn6kzkjits3fzkq - http_pb2.py: bafybeih2pq5ptjzz7g7wio3o223jffamh5ph5qsonztvjbygdsr3fgmwci - message.py: bafybeigcg4v2bbwxtlvtinauu2koq7rlpqcc6tkiy3rrhptyhqdc2ebbrm - serialization.py: bafybeier7lecnbyjxvywpxqq4ak3ia5qwfutbf2wxaxfyzhwf5ewewossm + http_pb2.py: bafybeibvqp664j4iaozk2hyotmd7gzsyknk4dt3mcddniuzdvdxhtkjcoq + message.py: bafybeifs5gegnkcbxza2o67gibgglhcxydzf7ycizau4by7rjahfma2u74 + serialization.py: bafybeiha2qopmeqmobcamfobpa5viza2tmloo4l5eoyyg4vw6e3qjpjg6u tests/__init__.py: bafybeifitr3wqclw3kammd2fw5zww6gvzbvu6s72di2p7544qfisuslhpq tests/test_http.py: bafybeibbz5zcqmqsvtwp2rucj2ubbbazmqt3shpjnkt5bdhnlclqy4fseq tests/test_http_dialogues.py: bafybeic22z3aatytdx3cxrtzt3hqwwhxlnaal6sn7grm3cn5k7ycq5v46y diff --git a/packages/valory/protocols/http/serialization.py b/packages/valory/protocols/http/serialization.py index 50c7615f26..ecb6c1e23d 100644 --- a/packages/valory/protocols/http/serialization.py +++ b/packages/valory/protocols/http/serialization.py @@ -22,12 +22,13 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.valory.protocols.http import http_pb2 -from packages.valory.protocols.http.message import HttpMessage +from packages.valory.protocols.http import http_pb2 # type: ignore +from packages.valory.protocols.http.message import HttpMessage # type: ignore class HttpSerializer(Serializer): @@ -44,7 +45,7 @@ def encode(msg: Message) -> bytes: msg = cast(HttpMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - http_msg = http_pb2.HttpMessage() + http_msg = http_pb2.HttpMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -97,7 +98,7 @@ def decode(obj: bytes) -> Message: :return: the 'Http' message. """ message_pb = ProtobufMessage() - http_pb = http_pb2.HttpMessage() + http_pb = http_pb2.HttpMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/packages/valory/protocols/ledger_api/__init__.py b/packages/valory/protocols/ledger_api/__init__.py index 1607860838..479f2dd6a0 100644 --- a/packages/valory/protocols/ledger_api/__init__.py +++ b/packages/valory/protocols/ledger_api/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the ledger_api protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from packages.valory.protocols.ledger_api.message import LedgerApiMessage diff --git a/packages/valory/protocols/ledger_api/ledger_api_pb2.py b/packages/valory/protocols/ledger_api/ledger_api_pb2.py index bc19ddb572..7742c83259 100644 --- a/packages/valory/protocols/ledger_api/ledger_api_pb2.py +++ b/packages/valory/protocols/ledger_api/ledger_api_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,346 +16,81 @@ b'\n\x10ledger_api.proto\x12\x1c\x61\x65\x61.valory.ledger_api.v1_0_0"\xaa\x1b\n\x10LedgerApiMessage\x12V\n\x07\x62\x61lance\x18\x05 \x01(\x0b\x32\x43.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Balance_PerformativeH\x00\x12R\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x41.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Error_PerformativeH\x00\x12^\n\x0bget_balance\x18\x07 \x01(\x0b\x32G.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Get_Balance_PerformativeH\x00\x12n\n\x13get_raw_transaction\x18\x08 \x01(\x0b\x32O.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Get_Raw_Transaction_PerformativeH\x00\x12Z\n\tget_state\x18\t \x01(\x0b\x32\x45.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Get_State_PerformativeH\x00\x12v\n\x17get_transaction_receipt\x18\n \x01(\x0b\x32S.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Get_Transaction_Receipt_PerformativeH\x00\x12\x66\n\x0fraw_transaction\x18\x0b \x01(\x0b\x32K.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Raw_Transaction_PerformativeH\x00\x12v\n\x17send_signed_transaction\x18\x0c \x01(\x0b\x32S.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Send_Signed_Transaction_PerformativeH\x00\x12x\n\x18send_signed_transactions\x18\r \x01(\x0b\x32T.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Send_Signed_Transactions_PerformativeH\x00\x12R\n\x05state\x18\x0e \x01(\x0b\x32\x41.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.State_PerformativeH\x00\x12l\n\x12transaction_digest\x18\x0f \x01(\x0b\x32N.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Transaction_Digest_PerformativeH\x00\x12n\n\x13transaction_digests\x18\x10 \x01(\x0b\x32O.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Transaction_Digests_PerformativeH\x00\x12n\n\x13transaction_receipt\x18\x11 \x01(\x0b\x32O.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Transaction_Receipt_PerformativeH\x00\x1a\x18\n\x06Kwargs\x12\x0e\n\x06kwargs\x18\x01 \x01(\x0c\x1a)\n\x0eRawTransaction\x12\x17\n\x0fraw_transaction\x18\x01 \x01(\x0c\x1a/\n\x11SignedTransaction\x12\x1a\n\x12signed_transaction\x18\x01 \x01(\x0c\x1a\x44\n\x12SignedTransactions\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x1b\n\x13signed_transactions\x18\x02 \x03(\x0c\x1a\x16\n\x05State\x12\r\n\x05state\x18\x01 \x01(\x0c\x1a\x16\n\x05Terms\x12\r\n\x05terms\x18\x01 \x01(\x0c\x1a/\n\x11TransactionDigest\x12\x1a\n\x12transaction_digest\x18\x01 \x01(\x0c\x1a\x44\n\x12TransactionDigests\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x1b\n\x13transaction_digests\x18\x02 \x03(\t\x1a\x31\n\x12TransactionReceipt\x12\x1b\n\x13transaction_receipt\x18\x01 \x01(\x0c\x1a>\n\x18Get_Balance_Performative\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x1ag\n Get_Raw_Transaction_Performative\x12\x43\n\x05terms\x18\x01 \x01(\x0b\x32\x34.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Terms\x1a\x84\x01\n$Send_Signed_Transaction_Performative\x12\\\n\x12signed_transaction\x18\x01 \x01(\x0b\x32@.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.SignedTransaction\x1a\xce\x01\n%Send_Signed_Transactions_Performative\x12^\n\x13signed_transactions\x18\x01 \x01(\x0b\x32\x41.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.SignedTransactions\x12\x45\n\x06kwargs\x18\x02 \x01(\x0b\x32\x35.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Kwargs\x1a\xf0\x01\n$Get_Transaction_Receipt_Performative\x12\\\n\x12transaction_digest\x18\x01 \x01(\x0b\x32@.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.TransactionDigest\x12\x15\n\rretry_timeout\x18\x02 \x01(\x05\x12\x1c\n\x14retry_timeout_is_set\x18\x03 \x01(\x08\x12\x16\n\x0eretry_attempts\x18\x04 \x01(\x05\x12\x1d\n\x15retry_attempts_is_set\x18\x05 \x01(\x08\x1a:\n\x14\x42\x61lance_Performative\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x0f\n\x07\x62\x61lance\x18\x02 \x01(\x05\x1av\n\x1cRaw_Transaction_Performative\x12V\n\x0fraw_transaction\x18\x01 \x01(\x0b\x32=.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.RawTransaction\x1a\x7f\n\x1fTransaction_Digest_Performative\x12\\\n\x12transaction_digest\x18\x01 \x01(\x0b\x32@.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.TransactionDigest\x1a\x82\x01\n Transaction_Digests_Performative\x12^\n\x13transaction_digests\x18\x01 \x01(\x0b\x32\x41.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.TransactionDigests\x1a\x82\x01\n Transaction_Receipt_Performative\x12^\n\x13transaction_receipt\x18\x01 \x01(\x0b\x32\x41.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.TransactionReceipt\x1a\x92\x01\n\x16Get_State_Performative\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61llable\x18\x02 \x01(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x45\n\x06kwargs\x18\x04 \x01(\x0b\x32\x35.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Kwargs\x1al\n\x12State_Performative\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x43\n\x05state\x18\x02 \x01(\x0b\x32\x34.aea.valory.ledger_api.v1_0_0.LedgerApiMessage.State\x1an\n\x12\x45rror_Performative\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x16\n\x0emessage_is_set\x18\x03 \x01(\x08\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12\x13\n\x0b\x64\x61ta_is_set\x18\x05 \x01(\x08\x42\x0e\n\x0cperformativeb\x06proto3' ) - -_LEDGERAPIMESSAGE = DESCRIPTOR.message_types_by_name["LedgerApiMessage"] -_LEDGERAPIMESSAGE_KWARGS = _LEDGERAPIMESSAGE.nested_types_by_name["Kwargs"] -_LEDGERAPIMESSAGE_RAWTRANSACTION = _LEDGERAPIMESSAGE.nested_types_by_name[ - "RawTransaction" -] -_LEDGERAPIMESSAGE_SIGNEDTRANSACTION = _LEDGERAPIMESSAGE.nested_types_by_name[ - "SignedTransaction" -] -_LEDGERAPIMESSAGE_SIGNEDTRANSACTIONS = _LEDGERAPIMESSAGE.nested_types_by_name[ - "SignedTransactions" -] -_LEDGERAPIMESSAGE_STATE = _LEDGERAPIMESSAGE.nested_types_by_name["State"] -_LEDGERAPIMESSAGE_TERMS = _LEDGERAPIMESSAGE.nested_types_by_name["Terms"] -_LEDGERAPIMESSAGE_TRANSACTIONDIGEST = _LEDGERAPIMESSAGE.nested_types_by_name[ - "TransactionDigest" -] -_LEDGERAPIMESSAGE_TRANSACTIONDIGESTS = _LEDGERAPIMESSAGE.nested_types_by_name[ - "TransactionDigests" -] -_LEDGERAPIMESSAGE_TRANSACTIONRECEIPT = _LEDGERAPIMESSAGE.nested_types_by_name[ - "TransactionReceipt" -] -_LEDGERAPIMESSAGE_GET_BALANCE_PERFORMATIVE = _LEDGERAPIMESSAGE.nested_types_by_name[ - "Get_Balance_Performative" -] -_LEDGERAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE = ( - _LEDGERAPIMESSAGE.nested_types_by_name["Get_Raw_Transaction_Performative"] -) -_LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTION_PERFORMATIVE = ( - _LEDGERAPIMESSAGE.nested_types_by_name["Send_Signed_Transaction_Performative"] -) -_LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTIONS_PERFORMATIVE = ( - _LEDGERAPIMESSAGE.nested_types_by_name["Send_Signed_Transactions_Performative"] -) -_LEDGERAPIMESSAGE_GET_TRANSACTION_RECEIPT_PERFORMATIVE = ( - _LEDGERAPIMESSAGE.nested_types_by_name["Get_Transaction_Receipt_Performative"] -) -_LEDGERAPIMESSAGE_BALANCE_PERFORMATIVE = _LEDGERAPIMESSAGE.nested_types_by_name[ - "Balance_Performative" -] -_LEDGERAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE = _LEDGERAPIMESSAGE.nested_types_by_name[ - "Raw_Transaction_Performative" -] -_LEDGERAPIMESSAGE_TRANSACTION_DIGEST_PERFORMATIVE = ( - _LEDGERAPIMESSAGE.nested_types_by_name["Transaction_Digest_Performative"] -) -_LEDGERAPIMESSAGE_TRANSACTION_DIGESTS_PERFORMATIVE = ( - _LEDGERAPIMESSAGE.nested_types_by_name["Transaction_Digests_Performative"] -) -_LEDGERAPIMESSAGE_TRANSACTION_RECEIPT_PERFORMATIVE = ( - _LEDGERAPIMESSAGE.nested_types_by_name["Transaction_Receipt_Performative"] -) -_LEDGERAPIMESSAGE_GET_STATE_PERFORMATIVE = _LEDGERAPIMESSAGE.nested_types_by_name[ - "Get_State_Performative" -] -_LEDGERAPIMESSAGE_STATE_PERFORMATIVE = _LEDGERAPIMESSAGE.nested_types_by_name[ - "State_Performative" -] -_LEDGERAPIMESSAGE_ERROR_PERFORMATIVE = _LEDGERAPIMESSAGE.nested_types_by_name[ - "Error_Performative" -] -LedgerApiMessage = _reflection.GeneratedProtocolMessageType( - "LedgerApiMessage", - (_message.Message,), - { - "Kwargs": _reflection.GeneratedProtocolMessageType( - "Kwargs", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_KWARGS, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Kwargs) - }, - ), - "RawTransaction": _reflection.GeneratedProtocolMessageType( - "RawTransaction", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_RAWTRANSACTION, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.RawTransaction) - }, - ), - "SignedTransaction": _reflection.GeneratedProtocolMessageType( - "SignedTransaction", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_SIGNEDTRANSACTION, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.SignedTransaction) - }, - ), - "SignedTransactions": _reflection.GeneratedProtocolMessageType( - "SignedTransactions", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_SIGNEDTRANSACTIONS, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.SignedTransactions) - }, - ), - "State": _reflection.GeneratedProtocolMessageType( - "State", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_STATE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.State) - }, - ), - "Terms": _reflection.GeneratedProtocolMessageType( - "Terms", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_TERMS, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Terms) - }, - ), - "TransactionDigest": _reflection.GeneratedProtocolMessageType( - "TransactionDigest", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_TRANSACTIONDIGEST, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.TransactionDigest) - }, - ), - "TransactionDigests": _reflection.GeneratedProtocolMessageType( - "TransactionDigests", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_TRANSACTIONDIGESTS, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.TransactionDigests) - }, - ), - "TransactionReceipt": _reflection.GeneratedProtocolMessageType( - "TransactionReceipt", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_TRANSACTIONRECEIPT, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.TransactionReceipt) - }, - ), - "Get_Balance_Performative": _reflection.GeneratedProtocolMessageType( - "Get_Balance_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_GET_BALANCE_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Get_Balance_Performative) - }, - ), - "Get_Raw_Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Get_Raw_Transaction_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Get_Raw_Transaction_Performative) - }, - ), - "Send_Signed_Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Send_Signed_Transaction_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTION_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Send_Signed_Transaction_Performative) - }, - ), - "Send_Signed_Transactions_Performative": _reflection.GeneratedProtocolMessageType( - "Send_Signed_Transactions_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTIONS_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Send_Signed_Transactions_Performative) - }, - ), - "Get_Transaction_Receipt_Performative": _reflection.GeneratedProtocolMessageType( - "Get_Transaction_Receipt_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_GET_TRANSACTION_RECEIPT_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Get_Transaction_Receipt_Performative) - }, - ), - "Balance_Performative": _reflection.GeneratedProtocolMessageType( - "Balance_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_BALANCE_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Balance_Performative) - }, - ), - "Raw_Transaction_Performative": _reflection.GeneratedProtocolMessageType( - "Raw_Transaction_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Raw_Transaction_Performative) - }, - ), - "Transaction_Digest_Performative": _reflection.GeneratedProtocolMessageType( - "Transaction_Digest_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_TRANSACTION_DIGEST_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Transaction_Digest_Performative) - }, - ), - "Transaction_Digests_Performative": _reflection.GeneratedProtocolMessageType( - "Transaction_Digests_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_TRANSACTION_DIGESTS_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Transaction_Digests_Performative) - }, - ), - "Transaction_Receipt_Performative": _reflection.GeneratedProtocolMessageType( - "Transaction_Receipt_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_TRANSACTION_RECEIPT_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Transaction_Receipt_Performative) - }, - ), - "Get_State_Performative": _reflection.GeneratedProtocolMessageType( - "Get_State_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_GET_STATE_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Get_State_Performative) - }, - ), - "State_Performative": _reflection.GeneratedProtocolMessageType( - "State_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_STATE_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.State_Performative) - }, - ), - "Error_Performative": _reflection.GeneratedProtocolMessageType( - "Error_Performative", - (_message.Message,), - { - "DESCRIPTOR": _LEDGERAPIMESSAGE_ERROR_PERFORMATIVE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage.Error_Performative) - }, - ), - "DESCRIPTOR": _LEDGERAPIMESSAGE, - "__module__": "ledger_api_pb2" - # @@protoc_insertion_point(class_scope:aea.valory.ledger_api.v1_0_0.LedgerApiMessage) - }, -) -_sym_db.RegisterMessage(LedgerApiMessage) -_sym_db.RegisterMessage(LedgerApiMessage.Kwargs) -_sym_db.RegisterMessage(LedgerApiMessage.RawTransaction) -_sym_db.RegisterMessage(LedgerApiMessage.SignedTransaction) -_sym_db.RegisterMessage(LedgerApiMessage.SignedTransactions) -_sym_db.RegisterMessage(LedgerApiMessage.State) -_sym_db.RegisterMessage(LedgerApiMessage.Terms) -_sym_db.RegisterMessage(LedgerApiMessage.TransactionDigest) -_sym_db.RegisterMessage(LedgerApiMessage.TransactionDigests) -_sym_db.RegisterMessage(LedgerApiMessage.TransactionReceipt) -_sym_db.RegisterMessage(LedgerApiMessage.Get_Balance_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Get_Raw_Transaction_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Send_Signed_Transaction_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Send_Signed_Transactions_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Get_Transaction_Receipt_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Balance_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Raw_Transaction_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Transaction_Digest_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Transaction_Digests_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Transaction_Receipt_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Get_State_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.State_Performative) -_sym_db.RegisterMessage(LedgerApiMessage.Error_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "ledger_api_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _LEDGERAPIMESSAGE._serialized_start = 51 - _LEDGERAPIMESSAGE._serialized_end = 3549 - _LEDGERAPIMESSAGE_KWARGS._serialized_start = 1427 - _LEDGERAPIMESSAGE_KWARGS._serialized_end = 1451 - _LEDGERAPIMESSAGE_RAWTRANSACTION._serialized_start = 1453 - _LEDGERAPIMESSAGE_RAWTRANSACTION._serialized_end = 1494 - _LEDGERAPIMESSAGE_SIGNEDTRANSACTION._serialized_start = 1496 - _LEDGERAPIMESSAGE_SIGNEDTRANSACTION._serialized_end = 1543 - _LEDGERAPIMESSAGE_SIGNEDTRANSACTIONS._serialized_start = 1545 - _LEDGERAPIMESSAGE_SIGNEDTRANSACTIONS._serialized_end = 1613 - _LEDGERAPIMESSAGE_STATE._serialized_start = 1615 - _LEDGERAPIMESSAGE_STATE._serialized_end = 1637 - _LEDGERAPIMESSAGE_TERMS._serialized_start = 1639 - _LEDGERAPIMESSAGE_TERMS._serialized_end = 1661 - _LEDGERAPIMESSAGE_TRANSACTIONDIGEST._serialized_start = 1663 - _LEDGERAPIMESSAGE_TRANSACTIONDIGEST._serialized_end = 1710 - _LEDGERAPIMESSAGE_TRANSACTIONDIGESTS._serialized_start = 1712 - _LEDGERAPIMESSAGE_TRANSACTIONDIGESTS._serialized_end = 1780 - _LEDGERAPIMESSAGE_TRANSACTIONRECEIPT._serialized_start = 1782 - _LEDGERAPIMESSAGE_TRANSACTIONRECEIPT._serialized_end = 1831 - _LEDGERAPIMESSAGE_GET_BALANCE_PERFORMATIVE._serialized_start = 1833 - _LEDGERAPIMESSAGE_GET_BALANCE_PERFORMATIVE._serialized_end = 1895 - _LEDGERAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE._serialized_start = 1897 - _LEDGERAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE._serialized_end = 2000 - _LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTION_PERFORMATIVE._serialized_start = 2003 - _LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTION_PERFORMATIVE._serialized_end = 2135 - _LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTIONS_PERFORMATIVE._serialized_start = 2138 - _LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTIONS_PERFORMATIVE._serialized_end = 2344 - _LEDGERAPIMESSAGE_GET_TRANSACTION_RECEIPT_PERFORMATIVE._serialized_start = 2347 - _LEDGERAPIMESSAGE_GET_TRANSACTION_RECEIPT_PERFORMATIVE._serialized_end = 2587 - _LEDGERAPIMESSAGE_BALANCE_PERFORMATIVE._serialized_start = 2589 - _LEDGERAPIMESSAGE_BALANCE_PERFORMATIVE._serialized_end = 2647 - _LEDGERAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE._serialized_start = 2649 - _LEDGERAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE._serialized_end = 2767 - _LEDGERAPIMESSAGE_TRANSACTION_DIGEST_PERFORMATIVE._serialized_start = 2769 - _LEDGERAPIMESSAGE_TRANSACTION_DIGEST_PERFORMATIVE._serialized_end = 2896 - _LEDGERAPIMESSAGE_TRANSACTION_DIGESTS_PERFORMATIVE._serialized_start = 2899 - _LEDGERAPIMESSAGE_TRANSACTION_DIGESTS_PERFORMATIVE._serialized_end = 3029 - _LEDGERAPIMESSAGE_TRANSACTION_RECEIPT_PERFORMATIVE._serialized_start = 3032 - _LEDGERAPIMESSAGE_TRANSACTION_RECEIPT_PERFORMATIVE._serialized_end = 3162 - _LEDGERAPIMESSAGE_GET_STATE_PERFORMATIVE._serialized_start = 3165 - _LEDGERAPIMESSAGE_GET_STATE_PERFORMATIVE._serialized_end = 3311 - _LEDGERAPIMESSAGE_STATE_PERFORMATIVE._serialized_start = 3313 - _LEDGERAPIMESSAGE_STATE_PERFORMATIVE._serialized_end = 3421 - _LEDGERAPIMESSAGE_ERROR_PERFORMATIVE._serialized_start = 3423 - _LEDGERAPIMESSAGE_ERROR_PERFORMATIVE._serialized_end = 3533 + _globals["_LEDGERAPIMESSAGE"]._serialized_start = 51 + _globals["_LEDGERAPIMESSAGE"]._serialized_end = 3549 + _globals["_LEDGERAPIMESSAGE_KWARGS"]._serialized_start = 1427 + _globals["_LEDGERAPIMESSAGE_KWARGS"]._serialized_end = 1451 + _globals["_LEDGERAPIMESSAGE_RAWTRANSACTION"]._serialized_start = 1453 + _globals["_LEDGERAPIMESSAGE_RAWTRANSACTION"]._serialized_end = 1494 + _globals["_LEDGERAPIMESSAGE_SIGNEDTRANSACTION"]._serialized_start = 1496 + _globals["_LEDGERAPIMESSAGE_SIGNEDTRANSACTION"]._serialized_end = 1543 + _globals["_LEDGERAPIMESSAGE_SIGNEDTRANSACTIONS"]._serialized_start = 1545 + _globals["_LEDGERAPIMESSAGE_SIGNEDTRANSACTIONS"]._serialized_end = 1613 + _globals["_LEDGERAPIMESSAGE_STATE"]._serialized_start = 1615 + _globals["_LEDGERAPIMESSAGE_STATE"]._serialized_end = 1637 + _globals["_LEDGERAPIMESSAGE_TERMS"]._serialized_start = 1639 + _globals["_LEDGERAPIMESSAGE_TERMS"]._serialized_end = 1661 + _globals["_LEDGERAPIMESSAGE_TRANSACTIONDIGEST"]._serialized_start = 1663 + _globals["_LEDGERAPIMESSAGE_TRANSACTIONDIGEST"]._serialized_end = 1710 + _globals["_LEDGERAPIMESSAGE_TRANSACTIONDIGESTS"]._serialized_start = 1712 + _globals["_LEDGERAPIMESSAGE_TRANSACTIONDIGESTS"]._serialized_end = 1780 + _globals["_LEDGERAPIMESSAGE_TRANSACTIONRECEIPT"]._serialized_start = 1782 + _globals["_LEDGERAPIMESSAGE_TRANSACTIONRECEIPT"]._serialized_end = 1831 + _globals["_LEDGERAPIMESSAGE_GET_BALANCE_PERFORMATIVE"]._serialized_start = 1833 + _globals["_LEDGERAPIMESSAGE_GET_BALANCE_PERFORMATIVE"]._serialized_end = 1895 + _globals[ + "_LEDGERAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE" + ]._serialized_start = 1897 + _globals[ + "_LEDGERAPIMESSAGE_GET_RAW_TRANSACTION_PERFORMATIVE" + ]._serialized_end = 2000 + _globals[ + "_LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTION_PERFORMATIVE" + ]._serialized_start = 2003 + _globals[ + "_LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTION_PERFORMATIVE" + ]._serialized_end = 2135 + _globals[ + "_LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTIONS_PERFORMATIVE" + ]._serialized_start = 2138 + _globals[ + "_LEDGERAPIMESSAGE_SEND_SIGNED_TRANSACTIONS_PERFORMATIVE" + ]._serialized_end = 2344 + _globals[ + "_LEDGERAPIMESSAGE_GET_TRANSACTION_RECEIPT_PERFORMATIVE" + ]._serialized_start = 2347 + _globals[ + "_LEDGERAPIMESSAGE_GET_TRANSACTION_RECEIPT_PERFORMATIVE" + ]._serialized_end = 2587 + _globals["_LEDGERAPIMESSAGE_BALANCE_PERFORMATIVE"]._serialized_start = 2589 + _globals["_LEDGERAPIMESSAGE_BALANCE_PERFORMATIVE"]._serialized_end = 2647 + _globals["_LEDGERAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE"]._serialized_start = 2649 + _globals["_LEDGERAPIMESSAGE_RAW_TRANSACTION_PERFORMATIVE"]._serialized_end = 2767 + _globals[ + "_LEDGERAPIMESSAGE_TRANSACTION_DIGEST_PERFORMATIVE" + ]._serialized_start = 2769 + _globals["_LEDGERAPIMESSAGE_TRANSACTION_DIGEST_PERFORMATIVE"]._serialized_end = 2896 + _globals[ + "_LEDGERAPIMESSAGE_TRANSACTION_DIGESTS_PERFORMATIVE" + ]._serialized_start = 2899 + _globals[ + "_LEDGERAPIMESSAGE_TRANSACTION_DIGESTS_PERFORMATIVE" + ]._serialized_end = 3029 + _globals[ + "_LEDGERAPIMESSAGE_TRANSACTION_RECEIPT_PERFORMATIVE" + ]._serialized_start = 3032 + _globals[ + "_LEDGERAPIMESSAGE_TRANSACTION_RECEIPT_PERFORMATIVE" + ]._serialized_end = 3162 + _globals["_LEDGERAPIMESSAGE_GET_STATE_PERFORMATIVE"]._serialized_start = 3165 + _globals["_LEDGERAPIMESSAGE_GET_STATE_PERFORMATIVE"]._serialized_end = 3311 + _globals["_LEDGERAPIMESSAGE_STATE_PERFORMATIVE"]._serialized_start = 3313 + _globals["_LEDGERAPIMESSAGE_STATE_PERFORMATIVE"]._serialized_end = 3421 + _globals["_LEDGERAPIMESSAGE_ERROR_PERFORMATIVE"]._serialized_start = 3423 + _globals["_LEDGERAPIMESSAGE_ERROR_PERFORMATIVE"]._serialized_end = 3533 # @@protoc_insertion_point(module_scope) diff --git a/packages/valory/protocols/ledger_api/message.py b/packages/valory/protocols/ledger_api/message.py index 4e3b5f6a9b..f7dddd432a 100644 --- a/packages/valory/protocols/ledger_api/message.py +++ b/packages/valory/protocols/ledger_api/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from packages.valory.protocols.ledger_api.custom_types import Kwargs as CustomKwargs from packages.valory.protocols.ledger_api.custom_types import ( diff --git a/packages/valory/protocols/ledger_api/protocol.yaml b/packages/valory/protocols/ledger_api/protocol.yaml index a7c950626e..2a88db847c 100644 --- a/packages/valory/protocols/ledger_api/protocol.yaml +++ b/packages/valory/protocols/ledger_api/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeihapw4tp2vltr44b7zucfh4ml3sozbxviosxs2b7ouhviiqienvji - __init__.py: bafybeifeuu76e5lekzra26u43gt7dsvea5ziymgh7doeoes2jshnpvrmrm + __init__.py: bafybeidxljfcg5q4zztplomqqzcjmsgmdwagafncrjg6wugxckb44npktq custom_types.py: bafybeiefoqbszkmctw6fep4pot6rdlm4irfy2dydoihlcb7g6i3v47gu4m dialogues.py: bafybeidzv36lr3clx6ksapo4tp5q3ovii75woo66adr2vtkgheizfngtr4 ledger_api.proto: bafybeibhglhfnou4w3sy6rkwq2uvrsx6l5pfjnc45jepszyuhfz7a53iuu - ledger_api_pb2.py: bafybeiemuuhk23k2u5wbxhv3rhfxugdu3lt5khrjakh3ux57tkep4pelk4 - message.py: bafybeiffnpdtmrgp2ase4x2cclr7dpxfmuolwwjlueymumdcr6qsc22wou - serialization.py: bafybeihf43abgofrtfxsoro6s7frs6uwk5fb3zvgravk4qvddm53kpnotu + ledger_api_pb2.py: bafybeie25ytxqyleud3izwcxvuc2gljpoku2nogts7w43y4ckge2uaq4k4 + message.py: bafybeihvxnu2adbyiyj6vor6ckttq2bbffbiczl47gzzt2fia4vrtdtt2q + serialization.py: bafybeigy5u6jol7wjwv5vfc6kptlpabpmiqllkrlo5oz6qrsabs22doo3q tests/__init__.py: bafybeih2pvd62uql4qcvrrzqx6evsuu3apqok6wu63qq4r5qm3rikbfsmy tests/test_ledger_api.py: bafybeicrrng4cfjptpqvkxev6xdbranqzcb7hp4pnhflmbskgkn5mljwra tests/test_ledger_api_dialogues.py: bafybeiaq4ia6kvbwblyyuq7l64vwlluf57lpdkfddohbkbf2osiolrjeku diff --git a/packages/valory/protocols/ledger_api/serialization.py b/packages/valory/protocols/ledger_api/serialization.py index 82c4abb3a5..83df6571e9 100644 --- a/packages/valory/protocols/ledger_api/serialization.py +++ b/packages/valory/protocols/ledger_api/serialization.py @@ -22,12 +22,13 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from packages.valory.protocols.ledger_api import ledger_api_pb2 -from packages.valory.protocols.ledger_api.custom_types import ( +from packages.valory.protocols.ledger_api import ledger_api_pb2 # type: ignore +from packages.valory.protocols.ledger_api.custom_types import ( # type: ignore Kwargs, RawTransaction, SignedTransaction, @@ -38,7 +39,9 @@ TransactionDigests, TransactionReceipt, ) -from packages.valory.protocols.ledger_api.message import LedgerApiMessage +from packages.valory.protocols.ledger_api.message import ( # type: ignore + LedgerApiMessage, +) class LedgerApiSerializer(Serializer): @@ -55,7 +58,7 @@ def encode(msg: Message) -> bytes: msg = cast(LedgerApiMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - ledger_api_msg = ledger_api_pb2.LedgerApiMessage() + ledger_api_msg = ledger_api_pb2.LedgerApiMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -189,7 +192,7 @@ def decode(obj: bytes) -> Message: :return: the 'LedgerApi' message. """ message_pb = ProtobufMessage() - ledger_api_pb = ledger_api_pb2.LedgerApiMessage() + ledger_api_pb = ledger_api_pb2.LedgerApiMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/plugins/aea-cli-benchmark/aea_cli_benchmark/py.typed b/plugins/aea-cli-benchmark/aea_cli_benchmark/py.typed new file mode 100644 index 0000000000..10b0dea7d2 --- /dev/null +++ b/plugins/aea-cli-benchmark/aea_cli_benchmark/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The aea package uses inline types. diff --git a/plugins/aea-cli-benchmark/setup.py b/plugins/aea-cli-benchmark/setup.py index 74b97067d2..518a5b2b31 100755 --- a/plugins/aea-cli-benchmark/setup.py +++ b/plugins/aea-cli-benchmark/setup.py @@ -26,7 +26,7 @@ setup( name="open-aea-cli-benchmark", - version="1.35.0", + version="1.41.0.post1", author="Valory AG", license="Apache-2.0", description="CLI extension for AEA framework benchmarking.", @@ -35,6 +35,7 @@ packages=find_packages( where=".", include=["aea_cli_benchmark", "aea_cli_benchmark.*"] ), + package_data={"aea_cli_benchmark": ["py.typed"]}, entry_points={"aea.cli": ["benchmark = aea_cli_benchmark.core:benchmark"]}, install_requires=["open-aea>=1.0.0, <2.0.0", "psutil==5.7.0"], classifiers=[ @@ -47,10 +48,10 @@ "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development", diff --git a/plugins/aea-cli-ipfs/aea_cli_ipfs/py.typed b/plugins/aea-cli-ipfs/aea_cli_ipfs/py.typed new file mode 100644 index 0000000000..10b0dea7d2 --- /dev/null +++ b/plugins/aea-cli-ipfs/aea_cli_ipfs/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The aea package uses inline types. diff --git a/plugins/aea-cli-ipfs/setup.py b/plugins/aea-cli-ipfs/setup.py index 628e31d684..927ba5e5f3 100755 --- a/plugins/aea-cli-ipfs/setup.py +++ b/plugins/aea-cli-ipfs/setup.py @@ -28,13 +28,14 @@ setup( name="open-aea-cli-ipfs", - version="1.35.0", + version="1.41.0.post1", author="Valory AG", license="Apache-2.0", description="CLI extension for open AEA framework wrapping IPFS functionality.", long_description="CLI extension for open AEA framework wrapping IPFS functionality.", long_description_content_type="text/markdown", packages=["aea_cli_ipfs"], + package_data={"aea_cli_ipfs": ["py.typed"]}, entry_points={"aea.cli": ["ipfs_cli_command = aea_cli_ipfs.core:ipfs"]}, install_requires=[ "open-aea>=1.0.0, <2.0.0", @@ -51,10 +52,10 @@ "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development", diff --git a/plugins/aea-cli-ipfs/tests/test_aea_cli_ipfs.py b/plugins/aea-cli-ipfs/tests/test_aea_cli_ipfs.py index 8a9f6355a2..4f3fab4e83 100644 --- a/plugins/aea-cli-ipfs/tests/test_aea_cli_ipfs.py +++ b/plugins/aea-cli-ipfs/tests/test_aea_cli_ipfs.py @@ -176,7 +176,6 @@ def test_version_did_not_match(): ), patch( "aea_cli_ipfs.ipfs_utils.IPFSDaemon._check_ipfs", new=lambda *_: None ): - with pytest.raises( Exception, match="Please ensure you have version 0.6.0 of IPFS daemon installed.", diff --git a/plugins/aea-cli-ipfs/tests/test_registry.py b/plugins/aea-cli-ipfs/tests/test_registry.py index 66dc42b8d8..82627b0041 100644 --- a/plugins/aea-cli-ipfs/tests/test_registry.py +++ b/plugins/aea-cli-ipfs/tests/test_registry.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -142,7 +142,6 @@ def test_fetch_ipfs() -> None: "aea_cli_ipfs.registry.load_local_registry", new=lambda *_, **__: DUMMY_REGISTRY_DATA, ), TemporaryDirectory() as dest_path: - with mock.patch("aea_cli_ipfs.ipfs_utils.IPFSTool.download"), mock.patch( "aea_cli_ipfs.ipfs_utils.IPFSTool.check_ipfs_node_running" ): diff --git a/plugins/aea-ledger-cosmos/aea_ledger_cosmos/py.typed b/plugins/aea-ledger-cosmos/aea_ledger_cosmos/py.typed new file mode 100644 index 0000000000..10b0dea7d2 --- /dev/null +++ b/plugins/aea-ledger-cosmos/aea_ledger_cosmos/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The aea package uses inline types. diff --git a/plugins/aea-ledger-cosmos/setup.py b/plugins/aea-ledger-cosmos/setup.py index 58dd572821..a23424b4d0 100644 --- a/plugins/aea-ledger-cosmos/setup.py +++ b/plugins/aea-ledger-cosmos/setup.py @@ -26,7 +26,7 @@ setup( name="open-aea-ledger-cosmos", - version="1.35.0", + version="1.41.0.post1", author="Valory AG", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger api of Cosmos.", @@ -43,7 +43,7 @@ "ecdsa>=0.15,<0.17.0", "bech32==1.2.0", "pycryptodome>=3.10.1,<4.0.0", - "cosmpy>=0.2.0", + "open-aea-cosmpy==0.6.7", ], tests_require=["pytest"], entry_points={ @@ -61,10 +61,10 @@ "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development", diff --git a/plugins/aea-ledger-ethereum-flashbots/aea_ledger_ethereum_flashbots/ethereum_flashbots.py b/plugins/aea-ledger-ethereum-flashbots/aea_ledger_ethereum_flashbots/ethereum_flashbots.py index 77caffd780..5295b32372 100644 --- a/plugins/aea-ledger-ethereum-flashbots/aea_ledger_ethereum_flashbots/ethereum_flashbots.py +++ b/plugins/aea-ledger-ethereum-flashbots/aea_ledger_ethereum_flashbots/ethereum_flashbots.py @@ -206,7 +206,7 @@ def send_bundle( :return: the transaction digest if the transaction went through, None otherwise. """ for target_block in target_blocks: - current_block = self.api.eth.blockNumber + current_block = self.api.eth.block_number if current_block >= target_block: # we can only target future blocks _default_logger.debug( @@ -276,7 +276,7 @@ def _get_next_blocks(self, num_blocks: int = _DEFAULT_TARGET_BLOCKS) -> List[int :param num_blocks: the number of blocks to get. :return: the next blocks. """ - current_block = self.api.eth.blockNumber + current_block = self.api.eth.block_number return list(range(current_block, current_block + num_blocks)) @try_decorator("Unable to send transactions: {}", logger_method="warning") diff --git a/plugins/aea-ledger-ethereum-flashbots/aea_ledger_ethereum_flashbots/py.typed b/plugins/aea-ledger-ethereum-flashbots/aea_ledger_ethereum_flashbots/py.typed new file mode 100644 index 0000000000..10b0dea7d2 --- /dev/null +++ b/plugins/aea-ledger-ethereum-flashbots/aea_ledger_ethereum_flashbots/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The aea package uses inline types. diff --git a/plugins/aea-ledger-ethereum-flashbots/setup.py b/plugins/aea-ledger-ethereum-flashbots/setup.py index 616f1fdef0..0970f92c39 100644 --- a/plugins/aea-ledger-ethereum-flashbots/setup.py +++ b/plugins/aea-ledger-ethereum-flashbots/setup.py @@ -25,7 +25,7 @@ setup( name="open-aea-ledger-ethereum-flashbots", - version="1.35.0", + version="1.41.0.post1", author="Valory AG", license="Apache-2.0", description="Python package extending the default open-aea ethereum ledger plugin to add support for flashbots.", @@ -41,8 +41,8 @@ }, python_requires=">=3.9,<4.0", install_requires=[ - "open-aea-ledger-ethereum~=1.35.0", - "flashbots==1.1.1", + "open-aea-ledger-ethereum~=1.41.0.post1", + "open-aea-flashbots==1.4.0", ], tests_require=["pytest"], entry_points={ @@ -63,10 +63,10 @@ "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development", diff --git a/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/__init__.py b/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/__init__.py index c86ab103b5..11e210509a 100644 --- a/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/__init__.py +++ b/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/__init__.py @@ -19,6 +19,17 @@ """Python package wrapping the public and private key cryptography and support for hardware wallet interactions.""" +import os + + +if os.environ.get("PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION", None) != "python": + print( + ( + 'Please export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python" ' + "to use the hardware wallet without any issues" + ) + ) + from aea_ledger_ethereum_hwi.hwi import ( # noqa: F401 EthereumHWIApi, EthereumHWICrypto, diff --git a/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/account.py b/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/account.py index b5bd4bdaa4..98de4db9d4 100644 --- a/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/account.py +++ b/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/account.py @@ -24,8 +24,8 @@ from typing import Any, Generator, List, NamedTuple, Optional import rlp +from aea_ledger_ethereum_hwi.bip32 import h, m from aea_ledger_ethereum_hwi.exceptions import HWIError -from apduboy.lib.bip32 import h, m from construct import ( Byte, Bytes, diff --git a/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/bip32.py b/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/bip32.py new file mode 100644 index 0000000000..48eca115d2 --- /dev/null +++ b/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/bip32.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023 Valory AG +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ------------------------------------------------------------------------------ + +""" +BIP32 utils + +Original implementation: https://github.com/LedgerHQ/apduboy/blob/master/apduboy/lib/bip32.py +""" + +from dataclasses import dataclass, field +from typing import List + + +BIP32_HARDEN_BIT = 0x80000000 + + +@dataclass +class Level: + """Level separator.""" + + _value: int + + @property + def value(self) -> int: + """Value""" + return self._value + + def __str__(self) -> str: + """String representation.""" + if self._value & BIP32_HARDEN_BIT: + value = self._value - BIP32_HARDEN_BIT + return f"{value}'" + return f"{self._value}" + + +@dataclass +class Derivation: + """Path derivation""" + + _path_list: List["Level"] = field(default_factory=list) + + def __truediv__(self, level: int) -> "Derivation": + """Combine multiple path derivations using `/` operator.""" + return Derivation(self._path_list + [Level(level)]) + + @property + def account(self) -> int: + """Account value.""" + if self.depth < 3: + raise ValueError(f"Insufficient HD tree depth: {self.depth}") + return self._path_list[2].value + + @property + def parent(self) -> "Derivation": + """Parent value.""" + return Derivation(self._path_list[:-1]) + + @property + def path(self) -> str: + """Calculated path.""" + if not self._path_list: + return "m" + return "m/" + "/".join(str(level) for level in self._path_list) + + def to_list(self) -> List[int]: + """Convert to list.""" + return [level.value for level in self._path_list] + + @property + def depth(self) -> int: + """Depth.""" + return len(self._path_list) + + def __repr__(self): + """String representation.""" + return self.path + + def __str__(self): + """String representation.""" + return self.path + + +def h(value: int) -> int: + """Wrap value.""" + return value + BIP32_HARDEN_BIT + + +m = Derivation() diff --git a/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/py.typed b/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/py.typed new file mode 100644 index 0000000000..10b0dea7d2 --- /dev/null +++ b/plugins/aea-ledger-ethereum-hwi/aea_ledger_ethereum_hwi/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The aea package uses inline types. diff --git a/plugins/aea-ledger-ethereum-hwi/setup.py b/plugins/aea-ledger-ethereum-hwi/setup.py index 5a33e9d7df..98b9ffde93 100644 --- a/plugins/aea-ledger-ethereum-hwi/setup.py +++ b/plugins/aea-ledger-ethereum-hwi/setup.py @@ -25,7 +25,7 @@ setup( name="open-aea-ledger-ethereum-hwi", - version="1.35.0", + version="1.41.0.post1", author="Valory AG", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and support for hardware wallet interactions.", @@ -39,12 +39,12 @@ }, install_requires=[ "open-aea>=1.0.0, <2.0.0", - "web3==5.31.4", + "web3>=6.0.0,<7", "ipfshttpclient==0.8.0a2", - "eth-account>=0.5.9,<0.6.0", - "open-aea-ledger-ethereum~=1.35.0", - "apduboy>=0.5.0", - "protobuf==3.19.5", + "eth-account>=0.8.0,<0.9.0", + "open-aea-ledger-ethereum~=1.41.0.post1", + "ledgerwallet==0.1.3", + "protobuf>=4.21.6,<5.0.0", "construct<=2.10.61", ], tests_require=["pytest"], @@ -65,10 +65,10 @@ "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development", diff --git a/plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py b/plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py index 2895d7e988..4c4458536c 100644 --- a/plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py +++ b/plugins/aea-ledger-ethereum/aea_ledger_ethereum/ethereum.py @@ -43,9 +43,9 @@ from eth_utils.currency import from_wei, to_wei # pylint: disable=import-error from requests import HTTPError from web3 import HTTPProvider, Web3 -from web3._utils.request import SessionCache +from web3._utils.request import SimpleCache from web3.datastructures import AttributeDict -from web3.exceptions import ContractLogicError, SolidityError, TransactionNotFound +from web3.exceptions import ContractLogicError, TransactionNotFound from web3.gas_strategies.rpc import rpc_gas_price_strategy from web3.middleware import geth_poa_middleware from web3.types import TxData, TxParams, TxReceipt, Wei @@ -115,6 +115,8 @@ DEFAULT_GAS_STATION_STRATEGY = {"gas_price_api_key": "", "gas_price_strategy": "fast"} +GAS_STATION_FALLBACK_ESTIMATE = 20 # gwei + DEFAULT_GAS_PRICE_STRATEGIES = { EIP1559: DEFAULT_EIP1559_STRATEGY, GAS_STATION: DEFAULT_GAS_STATION_STRATEGY, @@ -280,10 +282,8 @@ def eip1559_price_strategy( transaction_params: TxParams, # pylint: disable=unused-argument ) -> Dict[str, Wei]: try: - response = requests.get(gas_endpoint) if response.status_code == 200: - data = response.json()[speed] return { "maxFeePerGas": Wei(to_wei(data["maxFee"], "gwei")), @@ -339,18 +339,23 @@ def gas_station_gas_price_strategy( :param transaction_params: transaction parameters :return: wei """ + _default_logger.info( # pragma: nocover + "`ethgasstation.info` has been deprecated and will be replaced with an alternative on the next release." + ) response = requests.get(f"{ETH_GASSTATION_URL}?api-key={gas_price_api_key}") - if response.status_code != 200: - raise ValueError( # pragma: nocover - f"Gas station API response: {response.status_code}, {response.text}" + if response.status_code != 200: # pragma: nocover + # TODO : Use some other gas station API # pylint: disable=fixme + _default_logger.error( + f"Gas station API response: {response.status_code}, {response.text}, using fallback gas price." ) + return {"gasPrice": web3.to_wei(GAS_STATION_FALLBACK_ESTIMATE, "gwei")} response_dict = response.json() _default_logger.debug("Gas station API response: {}".format(response_dict)) result = response_dict.get(gas_price_strategy, None) if type(result) not in [int, float]: # pragma: nocover raise ValueError(f"Invalid return value for `{gas_price_strategy}`!") gwei_result = result / 10 # adjustment (see api documentation) - wei_result = web3.toWei(gwei_result, "gwei") + wei_result = web3.to_wei(gwei_result, "gwei") return {"gasPrice": wei_result} return gas_station_gas_price_strategy @@ -492,7 +497,7 @@ def __init__( extra_entropy=extra_entropy, ) - bytes_representation = Web3.toBytes(hexstr=self.entity.key.hex()) + bytes_representation = Web3.to_bytes(hexstr=self.entity.key.hex()) self._public_key = str(keys.PrivateKey(bytes_representation).public_key) self._address = self.entity.address @@ -714,7 +719,7 @@ def get_address_from_public_key(cls, public_key: str) -> str: """ keccak_hash = Web3.keccak(hexstr=public_key) raw_address = keccak_hash[-20:].hex() - address = Web3.toChecksumAddress(raw_address) + address = Web3.to_checksum_address(raw_address) return address @classmethod @@ -733,7 +738,7 @@ def recover_message( enforce(len(message) == 32, "Message must be hashed to exactly 32 bytes.") with warnings.catch_warnings(): warnings.simplefilter("ignore") - address = Account.recoverHash( # pylint: disable=no-value-for-parameter + address = Account._recover_hash( # pylint: disable=no-value-for-parameter,protected-access message_hash=message, signature=signature ) else: @@ -854,7 +859,7 @@ def get_balance( @try_decorator("Unable to retrieve balance: {}", logger_method="warning") def _try_get_balance(self, address: Address, **_kwargs: Any) -> Optional[int]: """Get the balance of a given account.""" - check_address = self._api.toChecksumAddress(address) + check_address = self._api.to_checksum_address(address) return self._api.eth.get_balance(check_address) # pylint: disable=no-member def get_state( @@ -928,8 +933,8 @@ def get_transfer_transaction( # pylint: disable=arguments-differ """ transaction: Optional[JSONLike] = None chain_id = chain_id if chain_id is not None else self._chain_id - destination_address = self._api.toChecksumAddress(destination_address) - sender_address = self._api.toChecksumAddress(sender_address) + destination_address = self._api.to_checksum_address(destination_address) + sender_address = self._api.to_checksum_address(sender_address) nonce = self._try_get_transaction_count( sender_address, raise_on_try=raise_on_try, @@ -1043,7 +1048,9 @@ def try_get_gas_pricing( return None gas_price_strategy, gas_price_strategy_callable = retrieved_strategy - prior_strategy = self._api.eth.gasPriceStrategy + prior_strategy = ( + self._api.eth._gas_price_strategy # pylint: disable=protected-access + ) try: self._api.eth.set_gas_price_strategy(gas_price_strategy_callable) gas_price = self._api.eth.generate_gas_price() @@ -1076,7 +1083,7 @@ def _try_get_transaction_count( ) -> Optional[int]: """Try get the transaction count.""" nonce = self._api.eth.get_transaction_count( # pylint: disable=no-member - self._api.toChecksumAddress(address) + self._api.to_checksum_address(address) ) return nonce @@ -1264,7 +1271,7 @@ def _try_get_revert_reason(self, tx: TxData, **_kwargs: Any) -> str: try: # replay the transaction on the provider self.api.eth.call(replay_tx, tx["blockNumber"] - 1) - except SolidityError as e: + except ContractLogicError as e: # execution reverted exception return str(e) except HTTPError as e: @@ -1290,7 +1297,7 @@ def get_contract_instance( bytecode=contract_interface[_BYTECODE], ) else: - _contract_address = self.api.toChecksumAddress(contract_address) + _contract_address = self.api.to_checksum_address(contract_address) instance = self.api.eth.contract( address=_contract_address, abi=contract_interface[_ABI], @@ -1343,7 +1350,7 @@ def get_deploy_transaction( # pylint: disable=arguments-differ ) transaction: Optional[JSONLike] = None - _deployer_address = self.api.toChecksumAddress(deployer_address) + _deployer_address = self.api.to_checksum_address(deployer_address) nonce = self._try_get_transaction_count( _deployer_address, raise_on_try=raise_on_try ) @@ -1384,7 +1391,7 @@ def get_deploy_transaction( # pylint: disable=arguments-differ transaction.update(gas_pricing) - transaction = instance.constructor(**kwargs).buildTransaction(transaction) + transaction = instance.constructor(**kwargs).build_transaction(transaction) if transaction is None: return None # pragma: nocover transaction.pop("to", None) # only 'from' address, don't insert 'to' address! @@ -1408,7 +1415,7 @@ def is_valid_address(cls, address: Address) -> bool: :param address: the address to validate :return: whether the address is valid """ - return Web3.isAddress(address) + return Web3.is_address(address) @classmethod def contract_method_call( # pylint: disable=arguments-differ @@ -1461,7 +1468,7 @@ def build_transaction( # pylint: disable=too-many-arguments tx_params = { "nonce": nonce, "value": tx_args["value"] if "value" in tx_args else 0, - "gas": 1, # set this as a placeholder to avoid estimation on buildTransaction() + "gas": 1, # set this as a placeholder to avoid estimation on build_transaction() } # Parameter camel-casing due to contract api requirements @@ -1485,7 +1492,7 @@ def build_transaction( # pylint: disable=too-many-arguments if gas_data: tx_params.update(gas_data) # pragma: nocover - tx = tx.buildTransaction(tx_params) + tx = tx.build_transaction(tx_params) if self._is_gas_estimation_enabled: tx = self.update_with_gas_estimate(tx, raise_on_try=raise_on_try) @@ -1587,10 +1594,10 @@ def _try_get_wealth(address: Address, url: Optional[str] = None) -> None: ) -class SessionCacheLockWrapper: +class SimpleCacheLockWrapper: """Wrapper for session_cache with threading.Lock.""" - def __init__(self, session_cache: SessionCache) -> None: + def __init__(self, session_cache: SimpleCache) -> None: """Init wrapper.""" self.session_cache = session_cache self.lock = threading.Lock() @@ -1618,12 +1625,16 @@ def clear(self) -> None: with self.lock: self.session_cache.clear() + def items(self) -> Dict[str, Any]: + """Return session items.""" + return self.session_cache.items() + def set_wrapper_for_web3py_session_cache() -> None: """Wrap web3py session cache with threading.Lock.""" # pylint: disable=protected-access - web3._utils.request._session_cache = SessionCacheLockWrapper( + web3._utils.request._session_cache = SimpleCacheLockWrapper( web3._utils.request._session_cache ) diff --git a/plugins/aea-ledger-ethereum/aea_ledger_ethereum/py.typed b/plugins/aea-ledger-ethereum/aea_ledger_ethereum/py.typed new file mode 100644 index 0000000000..10b0dea7d2 --- /dev/null +++ b/plugins/aea-ledger-ethereum/aea_ledger_ethereum/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The aea package uses inline types. diff --git a/plugins/aea-ledger-ethereum/setup.py b/plugins/aea-ledger-ethereum/setup.py index 443bc8fb5c..f857a0285a 100644 --- a/plugins/aea-ledger-ethereum/setup.py +++ b/plugins/aea-ledger-ethereum/setup.py @@ -26,7 +26,7 @@ setup( name="open-aea-ledger-ethereum", - version="1.35.0", + version="1.41.0.post1", author="Valory AG", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger api of Ethereum.", @@ -41,9 +41,9 @@ }, install_requires=[ "open-aea>=1.0.0, <2.0.0", - "web3==5.31.4", + "web3>=6.0.0,<7", "ipfshttpclient==0.8.0a2", - "eth-account>=0.5.9,<0.6.0", + "eth-account>=0.8.0,<0.9.0", ], tests_require=["pytest"], entry_points={ @@ -61,10 +61,10 @@ "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development", diff --git a/plugins/aea-ledger-ethereum/tests/test_ethereum.py b/plugins/aea-ledger-ethereum/tests/test_ethereum.py index 159ad0c11c..ae69abfa0c 100644 --- a/plugins/aea-ledger-ethereum/tests/test_ethereum.py +++ b/plugins/aea-ledger-ethereum/tests/test_ethereum.py @@ -39,7 +39,7 @@ EthereumCrypto, EthereumFaucetApi, EthereumHelper, - SessionCacheLockWrapper, + SimpleCacheLockWrapper, get_gas_price_strategy, get_gas_price_strategy_eip1559, requests, @@ -60,7 +60,7 @@ from web3 import Web3 from web3._utils.request import _session_cache as session_cache from web3.datastructures import AttributeDict -from web3.exceptions import ContractLogicError, SolidityError +from web3.exceptions import ContractLogicError from aea.common import JSONLike from aea.crypto.helpers import DecryptError, KeyIsIncorrect @@ -461,7 +461,7 @@ def test_ethereum_api_get_deploy_transaction(ethereum_testnet_config): contract_instance = Mock() constructor = Mock() - constructor.buildTransaction = lambda x: x + constructor.build_transaction = lambda x: x contract_instance.constructor = Mock(return_value=constructor) with patch.object( @@ -492,7 +492,7 @@ def test_ethereum_api_get_deploy_transaction(ethereum_testnet_config): def test_session_cache(): """Test session cache.""" - assert isinstance(session_cache, SessionCacheLockWrapper) + assert isinstance(session_cache, SimpleCacheLockWrapper) session_cache.cache("key", 1) assert session_cache.get_cache_entry("key") == 1 @@ -696,7 +696,7 @@ def pass_tx_params(tx_params): return tx_params tx_mock = MagicMock() - tx_mock.buildTransaction = pass_tx_params + tx_mock.build_transaction = pass_tx_params method_mock = MagicMock(return_value=tx_mock) @@ -865,7 +865,7 @@ def test_revert_reason( ): with mock.patch( "web3.eth.Eth.call", - side_effect=SolidityError("test revert reason"), + side_effect=ContractLogicError("test revert reason"), ): _, transaction_receipt, is_settled = _construct_and_settle_tx( ethereum_api, diff --git a/plugins/aea-ledger-fetchai/aea_ledger_fetchai/py.typed b/plugins/aea-ledger-fetchai/aea_ledger_fetchai/py.typed new file mode 100644 index 0000000000..10b0dea7d2 --- /dev/null +++ b/plugins/aea-ledger-fetchai/aea_ledger_fetchai/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The aea package uses inline types. diff --git a/plugins/aea-ledger-fetchai/setup.py b/plugins/aea-ledger-fetchai/setup.py index f4d5adedfb..69bfd87ed5 100644 --- a/plugins/aea-ledger-fetchai/setup.py +++ b/plugins/aea-ledger-fetchai/setup.py @@ -31,7 +31,7 @@ setup( name="open-aea-ledger-fetchai", - version="1.35.0", + version="1.41.0.post1", author="Valory AG", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger API of Fetch.AI.", @@ -44,7 +44,7 @@ "test_tools/data/*", ] }, - install_requires=["open-aea-ledger-cosmos~=1.35.0"], + install_requires=["open-aea-ledger-cosmos~=1.41.0.post1"], tests_require=["pytest"], entry_points={ "aea.cryptos": ["fetchai = aea_ledger_fetchai:FetchAICrypto"], @@ -61,10 +61,10 @@ "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development", diff --git a/plugins/aea-ledger-solana/aea_ledger_solana/py.typed b/plugins/aea-ledger-solana/aea_ledger_solana/py.typed new file mode 100644 index 0000000000..10b0dea7d2 --- /dev/null +++ b/plugins/aea-ledger-solana/aea_ledger_solana/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The aea package uses inline types. diff --git a/plugins/aea-ledger-solana/setup.py b/plugins/aea-ledger-solana/setup.py index da9ae473cc..eea5d5bfaa 100644 --- a/plugins/aea-ledger-solana/setup.py +++ b/plugins/aea-ledger-solana/setup.py @@ -25,14 +25,14 @@ setup( name="open-aea-ledger-solana", - version="1.35.0", + version="1.41.0.post1", author="dassy23", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger api of solana.", long_description="Python package wrapping the public and private key cryptography and ledger api of solana.", long_description_content_type="text/markdown", packages=find_packages(include=["aea_ledger_solana*"]), - package_data={}, + package_data={"aea_ledger_solana": ["py.typed"]}, install_requires=[ "open-aea>=1.0.0, <2.0.0", "cryptography", @@ -59,6 +59,7 @@ "Operating System :: Unix", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development", diff --git a/scripts/acn/run_acn_node_standalone.py b/scripts/acn/run_acn_node_standalone.py index 648db8cbde..6e84ffae45 100644 --- a/scripts/acn/run_acn_node_standalone.py +++ b/scripts/acn/run_acn_node_standalone.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -340,7 +340,6 @@ def parse_command_line(): if __name__ == "__main__": - run_args = parse_command_line() node_config: Optional[AcnNodeConfig] = None diff --git a/scripts/check_copyright_notice.py b/scripts/check_copyright_notice.py index bb69509e95..c58b8fb618 100755 --- a/scripts/check_copyright_notice.py +++ b/scripts/check_copyright_notice.py @@ -171,7 +171,10 @@ class ErrorTypes: # pylint: disable=too-few-public-methods def get_modification_date(file: Path) -> datetime: """Returns modification date for the file.""" - (date_string, _,) = subprocess.Popen( # nosec + ( + date_string, + _, + ) = subprocess.Popen( # nosec [str(GIT_PATH), "log", "-1", '--format="%ad"', "--", str(file)], stdout=subprocess.PIPE, ).communicate() @@ -236,7 +239,6 @@ def _validate_years( # Specified year is 2021/2022 but the file has been last modified in another later year (missing -202x) if end_year is not None and check_end_year: - if start_year > end_year: check_info["check"] = False check_info["message"] = "End year should be greater then start year." diff --git a/scripts/check_doc_links.py b/scripts/check_doc_links.py index 3b1cf842b6..e6d9bf44b0 100755 --- a/scripts/check_doc_links.py +++ b/scripts/check_doc_links.py @@ -45,6 +45,8 @@ # Remove non-url-allowed characters like ` before adding them here URL_SKIPS: List[str] = [ "https://faucet.dimensions.network/", + "https://www.cs.ox.ac.uk/people/michael.wooldridge/", + "https://multiformats.io/multiaddr/", ] # Define here custom timeouts for some edge cases diff --git a/scripts/check_pipfile_and_toxini.py b/scripts/check_pipfile_and_toxini.py index c0cd69ed71..d980fd50f6 100755 --- a/scripts/check_pipfile_and_toxini.py +++ b/scripts/check_pipfile_and_toxini.py @@ -39,6 +39,7 @@ "memory-profiler", "apduboy", "matplotlib", + "open-aea-flashbots", } diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 93234425f7..82cc18d875 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -34,7 +34,7 @@ function instal_choco_golang_gcc { } function install_aea { echo "Install aea" - $output=pip install open-aea[all]==1.35.0 --force --no-cache-dir 2>&1 |out-string; + $output=pip install open-aea[all]==1.41.0.post1 --force --no-cache-dir 2>&1 |out-string; if ($LastExitCode -ne 0) { echo $output echo "AEA install failed!" diff --git a/scripts/install.sh b/scripts/install.sh index 986cddf7e4..a619b79eb2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -29,7 +29,7 @@ function is_python_version_ok() { version=`python3 -V 2>/dev/null` if [[ -z `echo $version|grep -E 'Python 3\.(7|8|9|10)\.[0-9]+'` ]]; then - echo "Python3 version: ${version} is not supported. Supported versions are 3.7, 3.8, 3.9, 3.10." + echo "Python3 version: ${version} is not supported. Supported versions are 3.8, 3.9, 3.10, 3.11." return 1 fi return 0 @@ -42,7 +42,7 @@ function is_python_version_ok() { function install_aea (){ echo "Install AEA" - output=$(pip3 install --user open-aea[all]==1.35.0 --force --no-cache-dir) + output=$(pip3 install --user open-aea[all]==1.41.0.post1 --force --no-cache-dir) if [[ $? -ne 0 ]]; then echo "$output" diff --git a/scripts/log_parser.py b/scripts/log_parser.py index a62c06c0be..6829e1e417 100644 --- a/scripts/log_parser.py +++ b/scripts/log_parser.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -150,7 +150,6 @@ def process(self) -> None: LOG_TYPE = "json" for line in content: - line_time: Optional[datetime.datetime] = None line_data: str = line @@ -243,7 +242,6 @@ def plot(self) -> None: for figure_name in tracker_data["figure_names"]: plt.figure(figure_name) for var_name, var_data in tracker_data["var_data"].items(): - if tracker_data["type"] == "event" and var_data["times"]: t0 = var_data["times"][0] plt.plot( diff --git a/setup.cfg b/setup.cfg index 117fd9e152..ab2836a709 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,7 +53,7 @@ known_local_folder=tests sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PACKAGES,LOCALFOLDER [mypy] -python_version = 3.7 +python_version = 3.8 strict_optional = True # temporary until fixed @@ -318,6 +318,9 @@ ignore_missing_imports=True [mypy-flashbots.*] ignore_missing_imports=True +[mypy-asyncio.*] +ignore_missing_imports=True + [darglint] docstring_style=sphinx strictness=short diff --git a/setup.py b/setup.py index 0298ed373b..a6758d0a27 100644 --- a/setup.py +++ b/setup.py @@ -18,24 +18,23 @@ # limitations under the License. # # ------------------------------------------------------------------------------ -import sys import os import re from typing import Dict from setuptools import find_packages, setup # type: ignore + PACKAGE_NAME = "aea" here = os.path.abspath(os.path.dirname(__file__)) def get_all_extras() -> Dict: - cli_deps = [ "click==8.0.2", - "pyyaml>=4.2b1,<6.0", - "jsonschema>=3.0.0,<4.0.0", - "packaging>=20.3,<22.0", + "pyyaml==6.0.1", + "jsonschema<=4.19.0,>=4.16.0", + "packaging>=23.1,<24.0", "pytest>=7.0.0,<7.3.0", "coverage>=6.4.4,<8.0.0", "semver>=2.9.1,<3.0.0", @@ -56,12 +55,12 @@ def get_all_extras() -> Dict: base_deps = [ "semver>=2.9.1,<3.0.0", "base58>=1.0.3,<3.0.0", - "jsonschema>=3.0.0,<4.0.0", - "packaging>=20.3,<22.0", - "protobuf>=3.19.0,<4.0.0", + "jsonschema<=4.19.0,>=4.16.0", + "packaging>=23.1,<24.0", + "protobuf>=4.21.6,<5.0.0", "pymultihash==0.8.2", - "pyyaml>=4.2b1,<6.0", - "requests>=2.22.0,<3.0.0", + "pyyaml==6.0.1", + "requests==2.28.1", "python-dotenv>=0.14.0,<0.18.0", "ecdsa>=0.15,<0.17.0", "morphys>=1.0", @@ -115,10 +114,10 @@ def parse_readme(): "Operating System :: MacOS", "Operating System :: Microsoft", "Operating System :: Unix", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Communications", "Topic :: Internet", "Topic :: Scientific/Engineering", @@ -132,7 +131,7 @@ def parse_readme(): zip_safe=False, include_package_data=True, license=about["__license__"], - python_requires=">=3.7", + python_requires=">=3.8", keywords="aea open-aea autonomous-economic-agents agent-framework multi-agent-systems multi-agent cryptocurrency cryptocurrencies dezentralized dezentralized-network", project_urls={ "Bug Reports": "https://github.com/valory-xyz/open-aea/issues", diff --git a/skaffold.yaml b/skaffold.yaml index 58a54910a3..656321b08c 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -5,7 +5,7 @@ metadata: build: tagPolicy: envTemplate: - template: "1.35.0" + template: "1.41.0.post1" artifacts: - image: valory/open-aea-develop docker: @@ -24,7 +24,7 @@ profiles: build: tagPolicy: envTemplate: - template: "1.35.0" + template: "1.41.0.post1" artifacts: - image: valory/open-aea-docs docker: diff --git a/tests/common/utils.py b/tests/common/utils.py index 741000b788..7fa0940bbd 100644 --- a/tests/common/utils.py +++ b/tests/common/utils.py @@ -221,6 +221,7 @@ def make_handler_cls_from_funcion(func: Callable) -> Type[Handler]: :param func: function or callable to be called from Handler.handle method :return: Handler class """ + # pydocstyle: ignore # case conflicts with black # noqa: E800 class TestHandler(Handler): SUPPORTED_PROTOCOL = DefaultMessage.protocol_id @@ -243,6 +244,7 @@ def make_behaviour_cls_from_funcion(func: Callable) -> Type[Behaviour]: :param func: function or callable to be called from Behaviour.act method :return: Behaviour class """ + # pydocstyle: ignore # case conflicts with black # noqa: E800 class TestBehaviour(Behaviour): def act(self) -> None: @@ -267,6 +269,7 @@ def run_in_root_dir(fn) -> Callable: :return: wrapped function """ + # pydocstyle: ignore # case conflicts with black # noqa: E800 @wraps(fn) def wrap(*args, **kwargs) -> Any: diff --git a/tests/conftest.py b/tests/conftest.py index c82d0588d3..38202d59b1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -299,10 +299,10 @@ os.path.join(ROOT_DIR, "aea", "connections", "scaffold", CONNECTION_YAML), os.path.join(FETCHAI_PREF, "connections", "gym", CONNECTION_YAML), os.path.join(VALORY_REF, "connections", "http_client", CONNECTION_YAML), - os.path.join(FETCHAI_PREF, "connections", "http_server", CONNECTION_YAML), os.path.join(VALORY_REF, "connections", "ledger", CONNECTION_YAML), os.path.join(FETCHAI_PREF, "connections", "local", CONNECTION_YAML), os.path.join(FETCHAI_PREF, "connections", "stub", CONNECTION_YAML), + os.path.join(VALORY_REF, "connections", "http_server", CONNECTION_YAML), os.path.join(VALORY_REF, "connections", "p2p_libp2p", CONNECTION_YAML), os.path.join(VALORY_REF, "connections", "p2p_libp2p_client", CONNECTION_YAML), os.path.join(VALORY_REF, "connections", "p2p_libp2p_mailbox", CONNECTION_YAML), diff --git a/tests/data/packages/fetchai/protocols/t_protocol/__init__.py b/tests/data/packages/fetchai/protocols/t_protocol/__init__.py index 14e0679a06..51d04493ac 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol/__init__.py +++ b/tests/data/packages/fetchai/protocols/t_protocol/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the t_protocol protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from tests.data.packages.fetchai.protocols.t_protocol.message import TProtocolMessage diff --git a/tests/data/packages/fetchai/protocols/t_protocol/message.py b/tests/data/packages/fetchai/protocols/t_protocol/message.py index f338ce5846..cef057daa4 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol/message.py +++ b/tests/data/packages/fetchai/protocols/t_protocol/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore from tests.data.packages.fetchai.protocols.t_protocol.custom_types import ( DataModel as CustomDataModel, diff --git a/tests/data/packages/fetchai/protocols/t_protocol/protocol.yaml b/tests/data/packages/fetchai/protocols/t_protocol/protocol.yaml index 195855f1c5..c451751493 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol/protocol.yaml +++ b/tests/data/packages/fetchai/protocols/t_protocol/protocol.yaml @@ -8,13 +8,13 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeib74jwgkmfjbcpson5lbh2gefkybu23bm46j7jkzeep4rbe5x276m - __init__.py: bafybeiezmna733wnmpp6rvzs5s3joxcunukxnyuhxmeggft3j2dw2uopvu + __init__.py: bafybeicachv7r7mdadvjpx6gpgamztnkbxn4oqvzh7skobjaq3h2pb3mse custom_types.py: bafybeiaqxtoq6b4xnve3p2uiw55povolzg3yon3ptvzxbeg2wtssiumxkq dialogues.py: bafybeihms4z37odeus6tfzxsdyd75vrhpuzcomg5mhrcvhckoewkpyn6wm - message.py: bafybeibrpishgcfaanq5iau6cuqxey6xr6vm2s5fygjzgk2mi6ulan4gqa - serialization.py: bafybeic4oyqt4vz5gmcqvl3icwrab6vkix7yp36gs6nu3n5j3b7cz27q2e + message.py: bafybeigabl7xrxcdaourzdeshgaoydhbclhnye5dvdyv2nihsjplisn3v4 + serialization.py: bafybeickih4w2ikj2q7okosahqt2d6gjhwyloeb5prolbc7mgy3nwlg5ky t_protocol.proto: bafybeiapaievom3jzw3vjdzcoo3bok7tecznwgccbbjc6thmseeww5fp2m - t_protocol_pb2.py: bafybeifglzzcjj3k36pi3tqagajden7uqatfbuhb3r6emp5behs3ljq73a + t_protocol_pb2.py: bafybeicbg2hmmd776v3m7bir5iwm6rtmawei54vwcvaf2ozmp4shza4sra tests/test_t_protocol_dialogues.py: bafybeidxzkiqbbyo5zu37udk6v6jcwrvwsm6eqznurvmljxjia7xk3qgcy tests/test_t_protocol_messages.py: bafybeibzqolqclgo4td6yzxsvn4l7ht5qoe2jq5edo7kj532pd2nvdpdae fingerprint_ignore_patterns: [] diff --git a/tests/data/packages/fetchai/protocols/t_protocol/serialization.py b/tests/data/packages/fetchai/protocols/t_protocol/serialization.py index cd3097d7b8..0f48e59f12 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol/serialization.py +++ b/tests/data/packages/fetchai/protocols/t_protocol/serialization.py @@ -22,19 +22,24 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from tests.data.packages.fetchai.protocols.t_protocol import t_protocol_pb2 -from tests.data.packages.fetchai.protocols.t_protocol.custom_types import ( +from tests.data.packages.fetchai.protocols.t_protocol import ( + t_protocol_pb2, # type: ignore +) +from tests.data.packages.fetchai.protocols.t_protocol.custom_types import ( # type: ignore DataModel, DataModel1, DataModel2, DataModel3, DataModel4, ) -from tests.data.packages.fetchai.protocols.t_protocol.message import TProtocolMessage +from tests.data.packages.fetchai.protocols.t_protocol.message import ( # type: ignore + TProtocolMessage, +) class TProtocolSerializer(Serializer): @@ -51,7 +56,7 @@ def encode(msg: Message) -> bytes: msg = cast(TProtocolMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - t_protocol_msg = t_protocol_pb2.TProtocolMessage() + t_protocol_msg = t_protocol_pb2.TProtocolMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -351,7 +356,7 @@ def decode(obj: bytes) -> Message: :return: the 'TProtocol' message. """ message_pb = ProtobufMessage() - t_protocol_pb = t_protocol_pb2.TProtocolMessage() + t_protocol_pb = t_protocol_pb2.TProtocolMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/tests/data/packages/fetchai/protocols/t_protocol/t_protocol_pb2.py b/tests/data/packages/fetchai/protocols/t_protocol/t_protocol_pb2.py index d988482751..b7d91d0782 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol/t_protocol_pb2.py +++ b/tests/data/packages/fetchai/protocols/t_protocol/t_protocol_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,572 +16,10 @@ b"\n\x10t_protocol.proto\x12)aea.some_author.some_protocol_name.v1_0_0\"\xcbK\n\x10TProtocolMessage\x12s\n\x0fperformative_ct\x18\x05 \x01(\x0b\x32X.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Ct_PerformativeH\x00\x12\x8b\x01\n\x1bperformative_empty_contents\x18\x06 \x01(\x0b\x32\x64.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Empty_Contents_PerformativeH\x00\x12s\n\x0fperformative_mt\x18\x07 \x01(\x0b\x32X.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_PerformativeH\x00\x12q\n\x0eperformative_o\x18\x08 \x01(\x0b\x32W.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_O_PerformativeH\x00\x12u\n\x10performative_pct\x18\t \x01(\x0b\x32Y.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pct_PerformativeH\x00\x12u\n\x10performative_pmt\x18\n \x01(\x0b\x32Y.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_PerformativeH\x00\x12s\n\x0fperformative_pt\x18\x0b \x01(\x0b\x32X.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pt_PerformativeH\x00\x1a\xb2\x02\n\tDataModel\x12\x13\n\x0b\x62ytes_field\x18\x01 \x01(\x0c\x12\x11\n\tint_field\x18\x02 \x01(\x03\x12\x13\n\x0b\x66loat_field\x18\x03 \x01(\x02\x12\x12\n\nbool_field\x18\x04 \x01(\x08\x12\x11\n\tstr_field\x18\x05 \x01(\t\x12\x11\n\tset_field\x18\x06 \x03(\x03\x12\x12\n\nlist_field\x18\x07 \x03(\t\x12h\n\ndict_field\x18\x08 \x03(\x0b\x32T.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel.DictFieldEntry\x1a\x30\n\x0e\x44ictFieldEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\xb4\x02\n\nDataModel1\x12\x13\n\x0b\x62ytes_field\x18\x01 \x01(\x0c\x12\x11\n\tint_field\x18\x02 \x01(\x03\x12\x13\n\x0b\x66loat_field\x18\x03 \x01(\x02\x12\x12\n\nbool_field\x18\x04 \x01(\x08\x12\x11\n\tstr_field\x18\x05 \x01(\t\x12\x11\n\tset_field\x18\x06 \x03(\x03\x12\x12\n\nlist_field\x18\x07 \x03(\t\x12i\n\ndict_field\x18\x08 \x03(\x0b\x32U.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel1.DictFieldEntry\x1a\x30\n\x0e\x44ictFieldEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\xb4\x02\n\nDataModel2\x12\x13\n\x0b\x62ytes_field\x18\x01 \x01(\x0c\x12\x11\n\tint_field\x18\x02 \x01(\x03\x12\x13\n\x0b\x66loat_field\x18\x03 \x01(\x02\x12\x12\n\nbool_field\x18\x04 \x01(\x08\x12\x11\n\tstr_field\x18\x05 \x01(\t\x12\x11\n\tset_field\x18\x06 \x03(\x03\x12\x12\n\nlist_field\x18\x07 \x03(\t\x12i\n\ndict_field\x18\x08 \x03(\x0b\x32U.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel2.DictFieldEntry\x1a\x30\n\x0e\x44ictFieldEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\xb4\x02\n\nDataModel3\x12\x13\n\x0b\x62ytes_field\x18\x01 \x01(\x0c\x12\x11\n\tint_field\x18\x02 \x01(\x03\x12\x13\n\x0b\x66loat_field\x18\x03 \x01(\x02\x12\x12\n\nbool_field\x18\x04 \x01(\x08\x12\x11\n\tstr_field\x18\x05 \x01(\t\x12\x11\n\tset_field\x18\x06 \x03(\x03\x12\x12\n\nlist_field\x18\x07 \x03(\t\x12i\n\ndict_field\x18\x08 \x03(\x0b\x32U.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel3.DictFieldEntry\x1a\x30\n\x0e\x44ictFieldEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\xb4\x02\n\nDataModel4\x12\x13\n\x0b\x62ytes_field\x18\x01 \x01(\x0c\x12\x11\n\tint_field\x18\x02 \x01(\x03\x12\x13\n\x0b\x66loat_field\x18\x03 \x01(\x02\x12\x12\n\nbool_field\x18\x04 \x01(\x08\x12\x11\n\tstr_field\x18\x05 \x01(\t\x12\x11\n\tset_field\x18\x06 \x03(\x03\x12\x12\n\nlist_field\x18\x07 \x03(\t\x12i\n\ndict_field\x18\x08 \x03(\x0b\x32U.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel4.DictFieldEntry\x1a\x30\n\x0e\x44ictFieldEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1ay\n\x1cPerformative_Ct_Performative\x12Y\n\ncontent_ct\x18\x01 \x01(\x0b\x32\x45.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel\x1a\x8c\x01\n\x1cPerformative_Pt_Performative\x12\x15\n\rcontent_bytes\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontent_int\x18\x02 \x01(\x05\x12\x15\n\rcontent_float\x18\x03 \x01(\x01\x12\x14\n\x0c\x63ontent_bool\x18\x04 \x01(\x08\x12\x13\n\x0b\x63ontent_str\x18\x05 \x01(\t\x1a\xa8\x02\n\x1dPerformative_Pct_Performative\x12\x19\n\x11\x63ontent_set_bytes\x18\x01 \x03(\x0c\x12\x17\n\x0f\x63ontent_set_int\x18\x02 \x03(\x05\x12\x19\n\x11\x63ontent_set_float\x18\x03 \x03(\x01\x12\x18\n\x10\x63ontent_set_bool\x18\x04 \x03(\x08\x12\x17\n\x0f\x63ontent_set_str\x18\x05 \x03(\t\x12\x1a\n\x12\x63ontent_list_bytes\x18\x06 \x03(\x0c\x12\x18\n\x10\x63ontent_list_int\x18\x07 \x03(\x05\x12\x1a\n\x12\x63ontent_list_float\x18\x08 \x03(\x01\x12\x19\n\x11\x63ontent_list_bool\x18\t \x03(\x08\x12\x18\n\x10\x63ontent_list_str\x18\n \x03(\t\x1a\xc0\x18\n\x1dPerformative_Pmt_Performative\x12\x92\x01\n\x16\x63ontent_dict_int_bytes\x18\x01 \x03(\x0b\x32r.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntBytesEntry\x12\x8e\x01\n\x14\x63ontent_dict_int_int\x18\x02 \x03(\x0b\x32p.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntIntEntry\x12\x92\x01\n\x16\x63ontent_dict_int_float\x18\x03 \x03(\x0b\x32r.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntFloatEntry\x12\x90\x01\n\x15\x63ontent_dict_int_bool\x18\x04 \x03(\x0b\x32q.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntBoolEntry\x12\x8e\x01\n\x14\x63ontent_dict_int_str\x18\x05 \x03(\x0b\x32p.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntStrEntry\x12\x94\x01\n\x17\x63ontent_dict_bool_bytes\x18\x06 \x03(\x0b\x32s.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolBytesEntry\x12\x90\x01\n\x15\x63ontent_dict_bool_int\x18\x07 \x03(\x0b\x32q.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolIntEntry\x12\x94\x01\n\x17\x63ontent_dict_bool_float\x18\x08 \x03(\x0b\x32s.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolFloatEntry\x12\x92\x01\n\x16\x63ontent_dict_bool_bool\x18\t \x03(\x0b\x32r.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolBoolEntry\x12\x90\x01\n\x15\x63ontent_dict_bool_str\x18\n \x03(\x0b\x32q.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolStrEntry\x12\x92\x01\n\x16\x63ontent_dict_str_bytes\x18\x0b \x03(\x0b\x32r.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrBytesEntry\x12\x8e\x01\n\x14\x63ontent_dict_str_int\x18\x0c \x03(\x0b\x32p.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrIntEntry\x12\x92\x01\n\x16\x63ontent_dict_str_float\x18\r \x03(\x0b\x32r.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrFloatEntry\x12\x90\x01\n\x15\x63ontent_dict_str_bool\x18\x0e \x03(\x0b\x32q.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrBoolEntry\x12\x8e\x01\n\x14\x63ontent_dict_str_str\x18\x0f \x03(\x0b\x32p.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrStrEntry\x1a:\n\x18\x43ontentDictIntBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x38\n\x16\x43ontentDictIntIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a:\n\x18\x43ontentDictIntFloatEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x39\n\x17\x43ontentDictIntBoolEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x38\n\x16\x43ontentDictIntStrEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a;\n\x19\x43ontentDictBoolBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x39\n\x17\x43ontentDictBoolIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a;\n\x19\x43ontentDictBoolFloatEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a:\n\x18\x43ontentDictBoolBoolEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x39\n\x17\x43ontentDictBoolStrEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18\x43ontentDictStrBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x38\n\x16\x43ontentDictStrIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a:\n\x18\x43ontentDictStrFloatEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x39\n\x17\x43ontentDictStrBoolEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x38\n\x16\x43ontentDictStrStrEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xdd\x16\n\x1cPerformative_Mt_Performative\x12o\n\x1f\x63ontent_union_1_type_DataModel1\x18\x01 \x01(\x0b\x32\x46.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel1\x12.\n&content_union_1_type_DataModel1_is_set\x18\x02 \x01(\x08\x12\"\n\x1a\x63ontent_union_1_type_bytes\x18\x03 \x01(\x0c\x12)\n!content_union_1_type_bytes_is_set\x18\x04 \x01(\x08\x12 \n\x18\x63ontent_union_1_type_int\x18\x05 \x01(\x05\x12'\n\x1f\x63ontent_union_1_type_int_is_set\x18\x06 \x01(\x08\x12\"\n\x1a\x63ontent_union_1_type_float\x18\x07 \x01(\x01\x12)\n!content_union_1_type_float_is_set\x18\x08 \x01(\x08\x12!\n\x19\x63ontent_union_1_type_bool\x18\t \x01(\x08\x12(\n content_union_1_type_bool_is_set\x18\n \x01(\x08\x12 \n\x18\x63ontent_union_1_type_str\x18\x0b \x01(\t\x12'\n\x1f\x63ontent_union_1_type_str_is_set\x18\x0c \x01(\x08\x12'\n\x1f\x63ontent_union_1_type_set_of_int\x18\r \x03(\x05\x12.\n&content_union_1_type_set_of_int_is_set\x18\x0e \x01(\x08\x12)\n!content_union_1_type_list_of_bool\x18\x0f \x03(\x08\x12\x30\n(content_union_1_type_list_of_bool_is_set\x18\x10 \x01(\x08\x12\xa9\x01\n$content_union_1_type_dict_of_str_int\x18\x11 \x03(\x0b\x32{.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative.ContentUnion1TypeDictOfStrIntEntry\x12\x33\n+content_union_1_type_dict_of_str_int_is_set\x18\x12 \x01(\x08\x12)\n!content_union_2_type_set_of_bytes\x18\x13 \x03(\x0c\x12\x30\n(content_union_2_type_set_of_bytes_is_set\x18\x14 \x01(\x08\x12'\n\x1f\x63ontent_union_2_type_set_of_int\x18\x15 \x03(\x05\x12.\n&content_union_2_type_set_of_int_is_set\x18\x16 \x01(\x08\x12'\n\x1f\x63ontent_union_2_type_set_of_str\x18\x17 \x03(\t\x12.\n&content_union_2_type_set_of_str_is_set\x18\x18 \x01(\x08\x12*\n\"content_union_2_type_list_of_float\x18\x19 \x03(\x01\x12\x31\n)content_union_2_type_list_of_float_is_set\x18\x1a \x01(\x08\x12)\n!content_union_2_type_list_of_bool\x18\x1b \x03(\x08\x12\x30\n(content_union_2_type_list_of_bool_is_set\x18\x1c \x01(\x08\x12*\n\"content_union_2_type_list_of_bytes\x18\x1d \x03(\x0c\x12\x31\n)content_union_2_type_list_of_bytes_is_set\x18\x1e \x01(\x08\x12\xa9\x01\n$content_union_2_type_dict_of_str_int\x18\x1f \x03(\x0b\x32{.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfStrIntEntry\x12\x33\n+content_union_2_type_dict_of_str_int_is_set\x18 \x01(\x08\x12\xad\x01\n&content_union_2_type_dict_of_int_float\x18! \x03(\x0b\x32}.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfIntFloatEntry\x12\x35\n-content_union_2_type_dict_of_int_float_is_set\x18\" \x01(\x08\x12\xaf\x01\n'content_union_2_type_dict_of_bool_bytes\x18# \x03(\x0b\x32~.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfBoolBytesEntry\x12\x36\n.content_union_2_type_dict_of_bool_bytes_is_set\x18$ \x01(\x08\x12 \n\x18\x63ontent_union_2_type_int\x18% \x01(\x05\x12'\n\x1f\x63ontent_union_2_type_int_is_set\x18& \x01(\x08\x12o\n\x1f\x63ontent_union_3_type_DataModel2\x18' \x01(\x0b\x32\x46.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel2\x12.\n&content_union_3_type_DataModel2_is_set\x18( \x01(\x08\x12o\n\x1f\x63ontent_union_3_type_DataModel3\x18) \x01(\x0b\x32\x46.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel3\x12.\n&content_union_3_type_DataModel3_is_set\x18* \x01(\x08\x1a\x44\n\"ContentUnion1TypeDictOfStrIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x44\n\"ContentUnion2TypeDictOfStrIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x46\n$ContentUnion2TypeDictOfIntFloatEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1aG\n%ContentUnion2TypeDictOfBoolBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\xc3\x04\n\x1bPerformative_O_Performative\x12\\\n\x0c\x63ontent_o_ct\x18\x01 \x01(\x0b\x32\x46.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel4\x12\x1b\n\x13\x63ontent_o_ct_is_set\x18\x02 \x01(\x08\x12\x16\n\x0e\x63ontent_o_bool\x18\x03 \x01(\x08\x12\x1d\n\x15\x63ontent_o_bool_is_set\x18\x04 \x01(\x08\x12\x19\n\x11\x63ontent_o_set_int\x18\x05 \x03(\x05\x12 \n\x18\x63ontent_o_set_int_is_set\x18\x06 \x01(\x08\x12\x1c\n\x14\x63ontent_o_list_bytes\x18\x07 \x03(\x0c\x12#\n\x1b\x63ontent_o_list_bytes_is_set\x18\x08 \x01(\x08\x12\x8f\x01\n\x16\x63ontent_o_dict_str_int\x18\t \x03(\x0b\x32o.aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_O_Performative.ContentODictStrIntEntry\x12%\n\x1d\x63ontent_o_dict_str_int_is_set\x18\n \x01(\x08\x1a\x39\n\x17\x43ontentODictStrIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a*\n(Performative_Empty_Contents_PerformativeB\x0e\n\x0cperformativeb\x06proto3" ) - -_TPROTOCOLMESSAGE = DESCRIPTOR.message_types_by_name["TProtocolMessage"] -_TPROTOCOLMESSAGE_DATAMODEL = _TPROTOCOLMESSAGE.nested_types_by_name["DataModel"] -_TPROTOCOLMESSAGE_DATAMODEL_DICTFIELDENTRY = ( - _TPROTOCOLMESSAGE_DATAMODEL.nested_types_by_name["DictFieldEntry"] -) -_TPROTOCOLMESSAGE_DATAMODEL1 = _TPROTOCOLMESSAGE.nested_types_by_name["DataModel1"] -_TPROTOCOLMESSAGE_DATAMODEL1_DICTFIELDENTRY = ( - _TPROTOCOLMESSAGE_DATAMODEL1.nested_types_by_name["DictFieldEntry"] -) -_TPROTOCOLMESSAGE_DATAMODEL2 = _TPROTOCOLMESSAGE.nested_types_by_name["DataModel2"] -_TPROTOCOLMESSAGE_DATAMODEL2_DICTFIELDENTRY = ( - _TPROTOCOLMESSAGE_DATAMODEL2.nested_types_by_name["DictFieldEntry"] -) -_TPROTOCOLMESSAGE_DATAMODEL3 = _TPROTOCOLMESSAGE.nested_types_by_name["DataModel3"] -_TPROTOCOLMESSAGE_DATAMODEL3_DICTFIELDENTRY = ( - _TPROTOCOLMESSAGE_DATAMODEL3.nested_types_by_name["DictFieldEntry"] -) -_TPROTOCOLMESSAGE_DATAMODEL4 = _TPROTOCOLMESSAGE.nested_types_by_name["DataModel4"] -_TPROTOCOLMESSAGE_DATAMODEL4_DICTFIELDENTRY = ( - _TPROTOCOLMESSAGE_DATAMODEL4.nested_types_by_name["DictFieldEntry"] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_CT_PERFORMATIVE = _TPROTOCOLMESSAGE.nested_types_by_name[ - "Performative_Ct_Performative" -] -_TPROTOCOLMESSAGE_PERFORMATIVE_PT_PERFORMATIVE = _TPROTOCOLMESSAGE.nested_types_by_name[ - "Performative_Pt_Performative" -] -_TPROTOCOLMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE = ( - _TPROTOCOLMESSAGE.nested_types_by_name["Performative_Pct_Performative"] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE = ( - _TPROTOCOLMESSAGE.nested_types_by_name["Performative_Pmt_Performative"] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntBytesEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntIntEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntFloatEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntBoolEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntStrEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolBytesEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolIntEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolFloatEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolBoolEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolStrEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrBytesEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrIntEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrFloatEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrBoolEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrStrEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE = _TPROTOCOLMESSAGE.nested_types_by_name[ - "Performative_Mt_Performative" -] -_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE.nested_types_by_name[ - "ContentUnion1TypeDictOfStrIntEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE.nested_types_by_name[ - "ContentUnion2TypeDictOfStrIntEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE.nested_types_by_name[ - "ContentUnion2TypeDictOfIntFloatEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE.nested_types_by_name[ - "ContentUnion2TypeDictOfBoolBytesEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE = _TPROTOCOLMESSAGE.nested_types_by_name[ - "Performative_O_Performative" -] -_TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY = ( - _TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE.nested_types_by_name[ - "ContentODictStrIntEntry" - ] -) -_TPROTOCOLMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE = ( - _TPROTOCOLMESSAGE.nested_types_by_name["Performative_Empty_Contents_Performative"] -) -TProtocolMessage = _reflection.GeneratedProtocolMessageType( - "TProtocolMessage", - (_message.Message,), - { - "DataModel": _reflection.GeneratedProtocolMessageType( - "DataModel", - (_message.Message,), - { - "DictFieldEntry": _reflection.GeneratedProtocolMessageType( - "DictFieldEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL_DICTFIELDENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel.DictFieldEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel) - }, - ), - "DataModel1": _reflection.GeneratedProtocolMessageType( - "DataModel1", - (_message.Message,), - { - "DictFieldEntry": _reflection.GeneratedProtocolMessageType( - "DictFieldEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL1_DICTFIELDENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel1.DictFieldEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL1, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel1) - }, - ), - "DataModel2": _reflection.GeneratedProtocolMessageType( - "DataModel2", - (_message.Message,), - { - "DictFieldEntry": _reflection.GeneratedProtocolMessageType( - "DictFieldEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL2_DICTFIELDENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel2.DictFieldEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL2, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel2) - }, - ), - "DataModel3": _reflection.GeneratedProtocolMessageType( - "DataModel3", - (_message.Message,), - { - "DictFieldEntry": _reflection.GeneratedProtocolMessageType( - "DictFieldEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL3_DICTFIELDENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel3.DictFieldEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL3, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel3) - }, - ), - "DataModel4": _reflection.GeneratedProtocolMessageType( - "DataModel4", - (_message.Message,), - { - "DictFieldEntry": _reflection.GeneratedProtocolMessageType( - "DictFieldEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL4_DICTFIELDENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel4.DictFieldEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE_DATAMODEL4, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.DataModel4) - }, - ), - "Performative_Ct_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Ct_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_CT_PERFORMATIVE, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Ct_Performative) - }, - ), - "Performative_Pt_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Pt_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PT_PERFORMATIVE, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pt_Performative) - }, - ), - "Performative_Pct_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Pct_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pct_Performative) - }, - ), - "Performative_Pmt_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Pmt_Performative", - (_message.Message,), - { - "ContentDictIntBytesEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntBytesEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntBytesEntry) - }, - ), - "ContentDictIntIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntIntEntry) - }, - ), - "ContentDictIntFloatEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntFloatEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntFloatEntry) - }, - ), - "ContentDictIntBoolEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntBoolEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntBoolEntry) - }, - ), - "ContentDictIntStrEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntStrEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictIntStrEntry) - }, - ), - "ContentDictBoolBytesEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolBytesEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolBytesEntry) - }, - ), - "ContentDictBoolIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolIntEntry) - }, - ), - "ContentDictBoolFloatEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolFloatEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolFloatEntry) - }, - ), - "ContentDictBoolBoolEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolBoolEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolBoolEntry) - }, - ), - "ContentDictBoolStrEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolStrEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolStrEntry) - }, - ), - "ContentDictStrBytesEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrBytesEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrBytesEntry) - }, - ), - "ContentDictStrIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrIntEntry) - }, - ), - "ContentDictStrFloatEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrFloatEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrFloatEntry) - }, - ), - "ContentDictStrBoolEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrBoolEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrBoolEntry) - }, - ), - "ContentDictStrStrEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrStrEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative.ContentDictStrStrEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Pmt_Performative) - }, - ), - "Performative_Mt_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Mt_Performative", - (_message.Message,), - { - "ContentUnion1TypeDictOfStrIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentUnion1TypeDictOfStrIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative.ContentUnion1TypeDictOfStrIntEntry) - }, - ), - "ContentUnion2TypeDictOfStrIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentUnion2TypeDictOfStrIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfStrIntEntry) - }, - ), - "ContentUnion2TypeDictOfIntFloatEntry": _reflection.GeneratedProtocolMessageType( - "ContentUnion2TypeDictOfIntFloatEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfIntFloatEntry) - }, - ), - "ContentUnion2TypeDictOfBoolBytesEntry": _reflection.GeneratedProtocolMessageType( - "ContentUnion2TypeDictOfBoolBytesEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfBoolBytesEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Mt_Performative) - }, - ), - "Performative_O_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_O_Performative", - (_message.Message,), - { - "ContentODictStrIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentODictStrIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_O_Performative.ContentODictStrIntEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_O_Performative) - }, - ), - "Performative_Empty_Contents_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Empty_Contents_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage.Performative_Empty_Contents_Performative) - }, - ), - "DESCRIPTOR": _TPROTOCOLMESSAGE, - "__module__": "t_protocol_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolMessage) - }, -) -_sym_db.RegisterMessage(TProtocolMessage) -_sym_db.RegisterMessage(TProtocolMessage.DataModel) -_sym_db.RegisterMessage(TProtocolMessage.DataModel.DictFieldEntry) -_sym_db.RegisterMessage(TProtocolMessage.DataModel1) -_sym_db.RegisterMessage(TProtocolMessage.DataModel1.DictFieldEntry) -_sym_db.RegisterMessage(TProtocolMessage.DataModel2) -_sym_db.RegisterMessage(TProtocolMessage.DataModel2.DictFieldEntry) -_sym_db.RegisterMessage(TProtocolMessage.DataModel3) -_sym_db.RegisterMessage(TProtocolMessage.DataModel3.DictFieldEntry) -_sym_db.RegisterMessage(TProtocolMessage.DataModel4) -_sym_db.RegisterMessage(TProtocolMessage.DataModel4.DictFieldEntry) -_sym_db.RegisterMessage(TProtocolMessage.Performative_Ct_Performative) -_sym_db.RegisterMessage(TProtocolMessage.Performative_Pt_Performative) -_sym_db.RegisterMessage(TProtocolMessage.Performative_Pct_Performative) -_sym_db.RegisterMessage(TProtocolMessage.Performative_Pmt_Performative) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictIntBytesEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictIntIntEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictIntFloatEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictIntBoolEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictIntStrEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolBytesEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolIntEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolFloatEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolBoolEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictBoolStrEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictStrBytesEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictStrIntEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictStrFloatEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictStrBoolEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Pmt_Performative.ContentDictStrStrEntry -) -_sym_db.RegisterMessage(TProtocolMessage.Performative_Mt_Performative) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Mt_Performative.ContentUnion1TypeDictOfStrIntEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfStrIntEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfIntFloatEntry -) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfBoolBytesEntry -) -_sym_db.RegisterMessage(TProtocolMessage.Performative_O_Performative) -_sym_db.RegisterMessage( - TProtocolMessage.Performative_O_Performative.ContentODictStrIntEntry -) -_sym_db.RegisterMessage(TProtocolMessage.Performative_Empty_Contents_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "t_protocol_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _TPROTOCOLMESSAGE_DATAMODEL_DICTFIELDENTRY._options = None _TPROTOCOLMESSAGE_DATAMODEL_DICTFIELDENTRY._serialized_options = b"8\001" @@ -714,160 +151,164 @@ _TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY._serialized_options = ( b"8\001" ) - _TPROTOCOLMESSAGE._serialized_start = 64 - _TPROTOCOLMESSAGE._serialized_end = 9739 - _TPROTOCOLMESSAGE_DATAMODEL._serialized_start = 931 - _TPROTOCOLMESSAGE_DATAMODEL._serialized_end = 1237 - _TPROTOCOLMESSAGE_DATAMODEL_DICTFIELDENTRY._serialized_start = 1189 - _TPROTOCOLMESSAGE_DATAMODEL_DICTFIELDENTRY._serialized_end = 1237 - _TPROTOCOLMESSAGE_DATAMODEL1._serialized_start = 1240 - _TPROTOCOLMESSAGE_DATAMODEL1._serialized_end = 1548 - _TPROTOCOLMESSAGE_DATAMODEL1_DICTFIELDENTRY._serialized_start = 1189 - _TPROTOCOLMESSAGE_DATAMODEL1_DICTFIELDENTRY._serialized_end = 1237 - _TPROTOCOLMESSAGE_DATAMODEL2._serialized_start = 1551 - _TPROTOCOLMESSAGE_DATAMODEL2._serialized_end = 1859 - _TPROTOCOLMESSAGE_DATAMODEL2_DICTFIELDENTRY._serialized_start = 1189 - _TPROTOCOLMESSAGE_DATAMODEL2_DICTFIELDENTRY._serialized_end = 1237 - _TPROTOCOLMESSAGE_DATAMODEL3._serialized_start = 1862 - _TPROTOCOLMESSAGE_DATAMODEL3._serialized_end = 2170 - _TPROTOCOLMESSAGE_DATAMODEL3_DICTFIELDENTRY._serialized_start = 1189 - _TPROTOCOLMESSAGE_DATAMODEL3_DICTFIELDENTRY._serialized_end = 1237 - _TPROTOCOLMESSAGE_DATAMODEL4._serialized_start = 2173 - _TPROTOCOLMESSAGE_DATAMODEL4._serialized_end = 2481 - _TPROTOCOLMESSAGE_DATAMODEL4_DICTFIELDENTRY._serialized_start = 1189 - _TPROTOCOLMESSAGE_DATAMODEL4_DICTFIELDENTRY._serialized_end = 1237 - _TPROTOCOLMESSAGE_PERFORMATIVE_CT_PERFORMATIVE._serialized_start = 2483 - _TPROTOCOLMESSAGE_PERFORMATIVE_CT_PERFORMATIVE._serialized_end = 2604 - _TPROTOCOLMESSAGE_PERFORMATIVE_PT_PERFORMATIVE._serialized_start = 2607 - _TPROTOCOLMESSAGE_PERFORMATIVE_PT_PERFORMATIVE._serialized_end = 2747 - _TPROTOCOLMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE._serialized_start = 2750 - _TPROTOCOLMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE._serialized_end = 3046 - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE._serialized_start = 3049 - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE._serialized_end = 6185 - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY._serialized_start = ( - 5297 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY._serialized_end = ( - 5355 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY._serialized_start = ( - 5357 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY._serialized_end = ( - 5413 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY._serialized_start = ( - 5415 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY._serialized_end = ( - 5473 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY._serialized_start = ( - 5475 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY._serialized_end = ( - 5532 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY._serialized_start = ( - 5534 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY._serialized_end = ( - 5590 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY._serialized_start = ( - 5592 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY._serialized_end = ( - 5651 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY._serialized_start = ( - 5653 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY._serialized_end = ( - 5710 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY._serialized_start = ( - 5712 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY._serialized_end = ( - 5771 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY._serialized_start = ( - 5773 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY._serialized_end = ( - 5831 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY._serialized_start = ( - 5833 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY._serialized_end = ( - 5890 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY._serialized_start = ( - 5892 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY._serialized_end = ( - 5950 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY._serialized_start = ( - 5952 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY._serialized_end = ( - 6008 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY._serialized_start = ( - 6010 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY._serialized_end = ( - 6068 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY._serialized_start = ( - 6070 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY._serialized_end = ( - 6127 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY._serialized_start = ( - 6129 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY._serialized_end = ( - 6185 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE._serialized_start = 6188 - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE._serialized_end = 9097 - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY._serialized_start = ( - 8814 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY._serialized_end = ( - 8882 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY._serialized_start = ( - 8884 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY._serialized_end = ( - 8952 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY._serialized_start = ( - 8954 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY._serialized_end = ( - 9024 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY._serialized_start = ( - 9026 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY._serialized_end = ( - 9097 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE._serialized_start = 9100 - _TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE._serialized_end = 9679 - _TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY._serialized_start = ( - 9622 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY._serialized_end = ( - 9679 - ) - _TPROTOCOLMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE._serialized_start = 9681 - _TPROTOCOLMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE._serialized_end = 9723 + _globals["_TPROTOCOLMESSAGE"]._serialized_start = 64 + _globals["_TPROTOCOLMESSAGE"]._serialized_end = 9739 + _globals["_TPROTOCOLMESSAGE_DATAMODEL"]._serialized_start = 931 + _globals["_TPROTOCOLMESSAGE_DATAMODEL"]._serialized_end = 1237 + _globals["_TPROTOCOLMESSAGE_DATAMODEL_DICTFIELDENTRY"]._serialized_start = 1189 + _globals["_TPROTOCOLMESSAGE_DATAMODEL_DICTFIELDENTRY"]._serialized_end = 1237 + _globals["_TPROTOCOLMESSAGE_DATAMODEL1"]._serialized_start = 1240 + _globals["_TPROTOCOLMESSAGE_DATAMODEL1"]._serialized_end = 1548 + _globals["_TPROTOCOLMESSAGE_DATAMODEL1_DICTFIELDENTRY"]._serialized_start = 1189 + _globals["_TPROTOCOLMESSAGE_DATAMODEL1_DICTFIELDENTRY"]._serialized_end = 1237 + _globals["_TPROTOCOLMESSAGE_DATAMODEL2"]._serialized_start = 1551 + _globals["_TPROTOCOLMESSAGE_DATAMODEL2"]._serialized_end = 1859 + _globals["_TPROTOCOLMESSAGE_DATAMODEL2_DICTFIELDENTRY"]._serialized_start = 1189 + _globals["_TPROTOCOLMESSAGE_DATAMODEL2_DICTFIELDENTRY"]._serialized_end = 1237 + _globals["_TPROTOCOLMESSAGE_DATAMODEL3"]._serialized_start = 1862 + _globals["_TPROTOCOLMESSAGE_DATAMODEL3"]._serialized_end = 2170 + _globals["_TPROTOCOLMESSAGE_DATAMODEL3_DICTFIELDENTRY"]._serialized_start = 1189 + _globals["_TPROTOCOLMESSAGE_DATAMODEL3_DICTFIELDENTRY"]._serialized_end = 1237 + _globals["_TPROTOCOLMESSAGE_DATAMODEL4"]._serialized_start = 2173 + _globals["_TPROTOCOLMESSAGE_DATAMODEL4"]._serialized_end = 2481 + _globals["_TPROTOCOLMESSAGE_DATAMODEL4_DICTFIELDENTRY"]._serialized_start = 1189 + _globals["_TPROTOCOLMESSAGE_DATAMODEL4_DICTFIELDENTRY"]._serialized_end = 1237 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_CT_PERFORMATIVE"]._serialized_start = 2483 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_CT_PERFORMATIVE"]._serialized_end = 2604 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_PT_PERFORMATIVE"]._serialized_start = 2607 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_PT_PERFORMATIVE"]._serialized_end = 2747 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE"]._serialized_start = 2750 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE"]._serialized_end = 3046 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE"]._serialized_start = 3049 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE"]._serialized_end = 6185 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY" + ]._serialized_start = 5297 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY" + ]._serialized_end = 5355 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY" + ]._serialized_start = 5357 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY" + ]._serialized_end = 5413 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY" + ]._serialized_start = 5415 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY" + ]._serialized_end = 5473 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY" + ]._serialized_start = 5475 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY" + ]._serialized_end = 5532 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY" + ]._serialized_start = 5534 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY" + ]._serialized_end = 5590 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY" + ]._serialized_start = 5592 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY" + ]._serialized_end = 5651 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY" + ]._serialized_start = 5653 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY" + ]._serialized_end = 5710 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY" + ]._serialized_start = 5712 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY" + ]._serialized_end = 5771 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY" + ]._serialized_start = 5773 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY" + ]._serialized_end = 5831 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY" + ]._serialized_start = 5833 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY" + ]._serialized_end = 5890 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY" + ]._serialized_start = 5892 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY" + ]._serialized_end = 5950 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY" + ]._serialized_start = 5952 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY" + ]._serialized_end = 6008 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY" + ]._serialized_start = 6010 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY" + ]._serialized_end = 6068 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY" + ]._serialized_start = 6070 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY" + ]._serialized_end = 6127 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY" + ]._serialized_start = 6129 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY" + ]._serialized_end = 6185 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE"]._serialized_start = 6188 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE"]._serialized_end = 9097 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY" + ]._serialized_start = 8814 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY" + ]._serialized_end = 8882 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY" + ]._serialized_start = 8884 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY" + ]._serialized_end = 8952 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY" + ]._serialized_start = 8954 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY" + ]._serialized_end = 9024 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY" + ]._serialized_start = 9026 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY" + ]._serialized_end = 9097 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE"]._serialized_start = 9100 + _globals["_TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE"]._serialized_end = 9679 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY" + ]._serialized_start = 9622 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY" + ]._serialized_end = 9679 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE" + ]._serialized_start = 9681 + _globals[ + "_TPROTOCOLMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE" + ]._serialized_end = 9723 # @@protoc_insertion_point(module_scope) diff --git a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/__init__.py b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/__init__.py index 5b6e6d113f..1b5e48ad25 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/__init__.py +++ b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/__init__.py @@ -20,7 +20,7 @@ """ This module contains the support resources for the t_protocol_no_ct protocol. -It was created with protocol buffer compiler version `libprotoc 3.19.4` and aea protocol generator version `1.0.0`. +It was created with protocol buffer compiler version `libprotoc 24.3` and aea protocol generator version `1.0.0`. """ from tests.data.packages.fetchai.protocols.t_protocol_no_ct.message import ( diff --git a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/message.py b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/message.py index 5e7f1d40b4..d5fed1bdd0 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/message.py +++ b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/message.py @@ -25,7 +25,7 @@ from aea.configurations.base import PublicId from aea.exceptions import AEAEnforceError, enforce -from aea.protocols.base import Message +from aea.protocols.base import Message # type: ignore _default_logger = logging.getLogger( diff --git a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/protocol.yaml b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/protocol.yaml index 56c309a67e..f9d601b0a9 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/protocol.yaml +++ b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/protocol.yaml @@ -8,12 +8,12 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeiapuowiqkverwcuzbdbqf2u3aixc3vgcfzsy6ckl27m5dxwtmaz3e - __init__.py: bafybeibjqe7cavhtwspu6hv3fx7drwemu6f67k5uc7esryoh6kghexyj3u + __init__.py: bafybeibsiwhh6shbtmvl3s5xmbsxyamohh7geewxtzdxc3jhk54z5exzmm dialogues.py: bafybeialxh6rperez5hpn3z27ecxqcl3e5pslhked76gqegxipgrrqkvwi - message.py: bafybeihhiun4cf5dz4pwvjtllretuy7zenn4elw76qedlmw7ykgkd7gkmy - serialization.py: bafybeiebpotkyc6vbhhbwqpmw6scax3yr4g7graygt5kfyocamwwyf6rju + message.py: bafybeiectudfpllanfbsktou44wdhccvmsun6bb6funlnsccr4ayn266oy + serialization.py: bafybeihnocktzigawqujdnsyirckj3vryj4c4u733k4wnwefiik2umxxaq t_protocol_no_ct.proto: bafybeietptuflcrk6bh3zc4kn5efqt2ygpmtmpv66m7pmkmf3renn3yujy - t_protocol_no_ct_pb2.py: bafybeiedrwmywhzlhvfnw5qp3bxsmqh7kng5xlv2oqjrtrqg3tctqmdf34 + t_protocol_no_ct_pb2.py: bafybeicpanqktvtfjkigvgp65qja7xewlxsuxqcrkximns3nsiry5bqmmy tests/test_t_protocol_no_ct_dialogues.py: bafybeiaxlzdqlexxvdexe6kjom3zgweqe4yofl55fvnff2ym6a5ourbaxa tests/test_t_protocol_no_ct_messages.py: bafybeihdkuilfrhtkijrn2dqp6z3oqeeqqkyjqcfo5dj3j5weldhdvyaby fingerprint_ignore_patterns: [] diff --git a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/serialization.py b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/serialization.py index 7613f3c902..53f5551cd1 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/serialization.py +++ b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/serialization.py @@ -22,12 +22,15 @@ # pylint: disable=too-many-statements,too-many-locals,no-member,too-few-public-methods,redefined-builtin from typing import Any, Dict, cast -from aea.mail.base_pb2 import DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage -from aea.protocols.base import Message, Serializer +from aea.mail.base_pb2 import DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore +from aea.protocols.base import Message # type: ignore +from aea.protocols.base import Serializer # type: ignore -from tests.data.packages.fetchai.protocols.t_protocol_no_ct import t_protocol_no_ct_pb2 -from tests.data.packages.fetchai.protocols.t_protocol_no_ct.message import ( +from tests.data.packages.fetchai.protocols.t_protocol_no_ct import ( # type: ignore + t_protocol_no_ct_pb2, +) +from tests.data.packages.fetchai.protocols.t_protocol_no_ct.message import ( # type: ignore TProtocolNoCtMessage, ) @@ -46,7 +49,7 @@ def encode(msg: Message) -> bytes: msg = cast(TProtocolNoCtMessage, msg) message_pb = ProtobufMessage() dialogue_message_pb = DialogueMessage() - t_protocol_no_ct_msg = t_protocol_no_ct_pb2.TProtocolNoCtMessage() + t_protocol_no_ct_msg = t_protocol_no_ct_pb2.TProtocolNoCtMessage() # type: ignore dialogue_message_pb.message_id = msg.message_id dialogue_reference = msg.dialogue_reference @@ -306,7 +309,7 @@ def decode(obj: bytes) -> Message: :return: the 'TProtocolNoCt' message. """ message_pb = ProtobufMessage() - t_protocol_no_ct_pb = t_protocol_no_ct_pb2.TProtocolNoCtMessage() + t_protocol_no_ct_pb = t_protocol_no_ct_pb2.TProtocolNoCtMessage() # type: ignore message_pb.ParseFromString(obj) message_id = message_pb.dialogue_message.message_id dialogue_reference = ( diff --git a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/t_protocol_no_ct_pb2.py b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/t_protocol_no_ct_pb2.py index cc23ef3913..89025de969 100644 --- a/tests/data/packages/fetchai/protocols/t_protocol_no_ct/t_protocol_no_ct_pb2.py +++ b/tests/data/packages/fetchai/protocols/t_protocol_no_ct/t_protocol_no_ct_pb2.py @@ -4,9 +4,8 @@ """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) @@ -17,433 +16,10 @@ b'\n\x16t_protocol_no_ct.proto\x12)aea.some_author.some_protocol_name.v1_0_0"\x8f\x39\n\x14TProtocolNoCtMessage\x12\x8f\x01\n\x1bperformative_empty_contents\x18\x05 \x01(\x0b\x32h.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Empty_Contents_PerformativeH\x00\x12w\n\x0fperformative_mt\x18\x06 \x01(\x0b\x32\\.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_PerformativeH\x00\x12u\n\x0eperformative_o\x18\x07 \x01(\x0b\x32[.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_O_PerformativeH\x00\x12y\n\x10performative_pct\x18\x08 \x01(\x0b\x32].aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pct_PerformativeH\x00\x12y\n\x10performative_pmt\x18\t \x01(\x0b\x32].aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_PerformativeH\x00\x12w\n\x0fperformative_pt\x18\n \x01(\x0b\x32\\.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pt_PerformativeH\x00\x1a\x8c\x01\n\x1cPerformative_Pt_Performative\x12\x15\n\rcontent_bytes\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontent_int\x18\x02 \x01(\x05\x12\x15\n\rcontent_float\x18\x03 \x01(\x01\x12\x14\n\x0c\x63ontent_bool\x18\x04 \x01(\x08\x12\x13\n\x0b\x63ontent_str\x18\x05 \x01(\t\x1a\xa8\x02\n\x1dPerformative_Pct_Performative\x12\x19\n\x11\x63ontent_set_bytes\x18\x01 \x03(\x0c\x12\x17\n\x0f\x63ontent_set_int\x18\x02 \x03(\x05\x12\x19\n\x11\x63ontent_set_float\x18\x03 \x03(\x01\x12\x18\n\x10\x63ontent_set_bool\x18\x04 \x03(\x08\x12\x17\n\x0f\x63ontent_set_str\x18\x05 \x03(\t\x12\x1a\n\x12\x63ontent_list_bytes\x18\x06 \x03(\x0c\x12\x18\n\x10\x63ontent_list_int\x18\x07 \x03(\x05\x12\x1a\n\x12\x63ontent_list_float\x18\x08 \x03(\x01\x12\x19\n\x11\x63ontent_list_bool\x18\t \x03(\x08\x12\x18\n\x10\x63ontent_list_str\x18\n \x03(\t\x1a\xfc\x18\n\x1dPerformative_Pmt_Performative\x12\x96\x01\n\x16\x63ontent_dict_int_bytes\x18\x01 \x03(\x0b\x32v.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntBytesEntry\x12\x92\x01\n\x14\x63ontent_dict_int_int\x18\x02 \x03(\x0b\x32t.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntIntEntry\x12\x96\x01\n\x16\x63ontent_dict_int_float\x18\x03 \x03(\x0b\x32v.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntFloatEntry\x12\x94\x01\n\x15\x63ontent_dict_int_bool\x18\x04 \x03(\x0b\x32u.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntBoolEntry\x12\x92\x01\n\x14\x63ontent_dict_int_str\x18\x05 \x03(\x0b\x32t.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntStrEntry\x12\x98\x01\n\x17\x63ontent_dict_bool_bytes\x18\x06 \x03(\x0b\x32w.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolBytesEntry\x12\x94\x01\n\x15\x63ontent_dict_bool_int\x18\x07 \x03(\x0b\x32u.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolIntEntry\x12\x98\x01\n\x17\x63ontent_dict_bool_float\x18\x08 \x03(\x0b\x32w.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolFloatEntry\x12\x96\x01\n\x16\x63ontent_dict_bool_bool\x18\t \x03(\x0b\x32v.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolBoolEntry\x12\x94\x01\n\x15\x63ontent_dict_bool_str\x18\n \x03(\x0b\x32u.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolStrEntry\x12\x96\x01\n\x16\x63ontent_dict_str_bytes\x18\x0b \x03(\x0b\x32v.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrBytesEntry\x12\x92\x01\n\x14\x63ontent_dict_str_int\x18\x0c \x03(\x0b\x32t.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrIntEntry\x12\x96\x01\n\x16\x63ontent_dict_str_float\x18\r \x03(\x0b\x32v.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrFloatEntry\x12\x94\x01\n\x15\x63ontent_dict_str_bool\x18\x0e \x03(\x0b\x32u.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrBoolEntry\x12\x92\x01\n\x14\x63ontent_dict_str_str\x18\x0f \x03(\x0b\x32t.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrStrEntry\x1a:\n\x18\x43ontentDictIntBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x38\n\x16\x43ontentDictIntIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a:\n\x18\x43ontentDictIntFloatEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x39\n\x17\x43ontentDictIntBoolEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x38\n\x16\x43ontentDictIntStrEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a;\n\x19\x43ontentDictBoolBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x39\n\x17\x43ontentDictBoolIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a;\n\x19\x43ontentDictBoolFloatEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a:\n\x18\x43ontentDictBoolBoolEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x39\n\x17\x43ontentDictBoolStrEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a:\n\x18\x43ontentDictStrBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\x38\n\x16\x43ontentDictStrIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a:\n\x18\x43ontentDictStrFloatEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1a\x39\n\x17\x43ontentDictStrBoolEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x1a\x38\n\x16\x43ontentDictStrStrEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xc1\x12\n\x1cPerformative_Mt_Performative\x12"\n\x1a\x63ontent_union_1_type_bytes\x18\x01 \x01(\x0c\x12)\n!content_union_1_type_bytes_is_set\x18\x02 \x01(\x08\x12 \n\x18\x63ontent_union_1_type_int\x18\x03 \x01(\x05\x12\'\n\x1f\x63ontent_union_1_type_int_is_set\x18\x04 \x01(\x08\x12"\n\x1a\x63ontent_union_1_type_float\x18\x05 \x01(\x01\x12)\n!content_union_1_type_float_is_set\x18\x06 \x01(\x08\x12!\n\x19\x63ontent_union_1_type_bool\x18\x07 \x01(\x08\x12(\n content_union_1_type_bool_is_set\x18\x08 \x01(\x08\x12 \n\x18\x63ontent_union_1_type_str\x18\t \x01(\t\x12\'\n\x1f\x63ontent_union_1_type_str_is_set\x18\n \x01(\x08\x12\'\n\x1f\x63ontent_union_1_type_set_of_int\x18\x0b \x03(\x05\x12.\n&content_union_1_type_set_of_int_is_set\x18\x0c \x01(\x08\x12)\n!content_union_1_type_list_of_bool\x18\r \x03(\x08\x12\x30\n(content_union_1_type_list_of_bool_is_set\x18\x0e \x01(\x08\x12\xad\x01\n$content_union_1_type_dict_of_str_int\x18\x0f \x03(\x0b\x32\x7f.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion1TypeDictOfStrIntEntry\x12\x33\n+content_union_1_type_dict_of_str_int_is_set\x18\x10 \x01(\x08\x12)\n!content_union_2_type_set_of_bytes\x18\x11 \x03(\x0c\x12\x30\n(content_union_2_type_set_of_bytes_is_set\x18\x12 \x01(\x08\x12\'\n\x1f\x63ontent_union_2_type_set_of_int\x18\x13 \x03(\x05\x12.\n&content_union_2_type_set_of_int_is_set\x18\x14 \x01(\x08\x12\'\n\x1f\x63ontent_union_2_type_set_of_str\x18\x15 \x03(\t\x12.\n&content_union_2_type_set_of_str_is_set\x18\x16 \x01(\x08\x12*\n"content_union_2_type_list_of_float\x18\x17 \x03(\x01\x12\x31\n)content_union_2_type_list_of_float_is_set\x18\x18 \x01(\x08\x12)\n!content_union_2_type_list_of_bool\x18\x19 \x03(\x08\x12\x30\n(content_union_2_type_list_of_bool_is_set\x18\x1a \x01(\x08\x12*\n"content_union_2_type_list_of_bytes\x18\x1b \x03(\x0c\x12\x31\n)content_union_2_type_list_of_bytes_is_set\x18\x1c \x01(\x08\x12\xad\x01\n$content_union_2_type_dict_of_str_int\x18\x1d \x03(\x0b\x32\x7f.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfStrIntEntry\x12\x33\n+content_union_2_type_dict_of_str_int_is_set\x18\x1e \x01(\x08\x12\xb2\x01\n&content_union_2_type_dict_of_int_float\x18\x1f \x03(\x0b\x32\x81\x01.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfIntFloatEntry\x12\x35\n-content_union_2_type_dict_of_int_float_is_set\x18 \x01(\x08\x12\xb4\x01\n\'content_union_2_type_dict_of_bool_bytes\x18! \x03(\x0b\x32\x82\x01.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfBoolBytesEntry\x12\x36\n.content_union_2_type_dict_of_bool_bytes_is_set\x18" \x01(\x08\x1a\x44\n"ContentUnion1TypeDictOfStrIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x44\n"ContentUnion2TypeDictOfStrIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a\x46\n$ContentUnion2TypeDictOfIntFloatEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x01:\x02\x38\x01\x1aG\n%ContentUnion2TypeDictOfBoolBytesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x08\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x1a\xcc\x03\n\x1bPerformative_O_Performative\x12\x16\n\x0e\x63ontent_o_bool\x18\x01 \x01(\x08\x12\x1d\n\x15\x63ontent_o_bool_is_set\x18\x02 \x01(\x08\x12\x19\n\x11\x63ontent_o_set_int\x18\x03 \x03(\x05\x12 \n\x18\x63ontent_o_set_int_is_set\x18\x04 \x01(\x08\x12\x1c\n\x14\x63ontent_o_list_bytes\x18\x05 \x03(\x0c\x12#\n\x1b\x63ontent_o_list_bytes_is_set\x18\x06 \x01(\x08\x12\x93\x01\n\x16\x63ontent_o_dict_str_int\x18\x07 \x03(\x0b\x32s.aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_O_Performative.ContentODictStrIntEntry\x12%\n\x1d\x63ontent_o_dict_str_int_is_set\x18\x08 \x01(\x08\x1a\x39\n\x17\x43ontentODictStrIntEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x1a*\n(Performative_Empty_Contents_PerformativeB\x0e\n\x0cperformativeb\x06proto3' ) - -_TPROTOCOLNOCTMESSAGE = DESCRIPTOR.message_types_by_name["TProtocolNoCtMessage"] -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PT_PERFORMATIVE = ( - _TPROTOCOLNOCTMESSAGE.nested_types_by_name["Performative_Pt_Performative"] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE = ( - _TPROTOCOLNOCTMESSAGE.nested_types_by_name["Performative_Pct_Performative"] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE = ( - _TPROTOCOLNOCTMESSAGE.nested_types_by_name["Performative_Pmt_Performative"] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntBytesEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntIntEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntFloatEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntBoolEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictIntStrEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolBytesEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolIntEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolFloatEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolBoolEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictBoolStrEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrBytesEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrIntEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrFloatEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrBoolEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE.nested_types_by_name[ - "ContentDictStrStrEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE = ( - _TPROTOCOLNOCTMESSAGE.nested_types_by_name["Performative_Mt_Performative"] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY = _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE.nested_types_by_name[ - "ContentUnion1TypeDictOfStrIntEntry" -] -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY = _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE.nested_types_by_name[ - "ContentUnion2TypeDictOfStrIntEntry" -] -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY = _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE.nested_types_by_name[ - "ContentUnion2TypeDictOfIntFloatEntry" -] -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY = _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE.nested_types_by_name[ - "ContentUnion2TypeDictOfBoolBytesEntry" -] -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE = ( - _TPROTOCOLNOCTMESSAGE.nested_types_by_name["Performative_O_Performative"] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY = ( - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE.nested_types_by_name[ - "ContentODictStrIntEntry" - ] -) -_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE = ( - _TPROTOCOLNOCTMESSAGE.nested_types_by_name[ - "Performative_Empty_Contents_Performative" - ] -) -TProtocolNoCtMessage = _reflection.GeneratedProtocolMessageType( - "TProtocolNoCtMessage", - (_message.Message,), - { - "Performative_Pt_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Pt_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PT_PERFORMATIVE, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pt_Performative) - }, - ), - "Performative_Pct_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Pct_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pct_Performative) - }, - ), - "Performative_Pmt_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Pmt_Performative", - (_message.Message,), - { - "ContentDictIntBytesEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntBytesEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntBytesEntry) - }, - ), - "ContentDictIntIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntIntEntry) - }, - ), - "ContentDictIntFloatEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntFloatEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntFloatEntry) - }, - ), - "ContentDictIntBoolEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntBoolEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntBoolEntry) - }, - ), - "ContentDictIntStrEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictIntStrEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntStrEntry) - }, - ), - "ContentDictBoolBytesEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolBytesEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolBytesEntry) - }, - ), - "ContentDictBoolIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolIntEntry) - }, - ), - "ContentDictBoolFloatEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolFloatEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolFloatEntry) - }, - ), - "ContentDictBoolBoolEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolBoolEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolBoolEntry) - }, - ), - "ContentDictBoolStrEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictBoolStrEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolStrEntry) - }, - ), - "ContentDictStrBytesEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrBytesEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrBytesEntry) - }, - ), - "ContentDictStrIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrIntEntry) - }, - ), - "ContentDictStrFloatEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrFloatEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrFloatEntry) - }, - ), - "ContentDictStrBoolEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrBoolEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrBoolEntry) - }, - ), - "ContentDictStrStrEntry": _reflection.GeneratedProtocolMessageType( - "ContentDictStrStrEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrStrEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Pmt_Performative) - }, - ), - "Performative_Mt_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Mt_Performative", - (_message.Message,), - { - "ContentUnion1TypeDictOfStrIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentUnion1TypeDictOfStrIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion1TypeDictOfStrIntEntry) - }, - ), - "ContentUnion2TypeDictOfStrIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentUnion2TypeDictOfStrIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfStrIntEntry) - }, - ), - "ContentUnion2TypeDictOfIntFloatEntry": _reflection.GeneratedProtocolMessageType( - "ContentUnion2TypeDictOfIntFloatEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfIntFloatEntry) - }, - ), - "ContentUnion2TypeDictOfBoolBytesEntry": _reflection.GeneratedProtocolMessageType( - "ContentUnion2TypeDictOfBoolBytesEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfBoolBytesEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Mt_Performative) - }, - ), - "Performative_O_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_O_Performative", - (_message.Message,), - { - "ContentODictStrIntEntry": _reflection.GeneratedProtocolMessageType( - "ContentODictStrIntEntry", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_O_Performative.ContentODictStrIntEntry) - }, - ), - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_O_Performative) - }, - ), - "Performative_Empty_Contents_Performative": _reflection.GeneratedProtocolMessageType( - "Performative_Empty_Contents_Performative", - (_message.Message,), - { - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage.Performative_Empty_Contents_Performative) - }, - ), - "DESCRIPTOR": _TPROTOCOLNOCTMESSAGE, - "__module__": "t_protocol_no_ct_pb2" - # @@protoc_insertion_point(class_scope:aea.some_author.some_protocol_name.v1_0_0.TProtocolNoCtMessage) - }, -) -_sym_db.RegisterMessage(TProtocolNoCtMessage) -_sym_db.RegisterMessage(TProtocolNoCtMessage.Performative_Pt_Performative) -_sym_db.RegisterMessage(TProtocolNoCtMessage.Performative_Pct_Performative) -_sym_db.RegisterMessage(TProtocolNoCtMessage.Performative_Pmt_Performative) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntBytesEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntIntEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntFloatEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntBoolEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictIntStrEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolBytesEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolIntEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolFloatEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolBoolEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictBoolStrEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrBytesEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrIntEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrFloatEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrBoolEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Pmt_Performative.ContentDictStrStrEntry -) -_sym_db.RegisterMessage(TProtocolNoCtMessage.Performative_Mt_Performative) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion1TypeDictOfStrIntEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfStrIntEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfIntFloatEntry -) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_Mt_Performative.ContentUnion2TypeDictOfBoolBytesEntry -) -_sym_db.RegisterMessage(TProtocolNoCtMessage.Performative_O_Performative) -_sym_db.RegisterMessage( - TProtocolNoCtMessage.Performative_O_Performative.ContentODictStrIntEntry -) -_sym_db.RegisterMessage(TProtocolNoCtMessage.Performative_Empty_Contents_Performative) - +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "t_protocol_no_ct_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY._options = ( None @@ -565,142 +141,158 @@ _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY._serialized_options = ( b"8\001" ) - _TPROTOCOLNOCTMESSAGE._serialized_start = 70 - _TPROTOCOLNOCTMESSAGE._serialized_end = 7381 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PT_PERFORMATIVE._serialized_start = 848 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PT_PERFORMATIVE._serialized_end = 988 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE._serialized_start = 991 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE._serialized_end = 1287 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE._serialized_start = 1290 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE._serialized_end = 4486 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY._serialized_start = ( - 3598 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY._serialized_end = ( - 3656 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY._serialized_start = ( - 3658 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY._serialized_end = ( - 3714 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY._serialized_start = ( - 3716 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY._serialized_end = ( - 3774 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY._serialized_start = ( - 3776 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY._serialized_end = ( - 3833 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY._serialized_start = ( - 3835 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY._serialized_end = ( - 3891 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY._serialized_start = ( - 3893 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY._serialized_end = ( - 3952 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY._serialized_start = ( - 3954 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY._serialized_end = ( - 4011 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY._serialized_start = ( - 4013 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY._serialized_end = ( - 4072 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY._serialized_start = ( - 4074 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY._serialized_end = ( - 4132 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY._serialized_start = ( - 4134 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY._serialized_end = ( - 4191 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY._serialized_start = ( - 4193 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY._serialized_end = ( - 4251 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY._serialized_start = ( - 4253 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY._serialized_end = ( - 4309 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY._serialized_start = ( - 4311 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY._serialized_end = ( - 4369 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY._serialized_start = ( - 4371 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY._serialized_end = ( - 4428 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY._serialized_start = ( - 4430 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY._serialized_end = ( - 4486 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE._serialized_start = 4489 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE._serialized_end = 6858 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY._serialized_start = ( - 6575 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY._serialized_end = ( - 6643 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY._serialized_start = ( - 6645 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY._serialized_end = ( - 6713 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY._serialized_start = ( - 6715 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY._serialized_end = ( - 6785 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY._serialized_start = ( - 6787 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY._serialized_end = ( - 6858 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE._serialized_start = 6861 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE._serialized_end = 7321 - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY._serialized_start = ( - 7264 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY._serialized_end = ( - 7321 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE._serialized_start = ( - 7323 - ) - _TPROTOCOLNOCTMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE._serialized_end = ( - 7365 - ) + _globals["_TPROTOCOLNOCTMESSAGE"]._serialized_start = 70 + _globals["_TPROTOCOLNOCTMESSAGE"]._serialized_end = 7381 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PT_PERFORMATIVE" + ]._serialized_start = 848 + _globals["_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PT_PERFORMATIVE"]._serialized_end = 988 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE" + ]._serialized_start = 991 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PCT_PERFORMATIVE" + ]._serialized_end = 1287 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE" + ]._serialized_start = 1290 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE" + ]._serialized_end = 4486 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY" + ]._serialized_start = 3598 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBYTESENTRY" + ]._serialized_end = 3656 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY" + ]._serialized_start = 3658 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTINTENTRY" + ]._serialized_end = 3714 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY" + ]._serialized_start = 3716 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTFLOATENTRY" + ]._serialized_end = 3774 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY" + ]._serialized_start = 3776 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTBOOLENTRY" + ]._serialized_end = 3833 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY" + ]._serialized_start = 3835 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTINTSTRENTRY" + ]._serialized_end = 3891 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY" + ]._serialized_start = 3893 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBYTESENTRY" + ]._serialized_end = 3952 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY" + ]._serialized_start = 3954 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLINTENTRY" + ]._serialized_end = 4011 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY" + ]._serialized_start = 4013 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLFLOATENTRY" + ]._serialized_end = 4072 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY" + ]._serialized_start = 4074 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLBOOLENTRY" + ]._serialized_end = 4132 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY" + ]._serialized_start = 4134 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTBOOLSTRENTRY" + ]._serialized_end = 4191 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY" + ]._serialized_start = 4193 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBYTESENTRY" + ]._serialized_end = 4251 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY" + ]._serialized_start = 4253 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRINTENTRY" + ]._serialized_end = 4309 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY" + ]._serialized_start = 4311 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRFLOATENTRY" + ]._serialized_end = 4369 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY" + ]._serialized_start = 4371 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRBOOLENTRY" + ]._serialized_end = 4428 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY" + ]._serialized_start = 4430 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_PMT_PERFORMATIVE_CONTENTDICTSTRSTRENTRY" + ]._serialized_end = 4486 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE" + ]._serialized_start = 4489 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE" + ]._serialized_end = 6858 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY" + ]._serialized_start = 6575 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION1TYPEDICTOFSTRINTENTRY" + ]._serialized_end = 6643 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY" + ]._serialized_start = 6645 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFSTRINTENTRY" + ]._serialized_end = 6713 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY" + ]._serialized_start = 6715 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFINTFLOATENTRY" + ]._serialized_end = 6785 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY" + ]._serialized_start = 6787 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_MT_PERFORMATIVE_CONTENTUNION2TYPEDICTOFBOOLBYTESENTRY" + ]._serialized_end = 6858 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE" + ]._serialized_start = 6861 + _globals["_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE"]._serialized_end = 7321 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY" + ]._serialized_start = 7264 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_O_PERFORMATIVE_CONTENTODICTSTRINTENTRY" + ]._serialized_end = 7321 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE" + ]._serialized_start = 7323 + _globals[ + "_TPROTOCOLNOCTMESSAGE_PERFORMATIVE_EMPTY_CONTENTS_PERFORMATIVE" + ]._serialized_end = 7365 # @@protoc_insertion_point(module_scope) diff --git a/tests/data/packages/packages.json b/tests/data/packages/packages.json index 00b8cbd326..1433ce1215 100644 --- a/tests/data/packages/packages.json +++ b/tests/data/packages/packages.json @@ -2,8 +2,8 @@ "dev": { "contract/default_author/stub_0/0.1.0": "bafybeidicpfgwqbr54v5pca77wu6ifnf23idf5htpdrudhbwxzaavm3wyy", "contract/default_author/stub_1/0.1.0": "bafybeibpmdrfhgz33ubww57rmmzn56g67e5xe462xiulk2p2ttezgujn5a", - "protocol/fetchai/t_protocol/0.1.0": "bafybeic2i5k3fsc6sq3oqyfjxw36s6ohfx4nhcvp3t56uoxmhxxs33coxi", - "protocol/fetchai/t_protocol_no_ct/0.1.0": "bafybeighrk7flltd77bmap3ypcopmwqgstdvxc5vh73ldv23o77j3khnqa" + "protocol/fetchai/t_protocol/0.1.0": "bafybeiferqrkn6pdorpmzsnhzsff32nawe27xg47jq6ay7ta33xxvmlwty", + "protocol/fetchai/t_protocol_no_ct/0.1.0": "bafybeigddijmikzgdw23vtib6lxuq5ztxuqbg3gepdctrh4iscc5teerse" }, "third_party": {} } \ No newline at end of file diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index babf3c647f..6e2eccd199 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -64,11 +64,11 @@ from aea.test_tools.mocks import RegexComparator from aea.test_tools.test_cases import AEATestCase, AEATestCaseEmpty, BaseAEATestCase -from packages.fetchai.connections.http_server.connection import ( - PUBLIC_ID as HTTP_SERVER_CONNECTION_PUBLIC_ID, -) from packages.fetchai.connections.stub.connection import StubConnection from packages.fetchai.protocols.default import DefaultMessage +from packages.valory.connections.http_server.connection import ( + PUBLIC_ID as HTTP_SERVER_CONNECTION_PUBLIC_ID, +) from packages.valory.protocols.http.message import HttpMessage from tests.conftest import ( @@ -152,11 +152,11 @@ def test_when_package_has_missing_dependency(): f"Missing dependencies: ['(protocol, {str(HttpMessage.protocol_id)})']" ) with pytest.raises(AEAException, match=expected_message): - # connection "fetchai/http_server" requires + # connection "valory/http_server" requires # "fetchai/http" protocols. builder.add_component( ComponentType.CONNECTION, - Path(ROOT_DIR) / "packages" / "fetchai" / "connections" / "http_server", + Path(ROOT_DIR) / "packages" / "valory" / "connections" / "http_server", ) diff --git a/tests/test_cli/test_add_key.py b/tests/test_cli/test_add_key.py index 9dd7bcb193..77ee92db19 100644 --- a/tests/test_cli/test_add_key.py +++ b/tests/test_cli/test_add_key.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -262,7 +262,6 @@ def test_add_key_fails_bad_key(): with mock.patch.object( aea.crypto.helpers._default_logger, "error" ) as mock_logger_error: - result = runner.invoke( cli, [*CLI_LOG_OPTION, "init", "--local", "--author", AUTHOR], diff --git a/tests/test_cli/test_check_packages.py b/tests/test_cli/test_check_packages.py index a61f5a5dbd..86747cd420 100644 --- a/tests/test_cli/test_check_packages.py +++ b/tests/test_cli/test_check_packages.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -121,7 +121,11 @@ def test_check_description_failure( with _unified_yaml_load_patch( description="" - ), check_author_patch, check_dependencies_patch, find_all_packages_ids_patch, _find_all_configuration_files_patch( + ), ( + check_author_patch + ), ( + check_dependencies_patch + ), find_all_packages_ids_patch, _find_all_configuration_files_patch( [ self.test_aea_config, ] diff --git a/tests/test_cli/test_fetch.py b/tests/test_cli/test_fetch.py index e564d39b88..fe9d705d0e 100644 --- a/tests/test_cli/test_fetch.py +++ b/tests/test_cli/test_fetch.py @@ -414,7 +414,6 @@ def test_download_failure(self) -> None: ), mock.patch.object( Path, "exists", return_value=False ): - with pytest.raises( click.ClickException, match="Error occured while downloading agent", @@ -431,7 +430,6 @@ def test_os_error(self) -> None: with mock.patch( "aea.cli.fetch.get_default_remote_registry", return_value=REMOTE_IPFS ), mock.patch.object(IPFSTool, "download", side_effect=shutil.Error): - with pytest.raises( click.ClickException, ): diff --git a/tests/test_cli/test_generate_all_protocols.py b/tests/test_cli/test_generate_all_protocols.py index 0982914805..64a866df26 100644 --- a/tests/test_cli/test_generate_all_protocols.py +++ b/tests/test_cli/test_generate_all_protocols.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -40,7 +40,6 @@ def _run_cli_patch(*args: Any, **kwargs: Any) -> None: - if "isort" in args or "black" in args: return diff --git a/tests/test_cli/test_generate_key.py b/tests/test_cli/test_generate_key.py index f92a81b51b..d6520fb2a6 100644 --- a/tests/test_cli/test_generate_key.py +++ b/tests/test_cli/test_generate_key.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -38,7 +38,7 @@ from aea.cli import cli from aea.configurations.constants import MULTIKEY_FILENAME from aea.crypto.base import Crypto as BaseCrypto -from aea.crypto.registries import make_crypto +from aea.crypto.registries import crypto_registry, make_crypto from aea.helpers.io import open_file from aea.helpers.sym_link import cd from aea.test_tools.test_cases import AEATestCaseEmpty @@ -105,6 +105,25 @@ def test_all(self): Path(FETCHAI_PRIVATE_KEY_FILE).unlink() Path(ETHEREUM_PRIVATE_KEY_FILE).unlink() + def test_invalid_ledger_id(self): + """Test that the fetch private key is created correctly.""" + args = [*CLI_LOG_OPTION, "generate-key", "ledger"] + result = self.runner.invoke(cli, args) + assert result.exit_code == 1 + assert "Invalid identifier provided `ledger`" in result.stdout + + def test_no_ledger_installation_found(self): + """Test that the fetch private key is created correctly.""" + args = [*CLI_LOG_OPTION, "generate-key", "ledger"] + specs = crypto_registry.specs.copy() + crypto_registry.specs = {} + try: + result = self.runner.invoke(cli, args) + assert result.exit_code == 1 + assert "No ledger installation found" in result.stdout + finally: + crypto_registry.specs = specs + @classmethod def teardown_class(cls): """Tear the test down.""" diff --git a/tests/test_cli/test_install.py b/tests/test_cli/test_install.py index 25a4519559..036d2d1888 100644 --- a/tests/test_cli/test_install.py +++ b/tests/test_cli/test_install.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,8 +20,10 @@ """This test module contains the tests for the `aea install` sub-command.""" +import logging from pathlib import Path -from typing import Dict +from typing import Any, Dict +from unittest import mock import pytest import yaml @@ -39,15 +41,30 @@ class TestInstall(AEATestCase): path_to_aea: Path = Path(CUR_PATH, "data", "dummy_aea") - @classmethod - def setup_class(cls): - """Set the test up.""" - super().setup_class() - cls.result = cls.run_cli_command("install", cwd=cls._get_cwd()) - def test_exit_code_equal_to_zero(self): """Assert that the exit code is equal to zero (i.e. success).""" - assert self.result.exit_code == 0 + result = self.run_cli_command("install", cwd=self._get_cwd()) + assert result.exit_code == 0 + + def test_extra_dependencies(self, caplog: Any): + """Assert that the exit code is equal to zero (i.e. success).""" + with caplog.at_level(logging.DEBUG), mock.patch( + "aea.cli.install.install_dependencies" + ): + result = self.run_cli_command( + "-v", + "DEBUG", + "install", + "-e", + "open-aea-ledger-cosmos==1.0.0", + cwd=self._get_cwd(), + ) + + assert result.exit_code == 0 + assert ( + "`['open-aea-ledger-cosmos<2.0.0,>=1.0.0']` will be overridden by ['open-aea-ledger-cosmos==1.0.0']" + in caplog.text + ) class TestInstallFromRequirementFile(AEATestCase): @@ -179,6 +196,6 @@ def test_error(self): """Assert an error occurs.""" with pytest.raises( ClickException, - match="cannot install the following dependencies as the joint version specifier is unsatisfiable:\n - this_is_a_test_dependency: ==0.1.0,==0.2.0", + match="Error while merging dependencies for connections; Joint version specifier is unsatisfiable for following dependencies", ): self.run_cli_command("install", cwd=self._get_cwd()) diff --git a/tests/test_cli/test_package_manager/test_sync.py b/tests/test_cli/test_package_manager/test_sync.py index ef495c95d7..0c35ded4c8 100644 --- a/tests/test_cli/test_package_manager/test_sync.py +++ b/tests/test_cli/test_package_manager/test_sync.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -66,7 +66,9 @@ def test_sync_with_missing_dev_packages(self, ipfs_mock, hash_mock, caplog) -> N with mock.patch.object( PackageManagerV1, "dev_packages", new=packages - ), caplog.at_level(logging.INFO): + ), caplog.at_level(logging.INFO), mock.patch.object( + PackageManagerV1, "add_package" + ): result = self.run_cli_command("packages", "sync", "--dev") assert result.exit_code == 0 assert ( @@ -87,7 +89,9 @@ def test_sync_with_missing_third_party_packages( with mock.patch.object( PackageManagerV1, "third_party_packages", new=packages - ), caplog.at_level(logging.INFO): + ), caplog.at_level(logging.INFO), mock.patch.object( + PackageManagerV1, "add_package" + ): result = self.run_cli_command("packages", "sync") assert result.exit_code == 0 assert ( diff --git a/tests/test_cli/test_remove/test_base.py b/tests/test_cli/test_remove/test_base.py index ff80f9a1a1..bcedd81484 100644 --- a/tests/test_cli/test_remove/test_base.py +++ b/tests/test_cli/test_remove/test_base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -152,7 +152,7 @@ def load_config(self) -> AgentConfig: # self.run_cli_command( # noqa: E800 # "add", "--local", self.ITEM_TYPE, str(self.ITEM_PUBLIC_ID) # noqa: E800 # ) # noqa: E800 - # self.run_cli_command("add", "--local", "connection", "fetchai/http_server") # noqa: E800 + # self.run_cli_command("add", "--local", "connection", "valory/http_server") # noqa: E800 # self.runner.invoke( # noqa: E800 # cli, # noqa: E800 diff --git a/tests/test_cli/test_remove/test_dependencies.py b/tests/test_cli/test_remove/test_dependencies.py index 8bb2024f84..444a63d50c 100644 --- a/tests/test_cli/test_remove/test_dependencies.py +++ b/tests/test_cli/test_remove/test_dependencies.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -38,7 +38,7 @@ ) from aea.configurations.loader import ConfigLoader -from packages.fetchai.connections.http_server.connection import ( +from packages.valory.connections.http_server.connection import ( PUBLIC_ID as HTTP_SERVER_PUBLIC_ID, ) from packages.valory.protocols.http.message import HttpMessage diff --git a/tests/test_cli/test_run.py b/tests/test_cli/test_run.py index b943c6f0d6..a7d5dfca4d 100644 --- a/tests/test_cli/test_run.py +++ b/tests/test_cli/test_run.py @@ -260,7 +260,7 @@ def test_run_with_profiling(): logfile=sys.stdout, ) - process.expect("Start processing messages", timeout=10) + process.expect("Start processing messages", timeout=60) process.expect("Profiling details", timeout=10) process.control_c() process.wait_to_complete(10) diff --git a/tests/test_cli/test_utils/test_package_utils.py b/tests/test_cli/test_utils/test_package_utils.py index a278e16bee..c7c8fcafe7 100644 --- a/tests/test_cli/test_utils/test_package_utils.py +++ b/tests/test_cli/test_utils/test_package_utils.py @@ -55,7 +55,6 @@ def test_verify_private_keys_ctx_fail() -> None: "verify_private_keys", side_effect=ValueError, ): - with pytest.raises(click.ClickException): verify_private_keys_ctx(ctx) diff --git a/tests/test_configurations/test_loader.py b/tests/test_configurations/test_loader.py index 3730210ade..558034570e 100644 --- a/tests/test_configurations/test_loader.py +++ b/tests/test_configurations/test_loader.py @@ -112,7 +112,6 @@ def test_config_loader_load_service_config(*_mocks): ) class DummyServiceConfig(PackageConfiguration): - package_type = PackageType.SERVICE json = property(lambda self: config) diff --git a/tests/test_contracts/test_base.py b/tests/test_contracts/test_base.py index 7244b05386..9244eca3ff 100644 --- a/tests/test_contracts/test_base.py +++ b/tests/test_contracts/test_base.py @@ -257,7 +257,7 @@ class AgentConfig: SPENDER_ADDRESS = "0x7A1236d5195e31f1F573AD618b2b6FEFC85C5Ce6" OWNER_ADDRESS = "0x7A1236d5195e31f1F573AD618b2b6FEFC85C5Ce6" - with mock.patch("web3.contract.ContractFunction.call", return_value=0): + with mock.patch("web3.contract.contract.ContractFunction.call", return_value=0): res = contract.contract_method_call( ledger_api=ledger_api, method_name="allowance", @@ -330,7 +330,7 @@ def test_default_method_call(): ) # Call a function present in the ABI but not in the contract package - with mock.patch("web3.contract.ContractFunction.call", return_value=0): + with mock.patch("web3.contract.contract.ContractFunction.call", return_value=0): result = contract.default_method_call( ledger_api=ledger_api, contract_address=dummy_address, diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-aev-echo-demo.md b/tests/test_docs/test_bash_yaml/md_files/bash-aev-echo-demo.md index d894241dd3..1138dc6087 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-aev-echo-demo.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-aev-echo-demo.md @@ -8,7 +8,7 @@ aea_version: '>=1.3.0, <2.0.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/http_server:0.22.0 +- valory/http_server:0.22.0 contracts: [] protocols: - fetchai/default:1.0.0 @@ -30,7 +30,7 @@ dependencies: open-aea-ledger-ethereum: {} default_connection: null --- -public_id: fetchai/http_server:0.22.0 +public_id: valory/http_server:0.22.0 type: connection config: host: ${HOST:str:localhost} diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-gym-skill.md b/tests/test_docs/test_bash_yaml/md_files/bash-gym-skill.md index e5b073efdf..496672f598 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-gym-skill.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-gym-skill.md @@ -1,5 +1,5 @@ ``` bash -aea fetch open_aea/gym_aea:0.1.0:bafybeiculyr3kbpnqoypt4vqnzthrazcqyu3hnajtdb2fsag53pfhzk3ye --remote +aea fetch open_aea/gym_aea:0.1.0:bafybeibyyl4wtnrfxeoed3kjnlftphkcikdqrgf76u34v4wbvwgsqfqrgy --remote cd gym_aea aea install ``` @@ -8,7 +8,7 @@ aea create my_gym_aea cd my_gym_aea ``` ``` bash -aea add skill fetchai/gym:0.20.0:bafybeiebrkzxf4n7m234nwqvxvoqqsqgq4yb4luv6ehlzy6ljhee74lbqi --remote +aea add skill fetchai/gym:0.20.0:bafybeifaccpsmby27az6geu4d6m7xcjk2hop7ihtleqeeasphnhn2dp234 --remote ``` ``` bash aea config set agent.default_connection fetchai/gym:0.19.0 diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md index b5a57d528d..91df6b652a 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-connection-and-skill.md @@ -3,10 +3,10 @@ aea create my_aea cd my_aea ``` ``` bash -aea add connection fetchai/http_server:0.22.0:bafybeihaax5od5zo5jk2l62hv4jwuwtxloh5mijozudpsjombqc4ncmi6i --remote +aea add connection valory/http_server:0.22.0:bafybeid4nl6ruidpto3ynwjmc76nf42egcroqlhqq6krh2onwktu4ywpne --remote ``` ``` bash -aea config set agent.default_connection fetchai/http_server:0.22.0 +aea config set agent.default_connection valory/http_server:0.22.0 ``` ``` bash aea config set vendor.fetchai.connections.http_server.config.api_spec_path "../examples/http_ex/petstore.yaml" @@ -48,11 +48,11 @@ models: mkdir packages aea create my_aea cd my_aea -aea add connection fetchai/http_server:0.22.0:bafybeihaax5od5zo5jk2l62hv4jwuwtxloh5mijozudpsjombqc4ncmi6i --remote -aea push connection fetchai/http_server --local -aea add protocol fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 --remote +aea add connection valory/http_server:0.22.0:bafybeid4nl6ruidpto3ynwjmc76nf42egcroqlhqq6krh2onwktu4ywpne --remote +aea push connection valory/http_server --local +aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local -aea add protocol valory/http:1.0.0:bafybeifyoio7nlh5zzyn5yz7krkou56l22to3cwg7gw5v5o3vxwklibhty --remote +aea add protocol valory/http:1.0.0:bafybeiejoqgv7finfxo3rcvvovrlj5ccrbgxodjq43uo26ylpowsa3llfe --remote aea push protocol valory/http --local cd .. aea delete my_aea diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md index 4f04f0fe6d..3779cd16a7 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-http-echo-demo.md @@ -1,6 +1,6 @@ ``` bash pipenv shell -aea fetch open_aea/http_echo:0.1.0:bafybeidnmee6kefsq2nef6gsrg4qmhuky5dfstbg7mi6ophdzedoxbi7au --remote +aea fetch open_aea/http_echo:0.1.0:bafybeiah75oosb24i3nwtbotqjd44waxg7ldmxgle4iiumemgbrvlosxsu --remote cd http_echo aea generate-key ethereum; aea add-key ethereum aea install @@ -11,8 +11,8 @@ Adding protocol 'valory/http:1.0.0'... Successfully added protocol 'valory/http:1.0.0'. Adding protocol 'fetchai/default:1.0.0'... Successfully added protocol 'fetchai/default:1.0.0'. -Adding connection 'fetchai/http_server:0.22.0'... -Successfully added connection 'fetchai/http_server:0.22.0'. +Adding connection 'valory/http_server:0.22.0'... +Successfully added connection 'valory/http_server:0.22.0'. Adding skill 'fetchai/http_echo:0.20.0'... Successfully added skill 'fetchai/http_echo:0.20.0'. Agent http_echo successfully fetched. diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-quickstart.md b/tests/test_docs/test_bash_yaml/md_files/bash-quickstart.md index e0168a4b53..f7634d9e40 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-quickstart.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-quickstart.md @@ -72,7 +72,7 @@ v1.7.0 AEA configurations successfully initialized: {'author': 'fetchai'} ``` ``` bash -aea fetch open_aea/my_first_aea:0.1.0:bafybeihhrlcmu6dibftsg36m47uxi4inltsjvmoip5smvevq3caiwm3oo4 --remote +aea fetch open_aea/my_first_aea:0.1.0:bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm --remote cd my_first_aea ``` ``` bash @@ -152,19 +152,19 @@ aea delete my_first_aea ``` bash -aea fetch open_aea/my_first_aea:0.1.0:bafybeihhrlcmu6dibftsg36m47uxi4inltsjvmoip5smvevq3caiwm3oo4 --remote +aea fetch open_aea/my_first_aea:0.1.0:bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm --remote cd my_first_aea ``` ``` bash -aea fetch open_aea/my_first_aea:0.1.0:bafybeihhrlcmu6dibftsg36m47uxi4inltsjvmoip5smvevq3caiwm3oo4 --remote +aea fetch open_aea/my_first_aea:0.1.0:bafybeibv7nlyxldyj5ntivsu74ylul4dltpfvkfa46k2pbveetfpkvz4jm --remote cd my_first_aea ``` ```bash mkdir packages cd my_first_aea -aea add protocol fetchai/default:1.0.0:bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4 --remote +aea add protocol fetchai/default:1.0.0:bafybeibtqp56jkijwjsohk4z5vqp6pfkiexmnmk5uleteotbsgrypy6gxm --remote aea push protocol fetchai/default --local cd .. aea delete my_aea diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-raspberry-set-up.md b/tests/test_docs/test_bash_yaml/md_files/bash-raspberry-set-up.md index 24e7c6fcf8..6280f82d3f 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-raspberry-set-up.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-raspberry-set-up.md @@ -7,7 +7,7 @@ sudo apt-get dist-upgrade sudo apt-get install pipenv ``` ``` bash -pipenv --python 3.7 && pipenv shell +pipenv --python 3.8 && pipenv shell ``` ``` bash pip install aea[all] diff --git a/tests/test_docs/test_commands.py b/tests/test_docs/test_commands.py index 1ead08e487..4d1fdc36c3 100644 --- a/tests/test_docs/test_commands.py +++ b/tests/test_docs/test_commands.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -55,9 +55,7 @@ def get_group_tree(cmd: Union[click.Group, click.Command]) -> Dict: ctx = click.Context(command=cmd) if isinstance(cmd, click.Group): - for sub_cmd_name in cast(click.Group, cmd).list_commands(ctx=ctx): - # Get the sub-command sub_cmd = cast(click.Command, cmd.get_command(ctx, sub_cmd_name)) @@ -86,7 +84,6 @@ def validate(self, cmd: str, file_: str = "") -> bool: # Iterate the command parts for cmd_part in cmd_parts: - # Subcommands if cmd_part in tree["commands"].keys(): latest_subcmd = cmd_part diff --git a/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py b/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py index 790656792c..2c08d4f93b 100644 --- a/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -47,7 +47,6 @@ class TestStandaloneTransaction(BaseAEATestCase): @classmethod def _patch_logger(cls): - cls.patch_logger_info = patch.object(logger, "info") cls.mocked_logger_info = cls.patch_logger_info.__enter__() diff --git a/tests/test_helpers/test_async_utils.py b/tests/test_helpers/test_async_utils.py index 78fd91dc7e..90d8dc4b8c 100644 --- a/tests/test_helpers/test_async_utils.py +++ b/tests/test_helpers/test_async_utils.py @@ -242,6 +242,7 @@ async def run(self): @pytest.mark.asyncio async def test_runnable_async(self): """Test runnable async methods.""" + # for pydocstyle class TestRun(Runnable): async def run(self): @@ -269,6 +270,7 @@ def test_runnable_sync(self): @pytest.mark.asyncio async def test_double_start(self): """Test runnable async methods.""" + # for pydocstyle class TestRun(Runnable): async def run(self): @@ -286,6 +288,7 @@ async def run(self): @pytest.mark.asyncio async def test_run_in_thread(self): """Test runnable in thread mode.""" + # for pydocstyle class TestRun(Runnable): async def run(self): @@ -303,6 +306,7 @@ async def run(self): @pytest.mark.asyncio async def test_timeout(self): """Test runnable async methods.""" + # for pydocstyle class TestRun(Runnable): def __init__( @@ -365,6 +369,7 @@ async def run(self): @pytest.mark.asyncio async def test_wait_async_threaded(self): """Test runnable async methods.""" + # for pydocstyle class TestRun(Runnable): async def run(self): @@ -383,6 +388,7 @@ async def run(self): @pytest.mark.asyncio async def test_wait_async_threaded_no_exception(self): """Test runnable threaded wait completed.""" + # for pydocstyle class TestRun(Runnable): async def run(self): @@ -395,6 +401,7 @@ async def run(self): @pytest.mark.asyncio async def test_double_stop(self): """Test runnable double stop.""" + # for pydocstyle class TestRun(Runnable): async def run(self): @@ -408,6 +415,7 @@ async def run(self): def test_stop_before_run(self): """Test stop before run.""" + # for pydocstyle class TestRun(Runnable): async def run(self): diff --git a/tests/test_helpers/test_base.py b/tests/test_helpers/test_base.py index f1066c893c..8493525a7c 100644 --- a/tests/test_helpers/test_base.py +++ b/tests/test_helpers/test_base.py @@ -64,7 +64,7 @@ win_popen_kwargs, ) -from packages.fetchai.connections.http_server.connection import HTTPServerConnection +from packages.valory.connections.http_server.connection import HTTPServerConnection from tests.conftest import CUR_PATH, ROOT_DIR, skip_test_windows from tests.data.dummy_skill import PUBLIC_ID as DUMMY_SKILL_PUBLIC_ID @@ -97,7 +97,7 @@ def test_locate_class(self): os.chdir(os.path.join(CUR_PATH, "..")) expected_class = HTTPServerConnection actual_class = locate( - "packages.fetchai.connections.http_server.connection.HTTPServerConnection" + "packages.valory.connections.http_server.connection.HTTPServerConnection" ) os.chdir(cwd) # although they are the same class, they are different instances in memory @@ -151,6 +151,7 @@ def test_load_env_file(): def test_reg_exp_not_match(): """Test regexp checks.""" + # for pydocstyle class MyReString(RegexConstrainedString): REGEX = re.compile(r"[0-9]+") @@ -162,6 +163,7 @@ class MyReString(RegexConstrainedString): @pytest.mark.parametrize("raise_on_try", (True, False)) def test_try_decorator(raise_on_try: bool): """Test try and log decorator.""" + # for pydocstyle @try_decorator("oops", default_return=lambda _: "failed") def fn(**_): diff --git a/tests/test_helpers/test_exec_timeout.py b/tests/test_helpers/test_exec_timeout.py index 09426add69..2c53e33816 100644 --- a/tests/test_helpers/test_exec_timeout.py +++ b/tests/test_helpers/test_exec_timeout.py @@ -136,6 +136,7 @@ def slow_function(cls, sleep): @pytest.mark.flaky(reruns=MAX_FLAKY_RERUNS) def test_execution_limit_in_threads(self): """Test two threads with different timeouts same time.""" + # pydocstyle: ignore # conflict with black # noqa: E800 def make_test_function(slow_function_time, timeout): assert timeout < slow_function_time diff --git a/tests/test_helpers/test_ipfs/test_base.py b/tests/test_helpers/test_ipfs/test_base.py index 59d57c8ed5..d4301d6c49 100644 --- a/tests/test_helpers/test_ipfs/test_base.py +++ b/tests/test_helpers/test_ipfs/test_base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,23 +22,12 @@ import tempfile from pathlib import Path from tempfile import TemporaryDirectory -from unittest.mock import patch import pytest from aea_cli_ipfs.ipfs_utils import IPFSTool # type: ignore from aea.helpers.cid import to_v1 -from aea.helpers.ipfs.base import IPFSHashOnly, _is_text - - -def test_is_text_negative(): - """Test the helper method 'is_text' negative case.""" - # https://gehrcke.de/2015/12/how-to-raise-unicodedecodeerror-in-python-3/ - with patch( - "aea.helpers.ipfs.base.open_file", - side_effect=UnicodeDecodeError("foo", b"bytes", 1, 2, "Fake reason"), - ): - assert not _is_text("path") +from aea.helpers.ipfs.base import IPFSHashOnly def test_hash_for_big_file(): diff --git a/tests/test_package_manager/test_base.py b/tests/test_package_manager/test_base.py index 66f346cd92..d64f472bbe 100644 --- a/tests/test_package_manager/test_base.py +++ b/tests/test_package_manager/test_base.py @@ -20,6 +20,7 @@ """Test package manager base.""" +import logging import re from collections import OrderedDict from pathlib import Path @@ -93,6 +94,7 @@ def __init__( self.path = path self.packages = packages self.config_loader = config_loader + self._logger = logging.getLogger() @classmethod def from_dir( diff --git a/tests/test_package_manager/test_v0.py b/tests/test_package_manager/test_v0.py index d1bd9d7e4a..a28330be1d 100644 --- a/tests/test_package_manager/test_v0.py +++ b/tests/test_package_manager/test_v0.py @@ -101,7 +101,12 @@ def test_sync( with mock.patch.object(pm, "add_package") as update_patch: pm.sync() - update_patch.assert_called_with(package_id=DUMMY_PACKAGE_ID) + update_patch.assert_called_with( + package_id=DUMMY_PACKAGE_ID.with_hash( + "bafybei0000000000000000000000000000000000000000000000000000" + ), + with_dependencies=True, + ) with pytest.raises( ValueError, @@ -147,7 +152,7 @@ def test_update_fingerprints(self, caplog) -> None: path=packages_dir, packages=OrderedDict({package_id: package_hash}) ) - (temp_package / "__init__.py").write_text("") + (temp_package / "__init__.py").write_text("dummy") with caplog.at_level(logging.ERROR): assert pm.verify() == 1 @@ -210,7 +215,7 @@ def test_verify_method(self, caplog) -> None: pm.package_path_from_package_id(package_id=EXAMPLE_PACKAGE_ID) / INIT_FILE_NAME ) - init_file.write_text("") + init_file.write_text("dummy") with caplog.at_level(logging.ERROR), mock.patch( "aea.package_manager.v0.check_fingerprint", @@ -225,7 +230,9 @@ def test_verify_method(self, caplog) -> None: in caplog.text ) - with mock.patch("traceback.print_exc",) as print_tb, mock.patch( + with mock.patch( + "traceback.print_exc", + ) as print_tb, mock.patch( "aea.package_manager.v0.check_fingerprint", side_effect=ValueError("expeceted_exception"), ): @@ -255,7 +262,6 @@ def test_fingerprint_failure(self, caplog) -> None: EXAMPLE_PACKAGE_ID, ], ): - assert pm.verify() == 1 assert ( f"Fingerprints does not match for {EXAMPLE_PACKAGE_ID}" in caplog.text @@ -278,7 +284,6 @@ def test_missing_hash(self, caplog) -> None: EXAMPLE_PACKAGE_ID, ], ): - assert pm.verify() == 1 assert f"Cannot find hash for {EXAMPLE_PACKAGE_ID}" in caplog.text diff --git a/tests/test_package_manager/test_v1.py b/tests/test_package_manager/test_v1.py index 50432a1e63..bc004b81d3 100644 --- a/tests/test_package_manager/test_v1.py +++ b/tests/test_package_manager/test_v1.py @@ -142,7 +142,12 @@ def test_sync( with mock.patch.object(pm, "add_package") as update_patch: pm.sync(dev=True, third_party=False) - update_patch.assert_called_with(package_id=DUMMY_PACKAGE_ID) + update_patch.assert_called_with( + package_id=DUMMY_PACKAGE_ID.with_hash( + "bafybei0000000000000000000000000000000000000000000000000000" + ), + with_dependencies=True, + ) # test package already exists. with mock.patch.object(pm, "add_package") as update_patch, mock.patch( @@ -204,7 +209,12 @@ def test_sync( with mock.patch.object(pm, "add_package") as update_patch: pm.sync(dev=False, third_party=True) - update_patch.assert_called_with(package_id=DUMMY_PACKAGE_ID) + update_patch.assert_called_with( + package_id=DUMMY_PACKAGE_ID.with_hash( + "bafybei0000000000000000000000000000000000000000000000000000" + ), + with_dependencies=True, + ) # 3d part hashes pm = PackageManagerV1( @@ -214,7 +224,12 @@ def test_sync( with mock.patch.object(pm, "add_package") as update_patch: pm.sync(dev=False, third_party=True, update_hashes=True) - update_patch.assert_called_with(package_id=DUMMY_PACKAGE_ID) + update_patch.assert_called_with( + package_id=DUMMY_PACKAGE_ID.with_hash( + "bafybei0000000000000000000000000000000000000000000000000000" + ), + with_dependencies=True, + ) # 3d part packages with mock.patch.object(pm, "update_package") as update_patch, mock.patch.object( @@ -352,8 +367,7 @@ def test_update_fingerprints(self, caplog) -> None: dev_packages=OrderedDict({package_id: package_hash}), ) - (temp_package / "__init__.py").write_text("") - + (temp_package / "__init__.py").write_text("hello") with caplog.at_level(logging.ERROR): assert pm.verify() == 1 assert ( @@ -461,7 +475,6 @@ def test_add_new_package_failures(self) -> None: pm, "update_dependencies", ): - with pytest.raises( PackageNotValid, match="Found a package which is not listed in the `packages.json`", @@ -564,7 +577,7 @@ def test_verify_method(self, caplog) -> None: pm.package_path_from_package_id(package_id=EXAMPLE_PACKAGE_ID) / INIT_FILE_NAME ) - init_file.write_text("") + init_file.write_text("dummy") with caplog.at_level(logging.ERROR), mock.patch( "aea.package_manager.v1.check_fingerprint", @@ -617,7 +630,6 @@ def test_fingerprint_failure(self, caplog) -> None: "is_third_party_package", return_value=True, ): - assert pm.verify() == 1 assert ( f"Fingerprints does not match for {EXAMPLE_PACKAGE_ID}" in caplog.text @@ -638,7 +650,6 @@ def test_missing_hash(self, caplog) -> None: EXAMPLE_PACKAGE_ID, ], ): - assert pm.verify() == 1 assert f"Cannot find hash for {EXAMPLE_PACKAGE_ID}" in caplog.text diff --git a/tests/test_packages/test_connections/test_http_server/test_http_server_and_client.py b/tests/test_packages/test_connections/test_http_server/test_http_server_and_client.py index 8f7abe84aa..ac5b7c7df6 100644 --- a/tests/test_packages/test_connections/test_http_server/test_http_server_and_client.py +++ b/tests/test_packages/test_connections/test_http_server/test_http_server_and_client.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2021 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -33,11 +33,11 @@ from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue -from packages.fetchai.connections.http_server.connection import ( +from packages.valory.connections.http_client.connection import HTTPClientConnection +from packages.valory.connections.http_server.connection import ( HTTPServerConnection, headers_to_string, ) -from packages.valory.connections.http_client.connection import HTTPClientConnection from packages.valory.protocols.http.dialogues import HttpDialogue, HttpDialogues from packages.valory.protocols.http.message import HttpMessage diff --git a/tests/test_packages/test_connections/test_ledger/test_contract_api.py b/tests/test_packages/test_connections/test_ledger/test_contract_api.py index 7973dd0c6e..ad4ce76655 100644 --- a/tests/test_packages/test_connections/test_ledger/test_contract_api.py +++ b/tests/test_packages/test_connections/test_ledger/test_contract_api.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -272,6 +272,7 @@ async def test_erc1155_get_state(erc1155_contract, ledger_apis_connection): @pytest.mark.asyncio async def test_run_async(): """Test run async error handled.""" + # for pydocstyle def _raise(): raise Exception("Expected") @@ -589,7 +590,7 @@ def test_validate_and_call_callable(): message.contract_address = dummy_address # Call a method present in the ABI but not in the contract package - with mock.patch("web3.contract.ContractFunction.call", return_value=0): + with mock.patch("web3.contract.contract.ContractFunction.call", return_value=0): result = ContractApiRequestDispatcher._validate_and_call_callable( ledger_api, message, contract ) diff --git a/tests/test_protocols/test_base.py b/tests/test_protocols/test_base.py index 2386bed7fa..bdc315e924 100644 --- a/tests/test_protocols/test_base.py +++ b/tests/test_protocols/test_base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2021-2022 Valory AG +# Copyright 2021-2023 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,8 +34,8 @@ from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope -from aea.mail.base_pb2 import DialogueMessage as Pb2DialogueMessage -from aea.mail.base_pb2 import Message as ProtobufMessage +from aea.mail.base_pb2 import DialogueMessage as Pb2DialogueMessage # type: ignore +from aea.mail.base_pb2 import Message as ProtobufMessage # type: ignore from aea.protocols.base import Message, Protocol, Serializer from aea.protocols.dialogue.base import Dialogue, DialogueLabel from aea.test_tools.constants import UNKNOWN_PROTOCOL_PUBLIC_ID diff --git a/tests/test_protocols/test_generator/test_generator.py b/tests/test_protocols/test_generator/test_generator.py index 046b92f728..54a43d0a97 100644 --- a/tests/test_protocols/test_generator/test_generator.py +++ b/tests/test_protocols/test_generator/test_generator.py @@ -1443,6 +1443,9 @@ def test_generate_protobuf_only_mode_positive_objc(self): assert Path(path_to_protobuf_objc_headers).exists() assert Path(path_to_protobuf_objc_implementation).exists() + @pytest.mark.skip( + reason="https://github.com/protocolbuffers/protobuf-javascript/issues/127" + ) def test_generate_protobuf_only_mode_positive_js(self): """Positive test for the 'generate_protobuf_only_mode' where language is JS.""" protocol_generator = ProtocolGenerator(PATH_TO_T_PROTOCOL_SPECIFICATION, self.t) diff --git a/tests/test_protocols/test_generator/test_validate.py b/tests/test_protocols/test_generator/test_validate.py index 9e4b53eee7..bcf62a8802 100644 --- a/tests/test_protocols/test_generator/test_validate.py +++ b/tests/test_protocols/test_generator/test_validate.py @@ -1162,7 +1162,10 @@ def test_validate_protocol_buffer_schema_code_snippets(self, mocked_spec): valid_all_content_1 = {"ct:DataModel"} mocked_spec.protobuf_snippets = valid_protobuf_snippet_1 - valid_result_1, valid_msg_1, = _validate_protocol_buffer_schema_code_snippets( + ( + valid_result_1, + valid_msg_1, + ) = _validate_protocol_buffer_schema_code_snippets( mocked_spec, valid_all_content_1 ) assert valid_result_1 is True @@ -1172,7 +1175,10 @@ def test_validate_protocol_buffer_schema_code_snippets(self, mocked_spec): valid_all_content_2 = set() mocked_spec.protobuf_snippets = valid_protobuf_snippet_2 - valid_result_2, valid_msg_2, = _validate_protocol_buffer_schema_code_snippets( + ( + valid_result_2, + valid_msg_2, + ) = _validate_protocol_buffer_schema_code_snippets( mocked_spec, valid_all_content_2 ) assert valid_result_2 is True diff --git a/tests/test_test_tools/test_click_testing.py b/tests/test_test_tools/test_click_testing.py index 7f9077b505..1961ec36c7 100644 --- a/tests/test_test_tools/test_click_testing.py +++ b/tests/test_test_tools/test_click_testing.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2023 Valory AG # Copyright 2018-2020 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -123,7 +123,6 @@ def run_cli_command_and_assert() -> None: cli_runner = CliRunner(mix_stderr=mix_stderr) with patch.object(capfd, "readouterr", wraps=capfd.readouterr) as m: - # streams captured via CliRunner.isolation context manager run_cli_command_and_assert() m.assert_not_called() diff --git a/tox.ini b/tox.ini index 46770f45d7..4e562ed054 100644 --- a/tox.ini +++ b/tox.ini @@ -6,37 +6,37 @@ ; we set the associated flag (e.g. for linting we don't need ; the package installation). [tox] -envlist = bandit, safety, black, black-check, isort, isort-check, fix-copyright, check-copyright, hash-check, docs, flake8, liccheck, mypy, pylint, vulture, {plugins-,}py{3.7,3.8,3.9,3.10,3.10-cov}, dependencies-check, package-version-checks, lock-packages, package-dependencies-checks, plugins_deps, fix-doc-hashes, check-doc-links-hashes, check-generate-all-protocols, spell-check, generate-api-documentation +envlist = bandit, safety, black, black-check, isort, isort-check, fix-copyright, check-copyright, hash-check, docs, flake8, liccheck, mypy, pylint, vulture, {plugins-,}py{3.8,3.9,3.10,3.10-cov,3.11}, dependencies-check, package-version-checks, lock-packages, package-dependencies-checks, plugins_deps, fix-doc-hashes, check-doc-links-hashes, check-generate-all-protocols, spell-check, generate-api-documentation ; when running locally we don't want to fail for no good reason skip_missing_interpreters = true [packages-deps] deps = gym==0.15.6 - aiohttp==3.7.4.post0 + aiohttp>=3.8.5,<4.0.0 gym==0.15.6 hypothesis==6.21.6 numpy>=1.18.1 openapi-core==0.13.2 openapi-spec-validator==0.2.8 asn1crypto==1.4.0 - tomte[tests]==0.2.4 + tomte[tests]==0.2.13 [tests-common] deps = {[packages-deps]deps} docker==4.2.0 pexpect==4.8.0 - GitPython==3.1.27 - packaging==21.3 + GitPython<4.0.0,>=3.1.37 + packaging>=23.1,<24.0 py-multibase>=1.0.0 py-multicodec>=0.2.0 - protobuf==3.19.5 + protobuf>=4.21.6,<5.0.0 requests==2.28.1 mistune==2.0.3 - tomte[isort]==0.2.4 - tomte[black]==0.2.4 - tomte[tests]==0.2.4 + tomte[isort]==0.2.13 + tomte[black]==0.2.13 + tomte[tests]==0.2.13 ; Plugin dependencies. We need this ; because we use --no-deps to install the plugins. ; aea_ledger_cosmos/aea_ledger_fetchai @@ -44,20 +44,19 @@ deps = asn1crypto==1.4.0 bech32==1.2.0 ; aea_ledger_ethereum - web3==5.31.4 + web3>=6.0.0,<7 ipfshttpclient==0.8.0a2 - eth-account>=0.5.9,<0.6.0 + eth-account>=0.8.0,<0.9.0 ; for password encryption in cosmos pycryptodome>=3.10.1 - cosmpy>=0.4.1,<0.5.0 + open-aea-cosmpy==0.6.7 certifi<=2022.6.15.1 google-api-python-client<=2.60.0 idna<=3.3 numpy>=1.18.1 psutil==5.7.0 setuptools==59.6.0 - protobuf==3.19.5 - apduboy>=0.5.0 + ledgerwallet==0.1.3 construct<=2.10.61 defusedxml==0.6.0 semver>=2.9.1,<3.0.0 @@ -116,6 +115,7 @@ commands = deps = {[tests-common]deps} pytest-custom-exit-code==0.3.0 + open-aea-flashbots==1.4.0 commands = {[commands-local-install]commands} pytest -rfE plugins/aea-ledger-fetchai/tests --durations=0 --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov=aea_ledger_fetchai --cov-config=.coveragerc --suppress-no-test-exit-code --cov-append {posargs} @@ -126,7 +126,7 @@ commands = python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-ethereum-hwi pytest -rfE plugins/aea-ledger-ethereum-hwi/tests --durations=0 --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov=aea_ledger_ethereum_hwi --cov-config=.coveragerc --suppress-no-test-exit-code --cov-append {posargs} - python -m pip install file://{toxinidir}/plugins/aea-ledger-ethereum-flashbots + python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-ethereum-flashbots pytest -rfE plugins/aea-ledger-ethereum-flashbots/tests --durations=0 --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov=aea_ledger_ethereum_flashbots --cov-config=.coveragerc --suppress-no-test-exit-code --cov-append {posargs} python -m pip install file://{toxinidir}/plugins/aea-ledger-solana @@ -149,12 +149,35 @@ basepython = python3.10 usedevelop = True deps = {[test-plugins-lte-3.9]deps} commands = {[test-plugins-lte-3.9]commands} +; Since the ledgerwallet still uses protobufs compiled using protoc<=3.20 +setenv = + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + +[testenv:py3.11] +basepython = python3.11 +usedevelop = True +deps = {[test-framework]deps} +commands = {[test-framework]commands} + +[testenv:packages-py3.11] +basepython = python3.11 +deps = {[test-packages]deps} +commands = {[test-packages]commands} + +[testenv:plugins-py3.11] +basepython = python3.11 +usedevelop = True +deps = {[test-plugins-lte-3.9]deps} +commands = {[test-plugins-lte-3.9]commands} +; Since the ledgerwallet still uses protobufs compiled using protoc<=3.20 +setenv = + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python [testenv:bandit] skipsdist = True skip_install = True deps = - tomte[bandit]==0.2.4 + tomte[bandit]==0.2.13 commands = bandit -r aea benchmark examples \ plugins/aea-ledger-fetchai/aea_ledger_fetchai \ plugins/aea-ledger-ethereum/aea_ledger_ethereum \ @@ -169,28 +192,28 @@ commands = bandit -r aea benchmark examples \ skipsdist = True skip_install = True deps = - tomte[black]==0.2.4 -commands = black aea benchmark examples packages plugins scripts tests + tomte[black]==0.2.13 +commands = black aea benchmark examples packages plugins scripts tests --exclude ".*_pb2.py" [testenv:black-check] skipsdist = True skip_install = True deps = - tomte[black]==0.2.4 -commands =black aea benchmark examples packages plugins scripts tests --check --verbose + tomte[black]==0.2.13 +commands =black aea benchmark examples packages plugins scripts tests --check --verbose --exclude ".*_pb2.py" [testenv:isort] skipsdist = True skip_install = True deps = - tomte[isort]==0.2.4 + tomte[isort]==0.2.13 commands = isort aea benchmark examples packages plugins scripts tests [testenv:isort-check] skipsdist = True skip_install = True deps = - tomte[isort]==0.2.4 + tomte[isort]==0.2.13 commands = isort --check-only --verbose aea benchmark examples packages plugins scripts tests [testenv:fix-copyright] @@ -247,7 +270,7 @@ commands = skipsdist = True skip_install = True deps = - tomte[docs]==0.2.4 + tomte[docs]==0.2.13 commands = pip3 install git+https://github.com/pugong/mkdocs-mermaid-plugin.git#egg=mkdocs-mermaid-plugin mkdocs build --clean @@ -255,7 +278,7 @@ commands = pip3 install git+https://github.com/pugong/mkdocs-mermaid-plugin.git# skipsdist = True skip_install = True deps = - tomte[docs]==0.2.4 + tomte[docs]==0.2.13 commands = pip3 install git+https://github.com/pugong/mkdocs-mermaid-plugin.git#egg=mkdocs-mermaid-plugin mkdocs build --clean python -c 'print("###### Starting local server. Press Control+C to stop server ######")' @@ -265,7 +288,7 @@ commands = pip3 install git+https://github.com/pugong/mkdocs-mermaid-plugin.git# skipsdist = True skip_install = True deps = - tomte[flake8]==0.2.4 + tomte[flake8]==0.2.13 commands = flake8 aea benchmark examples packages plugins scripts tests [testenv:liccheck] @@ -280,7 +303,7 @@ commands = {toxinidir}/scripts/freeze_dependencies.py -o {envtmpdir}/requirement skipsdist = True skip_install = True deps = - tomte[mypy]==0.2.4 + tomte[mypy]==0.2.13 commands = mypy aea packages --disallow-untyped-defs mypy benchmark examples --disallow-untyped-defs mypy scripts tests plugins/aea-ledger-fetchai/aea_ledger_fetchai plugins/aea-ledger-ethereum/aea_ledger_ethereum plugins/aea-ledger-ethereum-flashbots/aea_ledger_ethereum_flashbots plugins/aea-ledger-cosmos/aea_ledger_cosmos plugins/aea-cli-ipfs/aea_cli_ipfs @@ -291,10 +314,10 @@ whitelist_externals = /usr/bin/sh skipsdist = True deps = - tomte[pylint]==0.2.4 + tomte[pylint]==0.2.13 commands = python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-ethereum - python -m pip install file://{toxinidir}/plugins/aea-ledger-ethereum-flashbots + python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-ethereum-flashbots python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-cosmos python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-fetchai python -m pip install --no-deps file://{toxinidir}/plugins/aea-ledger-solana @@ -305,21 +328,21 @@ commands = skipsdist = True skip_install = True deps = - tomte[safety]==0.2.4 + tomte[safety]==0.2.13 commands = safety check -i 37524 -i 38038 -i 37776 -i 38039 -i 39621 -i 40291 -i 39706 -i 51358 -i 51499 [testenv:vulture] skipsdist = True skip_install = True deps = - tomte[vulture]==0.2.4 + tomte[vulture]==0.2.13 commands = vulture aea scripts/whitelist.py --exclude "*_pb2.py" [testenv:darglint] skipsdist = True skip_install = True deps = - tomte[darglint]==0.2.4 + tomte[darglint]==0.2.13 commands = darglint aea benchmark examples libs packages plugins scripts [testenv:fix-doc-hashes] @@ -340,8 +363,8 @@ commands = {toxinidir}/scripts/check_doc_links.py skipsdist = True usedevelop = True deps = - tomte[isort]==0.2.4 - tomte[black]==0.2.4 + tomte[isort]==0.2.13 + tomte[black]==0.2.13 commands = pip install {toxinidir}[all] pip install --no-deps file://{toxinidir}/plugins/aea-cli-ipfs aea generate-all-protocols @@ -351,8 +374,8 @@ commands = pip install {toxinidir}[all] skipsdist = True usedevelop = True deps = - tomte[isort]==0.2.4 - tomte[black]==0.2.4 + tomte[isort]==0.2.13 + tomte[black]==0.2.13 commands = pip install {toxinidir}[all] python -m pip install --no-deps file://{toxinidir}/plugins/aea-cli-ipfs aea generate-all-protocols --check-clean @@ -391,16 +414,6 @@ passenv = * extras = all deps = {[tests-common]deps} -[testenv:py3.7] -basepython = python3.7 -deps = {[testenv_multi]deps} -commands = {[test-framework]commands} - -[testenv:packages-py3.7] -basepython = python3.7 -deps = {[testenv_multi]deps} -commands = {[test-packages]commands} - [testenv:py3.8] basepython = python3.8 deps = {[testenv_multi]deps} @@ -421,39 +434,38 @@ basepython = python3.9 deps = {[testenv_multi]deps} commands = {[test-packages]commands} -[testenv:plugins-py3.7] -basepython = python3.7 -deps = - {[testenv_multi]deps} - pytest-custom-exit-code==0.3.0 -commands = {[test-plugins]commands} - [testenv:plugins-py3.8] basepython = python3.8 deps = {[testenv_multi]deps} pytest-custom-exit-code==0.3.0 commands = {[test-plugins]commands} +; Since the ledgerwallet still uses protobufs compiled using protoc<=3.20 +setenv = + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python [testenv:plugins-py3.9] basepython = python3.9 deps = {[test-plugins-lte-3.9]deps} commands = {[test-plugins-lte-3.9]commands} +; Since the ledgerwallet still uses protobufs compiled using protoc<=3.20 +setenv = + PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python [testenv:check-api-docs] skipsdist = True usedevelop = True deps = - tomte[docs]==0.2.4 - docspec==2.0.2 - docspec-python==2.0.2 + tomte[docs]==0.2.13 + docspec==2.2.1 + docspec-python==2.2.1 commands = {toxinidir}/scripts/generate_api_docs.py --check-clean [testenv:generate-api-documentation] skipsdist = True usedevelop = True deps = - tomte[docs]==0.2.4 - docspec==2.0.2 - docspec-python==2.0.2 + tomte[docs]==0.2.13 + docspec==2.2.1 + docspec-python==2.2.1 commands = {toxinidir}/scripts/generate_api_docs.py diff --git a/user-image/Dockerfile b/user-image/Dockerfile index 9553c98b26..e7bb0f872b 100644 --- a/user-image/Dockerfile +++ b/user-image/Dockerfile @@ -1,39 +1,16 @@ -FROM ubuntu:22.04 +FROM python:3.11-slim -RUN apt-get update && apt-get upgrade -y - -RUN apt-get install sudo -y -RUN apt-get install git -y - -RUN adduser --disabled-password --gecos '' ubuntu -RUN adduser ubuntu sudo -RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -RUN apt install -y python3.10 python3.10-dev python3-pip -RUN pip3 install --upgrade pip -RUN pip3 install pipenv - -# utils -RUN apt install -y wget - -# golang -RUN wget https://dl.google.com/go/go1.13.8.linux-amd64.tar.gz && \ - tar -xzvf go1.13.8.linux-amd64.tar.gz -C /usr/local && \ - export PATH=$PATH:/usr/local/go/bin && echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc && \ - mkdir $HOME/go - -USER ubuntu - -ENV PATH="${PATH}:/usr/local/go/bin" ENV DEBIAN_FRONTEND noninteractive ENV LC_ALL C.UTF-8 ENV LANG C.UTF-8 -COPY user-image/openssl.cnf /etc/ssl +RUN apt update && apt install -y python3.11-dev python3-pip -y && apt autoremove && apt autoclean -RUN echo 'PATH="$(python3.10 -m site --user-base)/bin:${PATH}"' >> ~/.bashrc -RUN echo "alias pip=pip3" >> ~/.bashrc -RUN echo "alias python=python3.10" >> ~/.bashrc +RUN pip3 install --upgrade pip +RUN pip3 install "open-aea[all]==1.41.0.post1" open-aea-cli-ipfs==1.41.0.post1 + +COPY user-image/openssl.cnf /etc/ssl +WORKDIR /root -ENTRYPOINT [ "/bin/bash"] +ENTRYPOINT ["/bin/bash", "-c"] diff --git a/user-image/docker-env.sh b/user-image/docker-env.sh index aedd4cd22d..87147e0ddc 100644 --- a/user-image/docker-env.sh +++ b/user-image/docker-env.sh @@ -1,7 +1,7 @@ #!/bin/bash # Swap the following lines if you want to work with 'latest' -DOCKER_IMAGE_TAG=valory/open-aea-user:1.35.0 +DOCKER_IMAGE_TAG=valory/open-aea-user:1.41.0.post1 # DOCKER_IMAGE_TAG=valory/open-aea-user:latest DOCKER_BUILD_CONTEXT_DIR=..