From f4ffb83c02582efec1c141a7339269587262ec5b Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Fri, 11 Sep 2020 11:49:39 +0300 Subject: [PATCH 001/131] test multiplexer disconnected on agent process termination --- tests/test_multiplexer.py | 98 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/tests/test_multiplexer.py b/tests/test_multiplexer.py index aba61b06a3..df80ec0154 100644 --- a/tests/test_multiplexer.py +++ b/tests/test_multiplexer.py @@ -21,7 +21,9 @@ import asyncio import logging +import os import shutil +import sys import tempfile import time import unittest.mock @@ -30,9 +32,12 @@ from unittest import mock from unittest.mock import patch +from pexpect.exceptions import EOF # type: ignore + import pytest import aea +from aea.cli.core import cli from aea.configurations.base import PublicId from aea.connections.base import ConnectionStates from aea.exceptions import AEAEnforceError @@ -46,12 +51,19 @@ OutBox, ) from aea.protocols.default.message import DefaultMessage +from aea.test_tools.click_testing import CliRunner from packages.fetchai.connections.local.connection import LocalNode + +from tests.common.pexpect_popen import PexpectWrapper from tests.common.utils import wait_for_condition + from .conftest import ( + AUTHOR, + CLI_LOG_OPTION, + ROOT_DIR, UNKNOWN_CONNECTION_PUBLIC_ID, UNKNOWN_PROTOCOL_PUBLIC_ID, _make_dummy_connection, @@ -642,3 +654,89 @@ def test_stop_policy(self): wait_for_condition( lambda: self.multiplexer.connection_status.is_disconnected, timeout=5 ) + + +class TestMultiplexerDscionnectsOnTermination: # pylint: disable=attribute-defined-outside-init + """Test multiplexer disconnects on agent process keyboard interrupted.""" + + def setup(self): + """Set the test up.""" + self.proc = None + self.runner = CliRunner() + self.agent_name = "myagent" + self.cwd = os.getcwd() + self.t = tempfile.mkdtemp() + shutil.copytree(Path(ROOT_DIR, "packages"), Path(self.t, "packages")) + os.chdir(self.t) + + result = self.runner.invoke( + cli, [*CLI_LOG_OPTION, "init", "--local", "--author", AUTHOR] + ) + assert result.exit_code == 0 + + result = self.runner.invoke( + cli, [*CLI_LOG_OPTION, "create", "--local", self.agent_name] + ) + assert result.exit_code == 0 + + os.chdir(Path(self.t, self.agent_name)) + + def test_multiplexer_disconnected_on_early_interruption(self): + """Test multiplexer disconnected properly on termination before connected.""" + result = self.runner.invoke( + cli, + [ + *CLI_LOG_OPTION, + "add", + "--local", + "connection", + "fetchai/p2p_libp2p:0.8.0", + ], + ) + assert result.exit_code == 0, result.stdout_bytes + + self.proc = PexpectWrapper( # nosec + [sys.executable, "-m", "aea.cli", "-v", "DEBUG", "run"], + env=os.environ, + maxread=10000, + encoding="utf-8", + logfile=sys.stdout, + ) + + self.proc.expect_all( + ["Finished downloading golang dependencies"], timeout=20, + ) + self.proc.control_c() + self.proc.expect_all( + ["Multiplexer disconnecting...", "Multiplexer disconnected.", EOF], + timeout=20, + ) + + def test_multiplexer_disconnected_on_termination_after_connected(self): + """Test multiplexer disconnected properly on termination after connected.""" + self.proc = PexpectWrapper( # nosec + [sys.executable, "-m", "aea.cli", "-v", "DEBUG", "run"], + env=os.environ, + maxread=10000, + encoding="utf-8", + logfile=sys.stdout, + ) + + self.proc.expect_all( + ["Start processing messages..."], timeout=20, + ) + self.proc.control_c() + self.proc.expect_all( + ["Multiplexer disconnecting...", "Multiplexer disconnected.", EOF], + timeout=20, + ) + + def teardown(self): + """Tear the test down.""" + if self.proc: + self.proc.wait_to_complete(10) + os.chdir(self.cwd) + try: + shutil.rmtree(self.t) + except (OSError, IOError): + pass From c510d4e1e9b6a987044768617bc4f8b3595e5037 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 14 Sep 2020 23:37:07 +0200 Subject: [PATCH 002/131] add 'latest' version --- aea/configurations/base.py | 73 ++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 1a68f8de41..f76f147196 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -20,6 +20,7 @@ """Classes to handle AEA configurations.""" import base64 +import functools import gzip import json import pprint @@ -98,8 +99,47 @@ We cannot have two items with the same package name since the keys of a YAML object form a set. """ -PackageVersion = Type[semver.VersionInfo] -PackageVersionLike = Union[str, semver.VersionInfo] +VersionInfo = Type[semver.VersionInfo] +PackageVersionLike = Union[str, VersionInfo] + + +@functools.total_ordering +class PackageVersion: + """A package version.""" + + def __init__(self, version_like: PackageVersionLike): + """ + Initialize a package version. + + :param version_like: a string, os a semver.VersionInfo object. + """ + if version_like == "latest": + self._version = version_like + elif isinstance(version_like, str): + self._version = semver.VersionInfo.parse(version_like) + else: + raise ValueError("Version type not valid.") + + @property + def is_latest(self) -> bool: + """Check whether the version is 'latest'.""" + return self._version == "latest" + + def __str__(self) -> str: + """Get the string representation.""" + return str(self._version) + + def __eq__(self, other) -> bool: + """Check equality.""" + return isinstance(other, PackageVersion) and self._version == other._version + + def __lt__(self, other): + """Compare with another object.""" + enforce( + isinstance(other, PackageVersion), + f"Cannot compare {type(self)} with type {type(other)}.", + ) + return str(self) < str(other) class PackageType(Enum): @@ -332,11 +372,16 @@ class PublicId(JSONSerializable): >>> another_public_id = PublicId("author", "my_package", "0.1.0") >>> assert hash(public_id) == hash(another_public_id) >>> assert public_id == another_public_id + >>> latest_public_id = PublicId("author", "my_package", "latest") + >>> latest_public_id + + >>> latest_public_id.package_version.is_latest + True """ AUTHOR_REGEX = r"[a-zA-Z_][a-zA-Z0-9_]*" PACKAGE_NAME_REGEX = r"[a-zA-Z_][a-zA-Z0-9_]*" - VERSION_REGEX = r"(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?" + VERSION_REGEX = r"(latest|(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)" PUBLIC_ID_REGEX = r"^({})/({}):({})$".format( AUTHOR_REGEX, PACKAGE_NAME_REGEX, VERSION_REGEX ) @@ -348,15 +393,7 @@ def __init__(self, author: str, name: str, version: PackageVersionLike): """Initialize the public identifier.""" self._author = author self._name = name - self._version, self._version_info = self._process_version(version) - - @staticmethod - def _process_version(version_like: PackageVersionLike) -> Tuple[Any, Any]: - if isinstance(version_like, str): - return version_like, semver.VersionInfo.parse(version_like) - if isinstance(version_like, semver.VersionInfo): - return str(version_like), version_like - raise ValueError("Version type not valid.") + self._package_version = PackageVersion(version) @property def author(self) -> str: @@ -370,13 +407,13 @@ def name(self) -> str: @property def version(self) -> str: - """Get the version.""" - return self._version + """Get the version string.""" + return str(self._package_version) @property - def version_info(self) -> PackageVersion: - """Get the package version.""" - return self._version_info + def package_version(self) -> PackageVersion: + """Get the package version object.""" + return self._package_version @property def latest(self) -> str: @@ -504,7 +541,7 @@ def __lt__(self, other): and self.author == other.author and self.name == other.name ): - return self.version_info < other.version_info + return self.package_version < other.package_version raise ValueError( "The public IDs {} and {} cannot be compared. Their author or name attributes are different.".format( self, other From 597fb46c732d6a591d407f4e549571af3b84d973 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 14 Sep 2020 23:40:50 +0200 Subject: [PATCH 003/131] make 'latest' the default --- aea/configurations/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index f76f147196..320adcc3e0 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -389,7 +389,7 @@ class PublicId(JSONSerializable): AUTHOR_REGEX, PACKAGE_NAME_REGEX, VERSION_REGEX ) - def __init__(self, author: str, name: str, version: PackageVersionLike): + def __init__(self, author: str, name: str, version: PackageVersionLike = "latest"): """Initialize the public identifier.""" self._author = author self._name = name From f7cc4ae936eb6a714f74b1bf12cb8a53aed10f9d Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 15 Sep 2020 13:26:59 +0200 Subject: [PATCH 004/131] update public id construction with 'latest' --- aea/configurations/base.py | 38 ++++++++++++++++++-------- tests/test_configurations/test_base.py | 17 +++++++++++- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 320adcc3e0..8cbdc43bb2 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -99,24 +99,28 @@ We cannot have two items with the same package name since the keys of a YAML object form a set. """ -VersionInfo = Type[semver.VersionInfo] -PackageVersionLike = Union[str, VersionInfo] +VersionInfoClass = semver.VersionInfo +PackageVersionLike = Union[str, semver.VersionInfo] @functools.total_ordering class PackageVersion: """A package version.""" + _version: PackageVersionLike + def __init__(self, version_like: PackageVersionLike): """ Initialize a package version. :param version_like: a string, os a semver.VersionInfo object. """ - if version_like == "latest": + if isinstance(version_like, str) and version_like == "latest": self._version = version_like elif isinstance(version_like, str): - self._version = semver.VersionInfo.parse(version_like) + self._version = VersionInfoClass.parse(version_like) + elif isinstance(version_like, VersionInfoClass): + self._version = version_like else: raise ValueError("Version type not valid.") @@ -139,6 +143,9 @@ def __lt__(self, other): isinstance(other, PackageVersion), f"Cannot compare {type(self)} with type {type(other)}.", ) + other = cast(PackageVersion, other) + if self.is_latest or other.is_latest: + return self.is_latest < other.is_latest return str(self) < str(other) @@ -382,18 +389,26 @@ class PublicId(JSONSerializable): AUTHOR_REGEX = r"[a-zA-Z_][a-zA-Z0-9_]*" PACKAGE_NAME_REGEX = r"[a-zA-Z_][a-zA-Z0-9_]*" VERSION_REGEX = r"(latest|(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)" - PUBLIC_ID_REGEX = r"^({})/({}):({})$".format( + PUBLIC_ID_REGEX = r"^({})/({})(:({}))?$".format( AUTHOR_REGEX, PACKAGE_NAME_REGEX, VERSION_REGEX ) PUBLIC_ID_URI_REGEX = r"^({})/({})/({})$".format( AUTHOR_REGEX, PACKAGE_NAME_REGEX, VERSION_REGEX ) - def __init__(self, author: str, name: str, version: PackageVersionLike = "latest"): + LATEST_VERSION = "latest" + + def __init__( + self, author: str, name: str, version: Optional[PackageVersionLike] = None + ): """Initialize the public identifier.""" self._author = author self._name = name - self._package_version = PackageVersion(version) + self._package_version = ( + PackageVersion(version) + if version is not None + else PackageVersion(self.LATEST_VERSION) + ) @property def author(self) -> str: @@ -438,13 +453,14 @@ def from_str(cls, public_id_string: str) -> "PublicId": :return: the public id object. :raises ValueError: if the string in input is not well formatted. """ - if not re.match(cls.PUBLIC_ID_REGEX, public_id_string): + match = re.match(cls.PUBLIC_ID_REGEX, public_id_string) + if match is None: raise ValueError( "Input '{}' is not well formatted.".format(public_id_string) ) - username, package_name, version = re.findall( - cls.PUBLIC_ID_REGEX, public_id_string - )[0][:3] + username = match.group(1) + package_name = match.group(2) + version = match.group(3)[1:] if ":" in public_id_string else None return PublicId(username, package_name, version) @classmethod diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index d9dba67f12..6da2b38d32 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -256,7 +256,7 @@ def test__get_default_configuration_file_name_from_type_positive(self): class PublicIdTestCase(TestCase): """Test case for PublicId class.""" - @mock.patch("aea.configurations.base.re.match", return_value=False) + @mock.patch("aea.configurations.base.re.match", return_value=None) def test_public_id_from_str_not_matching(self, *mocks): """Test case for from_str method regex not matching.""" with self.assertRaises(ValueError): @@ -427,6 +427,21 @@ def test_public_id_invalid_version(): PublicId("author", "name", object()) +def test_public_id_from_string(): + """Test parsing the public id from string.""" + public_id = PublicId.from_str("author/package:0.1.0") + assert public_id.author == "author" + assert public_id.name == "package" + assert public_id.version == "0.1.0" + + +def test_public_id_from_string_without_version_string(): + public_id = PublicId.from_str("author/package") + assert public_id.author == "author" + assert public_id.name == "package" + assert public_id.version == "latest" + + def test_public_id_from_uri_path(): """Test PublicId.from_uri_path""" result = PublicId.from_uri_path("author/package_name/0.1.0") From ea7c0798365014cb5f93d7efe2a0d8a01fb8680a Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 15 Sep 2020 19:58:55 +0200 Subject: [PATCH 005/131] update registry module to support 'latest' tag --- aea/configurations/base.py | 6 +- aea/registries/base.py | 218 ++++++++++++++++++++------- tests/test_registries/test_base.py | 27 +++- tests/test_registries/test_filter.py | 2 +- 4 files changed, 196 insertions(+), 57 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 8cbdc43bb2..390a572cd0 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -127,7 +127,7 @@ def __init__(self, version_like: PackageVersionLike): @property def is_latest(self) -> bool: """Check whether the version is 'latest'.""" - return self._version == "latest" + return isinstance(self._version, str) and self._version == "latest" def __str__(self) -> str: """Get the string representation.""" @@ -435,6 +435,10 @@ def latest(self) -> str: """Get the public id in `latest` form.""" return "{author}/{name}:*".format(author=self.author, name=self.name) + def same_prefix(self, other: "PublicId") -> bool: + """Check if the other public id has the same author and name of this.""" + return self.name == other.name and self.author == other.author + @classmethod def from_str(cls, public_id_string: str) -> "PublicId": """ diff --git a/aea/registries/base.py b/aea/registries/base.py index 60fce0f86f..dd86426a8a 100644 --- a/aea/registries/base.py +++ b/aea/registries/base.py @@ -22,6 +22,7 @@ import copy import logging from abc import ABC, abstractmethod +from operator import itemgetter from typing import Dict, Generic, List, Optional, Set, Tuple, TypeVar, cast from aea.components.base import Component @@ -58,7 +59,7 @@ def register( :param item_id: the public id of the item. :param item: the item. - :param is_dynamicall_added: whether or not the item is dynamicall added. + :param is_dynamically_added: whether or not the item is dynamically added. :return: None :raises: ValueError if an item is already registered with that item id. """ @@ -90,6 +91,14 @@ def fetch_all(self) -> List[Item]: :return: the list of items. """ + @abstractmethod + def ids(self) -> Set[ItemId]: + """ + Return the set of all the used item ids. + + :return: the set of item ids. + """ + @abstractmethod def setup(self) -> None: """ @@ -107,6 +116,71 @@ def teardown(self) -> None: """ +class PublicIdRegistry(Generic[Item], Registry[PublicId, Item]): + """ + This class implement a registry whose keys are public ids. + + In particular, it is able to handle the case when the public id + points to the 'latest' version of a package. + """ + + def __init__(self): + """Initialize the registry.""" + super().__init__() + self._public_id_to_item: Dict[PublicId, Item] = {} + + def register( # pylint: disable=arguments-differ,unused-argument + self, public_id: PublicId, item: Item, is_dynamically_added: bool = False + ) -> None: + """Register an item.""" + if public_id.package_version.is_latest: + raise ValueError( + f"Cannot register item with public id 'latest': {public_id}" + ) + if public_id in self._public_id_to_item: + raise ValueError(f"Item already registered with item id '{public_id}'") + self._public_id_to_item[public_id] = item + + def unregister(self, public_id: PublicId) -> None: + """Unregister an item.""" + if public_id not in self._public_id_to_item: + raise ValueError(f"No item registered with item id '{public_id}'") + self._public_id_to_item.pop(public_id) + + def fetch(self, public_id: PublicId) -> Optional[Item]: + """ + Fetch an item associated with a public id. + + :param public_id: the public id. + :return: an item, or None if the key is not present. + """ + if public_id.package_version.is_latest: + filtered_records: List[Tuple[PublicId, Item]] = list( + filter( + lambda x: public_id.same_prefix(x[0]), + self._public_id_to_item.items(), + ) + ) + if len(filtered_records) == 0: + return None + return max(filtered_records, key=itemgetter(0))[1] + return self._public_id_to_item.get(public_id, None) + + def fetch_all(self) -> List[Item]: + """Fetch all the items.""" + return list(self._public_id_to_item.values()) + + def ids(self) -> Set[PublicId]: + """Get all the item ids.""" + return set(self._public_id_to_item.keys()) + + def setup(self) -> None: + """Set up the items.""" + + def teardown(self) -> None: + """Tear down the items.""" + + class AgentComponentRegistry(Registry[ComponentId, Component]): """This class implements a simple dictionary-based registry for agent components.""" @@ -131,7 +205,7 @@ def register( # pylint: disable=arguments-differ,unused-argument :param component_id: the id of the component. :param component: the component object. - :param is_dynamicall_added: whether or not the item is dynamicall added. + :param is_dynamically_added: whether or not the item is dynamically added. """ if component_id in self._registered_keys: raise ValueError( @@ -222,6 +296,10 @@ def fetch_by_type(self, component_type: ComponentType) -> List[Component]: """ return list(self._components_by_type.get(component_type, {}).values()) + def ids(self) -> Set[ComponentId]: + """Get the item ids.""" + return self._registered_keys + def setup(self) -> None: """ Set up the registry. @@ -251,8 +329,10 @@ def __init__(self) -> None: :return: None """ super().__init__() - self._items = {} # type: Dict[SkillId, Dict[str, SkillComponentType]] - self._dynamically_added = {} # type: Dict[SkillId, Set[str]] + self._items: PublicIdRegistry[ + Dict[str, SkillComponentType] + ] = PublicIdRegistry() + self._dynamically_added: Dict[SkillId, Set[str]] = {} def register( self, @@ -265,19 +345,25 @@ def register( :param item_id: a pair (skill id, item name). :param item: the item to register. - :param is_dynamicall_added: whether or not the item is dynamicall added. + :param is_dynamically_added: whether or not the item is dynamically added. :return: None :raises: ValueError if an item is already registered with that item id. """ skill_id = item_id[0] item_name = item_id[1] - if item_name in self._items.get(skill_id, {}).keys(): + skill_items = self._items.fetch(skill_id) + if skill_items is not None and item_name in skill_items.keys(): raise ValueError( - "Item already registered with skill id '{}' and name '{}'".format( - skill_id, item_name - ) + f"Item already registered with skill id '{skill_id}' and name '{item_name}'" ) - self._items.setdefault(skill_id, {})[item_name] = item + + if skill_items is not None: + self._items.unregister(skill_id) + else: + skill_items = {} + skill_items[item_name] = item + self._items.register(skill_id, skill_items) + if is_dynamically_added: self._dynamically_added.setdefault(skill_id, set()).add(item_name) @@ -303,15 +389,18 @@ def _unregister_from_main_index( """ skill_id = item_id[0] item_name = item_id[1] - name_to_item = self._items.get(skill_id, {}) - if item_name not in name_to_item: + name_to_item = self._items.fetch(skill_id) + if name_to_item is None or item_name not in name_to_item: raise ValueError( "No item registered with component id '{}'".format(item_id) ) self.logger.debug("Unregistering item with id {}".format(item_id)) item = name_to_item.pop(item_name) if len(name_to_item) == 0: - self._items.pop(skill_id, None) + self._items.unregister(skill_id) + else: + self._items.unregister(skill_id) + self._items.register(skill_id, name_to_item) items = self._dynamically_added.get(skill_id, None) if items is not None: @@ -329,27 +418,39 @@ def fetch(self, item_id: Tuple[SkillId, str]) -> Optional[SkillComponentType]: """ skill_id = item_id[0] item_name = item_id[1] - return self._items.get(skill_id, {}).get(item_name, None) + name_to_item = self._items.fetch(skill_id) + if name_to_item is None: + return None + return name_to_item.get(item_name, None) def fetch_by_skill(self, skill_id: SkillId) -> List[Item]: """Fetch all the items of a given skill.""" - return [*self._items.get(skill_id, {}).values()] + temp = self._items.fetch(skill_id) + name_to_item = {} if temp is None else temp + return list(name_to_item.values()) def fetch_all(self) -> List[SkillComponentType]: """Fetch all the items.""" - return [ - item for skill_id, items in self._items.items() for item in items.values() - ] + return [item for items in self._items.fetch_all() for item in items.values()] def unregister_by_skill(self, skill_id: SkillId) -> None: """Unregister all the components by skill.""" - if skill_id not in self._items: + if skill_id not in self._items.ids(): raise ValueError( "No component of skill {} present in the registry.".format(skill_id) ) - self._items.pop(skill_id, None) + self._items.unregister(skill_id) self._dynamically_added.pop(skill_id, None) + def ids(self) -> Set[Tuple[SkillId, str]]: + """Get the item ids.""" + result: Set[Tuple[SkillId, str]] = set() + for skill_id in self._items.ids(): + name_to_item = self._items.fetch(skill_id) + for name, _ in name_to_item.items(): + result.add((skill_id, name)) + return result + def setup(self) -> None: """ Set up the items in the registry. @@ -377,14 +478,14 @@ def teardown(self) -> None: :return: None """ - for skill_id, items in self._items.items(): - for _, item in items.items(): + for name_to_items in self._items.fetch_all(): + for _, item in name_to_items.items(): try: item.teardown() except Exception as e: # pragma: nocover # pylint: disable=broad-except self.logger.warning( "An error occurred while tearing down item {}/{}: {}".format( - skill_id, type(item).__name__, str(e) + item.skill_id, type(item).__name__, str(e) ) ) _dynamically_added = copy.deepcopy(self._dynamically_added) @@ -403,9 +504,10 @@ def __init__(self) -> None: :return: None """ super().__init__() - self._items_by_protocol_and_skill = ( - {} - ) # type: Dict[ProtocolId, Dict[SkillId, Handler]] + # nested public id registries; one for protocol ids, one for skill ids + self._items_by_protocol_and_skill = PublicIdRegistry[ + PublicIdRegistry[Handler] + ]() def register( self, @@ -418,36 +520,39 @@ def register( :param item_id: the item id. :param item: the handler. - :param is_dynamicall_added: whether or not the item is dynamicall added. + :param is_dynamically_added: whether or not the item is dynamically added. :return: None :raises ValueError: if the protocol is None, or an item with pair (skill_id, protocol_id_ already exists. """ - super().register(item_id, item, is_dynamically_added=is_dynamically_added) - skill_id = item_id[0] protocol_id = item.SUPPORTED_PROTOCOL if protocol_id is None: - super().unregister(item_id) raise ValueError( "Please specify a supported protocol for handler class '{}'".format( item.__class__.__name__ ) ) - protocol_handlers_by_skill = self._items_by_protocol_and_skill.get( - protocol_id, {} + protocol_handlers_by_skill = self._items_by_protocol_and_skill.fetch( + protocol_id ) - if skill_id in protocol_handlers_by_skill: + if ( + protocol_handlers_by_skill is not None + and skill_id in protocol_handlers_by_skill.ids() + ): # clean up previous modifications done by super().register - super().unregister(item_id) raise ValueError( "A handler already registered with pair of protocol id {} and skill id {}".format( protocol_id, skill_id ) ) - - self._items_by_protocol_and_skill.setdefault(protocol_id, {})[skill_id] = item + if protocol_handlers_by_skill is None: + # registry from skill ids to handlers. + new_registry = PublicIdRegistry() + self._items_by_protocol_and_skill.register(protocol_id, new_registry) + self._items_by_protocol_and_skill.fetch(protocol_id).register(skill_id, item) + super().register(item_id, item, is_dynamically_added=is_dynamically_added) def unregister(self, item_id: Tuple[SkillId, str]) -> None: """ @@ -462,29 +567,34 @@ def unregister(self, item_id: Tuple[SkillId, str]) -> None: # remove from index by protocol and skill protocol_id = cast(ProtocolId, handler.SUPPORTED_PROTOCOL) - protocol_handlers_by_skill = self._items_by_protocol_and_skill.get( - protocol_id, {} + protocol_handlers_by_skill = self._items_by_protocol_and_skill.fetch( + protocol_id ) - protocol_handlers_by_skill.pop(skill_id, None) - if len(protocol_handlers_by_skill) == 0: - self._items_by_protocol_and_skill.pop(protocol_id, None) + protocol_handlers_by_skill.unregister(skill_id) + if len(protocol_handlers_by_skill.ids()) == 0: + self._items_by_protocol_and_skill.unregister(protocol_id) def unregister_by_skill(self, skill_id: SkillId) -> None: """Unregister all the components by skill.""" # unregister from the main index. - if skill_id not in self._items: + if skill_id not in self._items.ids(): raise ValueError( "No component of skill {} present in the registry.".format(skill_id) ) self._dynamically_added.pop(skill_id, None) - handlers = self._items.pop(skill_id).values() + handlers = self._items.fetch(skill_id).values() + self._items.unregister(skill_id) # unregister from the protocol-skill index for handler in handlers: protocol_id = cast(ProtocolId, handler.SUPPORTED_PROTOCOL) - self._items_by_protocol_and_skill.get(protocol_id, {}).pop(skill_id, None) + if protocol_id in self._items_by_protocol_and_skill.ids(): + skill_id_to_handler = self._items_by_protocol_and_skill.fetch( + protocol_id + ) + skill_id_to_handler.unregister(skill_id) def fetch_by_protocol(self, protocol_id: ProtocolId) -> List[Handler]: """ @@ -493,12 +603,15 @@ def fetch_by_protocol(self, protocol_id: ProtocolId) -> List[Handler]: :param protocol_id: the protocol id :return: the handlers registered for the protocol_id and skill_id """ - protocol_handlers_by_skill = self._items_by_protocol_and_skill.get( - protocol_id, {} + if protocol_id not in self._items_by_protocol_and_skill.ids(): + return [] + + protocol_handlers_by_skill = self._items_by_protocol_and_skill.fetch( + protocol_id ) handlers = [ - protocol_handlers_by_skill[skill_id] - for skill_id in protocol_handlers_by_skill + protocol_handlers_by_skill.fetch(skill_id) + for skill_id in protocol_handlers_by_skill.ids() ] return handlers @@ -512,6 +625,9 @@ def fetch_by_protocol_and_skill( :param skill_id: the skill id. :return: the handlers registered for the protocol_id and skill_id """ - return self._items_by_protocol_and_skill.get(protocol_id, {}).get( - skill_id, None - ) + if protocol_id not in self._items_by_protocol_and_skill.ids(): + return None + protocols_by_skill_id = self._items_by_protocol_and_skill.fetch(protocol_id) + if skill_id not in protocols_by_skill_id.ids(): + return None + return protocols_by_skill_id.fetch(skill_id) diff --git a/tests/test_registries/test_base.py b/tests/test_registries/test_base.py index 29f86eacec..5287d409e8 100644 --- a/tests/test_registries/test_base.py +++ b/tests/test_registries/test_base.py @@ -639,6 +639,23 @@ def test_setup_with_inactive_skill(self): f"Ignoring setup() of component {mock_item.name} of skill {mock_item.skill_id}, because the skill is not active." ) + def test_fetch_with_latest_version(self): + """Test fetch with public id :latest version.""" + item_id_1 = PublicId("author", "package", "0.1.0") + item_id_2 = PublicId("author", "package", "0.2.0") + item_id_latest = PublicId("author", "package") + name = "name" + self.registry.register((item_id_1, name), MagicMock(id=1)) + self.registry.register((item_id_2, name), MagicMock(id=2)) + + latest = self.registry.fetch((item_id_latest, name)) + assert latest is not None + assert latest.id == 2 + + # restore previous state + self.registry.unregister((item_id_1, name)) + self.registry.unregister((item_id_2, name)) + class TestHandlerRegistry: """Test handler registry.""" @@ -653,7 +670,7 @@ def test_register_and_unregister_dynamically(self): assert len(self.registry._dynamically_added) == 0 self.registry.register( (PublicId.from_str("author/name:0.1.0"), "name"), - MagicMock(SUPPORTED_PROTOCOL="author/protocol:0.1.0"), + MagicMock(SUPPORTED_PROTOCOL=PublicId.from_str("author/protocol:0.1.0")), is_dynamically_added=True, ) assert len(self.registry._dynamically_added) == 1 @@ -665,7 +682,7 @@ def test_register_and_teardown_dynamically(self): assert len(self.registry._dynamically_added) == 0 self.registry.register( (PublicId.from_str("author/name:0.1.0"), "name"), - MagicMock(SUPPORTED_PROTOCOL="author/protocol:0.1.0"), + MagicMock(SUPPORTED_PROTOCOL=PublicId.from_str("author/protocol:0.1.0")), is_dynamically_added=True, ) assert len(self.registry._dynamically_added) == 1 @@ -686,7 +703,9 @@ def test_register_when_skill_protocol_id_exist(self): """Test register when protocol id is None.""" skill_id = PublicId.from_str("author/name:0.1.0") protocol_id = PublicId.from_str("author/name:0.1.0") - self.registry._items_by_protocol_and_skill[protocol_id] = {skill_id: object()} + self.registry.register( + (skill_id, "name"), MagicMock(SUPPORTED_PROTOCOL=protocol_id) + ) with pytest.raises( ValueError, match="A handler already registered with pair of protocol id .* and skill id .*", @@ -694,7 +713,7 @@ def test_register_when_skill_protocol_id_exist(self): self.registry.register( (skill_id, "name"), MagicMock(SUPPORTED_PROTOCOL=protocol_id) ) - self.registry._items_by_protocol_and_skill = {} + self.registry.unregister((skill_id, "name")) def test_unregister_when_no_item_is_registered(self): """Test unregister when there is no item with that item id.""" diff --git a/tests/test_registries/test_filter.py b/tests/test_registries/test_filter.py index eb28fd0f12..735d745bc4 100644 --- a/tests/test_registries/test_filter.py +++ b/tests/test_registries/test_filter.py @@ -99,7 +99,7 @@ def test_handle_internal_message_when_no_handler(self): def test_handle_internal_message_when_invalid_to(self): """Test handle internal message when the message has an invalid to.""" msg = MagicMock() - msg.to = "author/name" + msg.to = "author!name" with unittest.mock.patch.object( aea.registries.filter.logger, "warning" ) as mock_logger_warning: From 23eb3825f3269e4f8bcecb88c8126cfc69b44420 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 15 Sep 2020 22:12:18 +0200 Subject: [PATCH 006/131] fix static checks --- aea/registries/base.py | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/aea/registries/base.py b/aea/registries/base.py index dd86426a8a..98ba2fff37 100644 --- a/aea/registries/base.py +++ b/aea/registries/base.py @@ -423,10 +423,10 @@ def fetch(self, item_id: Tuple[SkillId, str]) -> Optional[SkillComponentType]: return None return name_to_item.get(item_name, None) - def fetch_by_skill(self, skill_id: SkillId) -> List[Item]: + def fetch_by_skill(self, skill_id: SkillId) -> List[SkillComponentType]: """Fetch all the items of a given skill.""" - temp = self._items.fetch(skill_id) - name_to_item = {} if temp is None else temp + temp: Optional[Dict[str, SkillComponentType]] = self._items.fetch(skill_id) + name_to_item: Dict[str, SkillComponentType] = {} if temp is None else temp return list(name_to_item.values()) def fetch_all(self) -> List[SkillComponentType]: @@ -446,7 +446,9 @@ def ids(self) -> Set[Tuple[SkillId, str]]: """Get the item ids.""" result: Set[Tuple[SkillId, str]] = set() for skill_id in self._items.ids(): - name_to_item = self._items.fetch(skill_id) + name_to_item = cast( + Dict[str, SkillComponentType], self._items.fetch(skill_id) + ) for name, _ in name_to_item.items(): result.add((skill_id, name)) return result @@ -549,9 +551,10 @@ def register( ) if protocol_handlers_by_skill is None: # registry from skill ids to handlers. - new_registry = PublicIdRegistry() + new_registry: PublicIdRegistry = PublicIdRegistry() self._items_by_protocol_and_skill.register(protocol_id, new_registry) - self._items_by_protocol_and_skill.fetch(protocol_id).register(skill_id, item) + registry = cast(Registry, self._items_by_protocol_and_skill.fetch(protocol_id)) + registry.register(skill_id, item) super().register(item_id, item, is_dynamically_added=is_dynamically_added) def unregister(self, item_id: Tuple[SkillId, str]) -> None: @@ -567,8 +570,8 @@ def unregister(self, item_id: Tuple[SkillId, str]) -> None: # remove from index by protocol and skill protocol_id = cast(ProtocolId, handler.SUPPORTED_PROTOCOL) - protocol_handlers_by_skill = self._items_by_protocol_and_skill.fetch( - protocol_id + protocol_handlers_by_skill = cast( + PublicIdRegistry, self._items_by_protocol_and_skill.fetch(protocol_id) ) protocol_handlers_by_skill.unregister(skill_id) if len(protocol_handlers_by_skill.ids()) == 0: @@ -584,15 +587,16 @@ def unregister_by_skill(self, skill_id: SkillId) -> None: self._dynamically_added.pop(skill_id, None) - handlers = self._items.fetch(skill_id).values() + handlers = cast(Dict[str, Handler], self._items.fetch(skill_id)).values() self._items.unregister(skill_id) # unregister from the protocol-skill index for handler in handlers: protocol_id = cast(ProtocolId, handler.SUPPORTED_PROTOCOL) if protocol_id in self._items_by_protocol_and_skill.ids(): - skill_id_to_handler = self._items_by_protocol_and_skill.fetch( - protocol_id + skill_id_to_handler = cast( + PublicIdRegistry, + self._items_by_protocol_and_skill.fetch(protocol_id), ) skill_id_to_handler.unregister(skill_id) @@ -606,11 +610,11 @@ def fetch_by_protocol(self, protocol_id: ProtocolId) -> List[Handler]: if protocol_id not in self._items_by_protocol_and_skill.ids(): return [] - protocol_handlers_by_skill = self._items_by_protocol_and_skill.fetch( - protocol_id + protocol_handlers_by_skill = cast( + PublicIdRegistry, self._items_by_protocol_and_skill.fetch(protocol_id) ) handlers = [ - protocol_handlers_by_skill.fetch(skill_id) + cast(Handler, protocol_handlers_by_skill.fetch(skill_id)) for skill_id in protocol_handlers_by_skill.ids() ] return handlers @@ -627,7 +631,9 @@ def fetch_by_protocol_and_skill( """ if protocol_id not in self._items_by_protocol_and_skill.ids(): return None - protocols_by_skill_id = self._items_by_protocol_and_skill.fetch(protocol_id) + protocols_by_skill_id = cast( + PublicIdRegistry, self._items_by_protocol_and_skill.fetch(protocol_id) + ) if skill_id not in protocols_by_skill_id.ids(): return None return protocols_by_skill_id.fetch(skill_id) From 26e4eb29f2f3c2ff937b11a3d90adf03513ef9ff Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 15 Sep 2020 22:35:05 +0200 Subject: [PATCH 007/131] make 'latest' query test more robust --- tests/test_registries/test_base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_registries/test_base.py b/tests/test_registries/test_base.py index 5287d409e8..d198068de4 100644 --- a/tests/test_registries/test_base.py +++ b/tests/test_registries/test_base.py @@ -643,18 +643,21 @@ def test_fetch_with_latest_version(self): """Test fetch with public id :latest version.""" item_id_1 = PublicId("author", "package", "0.1.0") item_id_2 = PublicId("author", "package", "0.2.0") + item_id_3 = PublicId("author", "package", "0.3.0") item_id_latest = PublicId("author", "package") name = "name" self.registry.register((item_id_1, name), MagicMock(id=1)) + self.registry.register((item_id_3, name), MagicMock(id=3)) self.registry.register((item_id_2, name), MagicMock(id=2)) latest = self.registry.fetch((item_id_latest, name)) assert latest is not None - assert latest.id == 2 + assert latest.id == 3 # restore previous state self.registry.unregister((item_id_1, name)) self.registry.unregister((item_id_2, name)) + self.registry.unregister((item_id_3, name)) class TestHandlerRegistry: From d847a6f907d2dd0b1d369d68b2a2db7e79af34da Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 16 Sep 2020 11:34:22 +0200 Subject: [PATCH 008/131] update add and fetch to deal with 'latest' tag --- aea/cli/fetch.py | 7 +++++-- aea/cli/utils/package_utils.py | 5 ++++- aea/configurations/schemas/definitions.json | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/aea/cli/fetch.py b/aea/cli/fetch.py index f56b4a70ad..05d8a076f7 100644 --- a/aea/cli/fetch.py +++ b/aea/cli/fetch.py @@ -57,11 +57,14 @@ def _is_version_correct(ctx: Context, agent_public_id: PublicId) -> bool: Compare agent version to the one in public ID. :param ctx: Context object. - :param public_id: public ID of an agent. + :param agent_public_id: public ID of an agent. :return: bool is version correct. """ - return ctx.agent_config.version == agent_public_id.version + return ( + agent_public_id.package_version.is_latest + or ctx.agent_config.version == agent_public_id.version + ) @clean_after diff --git a/aea/cli/utils/package_utils.py b/aea/cli/utils/package_utils.py index 32d0727958..bf3a7b91c2 100644 --- a/aea/cli/utils/package_utils.py +++ b/aea/cli/utils/package_utils.py @@ -258,7 +258,10 @@ def find_item_locally(ctx, item_type, item_public_id) -> Path: # check that the configuration file of the found package matches the expected author and version. version = item_configuration.version author = item_configuration.author - if item_public_id.author != author or item_public_id.version != version: + if item_public_id.author != author or ( + not item_public_id.package_version.is_latest + and item_public_id.version != version + ): raise click.ClickException( "Cannot find {} with author and version specified.".format(item_type) ) diff --git a/aea/configurations/schemas/definitions.json b/aea/configurations/schemas/definitions.json index c723ad8584..6f956b5d10 100644 --- a/aea/configurations/schemas/definitions.json +++ b/aea/configurations/schemas/definitions.json @@ -79,7 +79,7 @@ }, "public_id": { "type": "string", - "pattern": "^[a-zA-Z0-9_]*/[a-zA-Z_][a-zA-Z0-9_]*:(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + "pattern": "^[a-zA-Z0-9_]*/[a-zA-Z_][a-zA-Z0-9_]*:(latest|(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$" }, "version_specifiers": { "type": "string", From df9c61cd5b574b1c800cd82530f2302e1e43cf61 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 17 Sep 2020 23:27:07 +0100 Subject: [PATCH 009/131] add more docstring linter options --- aea/cli/utils/generic.py | 1 + aea/cli_gui/__init__.py | 12 +- aea/crypto/cosmos.py | 12 +- aea/crypto/fetchai.py | 4 +- aea/helpers/async_utils.py | 4 +- aea/helpers/multiaddr/base.py | 29 +++-- aea/helpers/pipe.py | 106 +++++++++--------- aea/helpers/transaction/base.py | 16 +++ aea/protocols/generator/base.py | 3 + aea/skills/base.py | 3 +- docs/agent-vs-aea.md | 11 ++ docs/build-aea-programmatically.md | 2 + docs/cli-vs-programmatic-aeas.md | 2 + docs/decision-maker-transaction.md | 2 + docs/multiplexer-standalone.md | 2 + docs/standalone-transaction.md | 2 + examples/gym_ex/proxy/agent.py | 6 + examples/gym_ex/proxy/env.py | 2 - .../connections/ledger/connection.yaml | 2 +- .../connections/ledger/contract_dispatcher.py | 6 +- .../connections/p2p_libp2p/connection.py | 18 +-- .../connections/p2p_libp2p/connection.yaml | 2 +- .../p2p_libp2p_client/connection.py | 11 +- .../p2p_libp2p_client/connection.yaml | 2 +- .../fetchai/contracts/erc1155/contract.py | 3 + .../fetchai/contracts/erc1155/contract.yaml | 2 +- .../protocols/contract_api/custom_types.py | 2 + .../protocols/contract_api/protocol.yaml | 2 +- .../fetchai/protocols/gym/custom_types.py | 1 + packages/fetchai/protocols/gym/protocol.yaml | 2 +- packages/fetchai/skills/ml_train/ml_model.py | 10 ++ packages/fetchai/skills/ml_train/skill.yaml | 2 +- .../fetchai/skills/tac_negotiation/skill.yaml | 2 +- .../skills/tac_negotiation/strategy.py | 1 + packages/hashes.csv | 16 +-- scripts/acn/run_acn_node_standalone.py | 28 ++--- scripts/check_copyright_notice.py | 1 + scripts/check_package_versions_in_docs.py | 6 +- scripts/deploy_to_registry.py | 4 +- scripts/freeze_dependencies.py | 4 +- scripts/generate_api_docs.py | 4 +- scripts/generate_ipfs_hashes.py | 7 +- scripts/parse_main_dependencies_from_lock.py | 5 +- scripts/update_package_versions.py | 3 +- scripts/update_symlinks_cross_platform.py | 4 +- setup.cfg | 7 +- tests/common/mocks.py | 2 + tests/data/custom_crypto.py | 41 +++++++ tests/data/dummy_contract/contract.py | 1 + tests/data/dummy_contract/contract.yaml | 2 +- tests/data/hashes.csv | 2 +- tests/test_aea_builder.py | 3 +- tests/test_agent.py | 1 + tests/test_cli/tools_for_testing.py | 1 + tests/test_components/test_base.py | 1 + tests/test_components/test_loader.py | 19 +--- tests/test_configurations/test_aea_config.py | 10 +- tests/test_configurations/test_base.py | 4 +- tests/test_contracts/test_base.py | 1 + tests/test_crypto/test_fetchai.py | 4 + .../test_agent_vs_aea/agent_code_block.py | 11 ++ .../programmatic_aea.py | 2 + .../programmatic_aea.py | 2 + .../decision_maker_transaction.py | 2 + .../test_decision_maker_transaction.py | 1 + .../multiplexer_standalone.py | 2 + .../test_orm_integration.py | 5 +- .../standalone_transaction.py | 2 + ..._client_connection_to_aries_cloud_agent.py | 3 + tests/test_helpers/test_multiaddr.py | 2 + tests/test_helpers/test_pipe/test_pipe.py | 4 + .../test_p2p_libp2p/test_aea_cli.py | 2 + .../test_p2p_libp2p/test_communication.py | 12 ++ .../test_p2p_libp2p/test_errors.py | 9 +- .../test_p2p_libp2p/test_fault_tolerance.py | 4 + .../test_p2p_libp2p/test_public_dht.py | 8 ++ .../test_p2p_libp2p_client/test_aea_cli.py | 2 + .../test_communication.py | 12 ++ .../test_p2p_libp2p_client/test_errors.py | 3 + .../test_soef/test_soef_integration.py | 1 + .../test_erc1155/test_contract.py | 10 ++ tests/test_protocols/test_base.py | 2 + .../test_protocols/test_dialogue/test_base.py | 1 + tests/test_protocols/test_generator/common.py | 1 + .../test_generator/test_common.py | 3 + .../test_extract_specification.py | 1 + .../test_generator/test_generator.py | 1 + tests/test_skills/test_behaviours.py | 11 ++ tests/test_task.py | 3 + 89 files changed, 392 insertions(+), 198 deletions(-) diff --git a/aea/cli/utils/generic.py b/aea/cli/utils/generic.py index 8e4ba55a10..f7e0e72757 100644 --- a/aea/cli/utils/generic.py +++ b/aea/cli/utils/generic.py @@ -73,6 +73,7 @@ def load_yaml(filepath: str) -> Dict: def is_readme_present(readme_path: str) -> bool: """ Check is readme file present. + This method is needed for proper testing. :param readme_path: path to readme file. diff --git a/aea/cli_gui/__init__.py b/aea/cli_gui/__init__.py index 9045f97d1d..0917193f44 100644 --- a/aea/cli_gui/__init__.py +++ b/aea/cli_gui/__init__.py @@ -23,7 +23,7 @@ import subprocess # nosec import sys import threading -from typing import Dict, List +from typing import Any, Dict, List, Tuple from click import ClickException @@ -232,9 +232,13 @@ def remove_local_item(agent_id: str, item_type: str, item_id: str): return agent_id, 201 # 200 (OK) -def get_local_items(agent_id: str, item_type: str): +def get_local_items(agent_id: str, item_type: str) -> Tuple[List[Dict[Any, Any]], int]: + """ + Return a list of protocols, skills or connections supported by a local agent. - """Return a list of protocols, skills or connections supported by a local agent.""" + :param agent_id: the id of the agent + :param item_type: the type of item + """ if agent_id == "NONE": return [], 200 # 200 (Success) @@ -244,7 +248,7 @@ def get_local_items(agent_id: str, item_type: str): try_to_load_agent_config(ctx) result = cli_list_agent_items(ctx, item_type) except ClickException: - return {"detail": "Failed to list agent items."}, 400 # 400 Bad request + return [{"detail": "Failed to list agent items."}], 400 # 400 Bad request else: sorted_items = sort_items(result) return sorted_items, 200 # 200 (Success) diff --git a/aea/crypto/cosmos.py b/aea/crypto/cosmos.py index 0c49fed96a..3534f03a66 100644 --- a/aea/crypto/cosmos.py +++ b/aea/crypto/cosmos.py @@ -355,9 +355,7 @@ class _CosmosApi(LedgerApi): identifier = _COSMOS def __init__(self, **kwargs): - """ - Initialize the Cosmos ledger APIs. - """ + """Initialize the Cosmos ledger APIs.""" self._api = None self.network_address = kwargs.pop("address", DEFAULT_ADDRESS) self.denom = kwargs.pop("denom", DEFAULT_CURRENCY_DENOM) @@ -991,16 +989,12 @@ def _try_check_faucet_claim(cls, uid: str) -> Optional[CosmosFaucetStatus]: @classmethod def _faucet_request_uri(cls) -> str: - """ - Generates the request URI derived from `cls.faucet_base_url` - """ + """Generates the request URI derived from `cls.faucet_base_url`.""" if cls.testnet_faucet_url is None: # pragma: nocover raise ValueError("Testnet faucet url not set.") return f"{cls.testnet_faucet_url}/claim/requests" @classmethod def _faucet_status_uri(cls, uid: str) -> str: - """ - Generates the status URI derived from `cls.faucet_base_url` - """ + """Generates the status URI derived from `cls.faucet_base_url`.""" return f"{cls._faucet_request_uri()}/{uid}" diff --git a/aea/crypto/fetchai.py b/aea/crypto/fetchai.py index 2d54b2a2b9..f3f77a1355 100644 --- a/aea/crypto/fetchai.py +++ b/aea/crypto/fetchai.py @@ -50,9 +50,7 @@ class FetchAIApi(_CosmosApi, FetchAIHelper): identifier = _FETCHAI def __init__(self, **kwargs): - """ - Initialize the Fetch.ai ledger APIs. - """ + """Initialize the Fetch.ai ledger APIs.""" if "address" not in kwargs: kwargs["address"] = DEFAULT_ADDRESS # pragma: nocover if "denom" not in kwargs: diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index f7360d223b..6e3ca74660 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -378,9 +378,7 @@ def stop(self) -> None: class AwaitableProc: - """ - Async-friendly subprocess.Popen - """ + """Async-friendly subprocess.Popen.""" def __init__(self, *args, **kwargs): """Initialise awaitable proc.""" diff --git a/aea/helpers/multiaddr/base.py b/aea/helpers/multiaddr/base.py index c7275427fe..afbac8afbb 100644 --- a/aea/helpers/multiaddr/base.py +++ b/aea/helpers/multiaddr/base.py @@ -45,20 +45,29 @@ if ENABLE_INLINING: class IdentityHash: - """ Neutral hashing implementation for inline multihashing """ + """Neutral hashing implementation for inline multihashing.""" _digest: bytes def __init__(self) -> None: - """ Initialize IdentityHash object """ + """Initialize IdentityHash object.""" self._digest = bytearray() def update(self, input_data: bytes) -> None: - """ Update data to hash """ + """ + Update data to hash. + + :param input_data: the data + :return: None + """ self._digest += input_data def digest(self) -> bytes: - """ Hash of input data """ + """ + Get hash of input data. + + :return: the hash + """ return self._digest multihash.FuncReg.register( @@ -67,26 +76,26 @@ def digest(self) -> bytes: def _pad_scalar(scalar): + """Pad scalar.""" return (ZERO * (KEY_SIZE - len(scalar))) + scalar def _pad_hex(hexed): - """ Pad odd-length hex strings """ + """Pad odd-length hex strings.""" return hexed if not len(hexed) & 1 else "0" + hexed def _hex_to_bytes(hexed): + """Hex to bytes.""" return _pad_scalar(unhexlify(_pad_hex(hexed))) class MultiAddr: - """ - Protocol Labs' Multiaddress representation of a network address - """ + """Protocol Labs' Multiaddress representation of a network address.""" def __init__(self, host: str, port: int, public_key: str): """ - Initialize a multiaddress + Initialize a multiaddress. :param host: ip host of the address :param host: port number of the address @@ -136,7 +145,7 @@ def peer_id(self) -> str: return self._peerid def format(self) -> str: - """ Canonical representation of a multiaddress """ + """Canonical representation of a multiaddress.""" return f"/dns4/{self._host}/tcp/{self._port}/p2p/{self._peerid}" def __str__(self) -> str: diff --git a/aea/helpers/pipe.py b/aea/helpers/pipe.py index 2e79f0a27f..f2e19ccf92 100644 --- a/aea/helpers/pipe.py +++ b/aea/helpers/pipe.py @@ -42,9 +42,7 @@ class IPCChannelClient(ABC): - """ - Multi-platform interprocess communication channel for the client side - """ + """Multi-platform interprocess communication channel for the client side.""" @abstractmethod async def connect(self, timeout=PIPE_CONN_TIMEOUT) -> bool: @@ -58,6 +56,7 @@ async def connect(self, timeout=PIPE_CONN_TIMEOUT) -> bool: async def write(self, data: bytes) -> None: """ Write `data` bytes to the other end of the channel + Will first write the size than the actual data :param data: bytes to write @@ -67,6 +66,7 @@ async def write(self, data: bytes) -> None: async def read(self) -> Optional[bytes]: """ Read bytes from the other end of the channel + Will first read the size than the actual data :return: read bytes @@ -75,34 +75,36 @@ async def read(self) -> Optional[bytes]: @abstractmethod async def close(self) -> None: """ - Close the communication channel + Close the communication channel. + + :return: None """ class IPCChannel(IPCChannelClient): - """ - Multi-platform interprocess communication channel - """ + """Multi-platform interprocess communication channel.""" @property @abstractmethod def in_path(self) -> str: """ - Rendezvous point for incoming communication + Rendezvous point for incoming communication. + + :return: path """ @property @abstractmethod def out_path(self) -> str: """ - Rendezvous point for outgoing communication + Rendezvous point for outgoing communication. + + :return: path """ class PosixNamedPipeProtocol: - """ - Posix named pipes async wrapper communication protocol - """ + """Posix named pipes async wrapper communication protocol.""" def __init__( self, @@ -112,7 +114,7 @@ def __init__( loop: Optional[AbstractEventLoop] = None, ): """ - Initialize a new posix named pipe + Initialize a new posix named pipe. :param in_path: rendezvous point for incoming data :param out_path: rendezvous point for outgoing daa @@ -228,7 +230,7 @@ async def read(self) -> Optional[bytes]: return None async def close(self) -> None: - """ Disconnect pipe """ + """Disconnect pipe.""" self.logger.debug("closing pipe (in={})...".format(self._in_path)) if self._fileobj is None: raise ValueError("Pipe not connected") # pragma: nocover @@ -245,9 +247,7 @@ async def close(self) -> None: class TCPSocketProtocol: - """ - TCP socket communication protocol - """ + """TCP socket communication protocol.""" def __init__( self, @@ -257,7 +257,7 @@ def __init__( loop: Optional[AbstractEventLoop] = None, ): """ - Initialize the tcp socket protocol + Initialize the tcp socket protocol. :param reader: established asyncio reader :param writer: established asyncio writer @@ -308,23 +308,21 @@ async def read(self) -> Optional[bytes]: return None async def close(self) -> None: - """ Disconnect socket """ + """Disconnect socket.""" self._writer.write_eof() await self._writer.drain() self._writer.close() class TCPSocketChannel(IPCChannel): - """ - Interprocess communication channel implementation using tcp sockets - """ + """Interprocess communication channel implementation using tcp sockets.""" def __init__( self, logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None, ): - """ Initialize tcp socket interprocess communication channel""" + """Initialize tcp socket interprocess communication channel.""" self.logger = logger self._loop = loop self._server = None # type: Optional[asyncio.AbstractServer] @@ -339,7 +337,7 @@ def __init__( async def connect(self, timeout: float = PIPE_CONN_TIMEOUT) -> bool: """ - Setup communication channel and wait for other end to connect + Setup communication channel and wait for other end to connect. :param timeout: timeout for the connection to be established """ @@ -369,6 +367,7 @@ async def connect(self, timeout: float = PIPE_CONN_TIMEOUT) -> bool: async def _handle_connection( self, reader: asyncio.StreamReader, writer: asyncio.StreamWriter ): + """Handle connection.""" if self._connected is None: raise ValueError("Connected is None!") # pragma: nocover self._connected.set() @@ -397,33 +396,31 @@ async def read(self) -> Optional[bytes]: return await self._sock.read() async def close(self) -> None: - """ Disconnect from channel and clean it up """ + """Disconnect from channel and clean it up.""" if self._sock is None: raise ValueError("Socket pipe not connected.") # pragma: nocover await self._sock.close() @property def in_path(self) -> str: - """ Rendezvous point for incoming communication """ + """Rendezvous point for incoming communication.""" return str(self._port) @property def out_path(self) -> str: - """ Rendezvous point for outgoing communication """ + """Rendezvous point for outgoing communication.""" return str(self._port) class PosixNamedPipeChannel(IPCChannel): - """ - Interprocess communication channel implementation using Posix named pipes - """ + """Interprocess communication channel implementation using Posix named pipes.""" def __init__( self, logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None, ): - """ Initialize posix named pipe interprocess communication channel """ + """Initialize posix named pipe interprocess communication channel.""" self.logger = logger self._loop = loop @@ -448,9 +445,10 @@ def __init__( async def connect(self, timeout: float = PIPE_CONN_TIMEOUT) -> bool: """ - Setup communication channel and wait for other end to connect + Setup communication channel and wait for other end to connect. :param timeout: timeout for connection to be established + :return: bool, indicating sucess """ if self._loop is None: @@ -475,27 +473,23 @@ async def read(self) -> Optional[bytes]: return await self._pipe.read() async def close(self) -> None: - """ - Close the channel and clean it up - """ + """Close the channel and clean it up.""" await self._pipe.close() rmtree(self._pipe_dir) @property def in_path(self) -> str: - """ Rendezvous point for incoming communication """ + """Rendezvous point for incoming communication.""" return self._in_path @property def out_path(self) -> str: - """ Rendezvous point for outgoing communication """ + """Rendezvous point for outgoing communication.""" return self._out_path class TCPSocketChannelClient(IPCChannelClient): - """ - Interprocess communication channel client using tcp sockets - """ + """Interprocess communication channel client using tcp sockets.""" def __init__( # pylint: disable=unused-argument self, @@ -505,7 +499,7 @@ def __init__( # pylint: disable=unused-argument loop: Optional[AbstractEventLoop] = None, ): """ - Initialize a tcp socket communication channel client + Initialize a tcp socket communication channel client. :param in_path: rendezvous point for incoming data :param out_path: rendezvous point for outgoing data @@ -521,11 +515,10 @@ def __init__( # pylint: disable=unused-argument async def connect(self, timeout: float = PIPE_CONN_TIMEOUT) -> bool: """ - Connect to the other end of the communication channel + Connect to the other end of the communication channel. :param timeout: timeout for connection to be established """ - if self._loop is None: self._loop = asyncio.get_event_loop() @@ -558,7 +551,7 @@ async def connect(self, timeout: float = PIPE_CONN_TIMEOUT) -> bool: async def write(self, data: bytes) -> None: """ - Write data to channel + Write data to channel. :param data: bytes to write """ @@ -568,7 +561,7 @@ async def write(self, data: bytes) -> None: async def read(self) -> Optional[bytes]: """ - Read data from channel + Read data from channel. :return: read bytes """ @@ -577,16 +570,14 @@ async def read(self) -> Optional[bytes]: return await self._sock.read() async def close(self) -> None: - """ Disconnect from communication channel """ + """Disconnect from communication channel.""" if self._sock is None: raise ValueError("Socket pipe not connected.") # pragma: nocover await self._sock.close() class PosixNamedPipeChannelClient(IPCChannelClient): - """ - Interprocess communication channel client using Posix named pipes - """ + """Interprocess communication channel client using Posix named pipes.""" def __init__( self, @@ -596,7 +587,7 @@ def __init__( loop: Optional[AbstractEventLoop] = None, ): """ - Initialize a posix named pipe communication channel client + Initialize a posix named pipe communication channel client. :param in_path: rendezvous point for incoming data :param out_path: rendezvous point for outgoing data @@ -611,7 +602,7 @@ def __init__( async def connect(self, timeout: float = PIPE_CONN_TIMEOUT) -> bool: """ - Connect to the other end of the communication channel + Connect to the other end of the communication channel. :param timeout: timeout for connection to be established """ @@ -626,7 +617,7 @@ async def connect(self, timeout: float = PIPE_CONN_TIMEOUT) -> bool: async def write(self, data: bytes) -> None: """ - Write data to channel + Write data to channel. :param data: bytes to write """ @@ -636,7 +627,7 @@ async def write(self, data: bytes) -> None: async def read(self) -> Optional[bytes]: """ - Read data from channel + Read data from channel. :return: read bytes """ @@ -645,7 +636,7 @@ async def read(self) -> Optional[bytes]: return await self._pipe.read() async def close(self) -> None: - """ Disconnect from communication channel """ + """Disconnect from communication channel.""" if self._pipe is None: raise ValueError("Pipe not connected.") # pragma: nocover return await self._pipe.close() @@ -656,6 +647,10 @@ def make_ipc_channel( ) -> IPCChannel: """ Build a portable bidirectional InterProcess Communication channel + + :param logger: the logger + :param loop: the loop + :return: IPCChannel """ if os.name == "posix": return PosixNamedPipeChannel(logger=logger, loop=loop) @@ -677,6 +672,9 @@ def make_ipc_channel_client( :param in_path: rendezvous point for incoming communication :param out_path: rendezvous point for outgoing outgoing + :param logger: the logger + :param loop: the loop + :return: IPCChannel """ if os.name == "posix": return PosixNamedPipeChannelClient(in_path, out_path, logger=logger, loop=loop) diff --git a/aea/helpers/transaction/base.py b/aea/helpers/transaction/base.py index 1814b14fbd..d096b01792 100644 --- a/aea/helpers/transaction/base.py +++ b/aea/helpers/transaction/base.py @@ -88,6 +88,7 @@ def decode(cls, raw_transaction_protobuf_object) -> "RawTransaction": return raw_transaction def __eq__(self, other): + """Check equality.""" return ( isinstance(other, RawTransaction) and self.ledger_id == other.ledger_id @@ -95,6 +96,7 @@ def __eq__(self, other): ) def __str__(self): + """Get string representation.""" return "RawTransaction: ledger_id={}, body={}".format( self.ledger_id, self.body, ) @@ -164,6 +166,7 @@ def decode(cls, raw_message_protobuf_object) -> "RawMessage": return raw_message def __eq__(self, other): + """Check equality.""" return ( isinstance(other, RawMessage) and self.ledger_id == other.ledger_id @@ -172,6 +175,7 @@ def __eq__(self, other): ) def __str__(self): + """Get string representation.""" return "RawMessage: ledger_id={}, body={}, is_deprecated_mode={}".format( self.ledger_id, self.body, self.is_deprecated_mode, ) @@ -236,6 +240,7 @@ def decode(cls, signed_transaction_protobuf_object) -> "SignedTransaction": return signed_transaction def __eq__(self, other): + """Check equality.""" return ( isinstance(other, SignedTransaction) and self.ledger_id == other.ledger_id @@ -243,6 +248,7 @@ def __eq__(self, other): ) def __str__(self): + """Get string representation.""" return "SignedTransaction: ledger_id={}, body={}".format( self.ledger_id, self.body, ) @@ -316,6 +322,7 @@ def decode(cls, signed_message_protobuf_object) -> "SignedMessage": return signed_message def __eq__(self, other): + """Check equality.""" return ( isinstance(other, SignedMessage) and self.ledger_id == other.ledger_id @@ -324,6 +331,7 @@ def __eq__(self, other): ) def __str__(self): + """Get string representation.""" return "SignedMessage: ledger_id={}, body={}, is_deprecated_mode={}".format( self.ledger_id, self.body, self.is_deprecated_mode, ) @@ -381,6 +389,7 @@ def decode(cls, state_protobuf_object) -> "State": return state def __eq__(self, other): + """Check equality.""" return ( isinstance(other, State) and self.ledger_id == other.ledger_id @@ -388,6 +397,7 @@ def __eq__(self, other): ) def __str__(self): + """Get string representation.""" return "State: ledger_id={}, body={}".format(self.ledger_id, self.body) @@ -827,6 +837,7 @@ def decode(cls, terms_protobuf_object) -> "Terms": return terms def __eq__(self, other): + """Check equality.""" return ( isinstance(other, Terms) and self.ledger_id == other.ledger_id @@ -843,6 +854,7 @@ def __eq__(self, other): ) def __str__(self): + """Get string representation.""" return "Terms: ledger_id={}, sender_address={}, counterparty_address={}, amount_by_currency_id={}, quantities_by_good_id={}, is_sender_payable_tx_fee={}, nonce={}, fee_by_currency_id={}, kwargs={}".format( self.ledger_id, self.sender_address, @@ -913,6 +925,7 @@ def decode(cls, transaction_digest_protobuf_object) -> "TransactionDigest": return transaction_digest def __eq__(self, other): + """Check equality.""" return ( isinstance(other, TransactionDigest) and self.ledger_id == other.ledger_id @@ -920,6 +933,7 @@ def __eq__(self, other): ) def __str__(self): + """Get string representation.""" return "TransactionDigest: ledger_id={}, body={}".format( self.ledger_id, self.body ) @@ -991,6 +1005,7 @@ def decode(cls, transaction_receipt_protobuf_object) -> "TransactionReceipt": return transaction_receipt def __eq__(self, other): + """Check equality.""" return ( isinstance(other, TransactionReceipt) and self.ledger_id == other.ledger_id @@ -999,6 +1014,7 @@ def __eq__(self, other): ) def __str__(self): + """Get string representation.""" return "TransactionReceipt: ledger_id={}, receipt={}, transaction={}".format( self.ledger_id, self.receipt, self.transaction ) diff --git a/aea/protocols/generator/base.py b/aea/protocols/generator/base.py index 9468a86200..198a1a0dab 100644 --- a/aea/protocols/generator/base.py +++ b/aea/protocols/generator/base.py @@ -1904,6 +1904,7 @@ def _init_str(self) -> str: def generate_protobuf_only_mode(self) -> None: """ Run the generator in "protobuf only" mode: + a) validate the protocol specification. b) create the protocol buffer schema file. @@ -1936,6 +1937,7 @@ def generate_protobuf_only_mode(self) -> None: def generate_full_mode(self) -> None: """ Run the generator in "full" mode: + a) validates the protocol specification. b) creates the protocol buffer schema file. c) generates python modules. @@ -1999,6 +2001,7 @@ def generate_full_mode(self) -> None: def generate(self, protobuf_only: bool = False) -> None: """ Run the generator. If in "full" mode (protobuf_only is False), it: + a) validates the protocol specification. b) creates the protocol buffer schema file. c) generates python modules. diff --git a/aea/skills/base.py b/aea/skills/base.py index d75ab03320..1e9fff3d96 100644 --- a/aea/skills/base.py +++ b/aea/skills/base.py @@ -613,8 +613,7 @@ def parse_module( # pylint: disable=arguments-differ def _check_duplicate_classes(name_class_pairs: Sequence[Tuple[str, Type]]): """ - Given a sequence of pairs (class_name, class_obj), check - whether there are duplicates in the class names. + Given a sequence of pairs (class_name, class_obj), check whether there are duplicates in the class names. :param name_class_pairs: the sequence of pairs (class_name, class_obj) :return: None diff --git a/docs/agent-vs-aea.md b/docs/agent-vs-aea.md index 7ec078fb9a..354a7c09ae 100644 --- a/docs/agent-vs-aea.md +++ b/docs/agent-vs-aea.md @@ -51,12 +51,20 @@ class MyAgent(Agent): super().__init__(identity, connections) def setup(self): + """Setup the agent.""" pass def act(self): + """Act implementation.""" print("Act called for tick {}".format(self.tick)) def handle_envelope(self, envelope: Envelope) -> None: + """ + Handle envelope. + + :param envelope: the envelope received + :return: None + """ print("React called for tick {}".format(self.tick)) if envelope is not None and envelope.protocol_id == DefaultMessage.protocol_id: sender = envelope.sender @@ -74,6 +82,7 @@ class MyAgent(Agent): self.outbox.put(envelope) def teardown(self): + """Teardown the agent.""" pass ``` @@ -204,6 +213,8 @@ class MyAgent(Agent): def run(): + """Run demo.""" + # Ensure the input and output files do not exist initially if os.path.isfile(INPUT_FILE): os.remove(INPUT_FILE) diff --git a/docs/build-aea-programmatically.md b/docs/build-aea-programmatically.md index 4d0b25c748..fb2b593713 100644 --- a/docs/build-aea-programmatically.md +++ b/docs/build-aea-programmatically.md @@ -176,6 +176,8 @@ FETCHAI_PRIVATE_KEY_FILE = PRIVATE_KEY_PATH_SCHEMA.format(FetchAICrypto.identifi def run(): + """Run demo.""" + # Create a private key create_private_key(FetchAICrypto.identifier, FETCHAI_PRIVATE_KEY_FILE) diff --git a/docs/cli-vs-programmatic-aeas.md b/docs/cli-vs-programmatic-aeas.md index 90e6647806..9542099d7d 100644 --- a/docs/cli-vs-programmatic-aeas.md +++ b/docs/cli-vs-programmatic-aeas.md @@ -103,6 +103,8 @@ logging.basicConfig(stream=sys.stdout, level=logging.INFO) def run(): + """Run demo.""" + # Create a private key create_private_key(FetchAICrypto.identifier, FETCHAI_PRIVATE_KEY_FILE) create_private_key(FetchAICrypto.identifier, FETCHAI_PRIVATE_KEY_FILE_CONNECTION) diff --git a/docs/decision-maker-transaction.md b/docs/decision-maker-transaction.md index 9801eef68f..e6a096007c 100644 --- a/docs/decision-maker-transaction.md +++ b/docs/decision-maker-transaction.md @@ -319,6 +319,8 @@ FETCHAI_PRIVATE_KEY_FILE_2 = "fetchai_private_key_2.txt" def run(): + """Run demo.""" + # Create a private key create_private_key( FetchAICrypto.identifier, private_key_file=FETCHAI_PRIVATE_KEY_FILE_1 diff --git a/docs/multiplexer-standalone.md b/docs/multiplexer-standalone.md index 1c6d91fccc..e27fee3081 100644 --- a/docs/multiplexer-standalone.md +++ b/docs/multiplexer-standalone.md @@ -129,6 +129,8 @@ OUTPUT_FILE = "output.txt" def run(): + """Run demo.""" + # Ensure the input and output files do not exist initially if os.path.isfile(INPUT_FILE): os.remove(INPUT_FILE) diff --git a/docs/standalone-transaction.md b/docs/standalone-transaction.md index 1055e2fe47..bf23bb1275 100644 --- a/docs/standalone-transaction.md +++ b/docs/standalone-transaction.md @@ -100,6 +100,8 @@ FETCHAI_PRIVATE_KEY_FILE_2 = "fetchai_private_key_2.txt" def run(): + """Run demo.""" + # Create a private keys create_private_key( FetchAICrypto.identifier, private_key_file=FETCHAI_PRIVATE_KEY_FILE_1 diff --git a/examples/gym_ex/proxy/agent.py b/examples/gym_ex/proxy/agent.py index 0d62ae1bb0..42b5fbf7b1 100644 --- a/examples/gym_ex/proxy/agent.py +++ b/examples/gym_ex/proxy/agent.py @@ -78,6 +78,12 @@ def act(self) -> None: pass def handle_envelope(self, envelope: Envelope) -> None: + """ + Handle envelope. + + :param envelope: the envelope + :return: None + """ if envelope is not None: self.proxy_env_queue.put(envelope) diff --git a/examples/gym_ex/proxy/env.py b/examples/gym_ex/proxy/env.py index d7f4e3bbe4..b2502868b3 100755 --- a/examples/gym_ex/proxy/env.py +++ b/examples/gym_ex/proxy/env.py @@ -219,7 +219,6 @@ def _encode_and_send_action(self, action: Action, step_id: int) -> None: self._agent.outbox.put_message(message=gym_msg) def _decode_percept(self, envelope: Envelope, expected_step_id: int) -> GymMessage: - """ Receive the response from the gym environment in the form of an envelope and decode it. @@ -250,7 +249,6 @@ def _decode_percept(self, envelope: Envelope, expected_step_id: int) -> GymMessa raise ValueError("Missing envelope.") def _decode_status(self, envelope: Envelope) -> None: - """ Receive the response from the gym environment in the form of an envelope and decode it. diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index 6bc5231225..304703f3a2 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -10,7 +10,7 @@ fingerprint: __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj base.py: QmP6SiNTCWBW8Bt6wsgP2gp7K2LcV4AeVk2saM7tqyx44S connection.py: QmS3CJwjgzZ5SrAeJjCnC5ChZDfTsDuV6ndgMsGV1bidnf - contract_dispatcher.py: QmQFEapPMbSn5CLmtkqQTmD5pTgfXDAGc3qo8rc5Jg7Drn + contract_dispatcher.py: QmRegSPqqkns7xp5zr6xiuTxjGLiGGG2qLkwunpFCbzEwX ledger_dispatcher.py: QmarLEyR2Je6NtXSJmPy9NbGL7J85FVAZJPkFKqCotEKjc fingerprint_ignore_patterns: [] protocols: diff --git a/packages/fetchai/connections/ledger/contract_dispatcher.py b/packages/fetchai/connections/ledger/contract_dispatcher.py index c2b87fa046..ca2561ed01 100644 --- a/packages/fetchai/connections/ledger/contract_dispatcher.py +++ b/packages/fetchai/connections/ledger/contract_dispatcher.py @@ -266,8 +266,7 @@ def build_response( def _get_data( self, api: LedgerApi, message: ContractApiMessage, contract: Contract, ) -> bytes: - """Get the data from the contract method, either from the stub or - from the callable specified by the message.""" + """Get the data from the contract method, either from the stub or from the callable specified by the message.""" # first, check if the custom handler for this type of request has been implemented. data = self._call_stub(api, message, contract) if data is not None: @@ -281,8 +280,7 @@ def _get_data( def _call_stub( ledger_api: LedgerApi, message: ContractApiMessage, contract: Contract ) -> Optional[bytes]: - """Try to call stub methods associated to the - contract API request performative.""" + """Try to call stub methods associated to the contract API request performative.""" try: method: Callable = getattr(contract, message.performative.value) if message.performative in [ diff --git a/packages/fetchai/connections/p2p_libp2p/connection.py b/packages/fetchai/connections/p2p_libp2p/connection.py index b12f1e9fa9..edfd302c6c 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.py +++ b/packages/fetchai/connections/p2p_libp2p/connection.py @@ -111,7 +111,13 @@ def _golang_module_run( logger: logging.Logger = _default_logger, ) -> subprocess.Popen: """ - Runs a built module located at `path` + Runs a built module located at `path`. + + :param path: the path to the go module. + :param name: the name of the module. + :param args: the args + :param log_file_desc: the file descriptor of the log file. + :param logger: the logger """ cmd = [os.path.join(path, name)] @@ -139,9 +145,7 @@ def _golang_module_run( class Uri: - """ - Holds a node address in format "host:port" - """ + """Holds a node address in format "host:port".""" def __init__( self, @@ -162,9 +166,11 @@ def __init__( self._port = randint(5000, 10000) # nosec def __str__(self): + """Get string representation.""" return "{}:{}".format(self._host, self._port) def __repr__(self): # pragma: no cover + """Get object representation.""" return self.__str__() @property @@ -179,9 +185,7 @@ def port(self) -> int: class Libp2pNode: - """ - Libp2p p2p node as a subprocess with named pipes interface - """ + """Libp2p p2p node as a subprocess with named pipes interface.""" def __init__( self, diff --git a/packages/fetchai/connections/p2p_libp2p/connection.yaml b/packages/fetchai/connections/p2p_libp2p/connection.yaml index ba1347e3a6..0842a3660f 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p/connection.yaml @@ -15,7 +15,7 @@ fingerprint: aea/envelope.proto: QmSC8EGCKiNFR2vf5bSWymSzYDFMipQW9aQVMwPzQoKb4n aea/pipe_unix.go: QmSzbAexrSUSA9ZE6VT6MmcWF5MhEcmceQjAbnfRoK7Ruv aea/pipe_windows.go: QmdYpfjgdgFbA6Pothg65NYM45ubfpZeKr8cVQoqbFzgUK - connection.py: QmS4uowmVRvQVmmWbXMqevsB5ALi9twopbwXTTPjqBtLLz + connection.py: QmVRe5AfSov69zJTGtDDmbjusr1tERsbe4H7Ee4h2ptcem dht/dhtclient/dhtclient.go: QmasA3GrgswTnUJoffBzeeqxeT3GjLu6foN6PHJhWNpMMa dht/dhtclient/dhtclient_test.go: QmPfnHSHXtbaW5VYuq1QsKQWey64pUEvLEaKKkT9eAcmws dht/dhtclient/options.go: QmPorj38wNrxGrzsbFe5wwLmiHzxbTJ2VsgvSd8tLDYS8s diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.py b/packages/fetchai/connections/p2p_libp2p_client/connection.py index 044114b50d..83355fffde 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.py +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.py @@ -42,9 +42,7 @@ class Uri: - """ - Holds a node address in format "host:port" - """ + """Holds a node address in format "host:port".""" def __init__( self, @@ -65,9 +63,11 @@ def __init__( self._port = randint(5000, 10000) # nosec def __str__(self): + """Get string representation.""" return "{}:{}".format(self._host, self._port) def __repr__(self): # pragma: no cover + """Get object representation.""" return self.__str__() @property @@ -84,6 +84,7 @@ def port(self) -> int: class P2PLibp2pClientConnection(Connection): """ A libp2p client connection. + Send and receive envelopes to and from agents on the p2p network without deploying a libp2p node. Connect to the libp2p node using traffic delegation service. """ @@ -91,9 +92,7 @@ class P2PLibp2pClientConnection(Connection): connection_id = PUBLIC_ID def __init__(self, **kwargs): - """ - Initialize a libp2p client connection. - """ + """Initialize a libp2p client connection.""" super().__init__(**kwargs) ledger_id = self.configuration.config.get("ledger_id", DEFAULT_LEDGER) diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml index 1a42268bab..c467491e5c 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml @@ -10,7 +10,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmXWbE53xWwPkQiuR16WP8gDS6fDRtWhbeP7gmBDfoUQtc __init__.py: QmT1FEHkPGMHV5oiVEfQHHr25N2qdZxydSNRJabJvYiTgf - connection.py: QmWYrwBGN3TrnHsMXneD6EpT3C9mo4imqaf2x3bDnnr2Bn + connection.py: QmQ78ZURrHYCLbtTpT4WLcKQiXF3gq6cLS2kaCNeDgw6SA fingerprint_ignore_patterns: [] protocols: [] class_name: P2PLibp2pClientConnection diff --git a/packages/fetchai/contracts/erc1155/contract.py b/packages/fetchai/contracts/erc1155/contract.py index 5d70316095..99db581ea3 100644 --- a/packages/fetchai/contracts/erc1155/contract.py +++ b/packages/fetchai/contracts/erc1155/contract.py @@ -133,6 +133,7 @@ def get_create_single_transaction( ) -> Dict[str, Any]: """ Get the transaction to create a single token. + :param ledger_api: the ledger API :param contract_address: the address of the contract :param deployer_address: the address of the deployer @@ -752,6 +753,7 @@ def _try_estimate_gas(ledger_api: LedgerApi, tx: Dict[str, Any]) -> Dict[str, An def get_last_code_id(ledger_api: LedgerApi) -> int: """ Uses wasmcli to get ID of latest deployed .wasm bytecode + :param ledger_api: the ledger API :return: code id of last deployed .wasm bytecode @@ -765,6 +767,7 @@ def get_last_code_id(ledger_api: LedgerApi) -> int: def get_contract_address(ledger_api: LedgerApi, code_id: int) -> str: """ Uses wasmcli to get contract address of latest initialised contract by its ID + :param ledger_api: the ledger API :param code_id: the ID of stored contract CosmWasm diff --git a/packages/fetchai/contracts/erc1155/contract.yaml b/packages/fetchai/contracts/erc1155/contract.yaml index 3359c6aac5..cf9a6b934e 100644 --- a/packages/fetchai/contracts/erc1155/contract.yaml +++ b/packages/fetchai/contracts/erc1155/contract.yaml @@ -10,7 +10,7 @@ fingerprint: build/Migrations.json: QmfFYYWoq1L1Ni6YPBWWoRPvCZKBLZ7qzN3UDX537mCeuE build/erc1155.json: Qma5n7au2NDCg1nLwYfYnmFNwWChFuXtu65w5DV7wAZRvw build/erc1155.wasm: Qmc9gthbdwRSywinTHKjRVQdFzrKTxUuLDx2ryNfQp1xqf - contract.py: QmYSTxYstk7dmP8TfgiX6HZpegoWTwW8DfBdXpzyBGp9pN + contract.py: QmSEfxq6dH53q9qEw3KrtTgUqvyDgCefy59RNpciGGAGi6 contracts/Migrations.sol: QmbW34mYrj3uLteyHf3S46pnp9bnwovtCXHbdBHfzMkSZx contracts/erc1155.vy: QmXwob8G1uX7fDvtuuKW139LALWtQmGw2vvaTRBVAWRxTx migrations/1_initial_migration.js: QmcxaWKQ2yPkQBmnpXmcuxPZQUMuUudmPmX3We8Z9vtAf7 diff --git a/packages/fetchai/protocols/contract_api/custom_types.py b/packages/fetchai/protocols/contract_api/custom_types.py index a1c8cf3f52..430b1dea25 100644 --- a/packages/fetchai/protocols/contract_api/custom_types.py +++ b/packages/fetchai/protocols/contract_api/custom_types.py @@ -85,7 +85,9 @@ def decode(cls, kwargs_protobuf_object) -> "Kwargs": return kwargs def __eq__(self, other): + """Check equality.""" return isinstance(other, Kwargs) and self.body == other.body def __str__(self): + """Get string representation.""" return "Kwargs: body={}".format(self.body) diff --git a/packages/fetchai/protocols/contract_api/protocol.yaml b/packages/fetchai/protocols/contract_api/protocol.yaml index 6c8c00921c..3c8a6ec990 100644 --- a/packages/fetchai/protocols/contract_api/protocol.yaml +++ b/packages/fetchai/protocols/contract_api/protocol.yaml @@ -10,7 +10,7 @@ fingerprint: __init__.py: QmZodYjNqoMgGAGKfkCU4zU9t1Cx9MAownqSy4wyVdwaHF contract_api.proto: QmNwngtcYFSuqL8yeTGVXmrHjfebCybdUa9BnTDKXn8odk contract_api_pb2.py: QmVT6Fv53KyFhshNFEo38seHypd7Y62psBaF8NszV8iRHK - custom_types.py: QmVm4mGsBaLGep1FJMRWEAXBdfPL46LEfJT1eoUHnNYsKo + custom_types.py: QmbLjpiTcGNfvdBsu8pgQH6PK5y6ujdNnZ53JSk1GZDRCA dialogues.py: QmTjXH8JUtziUFDawKsSTYE5dxn1n1FmMPeWexyxiPYd6k message.py: Qmd7r8Zf3jC1uwMRM1dhs1FTEqDMXreHHRiGgViAQkEMXc serialization.py: QmdJZ6GBrURgzJCfYSZzLhWirfm5bDJxumz7ieAELC9juw diff --git a/packages/fetchai/protocols/gym/custom_types.py b/packages/fetchai/protocols/gym/custom_types.py index 206952b93f..34a412c031 100644 --- a/packages/fetchai/protocols/gym/custom_types.py +++ b/packages/fetchai/protocols/gym/custom_types.py @@ -56,4 +56,5 @@ def decode(cls, any_object_protobuf_object) -> "AnyObject": return pickle.loads(any_object_protobuf_object.any) # nosec def __eq__(self, other): + """Check equality.""" return self.any == other.any diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index 7a14814699..ede670f598 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTCkz4cEUcwuPZVtvrVr8Np5qn1SMwm6foGSY9Y68DhZT __init__.py: QmWBvruqGuU2BVCq8cuP1S3mgvuC78yrG4TdtSvKhCT8qX - custom_types.py: QmfDaswopanUqsETQXMatKfwwDSSo7q2Edz9MXGimT5jbf + custom_types.py: QmT3VKT86xZKR11RR1vQ3myRpmVZNdzY6ELd8HG9U2ngwa dialogues.py: QmdCzcFfyPF43U2SoxwshG5p4hd6dK49m6GYKduDHbnNPo gym.proto: QmQGF9Xz4Z93wmhdKoztzxjo5pS4SsAWe2TQdvZCLuzdGC gym_pb2.py: QmSTz7xrL8ryqzR1Sgu1NpR6PmW7GUhBGnN2qYc8m8NCcN diff --git a/packages/fetchai/skills/ml_train/ml_model.py b/packages/fetchai/skills/ml_train/ml_model.py index 0104bf3a31..258cd23e01 100644 --- a/packages/fetchai/skills/ml_train/ml_model.py +++ b/packages/fetchai/skills/ml_train/ml_model.py @@ -52,6 +52,11 @@ def __init__(self, **kwargs): self.training_thread = threading.Thread(target=self.training_loop) def setup(self) -> None: + """ + Setup the model. + + :return: None + """ self.training_thread.start() def training_loop(self): @@ -128,5 +133,10 @@ def update(self, X, y, epochs): self.data_queue.put((X, y, dict(epochs=epochs))) def teardown(self) -> None: + """ + Teardown the model. + + :return: None + """ self.data_queue.put(None) self.training_thread.join() diff --git a/packages/fetchai/skills/ml_train/skill.yaml b/packages/fetchai/skills/ml_train/skill.yaml index e90e330905..1285241205 100644 --- a/packages/fetchai/skills/ml_train/skill.yaml +++ b/packages/fetchai/skills/ml_train/skill.yaml @@ -12,7 +12,7 @@ fingerprint: behaviours.py: QmQiBzKV5rEFpMQbSjfjzAJ7SqwwGmso6TozWkjdytucLR dialogues.py: QmccMjTxTrTaDyXFTTfAWHmA3xBiPCmKwBfiDSCW428Xie handlers.py: QmXxVeXQDjqQ8gC1fwrZvFtSSHuwGERMoj1j5bYuNfAQYp - ml_model.py: QmejQUfPnfKDerwzNZFrswUDF7SevBbcvvr9MaeD39ZewE + ml_model.py: QmXp667GwVRrGsLxtqricnnyrBUUDn6efem22UCBd2g1y8 model.json: QmdV2tGrRY6VQ5VLgUa4yqAhPDG6X8tYsWecypq8nox9Td strategy.py: QmY8z1DW6PqQuiEpgXAhwasSk1CgvvTNZQH1LtExupif9g tasks.py: QmTb7kCt2UheQ8kwPewkzgfX8m2DF4KtnYCugWdmERJnTU diff --git a/packages/fetchai/skills/tac_negotiation/skill.yaml b/packages/fetchai/skills/tac_negotiation/skill.yaml index 114e0b828f..edefa7e622 100644 --- a/packages/fetchai/skills/tac_negotiation/skill.yaml +++ b/packages/fetchai/skills/tac_negotiation/skill.yaml @@ -13,7 +13,7 @@ fingerprint: dialogues.py: QmdPAjBTpgrW9qP8SnAjKHWxBQRiGUqmgiiXMdrPKAJUKj handlers.py: QmeSaLfQV3rzHuHPhzsBps9z4AbX1MNevTs2YTjnZaWuEA helpers.py: QmfRnfpeCtHMEXSH3q3ofWhoSc7pbpRrSFSBVStUK3JWt3 - strategy.py: QmPSfuF3MMjryq6Gg7JHbk5qcVpDLf1fGD7j2ozGSwxbz2 + strategy.py: QmYcwqZ9ejjK2zxN8nKoc3kvBoGamTxwGQqXJrWV5s8STx transactions.py: Qmc9Re92RLFkfds1NspTRym1wn7XPGSNDRFGtaG6Hrix4E fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/tac_negotiation/strategy.py b/packages/fetchai/skills/tac_negotiation/strategy.py index 1303bce2cc..23cadbaa3d 100644 --- a/packages/fetchai/skills/tac_negotiation/strategy.py +++ b/packages/fetchai/skills/tac_negotiation/strategy.py @@ -203,6 +203,7 @@ def get_location_and_service_query(self) -> Query: def get_own_service_description(self, is_supply: bool) -> Description: """ Get the description of the supplied goods (as a seller), or the demanded goods (as a buyer). + :param is_supply: Boolean indicating whether it is supply or demand. :return: the description (to advertise on the Service Directory). """ diff --git a/packages/hashes.csv b/packages/hashes.csv index 1cde9f0754..3202b8923f 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -21,23 +21,23 @@ fetchai/agents/weather_station,QmZ3cmNvuSkqWSKJ8VoqwBZaphRZYdZLVm3vsFBkU7aNr2 fetchai/connections/gym,QmSdnXM6hqJT3JzCmGqas5RPxodWqrhUwGGTinFn3kYpSL fetchai/connections/http_client,QmfSuWhrseBCVcmzwKmqFDC6qX3ryFzfx2uuUTb8HPGuEd fetchai/connections/http_server,QmU2XNsgEV7zGEgiu4PD2mjXP3fA6Fa7ivrcd7dUzC6PKc -fetchai/connections/ledger,QmdmiwZGQUN2vFj9McBZyCdjPYzDTHjGTFHvRGYRRLarJq +fetchai/connections/ledger,QmapEL72QxY2GFJXcrhJAe1YP7jtJSxp4HY8psKkRHNkxZ fetchai/connections/local,QmWZPDvqjZjzNDUX4ivHF3kGvkNCUYM449RqNEyyoexFix fetchai/connections/oef,QmWpjFr7im4afmsdtmBSYJp2tRzVpeZdYpRvsDYq6q3kg7 -fetchai/connections/p2p_libp2p,QmdhTkGsBwQ7Zrogp5eW1FcC6p1dii7TDpsmy5h9eRMxb9 -fetchai/connections/p2p_libp2p_client,QmU1bNVaYjipA1uwad4CGxMgsMSNaP9n6E11SwvF2in9Jh +fetchai/connections/p2p_libp2p,QmXBdcmsx2J9rQfEJhmSAg6HdpzjtDLVjMcEnNCeAsD8VM +fetchai/connections/p2p_libp2p_client,QmTEE3wRLyGhVbm5oGZG819ijM5HxvuZdy1mtJUoo5XwpS fetchai/connections/p2p_stub,QmX8EWvFok3UAdqXGgir4TrhfDj2kLhfjuXRg82b6G6XtW fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS fetchai/connections/soef,QmQWyjmHg6HWsLEuighe2vrWQSKBZAXvoXSXF33XhaVyE8 fetchai/connections/stub,QmSuUAA2k1E1M9dpeAgkWpfKdssjqghSDfFfrQzC9ZLKbD fetchai/connections/tcp,QmU93B7yajCHwXsgDXXhv1uSuXi7VmFBhdahcFosbrr6nA fetchai/connections/webhook,QmaJunWQT1ypkqGnzrj5gYjjQBywjTHJmyktCZXZsa8hv8 -fetchai/contracts/erc1155,QmTSpeW7JJZaBFwyHUbycPg87nUGW3CkkGchFxn6NtshpQ +fetchai/contracts/erc1155,QmdhfKcSJR4cpfcNDWyq14LXFCGXVkQ4HxSH4P3NB6EeGs fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 -fetchai/protocols/contract_api,QmVHjRbRGRVyYaav78gc5Sf9ihzRAdVtSk3QLUdfhNvqq2 +fetchai/protocols/contract_api,QmeGEAe7GgLmFtFECQQtaPe5RYEA7EnfHbHToXv5NJSxGy fetchai/protocols/default,QmXAdTynqPF8kYFsRZzxigVh3LYZJ8FSGEPEmNPDLoyHmM fetchai/protocols/fipa,Qmb3GXxbEQ23sZ1d7HsmrvchLwPfsEcDAbpLLjRTYxdJDm -fetchai/protocols/gym,QmVLULhH4gn8suFe8Z31X5mVYp3fFSGays5MHDNzKnGA4k +fetchai/protocols/gym,QmRmnLVMCkDa2LJz4RPjKRQvruhKmhMw4wf2VwaQTv3ggB fetchai/protocols/http,QmZJVqY2cxjky6p3o76TUemSsFDws8Dx33voG9WMdrKcry fetchai/protocols/ledger_api,Qmak3uKpeSfT5f4oqes3oUcNSg7vy7WKE2tUmSu8CZUNJ5 fetchai/protocols/ml_trade,QmNVZvbcgERSypYUopKMHvd6F8B81rQqtLVqUvzMeEEwJN @@ -59,12 +59,12 @@ fetchai/skills/generic_seller,Qmb1KxJxXyxqf5oQjs4rtEDKyjnCgPbVDJijyWGNSpWQdT fetchai/skills/gym,QmaiTBVJRwKFgBnL2EJHFgtEWmQ1BDcjGuasVM1D4Na6RT fetchai/skills/http_echo,QmZR1VgVb51R2PjuHtBTd8w2ye6rfnMbgi7GJ7BQhDXAPJ fetchai/skills/ml_data_provider,QmQke9TmGmC9EXrQbst95Bw4gnTK1gLxH9i1Uv7CTxzhn4 -fetchai/skills/ml_train,QmUD1S3NX7KskaM1LgttW9hmahRXTLfG7ZkbHUdURUGRFm +fetchai/skills/ml_train,Qmd2abFvxSwhybqQ3zLkZDKNHrMyqoQqhG4mmKX66v4Wyj fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmfSUCJT7szDvpsUYF1emfzNZgHoNM1o9nrEtCchPodBz2 fetchai/skills/tac_control,QmYCCU6RsvwqmjTRM3Nx8H99HhJXEFuinJSeG3UcjDubYH fetchai/skills/tac_control_contract,QmbstL6fn99jFVsZsGQT3Sjy8SBdm1rrW87oHmdyMTJKmd -fetchai/skills/tac_negotiation,QmeZXcCFTijd6tCAixFGB6dmBdwh66yaJ7QSYofcNQaFJ3 +fetchai/skills/tac_negotiation,Qme9Vcdk1ovguZJTaCrVo5kcJCKw3jBHJgxhQY9QKiDYAW fetchai/skills/tac_participation,QmcynKNnEFSM2pNAwkMsBD1c2JEqfqCocv16tk4mRvFFbv fetchai/skills/thermometer,Qmaez14AMYqBkkQ1oLHVQUM18RdJu8haz9PacRmJvHEQak fetchai/skills/thermometer_client,QmU1fvDdtbv7eLjkMyUx1HJNzFqLh86QpW6kDiSpFqGa89 diff --git a/scripts/acn/run_acn_node_standalone.py b/scripts/acn/run_acn_node_standalone.py index e9494166d9..36b1493f16 100644 --- a/scripts/acn/run_acn_node_standalone.py +++ b/scripts/acn/run_acn_node_standalone.py @@ -16,7 +16,7 @@ # limitations under the License. # # ------------------------------------------------------------------------------ -""" Run an ACN libp2p node without requiring the agents framework """ +"""Run an ACN libp2p node without requiring the agents framework.""" import argparse import os @@ -34,9 +34,7 @@ class AcnNodeConfig: - """ - Store the configuration of an acn node as a dictionary - """ + """Store the configuration of an acn node as a dictionary.""" KEY = "AEA_P2P_ID" URI = "AEA_P2P_URI" @@ -93,7 +91,7 @@ def __init__( AcnNodeConfig.check_config(self.config) def dump(self, file_path: str) -> None: - """ Write current configuration to file """ + """Write current configuration to file.""" with open(file_path, "w") as f: for key, value in self.config.items(): f.write("{}={}\n".format(key, value)) @@ -101,7 +99,7 @@ def dump(self, file_path: str) -> None: @classmethod def from_file(cls, file_path: str, enable_checks: bool = True) -> "AcnNodeConfig": """ - Create a new AcnNodeConfig objet from file + Create a new AcnNodeConfig objet from file. :param file_path: path to the file containing the configuration :return: newly created AcnNodeConfig object, if successful @@ -133,7 +131,7 @@ def from_file(cls, file_path: str, enable_checks: bool = True) -> "AcnNodeConfig @staticmethod def check_config(config: Dict[str, str]) -> None: """ - Validate an ACN node configuration + Validate an ACN node configuration. :param config: dictionary containing the configuration to check """ @@ -156,6 +154,7 @@ def check_config(config: Dict[str, str]) -> None: @staticmethod def _check_uri(uri: str) -> None: + """Check uri.""" if uri == "": return parts = uri.split(":") @@ -165,6 +164,7 @@ def _check_uri(uri: str) -> None: @staticmethod def _check_maddr(maddr: str) -> None: + """Check multiaddress.""" if maddr == "": return parts = maddr.split("/") @@ -174,13 +174,11 @@ def _check_maddr(maddr: str) -> None: class AcnNodeStandalone: - """ - Deploy an acn node in standalone mode - """ + """Deploy an acn node in standalone mode.""" def __init__(self, config: AcnNodeConfig, libp2p_node_binary: str): """ - Initialize a new AcnNodeStandalone object + Initialize a new AcnNodeStandalone object. :param config: node's configuration :param libp2p_node_binary: path to libp2p node binary @@ -191,8 +189,7 @@ def __init__(self, config: AcnNodeConfig, libp2p_node_binary: str): self._proc = None # type: Optional[subprocess.Popen] def run(self): - """ Run the node """ - + """Run the node.""" config_file = ".acn_config" self.config.dump(config_file) @@ -206,15 +203,14 @@ def run(self): pass def stop(self): - """ Stop the node """ - + """Stop the node.""" if self._proc is not None: self._proc.terminate() self._proc.wait() def parse_commandline(): - """ Parse script cl arguments """ + """Parse script cl arguments.""" parser = argparse.ArgumentParser() parser.add_argument("libp2p_node") diff --git a/scripts/check_copyright_notice.py b/scripts/check_copyright_notice.py index d84db306a3..ccb19ed670 100755 --- a/scripts/check_copyright_notice.py +++ b/scripts/check_copyright_notice.py @@ -20,6 +20,7 @@ """ This script checks that all the Python files of the repository have: + - (optional) the Python shebang - the encoding header; - the copyright notice; diff --git a/scripts/check_package_versions_in_docs.py b/scripts/check_package_versions_in_docs.py index 258ec6bb85..2c4ec9965b 100755 --- a/scripts/check_package_versions_in_docs.py +++ b/scripts/check_package_versions_in_docs.py @@ -140,8 +140,7 @@ def _checks( def check_add_commands(file: Path): """ - Check that 'aea add' commands of the documentation file contains - known package ids. + Check that 'aea add' commands of the documentation file contains known package ids. :param file: path to the file. :return: None @@ -158,8 +157,7 @@ def extract_package_id(match): def check_fetch_commands(file: Path): """ - Check that 'aea fetch' commands of the documentation file contains - known package ids. + Check that 'aea fetch' commands of the documentation file contains known package ids. :param file: path to the file. :return: None diff --git a/scripts/deploy_to_registry.py b/scripts/deploy_to_registry.py index 89098c9073..34a2275451 100644 --- a/scripts/deploy_to_registry.py +++ b/scripts/deploy_to_registry.py @@ -18,9 +18,7 @@ # # ------------------------------------------------------------------------------ -""" -This script deploys all new packages to registry. -""" +"""This script deploys all new packages to registry.""" import os import shutil diff --git a/scripts/freeze_dependencies.py b/scripts/freeze_dependencies.py index ace5e3e22b..e7d57caf38 100755 --- a/scripts/freeze_dependencies.py +++ b/scripts/freeze_dependencies.py @@ -18,9 +18,7 @@ # # ------------------------------------------------------------------------------ -""" -This CLI tool freezes the dependencies -""" +"""This CLI tool freezes the dependencies.""" import re import subprocess # nosec diff --git a/scripts/generate_api_docs.py b/scripts/generate_api_docs.py index 3eedfe49ac..dffa0d5954 100755 --- a/scripts/generate_api_docs.py +++ b/scripts/generate_api_docs.py @@ -18,9 +18,7 @@ # # ------------------------------------------------------------------------------ -""" -This tool generates the API docs. -""" +"""This tool generates the API docs.""" import shutil import subprocess # nosec diff --git a/scripts/generate_ipfs_hashes.py b/scripts/generate_ipfs_hashes.py index 00ff2cc9ff..faa20c585f 100755 --- a/scripts/generate_ipfs_hashes.py +++ b/scripts/generate_ipfs_hashes.py @@ -223,7 +223,7 @@ def __init__(self, timeout: float = 15.0): self.process = None # type: Optional[subprocess.Popen] def __enter__(self): - # run the ipfs daemon + """Run the ipfs daemon.""" self.process = subprocess.Popen( # nosec ["ipfs", "daemon"], stdout=subprocess.PIPE, env=os.environ.copy(), ) @@ -231,7 +231,7 @@ def __enter__(self): time.sleep(self.timeout) def __exit__(self, exc_type, exc_val, exc_tb): - # terminate the ipfs daemon + """Terminate the ipfs daemon.""" self.process.send_signal(signal.SIGTERM) self.process.wait(timeout=10) poll = self.process.poll() @@ -266,8 +266,7 @@ def assert_hash_consistency( fingerprint, path_prefix, client: ipfshttpclient.Client ) -> None: """ - Check that our implementation of IPFS hashing for a package is correct - against the true IPFS. + Check that our implementation of IPFS hashing for a package is correct against the true IPFS. :param fingerprint: the fingerprint dictionary. :param path_prefix: the path prefix to prepend. diff --git a/scripts/parse_main_dependencies_from_lock.py b/scripts/parse_main_dependencies_from_lock.py index 423db6af75..0b54533fcf 100755 --- a/scripts/parse_main_dependencies_from_lock.py +++ b/scripts/parse_main_dependencies_from_lock.py @@ -18,10 +18,7 @@ # # ------------------------------------------------------------------------------ -""" -This CLI tool takes the main dependencies of the Pipfile.lock -and prints it to stdout in requirements.txt format. -""" +"""This CLI tool takes the main dependencies of the Pipfile.lock and prints it to stdout in requirements.txt format.""" import json diff --git a/scripts/update_package_versions.py b/scripts/update_package_versions.py index ca92cb7927..58528e34e2 100644 --- a/scripts/update_package_versions.py +++ b/scripts/update_package_versions.py @@ -454,8 +454,7 @@ def replace_aea_add_statements(content, old_string, new_string, type_) -> str: def replace_type_and_public_id_occurrences(line, old_string, new_string, type_) -> str: - """Replace the public id whenever the type and the id occur in the same row, - and NOT when other type names occur.""" + """Replace the public id whenever the type and the id occur in the same row, and NOT when other type names occur.""" if re.match(f"{type_}.*{old_string}", line) and all( _type not in line for _type in TYPES.difference({type_}) ): diff --git a/scripts/update_symlinks_cross_platform.py b/scripts/update_symlinks_cross_platform.py index 5a0d5e89cd..0a6f1f5fc0 100755 --- a/scripts/update_symlinks_cross_platform.py +++ b/scripts/update_symlinks_cross_platform.py @@ -19,9 +19,7 @@ # ------------------------------------------------------------------------------ # pylint: disable=cyclic-import -""" -This script will update the symlinks of the project, cross-platform compatible. -""" +"""This script will update the symlinks of the project, cross-platform compatible.""" import contextlib import inspect diff --git a/setup.cfg b/setup.cfg index 38128340fa..98c82a39bb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,13 +12,12 @@ exclude=.md, scripts/oef/launch.py max-line-length = 88 select = B,C,D,E,F,I,W, -ignore = E203,E501,W503,D202,B014,D102,D400,D105,D401,D201,D205,D209,D210,D200,D103 +ignore = E203,E501,W503,D202,B014,D400,D401 application-import-names = aea,packages,tests,scripts -# eventually add: -# D102,D400,D105,D401,D201,D205,D209,D210,D200,D103 > clean up docstrings - # ignore: +# D400: First line should end with a period +# D401: First line should be in imperative mood # E501: https://www.flake8rules.com/rules/E501.html (Line too long) # E203: https://www.flake8rules.com/rules/E203.html (Whitespace) # W503: https://www.flake8rules.com/rules/W503.html (Line break) diff --git a/tests/common/mocks.py b/tests/common/mocks.py index f05fe342c1..8f5845adcb 100644 --- a/tests/common/mocks.py +++ b/tests/common/mocks.py @@ -32,6 +32,7 @@ class AnyStringWith(str): """ def __eq__(self, other): + """Check equality.""" return self in other @@ -43,6 +44,7 @@ class RegexComparator(str): """ def __eq__(self, other): + """Check equality.""" regex = re.compile(str(self), re.MULTILINE | re.DOTALL) s = str(other) return bool(regex.match(s)) diff --git a/tests/data/custom_crypto.py b/tests/data/custom_crypto.py index a0e9650f9a..0f1aa533d6 100644 --- a/tests/data/custom_crypto.py +++ b/tests/data/custom_crypto.py @@ -29,38 +29,79 @@ class CustomCrypto(Crypto): @classmethod def generate_private_key(cls) -> EntityClass: + """Generare private key.""" pass @classmethod def load_private_key_from_path(cls, file_name: str) -> EntityClass: + """ + Load private key from path. + + :param file_name: file name + """ pass @property def public_key(self) -> str: + """Get public key.""" pass @property def address(self) -> str: + """Get address.""" pass @property def private_key(self) -> str: + """Get private key.""" pass @classmethod def get_address_from_public_key(cls, public_key: str) -> str: + """ + Get address from public key. + + :param public_key: the public key. + :return: the address + """ pass def sign_message(self, message: bytes, is_deprecated_mode: bool = False) -> str: + """ + Sign message. + + :param message: the message + :param is_deprecated_mode: whether or not deprecated signing mode is used. + :return: signed message string + """ pass def sign_transaction(self, transaction: Any) -> Any: + """ + Sign transaction. + + :param transaction: the transaction to be signed + :return: the signed transaction + """ pass def recover_message( self, message: bytes, signature: str, is_deprecated_mode: bool = False ) -> Tuple[Address, ...]: + """ + Recover message. + + :param message: the message + :param signature: the signature + :param is_deprecated_mode: whether or not it is deprecated + """ pass def dump(self, fp: BinaryIO) -> None: + """ + Dump the private key. + + :param fp: the file path + :return: None + """ pass diff --git a/tests/data/dummy_contract/contract.py b/tests/data/dummy_contract/contract.py index cee201556f..89aef4f502 100644 --- a/tests/data/dummy_contract/contract.py +++ b/tests/data/dummy_contract/contract.py @@ -28,4 +28,5 @@ class DummyContract(Contract): @classmethod def some_method(cls, ledger_api: LedgerApi, contract_address: str) -> None: + """Some method.""" pass diff --git a/tests/data/dummy_contract/contract.yaml b/tests/data/dummy_contract/contract.yaml index ba3b8be4b1..1c7f62b9f1 100644 --- a/tests/data/dummy_contract/contract.yaml +++ b/tests/data/dummy_contract/contract.yaml @@ -9,7 +9,7 @@ fingerprint: __init__.py: QmWbNjFh6E5V4n2qBwyZyXZdmmHvcZSVnwKrcM34MAE56S build/some.json: Qma5n7au2NDCg1nLwYfYnmFNwWChFuXtu65w5DV7wAZRvw build/some.wasm: Qmc9gthbdwRSywinTHKjRVQdFzrKTxUuLDx2ryNfQp1xqf - contract.py: QmYBTVD7kwvrzMTfkHdzTUPsg24o1qJfQ7wR5WhKAx9xUY + contract.py: QmYfn2V3tXv7MCyhT5Kz5ArtX2FZWHC1jfeRmqCNsRxDL5 fingerprint_ignore_patterns: [] class_name: DummyContract contract_interface_paths: diff --git a/tests/data/hashes.csv b/tests/data/hashes.csv index 7fe00a5120..32219ab32f 100644 --- a/tests/data/hashes.csv +++ b/tests/data/hashes.csv @@ -1,6 +1,6 @@ dummy_author/agents/dummy_aea,QmQRx5aPogjbzyV1GKFByfPpCENu7A1E1GGC9arXCKnzsD dummy_author/skills/dummy_skill,QmQpimGAQ56nihemchgE29Mfan57YdGixj3kat69FGkrjK fetchai/connections/dummy_connection,QmT7zw62fDK1mmwYqTvw4pWqFg8Fc1DYQHUxcxd7sqZiLu -fetchai/contracts/dummy_contract,QmQr6BLGQuj45r55S5Bo8xqP8ggr4hbmJBbHUJ14uh1qjD +fetchai/contracts/dummy_contract,QmPMs9VDGZGF8xJ8XBYLVb1xK5XAgiaJr5Gwcq7Vr3TUyu fetchai/skills/dependencies_skill,QmaLBgnwTXdTzue7H3UbVuKmPxaqoK4Azpj85tKTdQi29j fetchai/skills/exception_skill,QmT2RiM95EVbXTD31zU6pKKoERkrCLuyxpAJfkm3dTsTp2 diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index dcf3151a1c..e9d464538d 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -655,8 +655,7 @@ def test_from_project(self): class TestFromAEAProjectCustomConfigFailsWhenComponentNotDeclared(AEATestCaseEmpty): - """Test builder set from project dir with custom component config fails - when the component is not declared in the agent configuration.""" + """Test builder set from project dir with custom component config fails when the component is not declared in the agent configuration.""" def _add_stub_connection_config(self): """Add custom stub connection config.""" diff --git a/tests/test_agent.py b/tests/test_agent.py index 8603db6ba0..35f4ff37a6 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -62,6 +62,7 @@ def teardown(self) -> None: @property def resources(self): + """Get resources.""" return Mock() diff --git a/tests/test_cli/tools_for_testing.py b/tests/test_cli/tools_for_testing.py index 59994fe546..10b95f1543 100644 --- a/tests/test_cli/tools_for_testing.py +++ b/tests/test_cli/tools_for_testing.py @@ -75,6 +75,7 @@ def __init__(self, *args, **kwargs): self.obj = self def set_config(self, key, value): + """Set config.""" setattr(self.config, key, value) diff --git a/tests/test_components/test_base.py b/tests/test_components/test_base.py index 9c23b65f25..8fbbaf486c 100644 --- a/tests/test_components/test_base.py +++ b/tests/test_components/test_base.py @@ -32,6 +32,7 @@ class TestComponentProperties: """Test accessibility of component properties.""" def setup_class(self): + """Setup test.""" self.configuration = ProtocolConfig("name", "author", "0.1.0") self.component = Component(configuration=self.configuration) self.directory = Path() diff --git a/tests/test_components/test_loader.py b/tests/test_components/test_loader.py index e00dfef091..4139b34e7f 100644 --- a/tests/test_components/test_loader.py +++ b/tests/test_components/test_loader.py @@ -63,8 +63,7 @@ def test_component_loading_generic_module_not_found_error(component_configuratio def test_component_loading_module_not_found_error_non_framework_package( component_configuration, ): - """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs - for a generic import path (non framework related.""" + """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs for a generic import path (non framework related.""" with mock.patch.object( Protocol, "from_config", @@ -77,9 +76,7 @@ def test_component_loading_module_not_found_error_non_framework_package( def test_component_loading_module_not_found_error_framework_package( component_configuration, ): - """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs - for a framework-related import (starts with 'packages') but for some reason it doesn't - contain the author name.""" + """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs for a framework-related import (starts with 'packages') but for some reason it doesn't contain the author name.""" with mock.patch.object( Protocol, "from_config", @@ -92,8 +89,7 @@ def test_component_loading_module_not_found_error_framework_package( def test_component_loading_module_not_found_error_framework_package_with_wrong_author( component_configuration, ): - """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs - for a framework-related import (starts with 'packages') with wrong author.""" + """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs for a framework-related import (starts with 'packages') with wrong author.""" with mock.patch.object( Protocol, "from_config", @@ -109,8 +105,7 @@ def test_component_loading_module_not_found_error_framework_package_with_wrong_a def test_component_loading_module_not_found_error_framework_package_with_wrong_type( component_configuration, ): - """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs - for a framework-related import (starts with 'packages') with correct author but wrong type.""" + """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs for a framework-related import (starts with 'packages') with correct author but wrong type.""" with mock.patch.object( Protocol, "from_config", @@ -128,8 +123,7 @@ def test_component_loading_module_not_found_error_framework_package_with_wrong_t def test_component_loading_module_not_found_error_framework_package_with_wrong_name( component_configuration, ): - """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs - for a framework-related import (starts with 'packages') with correct author and type but wrong name.""" + """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs for a framework-related import (starts with 'packages') with correct author and type but wrong name.""" with mock.patch.object( Protocol, "from_config", @@ -147,8 +141,7 @@ def test_component_loading_module_not_found_error_framework_package_with_wrong_n def test_component_loading_module_not_found_error_framework_package_with_wrong_suffix( component_configuration, ): - """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs - for a framework-related import (starts with 'packages') with correct author and type but wrong suffix.""" + """Test 'load_component_from_config' method when a "ModuleNotFoundError" occurs for a framework-related import (starts with 'packages') with correct author and type but wrong suffix.""" with mock.patch.object( Protocol, "from_config", diff --git a/tests/test_configurations/test_aea_config.py b/tests/test_configurations/test_aea_config.py index 151502a121..039b6a3eb6 100644 --- a/tests/test_configurations/test_aea_config.py +++ b/tests/test_configurations/test_aea_config.py @@ -320,10 +320,7 @@ def test_agent_configuration_loading_multipage_when_type_not_found(): def test_agent_configuration_loading_multipage_when_same_id(): - """ - Test agent configuration loading, multi-page case, - when there are two components with the same id. - """ + """Test agent configuration loading, multi-page case, when there are two components with the same id.""" file = Path(CUR_PATH, "data", "aea-config.example_multipage.yaml").open() jsons = list(yaml.safe_load_all(file)) # add twice the last component @@ -341,10 +338,7 @@ def test_agent_configuration_loading_multipage_when_same_id(): def test_agent_configuration_loading_multipage_validation_error(): - """ - Test agent configuration loading, multi-page case, - when the configuration is invalid. - """ + """Test agent configuration loading, multi-page case, when the configuration is invalid.""" file = Path(CUR_PATH, "data", "aea-config.example_multipage.yaml").open() jsons = list(yaml.safe_load_all(file)) # make invalid the last component configuration diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index 47afd083a1..13d523b9ea 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -436,8 +436,7 @@ def test_public_id_from_uri_path(): def test_public_id_from_uri_path_wrong_input(): - """Test that when a bad formatted path is passed in input of PublicId.from_uri_path - an exception is raised.""" + """Test that when a bad formatted path is passed in input of PublicId.from_uri_path an exception is raised.""" with pytest.raises( ValueError, match="Input 'bad/formatted:input' is not well formatted." ): @@ -634,6 +633,7 @@ def test_agent_config_to_json_with_optional_configurations(): def test_protocol_specification_attributes(): + """Test protocol specification attributes.""" protocol_specification = ProtocolSpecification("name", "author", "0.1.0") # test getter and setter for 'protobuf_snippets' diff --git a/tests/test_contracts/test_base.py b/tests/test_contracts/test_base.py index 739cabdac2..13e2e10064 100644 --- a/tests/test_contracts/test_base.py +++ b/tests/test_contracts/test_base.py @@ -88,6 +88,7 @@ def test_non_implemented_class_methods(): @pytest.fixture() def dummy_contract(request): + """Dummy contract fixture.""" directory = Path(ROOT_DIR, "tests", "data", "dummy_contract") configuration = load_component_configuration(ComponentType.CONTRACT, directory) configuration._directory = directory diff --git a/tests/test_crypto/test_fetchai.py b/tests/test_crypto/test_fetchai.py index 2e57c3b8ed..aec465043f 100644 --- a/tests/test_crypto/test_fetchai.py +++ b/tests/test_crypto/test_fetchai.py @@ -44,9 +44,11 @@ def __init__(self, data, status_code=None): @property def status_code(self): + """Get status code.""" return 200 def json(self): + """Get json.""" return self._data @@ -222,6 +224,7 @@ def test_get_wealth_positive(caplog): @mock.patch("requests.get") @mock.patch("requests.post") def test_successful_faucet_operation(mock_post, mock_get): + """Test successful faucet operation.""" address = "a normal cosmos address would be here" mock_post.return_value = MockRequestsResponse({"uid": "a-uuid-v4-would-be-here"}) @@ -258,6 +261,7 @@ def test_successful_faucet_operation(mock_post, mock_get): @mock.patch("requests.get") @mock.patch("requests.post") def test_successful_realistic_faucet_operation(mock_post, mock_get): + """Test successful realistic faucet operation.""" address = "a normal cosmos address would be here" mock_post.return_value = MockRequestsResponse({"uid": "a-uuid-v4-would-be-here"}) diff --git a/tests/test_docs/test_agent_vs_aea/agent_code_block.py b/tests/test_docs/test_agent_vs_aea/agent_code_block.py index b449261244..e219fd1420 100644 --- a/tests/test_docs/test_agent_vs_aea/agent_code_block.py +++ b/tests/test_docs/test_agent_vs_aea/agent_code_block.py @@ -45,12 +45,20 @@ def __init__(self, identity: Identity, connections: List[Connection]): super().__init__(identity, connections) def setup(self): + """Setup the agent.""" pass def act(self): + """Act implementation.""" print("Act called for tick {}".format(self.tick)) def handle_envelope(self, envelope: Envelope) -> None: + """ + Handle envelope. + + :param envelope: the envelope received + :return: None + """ print("React called for tick {}".format(self.tick)) if envelope is not None and envelope.protocol_id == DefaultMessage.protocol_id: sender = envelope.sender @@ -68,10 +76,13 @@ def handle_envelope(self, envelope: Envelope) -> None: self.outbox.put(envelope) def teardown(self): + """Teardown the agent.""" pass def run(): + """Run demo.""" + # Ensure the input and output files do not exist initially if os.path.isfile(INPUT_FILE): os.remove(INPUT_FILE) diff --git a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py index 74edb9b2f8..5d004506d0 100644 --- a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py @@ -37,6 +37,8 @@ def run(): + """Run demo.""" + # Create a private key create_private_key(FetchAICrypto.identifier, FETCHAI_PRIVATE_KEY_FILE) diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py index d2c45d6ce8..737f29fdfa 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py @@ -57,6 +57,8 @@ def run(): + """Run demo.""" + # Create a private key create_private_key(FetchAICrypto.identifier, FETCHAI_PRIVATE_KEY_FILE) create_private_key(FetchAICrypto.identifier, FETCHAI_PRIVATE_KEY_FILE_CONNECTION) diff --git a/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py b/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py index 1df4381796..10e9ad3055 100644 --- a/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py +++ b/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py @@ -47,6 +47,8 @@ def run(): + """Run demo.""" + # Create a private key create_private_key( FetchAICrypto.identifier, private_key_file=FETCHAI_PRIVATE_KEY_FILE_1 diff --git a/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py b/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py index 7db76bc82e..7c3065ddde 100644 --- a/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py +++ b/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py @@ -82,5 +82,6 @@ def test_run_end_to_end(self): @classmethod def teardown_class(cls): + """Teardown test.""" BaseAEATestCase.teardown_class() cls._unpatch_logger() diff --git a/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py b/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py index 428c061402..b4e1d47dde 100644 --- a/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py +++ b/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py @@ -36,6 +36,8 @@ def run(): + """Run demo.""" + # Ensure the input and output files do not exist initially if os.path.isfile(INPUT_FILE): os.remove(INPUT_FILE) diff --git a/tests/test_docs/test_orm_integration/test_orm_integration.py b/tests/test_docs/test_orm_integration/test_orm_integration.py index 68d16d5652..b96e8f6c44 100644 --- a/tests/test_docs/test_orm_integration/test_orm_integration.py +++ b/tests/test_docs/test_orm_integration/test_orm_integration.py @@ -310,10 +310,7 @@ def test_orm_integration_docs_example(self): def test_strategy_consistency(): - """ - Test that the seller strategy specified in the documentation - is the same we use in the tests. - """ + """Test that the seller strategy specified in the documentation is the same we use in the tests.""" markdown_parser = mistune.create_markdown(renderer=mistune.AstRenderer()) skill_doc_file = Path(ROOT_DIR, "docs", "orm-integration.md") diff --git a/tests/test_docs/test_standalone_transaction/standalone_transaction.py b/tests/test_docs/test_standalone_transaction/standalone_transaction.py index bee41ae2dc..e137def89f 100644 --- a/tests/test_docs/test_standalone_transaction/standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/standalone_transaction.py @@ -35,6 +35,8 @@ def run(): + """Run demo.""" + # Create a private keys create_private_key( FetchAICrypto.identifier, private_key_file=FETCHAI_PRIVATE_KEY_FILE_1 diff --git a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py index 0ec4d1e8ba..ac2e07b52f 100644 --- a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py +++ b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py @@ -101,6 +101,7 @@ def setup_class(cls): @pytest.mark.asyncio async def test_connecting_to_aca(self): + """Test connecting to aca.""" configuration = ConnectionConfig( host=self.aca_admin_address, port=self.aca_admin_port, @@ -166,6 +167,7 @@ async def test_connecting_to_aca(self): @pytest.mark.asyncio async def test_end_to_end_aea_aca(self): + """Test the end to end aea aca interaction.""" # AEA components wallet = Wallet({DEFAULT_LEDGER: DEFAULT_PRIVATE_KEY_FILE}) identity = Identity( @@ -266,6 +268,7 @@ async def test_end_to_end_aea_aca(self): @classmethod def teardown_class(cls): + """Teardown the aca.""" # terminate the ACA cls.process.terminate() diff --git a/tests/test_helpers/test_multiaddr.py b/tests/test_helpers/test_multiaddr.py index d8ae14acc4..74218e7134 100644 --- a/tests/test_helpers/test_multiaddr.py +++ b/tests/test_helpers/test_multiaddr.py @@ -33,6 +33,7 @@ def test_multiaddr_consistency(): + """Test multiaddress consistency.""" key = make_crypto(DEFAULT_LEDGER) maddr1 = MultiAddr(HOST, PORT, key.public_key) @@ -52,6 +53,7 @@ def test_multiaddr_consistency(): def test_multiaddr_correctness(): + """Test multiaddress correctness.""" tmpdir = tempfile.mkdtemp() key_file = tmpdir + "/key" with open(key_file, "w+") as k: diff --git a/tests/test_helpers/test_pipe/test_pipe.py b/tests/test_helpers/test_pipe/test_pipe.py index 863b2e35a9..f4e5d95ef5 100644 --- a/tests/test_helpers/test_pipe/test_pipe.py +++ b/tests/test_helpers/test_pipe/test_pipe.py @@ -60,6 +60,7 @@ class TestAEAHelperMakePipe: @pytest.mark.asyncio async def test_connection_communication(self): + """Test connection communication.""" pipe = make_ipc_channel() assert ( pipe.in_path is not None and pipe.out_path is not None @@ -94,6 +95,7 @@ class TestAEAHelperTCPSocketChannel: @pytest.mark.asyncio async def test_connection_communication(self): + """Test connection communication.""" pipe = TCPSocketChannel() assert ( pipe.in_path is not None and pipe.out_path is not None @@ -123,6 +125,7 @@ async def test_connection_communication(self): @pytest.mark.asyncio async def test_connection_refused(self): + """Test connection refused.""" pipe = TCPSocketChannel() assert ( pipe.in_path is not None and pipe.out_path is not None @@ -141,6 +144,7 @@ class TestAEAHelperPosixNamedPipeChannel: @pytest.mark.asyncio async def test_connection_communication(self): + """Test connection communication.""" pipe = PosixNamedPipeChannel() assert ( pipe.in_path is not None and pipe.out_path is not None diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py index 3a55f07d72..c1e9f70ea2 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py @@ -43,6 +43,7 @@ def setup_class(cls): @libp2p_log_on_failure def test_agent(self): + """Test with aea.""" self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") @@ -87,6 +88,7 @@ def setup_class(cls): @libp2p_log_on_failure def test_agent(self): + """Test with aea.""" self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") # setup a full node: with public uri, relay service, and delegate service diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py index 2fe03587f1..49a08a0be9 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py @@ -56,6 +56,7 @@ def setup_class(cls): @pytest.mark.asyncio async def test_p2plibp2pconnection_connect_disconnect(self): + """Test connect then disconnect.""" assert self.connection.is_connected is False try: await self.connection.connect() @@ -113,10 +114,12 @@ def setup_class(cls): raise e def test_connection_is_established(self): + """Test connection established.""" assert self.connection1.is_connected is True assert self.connection2.is_connected is True def test_envelope_routed(self): + """Test envelope routed.""" addr_1 = self.connection1.node.address addr_2 = self.connection2.node.address @@ -148,6 +151,7 @@ def test_envelope_routed(self): assert envelope.message == msg def test_envelope_echoed_back(self): + """Test envelope echoed back.""" addr_1 = self.connection1.node.address addr_2 = self.connection2.node.address @@ -237,11 +241,13 @@ def setup_class(cls): raise e def test_connection_is_established(self): + """Test connection established.""" assert self.connection_genesis.is_connected is True for conn in self.connections: assert conn.is_connected is True def test_star_routing_connectivity(self): + """Test star routing connectivity.""" addrs = [conn.node.address for conn in self.connections] for source in range(len(self.multiplexers)): @@ -333,11 +339,13 @@ def setup_class(cls): raise e def test_connection_is_established(self): + """Test connection established.""" assert self.relay.is_connected is True assert self.connection1.is_connected is True assert self.connection2.is_connected is True def test_envelope_routed(self): + """Test envelope routed.""" addr_1 = self.connection1.node.address addr_2 = self.connection2.node.address @@ -369,6 +377,7 @@ def test_envelope_routed(self): assert envelope.message == msg def test_envelope_echoed_back(self): + """Test envelope echoed back.""" addr_1 = self.connection1.node.address addr_2 = self.connection2.node.address @@ -481,12 +490,14 @@ def setup_class(cls): raise e def test_connection_is_established(self): + """Test connection established.""" assert self.connection_relay_1.is_connected is True assert self.connection_relay_2.is_connected is True for conn in self.connections: assert conn.is_connected is True def test_star_routing_connectivity(self): + """Test star routing connectivity.""" addrs = [conn.node.address for conn in self.connections] for source in range(len(self.multiplexers)): @@ -535,6 +546,7 @@ def teardown_class(cls): def test_libp2pconnection_uri(): + """Test uri.""" uri = Uri(host="127.0.0.1") uri = Uri(host="127.0.0.1", port=10000) assert uri.host == "127.0.0.1" and uri.port == 10000 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py index cb120af62d..7828bec9ed 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py @@ -64,6 +64,7 @@ def setup_class(cls): @pytest.mark.asyncio async def test_timeout(self): + """Test the timeout.""" log_file_desc = open("log", "a", 1) with pytest.raises(Exception): await _golang_module_build_async( @@ -72,6 +73,7 @@ async def test_timeout(self): @pytest.mark.asyncio async def test_wrong_path(self): + """Test the wrong path.""" self.connection.node.source = self.wrong_path with pytest.raises(Exception): await self.connection.connect() @@ -101,6 +103,7 @@ def setup_class(cls): cls.wrong_path = tempfile.mkdtemp() def test_wrong_path(self): + """Test the wrong path.""" log_file_desc = open("log", "a", 1) with pytest.raises(Exception): _golang_module_run( @@ -108,6 +111,7 @@ def test_wrong_path(self): ) def test_timeout(self): + """Test the timeout.""" self.connection.node._connection_timeout = 0 muxer = Multiplexer([self.connection]) with pytest.raises(Exception): @@ -138,6 +142,7 @@ def setup_class(cls): cls.connection = _make_libp2p_connection() def test_node_disconnect(self): + """Test node disconnect.""" muxer = Multiplexer([self.connection]) muxer.connect() self.connection.node.proc.terminate() @@ -174,6 +179,7 @@ def setup_class(cls): key_file_desc.close() def test_entry_peers_when_no_public_uri_provided(self): + """Test entry peers when no public uri provided.""" configuration = ConnectionConfig( libp2p_key_file=None, local_uri="{}:{}".format(self.host, self.port), @@ -186,7 +192,7 @@ def test_entry_peers_when_no_public_uri_provided(self): P2PLibp2pConnection(configuration=configuration, identity=self.identity) def test_local_uri_provided_when_public_uri_provided(self): - + """Test local uri provided when public uri provided.""" configuration = ConnectionConfig( node_key_file=self.key_file, public_uri="{}:{}".format(self.host, self.port), @@ -208,6 +214,7 @@ def teardown_class(cls): def test_libp2pconnection_awaitable_proc_cancelled(): + """Test awaitable proc cancelled.""" proc = AwaitableProc(["sleep", "100"], shell=False) proc_task = asyncio.ensure_future(proc.start()) proc_task.cancel() diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py index cd781550dc..97553180c5 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py @@ -93,10 +93,12 @@ def setup_class(cls): raise e def test_connection_is_established(self): + """Test connection established.""" assert self.relay.is_connected is True assert self.connection.is_connected is True def test_envelope_routed_after_relay_restart(self): + """Test envelope routed after relay restart.""" addr_1 = self.connection.address addr_2 = self.genesis.address @@ -220,10 +222,12 @@ def setup_class(cls): raise e def test_connection_is_established(self): + """Test connection established.""" assert self.connection1.is_connected is True assert self.connection2.is_connected is True def test_envelope_routed_after_peer_changed(self): + """Test envelope routed after peer changed.""" addr_1 = self.connection1.address addr_2 = self.connection2.address diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py index 1ba7fd6174..831d56a466 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py @@ -63,6 +63,7 @@ def setup_class(cls): cls.log_files = [] def test_connectivity(self): + """Test connectivity.""" for maddr in PUBLIC_DHT_MADDRS: connection = _make_libp2p_connection( DEFAULT_PORT + 1, relay=False, entry_peers=[maddr] @@ -81,6 +82,7 @@ def test_connectivity(self): multiplexer.disconnect() def test_communication_direct(self): + """Test communication direct.""" for maddr in PUBLIC_DHT_MADDRS: multiplexers = [] try: @@ -136,6 +138,7 @@ def test_communication_direct(self): mux.disconnect() def test_communication_indirect(self): + """Test communication indirect.""" assert len(PUBLIC_DHT_MADDRS) > 1, "Test requires at least 2 public dht node" for i in range(len(PUBLIC_DHT_MADDRS)): @@ -215,6 +218,7 @@ class TestLibp2pConnectionPublicDHTDelegate: """Test that public DHT's delegate service is working properly""" def test_connectivity(self): + """Test connectivity.""" for uri in PUBLIC_DHT_DELEGATE_URIS: connection = _make_libp2p_client_connection(uri=uri) multiplexer = Multiplexer([connection]) @@ -230,6 +234,7 @@ def test_connectivity(self): multiplexer.disconnect() def test_communication_direct(self): + """Test communication direct.""" for uri in PUBLIC_DHT_DELEGATE_URIS: multiplexers = [] try: @@ -279,6 +284,7 @@ def test_communication_direct(self): mux.disconnect() def test_communication_indirect(self): + """Test communication indirect.""" assert ( len(PUBLIC_DHT_DELEGATE_URIS) > 1 ), "Test requires at least 2 public dht node" @@ -348,6 +354,7 @@ class TestLibp2pConnectionPublicDHTRelayAEACli(AEATestCaseEmpty): @libp2p_log_on_failure def test_connectivity(self): + """Test connectivity.""" self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") @@ -393,6 +400,7 @@ class TestLibp2pConnectionPublicDHTDelegateAEACli(AEATestCaseEmpty): """Test that public DHT's delegate service is working properly, using aea cli""" def test_connectivity(self): + """Test connectivity.""" self.add_item("connection", "fetchai/p2p_libp2p_client:0.6.0") config_path = "vendor.fetchai.connections.p2p_libp2p_client.config" self.force_set_config( diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py index 349a9bea84..6ad8a42aaa 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py @@ -56,9 +56,11 @@ def setup_class(cls): cls.node_multiplexer.connect() def test_node(self): + """Test the node is connected.""" assert self.node_connection.is_connected is True def test_connection(self): + """Test the connection can be used in an aea.""" self.add_item("connection", "fetchai/p2p_libp2p_client:0.6.0") config_path = "vendor.fetchai.connections.p2p_libp2p_client.config" self.force_set_config( diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py index fb6cea9930..308f2b6bd2 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py @@ -61,6 +61,7 @@ def setup_class(cls): @pytest.mark.asyncio async def test_libp2pclientconnection_connect_disconnect(self): + """Test connnect then disconnect.""" assert self.connection.is_connected is False try: await self.connection_node.connect() @@ -116,10 +117,12 @@ def setup_class(cls): raise def test_connection_is_established(self): + """Test connection is established.""" assert self.connection_client_1.is_connected is True assert self.connection_client_2.is_connected is True def test_envelope_routed(self): + """Test the envelope is routed.""" addr_1 = self.connection_client_1.address addr_2 = self.connection_client_2.address @@ -147,6 +150,7 @@ def test_envelope_routed(self): assert delivered_envelope.message == envelope.message def test_envelope_echoed_back(self): + """Test the envelope is echoed back.""" addr_1 = self.connection_client_1.address addr_2 = self.connection_client_2.address @@ -181,6 +185,7 @@ def test_envelope_echoed_back(self): assert delivered_envelope.message == original_envelope.message def test_envelope_echoed_back_node_agent(self): + """Test the envelope is echoed back.""" addr_1 = self.connection_client_1.address addr_n = self.connection_node.address @@ -285,12 +290,14 @@ def setup_class(cls): raise def test_connection_is_established(self): + """Test the connection is established.""" assert self.connection_node_1.is_connected is True assert self.connection_node_2.is_connected is True assert self.connection_client_1.is_connected is True assert self.connection_client_2.is_connected is True def test_envelope_routed(self): + """Test the envelope is routed.""" addr_1 = self.connection_client_1.address addr_2 = self.connection_client_2.address @@ -318,6 +325,7 @@ def test_envelope_routed(self): assert delivered_envelope.message == envelope.message def test_envelope_echoed_back(self): + """Test the envelope is echoed back.""" addr_1 = self.connection_client_1.address addr_2 = self.connection_client_2.address @@ -352,6 +360,7 @@ def test_envelope_echoed_back(self): assert delivered_envelope.message == original_envelope.message def test_envelope_echoed_back_node_agent(self): + """Test the envelope is echoed back node agent.""" addr_1 = self.connection_client_1.address addr_n = self.connection_node_2.address @@ -457,10 +466,12 @@ def setup_class(cls): raise def test_connection_is_established(self): + """Test connection is established.""" for conn in self.connections: assert conn.is_connected is True def test_star_routing_connectivity(self): + """Test routing with star connectivity.""" msg = DefaultMessage( dialogue_reference=("", ""), message_id=1, @@ -504,6 +515,7 @@ def teardown_class(cls): def test_libp2pclientconnection_uri(): + """Test the uri.""" uri = Uri(host="127.0.0.1") uri = Uri(host="127.0.0.1", port=10000) assert uri.host == "127.0.0.1" and uri.port == 10000 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py index 12371b86e7..4500e3c166 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py @@ -48,6 +48,7 @@ class TestLibp2pClientConnectionFailureNodeNotConnected: @pytest.mark.asyncio async def test_node_not_running(self): + """Test the node is not running.""" conn = _make_libp2p_client_connection() with pytest.raises(Exception): await conn.connect() @@ -73,6 +74,7 @@ def setup_class(cls): key_file_desc.close() def test_empty_nodes(self): + """Test empty nodes.""" configuration = ConnectionConfig( client_key_file=self.key_file, nodes=[{"uri": "{}:{}".format(self.node_host, self.node_port)}], @@ -130,6 +132,7 @@ def setup_class(cls): raise def test_node_disconnected(self): + """Test node disconnected.""" assert self.connection_client.is_connected is True self.multiplexer_client.disconnect() self.multiplexer_node.disconnect() diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index d739796356..46d4405451 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -199,6 +199,7 @@ def search(self, query: Query) -> OefSearchMessage: return message def get(self): + """Get an instance.""" wait_for_condition(lambda: not self.multiplexer.in_queue.empty(), timeout=20) return self.multiplexer.get() diff --git a/tests/test_packages/test_contracts/test_erc1155/test_contract.py b/tests/test_packages/test_contracts/test_erc1155/test_contract.py index 5078801f90..f2e9d58821 100644 --- a/tests/test_packages/test_contracts/test_erc1155/test_contract.py +++ b/tests/test_packages/test_contracts/test_erc1155/test_contract.py @@ -51,6 +51,7 @@ @pytest.fixture(params=ledger) def ledger_api(request): + """Ledger api fixture.""" ledger_id, config = request.param api = ledger_apis_registry.make(ledger_id, **config) yield api @@ -58,6 +59,7 @@ def ledger_api(request): @pytest.fixture(params=crypto) def crypto_api(request): + """Crypto api fixture.""" crypto_id = request.param[0] api = crypto_registry.make(crypto_id) yield api @@ -66,6 +68,7 @@ def crypto_api(request): @pytest.mark.integration @pytest.mark.ledger def test_helper_methods_and_get_transactions(ledger_api, erc1155_contract): + """Test helper methods and get transactions.""" expected_a = [ 340282366920938463463374607431768211456, 340282366920938463463374607431768211457, @@ -154,6 +157,7 @@ def test_helper_methods_and_get_transactions(ledger_api, erc1155_contract): @pytest.mark.integration @pytest.mark.ledger def test_get_single_atomic_swap(ledger_api, crypto_api, erc1155_contract): + """Test get single atomic swap.""" contract_address = "0x250A2aeb3eB84782e83365b4c42dbE3CDA9920e4" from_address = ETHEREUM_ADDRESS_ONE to_address = ETHEREUM_ADDRESS_TWO @@ -201,6 +205,7 @@ def test_get_single_atomic_swap(ledger_api, crypto_api, erc1155_contract): @pytest.mark.integration @pytest.mark.ledger def test_get_batch_atomic_swap(ledger_api, crypto_api, erc1155_contract): + """Test get batch atomic swap.""" contract_address = "0x250A2aeb3eB84782e83365b4c42dbE3CDA9920e4" from_address = ETHEREUM_ADDRESS_ONE to_address = ETHEREUM_ADDRESS_TWO @@ -249,6 +254,7 @@ class TestCosmWasmContract: """Test the cosmwasm contract.""" def setup(self): + """Setup.""" self.ledger_api = ledger_apis_registry.make(FETCHAI, **FETCHAI_TESTNET_CONFIG) self.faucet_api = faucet_apis_registry.make(FETCHAI) self.deployer_crypto = crypto_registry.make(FETCHAI) @@ -281,6 +287,7 @@ def setup(self): ) def refill_from_faucet(self, ledger_api, faucet_api, address): + """Refill from faucet.""" start_balance = ledger_api.get_balance(address) faucet_api.get_wealth(address) @@ -356,6 +363,7 @@ def sign_send_verify_deploy_init_transaction( @pytest.mark.integration @pytest.mark.ledger def test_cosmwasm_contract_deploy_and_interact(self, erc1155_contract): + """Test cosmwasm contract deploy and interact.""" # Deploy contract tx = erc1155_contract.get_deploy_transaction( ledger_api=self.ledger_api, @@ -452,6 +460,7 @@ def test_cosmwasm_contract_deploy_and_interact(self, erc1155_contract): def test_cosmwasm_unimplemented_exception_single_atomic_swap( self, erc1155_contract ): + """Test unimplemented exception single atomic swap.""" pytest.raises( NotImplementedError, erc1155_contract.get_atomic_swap_single_transaction, @@ -470,6 +479,7 @@ def test_cosmwasm_unimplemented_exception_single_atomic_swap( @pytest.mark.integration @pytest.mark.ledger def test_cosmwasm_unimplemented_exception_batch_atomic_swap(self, erc1155_contract): + """Test unimplemented exception batch atomic swap.""" pytest.raises( NotImplementedError, erc1155_contract.get_atomic_swap_batch_transaction, diff --git a/tests/test_protocols/test_base.py b/tests/test_protocols/test_base.py index 5a00f11c6a..357b1e9a8e 100644 --- a/tests/test_protocols/test_base.py +++ b/tests/test_protocols/test_base.py @@ -92,11 +92,13 @@ class TestMessageProperties: @classmethod def setup_class(cls): + """Setup test.""" cls.body = {"body_1": "1", "body_2": "2"} cls.kwarg = 1 cls.message = Message(cls.body, kwarg=cls.kwarg) def test_message_properties(self): + """Test message properties.""" for key, value in self.body.items(): assert self.message.get(key) == value assert self.message.get("kwarg") == self.kwarg diff --git a/tests/test_protocols/test_dialogue/test_base.py b/tests/test_protocols/test_dialogue/test_base.py index 3355a235b3..272676ca91 100644 --- a/tests/test_protocols/test_dialogue/test_base.py +++ b/tests/test_protocols/test_dialogue/test_base.py @@ -1582,6 +1582,7 @@ def test_generate_dialogue_nonce(self): assert nonce != second_nonce def test_get_dialogues_with_counterparty(self): + """Test get dialogues with counterparty.""" assert ( self.own_dialogues.get_dialogues_with_counterparty(self.opponent_address) == [] diff --git a/tests/test_protocols/test_generator/common.py b/tests/test_protocols/test_generator/common.py index 012c56c1e1..38831b9632 100644 --- a/tests/test_protocols/test_generator/common.py +++ b/tests/test_protocols/test_generator/common.py @@ -31,4 +31,5 @@ def black_is_not_installed(*args, **kwargs): + """Check black is not installed.""" return not args[0] == "black" diff --git a/tests/test_protocols/test_generator/test_common.py b/tests/test_protocols/test_generator/test_common.py index 1513f53a62..0c6a86960e 100644 --- a/tests/test_protocols/test_generator/test_common.py +++ b/tests/test_protocols/test_generator/test_common.py @@ -53,10 +53,12 @@ def black_is_not_installed_side_effect(*args, **kwargs): + """Black not installed.""" return not args[0] == "black" def protoc_is_not_installed_side_effect(*args, **kwargs): + """Protoco not installed.""" return not args[0] == "protoc" @@ -65,6 +67,7 @@ class TestCommon(TestCase): @classmethod def setup_class(cls): + """Setup test.""" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() os.chdir(cls.t) diff --git a/tests/test_protocols/test_generator/test_extract_specification.py b/tests/test_protocols/test_generator/test_extract_specification.py index 5aa6382ca2..9f1122363b 100644 --- a/tests/test_protocols/test_generator/test_extract_specification.py +++ b/tests/test_protocols/test_generator/test_extract_specification.py @@ -48,6 +48,7 @@ class TestExtractSpecification(TestCase): @classmethod def setup_class(cls): + """Setup class.""" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() os.chdir(cls.t) diff --git a/tests/test_protocols/test_generator/test_generator.py b/tests/test_protocols/test_generator/test_generator.py index 19d7a189b9..1d57fcee60 100644 --- a/tests/test_protocols/test_generator/test_generator.py +++ b/tests/test_protocols/test_generator/test_generator.py @@ -1074,6 +1074,7 @@ class ProtocolGeneratorTestCase(TestCase): @classmethod def setup_class(cls): + """Setup class.""" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() os.chdir(cls.t) diff --git a/tests/test_skills/test_behaviours.py b/tests/test_skills/test_behaviours.py index 2d22d03b62..d0cf7fd4fb 100644 --- a/tests/test_skills/test_behaviours.py +++ b/tests/test_skills/test_behaviours.py @@ -41,9 +41,11 @@ class MySequenceBehaviour(SequenceBehaviour): """Custom sequence behaviour.""" def setup(self) -> None: + """Setup behaviour.""" pass def teardown(self) -> None: + """Teardown behaviour.""" pass class SimpleOneShotBehaviour(OneShotBehaviour): @@ -53,12 +55,15 @@ def __init__(self, name, **kwargs): super().__init__(name=name, **kwargs) def setup(self) -> None: + """Setup behaviour.""" pass def teardown(self) -> None: + """Teardown behaviour.""" pass def act(self) -> None: + """Act implementation.""" outputs.append(self.name) # TODO let the initialization of a behaviour action from constructor @@ -96,9 +101,11 @@ class SimpleFSMBehaviour(FSMBehaviour): """A Finite-State Machine behaviour for testing purposes.""" def setup(self) -> None: + """Setup behaviour.""" pass def teardown(self) -> None: + """Teardown behaviour.""" pass @@ -113,17 +120,21 @@ def __init__(self, shared_list, event_to_trigger=None, **kwargs): self.executed = False def setup(self) -> None: + """Setup behaviour.""" pass def teardown(self) -> None: + """Teardown behaviour.""" pass def act(self) -> None: + """Act implementation.""" self.shared_list.append(self.name) self.executed = True self._event = self.event_to_trigger def is_done(self) -> bool: + """Get is done.""" return self.executed diff --git a/tests/test_task.py b/tests/test_task.py index 2b97ae7ede..941dd0e2c6 100644 --- a/tests/test_task.py +++ b/tests/test_task.py @@ -38,15 +38,18 @@ def __init__(self, return_value): self.return_value = return_value def setup(self) -> None: + """Setup task.""" self.setup_called = True def execute(self, *args, **kwargs) -> None: + """Execute task.""" self.execute_called = True self.execute_args = args self.execute_kwargs = kwargs return self.return_value def teardown(self) -> None: + """Teardown task.""" self.teardown_called = True From f925dc93c01a4f7c59ce75fe1870df72c2e6a339 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 17 Sep 2020 23:32:17 +0100 Subject: [PATCH 010/131] bump package versions --- docs/aries-cloud-agent-demo.md | 8 +- docs/car-park-skills.md | 24 +++--- docs/cli-vs-programmatic-aeas.md | 2 +- docs/config.md | 2 +- docs/connect-a-frontend.md | 2 +- docs/contract.md | 32 +++---- docs/erc1155-skills.md | 28 +++--- docs/generic-skills-step-by-step.md | 30 +++---- docs/generic-skills.md | 24 +++--- docs/gym-skill.md | 6 +- docs/ml-skills.md | 24 +++--- docs/orm-integration.md | 26 +++--- docs/p2p-connection.md | 16 ++-- docs/skill-guide.md | 8 +- docs/tac-skills-contract.md | 34 ++++---- docs/tac-skills.md | 36 ++++---- docs/thermometer-skills.md | 24 +++--- docs/weather-skills.md | 24 +++--- examples/gym_ex/proxy/env.py | 2 +- .../agents/aries_alice/aea-config.yaml | 6 +- .../agents/aries_faber/aea-config.yaml | 4 +- .../agents/car_data_buyer/aea-config.yaml | 14 +-- .../agents/car_detector/aea-config.yaml | 14 +-- .../agents/erc1155_client/aea-config.yaml | 18 ++-- .../agents/erc1155_deployer/aea-config.yaml | 18 ++-- .../agents/generic_buyer/aea-config.yaml | 12 +-- .../agents/generic_seller/aea-config.yaml | 12 +-- .../fetchai/agents/gym_aea/aea-config.yaml | 10 +-- .../agents/ml_data_provider/aea-config.yaml | 14 +-- .../agents/ml_model_trainer/aea-config.yaml | 14 +-- .../aea-config.yaml | 8 +- .../agents/tac_controller/aea-config.yaml | 6 +- .../tac_controller_contract/aea-config.yaml | 6 +- .../agents/tac_participant/aea-config.yaml | 16 ++-- .../agents/thermometer_aea/aea-config.yaml | 14 +-- .../agents/thermometer_client/aea-config.yaml | 14 +-- .../agents/weather_client/aea-config.yaml | 14 +-- .../agents/weather_station/aea-config.yaml | 14 +-- packages/fetchai/connections/gym/README.md | 2 +- .../fetchai/connections/gym/connection.py | 2 +- .../fetchai/connections/gym/connection.yaml | 10 +-- packages/fetchai/connections/ledger/README.md | 4 +- packages/fetchai/connections/ledger/base.py | 2 +- .../connections/ledger/connection.yaml | 10 +-- .../fetchai/connections/p2p_libp2p/README.md | 4 +- .../connections/p2p_libp2p/connection.py | 2 +- .../connections/p2p_libp2p/connection.yaml | 6 +- .../connections/p2p_libp2p_client/README.md | 2 +- .../p2p_libp2p_client/connection.py | 2 +- .../p2p_libp2p_client/connection.yaml | 6 +- .../fetchai/contracts/erc1155/contract.yaml | 2 +- .../fetchai/protocols/contract_api/message.py | 2 +- .../protocols/contract_api/protocol.yaml | 4 +- packages/fetchai/protocols/gym/message.py | 2 +- packages/fetchai/protocols/gym/protocol.yaml | 4 +- .../fetchai/skills/carpark_client/skill.yaml | 4 +- .../skills/carpark_detection/skill.yaml | 4 +- .../skills/erc1155_client/behaviours.py | 2 +- .../fetchai/skills/erc1155_client/handlers.py | 4 +- .../fetchai/skills/erc1155_client/skill.yaml | 10 +-- .../skills/erc1155_deploy/behaviours.py | 8 +- .../fetchai/skills/erc1155_deploy/handlers.py | 4 +- .../fetchai/skills/erc1155_deploy/skill.yaml | 10 +-- .../skills/generic_buyer/behaviours.py | 2 +- .../fetchai/skills/generic_buyer/handlers.py | 2 +- .../fetchai/skills/generic_buyer/skill.yaml | 6 +- .../skills/generic_seller/behaviours.py | 2 +- .../fetchai/skills/generic_seller/handlers.py | 2 +- .../fetchai/skills/generic_seller/skill.yaml | 6 +- packages/fetchai/skills/gym/helpers.py | 2 +- packages/fetchai/skills/gym/skill.yaml | 6 +- .../skills/ml_data_provider/skill.yaml | 4 +- packages/fetchai/skills/ml_train/handlers.py | 2 +- packages/fetchai/skills/ml_train/skill.yaml | 6 +- .../simple_service_registration/handlers.py | 2 +- .../simple_service_registration/skill.yaml | 4 +- .../skills/tac_control_contract/skill.yaml | 4 +- .../fetchai/skills/tac_negotiation/skill.yaml | 6 +- .../skills/tac_participation/skill.yaml | 4 +- .../fetchai/skills/thermometer/skill.yaml | 4 +- .../skills/thermometer_client/skill.yaml | 4 +- .../fetchai/skills/weather_client/skill.yaml | 4 +- .../fetchai/skills/weather_station/skill.yaml | 4 +- packages/hashes.csv | 86 +++++++++---------- tests/data/dummy_aea/aea-config.yaml | 2 +- tests/data/gym-connection.yaml | 4 +- tests/data/hashes.csv | 2 +- tests/test_cli/test_add/test_protocol.py | 8 +- tests/test_cli/test_add/test_skill.py | 2 +- tests/test_cli/test_eject.py | 14 +-- tests/test_cli/test_remove/test_protocol.py | 6 +- tests/test_cli/test_remove/test_skill.py | 6 +- .../md_files/bash-aries-cloud-agent-demo.md | 8 +- .../md_files/bash-car-park-skills.md | 24 +++--- .../md_files/bash-cli-vs-programmatic-aeas.md | 2 +- .../test_bash_yaml/md_files/bash-config.md | 2 +- .../md_files/bash-erc1155-skills.md | 28 +++--- .../bash-generic-skills-step-by-step.md | 22 ++--- .../md_files/bash-generic-skills.md | 24 +++--- .../test_bash_yaml/md_files/bash-gym-skill.md | 6 +- .../test_bash_yaml/md_files/bash-ml-skills.md | 24 +++--- .../md_files/bash-orm-integration.md | 26 +++--- .../md_files/bash-p2p-connection.md | 12 +-- .../md_files/bash-skill-guide.md | 6 +- .../md_files/bash-tac-skills-contract.md | 34 ++++---- .../md_files/bash-tac-skills.md | 36 ++++---- .../md_files/bash-thermometer-skills.md | 24 +++--- .../md_files/bash-weather-skills.md | 24 +++--- .../test_cli_vs_programmatic_aea.py | 2 +- .../test_orm_integration.py | 20 ++--- .../test_skill_guide/test_skill_guide.py | 6 +- .../test_ledger/test_contract_api.py | 20 ++--- .../test_p2p_libp2p/test_aea_cli.py | 6 +- .../test_p2p_libp2p/test_public_dht.py | 6 +- .../test_p2p_libp2p_client/test_aea_cli.py | 2 +- .../test_packages/test_skills/test_carpark.py | 40 ++++----- .../test_packages/test_skills/test_erc1155.py | 24 +++--- .../test_packages/test_skills/test_generic.py | 40 ++++----- tests/test_packages/test_skills/test_gym.py | 8 +- .../test_skills/test_ml_skills.py | 40 ++++----- tests/test_packages/test_skills/test_tac.py | 44 +++++----- .../test_skills/test_thermometer.py | 40 ++++----- .../test_packages/test_skills/test_weather.py | 44 +++++----- tests/test_registries/test_base.py | 8 +- 124 files changed, 775 insertions(+), 775 deletions(-) diff --git a/docs/aries-cloud-agent-demo.md b/docs/aries-cloud-agent-demo.md index af73e25324..acc6c3e901 100644 --- a/docs/aries-cloud-agent-demo.md +++ b/docs/aries-cloud-agent-demo.md @@ -180,7 +180,7 @@ Now you can create **Alice_AEA** and **Faber_AEA** in terminals 3 and 4 respecti In the third terminal, fetch **Alice_AEA** and move into its project folder: ``` bash -aea fetch fetchai/aries_alice:0.10.0 +aea fetch fetchai/aries_alice:0.11.0 cd aries_alice ``` @@ -191,7 +191,7 @@ The following steps create **Alice_AEA** from scratch: ``` bash aea create aries_alice cd aries_alice -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 aea add connection fetchai/http_client:0.8.0 aea add connection fetchai/webhook:0.6.0 @@ -265,7 +265,7 @@ Once you see a message of the form `My libp2p addresses: ['SOME_ADDRESS']` take In the fourth terminal, fetch **Faber_AEA** and move into its project folder: ``` bash -aea fetch fetchai/aries_faber:0.10.0 +aea fetch fetchai/aries_faber:0.11.0 cd aries_faber ``` @@ -276,7 +276,7 @@ The following steps create **Faber_AEA** from scratch: ``` bash aea create aries_faber cd aries_faber -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 aea add connection fetchai/http_client:0.8.0 aea add connection fetchai/webhook:0.6.0 diff --git a/docs/car-park-skills.md b/docs/car-park-skills.md index 1a49ed93f8..922097bfc9 100644 --- a/docs/car-park-skills.md +++ b/docs/car-park-skills.md @@ -55,7 +55,7 @@ Follow the Preliminaries and Agent Communication Network can be used to send Envelopes from the AEA to the front-end. \ No newline at end of file +The other option we have is to create a stand-alone `Multiplexer` with a `P2P` connection (`fetchai/p2p_libp2p:0.10.0`). In this scenario, the front-end needs to incorporate a Multiplexer with an `P2P` Connection. Then the Agent Communication Network can be used to send Envelopes from the AEA to the front-end. \ No newline at end of file diff --git a/docs/contract.md b/docs/contract.md index a2717e3b44..48ef8864e9 100644 --- a/docs/contract.md +++ b/docs/contract.md @@ -1,4 +1,4 @@ -`Contracts` wrap smart contracts for Fetch.ai and third-party decentralized ledgers. In particular, they provide wrappers around the API or ABI of a smart contract and its byte code. They implement a translation between framework messages (in the `fetchai/contract_api:0.4.0` protocol) and the implementation specifics of the ABI. +`Contracts` wrap smart contracts for Fetch.ai and third-party decentralized ledgers. In particular, they provide wrappers around the API or ABI of a smart contract and its byte code. They implement a translation between framework messages (in the `fetchai/contract_api:0.5.0` protocol) and the implementation specifics of the ABI. Contracts usually implement four types of methods: @@ -16,32 +16,32 @@ The smart contract wrapped in a AEA contract package might be a third-party smar Interacting with contracts in almost all cases requires network access. Therefore, the framework executes contract related logic in a Connection. -In particular, the `fetchai/ledger:0.5.0` connection can be used to execute contract related logic. The skills communicate with the `fetchai/ledger:0.5.0` connection via the `fetchai/contract_api:0.4.0` protocol. This protocol implements a request-response pattern to serve the four types of methods listed above: +In particular, the `fetchai/ledger:0.6.0` connection can be used to execute contract related logic. The skills communicate with the `fetchai/ledger:0.6.0` connection via the `fetchai/contract_api:0.5.0` protocol. This protocol implements a request-response pattern to serve the four types of methods listed above: -- the `get_deploy_transaction` message is used to request a deploy transaction for a specific contract. For instance, to request a deploy transaction for the deployment of the smart contract wrapped in the `fetchai/erc1155:0.9.0` package, we send the following message to the `fetchai/ledger:0.5.0`: +- the `get_deploy_transaction` message is used to request a deploy transaction for a specific contract. For instance, to request a deploy transaction for the deployment of the smart contract wrapped in the `fetchai/erc1155:0.10.0` package, we send the following message to the `fetchai/ledger:0.6.0`: ``` python contract_api_msg = ContractApiMessage( performative=ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION, dialogue_reference=contract_api_dialogues.new_self_initiated_dialogue_reference(), ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", callable="get_deploy_transaction", kwargs=ContractApiMessage.Kwargs( {"deployer_address": self.context.agent_address} ), ) ``` -This message will be handled by the `fetchai/ledger:0.5.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. To send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.5.0` connection using the `fetchai/ledger_api:0.3.0` protocol. +This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. To send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.3.0` protocol. -- the `get_raw_transaction` message is used to request any transaction for a specific contract which changes state in the contract. For instance, to request a transaction for the creation of token in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.9.0` package, we send the following message to the `fetchai/ledger:0.5.0`: +- the `get_raw_transaction` message is used to request any transaction for a specific contract which changes state in the contract. For instance, to request a transaction for the creation of token in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.10.0` package, we send the following message to the `fetchai/ledger:0.6.0`: ``` python contract_api_msg = ContractApiMessage( performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, dialogue_reference=contract_api_dialogues.new_self_initiated_dialogue_reference(), ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=strategy.contract_address, callable="get_create_batch_transaction", kwargs=ContractApiMessage.Kwargs( @@ -52,16 +52,16 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.5.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. For this to be executed correctly, the `fetchai/erc1155:0.9.0` contract package needs to implement the `get_create_batch_transaction` method with the specified key word arguments. Similarly to above, to send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.5.0` connection using the `fetchai/ledger_api:0.3.0` protocol. +This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_create_batch_transaction` method with the specified key word arguments. Similarly to above, to send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.3.0` protocol. -- the `get_raw_message` message is used to request any contract method call for a specific contract which does not change state in the contract. For instance, to request a call to get a hash from some input data in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.9.0` package, we send the following message to the `fetchai/ledger:0.5.0`: +- the `get_raw_message` message is used to request any contract method call for a specific contract which does not change state in the contract. For instance, to request a call to get a hash from some input data in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.10.0` package, we send the following message to the `fetchai/ledger:0.6.0`: ``` python contract_api_msg = ContractApiMessage( performative=ContractApiMessage.Performative.GET_RAW_MESSAGE, dialogue_reference=contract_api_dialogues.new_self_initiated_dialogue_reference(), ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=strategy.contract_address, callable="get_hash_single", kwargs=ContractApiMessage.Kwargs( @@ -77,17 +77,17 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.5.0` connection and then a `raw_message` message will be returned with the matching raw message. For this to be executed correctly, the `fetchai/erc1155:0.9.0` contract package needs to implement the `get_hash_single` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.5.0` connection using the `fetchai/ledger_api:0.3.0` protocol. In this case, signing is not required. +This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_message` message will be returned with the matching raw message. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_hash_single` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.3.0` protocol. In this case, signing is not required. -- the `get_state` message is used to request any contract method call to query state in the deployed contract. For instance, to request a call to get the balances in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.9.0` package, we send the following message to the `fetchai/ledger:0.5.0`: +- the `get_state` message is used to request any contract method call to query state in the deployed contract. For instance, to request a call to get the balances in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.10.0` package, we send the following message to the `fetchai/ledger:0.6.0`: ``` python contract_api_msg = ContractApiMessage( performative=ContractApiMessage.Performative.GET_STATE, dialogue_reference=contract_api_dialogues.new_self_initiated_dialogue_reference(), ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=strategy.contract_address, callable="get_balance", kwargs=ContractApiMessage.Kwargs( @@ -95,7 +95,7 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.5.0` connection and then a `state` message will be returned with the matching state. For this to be executed correctly, the `fetchai/erc1155:0.9.0` contract package needs to implement the `get_balance` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.5.0` connection using the `fetchai/ledger_api:0.3.0` protocol. In this case, signing is not required. +This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `state` message will be returned with the matching state. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_balance` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.3.0` protocol. In this case, signing is not required. ## Developing your own @@ -168,6 +168,6 @@ class MyContract(Contract): tx = cls._try_estimate_gas(ledger_api, tx) return tx ``` -Above, we implement a method to create a transaction, in this case a transaction to create a batch of tokens. The method will be called by the framework, specifically the `fetchai/ledger:0.5.0` connection once it receives a message (see bullet point 2 above). The method first gets the latest transaction nonce of the `deployer_address`, then constracts the contract instance, then uses the instance to build the transaction and finally updates the gas on the transaction. +Above, we implement a method to create a transaction, in this case a transaction to create a batch of tokens. The method will be called by the framework, specifically the `fetchai/ledger:0.6.0` connection once it receives a message (see bullet point 2 above). The method first gets the latest transaction nonce of the `deployer_address`, then constracts the contract instance, then uses the instance to build the transaction and finally updates the gas on the transaction. -It helps to look at existing contract packages, like `fetchai/erc1155:0.9.0`, and skills using them, like `fetchai/erc1155_client:0.11.0` and `fetchai/erc1155_deploy:0.13.0`, for inspiration and guidance. \ No newline at end of file +It helps to look at existing contract packages, like `fetchai/erc1155:0.10.0`, and skills using them, like `fetchai/erc1155_client:0.11.0` and `fetchai/erc1155_deploy:0.14.0`, for inspiration and guidance. \ No newline at end of file diff --git a/docs/erc1155-skills.md b/docs/erc1155-skills.md index d3b28743af..6b197156c4 100644 --- a/docs/erc1155-skills.md +++ b/docs/erc1155-skills.md @@ -26,7 +26,7 @@ with a one-step atomic swap functionality. That means the trade between the two Fetch the AEA that will deploy the contract. ``` bash -aea fetch fetchai/erc1155_deployer:0.13.0 +aea fetch fetchai/erc1155_deployer:0.14.0 cd erc1155_deployer aea install ``` @@ -39,19 +39,19 @@ Create the AEA that will deploy the contract. ``` bash aea create erc1155_deployer cd erc1155_deployer -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/erc1155_deploy:0.13.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/erc1155_deploy:0.14.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` Then update the agent config (`aea-config.yaml`) with the default routing: ``` yaml default_routing: - fetchai/contract_api:0.4.0: fetchai/ledger:0.5.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` @@ -81,7 +81,7 @@ aea add-key cosmos cosmos_private_key.txt --connection In another terminal, fetch the AEA that will get some tokens from the deployer. ``` bash -aea fetch fetchai/erc1155_client:0.13.0 +aea fetch fetchai/erc1155_client:0.14.0 cd erc1155_client aea install ``` @@ -94,19 +94,19 @@ Create the AEA that will get some tokens from the deployer. ``` bash aea create erc1155_client cd erc1155_client -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/erc1155_client:0.12.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/erc1155_client:0.13.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` Then update the agent config (`aea-config.yaml`) with the default routing: ``` yaml default_routing: - fetchai/contract_api:0.4.0: fetchai/ledger:0.5.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` diff --git a/docs/generic-skills-step-by-step.md b/docs/generic-skills-step-by-step.md index 1cb74a7b87..55d354ed9f 100644 --- a/docs/generic-skills-step-by-step.md +++ b/docs/generic-skills-step-by-step.md @@ -41,16 +41,16 @@ Follow the Preliminaries and Preliminaries and Preliminaries and Preliminaries and SOEF search node so we can search for it. @@ -693,7 +693,7 @@ from packages.fetchai.skills.simple_service_registration.dialogues import ( OefSearchDialogues, ) -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class OefSearchHandler(Handler): diff --git a/docs/tac-skills-contract.md b/docs/tac-skills-contract.md index aa013c812e..3a7feb913d 100644 --- a/docs/tac-skills-contract.md +++ b/docs/tac-skills-contract.md @@ -101,7 +101,7 @@ Follow the Preliminaries and Preliminaries and None: super().__init__() self._queue: Queue = Queue() self._action_counter: int = 0 - self.gym_address = "fetchai/gym:0.7.0" + self.gym_address = "fetchai/gym:0.8.0" self._agent = ProxyAgent( name="proxy", gym_env=gym_env, proxy_env_queue=self._queue ) diff --git a/packages/fetchai/agents/aries_alice/aea-config.yaml b/packages/fetchai/agents/aries_alice/aea-config.yaml index 3c04d20afa..0ad1aa0a90 100644 --- a/packages/fetchai/agents/aries_alice/aea-config.yaml +++ b/packages/fetchai/agents/aries_alice/aea-config.yaml @@ -1,6 +1,6 @@ agent_name: aries_alice author: fetchai -version: 0.10.0 +version: 0.11.0 description: An AEA representing Alice in the Aries demo. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' @@ -8,7 +8,7 @@ fingerprint: {} fingerprint_ignore_patterns: [] connections: - fetchai/http_client:0.8.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 - fetchai/webhook:0.6.0 @@ -20,7 +20,7 @@ protocols: skills: - fetchai/aries_alice:0.7.0 - fetchai/error:0.5.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false diff --git a/packages/fetchai/agents/aries_faber/aea-config.yaml b/packages/fetchai/agents/aries_faber/aea-config.yaml index 88c40844d9..7d043ca849 100644 --- a/packages/fetchai/agents/aries_faber/aea-config.yaml +++ b/packages/fetchai/agents/aries_faber/aea-config.yaml @@ -1,6 +1,6 @@ agent_name: aries_faber author: fetchai -version: 0.10.0 +version: 0.11.0 description: An AEA representing Faber in the Aries demo. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' @@ -8,7 +8,7 @@ fingerprint: {} fingerprint_ignore_patterns: [] connections: - fetchai/http_client:0.8.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 - fetchai/webhook:0.6.0 diff --git a/packages/fetchai/agents/car_data_buyer/aea-config.yaml b/packages/fetchai/agents/car_data_buyer/aea-config.yaml index a4fcb288b1..2a40202d91 100644 --- a/packages/fetchai/agents/car_data_buyer/aea-config.yaml +++ b/packages/fetchai/agents/car_data_buyer/aea-config.yaml @@ -1,6 +1,6 @@ agent_name: car_data_buyer author: fetchai -version: 0.12.0 +version: 0.13.0 description: An agent which searches for an instance of a `car_detector` agent and attempts to purchase car park data from it. license: Apache-2.0 @@ -8,8 +8,8 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -19,10 +19,10 @@ protocols: - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/carpark_client:0.11.0 +- fetchai/carpark_client:0.12.0 - fetchai/error:0.5.0 -- fetchai/generic_buyer:0.11.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_buyer:0.12.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -30,5 +30,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/car_detector/aea-config.yaml b/packages/fetchai/agents/car_detector/aea-config.yaml index 6bf9b901b3..e2bd0d8eb7 100644 --- a/packages/fetchai/agents/car_detector/aea-config.yaml +++ b/packages/fetchai/agents/car_detector/aea-config.yaml @@ -1,14 +1,14 @@ agent_name: car_detector author: fetchai -version: 0.12.0 +version: 0.13.0 description: An agent which sells car park data to instances of `car_data_buyer` agents. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -18,10 +18,10 @@ protocols: - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/carpark_detection:0.11.0 +- fetchai/carpark_detection:0.12.0 - fetchai/error:0.5.0 -- fetchai/generic_seller:0.12.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_seller:0.13.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/erc1155_client/aea-config.yaml b/packages/fetchai/agents/erc1155_client/aea-config.yaml index f3ac748a21..d168178040 100644 --- a/packages/fetchai/agents/erc1155_client/aea-config.yaml +++ b/packages/fetchai/agents/erc1155_client/aea-config.yaml @@ -1,29 +1,29 @@ agent_name: erc1155_client author: fetchai -version: 0.13.0 +version: 0.14.0 description: An AEA to interact with the ERC1155 deployer AEA license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: -- fetchai/contract_api:0.4.0 +- fetchai/contract_api:0.5.0 - fetchai/default:0.5.0 - fetchai/fipa:0.6.0 - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 - fetchai/signing:0.3.0 skills: -- fetchai/erc1155_client:0.12.0 +- fetchai/erc1155_client:0.13.0 - fetchai/error:0.5.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: ethereum logging_config: disable_existing_loggers: false @@ -31,6 +31,6 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/contract_api:0.4.0: fetchai/ledger:0.5.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/erc1155_deployer/aea-config.yaml b/packages/fetchai/agents/erc1155_deployer/aea-config.yaml index 023ba1cf50..6a60e30ba2 100644 --- a/packages/fetchai/agents/erc1155_deployer/aea-config.yaml +++ b/packages/fetchai/agents/erc1155_deployer/aea-config.yaml @@ -1,29 +1,29 @@ agent_name: erc1155_deployer author: fetchai -version: 0.13.0 +version: 0.14.0 description: An AEA to deploy and interact with an ERC1155 license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: -- fetchai/contract_api:0.4.0 +- fetchai/contract_api:0.5.0 - fetchai/default:0.5.0 - fetchai/fipa:0.6.0 - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 - fetchai/signing:0.3.0 skills: -- fetchai/erc1155_deploy:0.13.0 +- fetchai/erc1155_deploy:0.14.0 - fetchai/error:0.5.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: ethereum logging_config: disable_existing_loggers: false @@ -31,6 +31,6 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/contract_api:0.4.0: fetchai/ledger:0.5.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/generic_buyer/aea-config.yaml b/packages/fetchai/agents/generic_buyer/aea-config.yaml index 731a7ee38f..6e20d189fa 100644 --- a/packages/fetchai/agents/generic_buyer/aea-config.yaml +++ b/packages/fetchai/agents/generic_buyer/aea-config.yaml @@ -1,14 +1,14 @@ agent_name: generic_buyer author: fetchai -version: 0.9.0 +version: 0.10.0 description: The buyer AEA purchases the services offered by the seller AEA. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -19,8 +19,8 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/generic_buyer:0.11.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_buyer:0.12.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -28,5 +28,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/generic_seller/aea-config.yaml b/packages/fetchai/agents/generic_seller/aea-config.yaml index fc6b1abd7f..2e3394d829 100644 --- a/packages/fetchai/agents/generic_seller/aea-config.yaml +++ b/packages/fetchai/agents/generic_seller/aea-config.yaml @@ -1,6 +1,6 @@ agent_name: generic_seller author: fetchai -version: 0.9.0 +version: 0.10.0 description: The seller AEA sells the services specified in the `skill.yaml` file and delivers them upon payment to the buyer. license: Apache-2.0 @@ -8,8 +8,8 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -20,8 +20,8 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/generic_seller:0.12.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_seller:0.13.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/gym_aea/aea-config.yaml b/packages/fetchai/agents/gym_aea/aea-config.yaml index f1e714d92b..69a7d2fc18 100644 --- a/packages/fetchai/agents/gym_aea/aea-config.yaml +++ b/packages/fetchai/agents/gym_aea/aea-config.yaml @@ -1,6 +1,6 @@ agent_name: gym_aea author: fetchai -version: 0.10.0 +version: 0.11.0 description: The gym aea demos the interaction between a skill containing a RL agent and a gym connection. license: Apache-2.0 @@ -8,16 +8,16 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/gym:0.7.0 +- fetchai/gym:0.8.0 - fetchai/stub:0.9.0 contracts: [] protocols: - fetchai/default:0.5.0 -- fetchai/gym:0.5.0 +- fetchai/gym:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/gym:0.7.0 -default_connection: fetchai/gym:0.7.0 +- fetchai/gym:0.8.0 +default_connection: fetchai/gym:0.8.0 default_ledger: fetchai logging_config: disable_existing_loggers: false diff --git a/packages/fetchai/agents/ml_data_provider/aea-config.yaml b/packages/fetchai/agents/ml_data_provider/aea-config.yaml index d8bf076dda..ffb8c1b082 100644 --- a/packages/fetchai/agents/ml_data_provider/aea-config.yaml +++ b/packages/fetchai/agents/ml_data_provider/aea-config.yaml @@ -1,14 +1,14 @@ agent_name: ml_data_provider author: fetchai -version: 0.12.0 +version: 0.13.0 description: An agent that sells data. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -19,9 +19,9 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/generic_seller:0.12.0 -- fetchai/ml_data_provider:0.11.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_seller:0.13.0 +- fetchai/ml_data_provider:0.12.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/ml_model_trainer/aea-config.yaml b/packages/fetchai/agents/ml_model_trainer/aea-config.yaml index 38779b7f3d..262eaa4b24 100644 --- a/packages/fetchai/agents/ml_model_trainer/aea-config.yaml +++ b/packages/fetchai/agents/ml_model_trainer/aea-config.yaml @@ -1,14 +1,14 @@ agent_name: ml_model_trainer author: fetchai -version: 0.12.0 +version: 0.13.0 description: An agent buying data and training a model from it. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -19,9 +19,9 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/generic_buyer:0.11.0 -- fetchai/ml_train:0.11.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_buyer:0.12.0 +- fetchai/ml_train:0.12.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/simple_service_registration/aea-config.yaml b/packages/fetchai/agents/simple_service_registration/aea-config.yaml index 6d6d43c3ef..7762008c7a 100644 --- a/packages/fetchai/agents/simple_service_registration/aea-config.yaml +++ b/packages/fetchai/agents/simple_service_registration/aea-config.yaml @@ -1,13 +1,13 @@ agent_name: simple_service_registration author: fetchai -version: 0.12.0 +version: 0.13.0 description: A simple example of service registration. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: '' fingerprint_ignore_patterns: [] connections: -- fetchai/p2p_libp2p:0.9.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -17,8 +17,8 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/simple_service_registration:0.9.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/simple_service_registration:0.10.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false diff --git a/packages/fetchai/agents/tac_controller/aea-config.yaml b/packages/fetchai/agents/tac_controller/aea-config.yaml index 7a225f4ded..3470e8a73f 100644 --- a/packages/fetchai/agents/tac_controller/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller/aea-config.yaml @@ -1,13 +1,13 @@ agent_name: tac_controller author: fetchai -version: 0.9.0 +version: 0.10.0 description: An AEA to manage an instance of the TAC (trading agent competition) license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/p2p_libp2p:0.9.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -18,7 +18,7 @@ protocols: skills: - fetchai/error:0.5.0 - fetchai/tac_control:0.7.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index 8c9372385f..caa12bbff0 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -1,6 +1,6 @@ agent_name: tac_controller_contract author: fetchai -version: 0.10.0 +version: 0.11.0 description: An AEA to manage an instance of the TAC (trading agent competition) using an ERC1155 smart contract. license: Apache-2.0 @@ -11,7 +11,7 @@ connections: - fetchai/oef:0.9.0 - fetchai/stub:0.9.0 contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: - fetchai/default:0.5.0 - fetchai/fipa:0.6.0 @@ -19,7 +19,7 @@ protocols: - fetchai/tac:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/tac_control_contract:0.8.0 +- fetchai/tac_control_contract:0.9.0 default_connection: fetchai/oef:0.9.0 default_ledger: ethereum logging_config: diff --git a/packages/fetchai/agents/tac_participant/aea-config.yaml b/packages/fetchai/agents/tac_participant/aea-config.yaml index ebd1c67c58..e4180ff1a9 100644 --- a/packages/fetchai/agents/tac_participant/aea-config.yaml +++ b/packages/fetchai/agents/tac_participant/aea-config.yaml @@ -1,18 +1,18 @@ agent_name: tac_participant author: fetchai -version: 0.10.0 +version: 0.11.0 description: An AEA to participate in the TAC (trading agent competition) license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: - fetchai/default:0.5.0 - fetchai/fipa:0.6.0 @@ -20,9 +20,9 @@ protocols: - fetchai/tac:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/tac_negotiation:0.9.0 -- fetchai/tac_participation:0.8.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/tac_negotiation:0.10.0 +- fetchai/tac_participation:0.9.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -30,5 +30,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/thermometer_aea/aea-config.yaml b/packages/fetchai/agents/thermometer_aea/aea-config.yaml index 334e44fd75..f212ebdf5c 100644 --- a/packages/fetchai/agents/thermometer_aea/aea-config.yaml +++ b/packages/fetchai/agents/thermometer_aea/aea-config.yaml @@ -1,14 +1,14 @@ agent_name: thermometer_aea author: fetchai -version: 0.10.0 +version: 0.11.0 description: An AEA to represent a thermometer and sell temperature data. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -19,9 +19,9 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/generic_seller:0.12.0 -- fetchai/thermometer:0.11.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_seller:0.13.0 +- fetchai/thermometer:0.12.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/thermometer_client/aea-config.yaml b/packages/fetchai/agents/thermometer_client/aea-config.yaml index 47f00a1ca4..02f51acf56 100644 --- a/packages/fetchai/agents/thermometer_client/aea-config.yaml +++ b/packages/fetchai/agents/thermometer_client/aea-config.yaml @@ -1,14 +1,14 @@ agent_name: thermometer_client author: fetchai -version: 0.10.0 +version: 0.11.0 description: An AEA that purchases thermometer data. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -19,9 +19,9 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/generic_buyer:0.11.0 -- fetchai/thermometer_client:0.10.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_buyer:0.12.0 +- fetchai/thermometer_client:0.11.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/weather_client/aea-config.yaml b/packages/fetchai/agents/weather_client/aea-config.yaml index 03351270fd..894da78b40 100644 --- a/packages/fetchai/agents/weather_client/aea-config.yaml +++ b/packages/fetchai/agents/weather_client/aea-config.yaml @@ -1,14 +1,14 @@ agent_name: weather_client author: fetchai -version: 0.12.0 +version: 0.13.0 description: This AEA purchases weather data from the weather station. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -19,9 +19,9 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/generic_buyer:0.11.0 -- fetchai/weather_client:0.10.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_buyer:0.12.0 +- fetchai/weather_client:0.11.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/agents/weather_station/aea-config.yaml b/packages/fetchai/agents/weather_station/aea-config.yaml index 974e15c9f4..ee6630c2f1 100644 --- a/packages/fetchai/agents/weather_station/aea-config.yaml +++ b/packages/fetchai/agents/weather_station/aea-config.yaml @@ -1,14 +1,14 @@ agent_name: weather_station author: fetchai -version: 0.12.0 +version: 0.13.0 description: This AEA represents a weather station selling weather data. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/ledger:0.5.0 -- fetchai/p2p_libp2p:0.9.0 +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: [] @@ -19,9 +19,9 @@ protocols: - fetchai/oef_search:0.6.0 skills: - fetchai/error:0.5.0 -- fetchai/generic_seller:0.12.0 -- fetchai/weather_station:0.11.0 -default_connection: fetchai/p2p_libp2p:0.9.0 +- fetchai/generic_seller:0.13.0 +- fetchai/weather_station:0.12.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/connections/gym/README.md b/packages/fetchai/connections/gym/README.md index e16762485e..cbb2f0f0e7 100644 --- a/packages/fetchai/connections/gym/README.md +++ b/packages/fetchai/connections/gym/README.md @@ -6,4 +6,4 @@ The connection wraps a gym and allows the AEA to interact with the gym interface ## Usage -First, add the connection to your AEA project (`aea add connection fetchai/gym:0.7.0`). Then, update the `config` in `connection.yaml` by providing a dotted path to the gym module in the `env` field. +First, add the connection to your AEA project (`aea add connection fetchai/gym:0.8.0`). Then, update the `config` in `connection.yaml` by providing a dotted path to the gym module in the `env` field. diff --git a/packages/fetchai/connections/gym/connection.py b/packages/fetchai/connections/gym/connection.py index 22f53ec98f..395a566099 100644 --- a/packages/fetchai/connections/gym/connection.py +++ b/packages/fetchai/connections/gym/connection.py @@ -43,7 +43,7 @@ logger = logging.getLogger("aea.packages.fetchai.connections.gym") -PUBLIC_ID = PublicId.from_str("fetchai/gym:0.7.0") +PUBLIC_ID = PublicId.from_str("fetchai/gym:0.8.0") class GymDialogues(BaseGymDialogues): diff --git a/packages/fetchai/connections/gym/connection.yaml b/packages/fetchai/connections/gym/connection.yaml index cfacab69bb..cce17f13a0 100644 --- a/packages/fetchai/connections/gym/connection.yaml +++ b/packages/fetchai/connections/gym/connection.yaml @@ -1,22 +1,22 @@ name: gym author: fetchai -version: 0.7.0 +version: 0.8.0 type: connection description: The gym connection wraps an OpenAI gym. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmbhBvtb6QLnUaeBHgBM1w4q2YNNkXYNGMbHx5wg7tkKaH + README.md: QmPUxpn8smGVFexxhUu3Vy3q5xsJukHnYtQzUXyt965bmL __init__.py: QmWwxj1hGGZNteCvRtZxwtY9PuEKsrWsEmMWCKwiYCdvRR - connection.py: QmTRbo73s5nzsPy5fXejJVNTrHMe9bTxV6Mdfwd4tXaioF + connection.py: QmeBfJXcmyFzH84siPgKjTCrsSnTw7V1Jza1ZL9vUjpBS3 fingerprint_ignore_patterns: [] protocols: -- fetchai/gym:0.5.0 +- fetchai/gym:0.6.0 class_name: GymConnection config: env: '' excluded_protocols: [] restricted_to_protocols: -- fetchai/gym:0.5.0 +- fetchai/gym:0.6.0 dependencies: gym: {} diff --git a/packages/fetchai/connections/ledger/README.md b/packages/fetchai/connections/ledger/README.md index 2042b55457..807387e685 100644 --- a/packages/fetchai/connections/ledger/README.md +++ b/packages/fetchai/connections/ledger/README.md @@ -2,10 +2,10 @@ The ledger connection wraps the APIs needed to interact with multiple ledgers, including smart contracts deployed on those ledgers. -The AEA communicates with the ledger connection via the `fetchai/ledger_api:0.3.0` and `fetchai/contract_api:0.4.0` protocols. +The AEA communicates with the ledger connection via the `fetchai/ledger_api:0.3.0` and `fetchai/contract_api:0.5.0` protocols. The connection uses the ledger apis registered in the ledger api registry. ## Usage -First, add the connection to your AEA project (`aea add connection fetchai/ledger:0.5.0`). Optionally, update the `ledger_apis` in `config` of `connection.yaml`. +First, add the connection to your AEA project (`aea add connection fetchai/ledger:0.6.0`). Optionally, update the `ledger_apis` in `config` of `connection.yaml`. diff --git a/packages/fetchai/connections/ledger/base.py b/packages/fetchai/connections/ledger/base.py index 26ab3ee967..c9fbdd4411 100644 --- a/packages/fetchai/connections/ledger/base.py +++ b/packages/fetchai/connections/ledger/base.py @@ -34,7 +34,7 @@ from aea.protocols.dialogue.base import Dialogue, Dialogues -CONNECTION_ID = PublicId.from_str("fetchai/ledger:0.5.0") +CONNECTION_ID = PublicId.from_str("fetchai/ledger:0.6.0") class RequestDispatcher(ABC): diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index 304703f3a2..323030a60f 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -1,20 +1,20 @@ name: ledger author: fetchai -version: 0.5.0 +version: 0.6.0 type: connection description: A connection to interact with any ledger API and contract API. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmRWAyV2qsyzALTGQft4m9Nd3N6kCcuK1AQ7APmwfAoouW + README.md: QmfQN7UK1M4pBUzKVzPannPLVi8iiULKHNtJ7XpoWpjqfc __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj - base.py: QmP6SiNTCWBW8Bt6wsgP2gp7K2LcV4AeVk2saM7tqyx44S + base.py: QmNnSBVmVgdDFwzqDUncwLHeyDfMEfmvujJdKbdGNGH4Be connection.py: QmS3CJwjgzZ5SrAeJjCnC5ChZDfTsDuV6ndgMsGV1bidnf contract_dispatcher.py: QmRegSPqqkns7xp5zr6xiuTxjGLiGGG2qLkwunpFCbzEwX ledger_dispatcher.py: QmarLEyR2Je6NtXSJmPy9NbGL7J85FVAZJPkFKqCotEKjc fingerprint_ignore_patterns: [] protocols: -- fetchai/contract_api:0.4.0 +- fetchai/contract_api:0.5.0 - fetchai/ledger_api:0.3.0 class_name: LedgerConnection config: @@ -26,6 +26,6 @@ config: address: https://rest-agent-land.fetch.ai:443 excluded_protocols: [] restricted_to_protocols: -- fetchai/contract_api:0.4.0 +- fetchai/contract_api:0.5.0 - fetchai/ledger_api:0.3.0 dependencies: {} diff --git a/packages/fetchai/connections/p2p_libp2p/README.md b/packages/fetchai/connections/p2p_libp2p/README.md index 0bfeb0d64e..036c8c2d17 100644 --- a/packages/fetchai/connections/p2p_libp2p/README.md +++ b/packages/fetchai/connections/p2p_libp2p/README.md @@ -6,7 +6,7 @@ The DHT provides proper messages delivery by mapping agents addresses to their l ## Usage -First, add the connection to your AEA project: `aea add connection fetchai/p2p_libp2p:0.9.0`. +First, add the connection to your AEA project: `aea add connection fetchai/p2p_libp2p:0.10.0`. Next, ensure that the connection is properly configured by setting: @@ -15,4 +15,4 @@ Next, ensure that the connection is properly configured by setting: - `entry_peers` to a list of multiaddresses of already deployed nodes to join their network, should be empty for genesis node - `delegate_uri` to the ip address and port number for the delegate service, leave empty to disable the service -If the delegate service is enabled, then other AEAs can connect to the peer node using the `fetchai/p2p_libp2p_client:0.6.0` connection. +If the delegate service is enabled, then other AEAs can connect to the peer node using the `fetchai/p2p_libp2p_client:0.7.0` connection. diff --git a/packages/fetchai/connections/p2p_libp2p/connection.py b/packages/fetchai/connections/p2p_libp2p/connection.py index edfd302c6c..84627fb356 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.py +++ b/packages/fetchai/connections/p2p_libp2p/connection.py @@ -60,7 +60,7 @@ # TOFIX(LR) not sure is needed LIBP2P = "libp2p" -PUBLIC_ID = PublicId.from_str("fetchai/p2p_libp2p:0.9.0") +PUBLIC_ID = PublicId.from_str("fetchai/p2p_libp2p:0.10.0") MultiAddr = str diff --git a/packages/fetchai/connections/p2p_libp2p/connection.yaml b/packages/fetchai/connections/p2p_libp2p/connection.yaml index 0842a3660f..217db0e2b6 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p/connection.yaml @@ -1,6 +1,6 @@ name: p2p_libp2p author: fetchai -version: 0.9.0 +version: 0.10.0 type: connection description: The p2p libp2p connection implements an interface to standalone golang go-libp2p node that can exchange aea envelopes with other agents connected to the @@ -8,14 +8,14 @@ description: The p2p libp2p connection implements an interface to standalone gol license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmfEaK1sB87aTd2H65KfszqJ6C1L4DBx94JwBs4ZhuQNkR + README.md: QmWefvnDUHPCCZqe8BseAj6EuJWc4RrKKRL8Y8bT5ip3hy __init__.py: QmYQuLNyQ8WTjgRYAoKAzoJEb7ocKXvM2hTyK4hsGch5D6 aea/api.go: QmYRSRJL5jUTU8eBUFDot5inhmpZPZLykCRM32LVQHauVS aea/envelope.pb.go: QmRfUNGpCeVJfsW3H1MzCN4pwDWgumfyWufVFp6xvUjjug aea/envelope.proto: QmSC8EGCKiNFR2vf5bSWymSzYDFMipQW9aQVMwPzQoKb4n aea/pipe_unix.go: QmSzbAexrSUSA9ZE6VT6MmcWF5MhEcmceQjAbnfRoK7Ruv aea/pipe_windows.go: QmdYpfjgdgFbA6Pothg65NYM45ubfpZeKr8cVQoqbFzgUK - connection.py: QmVRe5AfSov69zJTGtDDmbjusr1tERsbe4H7Ee4h2ptcem + connection.py: QmPEcaeBAHS7FQE27idXAB5WP9MnSXTxdVr39jdd5zdX5Z dht/dhtclient/dhtclient.go: QmasA3GrgswTnUJoffBzeeqxeT3GjLu6foN6PHJhWNpMMa dht/dhtclient/dhtclient_test.go: QmPfnHSHXtbaW5VYuq1QsKQWey64pUEvLEaKKkT9eAcmws dht/dhtclient/options.go: QmPorj38wNrxGrzsbFe5wwLmiHzxbTJ2VsgvSd8tLDYS8s diff --git a/packages/fetchai/connections/p2p_libp2p_client/README.md b/packages/fetchai/connections/p2p_libp2p_client/README.md index db18786200..73dbde954c 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/README.md +++ b/packages/fetchai/connections/p2p_libp2p_client/README.md @@ -7,7 +7,7 @@ It allows for using the DHT without having to deploy a node by delegating its co ## Usage -First, add the connection to your AEA project: `aea add connection fetchai/p2p_libp2p_client:0.6.0`. +First, add the connection to your AEA project: `aea add connection fetchai/p2p_libp2p_client:0.7.0`. Next, ensure that the connection is properly configured by setting: diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.py b/packages/fetchai/connections/p2p_libp2p_client/connection.py index 83355fffde..0ae1dfa284 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.py +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.py @@ -36,7 +36,7 @@ logger = logging.getLogger("aea.packages.fetchai.connections.p2p_libp2p_client") -PUBLIC_ID = PublicId.from_str("fetchai/p2p_libp2p_client:0.6.0") +PUBLIC_ID = PublicId.from_str("fetchai/p2p_libp2p_client:0.7.0") SUPPORTED_LEDGER_IDS = ["fetchai", "cosmos", "ethereum"] diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml index c467491e5c..a51a00d00d 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml @@ -1,6 +1,6 @@ name: p2p_libp2p_client author: fetchai -version: 0.6.0 +version: 0.7.0 type: connection description: The libp2p client connection implements a tcp connection to a running libp2p node as a traffic delegate to send/receive envelopes to/from agents in the @@ -8,9 +8,9 @@ description: The libp2p client connection implements a tcp connection to a runni license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmXWbE53xWwPkQiuR16WP8gDS6fDRtWhbeP7gmBDfoUQtc + README.md: QmUp9UrXSqEYeRxrEsGDhGPTjFrwKmuT3bjHJfGrfP8yjk __init__.py: QmT1FEHkPGMHV5oiVEfQHHr25N2qdZxydSNRJabJvYiTgf - connection.py: QmQ78ZURrHYCLbtTpT4WLcKQiXF3gq6cLS2kaCNeDgw6SA + connection.py: QmeSyMBkN1Y99g7c7j89Ack8NjzSPw5WDbodbwfqLP6ZLT fingerprint_ignore_patterns: [] protocols: [] class_name: P2PLibp2pClientConnection diff --git a/packages/fetchai/contracts/erc1155/contract.yaml b/packages/fetchai/contracts/erc1155/contract.yaml index cf9a6b934e..221b26e0c5 100644 --- a/packages/fetchai/contracts/erc1155/contract.yaml +++ b/packages/fetchai/contracts/erc1155/contract.yaml @@ -1,6 +1,6 @@ name: erc1155 author: fetchai -version: 0.9.0 +version: 0.10.0 type: contract description: The erc1155 contract implements an ERC1155 contract package. license: Apache-2.0 diff --git a/packages/fetchai/protocols/contract_api/message.py b/packages/fetchai/protocols/contract_api/message.py index b6108ee30c..d84c69c714 100644 --- a/packages/fetchai/protocols/contract_api/message.py +++ b/packages/fetchai/protocols/contract_api/message.py @@ -43,7 +43,7 @@ class ContractApiMessage(Message): """A protocol for contract APIs requests and responses.""" - protocol_id = ProtocolId.from_str("fetchai/contract_api:0.4.0") + protocol_id = ProtocolId.from_str("fetchai/contract_api:0.5.0") Kwargs = CustomKwargs diff --git a/packages/fetchai/protocols/contract_api/protocol.yaml b/packages/fetchai/protocols/contract_api/protocol.yaml index 3c8a6ec990..c41896ef87 100644 --- a/packages/fetchai/protocols/contract_api/protocol.yaml +++ b/packages/fetchai/protocols/contract_api/protocol.yaml @@ -1,6 +1,6 @@ name: contract_api author: fetchai -version: 0.4.0 +version: 0.5.0 type: protocol description: A protocol for contract APIs requests and responses. license: Apache-2.0 @@ -12,7 +12,7 @@ fingerprint: contract_api_pb2.py: QmVT6Fv53KyFhshNFEo38seHypd7Y62psBaF8NszV8iRHK custom_types.py: QmbLjpiTcGNfvdBsu8pgQH6PK5y6ujdNnZ53JSk1GZDRCA dialogues.py: QmTjXH8JUtziUFDawKsSTYE5dxn1n1FmMPeWexyxiPYd6k - message.py: Qmd7r8Zf3jC1uwMRM1dhs1FTEqDMXreHHRiGgViAQkEMXc + message.py: Qmbxqt2TauoUkP6bqeYz1LZ7FukMvW3szs26HU87QCEFya serialization.py: QmdJZ6GBrURgzJCfYSZzLhWirfm5bDJxumz7ieAELC9juw fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/gym/message.py b/packages/fetchai/protocols/gym/message.py index 2aaacf6386..7642fde42f 100644 --- a/packages/fetchai/protocols/gym/message.py +++ b/packages/fetchai/protocols/gym/message.py @@ -36,7 +36,7 @@ class GymMessage(Message): """A protocol for interacting with a gym connection.""" - protocol_id = ProtocolId.from_str("fetchai/gym:0.5.0") + protocol_id = ProtocolId.from_str("fetchai/gym:0.6.0") AnyObject = CustomAnyObject diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index ede670f598..f381e6973e 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -1,6 +1,6 @@ name: gym author: fetchai -version: 0.5.0 +version: 0.6.0 type: protocol description: A protocol for interacting with a gym connection. license: Apache-2.0 @@ -12,7 +12,7 @@ fingerprint: dialogues.py: QmdCzcFfyPF43U2SoxwshG5p4hd6dK49m6GYKduDHbnNPo gym.proto: QmQGF9Xz4Z93wmhdKoztzxjo5pS4SsAWe2TQdvZCLuzdGC gym_pb2.py: QmSTz7xrL8ryqzR1Sgu1NpR6PmW7GUhBGnN2qYc8m8NCcN - message.py: Qmc4wx56DVaSpLe6h7KSUBmxEWoHVFFAQQB4mpympggcTG + message.py: QmTaiHDJkdduU4HLn7i17oAigJQwrws8FmfQCwbfAagnGp serialization.py: QmaZd7YMHrHZvbeMMb1JfnkUZRHk7zKy45M7kDvG5wbY9C fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/skills/carpark_client/skill.yaml b/packages/fetchai/skills/carpark_client/skill.yaml index dd2af9169d..f57a37bb82 100644 --- a/packages/fetchai/skills/carpark_client/skill.yaml +++ b/packages/fetchai/skills/carpark_client/skill.yaml @@ -1,6 +1,6 @@ name: carpark_client author: fetchai -version: 0.11.0 +version: 0.12.0 type: skill description: The carpark client skill implements the functionality to run a client for carpark data. @@ -21,7 +21,7 @@ protocols: - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/generic_buyer:0.11.0 +- fetchai/generic_buyer:0.12.0 behaviours: search: args: diff --git a/packages/fetchai/skills/carpark_detection/skill.yaml b/packages/fetchai/skills/carpark_detection/skill.yaml index b73d3f41cc..387e93cf7a 100644 --- a/packages/fetchai/skills/carpark_detection/skill.yaml +++ b/packages/fetchai/skills/carpark_detection/skill.yaml @@ -1,6 +1,6 @@ name: carpark_detection author: fetchai -version: 0.11.0 +version: 0.12.0 type: skill description: The carpark detection skill implements the detection and trading functionality for a carpark agent. @@ -23,7 +23,7 @@ protocols: - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/generic_seller:0.12.0 +- fetchai/generic_seller:0.13.0 behaviours: service_registration: args: diff --git a/packages/fetchai/skills/erc1155_client/behaviours.py b/packages/fetchai/skills/erc1155_client/behaviours.py index cf5819feab..dfa465d175 100644 --- a/packages/fetchai/skills/erc1155_client/behaviours.py +++ b/packages/fetchai/skills/erc1155_client/behaviours.py @@ -32,7 +32,7 @@ from packages.fetchai.skills.erc1155_client.strategy import Strategy DEFAULT_SEARCH_INTERVAL = 5.0 -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class SearchBehaviour(TickerBehaviour): diff --git a/packages/fetchai/skills/erc1155_client/handlers.py b/packages/fetchai/skills/erc1155_client/handlers.py index d767ddcbe2..fd542bd2b1 100644 --- a/packages/fetchai/skills/erc1155_client/handlers.py +++ b/packages/fetchai/skills/erc1155_client/handlers.py @@ -47,7 +47,7 @@ ) from packages.fetchai.skills.erc1155_client.strategy import Strategy -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class FipaHandler(Handler): @@ -153,7 +153,7 @@ def _handle_propose( counterparty=LEDGER_API_ADDRESS, performative=ContractApiMessage.Performative.GET_RAW_MESSAGE, ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=fipa_msg.proposal.values["contract_address"], callable="get_hash_single", kwargs=ContractApiMessage.Kwargs( diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index b294f8691d..099ed84f66 100644 --- a/packages/fetchai/skills/erc1155_client/skill.yaml +++ b/packages/fetchai/skills/erc1155_client/skill.yaml @@ -1,6 +1,6 @@ name: erc1155_client author: fetchai -version: 0.12.0 +version: 0.13.0 type: skill description: The erc1155 client interacts with the erc1155 deployer to conduct an atomic swap. @@ -9,15 +9,15 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZLsx2wJE762rqDqfeqLMg9RBczvALxy3H2U9kfRvgK3s __init__.py: QmRXXJsv5bfvb7qsyxQtVzXwn6PMLJKkbm6kg4DNkT1NtW - behaviours.py: QmR3owNU8XPaiqPQSrwBjVVtsij9tvPUnyEVqmuekQ6Xdf + behaviours.py: QmaCak7V3jYEWdj4fLdd2tEG4fiSazbLBC5WKjDeSAQhrh dialogues.py: QmPb2odXbXxuY5Ygm9mfCufM2mtMZ23oapsAzsWHC2x2k4 - handlers.py: QmTK8i26gDaWc713KGvu9pTyv25xCatcZRfhYLGnZqeJtf + handlers.py: QmSahx4wij2w9X6Zm9wAHyeJVRifpKGkstwYKDzcosqkfe strategy.py: QmNg87LgfLPoPyokFrmvrNghQD7JkWehRNAdRNyB3YogeN fingerprint_ignore_patterns: [] contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: -- fetchai/contract_api:0.4.0 +- fetchai/contract_api:0.5.0 - fetchai/default:0.5.0 - fetchai/fipa:0.6.0 - fetchai/ledger_api:0.3.0 diff --git a/packages/fetchai/skills/erc1155_deploy/behaviours.py b/packages/fetchai/skills/erc1155_deploy/behaviours.py index 24c1a5d7de..84357c3b9c 100644 --- a/packages/fetchai/skills/erc1155_deploy/behaviours.py +++ b/packages/fetchai/skills/erc1155_deploy/behaviours.py @@ -35,7 +35,7 @@ from packages.fetchai.skills.erc1155_deploy.strategy import Strategy DEFAULT_SERVICES_INTERVAL = 30.0 -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class ServiceRegistrationBehaviour(TickerBehaviour): @@ -130,7 +130,7 @@ def _request_contract_deploy_transaction(self) -> None: counterparty=LEDGER_API_ADDRESS, performative=ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION, ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", callable="get_deploy_transaction", kwargs=ContractApiMessage.Kwargs( {"deployer_address": self.context.agent_address} @@ -156,7 +156,7 @@ def _request_token_create_transaction(self) -> None: counterparty=LEDGER_API_ADDRESS, performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=strategy.contract_address, callable="get_create_batch_transaction", kwargs=ContractApiMessage.Kwargs( @@ -186,7 +186,7 @@ def _request_token_mint_transaction(self) -> None: counterparty=LEDGER_API_ADDRESS, performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=strategy.contract_address, callable="get_mint_batch_transaction", kwargs=ContractApiMessage.Kwargs( diff --git a/packages/fetchai/skills/erc1155_deploy/handlers.py b/packages/fetchai/skills/erc1155_deploy/handlers.py index 95b3780804..fd9f0a7168 100644 --- a/packages/fetchai/skills/erc1155_deploy/handlers.py +++ b/packages/fetchai/skills/erc1155_deploy/handlers.py @@ -48,7 +48,7 @@ from packages.fetchai.skills.erc1155_deploy.strategy import Strategy -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class FipaHandler(Handler): @@ -172,7 +172,7 @@ def _handle_accept_w_inform( counterparty=LEDGER_API_ADDRESS, performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, ledger_id=strategy.ledger_id, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=strategy.contract_address, callable="get_atomic_swap_single_transaction", kwargs=ContractApiMessage.Kwargs( diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index e8000b0ca2..b43dc83ed4 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -1,6 +1,6 @@ name: erc1155_deploy author: fetchai -version: 0.13.0 +version: 0.14.0 type: skill description: The ERC1155 deploy skill has the ability to deploy and interact with the smart contract. @@ -9,15 +9,15 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZ7swVkRpmJbJZ2NoLb9CWwH8p3QjnjRJg71UbAXdrKyx __init__.py: Qmbm3ZtGpfdvvzqykfRqbaReAK9a16mcyK7qweSfeN5pq1 - behaviours.py: Qmcr9SMJC82L2A9tG76nsitHiH3JogfWdPXnusSbWadccC + behaviours.py: QmaiK1q2cYeP64YriCw6PHm9Mr1okMRU9esPftQDXXFy1f dialogues.py: QmcCbdxFM4SX3MgXDxxbsC66gp8QK3C4W2czniQ5oDNc7G - handlers.py: QmdFjFEarXivuDwn2Ucw9aXCmRdbFwRK23qz6u6thgjVnn + handlers.py: QmSp3YuFz5nLy6Bc6qQr27ZUtwNQR6LyKiRHXcYpnmhm9r strategy.py: QmeoDg7UT5MG5khmrZna3v8HYrC6QJjjEV26kcq1mPs6yx fingerprint_ignore_patterns: [] contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: -- fetchai/contract_api:0.4.0 +- fetchai/contract_api:0.5.0 - fetchai/default:0.5.0 - fetchai/fipa:0.6.0 - fetchai/ledger_api:0.3.0 diff --git a/packages/fetchai/skills/generic_buyer/behaviours.py b/packages/fetchai/skills/generic_buyer/behaviours.py index 356c14b689..1eecadaa15 100644 --- a/packages/fetchai/skills/generic_buyer/behaviours.py +++ b/packages/fetchai/skills/generic_buyer/behaviours.py @@ -32,7 +32,7 @@ from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy DEFAULT_SEARCH_INTERVAL = 5.0 -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class GenericSearchBehaviour(TickerBehaviour): diff --git a/packages/fetchai/skills/generic_buyer/handlers.py b/packages/fetchai/skills/generic_buyer/handlers.py index d4c5d16832..0e60ef1b1a 100644 --- a/packages/fetchai/skills/generic_buyer/handlers.py +++ b/packages/fetchai/skills/generic_buyer/handlers.py @@ -44,7 +44,7 @@ ) from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class GenericFipaHandler(Handler): diff --git a/packages/fetchai/skills/generic_buyer/skill.yaml b/packages/fetchai/skills/generic_buyer/skill.yaml index 581dd657ae..0f4dd4f620 100644 --- a/packages/fetchai/skills/generic_buyer/skill.yaml +++ b/packages/fetchai/skills/generic_buyer/skill.yaml @@ -1,6 +1,6 @@ name: generic_buyer author: fetchai -version: 0.11.0 +version: 0.12.0 type: skill description: The weather client skill implements the skill to purchase weather data. license: Apache-2.0 @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTR91jm7WfJpmabisy74NR5mc35YXjDU1zQAUKZeHRw8L __init__.py: QmaEDrNJBeHCJpbdFckRUhLSBqCXQ6umdipTMpYhqSKxSG - behaviours.py: QmT5Ca3y4Mv3Fxx98koEJpzP9ZoNBj1UetsffuJe2apnNF + behaviours.py: QmSEymQerdUYooELqC2NyXJFpXLpwBX49G1DjMzzMVa69s dialogues.py: QmPoKjJbwVWFPiKuV4a3ZC21SNLsWZUMXAGFzJuVedgxZ4 - handlers.py: QmbQEVZXcLbfaeX3b7FHGWEf121bSXrYkAc8nFBJVrmp8U + handlers.py: QmZVuiu84WgGX3R438kuDVcNJZrahzWgLxsPAy34R6kc34 strategy.py: Qmb2T99WnQQa4qyZSdu31QyrbtHy8ZWC6Jhv9sVrTYrFxE fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/generic_seller/behaviours.py b/packages/fetchai/skills/generic_seller/behaviours.py index 7d2c29ba88..c60d770500 100644 --- a/packages/fetchai/skills/generic_seller/behaviours.py +++ b/packages/fetchai/skills/generic_seller/behaviours.py @@ -33,7 +33,7 @@ DEFAULT_SERVICES_INTERVAL = 60.0 -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class GenericServiceRegistrationBehaviour(TickerBehaviour): diff --git a/packages/fetchai/skills/generic_seller/handlers.py b/packages/fetchai/skills/generic_seller/handlers.py index 8226f4e11c..1fe577cb7a 100644 --- a/packages/fetchai/skills/generic_seller/handlers.py +++ b/packages/fetchai/skills/generic_seller/handlers.py @@ -42,7 +42,7 @@ ) from packages.fetchai.skills.generic_seller.strategy import GenericStrategy -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class GenericFipaHandler(Handler): diff --git a/packages/fetchai/skills/generic_seller/skill.yaml b/packages/fetchai/skills/generic_seller/skill.yaml index e3e5906733..5060c3d1e2 100644 --- a/packages/fetchai/skills/generic_seller/skill.yaml +++ b/packages/fetchai/skills/generic_seller/skill.yaml @@ -1,6 +1,6 @@ name: generic_seller author: fetchai -version: 0.12.0 +version: 0.13.0 type: skill description: The weather station skill implements the functionality to sell weather data. @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPb5kHYZyhUN87EKmuahyGqDGgqVdGPyfC1KpGC3xfmcP __init__.py: QmbfkeFnZVKppLEHpBrTXUXBwg2dpPABJWSLND8Lf1cmpG - behaviours.py: QmNrrkUfstFUseuXwXMJPMq5gFiDio6NzRP8W53iFx1E2h + behaviours.py: QmdHumzBTxWg2PgWzwNVF4a5eG1dhGXzDwrY9eq4uevHqs dialogues.py: QmRJCregJWVs8scTMjQptvztKa5NEHKUfeZECVxdU233C6 - handlers.py: QmTCNmgGGkkcoziJcUE6XG8WzZdN1LHiwnD7XPWT7tVXAZ + handlers.py: QmYyAYGiSMzUAq96LuFsVewYut9njvCR3NG9uEKonnwGf5 strategy.py: QmX1mp7eZkz1P6iVyoDCATZDKZRgwe1EgMVmAyvtGDHvm3 fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/gym/helpers.py b/packages/fetchai/skills/gym/helpers.py index 0723bf0891..f32e80eb2a 100644 --- a/packages/fetchai/skills/gym/helpers.py +++ b/packages/fetchai/skills/gym/helpers.py @@ -59,7 +59,7 @@ def __init__(self, skill_context: SkillContext) -> None: self._is_rl_agent_trained = False self._step_count = 0 self._active_dialogue = None # type: Optional[GymDialogue] - self.gym_address = "fetchai/gym:0.7.0" + self.gym_address = "fetchai/gym:0.8.0" @property def gym_dialogues(self) -> GymDialogues: diff --git a/packages/fetchai/skills/gym/skill.yaml b/packages/fetchai/skills/gym/skill.yaml index d04cb3259b..016b84f3b4 100644 --- a/packages/fetchai/skills/gym/skill.yaml +++ b/packages/fetchai/skills/gym/skill.yaml @@ -1,6 +1,6 @@ name: gym author: fetchai -version: 0.7.0 +version: 0.8.0 type: skill description: The gym skill wraps an RL agent. license: Apache-2.0 @@ -10,13 +10,13 @@ fingerprint: __init__.py: QmTf1GCgHxu7qq4HvUNYiBwuGEL1DcsHQuWH7N7TB5TtoC dialogues.py: QmdGo2TGJTjRXhGngZPNCBvpNqwv3B581DFmaxEMDyswrd handlers.py: QmagqBdQaGuGbVS5dFqxFtEww2e1YF2NprBNPtt5pVA2hZ - helpers.py: QmaJaypMVpRUZTDhduMLfYivq2MHENALmFFuxEP6jfnepZ + helpers.py: QmbRSMX7UCRAEotS4ocTEcZLo1qietAAU9K5zBtqY1nE82 rl_agent.py: QmUq3XY9Dd2XZBhNNK9J3S5937d3az4cwP1BmeieHSgJ3m tasks.py: QmVf9K7zCkKYduTnS7nS3d8FvUbEVy7s7a26yaCC8Q3rgd fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/gym:0.5.0 +- fetchai/gym:0.6.0 skills: [] behaviours: {} handlers: diff --git a/packages/fetchai/skills/ml_data_provider/skill.yaml b/packages/fetchai/skills/ml_data_provider/skill.yaml index 7a56894bc2..9d26be6227 100644 --- a/packages/fetchai/skills/ml_data_provider/skill.yaml +++ b/packages/fetchai/skills/ml_data_provider/skill.yaml @@ -1,6 +1,6 @@ name: ml_data_provider author: fetchai -version: 0.11.0 +version: 0.12.0 type: skill description: The ml data provider skill implements a provider for Machine Learning datasets in order to monetize data. @@ -21,7 +21,7 @@ protocols: - fetchai/ml_trade:0.5.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/generic_seller:0.12.0 +- fetchai/generic_seller:0.13.0 behaviours: service_registration: args: diff --git a/packages/fetchai/skills/ml_train/handlers.py b/packages/fetchai/skills/ml_train/handlers.py index 7af561e772..2b94f46624 100644 --- a/packages/fetchai/skills/ml_train/handlers.py +++ b/packages/fetchai/skills/ml_train/handlers.py @@ -48,7 +48,7 @@ DUMMY_DIGEST = "dummy_digest" -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class MlTradeHandler(Handler): diff --git a/packages/fetchai/skills/ml_train/skill.yaml b/packages/fetchai/skills/ml_train/skill.yaml index 1285241205..1379ad8436 100644 --- a/packages/fetchai/skills/ml_train/skill.yaml +++ b/packages/fetchai/skills/ml_train/skill.yaml @@ -1,6 +1,6 @@ name: ml_train author: fetchai -version: 0.11.0 +version: 0.12.0 type: skill description: The ml train and predict skill implements a simple skill which buys training data, trains a model and sells predictions. @@ -11,7 +11,7 @@ fingerprint: __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ behaviours.py: QmQiBzKV5rEFpMQbSjfjzAJ7SqwwGmso6TozWkjdytucLR dialogues.py: QmccMjTxTrTaDyXFTTfAWHmA3xBiPCmKwBfiDSCW428Xie - handlers.py: QmXxVeXQDjqQ8gC1fwrZvFtSSHuwGERMoj1j5bYuNfAQYp + handlers.py: QmSZR738THX7bCaXkuuoPDgwF3fo6DSD3hDt7EY2pRGxBm ml_model.py: QmXp667GwVRrGsLxtqricnnyrBUUDn6efem22UCBd2g1y8 model.json: QmdV2tGrRY6VQ5VLgUa4yqAhPDG6X8tYsWecypq8nox9Td strategy.py: QmY8z1DW6PqQuiEpgXAhwasSk1CgvvTNZQH1LtExupif9g @@ -24,7 +24,7 @@ protocols: - fetchai/ml_trade:0.5.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/generic_buyer:0.11.0 +- fetchai/generic_buyer:0.12.0 behaviours: search: args: diff --git a/packages/fetchai/skills/simple_service_registration/handlers.py b/packages/fetchai/skills/simple_service_registration/handlers.py index 69c8297436..3826e190f2 100644 --- a/packages/fetchai/skills/simple_service_registration/handlers.py +++ b/packages/fetchai/skills/simple_service_registration/handlers.py @@ -31,7 +31,7 @@ OefSearchDialogues, ) -LEDGER_API_ADDRESS = "fetchai/ledger:0.5.0" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" class OefSearchHandler(Handler): diff --git a/packages/fetchai/skills/simple_service_registration/skill.yaml b/packages/fetchai/skills/simple_service_registration/skill.yaml index 1de824dda5..da13bda8c9 100644 --- a/packages/fetchai/skills/simple_service_registration/skill.yaml +++ b/packages/fetchai/skills/simple_service_registration/skill.yaml @@ -1,6 +1,6 @@ name: simple_service_registration author: fetchai -version: 0.9.0 +version: 0.10.0 type: skill description: The simple service registration skills is a skill to register a service. license: Apache-2.0 @@ -10,7 +10,7 @@ fingerprint: __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta behaviours.py: Qmcz55RRytuCEZTkAU5PxX4jjaPxkp3f747ivJcceH78b4 dialogues.py: QmX8L6qMd4X6LHLyPmiXaQL2LA5Ca9Q6B77qYdfvfJ3aen - handlers.py: QmZ55vACd5DEAoPujJ6eSk89PKHx3yWJFYTo1kHgoxjzuU + handlers.py: QmcFWEWmjDFxiksQiwWSUJ3mzJhVRXt9EmrD6PTHCmUX5G strategy.py: QmNTZ6XXAv6nvJs7B1p5mt7bVdH4pb3motxADDrxCpbmWF fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 5475cda285..42af59473b 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -1,6 +1,6 @@ name: tac_control_contract author: fetchai -version: 0.8.0 +version: 0.9.0 type: skill description: The tac control skill implements the logic for an AEA to control an instance of the TAC. @@ -16,7 +16,7 @@ fingerprint: parameters.py: QmRU9gxsWcxy25g69jbrKve2f8kFxNBjFfRjPZNKsYoYCP fingerprint_ignore_patterns: [] contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: - fetchai/oef_search:0.6.0 - fetchai/tac:0.6.0 diff --git a/packages/fetchai/skills/tac_negotiation/skill.yaml b/packages/fetchai/skills/tac_negotiation/skill.yaml index edefa7e622..455aee1dfd 100644 --- a/packages/fetchai/skills/tac_negotiation/skill.yaml +++ b/packages/fetchai/skills/tac_negotiation/skill.yaml @@ -1,6 +1,6 @@ name: tac_negotiation author: fetchai -version: 0.9.0 +version: 0.10.0 type: skill description: The tac negotiation skill implements the logic for an AEA to do fipa negotiation in the TAC. @@ -17,12 +17,12 @@ fingerprint: transactions.py: Qmc9Re92RLFkfds1NspTRym1wn7XPGSNDRFGtaG6Hrix4E fingerprint_ignore_patterns: [] contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: - fetchai/fipa:0.6.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/tac_participation:0.8.0 +- fetchai/tac_participation:0.9.0 behaviours: clean_up: args: diff --git a/packages/fetchai/skills/tac_participation/skill.yaml b/packages/fetchai/skills/tac_participation/skill.yaml index 2286a36267..ca4252c8f6 100644 --- a/packages/fetchai/skills/tac_participation/skill.yaml +++ b/packages/fetchai/skills/tac_participation/skill.yaml @@ -1,6 +1,6 @@ name: tac_participation author: fetchai -version: 0.8.0 +version: 0.9.0 type: skill description: The tac participation skill implements the logic for an AEA to participate in the TAC. @@ -15,7 +15,7 @@ fingerprint: handlers.py: QmSseAwQqHsSmj2eBPPnC9eygNSSwL1kheRVsgbLqyeDvV fingerprint_ignore_patterns: [] contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: - fetchai/oef_search:0.6.0 - fetchai/tac:0.6.0 diff --git a/packages/fetchai/skills/thermometer/skill.yaml b/packages/fetchai/skills/thermometer/skill.yaml index e7947c11d1..219f6095a3 100644 --- a/packages/fetchai/skills/thermometer/skill.yaml +++ b/packages/fetchai/skills/thermometer/skill.yaml @@ -1,6 +1,6 @@ name: thermometer author: fetchai -version: 0.11.0 +version: 0.12.0 type: skill description: The thermometer skill implements the functionality to sell data. license: Apache-2.0 @@ -20,7 +20,7 @@ protocols: - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/generic_seller:0.12.0 +- fetchai/generic_seller:0.13.0 behaviours: service_registration: args: diff --git a/packages/fetchai/skills/thermometer_client/skill.yaml b/packages/fetchai/skills/thermometer_client/skill.yaml index 434b3f851e..91ee45bf87 100644 --- a/packages/fetchai/skills/thermometer_client/skill.yaml +++ b/packages/fetchai/skills/thermometer_client/skill.yaml @@ -1,6 +1,6 @@ name: thermometer_client author: fetchai -version: 0.10.0 +version: 0.11.0 type: skill description: The thermometer client skill implements the skill to purchase temperature data. @@ -21,7 +21,7 @@ protocols: - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/generic_buyer:0.11.0 +- fetchai/generic_buyer:0.12.0 behaviours: search: args: diff --git a/packages/fetchai/skills/weather_client/skill.yaml b/packages/fetchai/skills/weather_client/skill.yaml index 665517e309..c897a88117 100644 --- a/packages/fetchai/skills/weather_client/skill.yaml +++ b/packages/fetchai/skills/weather_client/skill.yaml @@ -1,6 +1,6 @@ name: weather_client author: fetchai -version: 0.10.0 +version: 0.11.0 type: skill description: The weather client skill implements the skill to purchase weather data. license: Apache-2.0 @@ -20,7 +20,7 @@ protocols: - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/generic_buyer:0.11.0 +- fetchai/generic_buyer:0.12.0 behaviours: search: args: diff --git a/packages/fetchai/skills/weather_station/skill.yaml b/packages/fetchai/skills/weather_station/skill.yaml index 603ee048aa..44781300c7 100644 --- a/packages/fetchai/skills/weather_station/skill.yaml +++ b/packages/fetchai/skills/weather_station/skill.yaml @@ -1,6 +1,6 @@ name: weather_station author: fetchai -version: 0.11.0 +version: 0.12.0 type: skill description: The weather station skill implements the functionality to sell weather data. @@ -24,7 +24,7 @@ protocols: - fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 skills: -- fetchai/generic_seller:0.12.0 +- fetchai/generic_seller:0.13.0 behaviours: service_registration: args: diff --git a/packages/hashes.csv b/packages/hashes.csv index 3202b8923f..affbbbc4be 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -1,43 +1,43 @@ -fetchai/agents/aries_alice,QmdugL9YTvbBPph2KiaLMRgR35TqmAMV7U3PuZF1XW3YkN -fetchai/agents/aries_faber,QmRjqCnDPRVLWyMsrVH1yaKPRMxQRTRgcmgRZLw8gVXPPc -fetchai/agents/car_data_buyer,QmPUpG8Ui3WRomnXgbwGXrzYhGvJFRgsCiXqF36bokfMev -fetchai/agents/car_detector,QmNzRPX63ZGHTBtxHQGGKjHuGMjZyVDpJjnHaPsTJN4wAJ -fetchai/agents/erc1155_client,Qmauiu9jx3fDtPtUcr4BShuxzNLGMovSNfTk7Lu6Zn9Cs7 -fetchai/agents/erc1155_deployer,QmSXrULV2no3gVKysWicoDrdN9CCnkNGMgZhFtFVm8q1zp -fetchai/agents/generic_buyer,QmSNFhJaW4dZ37wcNV4z41y2z82joTo1oTZEqpve8CKqet -fetchai/agents/generic_seller,Qme8VKXcu73KQaWFEwawp59UgHzWNA1pQk7BEgtghGTZBu -fetchai/agents/gym_aea,QmSmrMbwtajZ3WdP1UANrH9XXpq9tu5C35aemM4YMfacy6 -fetchai/agents/ml_data_provider,QmYT2smoTJkVKhQYRkXxCdQYxcGS3Uw7Hwzjgsk14X2Bou -fetchai/agents/ml_model_trainer,QmdYCVbUkP46aD5xZCQWnjGNi6pNf1XBzBUVTzDagqGyTN +fetchai/agents/aries_alice,QmSzfcX1hnJ4raTS4yREwSEKQastCHM4Z9a6irY5Es3Toc +fetchai/agents/aries_faber,QmaJEpXeh1rKsYyggoj5L2S3N37AAJdMuZxVQExyyKUDqx +fetchai/agents/car_data_buyer,QmYNak5SGrrfkfp28Zm2osp5xKeFTBJPTPXruh2zTpcYH4 +fetchai/agents/car_detector,QmPDuvJLVi1kfobAEnHMouobZCBniwrxRnZiGRQt5KJHYi +fetchai/agents/erc1155_client,QmQQmTrnLuVAqeez4vuL1pFLT8sNtHJWZCp9NTXcJvcupS +fetchai/agents/erc1155_deployer,QmVa7cpE6dzhRA9RRnLvcXjftUs4ELDxh5MsvsZBVsK9BL +fetchai/agents/generic_buyer,QmSsZKZos8qgQFBkqLdPb12dBXKGsfrkVMs6nuqJswJvx2 +fetchai/agents/generic_seller,QmdRy5T4qCF6njPBk7ZhWmKJrLJAte2aXCHsAURNXpb4R2 +fetchai/agents/gym_aea,QmUtKrUwVt63iKZxjncrBSz6eZ9g4RGWFM49qtA4JtFMCm +fetchai/agents/ml_data_provider,QmQtHQkYgNivnP1WuBbpnRLFKtjZbhRyeZFBW64GXXqhEy +fetchai/agents/ml_model_trainer,Qmbk9YkJ7AX4VPcxS1anFU1sEgcU8oZn5fbSv2KuErBWMW fetchai/agents/my_first_aea,QmdYThnxTmqZizzvJvYH1HmnT5HKn5MsprkkHA8k3dgDPZ -fetchai/agents/simple_service_registration,QmVR26MH3BCZgs7u8yNLbhesh5Ww5trXuDCu9jpkAyk7DW -fetchai/agents/tac_controller,QmQnLko5QR2r9rjbyj5H5X8hXPyabkdAF5jCQ3Q1qQxz9n -fetchai/agents/tac_controller_contract,QmUQN91FjFBr9ckKGHFfTEDBoDjDJjCwKwP2z89D6WAt1q -fetchai/agents/tac_participant,QmRP67EwNBiXaDAJn9RXdPDjJQ4KsymokRsq6Z5b5inaFP -fetchai/agents/thermometer_aea,QmfHJ4RSR29FbfA1RvE4j8xALEAL3iNzBjyWMY5FTLd1ZY -fetchai/agents/thermometer_client,QmRA1KowqqTSBukUektJtxPHNHeCh31fWPi3LhyYrsG7vZ -fetchai/agents/weather_client,QmfLNW1SF3pv5HMmXq5RUKUtsDBaoH9tu2yRTCAVRC98tZ -fetchai/agents/weather_station,QmZ3cmNvuSkqWSKJ8VoqwBZaphRZYdZLVm3vsFBkU7aNr2 -fetchai/connections/gym,QmSdnXM6hqJT3JzCmGqas5RPxodWqrhUwGGTinFn3kYpSL +fetchai/agents/simple_service_registration,QmWKm97p72CSV9A9i4yrVi5ucWhw2jqAurbBE8xkuwHLSQ +fetchai/agents/tac_controller,QmSLFA3m31SB45De8SEYixvAGkPcpv6dqtKKkssTW97HpB +fetchai/agents/tac_controller_contract,QmXY3FHDmK8RYh6Hb4aodxzjuG1d5iggn6UtnoJph8wvVE +fetchai/agents/tac_participant,Qme3EP7MYHKre7GK2X5jZ4Pq973DaJPfpPXZX64gtp5iUk +fetchai/agents/thermometer_aea,QmZzUqFVaDNGfwPnq5EvfPKNoMSfGzgpBic2z8HHWfu1RE +fetchai/agents/thermometer_client,QmfMjh5gCDrdipCDYYrAr7jRDXJ2CpfWFij9t6J4EKdXYT +fetchai/agents/weather_client,QmXyXQHxeJyBFSXLU2GZnV49t17iwnNLWWpUEFqMTAb8AE +fetchai/agents/weather_station,QmW4kSbF5eKuh4itMJ8xKonaPejutaMp2GyobcN7V4zJR8 +fetchai/connections/gym,Qmack3EaCW6ARrHrtCnJmL3kR2xrHutJmgD8uoRVGFz6kH fetchai/connections/http_client,QmfSuWhrseBCVcmzwKmqFDC6qX3ryFzfx2uuUTb8HPGuEd fetchai/connections/http_server,QmU2XNsgEV7zGEgiu4PD2mjXP3fA6Fa7ivrcd7dUzC6PKc -fetchai/connections/ledger,QmapEL72QxY2GFJXcrhJAe1YP7jtJSxp4HY8psKkRHNkxZ +fetchai/connections/ledger,QmR77FXChjMt1K9QahWhuXHqiUwYjCxyiT2XZVtucv67Za fetchai/connections/local,QmWZPDvqjZjzNDUX4ivHF3kGvkNCUYM449RqNEyyoexFix fetchai/connections/oef,QmWpjFr7im4afmsdtmBSYJp2tRzVpeZdYpRvsDYq6q3kg7 -fetchai/connections/p2p_libp2p,QmXBdcmsx2J9rQfEJhmSAg6HdpzjtDLVjMcEnNCeAsD8VM -fetchai/connections/p2p_libp2p_client,QmTEE3wRLyGhVbm5oGZG819ijM5HxvuZdy1mtJUoo5XwpS +fetchai/connections/p2p_libp2p,QmVXSnhCn37mgacK7iG1HENbEkSvSZMMaf9RTFCUUDa2C9 +fetchai/connections/p2p_libp2p_client,QmVEwABjAPTZcA4BaAgn8BnzUCpHQbSzc4pJ6mdR4bW222 fetchai/connections/p2p_stub,QmX8EWvFok3UAdqXGgir4TrhfDj2kLhfjuXRg82b6G6XtW fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS fetchai/connections/soef,QmQWyjmHg6HWsLEuighe2vrWQSKBZAXvoXSXF33XhaVyE8 fetchai/connections/stub,QmSuUAA2k1E1M9dpeAgkWpfKdssjqghSDfFfrQzC9ZLKbD fetchai/connections/tcp,QmU93B7yajCHwXsgDXXhv1uSuXi7VmFBhdahcFosbrr6nA fetchai/connections/webhook,QmaJunWQT1ypkqGnzrj5gYjjQBywjTHJmyktCZXZsa8hv8 -fetchai/contracts/erc1155,QmdhfKcSJR4cpfcNDWyq14LXFCGXVkQ4HxSH4P3NB6EeGs +fetchai/contracts/erc1155,QmUupRwnza2KZBGULZ62xQREtkuQbYUrt1W8NbYZJuqbNt fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 -fetchai/protocols/contract_api,QmeGEAe7GgLmFtFECQQtaPe5RYEA7EnfHbHToXv5NJSxGy +fetchai/protocols/contract_api,QmaxhJetT4GQ1A2ctbxxWQLvLny6LZykFnXEt2yDVb4sKJ fetchai/protocols/default,QmXAdTynqPF8kYFsRZzxigVh3LYZJ8FSGEPEmNPDLoyHmM fetchai/protocols/fipa,Qmb3GXxbEQ23sZ1d7HsmrvchLwPfsEcDAbpLLjRTYxdJDm -fetchai/protocols/gym,QmRmnLVMCkDa2LJz4RPjKRQvruhKmhMw4wf2VwaQTv3ggB +fetchai/protocols/gym,Qmaj7TByBrHvbecUzWmuy96t7W8iocsD3gKunWZZSLTF5b fetchai/protocols/http,QmZJVqY2cxjky6p3o76TUemSsFDws8Dx33voG9WMdrKcry fetchai/protocols/ledger_api,Qmak3uKpeSfT5f4oqes3oUcNSg7vy7WKE2tUmSu8CZUNJ5 fetchai/protocols/ml_trade,QmNVZvbcgERSypYUopKMHvd6F8B81rQqtLVqUvzMeEEwJN @@ -48,25 +48,25 @@ fetchai/protocols/state_update,QmQmQt1VHwxmnNmwxKcrF4Qno6iHzVhhnUUjsqPtpfpQUV fetchai/protocols/tac,QmSn9DVVZUroa5dsjqMwiVBFmpLjyGuox8nt2FhhTs2KM6 fetchai/skills/aries_alice,QmXp6W2vFmQgYCchQwLa3yDUwWw7hjeC8WnuPmtrXebZnq fetchai/skills/aries_faber,QmZFcjJddJM3mJyVDPu8xfcmUi4TgHgTB92A8SSPr9eD2X -fetchai/skills/carpark_client,Qmer91keoAdEHnwQeuPKAnRSXDJP5ivmvNjyQbttgkU6pC -fetchai/skills/carpark_detection,QmSFS2eti7WqR1yFos2ADYc2tmgciMvzZ4yNGUVtFJcD65 +fetchai/skills/carpark_client,QmV3vHmx4sDaecBq56L6kMD2K6JorNq4fTVC2X2NqqdUFP +fetchai/skills/carpark_detection,QmSMoWJggZdTF3p4Y7CRUj94U9fny9tbPqJg5dZSDzUCFp fetchai/skills/echo,QmVRzFQnq22j7tcWK6MiD9q8Vs6mAAJhY3FrRE4CfJQ1D2 -fetchai/skills/erc1155_client,QmcUa2zx8QnfEHdioiHePw7V3oMxwGjxvkzygMYcTj9bE5 -fetchai/skills/erc1155_deploy,QmdBGAc1jGBzAPjLkrVi2roSDF7n9ahHss7zDFwwxYDosM +fetchai/skills/erc1155_client,Qma5wTx1huj5DAcsBkRwCvZVczRREwyUawVJhyaC4UTrRE +fetchai/skills/erc1155_deploy,QmPPHF6PUzRbeRCwy4m73oykUbTcNb1cGSoco5tSjcpVoB fetchai/skills/error,QmanfpyCmvUkqG9xsEyWULvi1ZZzqvggvs9LnQvSjuRhLb -fetchai/skills/generic_buyer,QmSe98t6M5CCAfAh8KxbtZt2PUV1Ds1K3VetjbdZBoZfMK -fetchai/skills/generic_seller,Qmb1KxJxXyxqf5oQjs4rtEDKyjnCgPbVDJijyWGNSpWQdT -fetchai/skills/gym,QmaiTBVJRwKFgBnL2EJHFgtEWmQ1BDcjGuasVM1D4Na6RT +fetchai/skills/generic_buyer,QmR2xrE8RJMmtHPRw8sjH1RxY459958MDZNkUur6cvgSsg +fetchai/skills/generic_seller,QmQYVjJ1NnTTzLPxf2yXGkwHbCBADDJCUjCjBH2NpvG2pB +fetchai/skills/gym,Qmc78RwfDZFyBxQBn6qyakD55dKEPwUERZ1hXpx9xyN6TW fetchai/skills/http_echo,QmZR1VgVb51R2PjuHtBTd8w2ye6rfnMbgi7GJ7BQhDXAPJ -fetchai/skills/ml_data_provider,QmQke9TmGmC9EXrQbst95Bw4gnTK1gLxH9i1Uv7CTxzhn4 -fetchai/skills/ml_train,Qmd2abFvxSwhybqQ3zLkZDKNHrMyqoQqhG4mmKX66v4Wyj +fetchai/skills/ml_data_provider,QmdgxfES4XpmREpp9QqPQRMH9TvTF9nZ21zKM5RHLGCLke +fetchai/skills/ml_train,QmbRQZz1MPXXuWyNW3BqhcsZKtZPhYakxGkVrBswNTgfk9 fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux -fetchai/skills/simple_service_registration,QmfSUCJT7szDvpsUYF1emfzNZgHoNM1o9nrEtCchPodBz2 +fetchai/skills/simple_service_registration,QmeckN8mcKLeqmJoQfdYqPsJ49nbxxwBhYPhjkTS99v1De fetchai/skills/tac_control,QmYCCU6RsvwqmjTRM3Nx8H99HhJXEFuinJSeG3UcjDubYH -fetchai/skills/tac_control_contract,QmbstL6fn99jFVsZsGQT3Sjy8SBdm1rrW87oHmdyMTJKmd -fetchai/skills/tac_negotiation,Qme9Vcdk1ovguZJTaCrVo5kcJCKw3jBHJgxhQY9QKiDYAW -fetchai/skills/tac_participation,QmcynKNnEFSM2pNAwkMsBD1c2JEqfqCocv16tk4mRvFFbv -fetchai/skills/thermometer,Qmaez14AMYqBkkQ1oLHVQUM18RdJu8haz9PacRmJvHEQak -fetchai/skills/thermometer_client,QmU1fvDdtbv7eLjkMyUx1HJNzFqLh86QpW6kDiSpFqGa89 -fetchai/skills/weather_client,Qmca6hQUUwjvnhQscYfkw8CttL2TyQeDzCiReoDQoPyMhG -fetchai/skills/weather_station,QmWTgypTWmZXugL2135YzwQuDDDdi5FmHj2DpaRe3FXZdt +fetchai/skills/tac_control_contract,QmNz5pNPvS7LBUMdjVPrRAFgJbaD2xTL1HJQnCoYK3Va4J +fetchai/skills/tac_negotiation,QmRCZWxUh6mkaBsa1CYNk3fmNKzSVxfiqwYGbzU1E3672F +fetchai/skills/tac_participation,QmWBATSrN9J3XoqMJ89iniMnMDZZpLqoenWTigukaDasQG +fetchai/skills/thermometer,QmWSFjntE9MvLpqUTfJrx4FxnG7ZSGQifoTft9mJ9MiPYt +fetchai/skills/thermometer_client,QmQidRBB71VaaDA9LfQodFmBTHmfFi9onG1afjPmADysEx +fetchai/skills/weather_client,QmbsSVhqy6nNe637PKhaiNmUpbztsfxqyuNe6r94QXiKiU +fetchai/skills/weather_station,QmSHssQvAEAKpogK4sFdAzGEhtvdxXi4orJY6PeNoMzouC diff --git a/tests/data/dummy_aea/aea-config.yaml b/tests/data/dummy_aea/aea-config.yaml index 42e843d2da..3dc734de13 100644 --- a/tests/data/dummy_aea/aea-config.yaml +++ b/tests/data/dummy_aea/aea-config.yaml @@ -9,7 +9,7 @@ fingerprint_ignore_patterns: [] connections: - fetchai/local:0.8.0 contracts: -- fetchai/erc1155:0.9.0 +- fetchai/erc1155:0.10.0 protocols: - fetchai/default:0.5.0 - fetchai/fipa:0.6.0 diff --git a/tests/data/gym-connection.yaml b/tests/data/gym-connection.yaml index ffdc8ba2b5..83da790575 100644 --- a/tests/data/gym-connection.yaml +++ b/tests/data/gym-connection.yaml @@ -9,8 +9,8 @@ fingerprint: aea_version: '>=0.6.0, <0.7.0' description: "The gym connection wraps an OpenAI gym." class_name: GymConnection -protocols: ["fetchai/gym:0.5.0"] -restricted_to_protocols: ["fetchai/gym:0.5.0"] +protocols: ["fetchai/gym:0.6.0"] +restricted_to_protocols: ["fetchai/gym:0.6.0"] excluded_protocols: [] config: env: 'gyms.env.BanditNArmedRandom' diff --git a/tests/data/hashes.csv b/tests/data/hashes.csv index 32219ab32f..8e4ba4b05d 100644 --- a/tests/data/hashes.csv +++ b/tests/data/hashes.csv @@ -1,4 +1,4 @@ -dummy_author/agents/dummy_aea,QmQRx5aPogjbzyV1GKFByfPpCENu7A1E1GGC9arXCKnzsD +dummy_author/agents/dummy_aea,QmeFNeXh5vk81YwPnPY9qmBA5wrHeH8VsHkDcv6TqHvmFn dummy_author/skills/dummy_skill,QmQpimGAQ56nihemchgE29Mfan57YdGixj3kat69FGkrjK fetchai/connections/dummy_connection,QmT7zw62fDK1mmwYqTvw4pWqFg8Fc1DYQHUxcxd7sqZiLu fetchai/contracts/dummy_contract,QmPMs9VDGZGF8xJ8XBYLVb1xK5XAgiaJr5Gwcq7Vr3TUyu diff --git a/tests/test_cli/test_add/test_protocol.py b/tests/test_cli/test_add/test_protocol.py index 6e013f0944..c9820afb3a 100644 --- a/tests/test_cli/test_add/test_protocol.py +++ b/tests/test_cli/test_add/test_protocol.py @@ -56,7 +56,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.protocol_id = PublicId.from_str("fetchai/gym:0.5.0") + cls.protocol_id = PublicId.from_str("fetchai/gym:0.6.0") cls.protocol_name = cls.protocol_id.name cls.protocol_author = cls.protocol_id.author cls.protocol_version = cls.protocol_id.version @@ -124,7 +124,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.protocol_id = PublicId.from_str("fetchai/gym:0.5.0") + cls.protocol_id = PublicId.from_str("fetchai/gym:0.6.0") cls.protocol_name = cls.protocol_id.name cls.protocol_author = cls.protocol_id.author cls.protocol_version = cls.protocol_id.version @@ -336,7 +336,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.protocol_id = "fetchai/gym:0.5.0" + cls.protocol_id = "fetchai/gym:0.6.0" # copy the 'packages' directory in the parent of the agent folder. shutil.copytree(Path(CUR_PATH, "..", "packages"), Path(cls.t, "packages")) @@ -402,7 +402,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.protocol_id = "fetchai/gym:0.5.0" + cls.protocol_id = "fetchai/gym:0.6.0" cls.protocol_name = "gym" # copy the 'packages' directory in the parent of the agent folder. diff --git a/tests/test_cli/test_add/test_skill.py b/tests/test_cli/test_add/test_skill.py index dc8e4b9790..6f200b2c77 100644 --- a/tests/test_cli/test_add/test_skill.py +++ b/tests/test_cli/test_add/test_skill.py @@ -473,7 +473,7 @@ class TestAddSkillWithContractsDeps(AEATestCaseEmpty): def test_add_skill_with_contracts_positive(self): """Test add skill with contract dependencies positive result.""" - self.add_item("skill", "fetchai/erc1155_client:0.12.0") + self.add_item("skill", "fetchai/erc1155_client:0.13.0") contracts_path = os.path.join(self.agent_name, "vendor", "fetchai", "contracts") contracts_folders = os.listdir(contracts_path) diff --git a/tests/test_cli/test_eject.py b/tests/test_cli/test_eject.py index 7ba55101b7..7ef05aca81 100644 --- a/tests/test_cli/test_eject.py +++ b/tests/test_cli/test_eject.py @@ -33,29 +33,29 @@ def test_eject_commands_positive(self): self.set_agent_context(agent_name) cwd = os.path.join(self.t, agent_name) - self.add_item("connection", "fetchai/gym:0.7.0") - self.add_item("skill", "fetchai/gym:0.7.0") - self.add_item("contract", "fetchai/erc1155:0.9.0") + self.add_item("connection", "fetchai/gym:0.8.0") + self.add_item("skill", "fetchai/gym:0.8.0") + self.add_item("contract", "fetchai/erc1155:0.10.0") - self.run_cli_command("eject", "connection", "fetchai/gym:0.7.0", cwd=cwd) + self.run_cli_command("eject", "connection", "fetchai/gym:0.8.0", cwd=cwd) assert "gym" not in os.listdir( (os.path.join(cwd, "vendor", "fetchai", "connections")) ) assert "gym" in os.listdir((os.path.join(cwd, "connections"))) - self.run_cli_command("eject", "protocol", "fetchai/gym:0.5.0", cwd=cwd) + self.run_cli_command("eject", "protocol", "fetchai/gym:0.6.0", cwd=cwd) assert "gym" not in os.listdir( (os.path.join(cwd, "vendor", "fetchai", "protocols")) ) assert "gym" in os.listdir((os.path.join(cwd, "protocols"))) - self.run_cli_command("eject", "skill", "fetchai/gym:0.7.0", cwd=cwd) + self.run_cli_command("eject", "skill", "fetchai/gym:0.8.0", cwd=cwd) assert "gym" not in os.listdir( (os.path.join(cwd, "vendor", "fetchai", "skills")) ) assert "gym" in os.listdir((os.path.join(cwd, "skills"))) - self.run_cli_command("eject", "contract", "fetchai/erc1155:0.9.0", cwd=cwd) + self.run_cli_command("eject", "contract", "fetchai/erc1155:0.10.0", cwd=cwd) assert "erc1155" not in os.listdir( (os.path.join(cwd, "vendor", "fetchai", "contracts")) ) diff --git a/tests/test_cli/test_remove/test_protocol.py b/tests/test_cli/test_remove/test_protocol.py index 86c6e4fd35..f4b82b2ea9 100644 --- a/tests/test_cli/test_remove/test_protocol.py +++ b/tests/test_cli/test_remove/test_protocol.py @@ -47,7 +47,7 @@ def setup_class(cls): cls.t = tempfile.mkdtemp() # copy the 'packages' directory in the parent of the agent folder. shutil.copytree(Path(CUR_PATH, "..", "packages"), Path(cls.t, "packages")) - cls.protocol_id = "fetchai/gym:0.5.0" + cls.protocol_id = "fetchai/gym:0.6.0" cls.protocol_name = "gym" os.chdir(cls.t) @@ -109,7 +109,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.protocol_id = "fetchai/gym:0.5.0" + cls.protocol_id = "fetchai/gym:0.6.0" os.chdir(cls.t) result = cls.runner.invoke( @@ -164,7 +164,7 @@ def setup_class(cls): cls.t = tempfile.mkdtemp() # copy the 'packages' directory in the parent of the agent folder. shutil.copytree(Path(CUR_PATH, "..", "packages"), Path(cls.t, "packages")) - cls.protocol_id = "fetchai/gym:0.5.0" + cls.protocol_id = "fetchai/gym:0.6.0" os.chdir(cls.t) result = cls.runner.invoke( diff --git a/tests/test_cli/test_remove/test_skill.py b/tests/test_cli/test_remove/test_skill.py index 45531339ae..372836292d 100644 --- a/tests/test_cli/test_remove/test_skill.py +++ b/tests/test_cli/test_remove/test_skill.py @@ -45,7 +45,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.skill_id = "fetchai/gym:0.7.0" + cls.skill_id = "fetchai/gym:0.8.0" cls.skill_name = "gym" os.chdir(cls.t) @@ -114,7 +114,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.skill_id = "fetchai/gym:0.7.0" + cls.skill_id = "fetchai/gym:0.8.0" os.chdir(cls.t) result = cls.runner.invoke( @@ -168,7 +168,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.skill_id = "fetchai/gym:0.7.0" + cls.skill_id = "fetchai/gym:0.8.0" cls.skill_name = "gym" os.chdir(cls.t) diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-aries-cloud-agent-demo.md b/tests/test_docs/test_bash_yaml/md_files/bash-aries-cloud-agent-demo.md index 4f667e7a30..0c2e6b7738 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-aries-cloud-agent-demo.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-aries-cloud-agent-demo.md @@ -15,13 +15,13 @@ aca-py start --admin 127.0.0.1 8021 --admin-insecure-mode --inbound-transport ht aca-py start --admin 127.0.0.1 8031 --admin-insecure-mode --inbound-transport http 0.0.0.0 8030 --outbound-transp http --webhook-url http://127.0.0.1:8032/webhooks ``` ``` bash -aea fetch fetchai/aries_alice:0.10.0 +aea fetch fetchai/aries_alice:0.11.0 cd aries_alice ``` ``` bash aea create aries_alice cd aries_alice -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 aea add connection fetchai/http_client:0.8.0 aea add connection fetchai/webhook:0.6.0 @@ -54,13 +54,13 @@ aea install aea run ``` ``` bash -aea fetch fetchai/aries_faber:0.10.0 +aea fetch fetchai/aries_faber:0.11.0 cd aries_faber ``` ``` bash aea create aries_faber cd aries_faber -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 aea add connection fetchai/http_client:0.8.0 aea add connection fetchai/webhook:0.6.0 diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-car-park-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-car-park-skills.md index b98e43524a..de141063dc 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-car-park-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-car-park-skills.md @@ -1,32 +1,32 @@ ``` bash -aea fetch fetchai/car_detector:0.12.0 +aea fetch fetchai/car_detector:0.13.0 cd car_detector aea install ``` ``` bash aea create car_detector cd car_detector -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/carpark_detection:0.11.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/carpark_detection:0.12.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash -aea fetch fetchai/car_data_buyer:0.12.0 +aea fetch fetchai/car_data_buyer:0.13.0 cd car_data_buyer aea install ``` ``` bash aea create car_data_buyer cd car_data_buyer -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/carpark_client:0.11.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/carpark_client:0.12.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea generate-key fetchai @@ -54,12 +54,12 @@ aea delete car_data_buyer ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-cli-vs-programmatic-aeas.md b/tests/test_docs/test_bash_yaml/md_files/bash-cli-vs-programmatic-aeas.md index b7615e2cef..2d271b9c25 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-cli-vs-programmatic-aeas.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-cli-vs-programmatic-aeas.md @@ -2,7 +2,7 @@ svn export https://github.com/fetchai/agents-aea.git/trunk/packages ``` ``` bash -aea fetch fetchai/weather_station:0.12.0 +aea fetch fetchai/weather_station:0.13.0 cd weather_station ``` ``` bash diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-config.md b/tests/test_docs/test_bash_yaml/md_files/bash-config.md index 8ed7b3821d..0041a7c21b 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-config.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-config.md @@ -20,7 +20,7 @@ protocols: # The list of protocol public id - fetchai/default:0.5.0 skills: # The list of skill public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). - fetchai/error:0.5.0 -default_connection: fetchai/p2p_libp2p:0.9.0 # The default connection used for envelopes sent by the AEA (must satisfy PUBLIC_ID_REGEX). +default_connection: fetchai/p2p_libp2p:0.10.0 # The default connection used for envelopes sent by the AEA (must satisfy PUBLIC_ID_REGEX). default_ledger: fetchai # The default ledger identifier the AEA project uses (must satisfy LEDGER_ID_REGEX) logging_config: # The logging configurations the AEA project uses disable_existing_loggers: false diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-erc1155-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-erc1155-skills.md index d6fdbcd6de..d44f8d086b 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-erc1155-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-erc1155-skills.md @@ -1,17 +1,17 @@ ``` bash -aea fetch fetchai/erc1155_deployer:0.13.0 +aea fetch fetchai/erc1155_deployer:0.14.0 cd erc1155_deployer aea install ``` ``` bash aea create erc1155_deployer cd erc1155_deployer -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/erc1155_deploy:0.13.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/erc1155_deploy:0.14.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea config set agent.default_ledger ethereum @@ -25,19 +25,19 @@ aea generate-key cosmos aea add-key cosmos cosmos_private_key.txt --connection ``` ``` bash -aea fetch fetchai/erc1155_client:0.13.0 +aea fetch fetchai/erc1155_client:0.14.0 cd erc1155_client aea install ``` ``` bash aea create erc1155_client cd erc1155_client -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/erc1155_client:0.12.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/erc1155_client:0.13.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea config set agent.default_ledger ethereum @@ -75,14 +75,14 @@ aea delete erc1155_client ``` ``` yaml default_routing: - fetchai/contract_api:0.4.0: fetchai/ledger:0.5.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml default_routing: - fetchai/contract_api:0.4.0: fetchai/ledger:0.5.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills-step-by-step.md b/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills-step-by-step.md index 5b92dc3897..760425d948 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills-step-by-step.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills-step-by-step.md @@ -5,15 +5,15 @@ sudo nano 99-hidraw-permissions.rules KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev" ``` ``` bash -aea fetch fetchai/generic_seller:0.9.0 +aea fetch fetchai/generic_seller:0.10.0 cd generic_seller -aea eject skill fetchai/generic_seller:0.12.0 +aea eject skill fetchai/generic_seller:0.13.0 cd .. ``` ``` bash -aea fetch fetchai/generic_buyer:0.9.0 +aea fetch fetchai/generic_buyer:0.10.0 cd generic_buyer -aea eject skill fetchai/generic_buyer:0.11.0 +aea eject skill fetchai/generic_buyer:0.12.0 cd .. ``` ``` bash @@ -48,22 +48,22 @@ aea add-key fetchai fetchai_private_key.txt --connection aea generate-wealth fetchai --sync ``` ``` bash -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 +aea add connection fetchai/ledger:0.6.0 aea add protocol fetchai/fipa:0.6.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea run ``` ``` bash -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 +aea add connection fetchai/ledger:0.6.0 aea add protocol fetchai/fipa:0.6.0 aea add protocol fetchai/signing:0.3.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea run @@ -225,7 +225,7 @@ addr: ${OEF_ADDR: 127.0.0.1} ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills.md index 31dc731eb9..6f01f1085c 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills.md @@ -1,32 +1,32 @@ ``` bash -aea fetch fetchai/generic_seller:0.9.0 --alias my_seller_aea +aea fetch fetchai/generic_seller:0.10.0 --alias my_seller_aea cd my_seller_aea aea install ``` ``` bash aea create my_seller_aea cd my_seller_aea -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/generic_seller:0.12.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/generic_seller:0.13.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash -aea fetch fetchai/generic_buyer:0.9.0 --alias my_buyer_aea +aea fetch fetchai/generic_buyer:0.10.0 --alias my_buyer_aea cd my_buyer_aea aea install ``` ``` bash aea create my_buyer_aea cd my_buyer_aea -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/generic_buyer:0.11.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/generic_buyer:0.12.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea generate-key fetchai @@ -62,12 +62,12 @@ aea delete my_buyer_aea ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml 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 a6808d7816..c0cfb5601d 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 fetchai/gym_aea:0.10.0 --alias my_gym_aea +aea fetch fetchai/gym_aea:0.11.0 --alias my_gym_aea cd my_gym_aea aea install ``` @@ -8,10 +8,10 @@ aea create my_gym_aea cd my_gym_aea ``` ``` bash -aea add skill fetchai/gym:0.7.0 +aea add skill fetchai/gym:0.8.0 ``` ``` bash -aea add connection fetchai/gym:0.7.0 +aea add connection fetchai/gym:0.8.0 aea config set agent.default_connection fetchai/gym:0.7.0 ``` ``` bash diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-ml-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-ml-skills.md index 446ae4810f..901ad6cab9 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-ml-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-ml-skills.md @@ -1,31 +1,31 @@ ``` bash -aea fetch fetchai/ml_data_provider:0.12.0 +aea fetch fetchai/ml_data_provider:0.13.0 cd ml_data_provider aea install ``` ``` bash aea create ml_data_provider cd ml_data_provider -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/ml_data_provider:0.11.0 -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/ml_data_provider:0.12.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea install ``` ``` bash -aea fetch fetchai/ml_model_trainer:0.12.0 +aea fetch fetchai/ml_model_trainer:0.13.0 cd ml_model_trainer aea install ``` ``` bash aea create ml_model_trainer cd ml_model_trainer -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/ml_train:0.11.0 -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/ml_train:0.12.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea install ``` ``` bash @@ -54,12 +54,12 @@ aea delete ml_model_trainer ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-orm-integration.md b/tests/test_docs/test_bash_yaml/md_files/bash-orm-integration.md index 39e3a71084..9984fab6fd 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-orm-integration.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-orm-integration.md @@ -1,32 +1,32 @@ ``` bash -aea fetch fetchai/thermometer_aea:0.10.0 --alias my_thermometer_aea +aea fetch fetchai/thermometer_aea:0.11.0 --alias my_thermometer_aea cd my_thermometer_aea aea install ``` ``` bash aea create my_thermometer_aea cd my_thermometer_aea -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/thermometer:0.11.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/thermometer:0.12.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash -aea fetch fetchai/thermometer_client:0.10.0 --alias my_thermometer_client +aea fetch fetchai/thermometer_client:0.11.0 --alias my_thermometer_client cd my_thermometer_client aea install ``` ``` bash aea create my_thermometer_client cd my_thermometer_client -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/thermometer_client:0.10.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/thermometer_client:0.11.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea generate-key fetchai @@ -45,7 +45,7 @@ aea generate-wealth fetchai aea install ``` ``` bash -aea eject skill fetchai/thermometer:0.11.0 +aea eject skill fetchai/thermometer:0.12.0 ``` ``` bash aea fingerprint skill {YOUR_AUTHOR_HANDLE}/thermometer:0.1.0 @@ -63,12 +63,12 @@ aea delete my_thermometer_client ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-p2p-connection.md b/tests/test_docs/test_bash_yaml/md_files/bash-p2p-connection.md index f377d5396c..e316c52cb9 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-p2p-connection.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-p2p-connection.md @@ -1,18 +1,18 @@ ``` bash aea create my_genesis_aea cd my_genesis_aea -aea add connection fetchai/p2p_libp2p:0.9.0 -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 -aea run --connections fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 +aea run --connections fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea create my_other_aea cd my_other_aea -aea add connection fetchai/p2p_libp2p:0.9.0 -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash -aea run --connections fetchai/p2p_libp2p:0.9.0 +aea run --connections fetchai/p2p_libp2p:0.10.0 ``` ``` bash svn export https://github.com/fetchai/agents-aea.git/trunk/packages/fetchai/connections/p2p_libp2p diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-skill-guide.md b/tests/test_docs/test_bash_yaml/md_files/bash-skill-guide.md index 6274a34d55..d132e978f1 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-skill-guide.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-skill-guide.md @@ -10,12 +10,12 @@ aea add protocol fetchai/oef_search:0.6.0 ``` ``` bash aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash -aea fetch fetchai/simple_service_registration:0.12.0 && cd simple_service_registration +aea fetch fetchai/simple_service_registration:0.13.0 && cd simple_service_registration ``` ``` bash aea generate-key fetchai diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md index f7e4385b0a..dba8940de7 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md @@ -1,17 +1,17 @@ ``` bash -aea fetch fetchai/tac_controller_contract:0.10.0 +aea fetch fetchai/tac_controller_contract:0.11.0 cd tac_controller_contract aea install ``` ``` bash aea create tac_controller_contract cd tac_controller_contract -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/tac_control_contract:0.8.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/tac_control_contract:0.9.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea config set agent.default_ledger ethereum ``` ``` bash @@ -25,12 +25,12 @@ aea generate-wealth ethereum aea get-wealth ethereum ``` ``` bash -aea fetch fetchai/tac_participant:0.10.0 --alias tac_participant_one +aea fetch fetchai/tac_participant:0.11.0 --alias tac_participant_one cd tac_participant_one aea config set vendor.fetchai.skills.tac_participation.models.game.args.is_using_contract 'True' --type bool aea config set vendor.fetchai.skills.tac_negotiation.models.strategy.args.is_contract_tx 'True' --type bool cd .. -aea fetch fetchai/tac_participant:0.10.0 --alias tac_participant_two +aea fetch fetchai/tac_participant:0.11.0 --alias tac_participant_two cd tac_participant_two aea config set vendor.fetchai.skills.tac_participation.models.game.args.is_using_contract 'True' --type bool aea config set vendor.fetchai.skills.tac_negotiation.models.strategy.args.is_contract_tx 'True' --type bool @@ -42,26 +42,26 @@ aea create tac_participant_two ``` ``` bash cd tac_participant_one -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/tac_participation:0.8.0 -aea add skill fetchai/tac_negotiation:0.9.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/tac_participation:0.9.0 +aea add skill fetchai/tac_negotiation:0.10.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea config set agent.default_ledger ethereum aea config set vendor.fetchai.skills.tac_participation.models.game.args.is_using_contract 'True' --type bool aea config set vendor.fetchai.skills.tac_negotiation.models.strategy.args.is_contract_tx 'True' --type bool ``` ``` bash cd tac_participant_two -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/tac_participation:0.8.0 -aea add skill fetchai/tac_negotiation:0.9.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/tac_participation:0.9.0 +aea add skill fetchai/tac_negotiation:0.10.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea config set agent.default_ledger ethereum aea config set vendor.fetchai.skills.tac_participation.models.game.args.is_using_contract 'True' --type bool aea config set vendor.fetchai.skills.tac_negotiation.models.strategy.args.is_contract_tx 'True' --type bool diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md index 8b8a0d4468..1eb1768963 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md @@ -1,22 +1,22 @@ ``` bash -aea fetch fetchai/tac_controller:0.9.0 +aea fetch fetchai/tac_controller:0.10.0 cd tac_controller aea install ``` ``` bash aea create tac_controller cd tac_controller -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 +aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_control:0.7.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea config set agent.default_ledger fetchai ``` ``` bash -aea fetch fetchai/tac_participant:0.10.0 --alias tac_participant_one -aea fetch fetchai/tac_participant:0.10.0 --alias tac_participant_two +aea fetch fetchai/tac_participant:0.11.0 --alias tac_participant_one +aea fetch fetchai/tac_participant:0.11.0 --alias tac_participant_two cd tac_participant_two aea install ``` @@ -26,24 +26,24 @@ aea create tac_participant_two ``` ``` bash cd tac_participant_one -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/tac_participation:0.8.0 -aea add skill fetchai/tac_negotiation:0.9.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/tac_participation:0.9.0 +aea add skill fetchai/tac_negotiation:0.10.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea config set agent.default_ledger fetchai ``` ``` bash cd tac_participant_two -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/tac_participation:0.8.0 -aea add skill fetchai/tac_negotiation:0.9.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/tac_participation:0.9.0 +aea add skill fetchai/tac_negotiation:0.10.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea config set agent.default_ledger fetchai ``` ``` bash @@ -72,12 +72,12 @@ default_routing: ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-thermometer-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-thermometer-skills.md index 87ce48c0d3..61fe285d41 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-thermometer-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-thermometer-skills.md @@ -1,32 +1,32 @@ ``` bash -aea fetch fetchai/thermometer_aea:0.10.0 --alias my_thermometer_aea +aea fetch fetchai/thermometer_aea:0.11.0 --alias my_thermometer_aea cd thermometer_aea aea install ``` ``` bash aea create my_thermometer_aea cd my_thermometer_aea -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/thermometer:0.11.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/thermometer:0.12.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash -aea fetch fetchai/thermometer_client:0.10.0 --alias my_thermometer_client +aea fetch fetchai/thermometer_client:0.11.0 --alias my_thermometer_client cd my_thermometer_client aea install ``` ``` bash aea create my_thermometer_client cd my_thermometer_client -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/thermometer_client:0.10.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/thermometer_client:0.11.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea generate-key fetchai @@ -54,12 +54,12 @@ aea delete my_thermometer_client ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-weather-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-weather-skills.md index 70577d1cc7..c138469064 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-weather-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-weather-skills.md @@ -1,32 +1,32 @@ ``` bash -aea fetch fetchai/weather_station:0.12.0 --alias my_weather_station +aea fetch fetchai/weather_station:0.13.0 --alias my_weather_station cd my_weather_station aea install ``` ``` bash aea create my_weather_station cd my_weather_station -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/weather_station:0.11.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/weather_station:0.12.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash -aea fetch fetchai/weather_client:0.12.0 --alias my_weather_client +aea fetch fetchai/weather_client:0.13.0 --alias my_weather_client cd my_weather_client aea install ``` ``` bash aea create my_weather_client cd my_weather_client -aea add connection fetchai/p2p_libp2p:0.9.0 +aea add connection fetchai/p2p_libp2p:0.10.0 aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/ledger:0.5.0 -aea add skill fetchai/weather_client:0.10.0 +aea add connection fetchai/ledger:0.6.0 +aea add skill fetchai/weather_client:0.11.0 aea install -aea config set agent.default_connection fetchai/p2p_libp2p:0.9.0 +aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` ``` bash aea generate-key fetchai @@ -54,12 +54,12 @@ aea delete my_weather_client ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.5.0 + fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 ``` ``` yaml diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py index ef0e787577..43c52bda0d 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py @@ -62,7 +62,7 @@ def test_cli_programmatic_communication(self): """Test the communication of the two agents.""" weather_station = "weather_station" - self.fetch_agent("fetchai/weather_station:0.12.0", weather_station) + self.fetch_agent("fetchai/weather_station:0.13.0", weather_station) self.set_agent_context(weather_station) self.set_config( "vendor.fetchai.skills.weather_station.models.strategy.args.is_ledger_tx", diff --git a/tests/test_docs/test_orm_integration/test_orm_integration.py b/tests/test_docs/test_orm_integration/test_orm_integration.py index b96e8f6c44..56f83cf22d 100644 --- a/tests/test_docs/test_orm_integration/test_orm_integration.py +++ b/tests/test_docs/test_orm_integration/test_orm_integration.py @@ -127,7 +127,7 @@ def test_orm_integration_docs_example(self): self.create_agents(seller_aea_name, buyer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -139,15 +139,15 @@ def test_orm_integration_docs_example(self): # Setup seller self.set_agent_context(seller_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/thermometer:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/thermometer:0.12.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) # ejecting changes author and version! - self.eject_item("skill", "fetchai/thermometer:0.11.0") + self.eject_item("skill", "fetchai/thermometer:0.12.0") seller_skill_config_replacement = yaml.safe_load(seller_strategy_replacement) self.force_set_config( "skills.thermometer.models", seller_skill_config_replacement["models"], @@ -185,11 +185,11 @@ def test_orm_integration_docs_example(self): # Setup Buyer self.set_agent_context(buyer_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/thermometer_client:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/thermometer_client:0.11.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) buyer_skill_config_replacement = yaml.safe_load(buyer_strategy_replacement) diff --git a/tests/test_docs/test_skill_guide/test_skill_guide.py b/tests/test_docs/test_skill_guide/test_skill_guide.py index c4a237e5fe..87fcc76cad 100644 --- a/tests/test_docs/test_skill_guide/test_skill_guide.py +++ b/tests/test_docs/test_skill_guide/test_skill_guide.py @@ -76,7 +76,7 @@ def test_update_skill_and_run(self): simple_service_registration_aea = "simple_service_registration" self.fetch_agent( - "fetchai/simple_service_registration:0.12.0", + "fetchai/simple_service_registration:0.13.0", simple_service_registration_aea, ) self.set_agent_context(simple_service_registration_aea) @@ -107,9 +107,9 @@ def test_update_skill_and_run(self): skill_name = "my_search" skill_id = AUTHOR + "/" + skill_name + ":" + DEFAULT_VERSION self.scaffold_item("skill", skill_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) 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 756d7f3fc5..88bb315259 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 @@ -85,7 +85,7 @@ async def test_erc1155_get_deploy_transaction(erc1155_contract, ledger_apis_conn counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", callable="get_deploy_transaction", kwargs=ContractApiMessage.Kwargs({"deployer_address": address}), ) @@ -126,7 +126,7 @@ async def test_erc1155_get_raw_transaction(erc1155_contract, ledger_apis_connect counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=contract_address, callable="get_create_batch_transaction", kwargs=ContractApiMessage.Kwargs( @@ -171,7 +171,7 @@ async def test_erc1155_get_raw_message(erc1155_contract, ledger_apis_connection) counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_RAW_MESSAGE, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=contract_address, callable="get_hash_single", kwargs=ContractApiMessage.Kwargs( @@ -223,7 +223,7 @@ async def test_erc1155_get_state(erc1155_contract, ledger_apis_connection): counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_STATE, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=contract_address, callable="get_balance", kwargs=ContractApiMessage.Kwargs( @@ -268,7 +268,7 @@ def _raise(): counterparty="str(ledger_apis_connection.connection_id)", performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address="test addr", callable="get_create_batch_transaction", kwargs=ContractApiMessage.Kwargs( @@ -313,7 +313,7 @@ async def test_callable_wrong_number_of_arguments_api_and_contract_address( counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_STATE, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=contract_address, callable="get_balance", kwargs=ContractApiMessage.Kwargs( @@ -365,7 +365,7 @@ async def test_callable_wrong_number_of_arguments_apis( counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", callable="get_deploy_transaction", kwargs=ContractApiMessage.Kwargs({}), ) @@ -418,7 +418,7 @@ async def test_callable_wrong_number_of_arguments_apis_method_call( counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", callable="get_deploy_transaction", kwargs=ContractApiMessage.Kwargs({}), ) @@ -454,7 +454,7 @@ async def test_callable_generic_error(erc1155_contract, ledger_apis_connection): counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_STATE, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=contract_address, callable="get_balance", kwargs=ContractApiMessage.Kwargs( @@ -499,7 +499,7 @@ async def test_callable_cannot_find(erc1155_contract, ledger_apis_connection, ca counterparty=str(ledger_apis_connection.connection_id), performative=ContractApiMessage.Performative.GET_STATE, ledger_id=ETHEREUM, - contract_id="fetchai/erc1155:0.9.0", + contract_id="fetchai/erc1155:0.10.0", contract_address=contract_address, callable="unknown_callable", kwargs=ContractApiMessage.Kwargs( diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py index c1e9f70ea2..d31a3afbce 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py @@ -44,8 +44,8 @@ def setup_class(cls): @libp2p_log_on_failure def test_agent(self): """Test with aea.""" - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") # for logging config_path = "vendor.fetchai.connections.p2p_libp2p.config" @@ -89,7 +89,7 @@ def setup_class(cls): @libp2p_log_on_failure def test_agent(self): """Test with aea.""" - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") # setup a full node: with public uri, relay service, and delegate service config_path = "vendor.fetchai.connections.p2p_libp2p.config" diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py index 831d56a466..08838b121a 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py @@ -355,8 +355,8 @@ class TestLibp2pConnectionPublicDHTRelayAEACli(AEATestCaseEmpty): @libp2p_log_on_failure def test_connectivity(self): """Test connectivity.""" - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") config_path = "vendor.fetchai.connections.p2p_libp2p.config" self.set_config( @@ -401,7 +401,7 @@ class TestLibp2pConnectionPublicDHTDelegateAEACli(AEATestCaseEmpty): def test_connectivity(self): """Test connectivity.""" - self.add_item("connection", "fetchai/p2p_libp2p_client:0.6.0") + self.add_item("connection", "fetchai/p2p_libp2p_client:0.7.0") config_path = "vendor.fetchai.connections.p2p_libp2p_client.config" self.force_set_config( "{}.nodes".format(config_path), diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py index 6ad8a42aaa..fc3c87b396 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py @@ -61,7 +61,7 @@ def test_node(self): def test_connection(self): """Test the connection can be used in an aea.""" - self.add_item("connection", "fetchai/p2p_libp2p_client:0.6.0") + self.add_item("connection", "fetchai/p2p_libp2p_client:0.7.0") config_path = "vendor.fetchai.connections.p2p_libp2p_client.config" self.force_set_config( "{}.nodes".format(config_path), diff --git a/tests/test_packages/test_skills/test_carpark.py b/tests/test_packages/test_skills/test_carpark.py index 2297c45339..a95f7128b1 100644 --- a/tests/test_packages/test_skills/test_carpark.py +++ b/tests/test_packages/test_skills/test_carpark.py @@ -51,7 +51,7 @@ def test_carpark(self): self.create_agents(carpark_aea_name, carpark_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -63,11 +63,11 @@ def test_carpark(self): # Setup agent one self.set_agent_context(carpark_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/carpark_detection:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/carpark_detection:0.12.0") setting_path = ( "vendor.fetchai.skills.carpark_detection.models.strategy.args.is_ledger_tx" ) @@ -98,11 +98,11 @@ def test_carpark(self): # Setup agent two self.set_agent_context(carpark_client_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/carpark_client:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/carpark_client:0.12.0") setting_path = ( "vendor.fetchai.skills.carpark_client.models.strategy.args.is_ledger_tx" ) @@ -226,7 +226,7 @@ def test_carpark(self): self.create_agents(carpark_aea_name, carpark_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -238,17 +238,17 @@ def test_carpark(self): # Setup agent one self.set_agent_context(carpark_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/carpark_detection:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/carpark_detection:0.12.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/car_detector:0.12.0", carpark_aea_name + "fetchai/car_detector:0.13.0", carpark_aea_name ) assert ( diff == [] @@ -276,17 +276,17 @@ def test_carpark(self): # Setup agent two self.set_agent_context(carpark_client_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/carpark_client:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/carpark_client:0.12.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/car_data_buyer:0.12.0", carpark_client_aea_name + "fetchai/car_data_buyer:0.13.0", carpark_client_aea_name ) assert ( diff == [] diff --git a/tests/test_packages/test_skills/test_erc1155.py b/tests/test_packages/test_skills/test_erc1155.py index af88f06e0f..f785a87681 100644 --- a/tests/test_packages/test_skills/test_erc1155.py +++ b/tests/test_packages/test_skills/test_erc1155.py @@ -56,8 +56,8 @@ def test_generic(self): # add ethereum ledger in both configuration files default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", - "fetchai/contract_api:0.4.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", + "fetchai/contract_api:0.5.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -69,17 +69,17 @@ def test_generic(self): # add packages for agent one self.set_agent_context(deploy_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.set_config("agent.default_ledger", ETHEREUM) setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) - self.add_item("skill", "fetchai/erc1155_deploy:0.13.0") + self.add_item("skill", "fetchai/erc1155_deploy:0.14.0") diff = self.difference_to_fetched_agent( - "fetchai/erc1155_deployer:0.13.0", deploy_aea_name + "fetchai/erc1155_deployer:0.14.0", deploy_aea_name ) assert ( diff == [] @@ -113,17 +113,17 @@ def test_generic(self): # add packages for agent two self.set_agent_context(client_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.set_config("agent.default_ledger", ETHEREUM) setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) - self.add_item("skill", "fetchai/erc1155_client:0.12.0") + self.add_item("skill", "fetchai/erc1155_client:0.13.0") diff = self.difference_to_fetched_agent( - "fetchai/erc1155_client:0.13.0", client_aea_name + "fetchai/erc1155_client:0.14.0", client_aea_name ) assert ( diff == [] diff --git a/tests/test_packages/test_skills/test_generic.py b/tests/test_packages/test_skills/test_generic.py index 180edafc9f..d320798742 100644 --- a/tests/test_packages/test_skills/test_generic.py +++ b/tests/test_packages/test_skills/test_generic.py @@ -50,7 +50,7 @@ def test_generic(self, pytestconfig): self.create_agents(seller_aea_name, buyer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -62,11 +62,11 @@ def test_generic(self, pytestconfig): # prepare seller agent self.set_agent_context(seller_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/generic_seller:0.12.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/generic_seller:0.13.0") setting_path = ( "vendor.fetchai.skills.generic_seller.models.strategy.args.is_ledger_tx" ) @@ -101,11 +101,11 @@ def test_generic(self, pytestconfig): # prepare buyer agent self.set_agent_context(buyer_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/generic_buyer:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/generic_buyer:0.12.0") setting_path = ( "vendor.fetchai.skills.generic_buyer.models.strategy.args.is_ledger_tx" ) @@ -231,7 +231,7 @@ def test_generic(self, pytestconfig): self.create_agents(seller_aea_name, buyer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -243,17 +243,17 @@ def test_generic(self, pytestconfig): # prepare seller agent self.set_agent_context(seller_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/generic_seller:0.12.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/generic_seller:0.13.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/generic_seller:0.9.0", seller_aea_name + "fetchai/generic_seller:0.10.0", seller_aea_name ) assert ( diff == [] @@ -285,17 +285,17 @@ def test_generic(self, pytestconfig): # prepare buyer agent self.set_agent_context(buyer_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/generic_buyer:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/generic_buyer:0.12.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/generic_buyer:0.9.0", buyer_aea_name + "fetchai/generic_buyer:0.10.0", buyer_aea_name ) assert ( diff == [] diff --git a/tests/test_packages/test_skills/test_gym.py b/tests/test_packages/test_skills/test_gym.py index 3a9bd4e173..1d2126cf88 100644 --- a/tests/test_packages/test_skills/test_gym.py +++ b/tests/test_packages/test_skills/test_gym.py @@ -33,16 +33,16 @@ class TestGymSkill(AEATestCaseEmpty): def test_gym(self): """Run the gym skill sequence.""" - self.add_item("skill", "fetchai/gym:0.7.0") - self.add_item("connection", "fetchai/gym:0.7.0") + self.add_item("skill", "fetchai/gym:0.8.0") + self.add_item("connection", "fetchai/gym:0.8.0") self.run_install() # change default connection setting_path = "agent.default_connection" - self.set_config(setting_path, "fetchai/gym:0.7.0") + self.set_config(setting_path, "fetchai/gym:0.8.0") diff = self.difference_to_fetched_agent( - "fetchai/gym_aea:0.10.0", self.agent_name + "fetchai/gym_aea:0.11.0", self.agent_name ) assert ( diff == [] diff --git a/tests/test_packages/test_skills/test_ml_skills.py b/tests/test_packages/test_skills/test_ml_skills.py index db6bff20b6..3ed1c80747 100644 --- a/tests/test_packages/test_skills/test_ml_skills.py +++ b/tests/test_packages/test_skills/test_ml_skills.py @@ -64,7 +64,7 @@ def test_ml_skills(self, pytestconfig): self.create_agents(data_provider_aea_name, model_trainer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -76,11 +76,11 @@ def test_ml_skills(self, pytestconfig): # prepare data provider agent self.set_agent_context(data_provider_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/ml_data_provider:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/ml_data_provider:0.12.0") setting_path = ( "vendor.fetchai.skills.ml_data_provider.models.strategy.args.is_ledger_tx" ) @@ -111,11 +111,11 @@ def test_ml_skills(self, pytestconfig): # prepare model trainer agent self.set_agent_context(model_trainer_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/ml_train:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/ml_train:0.12.0") setting_path = ( "vendor.fetchai.skills.ml_train.models.strategy.args.is_ledger_tx" ) @@ -241,7 +241,7 @@ def test_ml_skills(self, pytestconfig): self.create_agents(data_provider_aea_name, model_trainer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -253,17 +253,17 @@ def test_ml_skills(self, pytestconfig): # prepare data provider agent self.set_agent_context(data_provider_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/ml_data_provider:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/ml_data_provider:0.12.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/ml_data_provider:0.12.0", data_provider_aea_name + "fetchai/ml_data_provider:0.13.0", data_provider_aea_name ) assert ( diff == [] @@ -291,17 +291,17 @@ def test_ml_skills(self, pytestconfig): # prepare model trainer agent self.set_agent_context(model_trainer_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/ml_train:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/ml_train:0.12.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/ml_model_trainer:0.12.0", model_trainer_aea_name + "fetchai/ml_model_trainer:0.13.0", model_trainer_aea_name ) assert ( diff == [] diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index f2f6a5d0d2..a2397ffcbc 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -66,8 +66,8 @@ def test_tac(self): # prepare tac controller for test self.set_agent_context(tac_controller_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") self.add_item("skill", "fetchai/tac_control:0.7.0") self.set_config("agent.default_ledger", FETCHAI) @@ -76,7 +76,7 @@ def test_tac(self): self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/tac_controller:0.9.0", tac_controller_name + "fetchai/tac_controller:0.10.0", tac_controller_name ) assert ( diff == [] @@ -96,7 +96,7 @@ def test_tac(self): self.force_set_config(setting_path, COSMOS) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -106,18 +106,18 @@ def test_tac(self): (tac_aea_two, NON_GENESIS_CONFIG_TWO), ): self.set_agent_context(agent_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/tac_participation:0.8.0") - self.add_item("skill", "fetchai/tac_negotiation:0.9.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/tac_participation:0.9.0") + self.add_item("skill", "fetchai/tac_negotiation:0.10.0") self.set_config("agent.default_ledger", FETCHAI) setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/tac_participant:0.10.0", agent_name + "fetchai/tac_participant:0.11.0", agent_name ) assert ( diff == [] @@ -277,14 +277,14 @@ def test_tac(self): # prepare tac controller for test self.set_agent_context(tac_controller_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("skill", "fetchai/tac_control_contract:0.8.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("skill", "fetchai/tac_control_contract:0.9.0") self.set_config("agent.default_ledger", ETHEREUM) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/tac_controller_contract:0.10.0", tac_controller_name + "fetchai/tac_controller_contract:0.11.0", tac_controller_name ) assert ( diff == [] @@ -302,10 +302,10 @@ def test_tac(self): (FUNDED_ETH_PRIVATE_KEY_2, FUNDED_ETH_PRIVATE_KEY_3), ): self.set_agent_context(agent_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("skill", "fetchai/tac_participation:0.8.0") - self.add_item("skill", "fetchai/tac_negotiation:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("skill", "fetchai/tac_participation:0.9.0") + self.add_item("skill", "fetchai/tac_negotiation:0.10.0") self.set_config("agent.default_ledger", ETHEREUM) self.set_config( "vendor.fetchai.skills.tac_participation.models.game.args.is_using_contract", @@ -319,7 +319,7 @@ def test_tac(self): ) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/tac_participant:0.10.0", agent_name + "fetchai/tac_participant:0.11.0", agent_name ) assert ( diff == [] @@ -339,7 +339,7 @@ def test_tac(self): setting_path = "vendor.fetchai.skills.tac_control_contract.models.parameters.args.start_time" self.set_config(setting_path, start_time) tac_controller_process = self.run_agent( - "--connections", "fetchai/p2p_libp2p:0.9.0" + "--connections", "fetchai/p2p_libp2p:0.10.0" ) check_strings = ( @@ -359,12 +359,12 @@ def test_tac(self): # run two participants as well self.set_agent_context(tac_aea_one) tac_aea_one_process = self.run_agent( - "--connections", "fetchai/p2p_libp2p:0.9.0" + "--connections", "fetchai/p2p_libp2p:0.10.0" ) self.set_agent_context(tac_aea_two) tac_aea_two_process = self.run_agent( - "--connections", "fetchai/p2p_libp2p:0.9.0" + "--connections", "fetchai/p2p_libp2p:0.10.0" ) check_strings = ( diff --git a/tests/test_packages/test_skills/test_thermometer.py b/tests/test_packages/test_skills/test_thermometer.py index 99408af8d9..0d87abf663 100644 --- a/tests/test_packages/test_skills/test_thermometer.py +++ b/tests/test_packages/test_skills/test_thermometer.py @@ -51,7 +51,7 @@ def test_thermometer(self): self.create_agents(thermometer_aea_name, thermometer_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -63,11 +63,11 @@ def test_thermometer(self): # add packages for agent one and run it self.set_agent_context(thermometer_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/thermometer:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/thermometer:0.12.0") setting_path = ( "vendor.fetchai.skills.thermometer.models.strategy.args.is_ledger_tx" ) @@ -95,11 +95,11 @@ def test_thermometer(self): # add packages for agent two and run it self.set_agent_context(thermometer_client_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/thermometer_client:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/thermometer_client:0.11.0") setting_path = ( "vendor.fetchai.skills.thermometer_client.models.strategy.args.is_ledger_tx" ) @@ -227,7 +227,7 @@ def test_thermometer(self): self.create_agents(thermometer_aea_name, thermometer_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -239,17 +239,17 @@ def test_thermometer(self): # add packages for agent one and run it self.set_agent_context(thermometer_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/thermometer:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/thermometer:0.12.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/thermometer_aea:0.10.0", thermometer_aea_name + "fetchai/thermometer_aea:0.11.0", thermometer_aea_name ) assert ( diff == [] @@ -274,17 +274,17 @@ def test_thermometer(self): # add packages for agent two and run it self.set_agent_context(thermometer_client_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/thermometer_client:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/thermometer_client:0.11.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/thermometer_client:0.10.0", thermometer_client_aea_name + "fetchai/thermometer_client:0.11.0", thermometer_client_aea_name ) assert ( diff == [] diff --git a/tests/test_packages/test_skills/test_weather.py b/tests/test_packages/test_skills/test_weather.py index c514486ac3..76f159df7a 100644 --- a/tests/test_packages/test_skills/test_weather.py +++ b/tests/test_packages/test_skills/test_weather.py @@ -50,7 +50,7 @@ def test_weather(self): self.create_agents(weather_station_aea_name, weather_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -62,12 +62,12 @@ def test_weather(self): # prepare agent one (weather station) self.set_agent_context(weather_station_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/weather_station:0.11.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/weather_station:0.12.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") dotted_path = ( "vendor.fetchai.skills.weather_station.models.strategy.args.is_ledger_tx" ) @@ -97,12 +97,12 @@ def test_weather(self): # prepare agent two (weather client) self.set_agent_context(weather_client_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/weather_client:0.10.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/weather_client:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") dotted_path = ( "vendor.fetchai.skills.weather_client.models.strategy.args.is_ledger_tx" ) @@ -222,7 +222,7 @@ def test_weather(self): self.create_agents(weather_station_aea_name, weather_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.5.0", + "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", } @@ -234,17 +234,17 @@ def test_weather(self): # add packages for agent one self.set_agent_context(weather_station_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/weather_station:0.11.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/weather_station:0.12.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/weather_station:0.12.0", weather_station_aea_name + "fetchai/weather_station:0.13.0", weather_station_aea_name ) assert ( diff == [] @@ -271,17 +271,17 @@ def test_weather(self): # add packages for agent two self.set_agent_context(weather_client_aea_name) - self.add_item("connection", "fetchai/p2p_libp2p:0.9.0") + self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/soef:0.8.0") - self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.9.0") - self.add_item("connection", "fetchai/ledger:0.5.0") - self.add_item("skill", "fetchai/weather_client:0.10.0") + self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/ledger:0.6.0") + self.add_item("skill", "fetchai/weather_client:0.11.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/weather_client:0.12.0", weather_client_aea_name + "fetchai/weather_client:0.13.0", weather_client_aea_name ) assert ( diff == [] diff --git a/tests/test_registries/test_base.py b/tests/test_registries/test_base.py index 29f86eacec..35c145764a 100644 --- a/tests/test_registries/test_base.py +++ b/tests/test_registries/test_base.py @@ -80,7 +80,7 @@ def setup_class(cls): cls.registry = AgentComponentRegistry() cls.registry.register(contract.component_id, cast(Contract, contract)) cls.expected_contract_ids = { - PublicId.from_str("fetchai/erc1155:0.9.0"), + PublicId.from_str("fetchai/erc1155:0.10.0"), } def test_fetch_all(self): @@ -91,14 +91,14 @@ def test_fetch_all(self): def test_fetch(self): """Test that the `fetch` method works as expected.""" - contract_id = PublicId.from_str("fetchai/erc1155:0.9.0") + contract_id = PublicId.from_str("fetchai/erc1155:0.10.0") contract = self.registry.fetch(ComponentId(ComponentType.CONTRACT, contract_id)) assert isinstance(contract, Contract) assert contract.id == contract_id def test_unregister(self): """Test that the 'unregister' method works as expected.""" - contract_id_removed = PublicId.from_str("fetchai/erc1155:0.9.0") + contract_id_removed = PublicId.from_str("fetchai/erc1155:0.10.0") component_id = ComponentId(ComponentType.CONTRACT, contract_id_removed) contract_removed = self.registry.fetch(component_id) self.registry.unregister(contract_removed.component_id) @@ -243,7 +243,7 @@ def setup_class(cls): cls.error_skill_public_id = DEFAULT_SKILL cls.dummy_skill_public_id = PublicId.from_str("dummy_author/dummy:0.1.0") - cls.contract_public_id = PublicId.from_str("fetchai/erc1155:0.9.0") + cls.contract_public_id = PublicId.from_str("fetchai/erc1155:0.10.0") def test_unregister_handler(self): """Test that the unregister of handlers work correctly.""" From ab2a4f335292e3a75127a5f921fcea5ebb8ecc64 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Fri, 18 Sep 2020 00:15:54 +0100 Subject: [PATCH 011/131] fix broken tests --- docs/agent-vs-aea.md | 9 +++++++++ tests/test_cli_gui/test_get_items.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/agent-vs-aea.md b/docs/agent-vs-aea.md index 354a7c09ae..a49868c25d 100644 --- a/docs/agent-vs-aea.md +++ b/docs/agent-vs-aea.md @@ -186,12 +186,20 @@ class MyAgent(Agent): super().__init__(identity, connections) def setup(self): + """Setup the agent.""" pass def act(self): + """Act implementation.""" print("Act called for tick {}".format(self.tick)) def handle_envelope(self, envelope: Envelope) -> None: + """ + Handle envelope. + + :param envelope: the envelope received + :return: None + """ print("React called for tick {}".format(self.tick)) if envelope is not None and envelope.protocol_id == DefaultMessage.protocol_id: sender = envelope.sender @@ -209,6 +217,7 @@ class MyAgent(Agent): self.outbox.put(envelope) def teardown(self): + """Teardown the agent.""" pass diff --git a/tests/test_cli_gui/test_get_items.py b/tests/test_cli_gui/test_get_items.py index 9d2a850eb6..3522a5cae0 100644 --- a/tests/test_cli_gui/test_get_items.py +++ b/tests/test_cli_gui/test_get_items.py @@ -94,4 +94,4 @@ def test_get_local_items_negative(self, *mocks): result = json.loads(response.get_data(as_text=True)) expected_result = "Failed to list agent items." - self.assertEqual(result["detail"], expected_result) + self.assertEqual(result[0]["detail"], expected_result) From 9f1c9cc3703b9cba333186a4eb909a67f4a1b77b Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Sat, 19 Sep 2020 20:47:01 +0100 Subject: [PATCH 012/131] part 1 of refactoring tac_control_*, removing duplicate code --- .../fetchai/protocols/contract_api/README.md | 2 +- packages/fetchai/protocols/gym/README.md | 2 +- .../fetchai/skills/tac_control/behaviours.py | 1 + packages/fetchai/skills/tac_control/game.py | 24 +- .../fetchai/skills/tac_control/helpers.py | 80 +- .../fetchai/skills/tac_control/parameters.py | 156 ++- .../fetchai/skills/tac_control/skill.yaml | 3 +- .../skills/tac_control_contract/behaviours.py | 304 ++---- .../skills/tac_control_contract/dialogues.py | 59 ++ .../skills/tac_control_contract/game.py | 899 +----------------- .../skills/tac_control_contract/handlers.py | 187 +--- .../skills/tac_control_contract/helpers.py | 321 ------- .../skills/tac_control_contract/parameters.py | 212 +---- .../skills/tac_control_contract/skill.yaml | 25 +- 14 files changed, 451 insertions(+), 1824 deletions(-) create mode 100644 packages/fetchai/skills/tac_control_contract/dialogues.py delete mode 100644 packages/fetchai/skills/tac_control_contract/helpers.py diff --git a/packages/fetchai/protocols/contract_api/README.md b/packages/fetchai/protocols/contract_api/README.md index 19ea53f3d3..532ccff9b0 100644 --- a/packages/fetchai/protocols/contract_api/README.md +++ b/packages/fetchai/protocols/contract_api/README.md @@ -10,7 +10,7 @@ This is a protocol for contract APIs' requests and responses. --- name: contract_api author: fetchai -version: 0.4.0 +version: 0.5.0 description: A protocol for contract APIs requests and responses. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/packages/fetchai/protocols/gym/README.md b/packages/fetchai/protocols/gym/README.md index 53f7d0095a..791f5a109b 100644 --- a/packages/fetchai/protocols/gym/README.md +++ b/packages/fetchai/protocols/gym/README.md @@ -10,7 +10,7 @@ This is a protocol for interacting with a gym connection. --- name: gym author: fetchai -version: 0.5.0 +version: 0.6.0 description: A protocol for interacting with a gym connection. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/packages/fetchai/skills/tac_control/behaviours.py b/packages/fetchai/skills/tac_control/behaviours.py index 50df1bcc61..658d9e41fd 100644 --- a/packages/fetchai/skills/tac_control/behaviours.py +++ b/packages/fetchai/skills/tac_control/behaviours.py @@ -205,6 +205,7 @@ def _start_tac(self, game: Game): agent_addr_to_name=game.conf.agent_addr_to_name, good_id_to_name=game.conf.good_id_to_name, version_id=game.conf.version_id, + info={"contract_address": game.conf.contract_address}, ) self.context.outbox.put_message(message=tac_msg) self.context.logger.debug( diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index 99cd613e18..d3624c88d0 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -45,11 +45,9 @@ from packages.fetchai.skills.tac_control.helpers import ( determine_scaling_factor, generate_currency_endowments, - generate_currency_id_to_name, generate_equilibrium_prices_and_holdings, generate_exchange_params, generate_good_endowments, - generate_good_id_to_name, generate_utility_params, ) from packages.fetchai.skills.tac_control.parameters import Parameters @@ -72,10 +70,20 @@ class Phase(Enum): """This class defines the phases of the game.""" PRE_GAME = "pre_game" + CONTRACT_DEPLOYMENT_PROPOSAL = "contract_deployment_proposal" + CONTRACT_DEPLOYING = "contract_deploying" + CONTRACT_DEPLOYED = "contract_deployed" GAME_REGISTRATION = "game_registration" GAME_SETUP = "game_setup" + TOKENS_CREATION_PROPOSAL = "token_creation_proposal" # nosec + TOKENS_CREATING = "tokens_creating" + TOKENS_CREATED = "tokens_created" # nosec + TOKENS_MINTING_PROPOSAL = "token_minting_proposal" + TOKENS_MINTING = "token_minting" # nosec + TOKENS_MINTED = "tokens_minted" # nosec GAME = "game" POST_GAME = "post_game" + CANCELLED_GAME = "cancelled_game" class Configuration: @@ -86,7 +94,8 @@ def __init__( version_id: str, tx_fee: int, agent_addr_to_name: Dict[Address, str], - nb_goods: int, + currency_id_to_name: Dict[str, str], + good_id_to_name: Dict[str, str], ): """ Instantiate a game configuration. @@ -95,12 +104,13 @@ def __init__( :param tx_fee: the fee for a transaction. :param agent_addr_to_name: a dictionary mapping agent addresses to agent names (as strings). :param nb_goods: the number of goods. + :param nb_currencies: the number of currencies. """ self._version_id = version_id self._tx_fee = tx_fee self._agent_addr_to_name = agent_addr_to_name - self._currency_id_to_name = generate_currency_id_to_name() - self._good_id_to_name = generate_good_id_to_name(nb_goods) + self._currency_id_to_name = currency_id_to_name + self._good_id_to_name = good_id_to_name self._check_consistency() @property @@ -724,6 +734,7 @@ def phase(self) -> Phase: @phase.setter def phase(self, phase: Phase) -> None: """Set the game phase.""" + self.context.logger.debug("Game phase set to: {}".format(phase)) self._phase = phase @property @@ -778,7 +789,8 @@ def _generate(self): parameters.version_id, parameters.tx_fee, self.registration.agent_addr_to_name, - parameters.nb_goods, + parameters.currency_id_to_name, + parameters.good_id_to_name, ) scaling_factor = determine_scaling_factor(parameters.money_endowment) diff --git a/packages/fetchai/skills/tac_control/helpers.py b/packages/fetchai/skills/tac_control/helpers.py index fbe56fa922..1e830f35ad 100644 --- a/packages/fetchai/skills/tac_control/helpers.py +++ b/packages/fetchai/skills/tac_control/helpers.py @@ -20,37 +20,93 @@ """This module contains the helpers methods for the controller agent.""" -import math import random -from typing import Dict, List, Tuple, cast +from typing import Dict, List, Optional, Tuple, cast import numpy as np from aea.exceptions import enforce +from packages.fetchai.contracts.erc1155.contract import ERC1155Contract + QUANTITY_SHIFT = 1 # Any non-negative integer is fine. -DEFAULT_CURRENCY_ID_TO_NAME = {"0": "FET"} +FT_NAME = "FT" +FT_ID = 2 -def generate_currency_id_to_name() -> Dict[str, str]: +def generate_good_ids(nb_goods: int) -> List[int]: """ - Generate ids for currencies. + Generate ids for things. - :return: a dictionary mapping currency' ids to names. + :param nb_goods: the number of things. + :param contract: the instance of the contract """ - return DEFAULT_CURRENCY_ID_TO_NAME + good_ids = ERC1155Contract.generate_token_ids(FT_ID, nb_goods) + enforce( + len(good_ids) == nb_goods, "Length of good ids and number of goods must match." + ) + return good_ids -def generate_good_id_to_name(nb_goods: int) -> Dict[str, str]: +def generate_currency_ids(nb_currencies: int) -> List[int]: """ - Generate ids for things. + Generate currency ids. + + :param nb_currencies: the number of currencies. + :param contract: the instance of the contract. + """ + currency_ids = ERC1155Contract.generate_token_ids(FT_ID, nb_currencies) + enforce( + len(currency_ids) == nb_currencies, + "Length of currency ids and number of currencies must match.", + ) + return currency_ids + + +def generate_currency_id_to_name( + nb_currencies: int, currency_ids: Optional[List[int]] = None +) -> Dict[str, str]: + """ + Generate a dictionary mapping good ids to names. + + :param nb_currencies: the number of currencies. + :param currency_ids: the currency ids + :return: a dictionary mapping currency's ids to names. + """ + if currency_ids is not None: + enforce( + len(currency_ids) == nb_currencies, + "Length of currency_ids does not match nb_currencies.", + ) + else: + currency_ids = generate_currency_ids(nb_currencies) + currency_id_to_name = { + str(currency_id): "{}_{}".format(FT_NAME, currency_id) + for currency_id in currency_ids + } + return currency_id_to_name + + +def generate_good_id_to_name( + nb_goods: int, good_ids: Optional[List[int]] = None +) -> Dict[str, str]: + """ + Generate a dictionary mapping good ids to names. :param nb_goods: the number of things. + :param good_ids: a list of good ids :return: a dictionary mapping goods' ids to names. """ - max_number_of_digits = math.ceil(math.log10(nb_goods)) - string_format = "tac_good_{:0" + str(max_number_of_digits) + "}" - return {str(i + 1): string_format.format(i + 1) for i in range(nb_goods)} + if good_ids is not None: + enforce( + len(good_ids) == nb_goods, "Length of good_ids does not match nb_goods." + ) + else: + good_ids = generate_good_ids(nb_goods) + good_id_to_name = { + str(good_id): "{}_{}".format(FT_NAME, good_id) for good_id in good_ids + } + return good_id_to_name def determine_scaling_factor(money_endowment: int) -> float: diff --git a/packages/fetchai/skills/tac_control/parameters.py b/packages/fetchai/skills/tac_control/parameters.py index 8198910907..a93b1b2ab1 100644 --- a/packages/fetchai/skills/tac_control/parameters.py +++ b/packages/fetchai/skills/tac_control/parameters.py @@ -20,12 +20,30 @@ """This package contains a class representing the game parameters.""" import datetime -from typing import Dict, Set +from typing import Dict, List, Optional, Set -from aea.exceptions import enforce -from aea.helpers.search.models import Location +from aea.exceptions import AEAEnforceError, enforce +from aea.helpers.search.models import ( + Location, +) from aea.skills.base import Model +from packages.fetchai.skills.tac_control.helpers import generate_currency_id_to_name, generate_good_id_to_name + +DEFAULT_LEDGER_ID = "ethereum" +DEFAULT_MIN_NB_AGENTS = 2 +DEFAULT_MONEY_ENDOWMENT = 200 +DEFAULT_NB_GOODS = 9 # ERC1155 vyper contract only accepts 10 tokens per mint/create +DEFAULT_NB_CURRENCIES = 1 +DEFAULT_TX_FEE = 1 +DEFAULT_BASE_GOOD_ENDOWMENT = 2 +DEFAULT_LOWER_BOUND_FACTOR = 1 +DEFAULT_UPPER_BOUND_FACTOR = 1 +DEFAULT_START_TIME = "01 01 2020 00:01" +DEFAULT_REGISTRATION_TIMEOUT = 60 +DEFAULT_ITEM_SETUP_TIMEOUT = 60 +DEFAULT_COMPETITION_TIMEOUT = 300 +DEFAULT_INACTIVITY_TIMEOUT = 30 DEFAULT_LOCATION = {"longitude": 51.5194, "latitude": 0.1270} DEFAULT_SERVICE_DATA = {"key": "tac", "value": "v1"} @@ -35,20 +53,50 @@ class Parameters(Model): def __init__(self, **kwargs): """Instantiate the search class.""" - self._min_nb_agents = kwargs.pop("min_nb_agents", 5) # type: int - self._money_endowment = kwargs.pop("money_endowment", 200) # type: int - self._nb_goods = kwargs.pop("nb_goods", 5) # type: int - self._tx_fee = kwargs.pop("tx_fee", 1) - self._base_good_endowment = kwargs.pop("base_good_endowment", 2) # type: int - self._lower_bound_factor = kwargs.pop("lower_bound_factor", 1) # type: int - self._upper_bound_factor = kwargs.pop("upper_bound_factor", 1) # type: int - start_time = kwargs.pop("start_time", "01 01 2020 00:01") # type: str + self._ledger_id = kwargs.pop("ledger_id", DEFAULT_LEDGER_ID) + self._contract_address = kwargs.pop( + "contract_adress", None + ) # type: Optional[str] + self._good_ids = kwargs.pop("good_ids", None) # type: Optional[List[int]] + self._currency_ids = kwargs.pop( + "currency_ids", None + ) # type: Optional[List[int]] + self._min_nb_agents = kwargs.pop( + "min_nb_agents", DEFAULT_MIN_NB_AGENTS + ) # type: int + self._money_endowment = kwargs.pop( + "money_endowment", DEFAULT_MONEY_ENDOWMENT + ) # type: int + self._nb_goods = kwargs.pop("nb_goods", DEFAULT_NB_GOODS) # type: int + self._nb_currencies = kwargs.pop( + "nb_currencies", DEFAULT_NB_CURRENCIES + ) # type: int + self._tx_fee = kwargs.pop("tx_fee", DEFAULT_TX_FEE) # type: int + self._base_good_endowment = kwargs.pop( + "base_good_endowment", DEFAULT_BASE_GOOD_ENDOWMENT + ) # type: int + self._lower_bound_factor = kwargs.pop( + "lower_bound_factor", DEFAULT_LOWER_BOUND_FACTOR + ) # type: int + self._upper_bound_factor = kwargs.pop( + "upper_bound_factor", DEFAULT_UPPER_BOUND_FACTOR + ) # type: int + start_time = kwargs.pop("start_time", DEFAULT_START_TIME) # type: str self._start_time = datetime.datetime.strptime( start_time, "%d %m %Y %H:%M" ) # type: datetime.datetime - self._registration_timeout = kwargs.pop("registration_timeout", 10) # type: int - self._competition_timeout = kwargs.pop("competition_timeout", 20) # type: int - self._inactivity_timeout = kwargs.pop("inactivity_timeout", 10) # type: int + self._registration_timeout = kwargs.pop( + "registration_timeout", DEFAULT_REGISTRATION_TIMEOUT + ) # type: int + self._item_setup_timeout = kwargs.pop( + "item_setup_timeout", DEFAULT_ITEM_SETUP_TIMEOUT + ) # type: int + self._competition_timeout = kwargs.pop( + "competition_timeout", DEFAULT_COMPETITION_TIMEOUT + ) # type: int + self._inactivity_timeout = kwargs.pop( + "inactivity_timeout", DEFAULT_INACTIVITY_TIMEOUT + ) # type: int self._whitelist = set(kwargs.pop("whitelist", [])) # type: Set[str] self._location = kwargs.pop("location", DEFAULT_LOCATION) self._service_data = kwargs.pop("service_data", DEFAULT_SERVICE_DATA) @@ -72,19 +120,55 @@ def __init__(self, **kwargs): } super().__init__(**kwargs) + self._currency_id_to_name = generate_currency_id_to_name( + self.nb_currencies, self.currency_ids + ) + self._good_id_to_name = generate_good_id_to_name(self.nb_goods, self.good_ids) now = datetime.datetime.now() if now > self.registration_start_time: self.context.logger.warning( - "TAC registration start time {} is in the past!".format( + "TAC registration start time {} is in the past! Deregistering skill.".format( self.registration_start_time ) ) + self.context.is_active = False else: self.context.logger.info( - "TAC registation start time: {}, and start time: {}, and end time: {}".format( - self.registration_start_time, self.start_time, self.end_time, + "TAC registation start time: {}, and registration end time: {}, and start time: {}, and end time: {}".format( + self.registration_start_time, + self.registration_end_time, + self.start_time, + self.end_time, ) ) + self._check_consistency() + + @property + def ledger_id(self) -> str: + """Get the ledger identifier.""" + return self._ledger_id + + @property + def contract_address(self) -> str: + """The contract address of an already deployed smart-contract.""" + if self._contract_address is None: + raise AEAEnforceError("No contract address provided.") + return self._contract_address + + @property + def is_contract_deployed(self) -> bool: + """Check if there is a deployed instance of the contract.""" + return self._contract_address is not None + + @property + def good_ids(self) -> Optional[List[int]]: + """The item ids of an already deployed smart-contract.""" + return self._good_ids + + @property + def currency_ids(self) -> Optional[List[int]]: + """The currency ids of an already deployed smart-contract.""" + return self._currency_ids @property def min_nb_agents(self) -> int: @@ -101,6 +185,21 @@ def nb_goods(self) -> int: """Good number for a TAC instance.""" return self._nb_goods + @property + def nb_currencies(self) -> int: + """Currency number for a TAC instance.""" + return self._nb_goods + + @property + def currency_id_to_name(self) -> Dict[str, str]: + """Mapping of currency ids to names""" + return self._currency_id_to_name + + @property + def good_id_to_name(self) -> Dict[str, str]: + """Mapping of good ids to names.""" + return self._good_id_to_name + @property def tx_fee(self) -> int: """Transaction fee for a TAC instance.""" @@ -124,7 +223,16 @@ def upper_bound_factor(self) -> int: @property def registration_start_time(self) -> datetime.datetime: """TAC registration start time.""" - return self._start_time - datetime.timedelta(seconds=self._registration_timeout) + return ( + self._start_time + - datetime.timedelta(seconds=self._item_setup_timeout) + - datetime.timedelta(seconds=self._registration_timeout) + ) + + @property + def registration_end_time(self) -> datetime.datetime: + """TAC registration end time.""" + return self._start_time - datetime.timedelta(seconds=self._item_setup_timeout) @property def start_time(self) -> datetime.datetime: @@ -170,3 +278,15 @@ def remove_service_data(self) -> Dict[str, str]: def simple_service_data(self) -> Dict[str, str]: """Get the simple service data.""" return self._simple_service_data + + def _check_consistency(self) -> None: + """Check the parameters are consistent.""" + if self._contract_address is not None and ( + self._good_ids is not None + or self._currency_ids is not None + or len(self._good_ids) != self._nb_goods + or len(self._currency_ids) != self._nb_currencies + ): + raise ValueError( + "If the contract address is set, then good ids and currency id must be provided and consistent." + ) diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index 8417c0f319..4cb9306bc0 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -16,7 +16,8 @@ fingerprint: helpers.py: QmdG31YUJakBz8FdNNxU6RxqhWy9iv1BG253PzfxBhzqq2 parameters.py: QmQB95beEKzyA8Aa7Y9HTPw6BPEVi6BGkpsUqN4QZ4DcVG fingerprint_ignore_patterns: [] -contracts: [] +contracts: +- fetchai/erc1155:0.10.0 protocols: - fetchai/oef_search:0.6.0 - fetchai/tac:0.6.0 diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 28562d5ae1..702a2ef1a9 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -20,18 +20,17 @@ """This package contains the behaviours.""" import datetime -from typing import List, Optional, cast +from typing import List, cast -from aea.crypto.base import LedgerApi -from aea.helpers.search.models import Attribute, DataModel, Description -from aea.protocols.signing.message import SigningMessage -from aea.skills.behaviours import SimpleBehaviour, TickerBehaviour +from aea.skills.behaviours import TickerBehaviour -from packages.fetchai.contracts.erc1155.contract import ERC1155Contract -from packages.fetchai.protocols.oef_search.message import OefSearchMessage -from packages.fetchai.protocols.tac.message import TacMessage +from packages.fetchai.protocols.contract_api.message import ContractApiMessage +from packages.fetchai.skills.tac_control.behaviours import TacBehaviour +from packages.fetchai.skills.tac_control_contract.dialogues import ( + ContractApiDialogue, + ContractApiDialogues, +) from packages.fetchai.skills.tac_control_contract.game import ( - AgentState, Configuration, Game, Phase, @@ -44,65 +43,47 @@ ) from packages.fetchai.skills.tac_control_contract.parameters import Parameters -CONTROLLER_DATAMODEL = DataModel( - "tac", - [Attribute("version", str, True, "Version number of the TAC Controller Agent.")], -) +LEDGER_API_ADDRESS = "///" -class TACBehaviour(SimpleBehaviour): +class TacBehaviour(TacBehaviour): """This class implements the TAC control behaviour.""" - def __init__(self, **kwargs): - """Instantiate the behaviour.""" - super().__init__(**kwargs) - self._oef_msg_id = 0 - self._registered_desc = None # type: Optional[Description] - def setup(self) -> None: """ Implement the setup. :return: None """ + super().setup() parameters = cast(Parameters, self.context.parameters) - contract = cast(ERC1155Contract, self.context.contracts.erc1155) - ledger_api = self.context.ledger_apis.get_api(parameters.ledger) - if parameters.is_contract_deployed: - self._set_game(parameters, ledger_api, contract) - else: - self._deploy_contract(ledger_api, contract) + if not parameters.is_contract_deployed: + self._request_contract_deploy_transaction() - def _set_game( # pylint: disable=unused-argument - self, parameters: Parameters, ledger_api: LedgerApi, contract: ERC1155Contract - ) -> None: - """Set the contract and configuration based on provided parameters.""" - game = cast(Game, self.context.game) - game.phase = Phase.CONTRACT_DEPLOYED - self.context.logger.info("Setting up the game") - configuration = Configuration(parameters.version_id, parameters.tx_fee,) - configuration.good_id_to_name = generate_good_id_to_name(parameters.good_ids) - configuration.currency_id_to_name = generate_currency_id_to_name( - parameters.currency_ids - ) - configuration.contract_address = parameters.contract_address - game.conf = configuration + def _request_contract_deploy_transaction(self) -> None: + """ + Request contract deploy transaction - def _deploy_contract( # pylint: disable=unused-argument - self, ledger_api: LedgerApi, contract: ERC1155Contract - ) -> None: - """Send deploy contract tx msg to decision maker.""" - game = cast(Game, self.context.game) - game.phase = Phase.CONTRACT_DEPLOYMENT_PROPOSAL - self.context.logger.info("sending deploy transaction to decision maker.") - # request deploy tx # noqa: E800 - # contract.set_instance(ledger_api) # noqa: E800 - # transaction_message = contract.get_deploy_transaction_msg( # noqa: E800 - # deployer_address=self.context.agent_address, # noqa: E800 - # ledger_api=ledger_api, # noqa: E800 - # skill_callback_id=self.context.skill_id, # noqa: E800 - # ) # noqa: E800 - # self.context.decision_maker_message_queue.put_nowait(transaction_message) # noqa: E800 + :return: None + """ + parameters = cast(Parameters, self.context.parameters) + contract_api_dialogues = cast( + ContractApiDialogues, self.context.contract_api_dialogues + ) + contract_api_msg, contract_api_dialogue = contract_api_dialogues.create( + counterparty=LEDGER_API_ADDRESS, + performative=ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION, + ledger_id=parameters.ledger_id, + contract_id="fetchai/erc1155:0.10.0", + callable="get_deploy_transaction", + kwargs=ContractApiMessage.Kwargs( + {"deployer_address": self.context.agent_address} + ), + ) + contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue,) + contract_api_dialogue.terms = strategy.get_deploy_terms() + self.context.outbox.put_message(message=contract_api_msg) + self.context.logger.info("requesting contract deployment transaction...") def act(self) -> None: """ @@ -113,8 +94,6 @@ def act(self) -> None: game = cast(Game, self.context.game) parameters = cast(Parameters, self.context.parameters) now = datetime.datetime.now() - contract = cast(ERC1155Contract, self.context.contracts.erc1155) - ledger_api = self.context.ledger_apis.get_api(parameters.ledger) if ( game.phase.value == Phase.CONTRACT_DEPLOYED.value and parameters.registration_start_time @@ -123,19 +102,22 @@ def act(self) -> None: ): game.phase = Phase.GAME_REGISTRATION self._register_tac(parameters) + self.context.logger.info( + "TAC open for registration until: {}".format(parameters.start_time) + ) elif ( game.phase.value == Phase.GAME_REGISTRATION.value and parameters.registration_end_time < now < parameters.start_time ): self.context.logger.info("closing registration!") if game.registration.nb_agents < parameters.min_nb_agents: - game.phase = Phase.CANCELLED_GAME self.context.logger.info( "registered agents={}, minimum agents required={}".format( game.registration.nb_agents, parameters.min_nb_agents, ) ) - self._end_tac(game, "cancelled") + self._cancel_tac(game) + game.phase = Phase.POST_GAME self._unregister_tac() self.context.is_active = False else: @@ -147,10 +129,10 @@ def act(self) -> None: and parameters.registration_end_time < now < parameters.start_time ): game.phase = Phase.TOKENS_CREATION_PROPOSAL - self._create_items(game, ledger_api, contract) + self._request_create_items_transaction(game) elif game.phase.value == Phase.TOKENS_CREATED.value: game.phase = Phase.TOKENS_MINTING_PROPOSAL - self._mint_items(game, ledger_api, contract) + self._request_mint_items_transaction(game) elif ( game.phase.value == Phase.TOKENS_MINTED.value and parameters.start_time < now < parameters.end_time @@ -159,8 +141,7 @@ def act(self) -> None: self._start_tac(game) elif game.phase.value == Phase.GAME.value and now > parameters.end_time: game.phase = Phase.POST_GAME - self._end_tac(game, "finished") - self._game_finished_summary(game) + self._cancel_tac(game) self.context.is_active = False def teardown(self) -> None: @@ -169,160 +150,75 @@ def teardown(self) -> None: :return: None """ - if self._registered_desc is not None: - self._unregister_tac() + super().teardown() - def _register_tac(self, parameters) -> None: + def _request_create_items_transaction(self, game: Game) -> None: """ - Register on the OEF as a TAC controller agent. + Request token create transaction - :return: None. + :return: None """ - self._oef_msg_id += 1 - desc = Description( - {"version": parameters.version_id}, data_model=CONTROLLER_DATAMODEL, - ) - self.context.logger.info("registering TAC data model") - oef_msg = OefSearchMessage( - performative=OefSearchMessage.Performative.REGISTER_SERVICE, - dialogue_reference=(str(self._oef_msg_id), ""), - service_description=desc, + parameters = cast(Parameters, self.context.parameters) + contract_api_dialogues = cast( + ContractApiDialogues, self.context.contract_api_dialogues ) - oef_msg.to = self.context.search_service_address - self.context.outbox.put_message(message=oef_msg) - self._registered_desc = desc - self.context.logger.info( - "TAC open for registration until: {}".format( - parameters.registration_end_time - ) + token_ids = [int(good_id) for good_id in game.conf.good_id_to_name.keys()] + [ + int(currency_id) for currency_id in game.conf.currency_id_to_name.keys() + ] + contract_api_msg, contract_api_dialogue = contract_api_dialogues.create( + counterparty=LEDGER_API_ADDRESS, + performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, + ledger_id=parameters.ledger_id, + contract_id="fetchai/erc1155:0.10.0", + callable="get_create_batch_transaction", + kwargs=ContractApiMessage.Kwargs( + {"deployer_address": self.context.agent_address, "token_ids": token_ids} + ), ) + contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue) + contract_api_dialogue.terms = strategy.get_create_items_terms() + self.context.outbox.put_message(message=contract_api_msg) + self.context.logger.info("requesting create items transaction...") - def _unregister_tac(self) -> None: + def _request_mint_items_transaction(self, game: Game) -> None: """ - Unregister from the OEF as a TAC controller agent. + Request token mint transaction - :return: None. + :return: None """ - if self._registered_desc is not None: - self._oef_msg_id += 1 - self.context.logger.info("unregistering TAC data model") - oef_msg = OefSearchMessage( - performative=OefSearchMessage.Performative.UNREGISTER_SERVICE, - dialogue_reference=(str(self._oef_msg_id), ""), - service_description=self._registered_desc, - ) - oef_msg.to = self.context.search_service_address - self.context.outbox.put_message(message=oef_msg) - self._registered_desc = None - - def _create_items( - self, game: Game, ledger_api: LedgerApi, contract: ERC1155Contract - ) -> None: - """Send create items transaction to decision maker.""" - self.context.logger.info("sending create_items transaction to decision maker.") - tx_msg = self._get_create_items_tx_msg( # pylint: disable=assignment-from-none - game.conf, ledger_api, contract - ) - self.context.decision_maker_message_queue.put_nowait(tx_msg) - - def _mint_items( - self, game: Game, ledger_api: LedgerApi, contract: ERC1155Contract - ) -> None: - """Send mint items transactions to decision maker.""" - self.context.logger.info("sending mint_items transactions to decision maker.") + self.context.logger.info("requesting mint_items transactions.") for agent_state in game.initial_agent_states.values(): - tx_msg = self._get_mint_goods_and_currency_tx_msg( # pylint: disable=assignment-from-none - agent_state, ledger_api, contract + parameters = cast(Parameters, self.context.parameters) + token_ids = [] # type: List[int] + mint_quantities = [] # type: List[int] + for good_id, quantity in agent_state.quantities_by_good_id.items(): + token_ids.append(int(good_id)) + mint_quantities.append(quantity) + for currency_id, amount in agent_state.amount_by_currency_id.items(): + token_ids.append(int(currency_id)) + mint_quantities.append(amount) + contract_api_dialogues = cast( + ContractApiDialogues, self.context.contract_api_dialogues ) - self.context.decision_maker_message_queue.put_nowait(tx_msg) - - def _start_tac(self, game: Game) -> None: - """Create a game and send the game configuration to every registered agent.""" - self.context.logger.info( - "starting competition with configuration:\n{}".format(game.holdings_summary) - ) - self.context.logger.info( - "computed theoretical equilibrium:\n{}".format(game.equilibrium_summary) - ) - for agent_address in game.conf.agent_addr_to_name.keys(): - agent_state = game.current_agent_states[agent_address] - tac_msg = TacMessage( - performative=TacMessage.Performative.GAME_DATA, - amount_by_currency_id=agent_state.amount_by_currency_id, - exchange_params_by_currency_id=agent_state.exchange_params_by_currency_id, - quantities_by_good_id=agent_state.quantities_by_good_id, - utility_params_by_good_id=agent_state.utility_params_by_good_id, - tx_fee=game.conf.tx_fee, - agent_addr_to_name=game.conf.agent_addr_to_name, - good_id_to_name=game.conf.good_id_to_name, - currency_id_to_name=game.conf.currency_id_to_name, - version_id=game.conf.version_id, - info={"contract_address": game.conf.contract_address}, - ) - self.context.logger.debug( - "sending game data to '{}'.".format(agent_address) + contract_api_msg, contract_api_dialogue = contract_api_dialogues.create( + counterparty=LEDGER_API_ADDRESS, + performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, + ledger_id=parameters.ledger_id, + contract_id="fetchai/erc1155:0.10.0", + contract_address=parameters.contract_address, + callable="get_mint_batch_transaction", + kwargs=ContractApiMessage.Kwargs( + { + "deployer_address": self.context.agent_address, + "recipient_address": self.context.agent_address, + "token_ids": token_ids, + "mint_quantities": mint_quantities, + } + ), ) - self.context.logger.debug("game data={}".format(str(tac_msg))) - tac_msg.to = agent_address - self.context.outbox.put_message(message=tac_msg) - - def _end_tac(self, game: Game, reason: str) -> None: - """Notify agents that the TAC is cancelled.""" - self.context.logger.info("notifying agents that TAC is {}.".format(reason)) - for agent_addr in game.registration.agent_addr_to_name.keys(): - tac_msg = TacMessage(performative=TacMessage.Performative.CANCELLED) - tac_msg.to = agent_addr - self.context.outbox.put_message(message=tac_msg) - - def _game_finished_summary(self, game: Game) -> None: - """Provide summary of game stats.""" - self.context.logger.info( - "finished competition:\n{}".format(game.holdings_summary) - ) - self.context.logger.info( - "computed equilibrium:\n{}".format(game.equilibrium_summary) - ) - - def _get_create_items_tx_msg( # pylint: disable=no-self-use,unused-argument - self, - configuration: Configuration, - ledger_api: LedgerApi, - contract: ERC1155Contract, - ) -> SigningMessage: - # request tx # noqa: E800 - # token_ids = [ # noqa: E800 - # int(good_id) for good_id in configuration.good_id_to_name.keys() # noqa: E800 - # ] + [ # noqa: E800 - # int(currency_id) for currency_id in configuration.currency_id_to_name.keys() # noqa: E800 - # ] # noqa: E800 - # tx_msg = contract.get_create_batch_transaction_msg( # noqa: E800 - # deployer_address=self.context.agent_address, # noqa: E800 - # ledger_api=ledger_api, # noqa: E800 - # skill_callback_id=self.context.skill_id, # noqa: E800 - # token_ids=token_ids, # noqa: E800 - # ) # noqa: E800 - return None # type: ignore - - def _get_mint_goods_and_currency_tx_msg( # pylint: disable=no-self-use,useless-return,unused-argument - self, agent_state: AgentState, ledger_api: LedgerApi, contract: ERC1155Contract, - ) -> SigningMessage: - token_ids = [] # type: List[int] - mint_quantities = [] # type: List[int] - for good_id, quantity in agent_state.quantities_by_good_id.items(): - token_ids.append(int(good_id)) - mint_quantities.append(quantity) - for currency_id, amount in agent_state.amount_by_currency_id.items(): - token_ids.append(int(currency_id)) - mint_quantities.append(amount) - # tx_msg = contract.get_mint_batch_transaction_msg( # noqa: E800 - # deployer_address=self.context.agent_address, # noqa: E800 - # recipient_address=agent_state.agent_address, # noqa: E800 - # mint_quantities=mint_quantities, # noqa: E800 - # ledger_api=ledger_api, # noqa: E800 - # skill_callback_id=self.context.skill_id, # noqa: E800 - # token_ids=token_ids, # noqa: E800 - # ) # noqa: E800 - return None # type: ignore + contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue) + contract_api_dialogue.terms = strategy.get_mint_token_terms() + self.context.outbox.put_message(message=contract_api_msg) class ContractBehaviour(TickerBehaviour): diff --git a/packages/fetchai/skills/tac_control_contract/dialogues.py b/packages/fetchai/skills/tac_control_contract/dialogues.py new file mode 100644 index 0000000000..2f15292e02 --- /dev/null +++ b/packages/fetchai/skills/tac_control_contract/dialogues.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2018-2019 Fetch.AI Limited +# +# 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. +# +# ------------------------------------------------------------------------------ + +""" +This module contains the classes required for dialogue management. + +- DefaultDialogue: The dialogue class maintains state of a dialogue of type default and manages it. +- DefaultDialogues: The dialogues class keeps track of all dialogues of type default. +- OefSearchDialogue: The dialogue class maintains state of a dialogue of type oef_search and manages it. +- OefSearchDialogues: The dialogues class keeps track of all dialogues of type oef_search. +- TacDialogue: The dialogue class maintains state of a dialogue of type tac and manages it. +- TacDialogues: The dialogues class keeps track of all dialogues of type tac. +""" + +from packages.fetchai.skills.tac_control.dialogues import ( + DefaultDialogue as BaseDefaultDialogue, +) +from packages.fetchai.skills.tac_control.dialogues import ( + DefaultDialogues as BaseDefaultDialogues, +) +from packages.fetchai.skills.tac_control.dialogues import ( + OefSearchDialogue as BaseOefSearchDialogue, +) +from packages.fetchai.skills.tac_control.dialogues import ( + OefSearchDialogues as BaseOefSearchDialogues, +) +from packages.fetchai.skills.tac_control.dialogues import TacDialogue as BaseTacDialogue +from packages.fetchai.skills.tac_control.dialogues import ( + TacDialogues as BaseTacDialogues, +) + + +DefaultDialogue = BaseDefaultDialogue + +DefaultDialogues = BaseDefaultDialogues + +OefSearchDialogue = BaseOefSearchDialogue + +OefSearchDialogues = BaseOefSearchDialogues + +TacDialogue = BaseTacDialogue + +TacDialogues = BaseTacDialogues diff --git a/packages/fetchai/skills/tac_control_contract/game.py b/packages/fetchai/skills/tac_control_contract/game.py index 5120453dc0..23baa86044 100644 --- a/packages/fetchai/skills/tac_control_contract/game.py +++ b/packages/fetchai/skills/tac_control_contract/game.py @@ -19,92 +19,47 @@ """This package contains a class representing the game.""" -import copy -import datetime -import pprint -from enum import Enum -from typing import Dict, List, Optional, cast +from typing import Dict, List, Optional from aea.common import Address from aea.exceptions import AEAEnforceError, enforce -from aea.helpers.preference_representations.base import ( - linear_utility, - logarithmic_utility, -) -from aea.helpers.transaction.base import Terms -from aea.skills.base import Model - -from packages.fetchai.protocols.tac.message import TacMessage -from packages.fetchai.skills.tac_control_contract.helpers import ( - determine_scaling_factor, - generate_currency_endowments, - generate_equilibrium_prices_and_holdings, - generate_exchange_params, - generate_good_endowments, - generate_utility_params, + +from packages.fetchai.skills.tac_control.game import AgentState as BaseAgentState +from packages.fetchai.skills.tac_control.game import Configuration as BaseConfiguration +from packages.fetchai.skills.tac_control.game import Game as BaseGame +from packages.fetchai.skills.tac_control.game import ( + Initialization as BaseInitialization, ) -from packages.fetchai.skills.tac_control_contract.parameters import Parameters - -GoodId = str -CurrencyId = str -Quantity = int -EquilibriumQuantity = float -Parameter = float -TransactionId = str -CurrencyEndowment = Dict[CurrencyId, Quantity] -ExchangeParams = Dict[CurrencyId, Parameter] -GoodEndowment = Dict[GoodId, Quantity] -UtilityParams = Dict[GoodId, Parameter] -EquilibriumCurrencyHoldings = Dict[CurrencyId, EquilibriumQuantity] -EquilibriumGoodHoldings = Dict[GoodId, EquilibriumQuantity] - - -class Phase(Enum): - """This class defines the phases of the game.""" - - PRE_GAME = "pre_game" - CONTRACT_DEPLOYMENT_PROPOSAL = "contract_deployment_proposal" - CONTRACT_DEPLOYING = "contract_deploying" - CONTRACT_DEPLOYED = "contract_deployed" - GAME_REGISTRATION = "game_registration" - GAME_SETUP = "game_setup" - TOKENS_CREATION_PROPOSAL = "token_creation_proposal" # nosec - TOKENS_CREATING = "tokens_creating" - TOKENS_CREATED = "tokens_created" # nosec - TOKENS_MINTING_PROPOSAL = "token_minting_proposal" - TOKENS_MINTING = "token_minting" # nosec - TOKENS_MINTED = "tokens_minted" # nosec - GAME = "game" - POST_GAME = "post_game" - CANCELLED_GAME = "cancelled_game" - - -class Configuration: +from packages.fetchai.skills.tac_control.game import Phase as BasePhase +from packages.fetchai.skills.tac_control.game import Registration as BaseRegistration +from packages.fetchai.skills.tac_control.game import Transaction as BaseTransaction +from packages.fetchai.skills.tac_control.game import Transactions as BaseTransactions + + +Phase = BasePhase + + +class Configuration(BaseConfiguration): """Class containing the configuration of the game.""" - def __init__(self, version_id: str, tx_fee: int): + def __init__( + self, + version_id: str, + tx_fee: int, + agent_addr_to_name: Dict[Address, str], + currency_id_to_name: Dict[str, str], + good_id_to_name: Dict[str, str], + ): """ Instantiate a game configuration. :param version_id: the version of the game. :param tx_fee: the fee for a transaction. + :param agent_addr_to_name: a dictionary mapping agent addresses to agent names (as strings). + :param nb_goods: the number of goods. """ - self._version_id = version_id - self._tx_fee = tx_fee + super().__init__(version_id, tx_fee, agent_addr_to_name, currency_id_to_name, good_id_to_name) self._contract_address = None # type: Optional[str] - self._agent_addr_to_name = None # type: Optional[Dict[str, str]] - self._good_id_to_name = None # type: Optional[Dict[str, str]] - self._currency_id_to_name = None # type: Optional[Dict[str, str]] - - @property - def version_id(self) -> str: - """Agent number of a TAC instance.""" - return self._version_id - - @property - def tx_fee(self) -> int: - """Transaction fee for the TAC instance.""" - return self._tx_fee @property def contract_address(self) -> str: @@ -119,587 +74,20 @@ def contract_address(self, contract_address: str) -> None: enforce(self._contract_address is None, "Contract_address already set!") self._contract_address = contract_address - @property - def agent_addr_to_name(self) -> Dict[Address, str]: - """Return the map agent addresses to names.""" - if self._agent_addr_to_name is None: - raise AEAEnforceError("Agent_addr_to_name not set yet!") - return self._agent_addr_to_name - - @agent_addr_to_name.setter - def agent_addr_to_name(self, agent_addr_to_name: Dict[Address, str]) -> None: - """Set map of agent addresses to names""" - enforce(self._agent_addr_to_name is None, "Agent_addr_to_name already set!") - self._agent_addr_to_name = agent_addr_to_name - - @property - def good_id_to_name(self) -> Dict[str, str]: - """Map good ids to names.""" - if self._good_id_to_name is None: - raise AEAEnforceError("Good_id_to_name not set yet!") - return self._good_id_to_name - - @good_id_to_name.setter - def good_id_to_name(self, good_id_to_name: Dict[str, str]) -> None: - """Set map of goods ids to names.""" - enforce(self._good_id_to_name is None, "Good_id_to_name already set!") - self._good_id_to_name = good_id_to_name - - @property - def currency_id_to_name(self) -> Dict[str, str]: - """Map currency id to name.""" - if self._currency_id_to_name is None: - raise AEAEnforceError("Currency_id_to_name not set yet!") - return self._currency_id_to_name - - @currency_id_to_name.setter - def currency_id_to_name(self, currency_id_to_name: Dict[str, str]) -> None: - """Set map of currency id to name.""" - enforce(self._currency_id_to_name is None, "Currency_id_to_name already set!") - self._currency_id_to_name = currency_id_to_name - - def check_consistency(self): - """ - Check the consistency of the game configuration. - - :return: None - :raises: AEAEnforceError: if some constraint is not satisfied. - """ - enforce(self.version_id is not None, "A version id must be set.") - enforce(self.tx_fee >= 0, "Tx fee must be non-negative.") - enforce(len(self.agent_addr_to_name) >= 2, "Must have at least two agents.") - enforce(len(self.good_id_to_name) >= 2, "Must have at least two goods.") - enforce(len(self.currency_id_to_name) == 1, "Must have exactly one currency.") - - -class Initialization: - """Class containing the initialization of the game.""" - - def __init__( - self, - agent_addr_to_currency_endowments: Dict[Address, CurrencyEndowment], - agent_addr_to_exchange_params: Dict[Address, ExchangeParams], - agent_addr_to_good_endowments: Dict[Address, GoodEndowment], - agent_addr_to_utility_params: Dict[Address, UtilityParams], - good_id_to_eq_prices: Dict[GoodId, float], - agent_addr_to_eq_good_holdings: Dict[Address, EquilibriumGoodHoldings], - agent_addr_to_eq_currency_holdings: Dict[Address, EquilibriumCurrencyHoldings], - ): - """ - Instantiate a game initialization. - - :param agent_addr_to_currency_endowments: the currency endowments of the agents. A nested dict where the outer key is the agent id - and the inner key is the currency id. - :param agent_addr_to_exchange_params: the exchange params representing the exchange rate the agetns use between currencies. - :param agent_addr_to_good_endowments: the good endowments of the agents. A nested dict where the outer key is the agent id - and the inner key is the good id. - :param agent_addr_to_utility_params: the utility params representing the preferences of the agents. - :param good_id_to_eq_prices: the competitive equilibrium prices of the goods. A list. - :param agent_addr_to_eq_good_holdings: the competitive equilibrium good holdings of the agents. - :param agent_addr_to_eq_currency_holdings: the competitive equilibrium money holdings of the agents. - """ - self._agent_addr_to_currency_endowments = agent_addr_to_currency_endowments - self._agent_addr_to_exchange_params = agent_addr_to_exchange_params - self._agent_addr_to_good_endowments = agent_addr_to_good_endowments - self._agent_addr_to_utility_params = agent_addr_to_utility_params - self._good_id_to_eq_prices = good_id_to_eq_prices - self._agent_addr_to_eq_good_holdings = agent_addr_to_eq_good_holdings - self._agent_addr_to_eq_currency_holdings = agent_addr_to_eq_currency_holdings - self._check_consistency() - - @property - def agent_addr_to_currency_endowments(self) -> Dict[Address, CurrencyEndowment]: - """Get currency endowments of agents.""" - return self._agent_addr_to_currency_endowments - - @property - def agent_addr_to_exchange_params(self) -> Dict[Address, ExchangeParams]: - """Get exchange params of agents.""" - return self._agent_addr_to_exchange_params - - @property - def agent_addr_to_good_endowments(self) -> Dict[Address, GoodEndowment]: - """Get good endowments of the agents.""" - return self._agent_addr_to_good_endowments - - @property - def agent_addr_to_utility_params(self) -> Dict[Address, UtilityParams]: - """Get utility parameters of agents.""" - return self._agent_addr_to_utility_params - - @property - def good_id_to_eq_prices(self) -> Dict[GoodId, float]: - """Get theoretical equilibrium prices (a benchmark).""" - return self._good_id_to_eq_prices - - @property - def agent_addr_to_eq_good_holdings(self) -> Dict[Address, EquilibriumGoodHoldings]: - """Get theoretical equilibrium good holdings (a benchmark).""" - return self._agent_addr_to_eq_good_holdings - - @property - def agent_addr_to_eq_currency_holdings( - self, - ) -> Dict[Address, EquilibriumCurrencyHoldings]: - """Get theoretical equilibrium currency holdings (a benchmark).""" - return self._agent_addr_to_eq_currency_holdings - - def _check_consistency(self): - """ - Check the consistency of the game configuration. - - :return: None - :raises: AEAEnforceError: if some constraint is not satisfied. - """ - enforce( - all( - c_e >= 0 - for currency_endowments in self.agent_addr_to_currency_endowments.values() - for c_e in currency_endowments.values() - ), - "Currency endowments must be non-negative.", - ) - enforce( - all( - p > 0 - for params in self.agent_addr_to_exchange_params.values() - for p in params.values() - ), - "ExchangeParams must be strictly positive.", - ) - enforce( - all( - g_e > 0 - for good_endowments in self.agent_addr_to_good_endowments.values() - for g_e in good_endowments.values() - ), - "Good endowments must be strictly positive.", - ) - enforce( - all( - p > 0 - for params in self.agent_addr_to_utility_params.values() - for p in params.values() - ), - "UtilityParams must be strictly positive.", - ) - enforce( - len(self.agent_addr_to_good_endowments.keys()) - == len(self.agent_addr_to_currency_endowments.keys()), - "Length of endowments must be the same.", - ) - enforce( - len(self.agent_addr_to_exchange_params.keys()) - == len(self.agent_addr_to_utility_params.keys()), - "Length of params must be the same.", - ) - enforce( - all( - len(self.good_id_to_eq_prices.values()) == len(eq_good_holdings) - for eq_good_holdings in self.agent_addr_to_eq_good_holdings.values() - ), - "Length of eq_prices and an element of eq_good_holdings must be the same.", - ) - enforce( - len(self.agent_addr_to_eq_good_holdings.values()) - == len(self.agent_addr_to_eq_currency_holdings.values()), - "Length of eq_good_holdings and eq_currency_holdings must be the same.", - ) - enforce( - all( - len(self.agent_addr_to_exchange_params[agent_addr]) == len(endowments) - for agent_addr, endowments in self.agent_addr_to_currency_endowments.items() - ), - "Dimensions for exchange_params and currency_endowments rows must be the same.", - ) - enforce( - all( - len(self.agent_addr_to_utility_params[agent_addr]) == len(endowments) - for agent_addr, endowments in self.agent_addr_to_good_endowments.items() - ), - "Dimensions for utility_params and good_endowments rows must be the same.", - ) - - -class Transaction(Terms): - """Convenience representation of a transaction.""" - - def __init__( - self, - ledger_id: str, - sender_address: Address, - counterparty_address: Address, - amount_by_currency_id: Dict[str, int], - quantities_by_good_id: Dict[str, int], - is_sender_payable_tx_fee: bool, - nonce: str, - fee_by_currency_id: Optional[Dict[str, int]], - sender_signature: str, - counterparty_signature: str, - ) -> None: - """ - Instantiate transaction. - - This extends a terms object to be used as a transaction. - - :param ledger_id: the ledger on which the terms are to be settled. - :param sender_address: the sender address of the transaction. - :param counterparty_address: the counterparty address of the transaction. - :param amount_by_currency_id: the amount by the currency of the transaction. - :param quantities_by_good_id: a map from good id to the quantity of that good involved in the transaction. - :param is_sender_payable_tx_fee: whether the sender or counterparty pays the tx fee. - :param nonce: nonce to be included in transaction to discriminate otherwise identical transactions. - :param fee_by_currency_id: the fee associated with the transaction. - :param sender_signature: the signature of the terms by the sender. - :param counterparty_signature: the signature of the terms by the counterparty. - """ - super().__init__( - ledger_id=ledger_id, - sender_address=sender_address, - counterparty_address=counterparty_address, - amount_by_currency_id=amount_by_currency_id, - quantities_by_good_id=quantities_by_good_id, - is_sender_payable_tx_fee=is_sender_payable_tx_fee, - nonce=nonce, - fee_by_currency_id=fee_by_currency_id, - ) - self._sender_signature = sender_signature - self._counterparty_signature = counterparty_signature - - @property - def sender_signature(self) -> str: - """Get the sender signature.""" - return self._sender_signature - - @property - def counterparty_signature(self) -> str: - """Get the counterparty signature.""" - return self._counterparty_signature - - @classmethod - def from_message(cls, message: TacMessage) -> "Transaction": - """ - Create a transaction from a proposal. - - :param message: the message - :return: Transaction - """ - enforce( - message.performative == TacMessage.Performative.TRANSACTION, - "Wrong performative", - ) - transaction = Transaction( - ledger_id=message.ledger_id, - sender_address=message.sender_address, - counterparty_address=message.counterparty_address, - amount_by_currency_id=message.amount_by_currency_id, - fee_by_currency_id=message.fee_by_currency_id, - quantities_by_good_id=message.quantities_by_good_id, - is_sender_payable_tx_fee=True, - nonce=str(message.nonce), - sender_signature=message.sender_signature, - counterparty_signature=message.counterparty_signature, - ) - enforce( - transaction.id == message.transaction_id, - "Transaction content does not match hash.", - ) - return transaction - - def __eq__(self, other): - """Compare to another object.""" - return ( - isinstance(other, Transaction) - and super.__eq__() - and self.sender_signature == other.sender_signature - and self.counterparty_signature == other.counterparty_signature - ) - - -class AgentState: - """Represent the state of an agent during the game.""" - - def __init__( - self, - agent_address: Address, - amount_by_currency_id: Dict[CurrencyId, Quantity], - exchange_params_by_currency_id: Dict[CurrencyId, Parameter], - quantities_by_good_id: Dict[GoodId, Quantity], - utility_params_by_good_id: Dict[GoodId, Parameter], - ): - """ - Instantiate an agent state object. - - :param agent_address: the agent address - :param amount_by_currency_id: the amount for each currency - :param exchange_params_by_currency_id: the exchange parameters of the different currencies - :param quantities_by_good_id: the quantities for each good. - :param utility_params_by_good_id: the utility params for every good. - """ - enforce( - len(amount_by_currency_id.keys()) - == len(exchange_params_by_currency_id.keys()), - "Different number of elements in amount_by_currency_id and exchange_params_by_currency_id.", - ) - enforce( - len(quantities_by_good_id.keys()) == len(utility_params_by_good_id.keys()), - "Different number of elements in quantities_by_good_id and utility_params_by_good_id.", - ) - self._agent_address = agent_address - self._amount_by_currency_id = copy.copy(amount_by_currency_id) - self._exchange_params_by_currency_id = copy.copy(exchange_params_by_currency_id) - self._quantities_by_good_id = quantities_by_good_id - self._utility_params_by_good_id = copy.copy(utility_params_by_good_id) - - @property - def agent_address(self) -> str: - """Get address of the agent which state that is.""" - return self._agent_address - - @property - def amount_by_currency_id(self) -> Dict[CurrencyId, Quantity]: - """Get the amount for each currency.""" - return copy.copy(self._amount_by_currency_id) - - @property - def exchange_params_by_currency_id(self) -> Dict[CurrencyId, Parameter]: - """Get the exchange parameters for each currency.""" - return copy.copy(self._exchange_params_by_currency_id) - - @property - def quantities_by_good_id(self) -> Dict[GoodId, Quantity]: - """Get holding of each good.""" - return copy.copy(self._quantities_by_good_id) - - @property - def utility_params_by_good_id(self) -> Dict[GoodId, Parameter]: - """Get utility parameter for each good.""" - return copy.copy(self._utility_params_by_good_id) - - def get_score(self) -> float: - """ - Compute the score of the current state. - - The score is computed as the sum of all the utilities for the good holdings - with positive quantity plus the money left. - :return: the score. - """ - goods_score = logarithmic_utility( - self.utility_params_by_good_id, self.quantities_by_good_id - ) - money_score = linear_utility( - self.exchange_params_by_currency_id, self.amount_by_currency_id - ) - score = goods_score + money_score - return score - - def is_consistent_transaction(self, tx: Transaction) -> bool: - """ - Check if the transaction is consistent. - - E.g. check that the agent state has enough money if it is a buyer - or enough holdings if it is a seller. - :return: True if the transaction is legal wrt the current state, False otherwise. - """ - result = self.agent_address in [tx.sender_address, tx.counterparty_address] - result = result and tx.is_single_currency - if not result: - return result - if all(amount == 0 for amount in tx.amount_by_currency_id.values()) and all( - quantity == 0 for quantity in tx.quantities_by_good_id.values() - ): - # reject the transaction when there is no wealth exchange - result = False - elif all(amount <= 0 for amount in tx.amount_by_currency_id.values()) and all( - quantity >= 0 for quantity in tx.quantities_by_good_id.values() - ): - # sender is buyer, counterparty is seller - if self.agent_address == tx.sender_address: - # check this sender state has enough money - result = result and ( - self.amount_by_currency_id[tx.currency_id] - >= tx.sender_payable_amount - ) - elif self.agent_address == tx.counterparty_address: - # check this counterparty state has enough goods - result = result and all( - self.quantities_by_good_id[good_id] >= quantity - for good_id, quantity in tx.quantities_by_good_id.items() - ) - elif all(amount >= 0 for amount in tx.amount_by_currency_id.values()) and all( - quantity <= 0 for quantity in tx.quantities_by_good_id.values() - ): - # sender is seller, counterparty is buyer - # Note, on a ledger, this atomic swap would only be possible for amount == 0! - if self.agent_address == tx.sender_address: - # check this sender state has enough goods - result = result and all( - self.quantities_by_good_id[good_id] >= -quantity - for good_id, quantity in tx.quantities_by_good_id.items() - ) - elif self.agent_address == tx.counterparty_address: - # check this counterparty state has enough money - result = result and ( - self.amount_by_currency_id[tx.currency_id] - >= tx.counterparty_payable_amount - ) - else: - result = False - return result - - def apply(self, transactions: List[Transaction]) -> "AgentState": - """ - Apply a list of transactions to the current state. - - :param transactions: the sequence of transaction. - :return: the final state. - """ - new_state = copy.copy(self) - for tx in transactions: - new_state.update(tx) - - return new_state - - def update(self, tx: Transaction) -> None: - """ - Update the agent state from a transaction. - - :param tx: the transaction. - :return: None - """ - enforce(self.is_consistent_transaction(tx), "Inconsistent transaction.") - - new_amount_by_currency_id = self.amount_by_currency_id - if self.agent_address == tx.sender_address: - # settling the transaction for the sender - for currency_id, amount in tx.amount_by_currency_id.items(): - new_amount_by_currency_id[currency_id] += amount - elif self.agent_address == tx.counterparty_address: - # settling the transaction for the counterparty - for currency_id, amount in tx.amount_by_currency_id.items(): - new_amount_by_currency_id[currency_id] += amount - - self._amount_by_currency_id = new_amount_by_currency_id - - new_quantities_by_good_id = self.quantities_by_good_id - for good_id, quantity in tx.quantities_by_good_id.items(): - if self.agent_address == tx.sender_address: - new_quantities_by_good_id[good_id] += quantity - elif self.agent_address == tx.counterparty_address: - new_quantities_by_good_id[good_id] -= quantity - self._quantities_by_good_id = new_quantities_by_good_id - - def __copy__(self): - """Copy the object.""" - return AgentState( - self.agent_address, - self.amount_by_currency_id, - self.exchange_params_by_currency_id, - self.quantities_by_good_id, - self.utility_params_by_good_id, - ) - - def __str__(self): - """From object to string.""" - return "AgentState{}".format( - pprint.pformat( - { - "agent_address": self.agent_address, - "amount_by_currency_id": self.amount_by_currency_id, - "exchange_params_by_currency_id": self.exchange_params_by_currency_id, - "quantities_by_good_id": self.quantities_by_good_id, - "utility_params_by_good_id": self.utility_params_by_good_id, - } - ) - ) - - def __eq__(self, other) -> bool: - """Compare equality of two instances of the class.""" - return ( - isinstance(other, AgentState) - and self.agent_address == other.agent_address - and self.amount_by_currency_id == other.amount_by_currency_id - and self.exchange_params_by_currency_id - == other.exchange_params_by_currency_id - and self.quantities_by_good_id == other.quantities_by_good_id - and self.utility_params_by_good_id == other.utility_params_by_good_id - ) +Initialization = BaseInitialization -class Transactions: - """Class managing the transactions.""" - def __init__(self): - """Instantiate the transaction class.""" - self._confirmed = {} # type: Dict[datetime.datetime, Transaction] - self._confirmed_per_agent = ( - {} - ) # type: Dict[Address, Dict[datetime.datetime, Transaction]] +Transaction = BaseTransaction - @property - def confirmed(self) -> Dict[datetime.datetime, Transaction]: - """Get the confirmed transactions.""" - return self._confirmed - @property - def confirmed_per_agent( - self, - ) -> Dict[Address, Dict[datetime.datetime, Transaction]]: - """Get the confirmed transactions by agent.""" - return self._confirmed_per_agent +AgentState = BaseAgentState - def add(self, transaction: Transaction) -> None: - """ - Add a confirmed transaction. - :param transaction: the transaction - :return: None - """ - now = datetime.datetime.now() - self._confirmed[now] = transaction - if self._confirmed_per_agent.get(transaction.sender_address) is None: - self._confirmed_per_agent[transaction.sender_address] = {} - self._confirmed_per_agent[transaction.sender_address][now] = transaction - if self._confirmed_per_agent.get(transaction.counterparty_address) is None: - self._confirmed_per_agent[transaction.counterparty_address] = {} - self._confirmed_per_agent[transaction.counterparty_address][now] = transaction +Transactions = BaseTransactions -class Registration: - """Class managing the registration of the game.""" - - def __init__(self): - """Instantiate the registration class.""" - self._agent_addr_to_name = {} # type: Dict[str, str] - - @property - def agent_addr_to_name(self) -> Dict[str, str]: - """Get the registered agent addresses and their names.""" - return self._agent_addr_to_name - - @property - def nb_agents(self) -> int: - """Get the number of registered agents.""" - return len(self._agent_addr_to_name) - - def register_agent(self, agent_addr: Address, agent_name: str) -> None: - """ - Register an agent. - - :param agent_addr: the Address of the agent - :param agent_name: the name of the agent - :return: None - """ - self._agent_addr_to_name[agent_addr] = agent_name - - def unregister_agent(self, agent_addr: Address) -> None: - """ - Register an agent. - - :param agent_addr: the Address of the agent - :return: None - """ - self._agent_addr_to_name.pop(agent_addr) +Registration = BaseRegistration class ContractManager: @@ -776,234 +164,15 @@ def add_confirmed_mint_tokens_agents(self, agent_addr: str) -> None: self._confirmed_mint_tokens_agents.append(agent_addr) -class Game(Model): +class Game(BaseGame): """A class to manage a TAC instance.""" def __init__(self, **kwargs): """Instantiate the search class.""" super().__init__(**kwargs) - self._phase = Phase.PRE_GAME - self._registration = Registration() self._contract_manager = ContractManager() - self._conf = None # type: Optional[Configuration] - self._initialization = None # type: Optional[Initialization] - self._initial_agent_states = None # type: Optional[Dict[str, AgentState]] - self._current_agent_states = None # type: Optional[Dict[str, AgentState]] - self._transactions = Transactions() - - @property - def phase(self) -> Phase: - """Get the game phase.""" - return self._phase - - @phase.setter - def phase(self, phase: Phase) -> None: - """Set the game phase.""" - self.context.logger.debug("Game phase set to: {}".format(phase)) - self._phase = phase - - @property - def registration(self) -> Registration: - """Get the registration.""" - return self._registration @property def contract_manager(self) -> ContractManager: """Get the contract manager.""" return self._contract_manager - - @property - def conf(self) -> Configuration: - """Get game configuration.""" - if self._conf is None: - raise AEAEnforceError("Call create before calling configuration.") - return self._conf - - @conf.setter - def conf(self, configuration: Configuration): - """Set the configuration.""" - enforce(self._conf is None, "Configuration already set!.") - self._conf = configuration - - @property - def initialization(self) -> Initialization: - """Get game initialization.""" - if self._initialization is None: - raise AEAEnforceError("Call create before calling initialization.") - return self._initialization - - @property - def initial_agent_states(self) -> Dict[str, AgentState]: - """Get initial state of each agent.""" - if self._initial_agent_states is None: - raise AEAEnforceError("Call create before calling initial_agent_states.") - return self._initial_agent_states - - @property - def current_agent_states(self) -> Dict[str, AgentState]: - """Get current state of each agent.""" - if self._current_agent_states is None: - raise AEAEnforceError("Call create before calling current_agent_states.") - return self._current_agent_states - - @property - def transactions(self) -> Transactions: - """Get the transactions.""" - return self._transactions - - def create(self): - """Create a game.""" - enforce(self.phase.value == Phase.GAME_SETUP.value, "Wrong game phase.") - self.context.logger.info("setting Up the TAC game.") - self._generate() - - def _generate(self): - """Generate a TAC game.""" - parameters = cast(Parameters, self.context.parameters) - self.conf.agent_addr_to_name = self.registration.agent_addr_to_name - self.conf.check_consistency() - - scaling_factor = determine_scaling_factor(parameters.money_endowment) - - agent_addr_to_currency_endowments = generate_currency_endowments( - list(self.conf.agent_addr_to_name.keys()), - list(self.conf.currency_id_to_name.keys()), - parameters.money_endowment, - ) - - agent_addr_to_exchange_params = generate_exchange_params( - list(self.conf.agent_addr_to_name.keys()), - list(self.conf.currency_id_to_name.keys()), - ) - - agent_addr_to_good_endowments = generate_good_endowments( - list(self.conf.agent_addr_to_name.keys()), - list(self.conf.good_id_to_name.keys()), - parameters.base_good_endowment, - parameters.lower_bound_factor, - parameters.upper_bound_factor, - ) - - agent_addr_to_utility_params = generate_utility_params( - list(self.conf.agent_addr_to_name.keys()), - list(self.conf.good_id_to_name.keys()), - scaling_factor, - ) - - ( - good_id_to_eq_prices, - agent_addr_to_eq_good_holdings, - agent_addr_to_eq_currency_holdings, - ) = generate_equilibrium_prices_and_holdings( - agent_addr_to_good_endowments, - agent_addr_to_utility_params, - agent_addr_to_currency_endowments, - agent_addr_to_exchange_params, - scaling_factor, - ) - - self._initialization = Initialization( - agent_addr_to_currency_endowments, - agent_addr_to_exchange_params, - agent_addr_to_good_endowments, - agent_addr_to_utility_params, - good_id_to_eq_prices, - agent_addr_to_eq_good_holdings, - agent_addr_to_eq_currency_holdings, - ) - - self._initial_agent_states = dict( - ( - agent_addr, - AgentState( - agent_addr, - self.initialization.agent_addr_to_currency_endowments[agent_addr], - self.initialization.agent_addr_to_exchange_params[agent_addr], - self.initialization.agent_addr_to_good_endowments[agent_addr], - self.initialization.agent_addr_to_utility_params[agent_addr], - ), - ) - for agent_addr in self.conf.agent_addr_to_name.keys() - ) - - self._current_agent_states = dict( - ( - agent_addr, - AgentState( - agent_addr, - self.initialization.agent_addr_to_currency_endowments[agent_addr], - self.initialization.agent_addr_to_exchange_params[agent_addr], - self.initialization.agent_addr_to_good_endowments[agent_addr], - self.initialization.agent_addr_to_utility_params[agent_addr], - ), - ) - for agent_addr in self.conf.agent_addr_to_name.keys() - ) - - @property - def holdings_summary(self) -> str: - """Get holdings summary (a string representing the holdings for every agent).""" - result = "\n" + "Current good & money allocation & score: \n" - for agent_addr, agent_state in self.current_agent_states.items(): - result = ( - result + "- " + self.conf.agent_addr_to_name[agent_addr] + ":" + "\n" - ) - for good_id, quantity in agent_state.quantities_by_good_id.items(): - result += ( - " " - + self.conf.good_id_to_name[good_id] - + ": " - + str(quantity) - + "\n" - ) - for currency_id, amount in agent_state.amount_by_currency_id.items(): - result += ( - " " - + self.conf.currency_id_to_name[currency_id] - + ": " - + str(amount) - + "\n" - ) - result += " score: " + str(round(agent_state.get_score(), 2)) + "\n" - result = result + "\n" - return result - - @property - def equilibrium_summary(self) -> str: - """Get equilibrium summary.""" - result = "\n" + "Equilibrium prices: \n" - for good_id, eq_price in self.initialization.good_id_to_eq_prices.items(): - result = ( - result + self.conf.good_id_to_name[good_id] + " " + str(eq_price) + "\n" - ) - result = result + "\n" - result = result + "Equilibrium good allocation: \n" - for ( - agent_addr, - eq_allocations, - ) in self.initialization.agent_addr_to_eq_good_holdings.items(): - result = result + "- " + self.conf.agent_addr_to_name[agent_addr] + ":\n" - for good_id, quantity in eq_allocations.items(): - result = ( - result - + " " - + self.conf.good_id_to_name[good_id] - + ": " - + str(quantity) - + "\n" - ) - result = result + "\n" - result = result + "Equilibrium money allocation: \n" - for ( - agent_addr, - eq_allocation, - ) in self.initialization.agent_addr_to_eq_currency_holdings.items(): - result = ( - result - + self.conf.agent_addr_to_name[agent_addr] - + " " - + str(eq_allocation) - + "\n" - ) - result = result + "\n" - return result diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index 0445ede7c1..37ded8d678 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -25,193 +25,18 @@ from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler -from packages.fetchai.protocols.oef_search.message import OefSearchMessage -from packages.fetchai.protocols.tac.message import TacMessage +from packages.fetchai.skills.tac_control.handlers import ( + OefSearchHandler as BaseOefSearchHandler, +) +from packages.fetchai.skills.tac_control.handlers import TacHandler as BaseTacHandler from packages.fetchai.skills.tac_control_contract.game import Game, Phase from packages.fetchai.skills.tac_control_contract.parameters import Parameters -class TACHandler(Handler): - """This class handles oef messages.""" +TacHandler = BaseTacHandler - SUPPORTED_PROTOCOL = TacMessage.protocol_id - def setup(self) -> None: - """ - Implement the handler setup. - - :return: None - """ - pass - - def handle(self, message: Message) -> None: - """ - Handle a register message. - - If the address is already registered, answer with an error message. - - :param message: the 'get agent state' TacMessage. - :return: None - """ - tac_message = cast(TacMessage, message) - game = cast(Game, self.context.game) - - self.context.logger.debug( - "handling TAC message. type={}".format(tac_message.performative) - ) - if ( - tac_message.performative == TacMessage.Performative.REGISTER - and game.phase == Phase.GAME_REGISTRATION - ): - self._on_register(tac_message) - elif ( - tac_message.performative == TacMessage.Performative.UNREGISTER - and game.phase == Phase.GAME_REGISTRATION - ): - self._on_unregister(tac_message) - else: - self.context.logger.warning( - "TAC Message type not recognized or not permitted." - ) - - def _on_register(self, message: TacMessage) -> None: - """ - Handle a register message. - - If the address is not registered, answer with an error message. - - :param message: the 'get agent state' TacMessage. - :return: None - """ - parameters = cast(Parameters, self.context.parameters) - agent_name = message.agent_name - if len(parameters.whitelist) != 0 and agent_name not in parameters.whitelist: - self.context.logger.warning( - "agent name not in whitelist: '{}'".format(agent_name) - ) - tac_msg = TacMessage( - performative=TacMessage.Performative.TAC_ERROR, - error_code=TacMessage.ErrorCode.AGENT_NAME_NOT_IN_WHITELIST, - ) - tac_msg.to = message.sender - self.context.outbox.put_message(message=tac_msg) - return - - game = cast(Game, self.context.game) - if message.sender in game.registration.agent_addr_to_name: - self.context.logger.warning( - "agent already registered: '{}'".format( - game.registration.agent_addr_to_name[message.sender], - ) - ) - tac_msg = TacMessage( - performative=TacMessage.Performative.TAC_ERROR, - error_code=TacMessage.ErrorCode.AGENT_ADDR_ALREADY_REGISTERED, - ) - tac_msg.to = message.sender - self.context.outbox.put_message(message=tac_msg) - - if agent_name in game.registration.agent_addr_to_name.values(): - self.context.logger.warning( - "agent with this name already registered: '{}'".format(agent_name) - ) - tac_msg = TacMessage( - performative=TacMessage.Performative.TAC_ERROR, - error_code=TacMessage.ErrorCode.AGENT_NAME_ALREADY_REGISTERED, - ) - tac_msg.to = message.sender - self.context.outbox.put_message(message=tac_msg) - game.registration.register_agent(message.sender, agent_name) - self.context.logger.info("agent registered: '{}'".format(agent_name)) - - def _on_unregister(self, message: TacMessage) -> None: - """ - Handle a unregister message. - - If the address is not registered, answer with an error message. - - :param message: the 'get agent state' TacMessage. - :return: None - """ - game = cast(Game, self.context.game) - if message.sender not in game.registration.agent_addr_to_name: - self.context.logger.warning( - "agent not registered: '{}'".format(message.sender) - ) - tac_msg = TacMessage( - performative=TacMessage.Performative.TAC_ERROR, - error_code=TacMessage.ErrorCode.AGENT_NOT_REGISTERED, - ) - tac_msg.to = message.sender - self.context.outbox.put_message(message=tac_msg) - else: - self.context.logger.debug( - "agent unregistered: '{}'".format( - game.conf.agent_addr_to_name[message.sender], - ) - ) - game.registration.unregister_agent(message.sender) - - def teardown(self) -> None: - """ - Implement the handler teardown. - - :return: None - """ - pass - - -class OEFRegistrationHandler(Handler): - """Handle the message exchange with the OEF search node.""" - - SUPPORTED_PROTOCOL = OefSearchMessage.protocol_id - - def setup(self) -> None: - """ - Implement the handler setup. - - :return: None - """ - pass - - def handle(self, message: Message) -> None: - """ - Implement the reaction to a message. - - :param message: the message - :return: None - """ - oef_message = cast(OefSearchMessage, message) - - self.context.logger.debug( - "handling OEF message. type={}".format(oef_message.performative) - ) - if oef_message.performative == OefSearchMessage.Performative.OEF_ERROR: - self._on_oef_error(oef_message) - else: - self.context.logger.warning("OEF Message type not recognized.") - - def _on_oef_error(self, oef_error: OefSearchMessage) -> None: - """ - Handle an OEF error message. - - :param oef_error: the oef error - - :return: None - """ - self.context.logger.warning( - "received OEF Search error: dialogue_reference={}, operation={}".format( - oef_error.dialogue_reference, oef_error.oef_error_operation, - ) - ) - - def teardown(self) -> None: - """ - Implement the handler teardown. - - :return: None - """ - pass +OefSearchHandler = BaseOefSearchHandler class SigningHandler(Handler): diff --git a/packages/fetchai/skills/tac_control_contract/helpers.py b/packages/fetchai/skills/tac_control_contract/helpers.py deleted file mode 100644 index 6441d00f9f..0000000000 --- a/packages/fetchai/skills/tac_control_contract/helpers.py +++ /dev/null @@ -1,321 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# ------------------------------------------------------------------------------ -# -# Copyright 2018-2019 Fetch.AI Limited -# -# 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. -# -# ------------------------------------------------------------------------------ - -"""This module contains the helpers methods for the controller agent.""" - -import random -from typing import Dict, List, Tuple, cast - -import numpy as np - -from aea.exceptions import enforce - -from packages.fetchai.contracts.erc1155.contract import ERC1155Contract - -QUANTITY_SHIFT = 1 # Any non-negative integer is fine. -FT_NAME = "FT" -FT_ID = 2 -NB_CURRENCIES = 1 - - -def generate_good_id_to_name(good_ids: List[int]) -> Dict[str, str]: - """ - Generate a dictionary mapping good ids to names. - - :param good_ids: a list of good ids - :return: a dictionary mapping goods' ids to names. - """ - good_id_to_name = { - str(good_id): "{}_{}".format(FT_NAME, good_id) for good_id in good_ids - } - return good_id_to_name - - -def generate_good_ids(nb_goods: int) -> List[int]: - """ - Generate ids for things. - - :param nb_goods: the number of things. - :param contract: the instance of the contract - """ - good_ids = ERC1155Contract.generate_token_ids(FT_ID, nb_goods) - enforce( - len(good_ids) == nb_goods, "Length of good ids and number of goods must match." - ) - return good_ids - - -def generate_currency_id_to_name(currency_ids: List[int]) -> Dict[str, str]: - """ - Generate a dictionary mapping good ids to names. - - :param currency_ids: the currency ids - :return: a dictionary mapping currency's ids to names. - """ - currency_id_to_name = { - str(currency_id): "{}_{}".format(FT_NAME, currency_id) - for currency_id in currency_ids - } - return currency_id_to_name - - -def generate_currency_ids(nb_currencies: int) -> List[int]: - """ - Generate currency ids. - - :param nb_currencies: the number of currencies. - :param contract: the instance of the contract. - """ - currency_ids = ERC1155Contract.generate_token_ids(FT_ID, nb_currencies) - enforce( - len(currency_ids) == nb_currencies, - "Length of currency ids and number of currencies must match.", - ) - return currency_ids - - -def determine_scaling_factor(money_endowment: int) -> float: - """ - Compute the scaling factor based on the money amount. - - :param money_endowment: the endowment of money for the agent - :return: the scaling factor - """ - scaling_factor = 10.0 ** (len(str(money_endowment)) - 1) - return scaling_factor - - -def generate_good_endowments( - agent_addresses: List[str], - good_ids: List[str], - base_amount: int, - uniform_lower_bound_factor: int, - uniform_upper_bound_factor: int, -) -> Dict[str, Dict[str, int]]: - """ - Compute good endowments per agent. That is, a matrix of shape (nb_agents, nb_goods). - - :param agent_addresses: the addresses of the agents - :param good_ids: the list of good ids - :param base_amount: the base amount of instances per good - :param uniform_lower_bound_factor: the lower bound of the uniform distribution for the sampling of the good instance number. - :param uniform_upper_bound_factor: the upper bound of the uniform distribution for the sampling of the good instance number. - :return: the endowments matrix. - """ - # sample good instances - nb_agents = len(agent_addresses) - instances_per_good = _sample_good_instances( - nb_agents, - good_ids, - base_amount, - uniform_lower_bound_factor, - uniform_upper_bound_factor, - ) - # each agent receives at least base amount of each good - base_assignment = {good_id: base_amount for good_id in good_ids} - endowments = {agent_addr: base_assignment for agent_addr in agent_addresses} - # randomly assign additional goods to create differences - for good_id in good_ids: - for _ in range(instances_per_good[good_id] - (base_amount * nb_agents)): - idx = random.randint(0, nb_agents - 1) # nosec - agent_addr = agent_addresses[idx] - endowments[agent_addr][good_id] += 1 - return endowments - - -def generate_utility_params( - agent_addresses: List[str], good_ids: List[str], scaling_factor: float -) -> Dict[str, Dict[str, float]]: - """ - Compute the preference matrix. That is, a generic element e_ij is the utility of good j for agent i. - - :param agent_addresses: the agent addresses - :param good_ids: the list of good ids - :param scaling_factor: a scaling factor for all the utility params generated. - :return: the preference matrix. - """ - decimals = 4 if len(good_ids) < 100 else 8 - utility_function_params = {} # type: Dict[str, Dict[str, float]] - for agent_addr in agent_addresses: - random_integers = [ - random.randint(1, 101) for _ in range(len(good_ids)) # nosec - ] - total = sum(random_integers) - normalized_fractions = [ - round(i / float(total), decimals) for i in random_integers - ] - if not sum(normalized_fractions) == 1.0: - normalized_fractions[-1] = round( - 1.0 - sum(normalized_fractions[0:-1]), decimals - ) - # scale the utility params - params = { - good_id: param * scaling_factor - for good_id, param in zip(good_ids, normalized_fractions) - } - utility_function_params[agent_addr] = params - - return utility_function_params - - -def _sample_good_instances( - nb_agents: int, - good_ids: List[str], - base_amount: int, - uniform_lower_bound_factor: int, - uniform_upper_bound_factor: int, -) -> Dict[str, int]: - """ - Sample the number of instances for a good. - - :param nb_agents: the number of agents - :param good_ids: the good ids - :param base_amount: the base amount of instances per good - :param uniform_lower_bound_factor: the lower bound factor of a uniform distribution - :param uniform_upper_bound_factor: the upper bound factor of a uniform distribution - :return: the number of instances I sampled. - """ - a = base_amount * nb_agents + nb_agents * uniform_lower_bound_factor - b = base_amount * nb_agents + nb_agents * uniform_upper_bound_factor - # Return random integer in range [a, b] - nb_instances = {good_id: round(np.random.uniform(a, b)) for good_id in good_ids} - return nb_instances - - -def generate_currency_endowments( - agent_addresses: List[str], currency_ids: List[str], money_endowment: int -) -> Dict[str, Dict[str, int]]: - """ - Compute the initial money amounts for each agent. - - :param agent_addresses: addresses of the agents. - :param currency_ids: the currency ids. - :param money_endowment: money endowment per agent. - :return: the nested dict of currency endowments - """ - currency_endowment = {currency_id: money_endowment for currency_id in currency_ids} - return {agent_addr: currency_endowment for agent_addr in agent_addresses} - - -def generate_exchange_params( - agent_addresses: List[str], currency_ids: List[str], -) -> Dict[str, Dict[str, float]]: - """ - Compute the exchange parameters for each agent. - - :param agent_addresses: addresses of the agents. - :param currency_ids: the currency ids. - :return: the nested dict of currency endowments - """ - exchange_params = {currency_id: 1.0 for currency_id in currency_ids} - return {agent_addr: exchange_params for agent_addr in agent_addresses} - - -def generate_equilibrium_prices_and_holdings( # pylint: disable=unused-argument - agent_addr_to_good_endowments: Dict[str, Dict[str, int]], - agent_addr_to_utility_params: Dict[str, Dict[str, float]], - agent_addr_to_currency_endowments: Dict[str, Dict[str, int]], - agent_addr_to_exchange_params: Dict[str, Dict[str, float]], - scaling_factor: float, - quantity_shift: int = QUANTITY_SHIFT, -) -> Tuple[Dict[str, float], Dict[str, Dict[str, float]], Dict[str, float]]: - """ - Compute the competitive equilibrium prices and allocation. - - :param agent_addr_to_good_endowments: endowments of the agents - :param agent_addr_to_utility_params: utility function params of the agents (already scaled) - :param agent_addr_to_currency_endowments: money endowment per agent. - :param agent_addr_to_exchange_params: exchange params per agent. - :param scaling_factor: a scaling factor for all the utility params generated. - :param quantity_shift: a factor to shift the quantities in the utility function (to ensure the natural logarithm can be used on the entire range of quantities) - :return: the lists of equilibrium prices, equilibrium good holdings and equilibrium money holdings - """ - # create ordered lists - agent_addresses = [] # type: List[str] - good_ids = [] # type: List[str] - good_ids_to_idx = {} # type: Dict[str, int] - good_endowments_l = [] # type: List[List[int]] - utility_params_l = [] # type: List[List[float]] - currency_endowment_l = [] # type: List[int] - count = 0 - for agent_addr, good_endowment in agent_addr_to_good_endowments.items(): - agent_addresses.append(agent_addr) - enforce( - len(agent_addr_to_currency_endowments[agent_addr].values()) == 1, - "Cannot have more than one currency.", - ) - currency_endowment_l.append( - list(agent_addr_to_currency_endowments[agent_addr].values())[0] - ) - enforce( - len(good_endowment.keys()) - == len(agent_addr_to_utility_params[agent_addr].keys()), - "Good endowments and utility params inconsistent.", - ) - temp_g_e = [0] * len(good_endowment.keys()) - temp_u_p = [0.0] * len(agent_addr_to_utility_params[agent_addr].keys()) - idx = 0 - for good_id, quantity in good_endowment.items(): - if count == 0: - good_ids.append(good_id) - good_ids_to_idx[good_id] = idx - idx += 1 - temp_g_e[good_ids_to_idx[good_id]] = quantity - temp_u_p[good_ids_to_idx[good_id]] = agent_addr_to_utility_params[ - agent_addr - ][good_id] - count += 1 - good_endowments_l.append(temp_g_e) - utility_params_l.append(temp_u_p) - - # maths - endowments_a = np.array(good_endowments_l, dtype=np.int) - scaled_utility_params_a = np.array( - utility_params_l, dtype=np.float - ) # note, they are already scaled - endowments_by_good = np.sum(endowments_a, axis=0) - scaled_params_by_good = np.sum(scaled_utility_params_a, axis=0) - eq_prices = np.divide( - scaled_params_by_good, - quantity_shift * len(agent_addresses) + endowments_by_good, - ) - eq_good_holdings = np.divide(scaled_utility_params_a, eq_prices) - quantity_shift - eq_currency_holdings = ( - np.transpose(np.dot(eq_prices, np.transpose(endowments_a + quantity_shift))) - + currency_endowment_l - - scaling_factor - ) - - # back to dicts - eq_prices_dict = { - good_id: cast(float, eq_price) - for good_id, eq_price in zip(good_ids, eq_prices.tolist()) - } - eq_good_holdings_dict = { - agent_addr: {good_id: cast(float, v) for good_id, v in zip(good_ids, egh)} - for agent_addr, egh in zip(agent_addresses, eq_good_holdings.tolist()) - } - eq_currency_holdings_dict = { - agent_addr: cast(float, eq_currency_holding) - for agent_addr, eq_currency_holding in zip( - agent_addresses, eq_currency_holdings.tolist() - ) - } - return eq_prices_dict, eq_good_holdings_dict, eq_currency_holdings_dict diff --git a/packages/fetchai/skills/tac_control_contract/parameters.py b/packages/fetchai/skills/tac_control_contract/parameters.py index 7b7d098d80..5046c98a66 100644 --- a/packages/fetchai/skills/tac_control_contract/parameters.py +++ b/packages/fetchai/skills/tac_control_contract/parameters.py @@ -19,215 +19,7 @@ """This package contains a class representing the game parameters.""" -import datetime -from typing import List, Optional, Set +from packages.fetchai.skills.tac_control.parameters import Parameters as BaseParameters -from aea.exceptions import AEAEnforceError, enforce -from aea.skills.base import Model -DEFAULT_MIN_NB_AGENTS = 5 -DEFAULT_MONEY_ENDOWMENT = 200 -DEFAULT_NB_GOODS = 9 # ERC1155 vyper contract only accepts 10 tokens per mint/create -DEFAULT_NB_CURRENCIES = 1 -DEFAULT_TX_FEE = 1 -DEFAULT_BASE_GOOD_ENDOWMENT = 2 -DEFAULT_LOWER_BOUND_FACTOR = 1 -DEFAULT_UPPER_BOUND_FACTOR = 1 -DEFAULT_START_TIME = "01 01 2020 00:01" -DEFAULT_REGISTRATION_TIMEOUT = 60 -DEFAULT_ITEM_SETUP_TIMEOUT = 60 -DEFAULT_COMPETITION_TIMEOUT = 300 -DEFAULT_INACTIVITY_TIMEOUT = 30 -DEFAULT_VERSION = "v1" -DEFAULT_LEDGER_ID = "ethereum" - - -class Parameters(Model): - """This class contains the parameters of the game.""" - - def __init__(self, **kwargs): - """Instantiate the search class.""" - - self._ledger = kwargs.pop("ledger", DEFAULT_LEDGER_ID) - self._contract_address = kwargs.pop( - "contract_adress", None - ) # type: Optional[str] - self._good_ids = kwargs.pop("good_ids", []) # type: List[int] - self._currency_ids = kwargs.pop("currency_ids", []) # type: List[int] - self._min_nb_agents = kwargs.pop( - "min_nb_agents", DEFAULT_MIN_NB_AGENTS - ) # type: int - self._money_endowment = kwargs.pop( - "money_endowment", DEFAULT_MONEY_ENDOWMENT - ) # type: int - self._nb_goods = DEFAULT_NB_GOODS - self._nb_currencies = DEFAULT_NB_CURRENCIES - self._tx_fee = kwargs.pop("tx_fee", DEFAULT_TX_FEE) - self._base_good_endowment = kwargs.pop( - "base_good_endowment", DEFAULT_BASE_GOOD_ENDOWMENT - ) # type: int - self._lower_bound_factor = kwargs.pop( - "lower_bound_factor", DEFAULT_LOWER_BOUND_FACTOR - ) # type: int - self._upper_bound_factor = kwargs.pop( - "upper_bound_factor", DEFAULT_UPPER_BOUND_FACTOR - ) # type: int - start_time = kwargs.pop("start_time", DEFAULT_START_TIME) # type: str - self._start_time = datetime.datetime.strptime( - start_time, "%d %m %Y %H:%M" - ) # type: datetime.datetime - self._registration_timeout = kwargs.pop( - "registration_timeout", DEFAULT_REGISTRATION_TIMEOUT - ) # type: int - self._item_setup_timeout = kwargs.pop( - "item_setup_timeout", DEFAULT_ITEM_SETUP_TIMEOUT - ) # type: int - self._competition_timeout = kwargs.pop( - "competition_timeout", DEFAULT_COMPETITION_TIMEOUT - ) # type: int - self._inactivity_timeout = kwargs.pop( - "inactivity_timeout", DEFAULT_INACTIVITY_TIMEOUT - ) # type: int - self._whitelist = set(kwargs.pop("whitelist", [])) # type: Set[str] - self._version_id = kwargs.pop("version_id", DEFAULT_VERSION) # type: str - super().__init__(**kwargs) - now = datetime.datetime.now() - if now > self.registration_start_time: - self.context.logger.warning( - "TAC registration start time {} is in the past! Deregistering skill.".format( - self.registration_start_time - ) - ) - self.context.is_active = False - else: - self.context.logger.info( - "TAC registation start time: {}, and registration end time: {}, and start time: {}, and end time: {}".format( - self.registration_start_time, - self.registration_end_time, - self.start_time, - self.end_time, - ) - ) - self._check_consistency() - - @property - def ledger(self) -> str: - """Get the ledger identifier.""" - return self._ledger - - @property - def contract_address(self) -> str: - """The contract address of an already deployed smart-contract.""" - if self._contract_address is None: - raise AEAEnforceError("No contract address provided.") - return self._contract_address - - @property - def is_contract_deployed(self) -> bool: - """Check if there is a deployed instance of the contract.""" - return self._contract_address is not None - - @property - def good_ids(self) -> List[int]: - """The item ids of an already deployed smart-contract.""" - enforce(self.is_contract_deployed, "There is no deployed contract.") - enforce(self._good_ids != [], "No good_ids provided.") - return self._good_ids - - @property - def currency_ids(self) -> List[int]: - """The currency ids of an already deployed smart-contract.""" - enforce(self.is_contract_deployed, "There is no deployed contract.") - enforce(self._currency_ids != [], "No currency_ids provided.") - return self._currency_ids - - @property - def min_nb_agents(self) -> int: - """Minimum number of agents required for a TAC instance.""" - return self._min_nb_agents - - @property - def money_endowment(self) -> int: - """Money endowment per agent for a TAC instance.""" - return self._money_endowment - - @property - def nb_goods(self) -> int: - """Good number for a TAC instance.""" - return self._nb_goods - - @property - def nb_currencies(self) -> int: - """Currency number for a TAC instance.""" - return self._nb_currencies - - @property - def tx_fee(self) -> int: - """Transaction fee for a TAC instance.""" - return self._tx_fee - - @property - def base_good_endowment(self) -> int: - """Minimum endowment of each agent for each good.""" - return self._base_good_endowment - - @property - def lower_bound_factor(self) -> int: - """Lower bound of a uniform distribution.""" - return self._lower_bound_factor - - @property - def upper_bound_factor(self) -> int: - """Upper bound of a uniform distribution.""" - return self._upper_bound_factor - - @property - def registration_start_time(self) -> datetime.datetime: - """TAC registration start time.""" - return ( - self._start_time - - datetime.timedelta(seconds=self._item_setup_timeout) - - datetime.timedelta(seconds=self._registration_timeout) - ) - - @property - def registration_end_time(self) -> datetime.datetime: - """TAC registration end time.""" - return self._start_time - datetime.timedelta(seconds=self._item_setup_timeout) - - @property - def start_time(self) -> datetime.datetime: - """TAC start time.""" - return self._start_time - - @property - def end_time(self) -> datetime.datetime: - """TAC end time.""" - return self._start_time + datetime.timedelta(seconds=self._competition_timeout) - - @property - def inactivity_timeout(self): - """Timeout of agent inactivity from controller perspective (no received transactions).""" - return self._inactivity_timeout - - @property - def whitelist(self) -> Set[str]: - """Whitelist of agent addresses allowed into the TAC instance.""" - return self._whitelist - - @property - def version_id(self) -> str: - """Version id.""" - return self._version_id - - def _check_consistency(self) -> None: - """Check the parameters are consistent.""" - if self._contract_address is not None and ( - self._good_ids == [] - or self._currency_ids == [] - or len(self._good_ids) != self._nb_goods - or len(self._currency_ids) != self._nb_currencies - ): - raise ValueError( - "If the contract address is set, then good ids and currency id must be provided and consistent." - ) +Parameters = BaseParameters diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 42af59473b..e23ef0f683 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -20,7 +20,8 @@ contracts: protocols: - fetchai/oef_search:0.6.0 - fetchai/tac:0.6.0 -skills: [] +skills: +- fetchai/tac_control:0.7.0 behaviours: contract: args: @@ -28,21 +29,27 @@ behaviours: class_name: ContractBehaviour tac: args: {} - class_name: TACBehaviour + class_name: TacBehaviour handlers: oef: args: {} - class_name: OEFRegistrationHandler + class_name: OefSearchHandler tac: args: {} - class_name: TACHandler + class_name: TacHandler transaction: args: {} class_name: TransactionHandler models: + default_dialogues: + args: {} + class_name: DefaultDialogues game: args: {} class_name: Game + oef_search_dialogues: + args: {} + class_name: OefSearchDialogues parameters: args: base_good_endowment: 4 @@ -52,16 +59,26 @@ models: inactivity_timeout: 60 item_setup_timeout: 120 ledger: ethereum + location: + latitude: 0.127 + longitude: 51.5194 lower_bound_factor: 1 min_nb_agents: 2 money_endowment: 2000000 + nb_goods: 10 registration_timeout: 60 + service_data: + key: tac + value: v1 start_time: 09 03 2020 15:15 tx_fee: 1 upper_bound_factor: 1 version_id: v1 whitelist: [] class_name: Parameters + tac_dialogues: + args: {} + class_name: TacDialogues dependencies: numpy: {} vyper: From b5c011bcbd07707ab1c449bd5c078f1458a1d08e Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Sun, 20 Sep 2020 15:19:54 +0200 Subject: [PATCH 013/131] add isort. --- .github/workflows/workflow.yml | 1 + .pylintrc | 4 +- Makefile | 1 + Pipfile | 5 +- aea/__init__.py | 13 ++- aea/aea.py | 2 +- aea/aea_builder.py | 3 +- aea/agent.py | 1 - aea/agent_loop.py | 3 +- aea/cli/__main__.py | 1 - aea/cli/config.py | 7 +- aea/cli/create.py | 2 +- aea/cli/fetch.py | 2 +- aea/cli/fingerprint.py | 8 +- aea/cli/freeze.py | 2 +- aea/cli/generate_key.py | 2 +- aea/cli/generate_wealth.py | 2 +- aea/cli/get_multiaddress.py | 8 +- aea/cli/get_wealth.py | 2 +- aea/cli/install.py | 2 +- aea/cli/launch.py | 2 +- aea/cli/list.py | 2 +- aea/cli/registry/utils.py | 1 - aea/cli/run.py | 2 +- aea/cli/scaffold.py | 5 +- aea/cli/search.py | 2 +- aea/cli/utils/config.py | 4 +- aea/cli/utils/constants.py | 1 - aea/cli/utils/context.py | 4 +- aea/cli/utils/decorators.py | 8 +- aea/cli/utils/generic.py | 3 +- aea/cli/utils/loggers.py | 1 - aea/cli/utils/package_utils.py | 5 +- aea/cli_gui/__init__.py | 12 +-- aea/components/loader.py | 6 +- aea/configurations/base.py | 5 +- aea/configurations/loader.py | 6 +- aea/configurations/pypi.py | 2 +- aea/connections/base.py | 11 +-- aea/connections/stub/connection.py | 1 - aea/connections/stub/connection.yaml | 2 +- aea/contracts/base.py | 9 +- aea/crypto/__init__.py | 7 +- aea/crypto/base.py | 1 - aea/crypto/cosmos.py | 4 +- aea/crypto/ethereum.py | 7 +- aea/crypto/fetchai.py | 3 +- aea/crypto/wallet.py | 2 +- aea/decision_maker/default.py | 2 +- aea/helpers/async_utils.py | 4 +- aea/helpers/base.py | 3 +- aea/helpers/file_lock.py | 4 +- aea/helpers/ipfs/base.py | 3 +- aea/helpers/ipfs/pb/merkledag_pb2.py | 3 +- aea/helpers/ipfs/pb/unixfs_pb2.py | 3 +- aea/helpers/logging.py | 2 +- aea/helpers/multiaddr/base.py | 4 +- aea/helpers/multiaddr/crypto_pb2.py | 5 +- aea/helpers/multiple_executor.py | 3 +- aea/helpers/search/models.py | 2 +- aea/launcher.py | 3 +- aea/mail/base_pb2.py | 3 +- aea/multiplexer.py | 12 +-- aea/protocols/base.py | 8 +- aea/protocols/default/dialogues.py | 2 +- aea/protocols/default/message.py | 2 +- aea/protocols/default/protocol.yaml | 6 +- aea/protocols/default/serialization.py | 5 +- aea/protocols/dialogue/base.py | 2 +- aea/protocols/generator/base.py | 20 ++-- .../generator/extract_specification.py | 4 +- aea/protocols/generator/validate.py | 6 +- aea/protocols/scaffold/protocol.yaml | 2 +- aea/protocols/scaffold/serialization.py | 3 +- aea/protocols/signing/dialogues.py | 2 +- aea/protocols/signing/message.py | 2 +- aea/protocols/signing/protocol.yaml | 6 +- aea/protocols/signing/serialization.py | 19 ++-- aea/protocols/state_update/dialogues.py | 2 +- aea/protocols/state_update/message.py | 2 +- aea/protocols/state_update/protocol.yaml | 6 +- aea/protocols/state_update/serialization.py | 5 +- aea/registries/base.py | 2 +- aea/registries/filter.py | 5 +- aea/registries/resources.py | 2 +- aea/runner.py | 1 - aea/runtime.py | 3 +- aea/skills/base.py | 2 +- aea/skills/tasks.py | 2 +- aea/test_tools/click_testing.py | 3 +- aea/test_tools/test_cases.py | 2 - .../react_multi_agents_fake_connection.py | 3 +- benchmark/cases/react_speed_multi_agents.py | 3 +- benchmark/checks/check_mem_usage.py | 5 +- benchmark/checks/check_multiagent.py | 16 ++-- benchmark/checks/check_proactive.py | 8 +- benchmark/checks/check_reactive.py | 7 +- benchmark/checks/utils.py | 7 +- benchmark/framework/aea_test_wrapper.py | 3 +- benchmark/framework/executor.py | 3 - benchmark/framework/report_printer.py | 1 - examples/gym_ex/gyms/env.py | 3 +- examples/gym_ex/proxy/agent.py | 6 +- examples/gym_ex/proxy/env.py | 13 +-- examples/gym_ex/rl/agent.py | 1 - .../fetchai/connections/gym/connection.py | 4 +- .../fetchai/connections/gym/connection.yaml | 2 +- .../connections/http_client/connection.py | 4 +- .../connections/http_client/connection.yaml | 2 +- .../connections/http_server/connection.py | 12 +-- .../connections/http_server/connection.yaml | 2 +- packages/fetchai/connections/ledger/base.py | 3 +- .../fetchai/connections/ledger/connection.py | 8 +- .../connections/ledger/connection.yaml | 8 +- .../connections/ledger/contract_dispatcher.py | 14 +-- .../connections/ledger/ledger_dispatcher.py | 12 +-- .../fetchai/connections/local/connection.py | 3 +- .../fetchai/connections/local/connection.yaml | 2 +- .../fetchai/connections/oef/connection.py | 4 +- .../fetchai/connections/oef/connection.yaml | 4 +- .../connections/oef/object_translator.py | 41 +++----- .../connections/p2p_libp2p/connection.py | 2 +- .../connections/p2p_libp2p/connection.yaml | 2 +- .../p2p_libp2p_client/connection.py | 2 +- .../p2p_libp2p_client/connection.yaml | 2 +- .../connections/p2p_stub/connection.py | 2 +- .../connections/p2p_stub/connection.yaml | 2 +- .../fetchai/connections/soef/connection.py | 6 +- .../fetchai/connections/soef/connection.yaml | 2 +- .../fetchai/connections/tcp/connection.yaml | 4 +- .../fetchai/connections/tcp/tcp_client.py | 3 +- .../fetchai/connections/tcp/tcp_server.py | 3 +- .../fetchai/connections/webhook/connection.py | 3 +- .../connections/webhook/connection.yaml | 2 +- .../fetchai/contracts/erc1155/contract.py | 2 +- .../fetchai/contracts/erc1155/contract.yaml | 2 +- .../protocols/contract_api/dialogues.py | 3 +- .../fetchai/protocols/contract_api/message.py | 3 +- .../protocols/contract_api/protocol.yaml | 6 +- .../protocols/contract_api/serialization.py | 16 ++-- packages/fetchai/protocols/fipa/dialogues.py | 3 +- packages/fetchai/protocols/fipa/message.py | 3 +- packages/fetchai/protocols/fipa/protocol.yaml | 6 +- .../fetchai/protocols/fipa/serialization.py | 9 +- packages/fetchai/protocols/gym/dialogues.py | 3 +- packages/fetchai/protocols/gym/message.py | 3 +- packages/fetchai/protocols/gym/protocol.yaml | 6 +- .../fetchai/protocols/gym/serialization.py | 6 +- packages/fetchai/protocols/http/dialogues.py | 3 +- packages/fetchai/protocols/http/message.py | 2 +- packages/fetchai/protocols/http/protocol.yaml | 6 +- .../fetchai/protocols/http/serialization.py | 6 +- .../protocols/ledger_api/custom_types.py | 1 - .../fetchai/protocols/ledger_api/dialogues.py | 3 +- .../fetchai/protocols/ledger_api/message.py | 3 +- .../protocols/ledger_api/protocol.yaml | 8 +- .../protocols/ledger_api/serialization.py | 18 ++-- .../protocols/ml_trade/custom_types.py | 1 - .../fetchai/protocols/ml_trade/dialogues.py | 3 +- .../fetchai/protocols/ml_trade/message.py | 3 +- .../fetchai/protocols/ml_trade/protocol.yaml | 8 +- .../protocols/ml_trade/serialization.py | 9 +- .../protocols/oef_search/custom_types.py | 1 - .../fetchai/protocols/oef_search/dialogues.py | 3 +- .../fetchai/protocols/oef_search/message.py | 3 +- .../protocols/oef_search/protocol.yaml | 8 +- .../protocols/oef_search/serialization.py | 16 ++-- .../fetchai/protocols/tac/custom_types.py | 1 - packages/fetchai/protocols/tac/dialogues.py | 3 +- packages/fetchai/protocols/tac/message.py | 3 +- packages/fetchai/protocols/tac/protocol.yaml | 8 +- .../fetchai/protocols/tac/serialization.py | 6 +- .../fetchai/skills/aries_alice/behaviours.py | 3 +- .../fetchai/skills/aries_alice/dialogues.py | 1 - .../fetchai/skills/aries_alice/handlers.py | 3 +- .../fetchai/skills/aries_alice/skill.yaml | 6 +- .../fetchai/skills/aries_faber/behaviours.py | 3 +- .../fetchai/skills/aries_faber/dialogues.py | 1 - .../fetchai/skills/aries_faber/handlers.py | 3 +- .../fetchai/skills/aries_faber/skill.yaml | 8 +- .../fetchai/skills/aries_faber/strategy.py | 7 +- .../skills/carpark_client/behaviours.py | 1 - .../fetchai/skills/carpark_client/handlers.py | 1 - .../fetchai/skills/carpark_client/skill.yaml | 6 +- .../fetchai/skills/carpark_client/strategy.py | 1 - .../skills/carpark_detection/behaviours.py | 1 - .../skills/carpark_detection/dialogues.py | 1 - .../skills/carpark_detection/handlers.py | 1 - .../skills/carpark_detection/skill.yaml | 8 +- .../skills/carpark_detection/strategy.py | 1 - packages/fetchai/skills/echo/handlers.py | 4 +- packages/fetchai/skills/echo/skill.yaml | 2 +- .../skills/erc1155_client/behaviours.py | 1 - .../skills/erc1155_client/dialogues.py | 1 - .../fetchai/skills/erc1155_client/handlers.py | 3 +- .../fetchai/skills/erc1155_client/skill.yaml | 6 +- .../skills/erc1155_deploy/behaviours.py | 1 - .../skills/erc1155_deploy/dialogues.py | 1 - .../fetchai/skills/erc1155_deploy/handlers.py | 4 +- .../fetchai/skills/erc1155_deploy/skill.yaml | 8 +- .../fetchai/skills/erc1155_deploy/strategy.py | 1 - .../skills/generic_buyer/behaviours.py | 1 - .../fetchai/skills/generic_buyer/dialogues.py | 2 - .../fetchai/skills/generic_buyer/handlers.py | 3 +- .../fetchai/skills/generic_buyer/skill.yaml | 6 +- .../skills/generic_seller/behaviours.py | 2 - .../skills/generic_seller/dialogues.py | 1 - .../fetchai/skills/generic_seller/handlers.py | 3 +- .../fetchai/skills/generic_seller/skill.yaml | 6 +- packages/fetchai/skills/gym/dialogues.py | 2 - packages/fetchai/skills/gym/handlers.py | 1 - packages/fetchai/skills/gym/helpers.py | 3 +- packages/fetchai/skills/gym/skill.yaml | 8 +- packages/fetchai/skills/gym/tasks.py | 1 - .../fetchai/skills/http_echo/dialogues.py | 2 - packages/fetchai/skills/http_echo/handlers.py | 1 - packages/fetchai/skills/http_echo/skill.yaml | 4 +- .../skills/ml_data_provider/behaviours.py | 1 - .../skills/ml_data_provider/dialogues.py | 1 - .../skills/ml_data_provider/handlers.py | 3 +- .../skills/ml_data_provider/skill.yaml | 8 +- .../skills/ml_data_provider/strategy.py | 1 - .../fetchai/skills/ml_train/behaviours.py | 1 - packages/fetchai/skills/ml_train/dialogues.py | 2 - packages/fetchai/skills/ml_train/handlers.py | 4 +- packages/fetchai/skills/ml_train/skill.yaml | 8 +- packages/fetchai/skills/ml_train/tasks.py | 1 - .../simple_service_registration/behaviours.py | 1 - .../simple_service_registration/dialogues.py | 2 - .../simple_service_registration/handlers.py | 3 +- .../simple_service_registration/skill.yaml | 6 +- .../fetchai/skills/tac_control/behaviours.py | 3 +- .../fetchai/skills/tac_control/dialogues.py | 2 - packages/fetchai/skills/tac_control/game.py | 3 +- .../fetchai/skills/tac_control/handlers.py | 3 +- .../fetchai/skills/tac_control/helpers.py | 2 +- .../fetchai/skills/tac_control/skill.yaml | 10 +- .../skills/tac_control_contract/behaviours.py | 3 +- .../skills/tac_control_contract/game.py | 3 +- .../skills/tac_control_contract/handlers.py | 1 - .../skills/tac_control_contract/helpers.py | 3 +- .../skills/tac_control_contract/skill.yaml | 8 +- .../skills/tac_negotiation/behaviours.py | 1 - .../skills/tac_negotiation/dialogues.py | 4 +- .../skills/tac_negotiation/handlers.py | 3 +- .../fetchai/skills/tac_negotiation/helpers.py | 2 +- .../fetchai/skills/tac_negotiation/skill.yaml | 12 +-- .../skills/tac_negotiation/strategy.py | 4 +- .../skills/tac_negotiation/transactions.py | 3 +- .../skills/tac_participation/behaviours.py | 3 +- .../skills/tac_participation/dialogues.py | 2 - .../fetchai/skills/tac_participation/game.py | 1 - .../skills/tac_participation/handlers.py | 3 +- .../skills/tac_participation/skill.yaml | 8 +- .../fetchai/skills/thermometer/behaviours.py | 1 - .../fetchai/skills/thermometer/dialogues.py | 1 - .../fetchai/skills/thermometer/handlers.py | 1 - .../fetchai/skills/thermometer/skill.yaml | 6 +- .../skills/thermometer_client/behaviours.py | 1 - .../skills/thermometer_client/handlers.py | 1 - .../skills/thermometer_client/skill.yaml | 6 +- .../skills/thermometer_client/strategy.py | 1 - .../skills/weather_client/behaviours.py | 1 - .../fetchai/skills/weather_client/handlers.py | 1 - .../fetchai/skills/weather_client/skill.yaml | 6 +- .../fetchai/skills/weather_client/strategy.py | 1 - .../skills/weather_station/behaviours.py | 1 - .../weather_station/db_communication.py | 2 +- .../skills/weather_station/dialogues.py | 1 - .../skills/weather_station/handlers.py | 1 - .../fetchai/skills/weather_station/skill.yaml | 8 +- packages/hashes.csv | 96 +++++++++---------- scripts/acn/run_acn_node_standalone.py | 8 +- scripts/check_package_dependencies.py | 2 - scripts/check_package_versions_in_docs.py | 2 - scripts/deploy_to_registry.py | 3 +- scripts/generate_ipfs_hashes.py | 5 +- scripts/oef/launch.py | 5 +- scripts/update_package_versions.py | 5 +- setup.cfg | 9 ++ .../common/oef_search_pluto_scripts/launch.py | 5 +- tests/common/utils.py | 2 - tests/conftest.py | 34 +++---- tests/data/generator/t_protocol/dialogues.py | 3 +- tests/data/generator/t_protocol/message.py | 3 +- .../generator/t_protocol/serialization.py | 6 +- .../generator/t_protocol_no_ct/dialogues.py | 3 +- .../generator/t_protocol_no_ct/message.py | 2 +- .../t_protocol_no_ct/serialization.py | 6 +- tests/test_aea.py | 4 +- tests/test_aea_builder.py | 6 +- tests/test_agent.py | 2 - tests/test_agent_loop.py | 1 - tests/test_cli/test_add/test_connection.py | 9 +- tests/test_cli/test_add/test_contract.py | 3 +- tests/test_cli/test_add/test_generic.py | 3 +- tests/test_cli/test_add/test_protocol.py | 9 +- tests/test_cli/test_add/test_skill.py | 9 +- tests/test_cli/test_add_key.py | 5 +- tests/test_cli/test_config.py | 3 +- tests/test_cli/test_core.py | 2 +- tests/test_cli/test_create.py | 7 +- tests/test_cli/test_delete.py | 1 - tests/test_cli/test_fetch.py | 6 +- tests/test_cli/test_fingerprint.py | 3 +- tests/test_cli/test_freeze.py | 6 +- tests/test_cli/test_generate/test_generate.py | 3 +- .../test_cli/test_generate/test_protocols.py | 6 +- tests/test_cli/test_generate_key.py | 1 - tests/test_cli/test_generate_wealth.py | 3 +- tests/test_cli/test_get_address.py | 3 +- tests/test_cli/test_get_multiaddress.py | 2 - tests/test_cli/test_get_wealth.py | 3 +- tests/test_cli/test_gui.py | 4 +- tests/test_cli/test_init.py | 1 - tests/test_cli/test_install.py | 5 +- tests/test_cli/test_interact.py | 3 +- tests/test_cli/test_launch.py | 7 +- tests/test_cli/test_list.py | 5 +- tests/test_cli/test_loggers.py | 2 +- tests/test_cli/test_login.py | 3 +- tests/test_cli/test_logout.py | 3 +- tests/test_cli/test_publish.py | 3 +- tests/test_cli/test_push.py | 3 +- tests/test_cli/test_register.py | 3 +- tests/test_cli/test_registry/test_add.py | 2 +- tests/test_cli/test_registry/test_fetch.py | 3 +- tests/test_cli/test_registry/test_login.py | 2 +- tests/test_cli/test_registry/test_logout.py | 2 +- tests/test_cli/test_registry/test_publish.py | 3 +- tests/test_cli/test_registry/test_push.py | 3 +- .../test_registry/test_registration.py | 2 +- tests/test_cli/test_registry/test_utils.py | 3 +- tests/test_cli/test_remove/test_connection.py | 3 +- tests/test_cli/test_remove/test_contract.py | 3 +- tests/test_cli/test_remove/test_protocol.py | 3 +- .../test_cli/test_remove/test_remove_item.py | 3 +- tests/test_cli/test_remove/test_skill.py | 1 - tests/test_cli/test_run.py | 10 +- .../test_cli/test_scaffold/test_connection.py | 6 +- tests/test_cli/test_scaffold/test_generic.py | 3 +- .../test_cli/test_scaffold/test_protocols.py | 6 +- tests/test_cli/test_scaffold/test_skills.py | 6 +- tests/test_cli/test_search.py | 5 +- tests/test_cli/test_utils/test_config.py | 3 +- tests/test_cli/test_utils/test_utils.py | 10 +- tests/test_cli_gui/test_create.py | 3 +- tests/test_cli_gui/test_get_items.py | 2 +- tests/test_cli_gui/test_misc.py | 1 - tests/test_cli_gui/test_run_agent.py | 3 +- tests/test_cli_gui/test_utils.py | 4 +- tests/test_components/test_base.py | 1 - tests/test_configurations/test_aea_config.py | 5 +- tests/test_configurations/test_base.py | 17 ++-- tests/test_configurations/test_loader.py | 2 - tests/test_configurations/test_schema.py | 17 ++-- tests/test_connections/test_stub.py | 5 +- tests/test_context/test_base.py | 1 - tests/test_contracts/test_base.py | 7 +- tests/test_crypto/test_cosmos.py | 6 +- tests/test_crypto/test_ethereum.py | 2 - tests/test_crypto/test_fetchai.py | 3 +- tests/test_crypto/test_helpers.py | 2 - tests/test_crypto/test_ledger_apis.py | 7 +- .../test_registry/test_crypto_registry.py | 1 - .../test_registry/test_ledger_api_registry.py | 1 - tests/test_crypto/test_wallet.py | 2 - tests/test_decision_maker/test_default.py | 4 +- .../test_ownership_state.py | 1 - tests/test_decision_maker/test_preferences.py | 1 - .../test_agent_vs_aea/agent_code_block.py | 1 - .../test_agent_vs_aea/test_agent_vs_aea.py | 1 - .../test_bash_yaml/test_demo_docs.py | 1 - .../programmatic_aea.py | 2 +- .../test_programmatic_aea.py | 1 - .../programmatic_aea.py | 3 +- .../test_cli_vs_programmatic_aea.py | 1 - .../decision_maker_transaction.py | 2 +- .../test_decision_maker_transaction.py | 7 +- tests/test_docs/test_docs_protocol.py | 2 - tests/test_docs/test_docs_skill.py | 1 - .../test_multiplexer_standalone.py | 3 - .../test_orm_integration.py | 3 - .../test_skill_guide/test_skill_guide.py | 2 - .../standalone_transaction.py | 1 - .../test_standalone_transaction.py | 6 +- tests/test_examples/test_gym_ex.py | 2 +- ..._client_connection_to_aries_cloud_agent.py | 4 - tests/test_helpers/test_async_utils.py | 4 +- tests/test_helpers/test_base.py | 6 +- tests/test_helpers/test_exec_timeout.py | 10 +- tests/test_helpers/test_ipfs/test_base.py | 3 +- tests/test_helpers/test_pipe/test_pipe.py | 5 +- tests/test_helpers/test_search/test_models.py | 2 +- tests/test_identity/test_base.py | 1 - tests/test_launcher.py | 8 +- tests/test_mail/test_base.py | 4 +- tests/test_multiplexer.py | 15 +-- tests/test_package_loading.py | 4 +- .../test_connections/test_gym/test_gym.py | 4 - .../test_http_client/test_http_client.py | 10 +- .../test_http_server/test_http_server.py | 11 +-- .../test_http_server_and_client.py | 11 +-- .../test_ledger/test_contract_api.py | 2 - .../test_ledger/test_ledger_api.py | 2 - .../test_connections/test_local/test_misc.py | 2 - .../test_local/test_search_services.py | 4 +- .../test_oef/test_communication.py | 9 +- .../test_connections/test_oef/test_models.py | 1 - .../test_oef/test_oef_serializer.py | 1 - .../test_p2p_libp2p/test_aea_cli.py | 1 - .../test_p2p_libp2p/test_communication.py | 2 - .../test_p2p_libp2p/test_errors.py | 11 +-- .../test_p2p_libp2p/test_fault_tolerance.py | 1 - .../test_p2p_libp2p/test_public_dht.py | 9 +- .../test_p2p_libp2p_client/test_aea_cli.py | 1 - .../test_communication.py | 2 - .../test_p2p_libp2p_client/test_errors.py | 4 +- .../test_p2p_stub/test_p2p_stub.py | 1 - .../test_connections/test_soef/models.py | 2 - .../test_connections/test_soef/test_soef.py | 2 - .../test_soef/test_soef_integration.py | 7 +- .../test_connections/test_tcp/test_base.py | 1 - .../test_tcp/test_communication.py | 1 - .../test_webhook/test_webhook.py | 10 +- .../test_erc1155/test_contract.py | 1 - .../test_protocols/test_contract_api.py | 4 +- .../test_packages/test_protocols/test_fipa.py | 4 +- .../test_packages/test_protocols/test_gym.py | 4 +- .../test_packages/test_protocols/test_http.py | 4 +- .../test_protocols/test_ledger_api.py | 4 +- .../test_protocols/test_ml_trade.py | 13 +-- .../test_protocols/test_oef_search.py | 13 +-- .../test_packages/test_protocols/test_tac.py | 6 +- .../test_packages/test_skills/test_carpark.py | 1 - .../test_packages/test_skills/test_erc1155.py | 1 - .../test_packages/test_skills/test_generic.py | 1 - tests/test_packages/test_skills/test_gym.py | 2 - .../test_skills/test_http_echo.py | 1 - .../test_skills/test_ml_skills.py | 1 - tests/test_packages/test_skills/test_tac.py | 1 - .../test_skills/test_thermometer.py | 1 - .../test_packages/test_skills/test_weather.py | 1 - tests/test_protocols/test_base.py | 1 - .../test_protocols/test_dialogue/test_base.py | 6 +- .../test_generator/test_common.py | 3 +- .../test_generator/test_end_to_end.py | 14 +-- .../test_extract_specification.py | 5 +- .../test_generator/test_generator.py | 8 +- .../test_generator/test_validate.py | 10 +- tests/test_protocols/test_signing.py | 1 - tests/test_registries/test_base.py | 3 +- tests/test_registries/test_filter.py | 2 - tests/test_runner.py | 7 +- tests/test_runtime.py | 2 - tests/test_skills/test_base.py | 9 +- tests/test_skills/test_behaviours.py | 2 +- tests/test_skills/test_error.py | 5 +- tests/test_skills/test_tasks.py | 4 +- tests/test_test_tools/test_testcases.py | 2 - tox.ini | 14 ++- 461 files changed, 730 insertions(+), 1279 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 81193a368a..4d48e1f1ed 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -52,6 +52,7 @@ jobs: - name: Code style check run: | tox -e black-check + tox -e isort-check tox -e flake8 - name: Unused code check run: tox -e vulture diff --git a/.pylintrc b/.pylintrc index f289c246a0..9b2784db56 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,9 +2,10 @@ ignore-patterns=serialization.py,message.py,__main__.py,.*_pb2.py [MESSAGES CONTROL] -disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W1202,W1203,R0902,R0913,R0914,R0801,R0904,R0903,R0911,R0912,R0901,R0916,R1702,R0915 +disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0902,R0913,R0914,R0801,R0904,R0903,R0911,R0912,R0901,R0916,R1702,R0915,R1725 ## Eventually resolve these: +# W0707: raise-missing-from # R0902: too-many-instance-attributes # R0913: too-many-arguments # R0914: too-many-locals @@ -16,6 +17,7 @@ disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W1202,W1203,R0902,R0913,R0914, # R0916: too-many-boolean-expressions # R1702: too-many-nested-blocks # R0915: too-many-statements +# R1725: super-with-arguments # decide on a logging policy: # W1202: logging-format-interpolation # W1203: logging-fstring-interpolation diff --git a/Makefile b/Makefile index 059e991009..6ffffecb1a 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,7 @@ clean-test: .PHONY: lint lint: black aea benchmark examples packages scripts tests + isort aea benchmark examples packages scripts tests flake8 aea benchmark examples packages scripts tests vulture aea scripts/whitelist.py --exclude "*_pb2.py" diff --git a/Pipfile b/Pipfile index d54d72e4e5..c5d3b65260 100644 --- a/Pipfile +++ b/Pipfile @@ -20,7 +20,7 @@ flake8 = "==3.7.9" flake8-bugbear = "==20.1.4" flake8-docstrings = "==1.5.0" flake8-eradicate = "==0.4.0" -flake8-import-order = "==0.18.1" +flake8-isort = "==4.0.0" gym = "==0.15.6" ipfshttpclient = "==0.6.1" liccheck = "==0.4.3" @@ -40,7 +40,7 @@ pexpect = "==4.8.0" psutil = "==5.7.0" pydocstyle = "==3.0.0" pygments = "==2.5.2" -pylint = "==2.5.2" +pylint = "==2.6.0" pymdown-extensions = "==6.3" pynacl = "==1.3.0" pytest = "==5.4.3" @@ -54,6 +54,7 @@ sqlalchemy = "==1.3.17" tox = "==3.15.1" vulture = "==2.1" vyper = "==0.1.0b12" +isort = "==5.5.2" [packages] # we don't specify dependencies for the library here for intallation as per: https://pipenv-fork.readthedocs.io/en/latest/advanced.html#pipfile-vs-setuppy diff --git a/aea/__init__.py b/aea/__init__.py index 8dbb4b319b..23ed8227c4 100644 --- a/aea/__init__.py +++ b/aea/__init__.py @@ -21,9 +21,16 @@ import inspect import os -import aea.crypto # triggers registry population -from aea.__version__ import __title__, __description__, __url__, __version__ -from aea.__version__ import __author__, __license__, __copyright__ +import aea.crypto # triggers registry population +from aea.__version__ import ( + __author__, + __copyright__, + __description__, + __license__, + __title__, + __url__, + __version__, +) AEA_DIR = os.path.dirname(inspect.getfile(inspect.currentframe())) # type: ignore diff --git a/aea/aea.py b/aea/aea.py index bb3ff4c5e2..882228b277 100644 --- a/aea/aea.py +++ b/aea/aea.py @@ -25,6 +25,7 @@ from typing import ( Any, Callable, + cast, Collection, Dict, List, @@ -32,7 +33,6 @@ Sequence, Tuple, Type, - cast, ) from aea.agent import Agent diff --git a/aea/aea_builder.py b/aea/aea_builder.py index 0b16148bda..ddfe577a6b 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -29,6 +29,7 @@ from pathlib import Path from typing import ( Any, + cast, Collection, Deque, Dict, @@ -38,11 +39,9 @@ Tuple, Type, Union, - cast, ) import jsonschema - from packaging.specifiers import SpecifierSet from aea import AEA_DIR diff --git a/aea/agent.py b/aea/agent.py index b62acaadf6..16188a0e03 100644 --- a/aea/agent.py +++ b/aea/agent.py @@ -29,7 +29,6 @@ from aea.multiplexer import InBox, OutBox from aea.runtime import AsyncRuntime, BaseRuntime, RuntimeStates, ThreadedRuntime - logger = logging.getLogger(__name__) diff --git a/aea/agent_loop.py b/aea/agent_loop.py index 59fff7c62d..5be8686f4c 100644 --- a/aea/agent_loop.py +++ b/aea/agent_loop.py @@ -32,14 +32,13 @@ from aea.exceptions import AEAException from aea.helpers.async_utils import ( AsyncState, + ensure_loop, HandlerItemGetter, PeriodicCaller, - ensure_loop, ) from aea.helpers.exec_timeout import ExecTimeoutThreadGuard, TimeoutException from aea.helpers.logging import WithLogger - logger = logging.getLogger(__name__) diff --git a/aea/cli/__main__.py b/aea/cli/__main__.py index b67db019ec..129ecab13f 100755 --- a/aea/cli/__main__.py +++ b/aea/cli/__main__.py @@ -22,6 +22,5 @@ from aea.cli.core import cli - if __name__ == "__main__": cli(prog_name="aea") # pragma: no cover diff --git a/aea/cli/config.py b/aea/cli/config.py index 06c18ae08b..51591d3ae0 100644 --- a/aea/cli/config.py +++ b/aea/cli/config.py @@ -19,15 +19,12 @@ """Implementation of the 'aea list' subcommand.""" -from typing import Dict, List, cast +from typing import cast, Dict, List import click from aea.cli.utils.click_utils import AEAJsonPathType -from aea.cli.utils.constants import ( - FALSE_EQUIVALENTS, - FROM_STRING_TO_TYPE, -) +from aea.cli.utils.constants import FALSE_EQUIVALENTS, FROM_STRING_TO_TYPE from aea.cli.utils.context import Context from aea.cli.utils.decorators import check_aea_project, pass_ctx from aea.cli.utils.generic import get_parent_object, load_yaml diff --git a/aea/cli/create.py b/aea/cli/create.py index 691ed37cdc..104e6a854d 100644 --- a/aea/cli/create.py +++ b/aea/cli/create.py @@ -21,7 +21,7 @@ import os from pathlib import Path -from typing import Optional, cast +from typing import cast, Optional import click diff --git a/aea/cli/fetch.py b/aea/cli/fetch.py index f56b4a70ad..2e7baff1e7 100644 --- a/aea/cli/fetch.py +++ b/aea/cli/fetch.py @@ -21,7 +21,7 @@ import os from distutils.dir_util import copy_tree -from typing import Optional, cast +from typing import cast, Optional import click diff --git a/aea/cli/fingerprint.py b/aea/cli/fingerprint.py index c52bebbafe..5909a9bf07 100644 --- a/aea/cli/fingerprint.py +++ b/aea/cli/fingerprint.py @@ -19,21 +19,19 @@ """Implementation of the 'aea add' subcommand.""" from pathlib import Path -from typing import Dict, cast +from typing import cast, Dict import click from aea.cli.utils.click_utils import PublicIdParameter from aea.cli.utils.context import Context from aea.configurations.base import ( # noqa: F401 # pylint: disable=unused-import + _compute_fingerprint, + _get_default_configuration_file_name_from_type, DEFAULT_CONNECTION_CONFIG_FILE, DEFAULT_PROTOCOL_CONFIG_FILE, DEFAULT_SKILL_CONFIG_FILE, - _compute_fingerprint, -) -from aea.configurations.base import ( PublicId, - _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader diff --git a/aea/cli/freeze.py b/aea/cli/freeze.py index 6dbae8eca0..a537ffba31 100644 --- a/aea/cli/freeze.py +++ b/aea/cli/freeze.py @@ -19,7 +19,7 @@ """Implementation of the 'aea delete' subcommand.""" -from typing import List, cast +from typing import cast, List import click diff --git a/aea/cli/generate_key.py b/aea/cli/generate_key.py index 8173a276ec..1825c34665 100644 --- a/aea/cli/generate_key.py +++ b/aea/cli/generate_key.py @@ -24,7 +24,7 @@ import click -from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA, create_private_key +from aea.crypto.helpers import create_private_key, PRIVATE_KEY_PATH_SCHEMA from aea.crypto.registries import crypto_registry diff --git a/aea/cli/generate_wealth.py b/aea/cli/generate_wealth.py index c8d346a4a0..1a6c5d9386 100644 --- a/aea/cli/generate_wealth.py +++ b/aea/cli/generate_wealth.py @@ -19,7 +19,7 @@ """Implementation of the 'aea generate_wealth' subcommand.""" -from typing import Dict, Optional, cast +from typing import cast, Dict, Optional import click diff --git a/aea/cli/get_multiaddress.py b/aea/cli/get_multiaddress.py index 81d63ad2f3..a76dcbd1ae 100644 --- a/aea/cli/get_multiaddress.py +++ b/aea/cli/get_multiaddress.py @@ -21,7 +21,7 @@ import re import typing from pathlib import Path -from typing import Optional, Tuple, cast +from typing import cast, Optional, Tuple import click from click import ClickException @@ -31,16 +31,12 @@ from aea.cli.utils.context import Context from aea.cli.utils.decorators import check_aea_project from aea.cli.utils.package_utils import get_package_path_unified -from aea.configurations.base import ( - ConnectionConfig, - PublicId, -) +from aea.configurations.base import ConnectionConfig, PublicId from aea.crypto.base import Crypto from aea.crypto.registries import crypto_registry from aea.exceptions import enforce from aea.helpers.multiaddr.base import MultiAddr - URI_REGEX = re.compile(r"(?:https?://)?(?P[^:/ ]+):(?P[0-9]*)") diff --git a/aea/cli/get_wealth.py b/aea/cli/get_wealth.py index 021c48faa1..ee5679e2c4 100644 --- a/aea/cli/get_wealth.py +++ b/aea/cli/get_wealth.py @@ -19,7 +19,7 @@ """Implementation of the 'aea get_wealth' subcommand.""" -from typing import Dict, Optional, cast +from typing import cast, Dict, Optional import click diff --git a/aea/cli/install.py b/aea/cli/install.py index 88ce64dfd5..5295453ef0 100644 --- a/aea/cli/install.py +++ b/aea/cli/install.py @@ -22,7 +22,7 @@ import pprint import subprocess # nosec import sys -from typing import List, Optional, cast +from typing import cast, List, Optional import click diff --git a/aea/cli/launch.py b/aea/cli/launch.py index a35458d39b..734d19cba8 100644 --- a/aea/cli/launch.py +++ b/aea/cli/launch.py @@ -20,7 +20,7 @@ import sys from collections import OrderedDict from pathlib import Path -from typing import List, cast +from typing import cast, List import click diff --git a/aea/cli/list.py b/aea/cli/list.py index a827e8c821..ecd1c82d04 100644 --- a/aea/cli/list.py +++ b/aea/cli/list.py @@ -30,9 +30,9 @@ from aea.cli.utils.decorators import check_aea_project, pass_ctx from aea.cli.utils.formatting import format_items, retrieve_details, sort_items from aea.configurations.base import ( + _get_default_configuration_file_name_from_type, PackageType, PublicId, - _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader diff --git a/aea/cli/registry/utils.py b/aea/cli/registry/utils.py index 323fdef364..720edb1b1a 100644 --- a/aea/cli/registry/utils.py +++ b/aea/cli/registry/utils.py @@ -24,7 +24,6 @@ from json.decoder import JSONDecodeError import click - import requests from aea.cli.registry.settings import AUTH_TOKEN_KEY, REGISTRY_API_URL diff --git a/aea/cli/run.py b/aea/cli/run.py index 1d7e9bb160..146cfff7eb 100644 --- a/aea/cli/run.py +++ b/aea/cli/run.py @@ -20,7 +20,7 @@ """Implementation of the 'aea run' subcommand.""" from pathlib import Path -from typing import List, Optional, cast +from typing import cast, List, Optional import click diff --git a/aea/cli/scaffold.py b/aea/cli/scaffold.py index 48fdab355b..b2942ec590 100644 --- a/aea/cli/scaffold.py +++ b/aea/cli/scaffold.py @@ -24,7 +24,6 @@ from pathlib import Path import click - from jsonschema import ValidationError from aea import AEA_DIR @@ -32,12 +31,14 @@ from aea.cli.utils.decorators import check_aea_project, clean_after, pass_ctx from aea.cli.utils.loggers import logger from aea.cli.utils.package_utils import validate_package_name -from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, DEFAULT_VERSION, PublicId from aea.configurations.base import ( # noqa: F401 # pylint: disable=unused-import + DEFAULT_AEA_CONFIG_FILE, DEFAULT_CONNECTION_CONFIG_FILE, DEFAULT_CONTRACT_CONFIG_FILE, DEFAULT_PROTOCOL_CONFIG_FILE, DEFAULT_SKILL_CONFIG_FILE, + DEFAULT_VERSION, + PublicId, ) diff --git a/aea/cli/search.py b/aea/cli/search.py index 4e5513be1b..02abc70937 100644 --- a/aea/cli/search.py +++ b/aea/cli/search.py @@ -21,7 +21,7 @@ import os from pathlib import Path -from typing import Dict, List, Tuple, cast +from typing import cast, Dict, List, Tuple import click diff --git a/aea/cli/utils/config.py b/aea/cli/utils/config.py index 71bc9b50ff..5903954b40 100644 --- a/aea/cli/utils/config.py +++ b/aea/cli/utils/config.py @@ -26,9 +26,7 @@ from typing import Dict, Tuple import click - import jsonschema - import yaml from aea.cli.utils.constants import ( @@ -40,10 +38,10 @@ from aea.cli.utils.exceptions import AEAConfigException from aea.cli.utils.generic import load_yaml from aea.configurations.base import ( + _get_default_configuration_file_name_from_type, DEFAULT_AEA_CONFIG_FILE, PackageConfiguration, PackageType, - _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader, ConfigLoaders from aea.exceptions import AEAException diff --git a/aea/cli/utils/constants.py b/aea/cli/utils/constants.py index 0504843d48..4f699a7be6 100644 --- a/aea/cli/utils/constants.py +++ b/aea/cli/utils/constants.py @@ -30,7 +30,6 @@ DEFAULT_SKILL_CONFIG_FILE, ) - AEA_DIR = str(Path(".")) ITEM_TYPES = ("connection", "contract", "protocol", "skill") diff --git a/aea/cli/utils/context.py b/aea/cli/utils/context.py index 3bdb651525..85aeb8a4d1 100644 --- a/aea/cli/utils/context.py +++ b/aea/cli/utils/context.py @@ -20,15 +20,15 @@ """A module with context tools of the aea cli.""" from pathlib import Path -from typing import Dict, List, cast +from typing import cast, Dict, List from aea.cli.utils.loggers import logger from aea.configurations.base import ( + _get_default_configuration_file_name_from_type, AgentConfig, Dependencies, PackageType, PublicId, - _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader diff --git a/aea/cli/utils/decorators.py b/aea/cli/utils/decorators.py index 20a41f367d..f702a7226b 100644 --- a/aea/cli/utils/decorators.py +++ b/aea/cli/utils/decorators.py @@ -23,25 +23,23 @@ import shutil from functools import update_wrapper from pathlib import Path -from typing import Callable, Dict, Union, cast +from typing import Callable, cast, Dict, Union import click - from jsonschema import ValidationError from aea.cli.utils.config import try_to_load_agent_config from aea.cli.utils.context import Context from aea.configurations.base import ( - PackageType, - PublicId, _check_aea_version, _compare_fingerprints, _get_default_configuration_file_name_from_type, + PackageType, + PublicId, ) from aea.configurations.loader import ConfigLoaders from aea.exceptions import AEAException, enforce - pass_ctx = click.make_pass_decorator(Context) diff --git a/aea/cli/utils/generic.py b/aea/cli/utils/generic.py index f7e0e72757..582d673b2b 100644 --- a/aea/cli/utils/generic.py +++ b/aea/cli/utils/generic.py @@ -22,9 +22,8 @@ import os from typing import Dict, List -from click import ClickException - import yaml +from click import ClickException def get_parent_object(obj: Dict, dotted_path: List[str]): diff --git a/aea/cli/utils/loggers.py b/aea/cli/utils/loggers.py index 237315f396..b549d39aa5 100644 --- a/aea/cli/utils/loggers.py +++ b/aea/cli/utils/loggers.py @@ -24,7 +24,6 @@ import click - OFF = 100 logging.addLevelName(OFF, "OFF") diff --git a/aea/cli/utils/package_utils.py b/aea/cli/utils/package_utils.py index 32d0727958..ab57fcb89b 100644 --- a/aea/cli/utils/package_utils.py +++ b/aea/cli/utils/package_utils.py @@ -26,7 +26,6 @@ from typing import Optional import click - from jsonschema import ValidationError from aea import AEA_DIR @@ -34,12 +33,12 @@ from aea.cli.utils.context import Context from aea.cli.utils.loggers import logger from aea.configurations.base import ( + _compute_fingerprint, + _get_default_configuration_file_name_from_type, AgentConfig, DEFAULT_AEA_CONFIG_FILE, PackageType, PublicId, - _compute_fingerprint, - _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader from aea.crypto.helpers import verify_or_create_private_keys diff --git a/aea/cli_gui/__init__.py b/aea/cli_gui/__init__.py index 0917193f44..273eba4bf9 100644 --- a/aea/cli_gui/__init__.py +++ b/aea/cli_gui/__init__.py @@ -25,11 +25,9 @@ import threading from typing import Any, Dict, List, Tuple -from click import ClickException - import connexion - import flask +from click import ClickException from aea.cli.add import add_item as cli_add_item from aea.cli.create import create_aea as cli_create_aea @@ -39,18 +37,16 @@ from aea.cli.registry.fetch import fetch_agent as cli_fetch_agent from aea.cli.remove import remove_item as cli_remove_item from aea.cli.scaffold import scaffold_item as cli_scaffold_item -from aea.cli.search import ( - search_items as cli_search_items, - setup_search_ctx as cli_setup_search_ctx, -) +from aea.cli.search import search_items as cli_search_items +from aea.cli.search import setup_search_ctx as cli_setup_search_ctx from aea.cli.utils.config import try_to_load_agent_config from aea.cli.utils.context import Context from aea.cli.utils.formatting import sort_items from aea.cli_gui.utils import ( - ProcessState, call_aea_async, get_process_status, is_agent_dir, + ProcessState, read_error, read_tty, stop_agent_process, diff --git a/aea/components/loader.py b/aea/components/loader.py index f53e92f8a9..8e192bd68f 100644 --- a/aea/components/loader.py +++ b/aea/components/loader.py @@ -23,17 +23,13 @@ from typing import Dict, Type from aea.components.base import Component -from aea.configurations.base import ( - ComponentConfiguration, - ComponentType, -) +from aea.configurations.base import ComponentConfiguration, ComponentType from aea.connections.base import Connection from aea.contracts.base import Contract from aea.exceptions import AEAPackageLoadingError, enforce from aea.protocols.base import Protocol from aea.skills.base import Skill - logger = logging.getLogger(__name__) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 1a68f8de41..ed2b61d0ba 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -31,6 +31,7 @@ from pathlib import Path from typing import ( Any, + cast, Collection, Dict, Generic, @@ -42,15 +43,13 @@ Type, TypeVar, Union, - cast, ) import packaging +import semver from packaging.specifiers import SpecifierSet from packaging.version import Version -import semver - from aea.__version__ import __version__ as __aea_version__ from aea.exceptions import enforce from aea.helpers.ipfs.base import IPFSHashOnly diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index 492b8dd3da..f4466bbf35 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -25,13 +25,11 @@ import re from copy import deepcopy from pathlib import Path -from typing import Dict, Generic, List, TextIO, Tuple, Type, TypeVar, Union, cast - +from typing import cast, Dict, Generic, List, TextIO, Tuple, Type, TypeVar, Union import jsonschema -from jsonschema import Draft4Validator - import yaml +from jsonschema import Draft4Validator from yaml import SafeLoader from aea.configurations.base import ( diff --git a/aea/configurations/pypi.py b/aea/configurations/pypi.py index 5dd0bd0953..440d228bac 100644 --- a/aea/configurations/pypi.py +++ b/aea/configurations/pypi.py @@ -21,7 +21,7 @@ """This module contains a checker for PyPI version consistency.""" import operator from collections import defaultdict -from typing import Dict, Set, cast +from typing import cast, Dict, Set from packaging.specifiers import Specifier, SpecifierSet from packaging.version import InvalidVersion, Version diff --git a/aea/connections/base.py b/aea/connections/base.py index 983b2234b3..d4a7d5e971 100644 --- a/aea/connections/base.py +++ b/aea/connections/base.py @@ -26,14 +26,10 @@ from contextlib import contextmanager from enum import Enum from pathlib import Path -from typing import Generator, Optional, Set, TYPE_CHECKING, cast +from typing import cast, Generator, Optional, Set, TYPE_CHECKING from aea.components.base import Component, load_aea_package -from aea.configurations.base import ( - ComponentType, - ConnectionConfig, - PublicId, -) +from aea.configurations.base import ComponentType, ConnectionConfig, PublicId from aea.configurations.loader import load_component_configuration from aea.crypto.wallet import CryptoStore from aea.exceptions import enforce @@ -41,9 +37,8 @@ from aea.helpers.base import load_module from aea.identity.base import Identity - if TYPE_CHECKING: - from aea.mail.base import Envelope, Address # pragma: no cover + from aea.mail.base import Address, Envelope # pragma: no cover logger = logging.getLogger(__name__) diff --git a/aea/connections/stub/connection.py b/aea/connections/stub/connection.py index a80267f0c9..155aee920b 100644 --- a/aea/connections/stub/connection.py +++ b/aea/connections/stub/connection.py @@ -35,7 +35,6 @@ from aea.helpers.base import exception_log_and_reraise from aea.mail.base import Envelope - logger = logging.getLogger(__name__) INPUT_FILE_KEY = "input_file" diff --git a/aea/connections/stub/connection.yaml b/aea/connections/stub/connection.yaml index 743ee3598a..cdd0ca8581 100644 --- a/aea/connections/stub/connection.yaml +++ b/aea/connections/stub/connection.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: __init__.py: QmWwepN9Fy9gHAp39vUGFSLdnB9JZjdyE3STnbowSUhJkC - connection.py: QmTSESVFvsDc9iq2QM3YdZju3yHqTA3wHbLkAzHXEFY17Z + connection.py: QmYAWVhNoWhJNaCkEh5cMScJ53a1gkfcBNGt9LLxftyUuR readme.md: QmXSAtxSY7C2YkvUxeVnpqCJY9uJYZxZBmuUcE4zjFXcXz fingerprint_ignore_patterns: [] protocols: [] diff --git a/aea/contracts/base.py b/aea/contracts/base.py index 2d82b162fd..d14bc5d4ce 100644 --- a/aea/contracts/base.py +++ b/aea/contracts/base.py @@ -22,21 +22,16 @@ import logging import re from pathlib import Path -from typing import Any, Dict, Optional, cast +from typing import Any, cast, Dict, Optional from aea.components.base import Component, load_aea_package -from aea.configurations.base import ( - ComponentType, - ContractConfig, - ContractId, -) +from aea.configurations.base import ComponentType, ContractConfig, ContractId from aea.configurations.loader import load_component_configuration from aea.crypto.base import LedgerApi from aea.crypto.registries import Registry from aea.exceptions import AEAException, enforce from aea.helpers.base import load_module - contract_registry: Registry["Contract"] = Registry["Contract"]() logger = logging.getLogger(__name__) diff --git a/aea/crypto/__init__.py b/aea/crypto/__init__.py index 0a07586c50..11df4e865b 100644 --- a/aea/crypto/__init__.py +++ b/aea/crypto/__init__.py @@ -22,11 +22,8 @@ from aea.crypto.cosmos import CosmosCrypto from aea.crypto.ethereum import EthereumCrypto from aea.crypto.fetchai import FetchAICrypto -from aea.crypto.registries import ( - register_crypto, - register_faucet_api, - register_ledger_api, -) # noqa +from aea.crypto.registries import register_crypto # noqa +from aea.crypto.registries import register_faucet_api, register_ledger_api register_crypto( id_=FetchAICrypto.identifier, entry_point="aea.crypto.fetchai:FetchAICrypto" diff --git a/aea/crypto/base.py b/aea/crypto/base.py index 2f70e8513b..0b8fb15d75 100644 --- a/aea/crypto/base.py +++ b/aea/crypto/base.py @@ -24,7 +24,6 @@ from aea.common import Address - EntityClass = TypeVar("EntityClass") diff --git a/aea/crypto/cosmos.py b/aea/crypto/cosmos.py index 3534f03a66..051fb376f6 100644 --- a/aea/crypto/cosmos.py +++ b/aea/crypto/cosmos.py @@ -31,13 +31,11 @@ from pathlib import Path from typing import Any, BinaryIO, Dict, List, Optional, Tuple +import requests from bech32 import bech32_encode, convertbits - from ecdsa import SECP256k1, SigningKey, VerifyingKey from ecdsa.util import sigencode_string_canonize -import requests - from aea.common import Address from aea.crypto.base import Crypto, FaucetApi, Helper, LedgerApi from aea.exceptions import AEAEnforceError diff --git a/aea/crypto/ethereum.py b/aea/crypto/ethereum.py index 8ff54ef609..2055b52eb3 100644 --- a/aea/crypto/ethereum.py +++ b/aea/crypto/ethereum.py @@ -24,16 +24,13 @@ import time import warnings from pathlib import Path -from typing import Any, BinaryIO, Dict, Optional, Tuple, Union, cast +from typing import Any, BinaryIO, cast, Dict, Optional, Tuple, Union +import requests from eth_account import Account from eth_account.datastructures import SignedTransaction from eth_account.messages import encode_defunct - from eth_keys import keys - -import requests - from web3 import HTTPProvider, Web3 from web3.types import TxParams diff --git a/aea/crypto/fetchai.py b/aea/crypto/fetchai.py index f3f77a1355..60d1772b27 100644 --- a/aea/crypto/fetchai.py +++ b/aea/crypto/fetchai.py @@ -19,8 +19,7 @@ """Fetchai module wrapping the public and private key cryptography and ledger api.""" -from aea.crypto.cosmos import CosmosCrypto, CosmosFaucetApi, CosmosHelper, _CosmosApi - +from aea.crypto.cosmos import _CosmosApi, CosmosCrypto, CosmosFaucetApi, CosmosHelper _FETCHAI = "fetchai" _FETCH = "fetch" diff --git a/aea/crypto/wallet.py b/aea/crypto/wallet.py index 29a19f1be2..e27863bc22 100644 --- a/aea/crypto/wallet.py +++ b/aea/crypto/wallet.py @@ -20,7 +20,7 @@ """Module wrapping all the public and private keys cryptography.""" import logging -from typing import Any, Dict, Optional, cast +from typing import Any, cast, Dict, Optional from aea.crypto.base import Crypto from aea.crypto.registries import make_crypto diff --git a/aea/decision_maker/default.py b/aea/decision_maker/default.py index 4e4fb3feb7..9493d0a2e7 100644 --- a/aea/decision_maker/default.py +++ b/aea/decision_maker/default.py @@ -22,7 +22,7 @@ import copy import logging from enum import Enum -from typing import Any, Dict, List, Optional, cast +from typing import Any, cast, Dict, List, Optional from aea.common import Address from aea.crypto.wallet import Wallet diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 6e3ca74660..435ec5a72d 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -48,7 +48,9 @@ from asyncio import create_task # pylint: disable=ungrouped-imports,unused-import except ImportError: # pragma: no cover # for python3.6! - from asyncio import ensure_future as create_task # type: ignore # noqa: F401 # pylint: disable=ungrouped-imports,unused-import + from asyncio import ( # type: ignore # noqa: F401 # pylint: disable=ungrouped-imports,unused-import + ensure_future as create_task, + ) logger = logging.getLogger(__file__) diff --git a/aea/helpers/base.py b/aea/helpers/base.py index 98ccdedca9..ed1a8aed80 100644 --- a/aea/helpers/base.py +++ b/aea/helpers/base.py @@ -36,9 +36,8 @@ from pathlib import Path from typing import Any, Callable, Dict, List, TextIO, Union -from dotenv import load_dotenv - import yaml +from dotenv import load_dotenv logger = logging.getLogger(__name__) diff --git a/aea/helpers/file_lock.py b/aea/helpers/file_lock.py index f48a37c8f6..7939178331 100644 --- a/aea/helpers/file_lock.py +++ b/aea/helpers/file_lock.py @@ -24,9 +24,9 @@ # needs win32all to work on Windows if os.name == "nt": # pragma: nocover # cause platform dependent! + import pywintypes # pylint: disable=import-error import win32con # pylint: disable=import-error import win32file # pylint: disable=import-error - import pywintypes # pylint: disable=import-error LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK LOCK_SH = 0 # the default @@ -49,8 +49,8 @@ def unlock(file): elif os.name == "posix": # pragma: nocover # cause platform dependent! - from fcntl import LOCK_EX, LOCK_SH, LOCK_NB # noqa # pylint: disable=unused-import import fcntl + from fcntl import LOCK_EX, LOCK_NB, LOCK_SH # noqa # pylint: disable=unused-import def lock(file, flags): """Lock a file with flags.""" diff --git a/aea/helpers/ipfs/base.py b/aea/helpers/ipfs/base.py index 80ce3ca731..8f218db261 100644 --- a/aea/helpers/ipfs/base.py +++ b/aea/helpers/ipfs/base.py @@ -25,8 +25,7 @@ import base58 -from aea.helpers.ipfs.pb import merkledag_pb2 -from aea.helpers.ipfs.pb import unixfs_pb2 +from aea.helpers.ipfs.pb import merkledag_pb2, unixfs_pb2 # https://github.com/multiformats/multicodec/blob/master/table.csv SHA256_ID = "12" # 0x12 diff --git a/aea/helpers/ipfs/pb/merkledag_pb2.py b/aea/helpers/ipfs/pb/merkledag_pb2.py index e58b9a94c8..8a5a344e8a 100644 --- a/aea/helpers/ipfs/pb/merkledag_pb2.py +++ b/aea/helpers/ipfs/pb/merkledag_pb2.py @@ -4,12 +4,13 @@ import sys -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) 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 symbol_database as _symbol_database +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/aea/helpers/ipfs/pb/unixfs_pb2.py b/aea/helpers/ipfs/pb/unixfs_pb2.py index 08d096b3c5..f0c93e07b1 100644 --- a/aea/helpers/ipfs/pb/unixfs_pb2.py +++ b/aea/helpers/ipfs/pb/unixfs_pb2.py @@ -4,12 +4,13 @@ import sys -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) 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 symbol_database as _symbol_database +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/aea/helpers/logging.py b/aea/helpers/logging.py index 8a085528a5..58a99ffa6b 100644 --- a/aea/helpers/logging.py +++ b/aea/helpers/logging.py @@ -19,7 +19,7 @@ """Logging helpers.""" import logging from logging import Logger, LoggerAdapter -from typing import Any, MutableMapping, Optional, Tuple, cast +from typing import Any, cast, MutableMapping, Optional, Tuple class AgentLoggerAdapter(LoggerAdapter): diff --git a/aea/helpers/multiaddr/base.py b/aea/helpers/multiaddr/base.py index afbac8afbb..9ad06d76d0 100644 --- a/aea/helpers/multiaddr/base.py +++ b/aea/helpers/multiaddr/base.py @@ -22,10 +22,8 @@ from binascii import unhexlify import base58 - -from ecdsa import VerifyingKey, curves, keys - import multihash # type: ignore +from ecdsa import curves, keys, VerifyingKey from aea.helpers.multiaddr.crypto_pb2 import KeyType, PublicKey diff --git a/aea/helpers/multiaddr/crypto_pb2.py b/aea/helpers/multiaddr/crypto_pb2.py index 9094243b4c..5838976bd0 100644 --- a/aea/helpers/multiaddr/crypto_pb2.py +++ b/aea/helpers/multiaddr/crypto_pb2.py @@ -4,12 +4,13 @@ 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 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 symbol_database as _symbol_database +from google.protobuf.internal import enum_type_wrapper + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) # @@protoc_insertion_point(imports) diff --git a/aea/helpers/multiple_executor.py b/aea/helpers/multiple_executor.py index a4d0772c12..40a25ce92e 100644 --- a/aea/helpers/multiple_executor.py +++ b/aea/helpers/multiple_executor.py @@ -30,6 +30,7 @@ from typing import ( Any, Callable, + cast, Dict, Optional, Sequence, @@ -37,10 +38,8 @@ Tuple, Type, Union, - cast, ) - logger = logging.getLogger(__name__) diff --git a/aea/helpers/search/models.py b/aea/helpers/search/models.py index 02dbe0b686..31a045bbfb 100644 --- a/aea/helpers/search/models.py +++ b/aea/helpers/search/models.py @@ -25,7 +25,7 @@ from copy import deepcopy from enum import Enum from math import asin, cos, radians, sin, sqrt -from typing import Any, Dict, List, Mapping, Optional, Tuple, Type, Union, cast +from typing import Any, cast, Dict, List, Mapping, Optional, Tuple, Type, Union from aea.exceptions import enforce diff --git a/aea/launcher.py b/aea/launcher.py index 8512bd7485..36c0352e24 100644 --- a/aea/launcher.py +++ b/aea/launcher.py @@ -44,7 +44,6 @@ ) from aea.runtime import AsyncRuntime - logger = logging.getLogger(__name__) @@ -64,7 +63,7 @@ def _set_logger( log_level: Optional[str], ): # 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, # pylint: disable=import-outside-toplevel + default_logging_config, ) logger_ = logging.getLogger("aea") diff --git a/aea/mail/base_pb2.py b/aea/mail/base_pb2.py index 60579813c1..8adfaeb583 100644 --- a/aea/mail/base_pb2.py +++ b/aea/mail/base_pb2.py @@ -4,12 +4,13 @@ import sys -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) 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 symbol_database as _symbol_database +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/aea/multiplexer.py b/aea/multiplexer.py index 4b5b4661ad..0b4a75930b 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -23,8 +23,7 @@ from asyncio.events import AbstractEventLoop from concurrent.futures._base import CancelledError from contextlib import suppress -from typing import Callable, Collection, Dict, List, Optional, Sequence, Tuple, cast - +from typing import Callable, cast, Collection, Dict, List, Optional, Sequence, Tuple from aea.configurations.base import PublicId from aea.connections.base import Connection, ConnectionStates @@ -33,13 +32,8 @@ from aea.helpers.async_utils import AsyncState, ThreadedAsyncRunner from aea.helpers.exception_policy import ExceptionPolicyEnum from aea.helpers.logging import WithLogger -from aea.mail.base import ( - AEAConnectionError, - Empty, - Envelope, - EnvelopeContext, - logger as default_logger, -) +from aea.mail.base import AEAConnectionError, Empty, Envelope, EnvelopeContext +from aea.mail.base import logger as default_logger from aea.protocols.base import Message diff --git a/aea/protocols/base.py b/aea/protocols/base.py index f79089ac4e..eed501dca1 100644 --- a/aea/protocols/base.py +++ b/aea/protocols/base.py @@ -26,16 +26,12 @@ from copy import copy from enum import Enum from pathlib import Path -from typing import Any, Dict, Optional, Tuple, Type, cast +from typing import Any, cast, Dict, Optional, Tuple, Type from google.protobuf.struct_pb2 import Struct from aea.components.base import Component, load_aea_package -from aea.configurations.base import ( - ComponentType, - ProtocolConfig, - PublicId, -) +from aea.configurations.base import ComponentType, ProtocolConfig, PublicId from aea.configurations.loader import load_component_configuration from aea.exceptions import enforce diff --git a/aea/protocols/default/dialogues.py b/aea/protocols/default/dialogues.py index 9ac396bf19..f984fbf0c5 100644 --- a/aea/protocols/default/dialogues.py +++ b/aea/protocols/default/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message diff --git a/aea/protocols/default/message.py b/aea/protocols/default/message.py index 547286e375..cb75fe0eae 100644 --- a/aea/protocols/default/message.py +++ b/aea/protocols/default/message.py @@ -20,7 +20,7 @@ """This module contains default's message definition.""" import logging -from typing import Dict, Set, Tuple, cast +from typing import cast, Dict, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/aea/protocols/default/protocol.yaml b/aea/protocols/default/protocol.yaml index 6019f072c0..20626ed573 100644 --- a/aea/protocols/default/protocol.yaml +++ b/aea/protocols/default/protocol.yaml @@ -11,9 +11,9 @@ fingerprint: custom_types.py: QmRcgwDdTxkSHyfF9eoMtsb5P5GJDm4oyLq5W6ZBko1MFU default.proto: QmNzMUvXkBm5bbitR5Yi49ADiwNn1FhCvXqSKKoqAPZyXv default_pb2.py: QmSRFi1s3jcqnPuk4yopJeNuC6o58RL7dvEdt85uns3B3N - dialogues.py: Qmc991snbS7DwFxo1cKcq1rQ2uj7y8ukp14kfe2zve387C - message.py: QmeaadvKib9QqpjZgd7NiDUqGRpC2eZPVpgq1dY3PYacht - serialization.py: QmRnajc9BNCftjGkYTKCP9LnD3rq197jM3Re1GDVJTHh2y + dialogues.py: QmNi8Zya7ViRnpuqZsLRsj6bqHaXEsxCBqM4rafL5rsL3A + message.py: QmQPpq2HmjWDuWFcVE4VHRswdrUFYkrAwxMSA9SS9jsc5B + serialization.py: Qmc33mPC3sa2EAYvWBGfFVNQJVCWSk6LzCAXHPFKb1TEAZ fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/aea/protocols/default/serialization.py b/aea/protocols/default/serialization.py index fb886974cd..f24928db33 100644 --- a/aea/protocols/default/serialization.py +++ b/aea/protocols/default/serialization.py @@ -19,10 +19,9 @@ """Serialization module for default protocol.""" -from typing import Any, Dict, cast +from typing import Any, cast, Dict -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from aea.protocols.base import Message, Serializer from aea.protocols.default import default_pb2 from aea.protocols.default.custom_types import ErrorCode from aea.protocols.default.message import DefaultMessage diff --git a/aea/protocols/dialogue/base.py b/aea/protocols/dialogue/base.py index 52b154609b..4ef54b09d3 100644 --- a/aea/protocols/dialogue/base.py +++ b/aea/protocols/dialogue/base.py @@ -30,7 +30,7 @@ from abc import ABC from enum import Enum from inspect import signature -from typing import Callable, Dict, FrozenSet, List, Optional, Set, Tuple, Type, cast +from typing import Callable, cast, Dict, FrozenSet, List, Optional, Set, Tuple, Type from aea.common import Address from aea.exceptions import enforce diff --git a/aea/protocols/generator/base.py b/aea/protocols/generator/base.py index 198a1a0dab..e16c64427b 100644 --- a/aea/protocols/generator/base.py +++ b/aea/protocols/generator/base.py @@ -28,16 +28,6 @@ from typing import Optional, Tuple from aea.protocols.generator.common import ( - CUSTOM_TYPES_DOT_PY_FILE_NAME, - DIALOGUE_DOT_PY_FILE_NAME, - INIT_FILE_NAME, - MESSAGE_DOT_PY_FILE_NAME, - MESSAGE_IMPORT, - PATH_TO_PACKAGES, - PROTOCOL_YAML_FILE_NAME, - PYTHON_TYPE_TO_PROTO_TYPE, - SERIALIZATION_DOT_PY_FILE_NAME, - SERIALIZER_IMPORT, _camel_case_to_snake_case, _create_protocol_file, _get_sub_types_of_compositional_types, @@ -47,7 +37,17 @@ _union_sub_type_to_protobuf_variable_name, check_prerequisites, check_protobuf_using_protoc, + CUSTOM_TYPES_DOT_PY_FILE_NAME, + DIALOGUE_DOT_PY_FILE_NAME, + INIT_FILE_NAME, load_protocol_specification, + MESSAGE_DOT_PY_FILE_NAME, + MESSAGE_IMPORT, + PATH_TO_PACKAGES, + PROTOCOL_YAML_FILE_NAME, + PYTHON_TYPE_TO_PROTO_TYPE, + SERIALIZATION_DOT_PY_FILE_NAME, + SERIALIZER_IMPORT, try_run_black_formatting, try_run_protoc, ) diff --git a/aea/protocols/generator/extract_specification.py b/aea/protocols/generator/extract_specification.py index e3f42cf45c..3946a11e1f 100644 --- a/aea/protocols/generator/extract_specification.py +++ b/aea/protocols/generator/extract_specification.py @@ -19,15 +19,15 @@ """This module extracts a valid protocol specification into pythonic objects.""" import re -from typing import Dict, List, cast +from typing import cast, Dict, List from aea.configurations.base import ( ProtocolSpecification, ProtocolSpecificationParseError, ) from aea.protocols.generator.common import ( - SPECIFICATION_PRIMITIVE_TYPES, _get_sub_types_of_compositional_types, + SPECIFICATION_PRIMITIVE_TYPES, ) from aea.protocols.generator.validate import validate diff --git a/aea/protocols/generator/validate.py b/aea/protocols/generator/validate.py index bae664d719..c2610aea43 100644 --- a/aea/protocols/generator/validate.py +++ b/aea/protocols/generator/validate.py @@ -19,14 +19,14 @@ """This module validates a protocol specification.""" import re -from typing import Dict, List, Optional, Set, Tuple, cast +from typing import cast, Dict, List, Optional, Set, Tuple from aea.configurations.base import ProtocolSpecification from aea.protocols.generator.common import ( - SPECIFICATION_COMPOSITIONAL_TYPES, - SPECIFICATION_PRIMITIVE_TYPES, _get_sub_types_of_compositional_types, _has_matched_brackets, + SPECIFICATION_COMPOSITIONAL_TYPES, + SPECIFICATION_PRIMITIVE_TYPES, ) # The following names are reserved for standard message fields and cannot be diff --git a/aea/protocols/scaffold/protocol.yaml b/aea/protocols/scaffold/protocol.yaml index a3b8c82f35..9574de00c7 100644 --- a/aea/protocols/scaffold/protocol.yaml +++ b/aea/protocols/scaffold/protocol.yaml @@ -8,6 +8,6 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: __init__.py: QmedGZfo1UqT6UJoRkHys9kmquia9BQcK17y2touwSENDU message.py: QmQRGUakU9MGVAXy8Hmte5DEAvNYuzw8znt1h9Jg62ZEpM - serialization.py: QmNjyzqmoYnCxiLoBeZjXMhYkQzJpbDSFm7A9wytyRa2Xn + serialization.py: QmaAf5fppirUWe8JaeBbsqfbeofTHe8DDGHJooe2X389qo fingerprint_ignore_patterns: [] dependencies: {} diff --git a/aea/protocols/scaffold/serialization.py b/aea/protocols/scaffold/serialization.py index 237927b25b..82d9086e05 100644 --- a/aea/protocols/scaffold/serialization.py +++ b/aea/protocols/scaffold/serialization.py @@ -20,8 +20,7 @@ """Serialization for the scaffold protocol.""" -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from aea.protocols.base import Message, Serializer class MyScaffoldSerializer(Serializer): # pragma: no cover diff --git a/aea/protocols/signing/dialogues.py b/aea/protocols/signing/dialogues.py index 2602cbb7d9..705342f3a5 100644 --- a/aea/protocols/signing/dialogues.py +++ b/aea/protocols/signing/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message diff --git a/aea/protocols/signing/message.py b/aea/protocols/signing/message.py index 68a46db489..6669ad0633 100644 --- a/aea/protocols/signing/message.py +++ b/aea/protocols/signing/message.py @@ -20,7 +20,7 @@ """This module contains signing's message definition.""" import logging -from typing import Set, Tuple, cast +from typing import cast, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/aea/protocols/signing/protocol.yaml b/aea/protocols/signing/protocol.yaml index 15bf3690d9..c01952688d 100644 --- a/aea/protocols/signing/protocol.yaml +++ b/aea/protocols/signing/protocol.yaml @@ -9,9 +9,9 @@ fingerprint: README.md: QmSoa5dnxz53GWpWT2VvcRG4asVbzA8JzguiVgwqiLtguM __init__.py: QmcCL3TTdvd8wxYKzf2d3cgKEtY9RzLjPCn4hex4wmb6h6 custom_types.py: Qmc7sAyCQbAaVs5dZf9hFkTrB2BG8VAioWzbyKBAybrQ1J - dialogues.py: QmQ1WKs3Dn15oDSwpc4N8hdADLxrn76U4X5SiLAmyGiPPY - message.py: QmRLWAYfjCQmdg2hH8R5R63DKYaDrzuX4dVTFqNHuyjawq - serialization.py: QmZrztNBaWA6B5wJHQWfM2g6opPtvsEXtqytzmxjKWm7Sb + dialogues.py: QmaURpsd9ERiJ9CRnrfR1o94PGtMXaCb7k1SU2qyDG1q6x + message.py: QmVtRBy5LGTGHXEQSc9Br1gcpA7mqc7VmKCmmFzERiKqEP + serialization.py: QmS7H7WEBTQe4Nzxqz8kc6bXtVKjMzASvCitGdtFc2nyfT signing.proto: QmcxyLzqhTE9xstAEzCVH17osbLxmSdALx9njmuPjhjrvZ signing_pb2.py: QmY3Ak5ih5zGvKjeZ5EnzrGX4tMYn5dWpjPArQwFeJpVKu fingerprint_ignore_patterns: [] diff --git a/aea/protocols/signing/serialization.py b/aea/protocols/signing/serialization.py index 88acd2f7a4..b36b6c883f 100644 --- a/aea/protocols/signing/serialization.py +++ b/aea/protocols/signing/serialization.py @@ -19,17 +19,18 @@ """Serialization module for signing protocol.""" -from typing import Any, Dict, cast +from typing import Any, cast, Dict -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from aea.protocols.base import Message, Serializer from aea.protocols.signing import signing_pb2 -from aea.protocols.signing.custom_types import ErrorCode -from aea.protocols.signing.custom_types import RawMessage -from aea.protocols.signing.custom_types import RawTransaction -from aea.protocols.signing.custom_types import SignedMessage -from aea.protocols.signing.custom_types import SignedTransaction -from aea.protocols.signing.custom_types import Terms +from aea.protocols.signing.custom_types import ( + ErrorCode, + RawMessage, + RawTransaction, + SignedMessage, + SignedTransaction, + Terms, +) from aea.protocols.signing.message import SigningMessage diff --git a/aea/protocols/state_update/dialogues.py b/aea/protocols/state_update/dialogues.py index 53b5fdebda..e0f59bb7e8 100644 --- a/aea/protocols/state_update/dialogues.py +++ b/aea/protocols/state_update/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message diff --git a/aea/protocols/state_update/message.py b/aea/protocols/state_update/message.py index 2444c40c0f..a96667a6e1 100644 --- a/aea/protocols/state_update/message.py +++ b/aea/protocols/state_update/message.py @@ -20,7 +20,7 @@ """This module contains state_update's message definition.""" import logging -from typing import Dict, Set, Tuple, cast +from typing import cast, Dict, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/aea/protocols/state_update/protocol.yaml b/aea/protocols/state_update/protocol.yaml index 99162fad2e..13fa3717f7 100644 --- a/aea/protocols/state_update/protocol.yaml +++ b/aea/protocols/state_update/protocol.yaml @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: Qmc12hnCshAE3TL9ba4vo6L8ZZhynyfhEUoStJggRrbimc __init__.py: Qma2opyN54gwTpkVV1E14jjeMmMfoqgE6XMM9LsvGuTdkm - dialogues.py: Qmd59WgpFccLn1zhpLdwm3zDCmCsjSoQXVn6M7PgFwwkgR - message.py: QmbXbxXbu1vzrCjzDy6qDtEvssmiHKFLWGgCEenrE4TPZW - serialization.py: QmQDdbN4pgfdL1LUhV4J7xMUhdqUJ2Tamz7Nheca3yGw2G + dialogues.py: Qmettr9uNhMjKJTMPwRgkMsJxFscE6GLVMCjJWYxNNqzaq + message.py: QmezFVx1VikTQBGjPWz3yucbqMBs5E9eBufBYaZaQMhkG8 + serialization.py: QmPp8zqaLLa17YCiVu5SyD5We3cLkmsXcPcnwv2UDjDvMX state_update.proto: QmdmEUSa7PDxJ98ZmGE7bLFPmUJv8refgbkHPejw6uDdwD state_update_pb2.py: QmQr5KXhapRv9AnfQe7Xbr5bBqYWp9DEMLjxX8UWmK75Z4 fingerprint_ignore_patterns: [] diff --git a/aea/protocols/state_update/serialization.py b/aea/protocols/state_update/serialization.py index b5af452a72..dbb39e82a1 100644 --- a/aea/protocols/state_update/serialization.py +++ b/aea/protocols/state_update/serialization.py @@ -19,10 +19,9 @@ """Serialization module for state_update protocol.""" -from typing import Any, Dict, cast +from typing import Any, cast, Dict -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from aea.protocols.base import Message, Serializer from aea.protocols.state_update import state_update_pb2 from aea.protocols.state_update.message import StateUpdateMessage diff --git a/aea/registries/base.py b/aea/registries/base.py index 60fce0f86f..15f12ea96b 100644 --- a/aea/registries/base.py +++ b/aea/registries/base.py @@ -22,7 +22,7 @@ import copy import logging from abc import ABC, abstractmethod -from typing import Dict, Generic, List, Optional, Set, Tuple, TypeVar, cast +from typing import cast, Dict, Generic, List, Optional, Set, Tuple, TypeVar from aea.components.base import Component from aea.configurations.base import ( diff --git a/aea/registries/filter.py b/aea/registries/filter.py index 5ceaff0d3a..fde6e48ce7 100644 --- a/aea/registries/filter.py +++ b/aea/registries/filter.py @@ -21,10 +21,7 @@ import logging from typing import List, Optional -from aea.configurations.base import ( - PublicId, - SkillId, -) +from aea.configurations.base import PublicId, SkillId from aea.helpers.async_friendly_queue import AsyncFriendlyQueue from aea.protocols.base import Message from aea.registries.resources import Resources diff --git a/aea/registries/resources.py b/aea/registries/resources.py index d136a7678c..9126a7e7bc 100644 --- a/aea/registries/resources.py +++ b/aea/registries/resources.py @@ -19,7 +19,7 @@ """This module contains the resources class.""" from contextlib import suppress -from typing import List, Optional, cast +from typing import cast, List, Optional from aea.components.base import Component from aea.configurations.base import ( diff --git a/aea/runner.py b/aea/runner.py index 4b00f4e0a4..3620ff03f4 100644 --- a/aea/runner.py +++ b/aea/runner.py @@ -33,7 +33,6 @@ ) from aea.runtime import AsyncRuntime - logger = logging.getLogger(__name__) diff --git a/aea/runtime.py b/aea/runtime.py index d8c81f139c..89ff68c694 100644 --- a/aea/runtime.py +++ b/aea/runtime.py @@ -26,7 +26,7 @@ from asyncio.events import AbstractEventLoop from contextlib import suppress from enum import Enum -from typing import Dict, Optional, Type, cast +from typing import cast, Dict, Optional, Type from aea.abstract_agent import AbstractAgent from aea.agent_loop import AsyncAgentLoop, AsyncState, BaseAgentLoop, SyncAgentLoop @@ -36,7 +36,6 @@ from aea.multiplexer import AsyncMultiplexer, Multiplexer from aea.skills.tasks import TaskManager - logger = logging.getLogger(__name__) diff --git a/aea/skills/base.py b/aea/skills/base.py index 1e9fff3d96..071bfa98b3 100644 --- a/aea/skills/base.py +++ b/aea/skills/base.py @@ -29,7 +29,7 @@ from pathlib import Path from queue import Queue from types import SimpleNamespace -from typing import Any, Dict, Optional, Sequence, Set, Tuple, Type, cast +from typing import Any, cast, Dict, Optional, Sequence, Set, Tuple, Type from aea.common import Address from aea.components.base import Component, load_aea_package diff --git a/aea/skills/tasks.py b/aea/skills/tasks.py index 6b0350285c..d49f21fc22 100644 --- a/aea/skills/tasks.py +++ b/aea/skills/tasks.py @@ -23,7 +23,7 @@ import threading from abc import abstractmethod from multiprocessing.pool import AsyncResult, Pool -from typing import Any, Callable, Dict, Optional, Sequence, cast +from typing import Any, Callable, cast, Dict, Optional, Sequence from aea.helpers.logging import WithLogger diff --git a/aea/test_tools/click_testing.py b/aea/test_tools/click_testing.py index bc6d80b50c..b79ab74a4e 100644 --- a/aea/test_tools/click_testing.py +++ b/aea/test_tools/click_testing.py @@ -33,7 +33,8 @@ import sys from click._compat import string_types # type: ignore -from click.testing import CliRunner as ClickCliRunner, Result +from click.testing import CliRunner as ClickCliRunner +from click.testing import Result class CliRunner(ClickCliRunner): diff --git a/aea/test_tools/test_cases.py b/aea/test_tools/test_cases.py index 53953a37c6..b01dd4895d 100644 --- a/aea/test_tools/test_cases.py +++ b/aea/test_tools/test_cases.py @@ -36,7 +36,6 @@ from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Tuple, Union import pytest - import yaml from aea.cli import cli @@ -58,7 +57,6 @@ read_envelope_from_file, write_envelope_to_file, ) - from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/benchmark/cases/react_multi_agents_fake_connection.py b/benchmark/cases/react_multi_agents_fake_connection.py index fedb5800f3..9ceb8c9163 100644 --- a/benchmark/cases/react_multi_agents_fake_connection.py +++ b/benchmark/cases/react_multi_agents_fake_connection.py @@ -25,13 +25,12 @@ """ import time +from aea.configurations.base import SkillConfig from benchmark.cases.helpers.dummy_handler import DummyHandler from benchmark.framework.aea_test_wrapper import AEATestWrapper from benchmark.framework.benchmark import BenchmarkControl from benchmark.framework.cli import TestCli -from aea.configurations.base import SkillConfig - def _make_custom_config(name: str = "dummy_agent", skills_num: int = 1) -> dict: """ diff --git a/benchmark/cases/react_speed_multi_agents.py b/benchmark/cases/react_speed_multi_agents.py index df34bd360d..76f1bb096f 100644 --- a/benchmark/cases/react_speed_multi_agents.py +++ b/benchmark/cases/react_speed_multi_agents.py @@ -20,13 +20,12 @@ """Example performance test using benchmark framework. Test react speed on amount of incoming messages using normal agent operating.""" import time +from aea.configurations.base import SkillConfig from benchmark.cases.helpers.dummy_handler import DummyHandler from benchmark.framework.aea_test_wrapper import AEATestWrapper from benchmark.framework.benchmark import BenchmarkControl from benchmark.framework.cli import TestCli -from aea.configurations.base import SkillConfig - def _make_custom_config(name: str = "dummy_agent", skills_num: int = 1) -> dict: """ diff --git a/benchmark/checks/check_mem_usage.py b/benchmark/checks/check_mem_usage.py index a159637ac9..99193ba6ba 100755 --- a/benchmark/checks/check_mem_usage.py +++ b/benchmark/checks/check_mem_usage.py @@ -26,9 +26,8 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - -from benchmark.checks.utils import ( # noqa: I100 - SyncedGeneratorConnection, +from benchmark.checks.utils import SyncedGeneratorConnection # noqa: I100 +from benchmark.checks.utils import ( get_mem_usage_in_mb, make_agent, make_envelope, diff --git a/benchmark/checks/check_multiagent.py b/benchmark/checks/check_multiagent.py index 9b475e5315..549f8f43e3 100755 --- a/benchmark/checks/check_multiagent.py +++ b/benchmark/checks/check_multiagent.py @@ -24,7 +24,6 @@ import sys import time - import click from aea.configurations.base import ConnectionConfig @@ -32,24 +31,23 @@ from aea.protocols.default.message import DefaultMessage from aea.runner import AEARunner from aea.skills.base import Handler - -from benchmark.checks.utils import ( # noqa: I100 - get_mem_usage_in_mb, +from benchmark.checks.utils import get_mem_usage_in_mb # noqa: I100 +from benchmark.checks.utils import ( make_agent, make_envelope, + make_skill, multi_run, print_results, + wait_for_condition, ) -from benchmark.checks.utils import make_skill, wait_for_condition - -ROOT_PATH = os.path.join(os.path.abspath(__file__), "..", "..") -sys.path.append(ROOT_PATH) - from packages.fetchai.connections.local.connection import ( # noqa: E402 # pylint: disable=C0413 LocalNode, OEFLocalConnection, ) +ROOT_PATH = os.path.join(os.path.abspath(__file__), "..", "..") +sys.path.append(ROOT_PATH) + class TestHandler(Handler): """Dummy handler to handle messages.""" diff --git a/benchmark/checks/check_proactive.py b/benchmark/checks/check_proactive.py index 548e4ca208..c52e2ce1ee 100755 --- a/benchmark/checks/check_proactive.py +++ b/benchmark/checks/check_proactive.py @@ -25,15 +25,15 @@ from aea.protocols.default.message import DefaultMessage from aea.skills.base import Behaviour - -from benchmark.checks.utils import ( # noqa: I100 - SyncedGeneratorConnection, +from benchmark.checks.utils import SyncedGeneratorConnection # noqa: I100 +from benchmark.checks.utils import ( make_agent, make_envelope, + make_skill, multi_run, print_results, + wait_for_condition, ) -from benchmark.checks.utils import make_skill, wait_for_condition class TestBehaviour(Behaviour): diff --git a/benchmark/checks/check_reactive.py b/benchmark/checks/check_reactive.py index f4abbd8d60..f2bb484ece 100755 --- a/benchmark/checks/check_reactive.py +++ b/benchmark/checks/check_reactive.py @@ -29,15 +29,14 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - -from benchmark.checks.utils import ( # noqa: I100 - GeneratorConnection, - SyncedGeneratorConnection, +from benchmark.checks.utils import GeneratorConnection # noqa: I100 +from benchmark.checks.utils import ( make_agent, make_envelope, make_skill, multi_run, print_results, + SyncedGeneratorConnection, wait_for_condition, ) diff --git a/benchmark/checks/utils.py b/benchmark/checks/utils.py index 8bd27c6c7f..89ab2b50b5 100644 --- a/benchmark/checks/utils.py +++ b/benchmark/checks/utils.py @@ -29,17 +29,12 @@ from unittest.mock import MagicMock import click - import psutil # type: ignore from aea import AEA_DIR from aea.aea import AEA from aea.configurations.base import ConnectionConfig, PublicId, SkillConfig -from aea.configurations.constants import ( - DEFAULT_LEDGER, - DEFAULT_PROTOCOL, - DEFAULT_SKILL, -) +from aea.configurations.constants import DEFAULT_LEDGER, DEFAULT_PROTOCOL, DEFAULT_SKILL from aea.connections.base import Connection, ConnectionStates from aea.crypto.wallet import Wallet from aea.identity.base import Identity diff --git a/benchmark/framework/aea_test_wrapper.py b/benchmark/framework/aea_test_wrapper.py index 059b6e664c..39de905bb3 100644 --- a/benchmark/framework/aea_test_wrapper.py +++ b/benchmark/framework/aea_test_wrapper.py @@ -22,8 +22,6 @@ from threading import Thread from typing import Dict, List, Optional, Tuple, Type, Union -from benchmark.framework.fake_connection import FakeConnection - from aea.aea import AEA from aea.aea_builder import AEABuilder from aea.components.base import Component @@ -34,6 +32,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.default.serialization import DefaultSerializer from aea.skills.base import Handler, Skill, SkillContext +from benchmark.framework.fake_connection import FakeConnection class AEATestWrapper: diff --git a/benchmark/framework/executor.py b/benchmark/framework/executor.py index 206580b557..0f4645fb36 100644 --- a/benchmark/framework/executor.py +++ b/benchmark/framework/executor.py @@ -28,14 +28,11 @@ from typing import Callable, List, Tuple import memory_profiler # type: ignore - import psutil # type: ignore from benchmark.framework.benchmark import BenchmarkControl # noqa: I100 - from tests.common.utils import timeit_context - ResourceStats = namedtuple("ResourceStats", "time,cpu,mem") diff --git a/benchmark/framework/report_printer.py b/benchmark/framework/report_printer.py index 6dfd4a2e16..725330ca49 100644 --- a/benchmark/framework/report_printer.py +++ b/benchmark/framework/report_printer.py @@ -22,7 +22,6 @@ from statistics import mean, stdev from typing import Any, List, Optional, Tuple - from .executor import ExecReport from .func_details import BaseFuncDetails diff --git a/examples/gym_ex/gyms/env.py b/examples/gym_ex/gyms/env.py index bb2eb3126e..66acc54026 100644 --- a/examples/gym_ex/gyms/env.py +++ b/examples/gym_ex/gyms/env.py @@ -22,9 +22,8 @@ from typing import List, Tuple import gym -from gym import spaces # type: ignore - import numpy as np +from gym import spaces # type: ignore BanditId = int Price = int diff --git a/examples/gym_ex/proxy/agent.py b/examples/gym_ex/proxy/agent.py index 42b5fbf7b1..90b87cf225 100644 --- a/examples/gym_ex/proxy/agent.py +++ b/examples/gym_ex/proxy/agent.py @@ -29,13 +29,13 @@ from aea.helpers.base import locate from aea.identity.base import Identity from aea.mail.base import Envelope +from packages.fetchai.connections.gym.connection import ( # noqa: E402 # pylint: disable=wrong-import-position + GymConnection, +) sys.modules["packages.fetchai.connections.gym"] = locate( "packages.fetchai.connections.gym" ) -from packages.fetchai.connections.gym.connection import ( # noqa: E402 # pylint: disable=wrong-import-position - GymConnection, -) ADDRESS = "some_address" diff --git a/examples/gym_ex/proxy/env.py b/examples/gym_ex/proxy/env.py index 514d6e4095..9c5e4a467d 100755 --- a/examples/gym_ex/proxy/env.py +++ b/examples/gym_ex/proxy/env.py @@ -22,7 +22,7 @@ import time from queue import Queue from threading import Thread -from typing import Any, Optional, Tuple, cast +from typing import Any, cast, Optional, Tuple import gym @@ -31,11 +31,6 @@ from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - -sys.modules["packages.fetchai.connections.gym"] = locate( - "packages.fetchai.connections.gym" -) -sys.modules["packages.fetchai.protocols.gym"] = locate("packages.fetchai.protocols.gym") from packages.fetchai.protocols.gym.dialogues import ( # noqa: E402 # pylint: disable=wrong-import-position GymDialogue as BaseGymDialogue, ) @@ -48,6 +43,12 @@ from .agent import ProxyAgent # noqa: E402 # pylint: disable=wrong-import-position +sys.modules["packages.fetchai.connections.gym"] = locate( + "packages.fetchai.connections.gym" +) +sys.modules["packages.fetchai.protocols.gym"] = locate("packages.fetchai.protocols.gym") + + Action = Any Observation = Any Reward = float diff --git a/examples/gym_ex/rl/agent.py b/examples/gym_ex/rl/agent.py index d8206848a9..aa71d0ac66 100644 --- a/examples/gym_ex/rl/agent.py +++ b/examples/gym_ex/rl/agent.py @@ -23,7 +23,6 @@ from typing import Dict, Tuple import gym - import numpy as np BanditId = int diff --git a/packages/fetchai/connections/gym/connection.py b/packages/fetchai/connections/gym/connection.py index 395a566099..6d0d39dd5d 100644 --- a/packages/fetchai/connections/gym/connection.py +++ b/packages/fetchai/connections/gym/connection.py @@ -24,7 +24,7 @@ from asyncio import CancelledError from asyncio.events import AbstractEventLoop from concurrent.futures.thread import ThreadPoolExecutor -from typing import Optional, Tuple, Union, cast +from typing import cast, Optional, Tuple, Union import gym @@ -35,12 +35,10 @@ from aea.helpers.base import locate from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.protocols.gym.dialogues import GymDialogue from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues from packages.fetchai.protocols.gym.message import GymMessage - logger = logging.getLogger("aea.packages.fetchai.connections.gym") PUBLIC_ID = PublicId.from_str("fetchai/gym:0.8.0") diff --git a/packages/fetchai/connections/gym/connection.yaml b/packages/fetchai/connections/gym/connection.yaml index cce17f13a0..e6ef3b80c0 100644 --- a/packages/fetchai/connections/gym/connection.yaml +++ b/packages/fetchai/connections/gym/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPUxpn8smGVFexxhUu3Vy3q5xsJukHnYtQzUXyt965bmL __init__.py: QmWwxj1hGGZNteCvRtZxwtY9PuEKsrWsEmMWCKwiYCdvRR - connection.py: QmeBfJXcmyFzH84siPgKjTCrsSnTw7V1Jza1ZL9vUjpBS3 + connection.py: QmavgJYnKS9AY9UXyPM3mWZMZ9kCCSPjNAySn33N92kcV7 fingerprint_ignore_patterns: [] protocols: - fetchai/gym:0.6.0 diff --git a/packages/fetchai/connections/http_client/connection.py b/packages/fetchai/connections/http_client/connection.py index 72ed44788f..429b4fee2a 100644 --- a/packages/fetchai/connections/http_client/connection.py +++ b/packages/fetchai/connections/http_client/connection.py @@ -26,7 +26,7 @@ from asyncio.events import AbstractEventLoop from asyncio.tasks import Task from traceback import format_exc -from typing import Any, Optional, Set, Tuple, Union, cast +from typing import Any, cast, Optional, Set, Tuple, Union import aiohttp from aiohttp.client_reqrep import ClientResponse @@ -37,12 +37,10 @@ from aea.exceptions import enforce from aea.mail.base import Envelope, EnvelopeContext, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage - SUCCESS = 200 NOT_FOUND = 404 REQUEST_TIMEOUT = 408 diff --git a/packages/fetchai/connections/http_client/connection.yaml b/packages/fetchai/connections/http_client/connection.yaml index 462f0c8937..8a785639c9 100644 --- a/packages/fetchai/connections/http_client/connection.yaml +++ b/packages/fetchai/connections/http_client/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmXfZJPAh4Ujt3xj8xzd6ng6HbrpJQUuvjWe8DNQSwSKWU __init__.py: QmPdKAks8A6XKAgZiopJzPZYXJumTeUqChd8UorqmLQQPU - connection.py: QmW9DVSJwTdD8BkjiZc8fYa2ndHVCy6HepFpmnX8H8TVMH + connection.py: QmYTSggRJNrtKMkkigLL2eCWTdcRojJagXNjGz3rJ4emrB fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/http_server/connection.py b/packages/fetchai/connections/http_server/connection.py index f2267bd642..a774a43e03 100644 --- a/packages/fetchai/connections/http_server/connection.py +++ b/packages/fetchai/connections/http_server/connection.py @@ -27,28 +27,21 @@ from asyncio.events import AbstractEventLoop from asyncio.futures import Future from traceback import format_exc -from typing import Dict, Optional, Set, cast +from typing import cast, Dict, Optional, Set from urllib.parse import parse_qs, urlencode, urlparse from aiohttp import web from aiohttp.web_request import BaseRequest - from openapi_core import create_spec -from openapi_core.validation.request.datatypes import ( - OpenAPIRequest, - RequestParameters, -) +from openapi_core.validation.request.datatypes import OpenAPIRequest, RequestParameters from openapi_core.validation.request.shortcuts import validate_request from openapi_core.validation.request.validators import RequestValidator - from openapi_spec_validator.exceptions import ( # pylint: disable=wrong-import-order OpenAPIValidationError, ) from openapi_spec_validator.schemas import ( # pylint: disable=wrong-import-order read_yaml_file, ) - - from werkzeug.datastructures import ( # pylint: disable=wrong-import-order ImmutableMultiDict, ) @@ -59,7 +52,6 @@ from aea.mail.base import Envelope, EnvelopeContext, Message, URI from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/connections/http_server/connection.yaml b/packages/fetchai/connections/http_server/connection.yaml index cdab3a9916..b94bf4851f 100644 --- a/packages/fetchai/connections/http_server/connection.yaml +++ b/packages/fetchai/connections/http_server/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTmQcnUPKaDHHJHngBFXnUVPdgBLanP9DbjVHZT55Scfn __init__.py: Qmb6JEAkJeb5JweqrSGiGoQp1vGXqddjGgb9WMkm2phTgA - connection.py: QmbmtdBBj7p1T7SYoBhP3CnvGeZhnQH8FQiQLSAKAhdATf + connection.py: QmfZHq3FHwXecTAiRohbHLnaFucpD5h7BXqahJmnVDZA2K fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/ledger/base.py b/packages/fetchai/connections/ledger/base.py index c9fbdd4411..1afb3aa1a8 100644 --- a/packages/fetchai/connections/ledger/base.py +++ b/packages/fetchai/connections/ledger/base.py @@ -27,13 +27,12 @@ from aea.configurations.base import PublicId from aea.crypto.base import LedgerApi -from aea.crypto.registries import Registry, ledger_apis_registry +from aea.crypto.registries import ledger_apis_registry, Registry from aea.helpers.async_utils import AsyncState from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, Dialogues - CONNECTION_ID = PublicId.from_str("fetchai/ledger:0.6.0") diff --git a/packages/fetchai/connections/ledger/connection.py b/packages/fetchai/connections/ledger/connection.py index 1fe1fd45e9..1b153ef6d9 100644 --- a/packages/fetchai/connections/ledger/connection.py +++ b/packages/fetchai/connections/ledger/connection.py @@ -21,16 +21,12 @@ import asyncio from asyncio import Task from collections import deque -from typing import Deque, Dict, List, Optional, cast +from typing import cast, Deque, Dict, List, Optional from aea.connections.base import Connection, ConnectionStates from aea.mail.base import Envelope from aea.protocols.base import Message - -from packages.fetchai.connections.ledger.base import ( - CONNECTION_ID, - RequestDispatcher, -) +from packages.fetchai.connections.ledger.base import CONNECTION_ID, RequestDispatcher from packages.fetchai.connections.ledger.contract_dispatcher import ( ContractApiRequestDispatcher, ) diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index 323030a60f..efcfd06f44 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmfQN7UK1M4pBUzKVzPannPLVi8iiULKHNtJ7XpoWpjqfc __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj - base.py: QmNnSBVmVgdDFwzqDUncwLHeyDfMEfmvujJdKbdGNGH4Be - connection.py: QmS3CJwjgzZ5SrAeJjCnC5ChZDfTsDuV6ndgMsGV1bidnf - contract_dispatcher.py: QmRegSPqqkns7xp5zr6xiuTxjGLiGGG2qLkwunpFCbzEwX - ledger_dispatcher.py: QmarLEyR2Je6NtXSJmPy9NbGL7J85FVAZJPkFKqCotEKjc + base.py: QmXHmxdtk2Bp5RUG7VZb8rTAShtnnePj8rzS2HLEp14xTx + connection.py: QmdpsBY8SeYmxj8ijv7BuRKwjseoNXMX7gRP9ufLPoTFUM + contract_dispatcher.py: QmVaDEyhBFwf48iLYqeEXijpjDbeoNgsptXWFQ3DWSau5K + ledger_dispatcher.py: QmRXSuhgHqRgqkTtcBwdvjPd4QRpVuZWfBubgNeQSh9FJJ fingerprint_ignore_patterns: [] protocols: - fetchai/contract_api:0.5.0 diff --git a/packages/fetchai/connections/ledger/contract_dispatcher.py b/packages/fetchai/connections/ledger/contract_dispatcher.py index ca2561ed01..2d0283b132 100644 --- a/packages/fetchai/connections/ledger/contract_dispatcher.py +++ b/packages/fetchai/connections/ledger/contract_dispatcher.py @@ -19,7 +19,7 @@ """This module contains the implementation of the contract API request dispatcher.""" import inspect -from typing import Callable, Optional, cast +from typing import Callable, cast, Optional from aea.contracts import Contract, contract_registry from aea.crypto.base import LedgerApi @@ -27,15 +27,9 @@ from aea.exceptions import AEAException from aea.helpers.transaction.base import RawMessage, RawTransaction, State from aea.protocols.base import Address, Message -from aea.protocols.dialogue.base import ( - Dialogue as BaseDialogue, - Dialogues as BaseDialogues, -) - -from packages.fetchai.connections.ledger.base import ( - CONNECTION_ID, - RequestDispatcher, -) +from aea.protocols.dialogue.base import Dialogue as BaseDialogue +from aea.protocols.dialogue.base import Dialogues as BaseDialogues +from packages.fetchai.connections.ledger.base import CONNECTION_ID, RequestDispatcher from packages.fetchai.protocols.contract_api import ContractApiMessage from packages.fetchai.protocols.contract_api.dialogues import ContractApiDialogue from packages.fetchai.protocols.contract_api.dialogues import ( diff --git a/packages/fetchai/connections/ledger/ledger_dispatcher.py b/packages/fetchai/connections/ledger/ledger_dispatcher.py index bd11c7a887..fdc76f0f03 100644 --- a/packages/fetchai/connections/ledger/ledger_dispatcher.py +++ b/packages/fetchai/connections/ledger/ledger_dispatcher.py @@ -24,15 +24,9 @@ from aea.crypto.base import LedgerApi from aea.helpers.transaction.base import RawTransaction, TransactionDigest from aea.protocols.base import Address, Message -from aea.protocols.dialogue.base import ( - Dialogue as BaseDialogue, - Dialogues as BaseDialogues, -) - -from packages.fetchai.connections.ledger.base import ( - CONNECTION_ID, - RequestDispatcher, -) +from aea.protocols.dialogue.base import Dialogue as BaseDialogue +from aea.protocols.dialogue.base import Dialogues as BaseDialogues +from packages.fetchai.connections.ledger.base import CONNECTION_ID, RequestDispatcher from packages.fetchai.protocols.ledger_api.custom_types import TransactionReceipt from packages.fetchai.protocols.ledger_api.dialogues import LedgerApiDialogue from packages.fetchai.protocols.ledger_api.dialogues import ( diff --git a/packages/fetchai/connections/local/connection.py b/packages/fetchai/connections/local/connection.py index 3d79dc86b2..a7da093a2d 100644 --- a/packages/fetchai/connections/local/connection.py +++ b/packages/fetchai/connections/local/connection.py @@ -23,7 +23,7 @@ from asyncio import AbstractEventLoop, Queue from collections import defaultdict from threading import Thread -from typing import Dict, List, Optional, Tuple, cast +from typing import cast, Dict, List, Optional, Tuple from aea.common import Address from aea.configurations.base import ProtocolId, PublicId @@ -32,7 +32,6 @@ from aea.mail.base import Envelope, Message from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.protocols.oef_search.dialogues import OefSearchDialogue from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogues as BaseOefSearchDialogues, diff --git a/packages/fetchai/connections/local/connection.yaml b/packages/fetchai/connections/local/connection.yaml index 5c722defd8..3fc3e9c37c 100644 --- a/packages/fetchai/connections/local/connection.yaml +++ b/packages/fetchai/connections/local/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmbK7MtyAVqh2LmSh9TY6yBZqfWaAXURP4rQGATyP2hTKC __init__.py: QmeeoX5E38Ecrb1rLdeFyyxReHLrcJoETnBcPbcNWVbiKG - connection.py: QmaydCZEzNwBiDw5rVAW9oh63S9ymaG4WHcj2TWDnWViF2 + connection.py: QmVEpirVUJ6QYEzpDSdVUhnyPJHZk1WgHofjrRvY24sLYj fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/connections/oef/connection.py b/packages/fetchai/connections/oef/connection.py index 124d6ad822..a7db37505a 100644 --- a/packages/fetchai/connections/oef/connection.py +++ b/packages/fetchai/connections/oef/connection.py @@ -23,7 +23,7 @@ from asyncio import AbstractEventLoop, CancelledError from concurrent.futures.thread import ThreadPoolExecutor from itertools import cycle -from typing import Dict, List, Optional, Set, Type, cast +from typing import cast, Dict, List, Optional, Set, Type import oef from oef.agents import OEFAgent @@ -39,7 +39,6 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel - from packages.fetchai.connections.oef.object_translator import OEFObjectTranslator from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue as BaseOefSearchDialogue, @@ -49,7 +48,6 @@ ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage - logger = logging.getLogger("aea.packages.fetchai.connections.oef") TARGET = 0 diff --git a/packages/fetchai/connections/oef/connection.yaml b/packages/fetchai/connections/oef/connection.yaml index c3d8f0b085..da80a8b4ee 100644 --- a/packages/fetchai/connections/oef/connection.yaml +++ b/packages/fetchai/connections/oef/connection.yaml @@ -9,8 +9,8 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVHWxThR1u9a4BEm89oCxUTPGnN6PznvNgo6oZLqDD3n5 __init__.py: QmUAen8tmoBHuCerjA3FSGKJRLG6JYyUS3chuWzPxKYzez - connection.py: QmfDKjDageCc4Pxdqokw7s2foEgwrWnoexcdHL9PcVWS45 - object_translator.py: QmdScfifH8EX472dGUhHin634G4zYS2TLSxSJdSLL9AoAC + connection.py: QmcFn2NMW3U2Fcc2v3N49kDgwxF7Whe1aGW29dkEkmWcfL + object_translator.py: QmfDTqq9kUhWrAJf8SyevzhcKcuYioiLxLQtWhavxbvawS fingerprint_ignore_patterns: [] protocols: - fetchai/default:0.5.0 diff --git a/packages/fetchai/connections/oef/object_translator.py b/packages/fetchai/connections/oef/object_translator.py index 4d6d1a710b..98fe4241b3 100644 --- a/packages/fetchai/connections/oef/object_translator.py +++ b/packages/fetchai/connections/oef/object_translator.py @@ -21,31 +21,21 @@ import logging -from oef.query import ( - And as OEFAnd, - Constraint as OEFConstraint, - ConstraintExpr as OEFConstraintExpr, - ConstraintType as OEFConstraintType, - Distance, - Eq, - Gt, - GtEq, - In, - Location as OEFLocation, - Lt, - LtEq, - Not as OEFNot, - NotEq, - NotIn, - Or as OEFOr, - Query as OEFQuery, - Range, -) -from oef.schema import ( - AttributeSchema as OEFAttribute, - DataModel as OEFDataModel, - Description as OEFDescription, -) +from oef.query import And as OEFAnd +from oef.query import Constraint as OEFConstraint +from oef.query import ConstraintExpr as OEFConstraintExpr +from oef.query import ConstraintType as OEFConstraintType +from oef.query import Distance, Eq, Gt, GtEq, In +from oef.query import Location as OEFLocation +from oef.query import Lt, LtEq +from oef.query import Not as OEFNot +from oef.query import NotEq, NotIn +from oef.query import Or as OEFOr +from oef.query import Query as OEFQuery +from oef.query import Range +from oef.schema import AttributeSchema as OEFAttribute +from oef.schema import DataModel as OEFDataModel +from oef.schema import Description as OEFDescription from aea.helpers.search.models import ( And, @@ -62,7 +52,6 @@ Query, ) - logger = logging.getLogger("aea.packages.fetchai.connections.oef") diff --git a/packages/fetchai/connections/p2p_libp2p/connection.py b/packages/fetchai/connections/p2p_libp2p/connection.py index 84627fb356..32f51a2063 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.py +++ b/packages/fetchai/connections/p2p_libp2p/connection.py @@ -28,7 +28,7 @@ from asyncio import AbstractEventLoop, CancelledError from pathlib import Path from random import randint -from typing import IO, List, Optional, Sequence, cast +from typing import cast, IO, List, Optional, Sequence from aea.common import Address from aea.configurations.base import PublicId diff --git a/packages/fetchai/connections/p2p_libp2p/connection.yaml b/packages/fetchai/connections/p2p_libp2p/connection.yaml index 217db0e2b6..89b5831ea6 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p/connection.yaml @@ -15,7 +15,7 @@ fingerprint: aea/envelope.proto: QmSC8EGCKiNFR2vf5bSWymSzYDFMipQW9aQVMwPzQoKb4n aea/pipe_unix.go: QmSzbAexrSUSA9ZE6VT6MmcWF5MhEcmceQjAbnfRoK7Ruv aea/pipe_windows.go: QmdYpfjgdgFbA6Pothg65NYM45ubfpZeKr8cVQoqbFzgUK - connection.py: QmPEcaeBAHS7FQE27idXAB5WP9MnSXTxdVr39jdd5zdX5Z + connection.py: Qma7mVzE8TddKpJeKHEgeyPjxT4vQX8y9uPEtkWwA9tTaf dht/dhtclient/dhtclient.go: QmasA3GrgswTnUJoffBzeeqxeT3GjLu6foN6PHJhWNpMMa dht/dhtclient/dhtclient_test.go: QmPfnHSHXtbaW5VYuq1QsKQWey64pUEvLEaKKkT9eAcmws dht/dhtclient/options.go: QmPorj38wNrxGrzsbFe5wwLmiHzxbTJ2VsgvSd8tLDYS8s diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.py b/packages/fetchai/connections/p2p_libp2p_client/connection.py index 0ae1dfa284..dce5235c07 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.py +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.py @@ -25,7 +25,7 @@ import struct from asyncio import CancelledError from random import randint -from typing import List, Optional, Union, cast +from typing import cast, List, Optional, Union from aea.configurations.base import PublicId from aea.configurations.constants import DEFAULT_LEDGER diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml index a51a00d00d..c3eb2fb000 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml @@ -10,7 +10,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUp9UrXSqEYeRxrEsGDhGPTjFrwKmuT3bjHJfGrfP8yjk __init__.py: QmT1FEHkPGMHV5oiVEfQHHr25N2qdZxydSNRJabJvYiTgf - connection.py: QmeSyMBkN1Y99g7c7j89Ack8NjzSPw5WDbodbwfqLP6ZLT + connection.py: QmZLM7ihaCnvGurmAXYd2WesDcY5YWyfb6rmZT5qsbxP6w fingerprint_ignore_patterns: [] protocols: [] class_name: P2PLibp2pClientConnection diff --git a/packages/fetchai/connections/p2p_stub/connection.py b/packages/fetchai/connections/p2p_stub/connection.py index 615b2e6f27..a357aa4295 100644 --- a/packages/fetchai/connections/p2p_stub/connection.py +++ b/packages/fetchai/connections/p2p_stub/connection.py @@ -21,7 +21,7 @@ import os import tempfile from pathlib import Path -from typing import Union, cast +from typing import cast, Union from aea.configurations.base import ConnectionConfig, PublicId from aea.connections.stub.connection import StubConnection, write_envelope diff --git a/packages/fetchai/connections/p2p_stub/connection.yaml b/packages/fetchai/connections/p2p_stub/connection.yaml index c64dd5676d..98120d9535 100644 --- a/packages/fetchai/connections/p2p_stub/connection.yaml +++ b/packages/fetchai/connections/p2p_stub/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmbAStnFJj6jMTwqNu7DG9dt2uy5JGrGhKtCbYuAhWLBCk __init__.py: QmW9XFKGsea4u3fupkFMcQutgsjqusCMBMyTcTmLLmQ4tR - connection.py: QmSd6uheF634ZkHoPe1DtpPeD6Sx6p11rpB8tYELqWZUoS + connection.py: QmZ9YcefyzbVP45UaFrZcrKNKQQpeAkk45w5T9q2piEfpy fingerprint_ignore_patterns: [] protocols: [] class_name: P2PStubConnection diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 622543e773..913fbfbd77 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -26,13 +26,12 @@ from concurrent.futures._base import CancelledError as ConcurrentCancelledError from concurrent.futures.thread import ThreadPoolExecutor from contextlib import suppress -from typing import Callable, Dict, List, Optional, Set, Type, Union, cast +from typing import Callable, cast, Dict, List, Optional, Set, Type, Union from urllib import parse from uuid import uuid4 -from defusedxml import ElementTree as ET # pylint: disable=wrong-import-order - import requests +from defusedxml import ElementTree as ET # pylint: disable=wrong-import-order from aea.common import Address from aea.configurations.base import PublicId @@ -49,7 +48,6 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel - from packages.fetchai.protocols.oef_search.custom_types import ( AgentsInfo, OefErrorOperation, diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index f11cd94684..bc37bd232e 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmWwjETX39APP9RD5oVPeeCiDnUoDvjAcoVe2FK2Jc6anM __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmfK5khjQuqewKVuqyedgmToQvRbh69oT8f5WcSvzvvjJL + connection.py: QmTf8NU96LvnDdkB88b37Xk8K4cZFb6tj57TNP86ZL1Gyj fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/connections/tcp/connection.yaml b/packages/fetchai/connections/tcp/connection.yaml index 7ecf44617c..e3dcc18244 100644 --- a/packages/fetchai/connections/tcp/connection.yaml +++ b/packages/fetchai/connections/tcp/connection.yaml @@ -10,8 +10,8 @@ fingerprint: __init__.py: QmTxAtQ9ffraStxxLAkvmWxyGhoV3jE16Sw6SJ9xzTthLb base.py: QmRu7RYvTQuXvzM8mj8LQ8d3XtaHKLRdnMo7AvX2X76npe connection.py: QmcQnyUagAhE7UsSBxiBSqsuF4mTMdU26LZLhUhdq5QygR - tcp_client.py: QmR96SGPA9ZKQSJuhXXuQhPu55X3pygwGKhjtVZaynFVF1 - tcp_server.py: Qme1JTrtwuR1aGsA24yCnuPeGq1NRXrLDuG4ANUK5Uv317 + tcp_client.py: QmevCDDRJBJuw8awsn3TYWHbqPJLegjDZdeHFi5ZUwRKDg + tcp_server.py: QmUQwZmu12FeGNpg22Jn4ZFaoP53WpdLfAM18ySfoCyTsj fingerprint_ignore_patterns: [] protocols: [] class_name: TCPClientConnection diff --git a/packages/fetchai/connections/tcp/tcp_client.py b/packages/fetchai/connections/tcp/tcp_client.py index 4b1fd007fc..76e0b52122 100644 --- a/packages/fetchai/connections/tcp/tcp_client.py +++ b/packages/fetchai/connections/tcp/tcp_client.py @@ -27,11 +27,10 @@ StreamReader, StreamWriter, ) -from typing import Optional, cast +from typing import cast, Optional from aea.configurations.base import ConnectionConfig from aea.mail.base import Envelope - from packages.fetchai.connections.tcp.base import TCPConnection logger = logging.getLogger("aea.packages.fetchai.connections.tcp.tcp_client") diff --git a/packages/fetchai/connections/tcp/tcp_server.py b/packages/fetchai/connections/tcp/tcp_server.py index 9b0325ecfd..c04213ef33 100644 --- a/packages/fetchai/connections/tcp/tcp_server.py +++ b/packages/fetchai/connections/tcp/tcp_server.py @@ -22,12 +22,11 @@ import asyncio import logging from asyncio import AbstractServer, Future, StreamReader, StreamWriter -from typing import Dict, Optional, Tuple, cast +from typing import cast, Dict, Optional, Tuple from aea.common import Address from aea.configurations.base import ConnectionConfig from aea.mail.base import Envelope - from packages.fetchai.connections.tcp.base import TCPConnection logger = logging.getLogger("aea.packages.fetchai.connections.tcp.tcp_server") diff --git a/packages/fetchai/connections/webhook/connection.py b/packages/fetchai/connections/webhook/connection.py index b4e28cfa38..0d4d6e9dc1 100644 --- a/packages/fetchai/connections/webhook/connection.py +++ b/packages/fetchai/connections/webhook/connection.py @@ -22,7 +22,7 @@ import json import logging from asyncio import CancelledError -from typing import Optional, Union, cast +from typing import cast, Optional, Union from aiohttp import web # type: ignore @@ -32,7 +32,6 @@ from aea.mail.base import Envelope, EnvelopeContext, URI from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/connections/webhook/connection.yaml b/packages/fetchai/connections/webhook/connection.yaml index edbd4803ec..68fec4e29a 100644 --- a/packages/fetchai/connections/webhook/connection.yaml +++ b/packages/fetchai/connections/webhook/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmQDqfKKsksKsUqdqTcYe8P8Fw3MGovVuZBFHPbhupkkxf __init__.py: QmWUKSmXaBgGMvKgdmzKmMjCx43BnrfW6og2n3afNoAALq - connection.py: QmVzx4qbqru7oLCsUnSqWCMt9e69yUr9BquhaLXdTKz16U + connection.py: QmSTcUqdxmFG4N2NPbKRxpTcbChThVryJ6xGhD7DeWwuT5 fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/contracts/erc1155/contract.py b/packages/fetchai/contracts/erc1155/contract.py index 99db581ea3..950e2331f2 100644 --- a/packages/fetchai/contracts/erc1155/contract.py +++ b/packages/fetchai/contracts/erc1155/contract.py @@ -22,7 +22,7 @@ import json import logging import random -from typing import Any, Dict, List, Optional, cast +from typing import Any, cast, Dict, List, Optional from vyper.utils import keccak256 diff --git a/packages/fetchai/contracts/erc1155/contract.yaml b/packages/fetchai/contracts/erc1155/contract.yaml index 221b26e0c5..c07b8fde4c 100644 --- a/packages/fetchai/contracts/erc1155/contract.yaml +++ b/packages/fetchai/contracts/erc1155/contract.yaml @@ -10,7 +10,7 @@ fingerprint: build/Migrations.json: QmfFYYWoq1L1Ni6YPBWWoRPvCZKBLZ7qzN3UDX537mCeuE build/erc1155.json: Qma5n7au2NDCg1nLwYfYnmFNwWChFuXtu65w5DV7wAZRvw build/erc1155.wasm: Qmc9gthbdwRSywinTHKjRVQdFzrKTxUuLDx2ryNfQp1xqf - contract.py: QmSEfxq6dH53q9qEw3KrtTgUqvyDgCefy59RNpciGGAGi6 + contract.py: QmREF1pSQhJduHCWQpn67EtfNuZp93PzJY152tkqq32B7t contracts/Migrations.sol: QmbW34mYrj3uLteyHf3S46pnp9bnwovtCXHbdBHfzMkSZx contracts/erc1155.vy: QmXwob8G1uX7fDvtuuKW139LALWtQmGw2vvaTRBVAWRxTx migrations/1_initial_migration.js: QmcxaWKQ2yPkQBmnpXmcuxPZQUMuUudmPmX3We8Z9vtAf7 diff --git a/packages/fetchai/protocols/contract_api/dialogues.py b/packages/fetchai/protocols/contract_api/dialogues.py index ca9cb3c8ab..c27ccea420 100644 --- a/packages/fetchai/protocols/contract_api/dialogues.py +++ b/packages/fetchai/protocols/contract_api/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - from packages.fetchai.protocols.contract_api.message import ContractApiMessage diff --git a/packages/fetchai/protocols/contract_api/message.py b/packages/fetchai/protocols/contract_api/message.py index d84c69c714..1e666fd247 100644 --- a/packages/fetchai/protocols/contract_api/message.py +++ b/packages/fetchai/protocols/contract_api/message.py @@ -20,12 +20,11 @@ """This module contains contract_api's message definition.""" import logging -from typing import Optional, Set, Tuple, cast +from typing import cast, Optional, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message - from packages.fetchai.protocols.contract_api.custom_types import Kwargs as CustomKwargs from packages.fetchai.protocols.contract_api.custom_types import ( RawMessage as CustomRawMessage, diff --git a/packages/fetchai/protocols/contract_api/protocol.yaml b/packages/fetchai/protocols/contract_api/protocol.yaml index c41896ef87..98d312b0b9 100644 --- a/packages/fetchai/protocols/contract_api/protocol.yaml +++ b/packages/fetchai/protocols/contract_api/protocol.yaml @@ -11,9 +11,9 @@ fingerprint: contract_api.proto: QmNwngtcYFSuqL8yeTGVXmrHjfebCybdUa9BnTDKXn8odk contract_api_pb2.py: QmVT6Fv53KyFhshNFEo38seHypd7Y62psBaF8NszV8iRHK custom_types.py: QmbLjpiTcGNfvdBsu8pgQH6PK5y6ujdNnZ53JSk1GZDRCA - dialogues.py: QmTjXH8JUtziUFDawKsSTYE5dxn1n1FmMPeWexyxiPYd6k - message.py: Qmbxqt2TauoUkP6bqeYz1LZ7FukMvW3szs26HU87QCEFya - serialization.py: QmdJZ6GBrURgzJCfYSZzLhWirfm5bDJxumz7ieAELC9juw + dialogues.py: QmatXfb83UiHz78oNir1m7BHUCHcjC2vToX5ym5xg2TsqE + message.py: Qmb1jJji5cKaRTZ5pyXfRvgaVJg39519Py1a3o3FM2QEew + serialization.py: QmYxhZxqEFj6yoLuUuHssR4Hv59C72uAUwom3sM6hLtKad fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/contract_api/serialization.py b/packages/fetchai/protocols/contract_api/serialization.py index fa94eb9382..418d551676 100644 --- a/packages/fetchai/protocols/contract_api/serialization.py +++ b/packages/fetchai/protocols/contract_api/serialization.py @@ -19,16 +19,16 @@ """Serialization module for contract_api protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.contract_api import contract_api_pb2 -from packages.fetchai.protocols.contract_api.custom_types import Kwargs -from packages.fetchai.protocols.contract_api.custom_types import RawMessage -from packages.fetchai.protocols.contract_api.custom_types import RawTransaction -from packages.fetchai.protocols.contract_api.custom_types import State +from packages.fetchai.protocols.contract_api.custom_types import ( + Kwargs, + RawMessage, + RawTransaction, + State, +) from packages.fetchai.protocols.contract_api.message import ContractApiMessage diff --git a/packages/fetchai/protocols/fipa/dialogues.py b/packages/fetchai/protocols/fipa/dialogues.py index 39a531fd20..784d9e51fd 100644 --- a/packages/fetchai/protocols/fipa/dialogues.py +++ b/packages/fetchai/protocols/fipa/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/protocols/fipa/message.py b/packages/fetchai/protocols/fipa/message.py index 02328af938..5fc4da7939 100644 --- a/packages/fetchai/protocols/fipa/message.py +++ b/packages/fetchai/protocols/fipa/message.py @@ -20,12 +20,11 @@ """This module contains fipa's message definition.""" import logging -from typing import Dict, Set, Tuple, cast +from typing import cast, Dict, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message - 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 56acab1c84..6a112e5fa4 100644 --- a/packages/fetchai/protocols/fipa/protocol.yaml +++ b/packages/fetchai/protocols/fipa/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmRwxwzxfhotek7WUbyAeufBvoHpWbDwfUVMy3FKitiHKy __init__.py: QmZuv8RGegxunYaJ7sHLwj2oLLCFCAGF139b8DxEY68MRT custom_types.py: Qmb7bzEUAW74ZeSFqL7sTccNCjudStV63K4CFNZtibKUHB - dialogues.py: QmWaciW35ZTVeTeLWeyp3hjehKkWB5ZY7Di8N8cDH8Mjwb + dialogues.py: QmXKE9vDi5byW2qUoooE8qbkETJH9DDPHq5qNkG9drfpRU fipa.proto: QmP7JqnuQSQ9BDcKkscrTydKEX4wFBoyFaY1bkzGkamcit fipa_pb2.py: QmZMkefJLrb3zJKoimb6a9tdpxDBhc8rR2ghimqg7gZ471 - message.py: QmbFtigdnmqqmKZMTxjmk6JQJtcyhVY9a4mpEEcHmFJd24 - serialization.py: QmU6Xj55eaRxCYAeyR1difC769NHLB8kciorajvkLZCwDR + message.py: QmUvHvbZnos2VPfa7CibXpddc1wEKwL55zhCnodqPucj1h + serialization.py: QmQiFE2TzLMVM2mcbNHLrF5reydWt4UWuCC8bX3YJyBs5E fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/fipa/serialization.py b/packages/fetchai/protocols/fipa/serialization.py index d317c4c4ee..cc1f44f309 100644 --- a/packages/fetchai/protocols/fipa/serialization.py +++ b/packages/fetchai/protocols/fipa/serialization.py @@ -19,14 +19,11 @@ """Serialization module for fipa protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.fipa import fipa_pb2 -from packages.fetchai.protocols.fipa.custom_types import Description -from packages.fetchai.protocols.fipa.custom_types import Query +from packages.fetchai.protocols.fipa.custom_types import Description, Query from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/protocols/gym/dialogues.py b/packages/fetchai/protocols/gym/dialogues.py index cf665a79b0..7bf4fcf0ac 100644 --- a/packages/fetchai/protocols/gym/dialogues.py +++ b/packages/fetchai/protocols/gym/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - from packages.fetchai.protocols.gym.message import GymMessage diff --git a/packages/fetchai/protocols/gym/message.py b/packages/fetchai/protocols/gym/message.py index 7642fde42f..f8217f85b7 100644 --- a/packages/fetchai/protocols/gym/message.py +++ b/packages/fetchai/protocols/gym/message.py @@ -20,12 +20,11 @@ """This module contains gym's message definition.""" import logging -from typing import Dict, Set, Tuple, cast +from typing import cast, Dict, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message - from packages.fetchai.protocols.gym.custom_types import AnyObject as CustomAnyObject logger = logging.getLogger("aea.packages.fetchai.protocols.gym.message") diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index f381e6973e..511e35da86 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmTCkz4cEUcwuPZVtvrVr8Np5qn1SMwm6foGSY9Y68DhZT __init__.py: QmWBvruqGuU2BVCq8cuP1S3mgvuC78yrG4TdtSvKhCT8qX custom_types.py: QmT3VKT86xZKR11RR1vQ3myRpmVZNdzY6ELd8HG9U2ngwa - dialogues.py: QmdCzcFfyPF43U2SoxwshG5p4hd6dK49m6GYKduDHbnNPo + dialogues.py: QmTUPRyUM8d78KYhsecD9KH6FNhJzTQ4ETv8z1SueerDSB gym.proto: QmQGF9Xz4Z93wmhdKoztzxjo5pS4SsAWe2TQdvZCLuzdGC gym_pb2.py: QmSTz7xrL8ryqzR1Sgu1NpR6PmW7GUhBGnN2qYc8m8NCcN - message.py: QmTaiHDJkdduU4HLn7i17oAigJQwrws8FmfQCwbfAagnGp - serialization.py: QmaZd7YMHrHZvbeMMb1JfnkUZRHk7zKy45M7kDvG5wbY9C + message.py: QmT7dXmEqwPEi4ngZVWRMaYSddDHeemTAcxLdXv67mAJZB + serialization.py: QmQd94GuH1XZ1QZUCzdYT4cRyM5Vy4B3ABEHQNVfeTSNPC fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/gym/serialization.py b/packages/fetchai/protocols/gym/serialization.py index 8b058f15b5..f2f0aea130 100644 --- a/packages/fetchai/protocols/gym/serialization.py +++ b/packages/fetchai/protocols/gym/serialization.py @@ -19,11 +19,9 @@ """Serialization module for gym protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer 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 diff --git a/packages/fetchai/protocols/http/dialogues.py b/packages/fetchai/protocols/http/dialogues.py index f5c52a86e5..40e5c219b9 100644 --- a/packages/fetchai/protocols/http/dialogues.py +++ b/packages/fetchai/protocols/http/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/protocols/http/message.py b/packages/fetchai/protocols/http/message.py index 3c4841038a..95e73ffd59 100644 --- a/packages/fetchai/protocols/http/message.py +++ b/packages/fetchai/protocols/http/message.py @@ -20,7 +20,7 @@ """This module contains http's message definition.""" import logging -from typing import Set, Tuple, cast +from typing import cast, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/http/protocol.yaml b/packages/fetchai/protocols/http/protocol.yaml index bfe9679b93..a93a22a670 100644 --- a/packages/fetchai/protocols/http/protocol.yaml +++ b/packages/fetchai/protocols/http/protocol.yaml @@ -8,11 +8,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmY7fxhyNBgwU7uc6LKtCN4aSQ4bym5BwqtwRAfwPokULN __init__.py: QmRWie4QPiFJE8nK4fFJ6prqoG3u36cPo7st5JUZAGpVWv - dialogues.py: QmdwTehjCppcxyDid8m6zuHY5YwprUhato88R9Zdm9aXaM + dialogues.py: QmbLrJoAwsdDMuZkFnkbDSH2xJ1JZjmwUn7BfzGcEw9VvE http.proto: QmdTUTvvxGxMxSTB67AXjMUSDLdsxBYiSuJNVxHuLKB1jS http_pb2.py: QmYYKqdwiueq54EveL9WXn216FXLSQ6XGJJHoiJxwJjzHC - message.py: QmYSmd2xLU8TsLLorxxNnaHj1cVLztgrKtQnaqJ1USFkPY - serialization.py: QmUgo5BtLYDyy7syHBd6brd8zAXivNR2UEiBckryCwg6hk + message.py: QmZ54hhAZXbj5K1eJ23GDhkGVbsG76hnDfon9qG8Pm3dB7 + serialization.py: Qmbx7TrAXy4TCJzxM2fMWfKod7Bgx51FMYU9eVGYBcbP11 fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/http/serialization.py b/packages/fetchai/protocols/http/serialization.py index 749ddba29d..16f4dbaf9b 100644 --- a/packages/fetchai/protocols/http/serialization.py +++ b/packages/fetchai/protocols/http/serialization.py @@ -19,11 +19,9 @@ """Serialization module for http protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.http import http_pb2 from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/protocols/ledger_api/custom_types.py b/packages/fetchai/protocols/ledger_api/custom_types.py index 43508e0ee5..adde5cd580 100644 --- a/packages/fetchai/protocols/ledger_api/custom_types.py +++ b/packages/fetchai/protocols/ledger_api/custom_types.py @@ -25,7 +25,6 @@ from aea.helpers.transaction.base import TransactionDigest as BaseTransactionDigest from aea.helpers.transaction.base import TransactionReceipt as BaseTransactionReceipt - RawTransaction = BaseRawTransaction SignedTransaction = BaseSignedTransaction Terms = BaseTerms diff --git a/packages/fetchai/protocols/ledger_api/dialogues.py b/packages/fetchai/protocols/ledger_api/dialogues.py index c53552918c..6c3cc92ad2 100644 --- a/packages/fetchai/protocols/ledger_api/dialogues.py +++ b/packages/fetchai/protocols/ledger_api/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage diff --git a/packages/fetchai/protocols/ledger_api/message.py b/packages/fetchai/protocols/ledger_api/message.py index 6b60d32682..790c2f58be 100644 --- a/packages/fetchai/protocols/ledger_api/message.py +++ b/packages/fetchai/protocols/ledger_api/message.py @@ -20,12 +20,11 @@ """This module contains ledger_api's message definition.""" import logging -from typing import Optional, Set, Tuple, cast +from typing import cast, Optional, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message - from packages.fetchai.protocols.ledger_api.custom_types import ( RawTransaction as CustomRawTransaction, ) diff --git a/packages/fetchai/protocols/ledger_api/protocol.yaml b/packages/fetchai/protocols/ledger_api/protocol.yaml index a3f92d5551..6c92685ba9 100644 --- a/packages/fetchai/protocols/ledger_api/protocol.yaml +++ b/packages/fetchai/protocols/ledger_api/protocol.yaml @@ -8,12 +8,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmSoo6ds8mKhtoG8CBbu9rb9yj7sqeeuBfcU7CLj584uRX __init__.py: Qmct8jVx6ndWwaa5HXJAJgMraVuZ8kMeyx6rnEeHAYHwDJ - custom_types.py: QmWRrvFStMhVJy8P2WD6qjDgk14ZnxErN7XymxUtof7HQo - dialogues.py: QmRtWkAfR9WTvygMJ36R758RzdY2mGQs2fgtHCfjxmeaHy + custom_types.py: QmQJnWQvtj1D9zqGWM3XrpNtZPmzr4rLgKxoG1MzM5udNA + dialogues.py: QmVJLujzpu7Zm6i4Mqw6Yf4g2sjJbmdT5FqV8KURqjLvg8 ledger_api.proto: QmfLcv7jJcGJ1gAdCMqsyxJcRud7RaTWteSXHL5NvGuViP ledger_api_pb2.py: QmQhM848REJTDKDoiqxkTniChW8bNNm66EtwMRkvVdbMry - message.py: QmcLuy4YcL22qs3jHf5KHZ7vZueiTDrEmbWjfRTbyzwc5m - serialization.py: QmUvysZKkt5xLKLVHAyaZQ3jsRDkPn5bJURdsTDHgkE3HS + message.py: QmYXnMm4fbHyk88qn6VdqfMerZA3R6Xs48LrYRwTr7ghD5 + serialization.py: QmV4F4vqvjHcVt5axZKC9cpCbmtQdQeixKK7KdC6MVKbFH fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/ledger_api/serialization.py b/packages/fetchai/protocols/ledger_api/serialization.py index ac850b11e3..86f0c9077a 100644 --- a/packages/fetchai/protocols/ledger_api/serialization.py +++ b/packages/fetchai/protocols/ledger_api/serialization.py @@ -19,17 +19,17 @@ """Serialization module for ledger_api protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.ledger_api import ledger_api_pb2 -from packages.fetchai.protocols.ledger_api.custom_types import RawTransaction -from packages.fetchai.protocols.ledger_api.custom_types import SignedTransaction -from packages.fetchai.protocols.ledger_api.custom_types import Terms -from packages.fetchai.protocols.ledger_api.custom_types import TransactionDigest -from packages.fetchai.protocols.ledger_api.custom_types import TransactionReceipt +from packages.fetchai.protocols.ledger_api.custom_types import ( + RawTransaction, + SignedTransaction, + Terms, + TransactionDigest, + TransactionReceipt, +) from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage diff --git a/packages/fetchai/protocols/ml_trade/custom_types.py b/packages/fetchai/protocols/ml_trade/custom_types.py index 12aef0abc9..995f1444a6 100644 --- a/packages/fetchai/protocols/ml_trade/custom_types.py +++ b/packages/fetchai/protocols/ml_trade/custom_types.py @@ -22,7 +22,6 @@ from aea.helpers.search.models import Description as BaseDescription from aea.helpers.search.models import Query as BaseQuery - Description = BaseDescription Query = BaseQuery diff --git a/packages/fetchai/protocols/ml_trade/dialogues.py b/packages/fetchai/protocols/ml_trade/dialogues.py index 2bb14a478f..c9a992a235 100644 --- a/packages/fetchai/protocols/ml_trade/dialogues.py +++ b/packages/fetchai/protocols/ml_trade/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - from packages.fetchai.protocols.ml_trade.message import MlTradeMessage diff --git a/packages/fetchai/protocols/ml_trade/message.py b/packages/fetchai/protocols/ml_trade/message.py index f99abeaa98..2e1b2124e2 100644 --- a/packages/fetchai/protocols/ml_trade/message.py +++ b/packages/fetchai/protocols/ml_trade/message.py @@ -20,12 +20,11 @@ """This module contains ml_trade's message definition.""" import logging -from typing import Set, Tuple, cast +from typing import cast, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message - from packages.fetchai.protocols.ml_trade.custom_types import ( Description as CustomDescription, ) diff --git a/packages/fetchai/protocols/ml_trade/protocol.yaml b/packages/fetchai/protocols/ml_trade/protocol.yaml index 1863dda440..ce091dcef8 100644 --- a/packages/fetchai/protocols/ml_trade/protocol.yaml +++ b/packages/fetchai/protocols/ml_trade/protocol.yaml @@ -8,12 +8,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmSRtzACMh3x3LSjYqWXWTpYpE4C7G8EHbW4zQQoMFFZ4K __init__.py: QmXZMVdsBXUJxLZvwwhWBx58xfxMSyoGxdYp5Aeqmzqhzt - custom_types.py: QmPa6mxbN8WShsniQxJACfzAPRjGzYLbUFGoVU4N9DewUw - dialogues.py: QmVvP34aKWEtHrKmccNMvEdDnx5B7xpE5aEGzr6GU2u8UK - message.py: QmZdRAScKbmJgKVbRJvDyMUNfRZKWCwWFYjGNDDBAq5fUT + custom_types.py: QmeWvNKuezFxfmLYaxKhP9XffeiFFCwH1qowyiJacLAHpF + dialogues.py: QmWywRmmJYXD4TRkPJeDa5ntueK4DPJ6L9sKgM5wuq98wT + message.py: QmeFb86N5UxzQQhJyXFnJKSqgKymVu1wEyCrhaUaCn2K1f ml_trade.proto: QmeB21MQduEGQCrtiYZQzPpRqHL4CWEkvvcaKZ9GsfE8f6 ml_trade_pb2.py: QmZVvugPysR1og6kWCJkvo3af2s9pQRHfuj4BptE7gU1EU - serialization.py: QmSHywy12uQkzakU1RHnnkaPuTzaFTALsKisyYF8dPc8ns + serialization.py: QmVGjPRVK7sm82F9XYgT1giVcpQ1X5fEu9ydwvgRP63vZV fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/ml_trade/serialization.py b/packages/fetchai/protocols/ml_trade/serialization.py index ab0e4574dc..635f63eb63 100644 --- a/packages/fetchai/protocols/ml_trade/serialization.py +++ b/packages/fetchai/protocols/ml_trade/serialization.py @@ -19,14 +19,11 @@ """Serialization module for ml_trade protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.ml_trade import ml_trade_pb2 -from packages.fetchai.protocols.ml_trade.custom_types import Description -from packages.fetchai.protocols.ml_trade.custom_types import Query +from packages.fetchai.protocols.ml_trade.custom_types import Description, Query from packages.fetchai.protocols.ml_trade.message import MlTradeMessage diff --git a/packages/fetchai/protocols/oef_search/custom_types.py b/packages/fetchai/protocols/oef_search/custom_types.py index b7bfeb8e5b..9a0fb4dc0d 100644 --- a/packages/fetchai/protocols/oef_search/custom_types.py +++ b/packages/fetchai/protocols/oef_search/custom_types.py @@ -27,7 +27,6 @@ from aea.helpers.search.models import Description as BaseDescription from aea.helpers.search.models import Query as BaseQuery - Description = BaseDescription diff --git a/packages/fetchai/protocols/oef_search/dialogues.py b/packages/fetchai/protocols/oef_search/dialogues.py index add8484e76..82e4b1c5d1 100644 --- a/packages/fetchai/protocols/oef_search/dialogues.py +++ b/packages/fetchai/protocols/oef_search/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - 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 51190e1eee..c8281c00af 100644 --- a/packages/fetchai/protocols/oef_search/message.py +++ b/packages/fetchai/protocols/oef_search/message.py @@ -20,12 +20,11 @@ """This module contains oef_search's message definition.""" import logging -from typing import Set, Tuple, cast +from typing import cast, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message - from packages.fetchai.protocols.oef_search.custom_types import ( AgentsInfo as CustomAgentsInfo, ) diff --git a/packages/fetchai/protocols/oef_search/protocol.yaml b/packages/fetchai/protocols/oef_search/protocol.yaml index e03193f84d..b035e7433a 100644 --- a/packages/fetchai/protocols/oef_search/protocol.yaml +++ b/packages/fetchai/protocols/oef_search/protocol.yaml @@ -8,12 +8,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmaGSTqxvQFKccBnLovhBbfSH3C3Sorrj7kFyZqW9qptLa __init__.py: QmRvTtynKcd7shmzgf8aZdcA5witjNL5cL2a7WPgscp7wq - custom_types.py: QmYAkKYj9gGHaij7uTejoJe9KRhNcsU4sJC1utMfhUYhg3 - dialogues.py: QmQPLnW3jAs6tLLmhkX4C7texGRHM9bfdjs83dUH5TkJ4v - message.py: QmU8jH94qxrcr9eUtXWn5PzqmHT7NBc62gs53HPXKVk1Ts + custom_types.py: QmPSAWKkH7R8XCfPUCRmuEqVxCnp8L5PTUq4DBt59AzFUC + dialogues.py: QmZ9AMyHu4pPFHBiE239AWQT8haVK74JFWPVjtd2kPc9ej + message.py: QmdUz4aHSwo1xAtpJuNusakJAz4cU1XdLzKo9bwuL5QLfq oef_search.proto: QmNU8WsxT6XNFFneKKeDaZkNn3CEFDfZQkmKv9TyhyxzDB oef_search_pb2.py: QmSAFT1xxYRzJU6h1aFVDuYcx672sZ2vzV6c2ico7f4BLK - serialization.py: QmVmZnv4kHr2E9UaYACiwnTuT79N4hSe7NZZ2ogB2bD2K2 + serialization.py: QmaVfY1Q5EpkQhoHMip45efayT4a6iPxknTNuMQKGyTf4S fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/oef_search/serialization.py b/packages/fetchai/protocols/oef_search/serialization.py index 57a94b67be..e81792a4c3 100644 --- a/packages/fetchai/protocols/oef_search/serialization.py +++ b/packages/fetchai/protocols/oef_search/serialization.py @@ -19,16 +19,16 @@ """Serialization module for oef_search protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.oef_search import oef_search_pb2 -from packages.fetchai.protocols.oef_search.custom_types import AgentsInfo -from packages.fetchai.protocols.oef_search.custom_types import Description -from packages.fetchai.protocols.oef_search.custom_types import OefErrorOperation -from packages.fetchai.protocols.oef_search.custom_types import Query +from packages.fetchai.protocols.oef_search.custom_types import ( + AgentsInfo, + Description, + OefErrorOperation, + Query, +) from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/protocols/tac/custom_types.py b/packages/fetchai/protocols/tac/custom_types.py index 094741edfe..453dab2932 100644 --- a/packages/fetchai/protocols/tac/custom_types.py +++ b/packages/fetchai/protocols/tac/custom_types.py @@ -22,7 +22,6 @@ from enum import Enum from typing import Dict - CODE_TO_MSG = { 0: "Unexpected error.", 1: "Request not recognized", diff --git a/packages/fetchai/protocols/tac/dialogues.py b/packages/fetchai/protocols/tac/dialogues.py index 250ae33e75..b388b9209b 100644 --- a/packages/fetchai/protocols/tac/dialogues.py +++ b/packages/fetchai/protocols/tac/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - 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 999a42bbf9..81c321a38a 100644 --- a/packages/fetchai/protocols/tac/message.py +++ b/packages/fetchai/protocols/tac/message.py @@ -20,12 +20,11 @@ """This module contains tac's message definition.""" import logging -from typing import Dict, Optional, Set, Tuple, cast +from typing import cast, Dict, Optional, Set, Tuple from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message - from packages.fetchai.protocols.tac.custom_types import ErrorCode as CustomErrorCode logger = logging.getLogger("aea.packages.fetchai.protocols.tac.message") diff --git a/packages/fetchai/protocols/tac/protocol.yaml b/packages/fetchai/protocols/tac/protocol.yaml index d8f0dcaa5c..5ff8fe1708 100644 --- a/packages/fetchai/protocols/tac/protocol.yaml +++ b/packages/fetchai/protocols/tac/protocol.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVhm6VBbggxjTe3PEhCBfTomWekNa5buYy3sY7YYN6Er6 __init__.py: QmZYdAjm3o44drRiY3MT4RtG2fFLxtaL8h898DmjoJwJzV - custom_types.py: QmXQATfnvuCpt4FicF4QcqCcLj9PQNsSHjCBvVQknWpyaN - dialogues.py: QmTxHrcGujP1RUYvfJygZyQoUwmDg2GBWfmbR3tWUSbyop - message.py: QmfNdmYk3wssDJvHwMsMxXaiWCjm3fSH9Su4KmsYDZJoWg - serialization.py: QmfZMesx1EFVYx1pj5SBn3eF7A2fz5a8cnBKzhBmVha31U + custom_types.py: QmXyAhpkE6sLExGgf2GxBv8gRYTDZu7XCDsa2m4rwvQrmp + dialogues.py: QmSZMt9rRFasAkziB3ZtUvLKSpF7dKPRenqUXNtEuBqPhF + message.py: QmWDvBFPBk6cy2Auso4VGxZFrn4K4jqgTtCRLJazmoYx9H + serialization.py: QmZqeRNTVTTpFp7ymKgeKaGj7zHMCHD6KBAe9v1LLJJXyS tac.proto: QmdpPZNhUW593qVNVoSTWZgd9R69bmBbw6Y9xjzYpvuDvV tac_pb2.py: QmUwW3kixKwD2o1RRdq4NoNoihPb5BXKKRngWXztq32fea fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/protocols/tac/serialization.py b/packages/fetchai/protocols/tac/serialization.py index d709b5cee0..fabcb1e28d 100644 --- a/packages/fetchai/protocols/tac/serialization.py +++ b/packages/fetchai/protocols/tac/serialization.py @@ -19,11 +19,9 @@ """Serialization module for tac protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer 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 diff --git a/packages/fetchai/skills/aries_alice/behaviours.py b/packages/fetchai/skills/aries_alice/behaviours.py index 847c40c3b8..18ede1fb58 100644 --- a/packages/fetchai/skills/aries_alice/behaviours.py +++ b/packages/fetchai/skills/aries_alice/behaviours.py @@ -20,11 +20,10 @@ """This package contains the behaviour of a generic seller AEA.""" import json -from typing import Dict, cast +from typing import cast, Dict from aea.mail.base import EnvelopeContext from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.connections.http_client.connection import ( PUBLIC_ID as HTTP_CLIENT_CONNECTION_PUBLIC_ID, ) diff --git a/packages/fetchai/skills/aries_alice/dialogues.py b/packages/fetchai/skills/aries_alice/dialogues.py index 96983efc95..1384d1fd26 100644 --- a/packages/fetchai/skills/aries_alice/dialogues.py +++ b/packages/fetchai/skills/aries_alice/dialogues.py @@ -29,7 +29,6 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model - from packages.fetchai.protocols.http.dialogues import HttpDialogue as BaseHttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.oef_search.dialogues import ( diff --git a/packages/fetchai/skills/aries_alice/handlers.py b/packages/fetchai/skills/aries_alice/handlers.py index 5bb7f3b52b..5eb646663c 100644 --- a/packages/fetchai/skills/aries_alice/handlers.py +++ b/packages/fetchai/skills/aries_alice/handlers.py @@ -22,14 +22,13 @@ import base64 import binascii import json -from typing import Dict, Optional, cast +from typing import cast, Dict, Optional from urllib.parse import urlparse from aea.configurations.base import ProtocolId from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.aries_alice.dialogues import ( diff --git a/packages/fetchai/skills/aries_alice/skill.yaml b/packages/fetchai/skills/aries_alice/skill.yaml index 7bdeae07c0..a9bf82b529 100644 --- a/packages/fetchai/skills/aries_alice/skill.yaml +++ b/packages/fetchai/skills/aries_alice/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmfS1ezD77No8WQkvrkPs4oSXHFbULRxatGzRhMbSMntSx __init__.py: Qma8qSTU34ADKWskBwQKQLGNpe3xDKNgjNQ6Q4MxUnKa3Q - behaviours.py: QmZafoGe1KJ6ZfQhAkgVQFUAbDfackh8YHRjxVdCLm2TQE - dialogues.py: QmRbbuYSXuNzMVK3gkHVFhwqH8k6oPo4ThGvVPrrn9N3Yq - handlers.py: QmTtqM5oWBEAZcHdTuwuPtbiZZGWontMNEtmDxcccS2u2Y + behaviours.py: QmPQ87aRJ4KHAq29ghNPioA7YH36Pz5XbRhQsW4EPh63J6 + dialogues.py: QmQwremVUhyXMcoPQEvc4yJaUUDBx9ZYmDUCUHZwwux9Gc + handlers.py: QmQg1WLMNdgKmaBphEwdVeXcK9nq7VxkY4QPhT2A4y4ZZp strategy.py: QmZ2jhWFQZipk6wAquS1gWxX94iAmhN9Vrh7tcPU9bgpzF fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/aries_faber/behaviours.py b/packages/fetchai/skills/aries_faber/behaviours.py index 2e0080d319..3c030933b9 100644 --- a/packages/fetchai/skills/aries_faber/behaviours.py +++ b/packages/fetchai/skills/aries_faber/behaviours.py @@ -20,10 +20,9 @@ """This package contains the behaviour for the aries_faber skill.""" import json -from typing import Dict, cast +from typing import cast, Dict from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.aries_faber.dialogues import ( diff --git a/packages/fetchai/skills/aries_faber/dialogues.py b/packages/fetchai/skills/aries_faber/dialogues.py index f00b84bd56..334b38e46b 100644 --- a/packages/fetchai/skills/aries_faber/dialogues.py +++ b/packages/fetchai/skills/aries_faber/dialogues.py @@ -29,7 +29,6 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model - from packages.fetchai.protocols.http.dialogues import HttpDialogue as BaseHttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.oef_search.dialogues import ( diff --git a/packages/fetchai/skills/aries_faber/handlers.py b/packages/fetchai/skills/aries_faber/handlers.py index dd46d1205c..66630ded93 100644 --- a/packages/fetchai/skills/aries_faber/handlers.py +++ b/packages/fetchai/skills/aries_faber/handlers.py @@ -21,14 +21,13 @@ import json import random -from typing import Dict, Optional, cast +from typing import cast, Dict, Optional from aea.configurations.base import ProtocolId from aea.mail.base import EnvelopeContext from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - from packages.fetchai.connections.p2p_libp2p.connection import ( PUBLIC_ID as P2P_CONNECTION_PUBLIC_ID, ) diff --git a/packages/fetchai/skills/aries_faber/skill.yaml b/packages/fetchai/skills/aries_faber/skill.yaml index 6ad3ba2d21..a2254a2537 100644 --- a/packages/fetchai/skills/aries_faber/skill.yaml +++ b/packages/fetchai/skills/aries_faber/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdkSNCYx5dNGDAAveapQgoyM7Y7iYeQzR7KN2Sso3CJG4 __init__.py: QmNPVQ6UajvJodqTLWbLvQZkKCfrNn1nYPrQXai3xdj6F7 - behaviours.py: QmfF39uLgQinDRfWHo4fzbgJBGm1xanL1BbvdDwAHT7HPQ - dialogues.py: QmXveWmeU3eTDDhqDkBcVE2pJAtxJUAzcjbM8ZEjRvKUYW - handlers.py: QmZMEEQ3tGdfE1N5oMem5AZkXqreJ6BuGu7HsYrNwH99C3 - strategy.py: QmNs4KYe8C5zdFnD3Cp6X9ZKRjqeKG8GNmBiMxLidNTEhe + behaviours.py: QmfKXbGwvhnNSCDmEjt9z8YjD98gReD7v5MDeDbaPkgLMt + dialogues.py: QmPHqMtprNxvA6VTAi7ZRbLfFNy4pDPUcu9T6sM37wxMyQ + handlers.py: QmYD7CvETEoMmk5sb1rbBSK1sUzbtg3MLDLrVetMsn8quA + strategy.py: QmcUmddp6CUP31Bfckt6EkV3n2VZcJrUagoGBaTDBMTdXR fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/aries_faber/strategy.py b/packages/fetchai/skills/aries_faber/strategy.py index 6ac7c5bce2..a73030b91e 100644 --- a/packages/fetchai/skills/aries_faber/strategy.py +++ b/packages/fetchai/skills/aries_faber/strategy.py @@ -21,12 +21,7 @@ from aea.common import Address from aea.exceptions import enforce -from aea.helpers.search.models import ( - Constraint, - ConstraintType, - Location, - Query, -) +from aea.helpers.search.models import Constraint, ConstraintType, Location, Query from aea.skills.base import Model # Default Config diff --git a/packages/fetchai/skills/carpark_client/behaviours.py b/packages/fetchai/skills/carpark_client/behaviours.py index 3f2e38b180..deda9acdac 100644 --- a/packages/fetchai/skills/carpark_client/behaviours.py +++ b/packages/fetchai/skills/carpark_client/behaviours.py @@ -21,5 +21,4 @@ from packages.fetchai.skills.generic_buyer.behaviours import GenericSearchBehaviour - SearchBehaviour = GenericSearchBehaviour diff --git a/packages/fetchai/skills/carpark_client/handlers.py b/packages/fetchai/skills/carpark_client/handlers.py index 2f1e9cb165..ce8f9a83a0 100644 --- a/packages/fetchai/skills/carpark_client/handlers.py +++ b/packages/fetchai/skills/carpark_client/handlers.py @@ -26,7 +26,6 @@ GenericSigningHandler, ) - FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/carpark_client/skill.yaml b/packages/fetchai/skills/carpark_client/skill.yaml index f57a37bb82..acc3ffab98 100644 --- a/packages/fetchai/skills/carpark_client/skill.yaml +++ b/packages/fetchai/skills/carpark_client/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmeypYUvYR61ZD7qWQmeMnGq3ior9dQ6uuRpAduws65rFG __init__.py: QmPZ4bRmXpsDKD7ogCJHEMrtm67hpA5aqxvujgfQD1PtMd - behaviours.py: QmXw3wGKAqCT55MRX61g3eN1T2YVY4XC5z9b4Dg7x1Wihc + behaviours.py: QmW2VLVXoepN7V1u4rgARXjp9d9PpPfVgMz2KuNdR76aRg dialogues.py: QmcMynppu7B2nZR21LzxFQMpoRdegpWpwcXti2ba4Vcei5 - handlers.py: QmYx8WzeR2aCg2b2uiR1K2NHLn8DKhzAahLXoFnrXyDoDz - strategy.py: QmZVALhDnpEdxLhk3HLAmTs3JdEr9tk1QTS33ZsVnxkLXZ + handlers.py: Qme3AaVj6UPLufnMFoXVQKZn5EbEa1JsUqUNHh7jrxKWBE + strategy.py: QmRSgvrswoay8vF6woRm97vYVK9ZAGk1Gh26EkD4fFmbjz fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/carpark_client/strategy.py b/packages/fetchai/skills/carpark_client/strategy.py index 4b755b9173..9748064074 100644 --- a/packages/fetchai/skills/carpark_client/strategy.py +++ b/packages/fetchai/skills/carpark_client/strategy.py @@ -21,5 +21,4 @@ from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy - Strategy = GenericStrategy diff --git a/packages/fetchai/skills/carpark_detection/behaviours.py b/packages/fetchai/skills/carpark_detection/behaviours.py index 589ac88e89..24754d2cd2 100755 --- a/packages/fetchai/skills/carpark_detection/behaviours.py +++ b/packages/fetchai/skills/carpark_detection/behaviours.py @@ -23,5 +23,4 @@ GenericServiceRegistrationBehaviour, ) - ServiceRegistrationBehaviour = GenericServiceRegistrationBehaviour diff --git a/packages/fetchai/skills/carpark_detection/dialogues.py b/packages/fetchai/skills/carpark_detection/dialogues.py index d493129414..aa3bde5528 100644 --- a/packages/fetchai/skills/carpark_detection/dialogues.py +++ b/packages/fetchai/skills/carpark_detection/dialogues.py @@ -39,7 +39,6 @@ OefSearchDialogues as GenericOefSearchDialogues, ) - DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/carpark_detection/handlers.py b/packages/fetchai/skills/carpark_detection/handlers.py index d92a4497fd..f0d711e69c 100644 --- a/packages/fetchai/skills/carpark_detection/handlers.py +++ b/packages/fetchai/skills/carpark_detection/handlers.py @@ -25,7 +25,6 @@ GenericOefSearchHandler, ) - FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/carpark_detection/skill.yaml b/packages/fetchai/skills/carpark_detection/skill.yaml index 387e93cf7a..1dc69e1ef1 100644 --- a/packages/fetchai/skills/carpark_detection/skill.yaml +++ b/packages/fetchai/skills/carpark_detection/skill.yaml @@ -9,11 +9,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmcwNhv5N8m4ZtWvXY5eMDeL5ciivryDZPtGWXMFfTbYR7 __init__.py: QmQoECB7dpCDCG3xCnBsoMy6oqgSdu69CzRcAcuZuyapnQ - behaviours.py: QmTNboU3YH8DehWnpZmoiDUCncpNmqoSVt1Yp4j7NsgY2S + behaviours.py: QmaPS7Q3jJMASLRzGBpM5nzw3qQfkEwa9AW6kRv8nAjDo7 database.py: QmQv79qDxNk8v9chNYq7AxxChAJVGs4B8Y9we35rjzaonP - dialogues.py: QmPXfUWDxnHDaHQqsgtVhJ2v9dEgGWLtvEHKFvvFcDXGms - handlers.py: QmbkmEP9K4Qu2MsRtnkdx3PGNbSW46qi48bCHVCUJHpcQF - strategy.py: QmTHW32BzzYrBF1YkmftAMuyx6cKKGrp554qeKiFBJieJJ + dialogues.py: QmeYs1FYc1Ud4yXULoyf1nSqornVx2dczFCJbF1BwM2gzD + handlers.py: QmZ7r1LaYnjjkW6T7XLdmWdHjmyd9DsBjnFDvf5zoa6U6V + strategy.py: QmX2LcvY3yHDeKH4VeCCJM9JFihj5Hwwii6zZi3efMXSpV fingerprint_ignore_patterns: - temp_files_placeholder/* contracts: [] diff --git a/packages/fetchai/skills/carpark_detection/strategy.py b/packages/fetchai/skills/carpark_detection/strategy.py index f3cde2bdf7..0f46795b8f 100644 --- a/packages/fetchai/skills/carpark_detection/strategy.py +++ b/packages/fetchai/skills/carpark_detection/strategy.py @@ -23,7 +23,6 @@ from typing import Dict from aea.exceptions import enforce - from packages.fetchai.skills.carpark_detection.database import DetectionDatabase from packages.fetchai.skills.generic_seller.strategy import GenericStrategy diff --git a/packages/fetchai/skills/echo/handlers.py b/packages/fetchai/skills/echo/handlers.py index a43ba669f9..551cd4c4b9 100644 --- a/packages/fetchai/skills/echo/handlers.py +++ b/packages/fetchai/skills/echo/handlers.py @@ -23,9 +23,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - -from packages.fetchai.skills.echo.dialogues import DefaultDialogue -from packages.fetchai.skills.echo.dialogues import DefaultDialogues +from packages.fetchai.skills.echo.dialogues import DefaultDialogue, DefaultDialogues class EchoHandler(Handler): diff --git a/packages/fetchai/skills/echo/skill.yaml b/packages/fetchai/skills/echo/skill.yaml index 8d1bed0ceb..94480f9071 100644 --- a/packages/fetchai/skills/echo/skill.yaml +++ b/packages/fetchai/skills/echo/skill.yaml @@ -10,7 +10,7 @@ fingerprint: __init__.py: QmTf1GCgHxu7qq4HvUNYiBwuGEL1DcsHQuWH7N7TB5TtoC behaviours.py: QmXARXRvJkpzuqnYNhJhv42Sk6J4KzRW2AKvC6FJWLU9JL dialogues.py: QmTWhg4VnPFVsEq6D4KQvLWZntFDBxY7ujEjgD7ZspKcen - handlers.py: QmZhzCr55WSCWc7ebKn7FD7V939Q3wCqeAWQUF2RdRBb57 + handlers.py: QmSapUa6eiyRFFuXthGY8ELJ4byK6SykE6TuMMspF3i3Ep fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/erc1155_client/behaviours.py b/packages/fetchai/skills/erc1155_client/behaviours.py index dfa465d175..16937ccf57 100644 --- a/packages/fetchai/skills/erc1155_client/behaviours.py +++ b/packages/fetchai/skills/erc1155_client/behaviours.py @@ -22,7 +22,6 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.erc1155_client.dialogues import ( diff --git a/packages/fetchai/skills/erc1155_client/dialogues.py b/packages/fetchai/skills/erc1155_client/dialogues.py index 10af7d3bea..bbc010b99f 100644 --- a/packages/fetchai/skills/erc1155_client/dialogues.py +++ b/packages/fetchai/skills/erc1155_client/dialogues.py @@ -38,7 +38,6 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model - from packages.fetchai.protocols.contract_api.dialogues import ( ContractApiDialogue as BaseContractApiDialogue, ) diff --git a/packages/fetchai/skills/erc1155_client/handlers.py b/packages/fetchai/skills/erc1155_client/handlers.py index fd542bd2b1..ea5ebffbe7 100644 --- a/packages/fetchai/skills/erc1155_client/handlers.py +++ b/packages/fetchai/skills/erc1155_client/handlers.py @@ -19,7 +19,7 @@ """This package contains handlers for the erc1155-client skill.""" -from typing import Optional, cast +from typing import cast, Optional from aea.configurations.base import ProtocolId from aea.helpers.transaction.base import RawMessage, Terms @@ -27,7 +27,6 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler - from packages.fetchai.protocols.contract_api.message import ContractApiMessage from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index 099ed84f66..eb0e11c443 100644 --- a/packages/fetchai/skills/erc1155_client/skill.yaml +++ b/packages/fetchai/skills/erc1155_client/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZLsx2wJE762rqDqfeqLMg9RBczvALxy3H2U9kfRvgK3s __init__.py: QmRXXJsv5bfvb7qsyxQtVzXwn6PMLJKkbm6kg4DNkT1NtW - behaviours.py: QmaCak7V3jYEWdj4fLdd2tEG4fiSazbLBC5WKjDeSAQhrh - dialogues.py: QmPb2odXbXxuY5Ygm9mfCufM2mtMZ23oapsAzsWHC2x2k4 - handlers.py: QmSahx4wij2w9X6Zm9wAHyeJVRifpKGkstwYKDzcosqkfe + behaviours.py: QmT1c2JxQf92Em8ohu4qMSmBtebgmW7Gm6ZAK5ifFT2bQS + dialogues.py: QmUM3rDDQALcgfKsX7gGpT7sP1DVXsneS6XbqVANaW4Xfh + handlers.py: QmVpnbEiVX1P8E49mbMAtGGMpDD5CA7W7CipEwryubUH8N strategy.py: QmNg87LgfLPoPyokFrmvrNghQD7JkWehRNAdRNyB3YogeN fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/erc1155_deploy/behaviours.py b/packages/fetchai/skills/erc1155_deploy/behaviours.py index 84357c3b9c..93baf383cb 100644 --- a/packages/fetchai/skills/erc1155_deploy/behaviours.py +++ b/packages/fetchai/skills/erc1155_deploy/behaviours.py @@ -22,7 +22,6 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.contract_api.message import ContractApiMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/erc1155_deploy/dialogues.py b/packages/fetchai/skills/erc1155_deploy/dialogues.py index b3ba399f52..b73adcf187 100644 --- a/packages/fetchai/skills/erc1155_deploy/dialogues.py +++ b/packages/fetchai/skills/erc1155_deploy/dialogues.py @@ -39,7 +39,6 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model - from packages.fetchai.protocols.contract_api.dialogues import ( ContractApiDialogue as BaseContractApiDialogue, ) diff --git a/packages/fetchai/skills/erc1155_deploy/handlers.py b/packages/fetchai/skills/erc1155_deploy/handlers.py index fd9f0a7168..0ce403de5a 100644 --- a/packages/fetchai/skills/erc1155_deploy/handlers.py +++ b/packages/fetchai/skills/erc1155_deploy/handlers.py @@ -19,7 +19,7 @@ """This package contains the handlers of the erc1155 deploy skill AEA.""" -from typing import Optional, cast +from typing import cast, Optional from aea.configurations.base import ProtocolId from aea.crypto.ethereum import EthereumHelper @@ -27,7 +27,6 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler - from packages.fetchai.protocols.contract_api.message import ContractApiMessage from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage @@ -47,7 +46,6 @@ ) from packages.fetchai.skills.erc1155_deploy.strategy import Strategy - LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index b43dc83ed4..cacb0033d1 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZ7swVkRpmJbJZ2NoLb9CWwH8p3QjnjRJg71UbAXdrKyx __init__.py: Qmbm3ZtGpfdvvzqykfRqbaReAK9a16mcyK7qweSfeN5pq1 - behaviours.py: QmaiK1q2cYeP64YriCw6PHm9Mr1okMRU9esPftQDXXFy1f - dialogues.py: QmcCbdxFM4SX3MgXDxxbsC66gp8QK3C4W2czniQ5oDNc7G - handlers.py: QmSp3YuFz5nLy6Bc6qQr27ZUtwNQR6LyKiRHXcYpnmhm9r - strategy.py: QmeoDg7UT5MG5khmrZna3v8HYrC6QJjjEV26kcq1mPs6yx + behaviours.py: QmNf5NGKdNaffwFHHyNPv1FMocJ9YbnvU1zKFaYJoUEexA + dialogues.py: QmdHxieCCQjSbEf1U1vekKUK86EVu64Hw2HFKWrC9hK5q6 + handlers.py: QmYYvptHAuprPXDjpYGPrGpn4Qp7cioFK3anGK9JBeGMXY + strategy.py: QmcmUTRZk4BDm9DyowWm9NT1UzDe6rjQhgyongibSPh3hc fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/erc1155_deploy/strategy.py b/packages/fetchai/skills/erc1155_deploy/strategy.py index bdb058f810..266af5d71e 100644 --- a/packages/fetchai/skills/erc1155_deploy/strategy.py +++ b/packages/fetchai/skills/erc1155_deploy/strategy.py @@ -33,7 +33,6 @@ from aea.helpers.search.models import Description, Location from aea.helpers.transaction.base import Terms from aea.skills.base import Model - from packages.fetchai.contracts.erc1155.contract import ERC1155Contract DEFAULT_IS_LEDGER_TX = True diff --git a/packages/fetchai/skills/generic_buyer/behaviours.py b/packages/fetchai/skills/generic_buyer/behaviours.py index 1eecadaa15..b3e721520d 100644 --- a/packages/fetchai/skills/generic_buyer/behaviours.py +++ b/packages/fetchai/skills/generic_buyer/behaviours.py @@ -22,7 +22,6 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.generic_buyer.dialogues import ( diff --git a/packages/fetchai/skills/generic_buyer/dialogues.py b/packages/fetchai/skills/generic_buyer/dialogues.py index a22c0127ec..1f91a5aa66 100644 --- a/packages/fetchai/skills/generic_buyer/dialogues.py +++ b/packages/fetchai/skills/generic_buyer/dialogues.py @@ -40,8 +40,6 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model - - from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/skills/generic_buyer/handlers.py b/packages/fetchai/skills/generic_buyer/handlers.py index 0e60ef1b1a..f521639e09 100644 --- a/packages/fetchai/skills/generic_buyer/handlers.py +++ b/packages/fetchai/skills/generic_buyer/handlers.py @@ -20,14 +20,13 @@ """This package contains handlers for the generic buyer skill.""" import pprint -from typing import Optional, cast +from typing import cast, Optional from aea.configurations.base import ProtocolId from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler - from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/generic_buyer/skill.yaml b/packages/fetchai/skills/generic_buyer/skill.yaml index 0f4dd4f620..c0ca469e65 100644 --- a/packages/fetchai/skills/generic_buyer/skill.yaml +++ b/packages/fetchai/skills/generic_buyer/skill.yaml @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTR91jm7WfJpmabisy74NR5mc35YXjDU1zQAUKZeHRw8L __init__.py: QmaEDrNJBeHCJpbdFckRUhLSBqCXQ6umdipTMpYhqSKxSG - behaviours.py: QmSEymQerdUYooELqC2NyXJFpXLpwBX49G1DjMzzMVa69s - dialogues.py: QmPoKjJbwVWFPiKuV4a3ZC21SNLsWZUMXAGFzJuVedgxZ4 - handlers.py: QmZVuiu84WgGX3R438kuDVcNJZrahzWgLxsPAy34R6kc34 + behaviours.py: QmX2CDEtaNMeP8iSRafRiYcso7rcEYgSZpn6UV3JgFbAio + dialogues.py: QmUmPdxtaXK783i63ZB2nvHctHg9sZqRVgP6P7rnsG2V9s + handlers.py: QmU3yFr2XiaBtYEZV6uh9LdjaDi52LHo8e9u5xKfpYUKiQ strategy.py: Qmb2T99WnQQa4qyZSdu31QyrbtHy8ZWC6Jhv9sVrTYrFxE fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/generic_seller/behaviours.py b/packages/fetchai/skills/generic_seller/behaviours.py index c60d770500..ec68164ef7 100644 --- a/packages/fetchai/skills/generic_seller/behaviours.py +++ b/packages/fetchai/skills/generic_seller/behaviours.py @@ -22,7 +22,6 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.generic_seller.dialogues import ( @@ -31,7 +30,6 @@ ) from packages.fetchai.skills.generic_seller.strategy import GenericStrategy - DEFAULT_SERVICES_INTERVAL = 60.0 LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/generic_seller/dialogues.py b/packages/fetchai/skills/generic_seller/dialogues.py index dbdff8f02d..4acb51bd2b 100644 --- a/packages/fetchai/skills/generic_seller/dialogues.py +++ b/packages/fetchai/skills/generic_seller/dialogues.py @@ -35,7 +35,6 @@ from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel from aea.skills.base import Model - from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/skills/generic_seller/handlers.py b/packages/fetchai/skills/generic_seller/handlers.py index 1fe577cb7a..8f47a5ee73 100644 --- a/packages/fetchai/skills/generic_seller/handlers.py +++ b/packages/fetchai/skills/generic_seller/handlers.py @@ -19,7 +19,7 @@ """This package contains the handlers of a generic seller AEA.""" -from typing import Optional, cast +from typing import cast, Optional from aea.configurations.base import ProtocolId from aea.crypto.ledger_apis import LedgerApis @@ -27,7 +27,6 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/generic_seller/skill.yaml b/packages/fetchai/skills/generic_seller/skill.yaml index 5060c3d1e2..528326461c 100644 --- a/packages/fetchai/skills/generic_seller/skill.yaml +++ b/packages/fetchai/skills/generic_seller/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPb5kHYZyhUN87EKmuahyGqDGgqVdGPyfC1KpGC3xfmcP __init__.py: QmbfkeFnZVKppLEHpBrTXUXBwg2dpPABJWSLND8Lf1cmpG - behaviours.py: QmdHumzBTxWg2PgWzwNVF4a5eG1dhGXzDwrY9eq4uevHqs - dialogues.py: QmRJCregJWVs8scTMjQptvztKa5NEHKUfeZECVxdU233C6 - handlers.py: QmYyAYGiSMzUAq96LuFsVewYut9njvCR3NG9uEKonnwGf5 + behaviours.py: QmdsS8wmLyxTZc4FdUri4ojRG1nMbasSHC4u6i1AfTQH1V + dialogues.py: QmZuFnZKndhsrUZrqjGpYHBzPFAZZbVdzGt6FLXvSi8AdS + handlers.py: QmXtsQEM8MoKL9jSTrARKnrFwDawFc6nQGK4Ba8VBN9S6i strategy.py: QmX1mp7eZkz1P6iVyoDCATZDKZRgwe1EgMVmAyvtGDHvm3 fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/gym/dialogues.py b/packages/fetchai/skills/gym/dialogues.py index b95b5d9fe8..0100e7bdff 100644 --- a/packages/fetchai/skills/gym/dialogues.py +++ b/packages/fetchai/skills/gym/dialogues.py @@ -31,8 +31,6 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model - - from packages.fetchai.protocols.gym.dialogues import GymDialogue as BaseGymDialogue from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues diff --git a/packages/fetchai/skills/gym/handlers.py b/packages/fetchai/skills/gym/handlers.py index 82c76d5be5..fe521f392e 100644 --- a/packages/fetchai/skills/gym/handlers.py +++ b/packages/fetchai/skills/gym/handlers.py @@ -24,7 +24,6 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.skills.gym.dialogues import ( DefaultDialogues, diff --git a/packages/fetchai/skills/gym/helpers.py b/packages/fetchai/skills/gym/helpers.py index f32e80eb2a..b95a0ebb65 100644 --- a/packages/fetchai/skills/gym/helpers.py +++ b/packages/fetchai/skills/gym/helpers.py @@ -22,13 +22,12 @@ from abc import ABC, abstractmethod from queue import Queue -from typing import Any, Optional, Tuple, cast +from typing import Any, cast, Optional, Tuple import gym from aea.protocols.base import Message from aea.skills.base import SkillContext - from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.skills.gym.dialogues import GymDialogue, GymDialogues diff --git a/packages/fetchai/skills/gym/skill.yaml b/packages/fetchai/skills/gym/skill.yaml index 016b84f3b4..c7889c40ab 100644 --- a/packages/fetchai/skills/gym/skill.yaml +++ b/packages/fetchai/skills/gym/skill.yaml @@ -8,11 +8,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUpD7PeLHS8nH7HJ48hBafSFhLn8Yrh571RCmxnStpNwq __init__.py: QmTf1GCgHxu7qq4HvUNYiBwuGEL1DcsHQuWH7N7TB5TtoC - dialogues.py: QmdGo2TGJTjRXhGngZPNCBvpNqwv3B581DFmaxEMDyswrd - handlers.py: QmagqBdQaGuGbVS5dFqxFtEww2e1YF2NprBNPtt5pVA2hZ - helpers.py: QmbRSMX7UCRAEotS4ocTEcZLo1qietAAU9K5zBtqY1nE82 + dialogues.py: QmQik8PG4xfuvbDwxocfRHygLHDbHkeqxHEGToAM2EooQz + handlers.py: QmbqpPWc3N6MFSpJq2DaPcu78mJG3S9iJuJBuPproSnXHf + helpers.py: Qmc7pKqwSagUXCeT4cTP3Ed2Ji6Lc18Xa42Vs8XCGX6dcT rl_agent.py: QmUq3XY9Dd2XZBhNNK9J3S5937d3az4cwP1BmeieHSgJ3m - tasks.py: QmVf9K7zCkKYduTnS7nS3d8FvUbEVy7s7a26yaCC8Q3rgd + tasks.py: QmR4zfFktphJrF23feYbeYHczpBRsTAW8icoeTvG19SkjC fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/gym/tasks.py b/packages/fetchai/skills/gym/tasks.py index 0972210c19..f7a725eedb 100644 --- a/packages/fetchai/skills/gym/tasks.py +++ b/packages/fetchai/skills/gym/tasks.py @@ -24,7 +24,6 @@ from aea.skills.base import SkillContext from aea.skills.tasks import Task - from packages.fetchai.skills.gym.helpers import ProxyEnv from packages.fetchai.skills.gym.rl_agent import DEFAULT_NB_STEPS, MyRLAgent, NB_GOODS diff --git a/packages/fetchai/skills/http_echo/dialogues.py b/packages/fetchai/skills/http_echo/dialogues.py index fc7a371532..055a035e58 100644 --- a/packages/fetchai/skills/http_echo/dialogues.py +++ b/packages/fetchai/skills/http_echo/dialogues.py @@ -31,8 +31,6 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model - - from packages.fetchai.protocols.http.dialogues import HttpDialogue as BaseHttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues diff --git a/packages/fetchai/skills/http_echo/handlers.py b/packages/fetchai/skills/http_echo/handlers.py index f0dba0c4fc..a5e1ba1487 100644 --- a/packages/fetchai/skills/http_echo/handlers.py +++ b/packages/fetchai/skills/http_echo/handlers.py @@ -25,7 +25,6 @@ from aea.protocols.base import Message from aea.protocols.default import DefaultMessage from aea.skills.base import Handler - from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.skills.http_echo.dialogues import ( DefaultDialogues, diff --git a/packages/fetchai/skills/http_echo/skill.yaml b/packages/fetchai/skills/http_echo/skill.yaml index b2f4228f72..20dd372b38 100644 --- a/packages/fetchai/skills/http_echo/skill.yaml +++ b/packages/fetchai/skills/http_echo/skill.yaml @@ -9,8 +9,8 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmYMHPsBX3wTMZZP89aKa7FzDCqGyvvue54ZBN8NZt4mNt __init__.py: QmaKik9dXg6cajBPG9RTDr6BhVdWk8aoR8QDNfPQgiy1kv - dialogues.py: QmZVMQqP24xR4Hec2f79UMuuBWRkCL7TG3jw5yTkPRoRXT - handlers.py: QmdTuiao42XEvbp2wuqKP4U4noRqAVdec9rss51pswYCoe + dialogues.py: QmVXAbsx66KousdDsy8dH3LHS52SqZAFfP8a967yynbMxr + handlers.py: QmWRgGGnNyGSyYwdUB3u1k4zdygs196iYQ2sNjWHYt1qww fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/ml_data_provider/behaviours.py b/packages/fetchai/skills/ml_data_provider/behaviours.py index 76a04e4899..0c086baff1 100644 --- a/packages/fetchai/skills/ml_data_provider/behaviours.py +++ b/packages/fetchai/skills/ml_data_provider/behaviours.py @@ -23,5 +23,4 @@ GenericServiceRegistrationBehaviour, ) - ServiceRegistrationBehaviour = GenericServiceRegistrationBehaviour diff --git a/packages/fetchai/skills/ml_data_provider/dialogues.py b/packages/fetchai/skills/ml_data_provider/dialogues.py index e175dac3b9..30ee046b0f 100644 --- a/packages/fetchai/skills/ml_data_provider/dialogues.py +++ b/packages/fetchai/skills/ml_data_provider/dialogues.py @@ -33,7 +33,6 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model - from packages.fetchai.protocols.ledger_api.dialogues import ( LedgerApiDialogue as BaseLedgerApiDialogue, ) diff --git a/packages/fetchai/skills/ml_data_provider/handlers.py b/packages/fetchai/skills/ml_data_provider/handlers.py index 0c06eeaa7e..02359293ce 100644 --- a/packages/fetchai/skills/ml_data_provider/handlers.py +++ b/packages/fetchai/skills/ml_data_provider/handlers.py @@ -20,13 +20,12 @@ """This module contains the handler for the 'ml_data_provider' skill.""" import pickle # nosec -from typing import Optional, cast +from typing import cast, Optional from aea.configurations.base import ProtocolId from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/ml_data_provider/skill.yaml b/packages/fetchai/skills/ml_data_provider/skill.yaml index 9d26be6227..e94c28834e 100644 --- a/packages/fetchai/skills/ml_data_provider/skill.yaml +++ b/packages/fetchai/skills/ml_data_provider/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmakpsKWJrGRsoFaKR1Gf94KqcuPrkdXTYyciq5d4EhoFF __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ - behaviours.py: QmWgXU9qgahXwMKNqLLfDiGNYJozSXv2SVMkoPDQncC7ok - dialogues.py: QmdFsEXJdTiQo7GSS1U7n9ukd79ZEDVki3ifeYeGsowv2G - handlers.py: QmbmS4C1GdumnVkA5dc7czWRkjb9HGzY7YeATrnuMVU2X9 - strategy.py: QmdPfmAJ9u6VWjvR2x4FBkCyVJ3g3YYSCgwREjC35yvAbL + behaviours.py: QmWC4PEwWEyqcEJ9rTFjL9YpZ1pgkSpY9f4pE9mQHviSLz + dialogues.py: QmRsg5xMC3QqHK2p2ULDkdcUECiX3YLPwbqfXdWZ3PewhD + handlers.py: QmXk3mCd2uB6mg2aT74jTSLkktY3FntL5cMs5yQ7Mi8uAF + strategy.py: QmUsa36TcE6DXjdDDz1u1tAPVPHaJyMnVCTxudJhVCyA3e fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/ml_data_provider/strategy.py b/packages/fetchai/skills/ml_data_provider/strategy.py index df48d99a9f..04cd032521 100644 --- a/packages/fetchai/skills/ml_data_provider/strategy.py +++ b/packages/fetchai/skills/ml_data_provider/strategy.py @@ -20,7 +20,6 @@ """This module contains the strategy class.""" import numpy as np - from tensorflow import keras from aea.configurations.constants import DEFAULT_LEDGER diff --git a/packages/fetchai/skills/ml_train/behaviours.py b/packages/fetchai/skills/ml_train/behaviours.py index 875e5c4090..90540c71f5 100644 --- a/packages/fetchai/skills/ml_train/behaviours.py +++ b/packages/fetchai/skills/ml_train/behaviours.py @@ -21,5 +21,4 @@ from packages.fetchai.skills.generic_buyer.behaviours import GenericSearchBehaviour - SearchBehaviour = GenericSearchBehaviour diff --git a/packages/fetchai/skills/ml_train/dialogues.py b/packages/fetchai/skills/ml_train/dialogues.py index 168987bee9..b26923a1ba 100644 --- a/packages/fetchai/skills/ml_train/dialogues.py +++ b/packages/fetchai/skills/ml_train/dialogues.py @@ -41,8 +41,6 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model - - from packages.fetchai.protocols.ledger_api.dialogues import ( LedgerApiDialogue as BaseLedgerApiDialogue, ) diff --git a/packages/fetchai/skills/ml_train/handlers.py b/packages/fetchai/skills/ml_train/handlers.py index 2b94f46624..fd7a0d16c9 100644 --- a/packages/fetchai/skills/ml_train/handlers.py +++ b/packages/fetchai/skills/ml_train/handlers.py @@ -21,7 +21,7 @@ import pickle # nosec import uuid -from typing import Optional, cast +from typing import cast, Optional from aea.configurations.base import ProtocolId from aea.helpers.transaction.base import Terms @@ -29,7 +29,6 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler - from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage @@ -46,7 +45,6 @@ ) from packages.fetchai.skills.ml_train.strategy import Strategy - DUMMY_DIGEST = "dummy_digest" LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/ml_train/skill.yaml b/packages/fetchai/skills/ml_train/skill.yaml index 1379ad8436..5af8adcaa2 100644 --- a/packages/fetchai/skills/ml_train/skill.yaml +++ b/packages/fetchai/skills/ml_train/skill.yaml @@ -9,13 +9,13 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmeHcYRhDJi6gqAHpK29UJz3doiyaicoqeTrPddqM3gh64 __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ - behaviours.py: QmQiBzKV5rEFpMQbSjfjzAJ7SqwwGmso6TozWkjdytucLR - dialogues.py: QmccMjTxTrTaDyXFTTfAWHmA3xBiPCmKwBfiDSCW428Xie - handlers.py: QmSZR738THX7bCaXkuuoPDgwF3fo6DSD3hDt7EY2pRGxBm + behaviours.py: QmbJtAxgudXA35gERW14gMnCA9q79iRNQmKfgTTY9e2Bif + dialogues.py: Qma7uAuHWEdohLKMxGXHk34tRqXaS3FjFpyWCxpWtwRwEK + handlers.py: QmY2rbcg4agZYuTX5zfLEnpSFAfqqWHsW1hFFw4o58xk5A ml_model.py: QmXp667GwVRrGsLxtqricnnyrBUUDn6efem22UCBd2g1y8 model.json: QmdV2tGrRY6VQ5VLgUa4yqAhPDG6X8tYsWecypq8nox9Td strategy.py: QmY8z1DW6PqQuiEpgXAhwasSk1CgvvTNZQH1LtExupif9g - tasks.py: QmTb7kCt2UheQ8kwPewkzgfX8m2DF4KtnYCugWdmERJnTU + tasks.py: QmahJRCf6V61FsqrKgMMUyJ8F7PRd6C2bjunZg2XtM9fpF fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/ml_train/tasks.py b/packages/fetchai/skills/ml_train/tasks.py index 72468c0f39..c285a4b68b 100644 --- a/packages/fetchai/skills/ml_train/tasks.py +++ b/packages/fetchai/skills/ml_train/tasks.py @@ -22,7 +22,6 @@ from typing import Tuple import numpy as np - from tensorflow import keras from aea.skills.base import SkillContext diff --git a/packages/fetchai/skills/simple_service_registration/behaviours.py b/packages/fetchai/skills/simple_service_registration/behaviours.py index d2fba8f27c..16e2d91eda 100644 --- a/packages/fetchai/skills/simple_service_registration/behaviours.py +++ b/packages/fetchai/skills/simple_service_registration/behaviours.py @@ -22,7 +22,6 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.simple_service_registration.dialogues import ( OefSearchDialogues, diff --git a/packages/fetchai/skills/simple_service_registration/dialogues.py b/packages/fetchai/skills/simple_service_registration/dialogues.py index 9b1b4b03d3..75541e3ff0 100644 --- a/packages/fetchai/skills/simple_service_registration/dialogues.py +++ b/packages/fetchai/skills/simple_service_registration/dialogues.py @@ -27,7 +27,6 @@ from aea.protocols.base import Address, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model - from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue as BaseOefSearchDialogue, ) @@ -35,7 +34,6 @@ OefSearchDialogues as BaseOefSearchDialogues, ) - OefSearchDialogue = BaseOefSearchDialogue diff --git a/packages/fetchai/skills/simple_service_registration/handlers.py b/packages/fetchai/skills/simple_service_registration/handlers.py index 3826e190f2..83dcbdd9be 100644 --- a/packages/fetchai/skills/simple_service_registration/handlers.py +++ b/packages/fetchai/skills/simple_service_registration/handlers.py @@ -19,12 +19,11 @@ """This package contains the handlers of a generic seller AEA.""" -from typing import Optional, cast +from typing import cast, Optional from aea.configurations.base import ProtocolId from aea.protocols.base import Message from aea.skills.base import Handler - from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.simple_service_registration.dialogues import ( OefSearchDialogue, diff --git a/packages/fetchai/skills/simple_service_registration/skill.yaml b/packages/fetchai/skills/simple_service_registration/skill.yaml index da13bda8c9..770186f6c6 100644 --- a/packages/fetchai/skills/simple_service_registration/skill.yaml +++ b/packages/fetchai/skills/simple_service_registration/skill.yaml @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPuD9EtLKV143FbAaGUht5ZVtemVWXnm1jYmQxyUNnZ9T __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: Qmcz55RRytuCEZTkAU5PxX4jjaPxkp3f747ivJcceH78b4 - dialogues.py: QmX8L6qMd4X6LHLyPmiXaQL2LA5Ca9Q6B77qYdfvfJ3aen - handlers.py: QmcFWEWmjDFxiksQiwWSUJ3mzJhVRXt9EmrD6PTHCmUX5G + behaviours.py: QmREzo2bxMA9h84utHze1BFptT2MgiSMkfiSydbynthRna + dialogues.py: QmRMZk46s3AJ9KUbgP4fMP39qGX1YPsvJAJqmaFanMtZiV + handlers.py: QmTg94BbYLoAe3PUu7ZynGKe1MSw8bBCVr6PKGekjJBiQg strategy.py: QmNTZ6XXAv6nvJs7B1p5mt7bVdH4pb3motxADDrxCpbmWF fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/tac_control/behaviours.py b/packages/fetchai/skills/tac_control/behaviours.py index 50df1bcc61..fe8cd33e43 100644 --- a/packages/fetchai/skills/tac_control/behaviours.py +++ b/packages/fetchai/skills/tac_control/behaviours.py @@ -20,11 +20,10 @@ """This package contains a the behaviours.""" import datetime -from typing import Optional, cast +from typing import cast, Optional from aea.helpers.search.models import Description from aea.skills.base import Behaviour - from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control.dialogues import ( diff --git a/packages/fetchai/skills/tac_control/dialogues.py b/packages/fetchai/skills/tac_control/dialogues.py index dc1f522c68..3c831c3726 100644 --- a/packages/fetchai/skills/tac_control/dialogues.py +++ b/packages/fetchai/skills/tac_control/dialogues.py @@ -33,7 +33,6 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue from aea.skills.base import Model - from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue as BaseOefSearchDialogue, ) @@ -43,7 +42,6 @@ from packages.fetchai.protocols.tac.dialogues import TacDialogue as BaseTacDialogue from packages.fetchai.protocols.tac.dialogues import TacDialogues as BaseTacDialogues - DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index 99cd613e18..55335b6ab8 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -23,7 +23,7 @@ import datetime import pprint from enum import Enum -from typing import Dict, List, Optional, cast +from typing import cast, Dict, List, Optional from aea.common import Address from aea.crypto.ledger_apis import LedgerApis @@ -40,7 +40,6 @@ from aea.helpers.search.models import Description from aea.helpers.transaction.base import Terms from aea.skills.base import Model - from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control.helpers import ( determine_scaling_factor, diff --git a/packages/fetchai/skills/tac_control/handlers.py b/packages/fetchai/skills/tac_control/handlers.py index 8dd75f55a5..382f3941b8 100644 --- a/packages/fetchai/skills/tac_control/handlers.py +++ b/packages/fetchai/skills/tac_control/handlers.py @@ -19,12 +19,11 @@ """This package contains the handlers.""" -from typing import Optional, cast +from typing import cast, Optional from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control.dialogues import ( diff --git a/packages/fetchai/skills/tac_control/helpers.py b/packages/fetchai/skills/tac_control/helpers.py index fbe56fa922..a214c7f16d 100644 --- a/packages/fetchai/skills/tac_control/helpers.py +++ b/packages/fetchai/skills/tac_control/helpers.py @@ -22,7 +22,7 @@ import math import random -from typing import Dict, List, Tuple, cast +from typing import cast, Dict, List, Tuple import numpy as np diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index 8417c0f319..1876fe4347 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -9,11 +9,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdWECpRXZXH5JPV6wVHqeUtvjBhieUFTEoT2e7EY16N8M __init__.py: Qme9YfgfPXymvupw1EHMJWGUSMTT6JQZxk2qaeKE76pgyN - behaviours.py: QmTVCXtTpH1A55vWnynz1PjM4VCrQ6EDy5XfcJpT93doEq - dialogues.py: QmcVYVTZ95UKBnXzmKyGLo5LwSVcGYUTrifosQMSpzNnCX - game.py: QmeAmG3LH1xBFRvUATrWY7spSDmjNeXVD4ZNYrt1BRY3jB - handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW - helpers.py: QmdG31YUJakBz8FdNNxU6RxqhWy9iv1BG253PzfxBhzqq2 + behaviours.py: QmPMdhZh9Uzx5zy7qxQGqFanaC9h8SwNRkW94r8fD3DECG + dialogues.py: QmVSNY2MaKJ1JKfbt39qJ2CJz1dMhPNFefS6Nn2Ld2WqNA + game.py: QmRrKBB2ithuHbytNWZiW9gq9TA9xkjN7bdFwpd9pZS7Pa + handlers.py: QmfQBa9NLVkcAUhQaY8grMB7yiAARgjoADP7pjVaegcBtt + helpers.py: QmZyaDLh8rAZ7LTbGCRgnQ8zMA4cqzCQjweBwd9MWL7t2t parameters.py: QmQB95beEKzyA8Aa7Y9HTPw6BPEVi6BGkpsUqN4QZ4DcVG fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 28562d5ae1..cd9d91cb0c 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -20,13 +20,12 @@ """This package contains the behaviours.""" import datetime -from typing import List, Optional, cast +from typing import cast, List, Optional from aea.crypto.base import LedgerApi from aea.helpers.search.models import Attribute, DataModel, Description from aea.protocols.signing.message import SigningMessage from aea.skills.behaviours import SimpleBehaviour, TickerBehaviour - from packages.fetchai.contracts.erc1155.contract import ERC1155Contract from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage diff --git a/packages/fetchai/skills/tac_control_contract/game.py b/packages/fetchai/skills/tac_control_contract/game.py index 5120453dc0..737e710999 100644 --- a/packages/fetchai/skills/tac_control_contract/game.py +++ b/packages/fetchai/skills/tac_control_contract/game.py @@ -23,7 +23,7 @@ import datetime import pprint from enum import Enum -from typing import Dict, List, Optional, cast +from typing import cast, Dict, List, Optional from aea.common import Address from aea.exceptions import AEAEnforceError, enforce @@ -33,7 +33,6 @@ ) from aea.helpers.transaction.base import Terms from aea.skills.base import Model - from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control_contract.helpers import ( determine_scaling_factor, diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index 0445ede7c1..ca8f0f7a12 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -24,7 +24,6 @@ from aea.protocols.base import Message from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler - from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control_contract.game import Game, Phase diff --git a/packages/fetchai/skills/tac_control_contract/helpers.py b/packages/fetchai/skills/tac_control_contract/helpers.py index 6441d00f9f..8fa7c3720b 100644 --- a/packages/fetchai/skills/tac_control_contract/helpers.py +++ b/packages/fetchai/skills/tac_control_contract/helpers.py @@ -21,12 +21,11 @@ """This module contains the helpers methods for the controller agent.""" import random -from typing import Dict, List, Tuple, cast +from typing import cast, Dict, List, Tuple import numpy as np from aea.exceptions import enforce - from packages.fetchai.contracts.erc1155.contract import ERC1155Contract QUANTITY_SHIFT = 1 # Any non-negative integer is fine. diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 42af59473b..34978934be 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmV6mToyVnQL9squVJntDPrHvtxFk7sfEYJ61Fyoiy9wsE __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmcLSggJr1XpiDEwefCGGpfwUp282J4i97ziCNFH7X1M9C - game.py: Qmdz91tAYzEFDsvN4hNBawK7D7beTfocps1hpQc3RgavUK - handlers.py: QmWyibFRxcunBLqb7FJEkx9RpS6fNZpAvNDkG6cCfK7mQd - helpers.py: QmQ36tdx5itzz189tUgmyR74Q63vSRUcPTsg9qEwBUYdNU + behaviours.py: QmPNHEtFZ98SkPYGs6LbX5VwKM2xoAoZ6CLbopmTidYuJk + game.py: QmcY99fhKGAQZqDdic3iATmWEM6oMSwpHdH5MeBFmXiX9u + handlers.py: QmR2kWAiBB99TrJxpue4JpC8J8aewadg5FSMa6V2YS28Ws + helpers.py: QmS2zGCt2afonTTpNCPm2R74uUS834bpHFUnXFFnuZ1i8C parameters.py: QmRU9gxsWcxy25g69jbrKve2f8kFxNBjFfRjPZNKsYoYCP fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/tac_negotiation/behaviours.py b/packages/fetchai/skills/tac_negotiation/behaviours.py index 536ad27706..59b593a2bc 100644 --- a/packages/fetchai/skills/tac_negotiation/behaviours.py +++ b/packages/fetchai/skills/tac_negotiation/behaviours.py @@ -23,7 +23,6 @@ from aea.mail.base import EnvelopeContext from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.tac_negotiation.dialogues import ( OefSearchDialogue, diff --git a/packages/fetchai/skills/tac_negotiation/dialogues.py b/packages/fetchai/skills/tac_negotiation/dialogues.py index 493185e91d..514e81d095 100644 --- a/packages/fetchai/skills/tac_negotiation/dialogues.py +++ b/packages/fetchai/skills/tac_negotiation/dialogues.py @@ -23,7 +23,7 @@ - Dialogues: The dialogues class keeps track of all dialogues. """ -from typing import Optional, Type, cast +from typing import cast, Optional, Type from aea.common import Address from aea.exceptions import enforce @@ -35,7 +35,6 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model - from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage @@ -51,7 +50,6 @@ SUPPLY_DATAMODEL_NAME, ) - DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/tac_negotiation/handlers.py b/packages/fetchai/skills/tac_negotiation/handlers.py index 016d018775..392518aef9 100644 --- a/packages/fetchai/skills/tac_negotiation/handlers.py +++ b/packages/fetchai/skills/tac_negotiation/handlers.py @@ -21,7 +21,7 @@ import pprint import time -from typing import Optional, Tuple, cast +from typing import cast, Optional, Tuple from aea.configurations.base import ProtocolId from aea.helpers.search.models import Query @@ -29,7 +29,6 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler - from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.tac_negotiation.dialogues import ( diff --git a/packages/fetchai/skills/tac_negotiation/helpers.py b/packages/fetchai/skills/tac_negotiation/helpers.py index 9e965f377f..a12267b109 100644 --- a/packages/fetchai/skills/tac_negotiation/helpers.py +++ b/packages/fetchai/skills/tac_negotiation/helpers.py @@ -20,7 +20,7 @@ """This class contains the helpers for FIPA negotiation.""" import copy -from typing import Dict, List, Union, cast +from typing import cast, Dict, List, Union from aea.helpers.search.models import ( Attribute, diff --git a/packages/fetchai/skills/tac_negotiation/skill.yaml b/packages/fetchai/skills/tac_negotiation/skill.yaml index 455aee1dfd..f8cb6f1d92 100644 --- a/packages/fetchai/skills/tac_negotiation/skill.yaml +++ b/packages/fetchai/skills/tac_negotiation/skill.yaml @@ -9,12 +9,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZucue4N3TX7BPe9CDZybfMQc1zpYbRKEVXAUGYRpcUfD __init__.py: QmcgZLvHebdfocqBmbu6gJp35khs6nbdbC649jzUyS86wy - behaviours.py: QmUm9C86crCZpXkHGCaPKeMfuMnP8BjMzSsjrUGkysmg9T - dialogues.py: QmdPAjBTpgrW9qP8SnAjKHWxBQRiGUqmgiiXMdrPKAJUKj - handlers.py: QmeSaLfQV3rzHuHPhzsBps9z4AbX1MNevTs2YTjnZaWuEA - helpers.py: QmfRnfpeCtHMEXSH3q3ofWhoSc7pbpRrSFSBVStUK3JWt3 - strategy.py: QmYcwqZ9ejjK2zxN8nKoc3kvBoGamTxwGQqXJrWV5s8STx - transactions.py: Qmc9Re92RLFkfds1NspTRym1wn7XPGSNDRFGtaG6Hrix4E + behaviours.py: QmPnCqPr6c3vqCt2x5rZ9tHZ9hD8mGA4F2fNDTXo1fxfmR + dialogues.py: QmaqBNTf4pMscFp7VRG7s4Ca7TjFQCBcnRD3WLkEJRX4Ah + handlers.py: QmeCNBScErhiWXH7zubEDf7RRWcAZH9NJH1jRxwHjtCqXr + helpers.py: QmTQBUUNbubMc7NkYkVtePL6WCQsGdvmqPFUeSxf2VLAqN + strategy.py: QmYrM2HoKVQXWpjYxtWeZZxjCjiingJ6PJKkmegh3Eiwfg + transactions.py: QmUd1PzECqMtVNrhwDMGfLa7zAfnLhtQoNjugSYYfuSSTN fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/tac_negotiation/strategy.py b/packages/fetchai/skills/tac_negotiation/strategy.py index 23cadbaa3d..13313f9c47 100644 --- a/packages/fetchai/skills/tac_negotiation/strategy.py +++ b/packages/fetchai/skills/tac_negotiation/strategy.py @@ -22,7 +22,7 @@ import copy import random from enum import Enum -from typing import Dict, List, Optional, Tuple, cast +from typing import cast, Dict, List, Optional, Tuple from aea.decision_maker.default import OwnershipState, Preferences from aea.helpers.search.generic import ( @@ -39,7 +39,6 @@ ) from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model - from packages.fetchai.skills.tac_negotiation.dialogues import FipaDialogue from packages.fetchai.skills.tac_negotiation.helpers import ( build_goods_description, @@ -47,7 +46,6 @@ ) from packages.fetchai.skills.tac_negotiation.transactions import Transactions - ROUNDING_ADJUSTMENT = 1 DEFAULT_LOCATION = {"longitude": 51.5194, "latitude": 0.1270} DEFAULT_SERVICE_KEY = "tac_service" diff --git a/packages/fetchai/skills/tac_negotiation/transactions.py b/packages/fetchai/skills/tac_negotiation/transactions.py index 1997572150..b2a6a0d6a7 100644 --- a/packages/fetchai/skills/tac_negotiation/transactions.py +++ b/packages/fetchai/skills/tac_negotiation/transactions.py @@ -22,7 +22,7 @@ import copy import datetime from collections import defaultdict, deque -from typing import Deque, Dict, List, Tuple, cast +from typing import cast, Deque, Dict, List, Tuple from aea.common import Address from aea.decision_maker.default import OwnershipState @@ -32,7 +32,6 @@ from aea.protocols.dialogue.base import DialogueLabel from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model - from packages.fetchai.skills.tac_negotiation.dialogues import ( FipaDialogue, SigningDialogue, diff --git a/packages/fetchai/skills/tac_participation/behaviours.py b/packages/fetchai/skills/tac_participation/behaviours.py index 018fe26085..1c7d907c7c 100644 --- a/packages/fetchai/skills/tac_participation/behaviours.py +++ b/packages/fetchai/skills/tac_participation/behaviours.py @@ -19,11 +19,10 @@ """This package contains a tac search behaviour.""" -from typing import Any, Dict, cast +from typing import Any, cast, Dict from aea.mail.base import EnvelopeContext from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_participation.dialogues import OefSearchDialogues diff --git a/packages/fetchai/skills/tac_participation/dialogues.py b/packages/fetchai/skills/tac_participation/dialogues.py index bb05c4b233..3ecacbde03 100644 --- a/packages/fetchai/skills/tac_participation/dialogues.py +++ b/packages/fetchai/skills/tac_participation/dialogues.py @@ -37,7 +37,6 @@ StateUpdateDialogues as BaseStateUpdateDialogues, ) from aea.skills.base import Model - from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue as BaseOefSearchDialogue, ) @@ -47,7 +46,6 @@ from packages.fetchai.protocols.tac.dialogues import TacDialogue as BaseTacDialogue from packages.fetchai.protocols.tac.dialogues import TacDialogues as BaseTacDialogues - OefSearchDialogue = BaseOefSearchDialogue diff --git a/packages/fetchai/skills/tac_participation/game.py b/packages/fetchai/skills/tac_participation/game.py index 534c2bd01a..4b96be9dad 100644 --- a/packages/fetchai/skills/tac_participation/game.py +++ b/packages/fetchai/skills/tac_participation/game.py @@ -25,7 +25,6 @@ from aea.exceptions import AEAEnforceError, enforce from aea.helpers.search.models import Constraint, ConstraintType, Location, Query from aea.skills.base import Model - from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_participation.dialogues import ( StateUpdateDialogue, diff --git a/packages/fetchai/skills/tac_participation/handlers.py b/packages/fetchai/skills/tac_participation/handlers.py index 4530402a6a..897b2725ed 100644 --- a/packages/fetchai/skills/tac_participation/handlers.py +++ b/packages/fetchai/skills/tac_participation/handlers.py @@ -19,13 +19,12 @@ """This package contains the handlers.""" -from typing import Dict, Optional, Tuple, cast +from typing import cast, Dict, Optional, Tuple from aea.common import Address from aea.protocols.base import Message from aea.protocols.state_update.message import StateUpdateMessage from aea.skills.base import Handler - from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_participation.dialogues import ( diff --git a/packages/fetchai/skills/tac_participation/skill.yaml b/packages/fetchai/skills/tac_participation/skill.yaml index ca4252c8f6..41e519c743 100644 --- a/packages/fetchai/skills/tac_participation/skill.yaml +++ b/packages/fetchai/skills/tac_participation/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVNxdGy1pbosYrrvbXczbkJtU7f5ddrBPSNnFoJA9GJzg __init__.py: QmcVpVrbV54Aogmowu6AomDiVMrVMo9BUvwKt9V1bJpBwp - behaviours.py: QmX3UbuLohnPSLM2W6LrWcZyo4zXCr1YN5Bznu61v27SZC - dialogues.py: QmZrJ1d9mhtfkxRg5QfsKbbtVZFa6cKna4anRWHvzNTEdD - game.py: QmVGeCGEfwmzktSPQN4xWL5yxjHqNyenneQzeW2vfx4giv - handlers.py: QmSseAwQqHsSmj2eBPPnC9eygNSSwL1kheRVsgbLqyeDvV + behaviours.py: QmREapjgiTGH3JsTqeJbR2CcCjRa3jnRdeNVVNUaU8mhRX + dialogues.py: QmNZvomWQBx8p8Ftkgg55Pw44P8RedKTKtFULh9Qb8AJLY + game.py: QmUotRmam5EqL2YWAwPR9i1uWHNeBsphcDJwB59ZiLFKSw + handlers.py: QmZqqEiXBjs77DS7GnE8f7tSF9uDoVyVZ7HNMV1uW1wtDX fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/thermometer/behaviours.py b/packages/fetchai/skills/thermometer/behaviours.py index 76a04e4899..0c086baff1 100644 --- a/packages/fetchai/skills/thermometer/behaviours.py +++ b/packages/fetchai/skills/thermometer/behaviours.py @@ -23,5 +23,4 @@ GenericServiceRegistrationBehaviour, ) - ServiceRegistrationBehaviour = GenericServiceRegistrationBehaviour diff --git a/packages/fetchai/skills/thermometer/dialogues.py b/packages/fetchai/skills/thermometer/dialogues.py index d493129414..aa3bde5528 100644 --- a/packages/fetchai/skills/thermometer/dialogues.py +++ b/packages/fetchai/skills/thermometer/dialogues.py @@ -39,7 +39,6 @@ OefSearchDialogues as GenericOefSearchDialogues, ) - DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/thermometer/handlers.py b/packages/fetchai/skills/thermometer/handlers.py index 3766f61003..1c9dec0554 100644 --- a/packages/fetchai/skills/thermometer/handlers.py +++ b/packages/fetchai/skills/thermometer/handlers.py @@ -25,7 +25,6 @@ GenericOefSearchHandler, ) - FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/thermometer/skill.yaml b/packages/fetchai/skills/thermometer/skill.yaml index 219f6095a3..a975946e98 100644 --- a/packages/fetchai/skills/thermometer/skill.yaml +++ b/packages/fetchai/skills/thermometer/skill.yaml @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUH2RCKZZ3sKBptXtYZaFJTsJFyk5P1aeTNYYV1YPRNxP __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmWgXU9qgahXwMKNqLLfDiGNYJozSXv2SVMkoPDQncC7ok - dialogues.py: QmPXfUWDxnHDaHQqsgtVhJ2v9dEgGWLtvEHKFvvFcDXGms - handlers.py: QmNujxh4FtecTar5coHTJyY3BnVnsseuARSpyTLUDmFmfX + behaviours.py: QmWC4PEwWEyqcEJ9rTFjL9YpZ1pgkSpY9f4pE9mQHviSLz + dialogues.py: QmeYs1FYc1Ud4yXULoyf1nSqornVx2dczFCJbF1BwM2gzD + handlers.py: QmeWzG6R8P7z98M2kfXKzmK5u9vT6ZAp2tG7NcXTwWFSaZ strategy.py: QmcFRUUhi6VubFw51rhkTH28QjQEV67kBFeTmAviroopmZ fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/thermometer_client/behaviours.py b/packages/fetchai/skills/thermometer_client/behaviours.py index 3f2e38b180..deda9acdac 100644 --- a/packages/fetchai/skills/thermometer_client/behaviours.py +++ b/packages/fetchai/skills/thermometer_client/behaviours.py @@ -21,5 +21,4 @@ from packages.fetchai.skills.generic_buyer.behaviours import GenericSearchBehaviour - SearchBehaviour = GenericSearchBehaviour diff --git a/packages/fetchai/skills/thermometer_client/handlers.py b/packages/fetchai/skills/thermometer_client/handlers.py index 2f1e9cb165..ce8f9a83a0 100644 --- a/packages/fetchai/skills/thermometer_client/handlers.py +++ b/packages/fetchai/skills/thermometer_client/handlers.py @@ -26,7 +26,6 @@ GenericSigningHandler, ) - FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/thermometer_client/skill.yaml b/packages/fetchai/skills/thermometer_client/skill.yaml index 91ee45bf87..dd9d186bb6 100644 --- a/packages/fetchai/skills/thermometer_client/skill.yaml +++ b/packages/fetchai/skills/thermometer_client/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmSn1bh9J7RT241DGT4812rTNGe2S2YLpEvy8ApNqNNqjf __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmXw3wGKAqCT55MRX61g3eN1T2YVY4XC5z9b4Dg7x1Wihc + behaviours.py: QmW2VLVXoepN7V1u4rgARXjp9d9PpPfVgMz2KuNdR76aRg dialogues.py: QmcMynppu7B2nZR21LzxFQMpoRdegpWpwcXti2ba4Vcei5 - handlers.py: QmYx8WzeR2aCg2b2uiR1K2NHLn8DKhzAahLXoFnrXyDoDz - strategy.py: QmZVALhDnpEdxLhk3HLAmTs3JdEr9tk1QTS33ZsVnxkLXZ + handlers.py: Qme3AaVj6UPLufnMFoXVQKZn5EbEa1JsUqUNHh7jrxKWBE + strategy.py: QmRSgvrswoay8vF6woRm97vYVK9ZAGk1Gh26EkD4fFmbjz fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/thermometer_client/strategy.py b/packages/fetchai/skills/thermometer_client/strategy.py index 4b755b9173..9748064074 100644 --- a/packages/fetchai/skills/thermometer_client/strategy.py +++ b/packages/fetchai/skills/thermometer_client/strategy.py @@ -21,5 +21,4 @@ from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy - Strategy = GenericStrategy diff --git a/packages/fetchai/skills/weather_client/behaviours.py b/packages/fetchai/skills/weather_client/behaviours.py index 3f2e38b180..deda9acdac 100644 --- a/packages/fetchai/skills/weather_client/behaviours.py +++ b/packages/fetchai/skills/weather_client/behaviours.py @@ -21,5 +21,4 @@ from packages.fetchai.skills.generic_buyer.behaviours import GenericSearchBehaviour - SearchBehaviour = GenericSearchBehaviour diff --git a/packages/fetchai/skills/weather_client/handlers.py b/packages/fetchai/skills/weather_client/handlers.py index 2f1e9cb165..ce8f9a83a0 100644 --- a/packages/fetchai/skills/weather_client/handlers.py +++ b/packages/fetchai/skills/weather_client/handlers.py @@ -26,7 +26,6 @@ GenericSigningHandler, ) - FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/weather_client/skill.yaml b/packages/fetchai/skills/weather_client/skill.yaml index c897a88117..a2bf4ab038 100644 --- a/packages/fetchai/skills/weather_client/skill.yaml +++ b/packages/fetchai/skills/weather_client/skill.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmP5vjtJk1TirWqzFcgvQYTZeZwaV3Qs5HKVW1WNWgMTPM __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmXw3wGKAqCT55MRX61g3eN1T2YVY4XC5z9b4Dg7x1Wihc + behaviours.py: QmW2VLVXoepN7V1u4rgARXjp9d9PpPfVgMz2KuNdR76aRg dialogues.py: QmcMynppu7B2nZR21LzxFQMpoRdegpWpwcXti2ba4Vcei5 - handlers.py: QmYx8WzeR2aCg2b2uiR1K2NHLn8DKhzAahLXoFnrXyDoDz - strategy.py: QmZVALhDnpEdxLhk3HLAmTs3JdEr9tk1QTS33ZsVnxkLXZ + handlers.py: Qme3AaVj6UPLufnMFoXVQKZn5EbEa1JsUqUNHh7jrxKWBE + strategy.py: QmRSgvrswoay8vF6woRm97vYVK9ZAGk1Gh26EkD4fFmbjz fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/weather_client/strategy.py b/packages/fetchai/skills/weather_client/strategy.py index 4b755b9173..9748064074 100644 --- a/packages/fetchai/skills/weather_client/strategy.py +++ b/packages/fetchai/skills/weather_client/strategy.py @@ -21,5 +21,4 @@ from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy - Strategy = GenericStrategy diff --git a/packages/fetchai/skills/weather_station/behaviours.py b/packages/fetchai/skills/weather_station/behaviours.py index 3218eb045c..93d026803e 100644 --- a/packages/fetchai/skills/weather_station/behaviours.py +++ b/packages/fetchai/skills/weather_station/behaviours.py @@ -24,5 +24,4 @@ GenericServiceRegistrationBehaviour, ) - ServiceRegistrationBehaviour = GenericServiceRegistrationBehaviour diff --git a/packages/fetchai/skills/weather_station/db_communication.py b/packages/fetchai/skills/weather_station/db_communication.py index 9cd37018b3..e601c7e380 100644 --- a/packages/fetchai/skills/weather_station/db_communication.py +++ b/packages/fetchai/skills/weather_station/db_communication.py @@ -22,7 +22,7 @@ import datetime import os.path import sqlite3 -from typing import Dict, cast +from typing import cast, Dict my_path = os.path.dirname(__file__) diff --git a/packages/fetchai/skills/weather_station/dialogues.py b/packages/fetchai/skills/weather_station/dialogues.py index d493129414..aa3bde5528 100644 --- a/packages/fetchai/skills/weather_station/dialogues.py +++ b/packages/fetchai/skills/weather_station/dialogues.py @@ -39,7 +39,6 @@ OefSearchDialogues as GenericOefSearchDialogues, ) - DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/weather_station/handlers.py b/packages/fetchai/skills/weather_station/handlers.py index 3766f61003..1c9dec0554 100644 --- a/packages/fetchai/skills/weather_station/handlers.py +++ b/packages/fetchai/skills/weather_station/handlers.py @@ -25,7 +25,6 @@ GenericOefSearchHandler, ) - FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/weather_station/skill.yaml b/packages/fetchai/skills/weather_station/skill.yaml index 44781300c7..fb62e1bba9 100644 --- a/packages/fetchai/skills/weather_station/skill.yaml +++ b/packages/fetchai/skills/weather_station/skill.yaml @@ -9,11 +9,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: Qma72715sXAgDLggNNVkXQoVxCu9hyEEFKbyWTKSavEF2v __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmfPE6zrMmY2QARQt3gNZ2oiV3uAqvAQXSvU3XWnFDUQkG - db_communication.py: QmPHjQJvYp96TRUWxTRW9TE9BHATNuUyMw3wy5oQSftnug - dialogues.py: QmPXfUWDxnHDaHQqsgtVhJ2v9dEgGWLtvEHKFvvFcDXGms + behaviours.py: QmWRboujPwBEJNHqXJcyNbbVvdGiJ2mabvjXS6td3YDb2Q + db_communication.py: QmNWfTjZirbmCnx5K75fZLA19gsunt34aicvZniLCmZKxB + dialogues.py: QmeYs1FYc1Ud4yXULoyf1nSqornVx2dczFCJbF1BwM2gzD dummy_weather_station_data.py: QmeSSsAiCKBfMHfUN4QvoKBTQRNCcGxeJicThkDTGRQE7i - handlers.py: QmNujxh4FtecTar5coHTJyY3BnVnsseuARSpyTLUDmFmfX + handlers.py: QmeWzG6R8P7z98M2kfXKzmK5u9vT6ZAp2tG7NcXTwWFSaZ strategy.py: QmWZiiNXeXGiduzro1bWdTr6ZLjL45TtvxFtY1dUQNWfYZ fingerprint_ignore_patterns: - '*.db' diff --git a/packages/hashes.csv b/packages/hashes.csv index affbbbc4be..f487ca55cb 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -18,55 +18,55 @@ fetchai/agents/thermometer_aea,QmZzUqFVaDNGfwPnq5EvfPKNoMSfGzgpBic2z8HHWfu1RE fetchai/agents/thermometer_client,QmfMjh5gCDrdipCDYYrAr7jRDXJ2CpfWFij9t6J4EKdXYT fetchai/agents/weather_client,QmXyXQHxeJyBFSXLU2GZnV49t17iwnNLWWpUEFqMTAb8AE fetchai/agents/weather_station,QmW4kSbF5eKuh4itMJ8xKonaPejutaMp2GyobcN7V4zJR8 -fetchai/connections/gym,Qmack3EaCW6ARrHrtCnJmL3kR2xrHutJmgD8uoRVGFz6kH -fetchai/connections/http_client,QmfSuWhrseBCVcmzwKmqFDC6qX3ryFzfx2uuUTb8HPGuEd -fetchai/connections/http_server,QmU2XNsgEV7zGEgiu4PD2mjXP3fA6Fa7ivrcd7dUzC6PKc -fetchai/connections/ledger,QmR77FXChjMt1K9QahWhuXHqiUwYjCxyiT2XZVtucv67Za -fetchai/connections/local,QmWZPDvqjZjzNDUX4ivHF3kGvkNCUYM449RqNEyyoexFix -fetchai/connections/oef,QmWpjFr7im4afmsdtmBSYJp2tRzVpeZdYpRvsDYq6q3kg7 -fetchai/connections/p2p_libp2p,QmVXSnhCn37mgacK7iG1HENbEkSvSZMMaf9RTFCUUDa2C9 -fetchai/connections/p2p_libp2p_client,QmVEwABjAPTZcA4BaAgn8BnzUCpHQbSzc4pJ6mdR4bW222 -fetchai/connections/p2p_stub,QmX8EWvFok3UAdqXGgir4TrhfDj2kLhfjuXRg82b6G6XtW +fetchai/connections/gym,QmRjx3wvjadxBqZKptWHwTBwkAQBcPeq89g2ikEq7ozmDX +fetchai/connections/http_client,QmajyVnAQoG58R5HiWfFdBfvLwmGaXKGinH7r1NYjfCDWJ +fetchai/connections/http_server,QmXi4BRRxsCf817q72d9QpfwmcdfnHwxKttFF8zH6uWhr5 +fetchai/connections/ledger,QmZmv1G5NK3MYnA4z4JU66f8Yn1c7UAA92UdJet5a7UcjF +fetchai/connections/local,QmcPGZtD76x3RdsJZmUpSzgU7Nvy9hMvFH9GY3hqAVP4Ci +fetchai/connections/oef,Qmbu8UptZnquusUSYA3Yqo1zuvtNsYNEZte7gHNLr5JVoa +fetchai/connections/p2p_libp2p,QmQCf8etp59MDck1ZmciGGQvhP2SkfceNYoHZBcs7KrBgB +fetchai/connections/p2p_libp2p_client,Qmc4LTENH1b6MoeVN7UAKtxe3UU8Y5Pj5G9ojdZsbQTvVL +fetchai/connections/p2p_stub,QmNNstioPgSoQJbvf5NkPNViZE9udnnN6GRxWdLVxrKBA7 fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmQWyjmHg6HWsLEuighe2vrWQSKBZAXvoXSXF33XhaVyE8 -fetchai/connections/stub,QmSuUAA2k1E1M9dpeAgkWpfKdssjqghSDfFfrQzC9ZLKbD -fetchai/connections/tcp,QmU93B7yajCHwXsgDXXhv1uSuXi7VmFBhdahcFosbrr6nA -fetchai/connections/webhook,QmaJunWQT1ypkqGnzrj5gYjjQBywjTHJmyktCZXZsa8hv8 -fetchai/contracts/erc1155,QmUupRwnza2KZBGULZ62xQREtkuQbYUrt1W8NbYZJuqbNt +fetchai/connections/soef,QmbEnyTJoZWDkwQNV2XJw8v6z6fz3gvuyxxay7YJhoHAxE +fetchai/connections/stub,QmU1fuqRkzBufaHTB9qY7GSUkkh4Wq1M6ru6FQKnrcEoUZ +fetchai/connections/tcp,QmS9dWyHZUY4pZEzMVJ3mZs42fBkAQFtLxWq3VXkzbueLY +fetchai/connections/webhook,QmVMNFuX88Fj68hm2WhwfuhPLi1TMnLYNA31asN6HLCW3g +fetchai/contracts/erc1155,Qmf7sDBb6kf3ru18NHjC7irB31vFDEJe8D8UtqYRN3cYrw fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 -fetchai/protocols/contract_api,QmaxhJetT4GQ1A2ctbxxWQLvLny6LZykFnXEt2yDVb4sKJ -fetchai/protocols/default,QmXAdTynqPF8kYFsRZzxigVh3LYZJ8FSGEPEmNPDLoyHmM -fetchai/protocols/fipa,Qmb3GXxbEQ23sZ1d7HsmrvchLwPfsEcDAbpLLjRTYxdJDm -fetchai/protocols/gym,Qmaj7TByBrHvbecUzWmuy96t7W8iocsD3gKunWZZSLTF5b -fetchai/protocols/http,QmZJVqY2cxjky6p3o76TUemSsFDws8Dx33voG9WMdrKcry -fetchai/protocols/ledger_api,Qmak3uKpeSfT5f4oqes3oUcNSg7vy7WKE2tUmSu8CZUNJ5 -fetchai/protocols/ml_trade,QmNVZvbcgERSypYUopKMHvd6F8B81rQqtLVqUvzMeEEwJN -fetchai/protocols/oef_search,QmYjitTtVuVynTWv4TE34Wm2b37LAfyKgZEaiMfZv1jH3Z -fetchai/protocols/scaffold,QmZhHsoA7JzNSoSUABFWqyRELaei4BtKYce1QKVcHhnQJN -fetchai/protocols/signing,QmPhHfj2N2iCRTMEDYiifC3AkytZRFpVMoH7g63NwGcKwH -fetchai/protocols/state_update,QmQmQt1VHwxmnNmwxKcrF4Qno6iHzVhhnUUjsqPtpfpQUV -fetchai/protocols/tac,QmSn9DVVZUroa5dsjqMwiVBFmpLjyGuox8nt2FhhTs2KM6 -fetchai/skills/aries_alice,QmXp6W2vFmQgYCchQwLa3yDUwWw7hjeC8WnuPmtrXebZnq -fetchai/skills/aries_faber,QmZFcjJddJM3mJyVDPu8xfcmUi4TgHgTB92A8SSPr9eD2X -fetchai/skills/carpark_client,QmV3vHmx4sDaecBq56L6kMD2K6JorNq4fTVC2X2NqqdUFP -fetchai/skills/carpark_detection,QmSMoWJggZdTF3p4Y7CRUj94U9fny9tbPqJg5dZSDzUCFp -fetchai/skills/echo,QmVRzFQnq22j7tcWK6MiD9q8Vs6mAAJhY3FrRE4CfJQ1D2 -fetchai/skills/erc1155_client,Qma5wTx1huj5DAcsBkRwCvZVczRREwyUawVJhyaC4UTrRE -fetchai/skills/erc1155_deploy,QmPPHF6PUzRbeRCwy4m73oykUbTcNb1cGSoco5tSjcpVoB +fetchai/protocols/contract_api,Qme5e9KAzdcKhzzLWzFFqzbYB1EebghS4BY3gtPvPhqHVd +fetchai/protocols/default,QmPo3UzUagCMq4xvWjcECDWdYqur9uzabsug1WRsaAmKFR +fetchai/protocols/fipa,QmbtJuAbuKVuYuXXW7v9VGiK2StSQEVBzLZjSQBftdkgzg +fetchai/protocols/gym,QmXHiPkic2umXCYo5479rQNndSgYSA5xbxZhYugv1D8vC7 +fetchai/protocols/http,Qmbb7kpNdXtRAxnuqh6GULxpb9c3Pu6YckPRVERgSAL4aW +fetchai/protocols/ledger_api,QmYnU11zKVE9LzEVS9H6Tst7cqcuwZDKpgNSAeG26o7ggU +fetchai/protocols/ml_trade,QmShijhkQYbzabZWNUenabn2tqsu3cRFGx42dHReKdn3mA +fetchai/protocols/oef_search,QmQarQdcwwtAo382A4xQKxvExZuUiHnFzrREHT4ZoVGoyv +fetchai/protocols/scaffold,QmXJb2kxe228AqQ2iHRiKJnhhKsC9zU8pqNdojLNXqjUvz +fetchai/protocols/signing,QmWm7ThNZFND7ZuWQ7CLkJN6vGjAxauiF7LBLxBTKKstJZ +fetchai/protocols/state_update,QmciKjpSjjd1E34iT8xT2XznCqChU4s6NnCqHfpNALftRQ +fetchai/protocols/tac,QmeyUr7iHGb1mHrM8qiR5uJqHbVpPTP4ryT2ww5piCH8HD +fetchai/skills/aries_alice,QmTLZP3j8xdqWnxCAbWEehZXh4ksPztJYtktb8a6SNA1vj +fetchai/skills/aries_faber,QmfN448ztvQgLN9FTK3pHaRs8nZNCC5pdar5Tut5BCydio +fetchai/skills/carpark_client,QmPYHXP1TvNihMa6WFSLP1NhiFDKTiArZbStQ6v54ySa8j +fetchai/skills/carpark_detection,QmetEJmLHLWCPRyYByvrJ48fjM42sg91fqBfzZukmUth6b +fetchai/skills/echo,QmPjabbvqPfabWhyE3vYCtTpPLJgYd4ZQBBsKsSJ5bLbeb +fetchai/skills/erc1155_client,QmeQoL6WgcpMW8NUahWo8E4gcBP6iMoJqAisVNm7LLJZLv +fetchai/skills/erc1155_deploy,QmTjV8pqyFSsj2Ci2tuJ5RmQz1CVFEQTs7kdPYdsiNXe2g fetchai/skills/error,QmanfpyCmvUkqG9xsEyWULvi1ZZzqvggvs9LnQvSjuRhLb -fetchai/skills/generic_buyer,QmR2xrE8RJMmtHPRw8sjH1RxY459958MDZNkUur6cvgSsg -fetchai/skills/generic_seller,QmQYVjJ1NnTTzLPxf2yXGkwHbCBADDJCUjCjBH2NpvG2pB -fetchai/skills/gym,Qmc78RwfDZFyBxQBn6qyakD55dKEPwUERZ1hXpx9xyN6TW -fetchai/skills/http_echo,QmZR1VgVb51R2PjuHtBTd8w2ye6rfnMbgi7GJ7BQhDXAPJ -fetchai/skills/ml_data_provider,QmdgxfES4XpmREpp9QqPQRMH9TvTF9nZ21zKM5RHLGCLke -fetchai/skills/ml_train,QmbRQZz1MPXXuWyNW3BqhcsZKtZPhYakxGkVrBswNTgfk9 +fetchai/skills/generic_buyer,QmP1iGjhcwor2k9dW6bfYY2xufitdUMBWDiSts4bMTL2u8 +fetchai/skills/generic_seller,QmT6sWte67JD5zkhvki1R6ZfynsvCNPwurbiXtrA6oNtDE +fetchai/skills/gym,QmdSqhucusGCGzAwDqfRg6rVu86sGNiBTj1rueRbfTXUNU +fetchai/skills/http_echo,QmXb9b5YTwxHavSjoGzCC4DaSSoZMsbYgFiuy2fqFQno5J +fetchai/skills/ml_data_provider,QmWU6ZqncZTs6wSs43s1ji2F27VyvcGJXsq1N1W7BKPTUS +fetchai/skills/ml_train,QmUkG9umsnwZKqbQVoKZLxbaFWyAUycMLyzsb8fzKFACzF fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux -fetchai/skills/simple_service_registration,QmeckN8mcKLeqmJoQfdYqPsJ49nbxxwBhYPhjkTS99v1De -fetchai/skills/tac_control,QmYCCU6RsvwqmjTRM3Nx8H99HhJXEFuinJSeG3UcjDubYH -fetchai/skills/tac_control_contract,QmNz5pNPvS7LBUMdjVPrRAFgJbaD2xTL1HJQnCoYK3Va4J -fetchai/skills/tac_negotiation,QmRCZWxUh6mkaBsa1CYNk3fmNKzSVxfiqwYGbzU1E3672F -fetchai/skills/tac_participation,QmWBATSrN9J3XoqMJ89iniMnMDZZpLqoenWTigukaDasQG -fetchai/skills/thermometer,QmWSFjntE9MvLpqUTfJrx4FxnG7ZSGQifoTft9mJ9MiPYt -fetchai/skills/thermometer_client,QmQidRBB71VaaDA9LfQodFmBTHmfFi9onG1afjPmADysEx -fetchai/skills/weather_client,QmbsSVhqy6nNe637PKhaiNmUpbztsfxqyuNe6r94QXiKiU -fetchai/skills/weather_station,QmSHssQvAEAKpogK4sFdAzGEhtvdxXi4orJY6PeNoMzouC +fetchai/skills/simple_service_registration,QmbBSb9u5bCYf1aPEzD4oKJRKx8QD48Tf1SbzCmVmquB58 +fetchai/skills/tac_control,QmSJrPKJRwt98AuFJAP91e2JFkD4xqxCCo6jQvgse92ND9 +fetchai/skills/tac_control_contract,QmfFrPNaG3M1YKjFyEYESAAhuBW4yGT6W1Q5XVoX378h4c +fetchai/skills/tac_negotiation,QmQWHy4RutKEQETsQZP3i3Xjz8D2XnSRdiaqexRNA7CSky +fetchai/skills/tac_participation,QmbJqdFPbwFG6c7LUaXxzj9XUnhFd4QxUisJWHdodUyCh8 +fetchai/skills/thermometer,QmUEuRdsTw3iTzLRA4C6SiRGwEK6gauLP1Apk13fCQYtKw +fetchai/skills/thermometer_client,QmdESHLrhNasaUKYpG2m5p6f61dxmqjVKGPiNdEUs5ZHnu +fetchai/skills/weather_client,QmTa3Pxv8tD478xGA6DkNjQn8vxKwGfqLhLMbAC73fK6qo +fetchai/skills/weather_station,QmSLdrYpe8yShYECQuFMWqycmihQVp8ZSfmCvCcCTtGRg7 diff --git a/scripts/acn/run_acn_node_standalone.py b/scripts/acn/run_acn_node_standalone.py index 36b1493f16..a8bb034cdc 100644 --- a/scripts/acn/run_acn_node_standalone.py +++ b/scripts/acn/run_acn_node_standalone.py @@ -24,14 +24,12 @@ from binascii import unhexlify from typing import Dict, List, Optional -# following imports needed only if checks are enabled - from base58 import b58decode - -from ecdsa import SigningKey, curves - +from ecdsa import curves, SigningKey from multihash import decode as multihashdecode # type: ignore +# following imports needed only if checks are enabled + class AcnNodeConfig: """Store the configuration of an acn node as a dictionary.""" diff --git a/scripts/check_package_dependencies.py b/scripts/check_package_dependencies.py index d89486ee92..25ce34d07a 100755 --- a/scripts/check_package_dependencies.py +++ b/scripts/check_package_dependencies.py @@ -34,10 +34,8 @@ import yaml - from aea.configurations.base import PackageId, PackageType, PublicId - DEFAULT_CONFIG_FILE_PATHS = [ Path("aea", "connections", "stub", "connection.yaml"), Path("aea", "protocols", "default", "protocol.yaml"), diff --git a/scripts/check_package_versions_in_docs.py b/scripts/check_package_versions_in_docs.py index 2c4ec9965b..2252870b35 100755 --- a/scripts/check_package_versions_in_docs.py +++ b/scripts/check_package_versions_in_docs.py @@ -33,10 +33,8 @@ import yaml - from aea.configurations.base import ComponentType, PackageId, PackageType, PublicId - PUBLIC_ID_REGEX = PublicId.PUBLIC_ID_REGEX[1:-1] """This regex removes the '^' and '$' respectively, at the beginning and at the end.""" diff --git a/scripts/deploy_to_registry.py b/scripts/deploy_to_registry.py index 34a2275451..b2e5ad866e 100644 --- a/scripts/deploy_to_registry.py +++ b/scripts/deploy_to_registry.py @@ -27,9 +27,8 @@ from pathlib import Path from typing import Set -from click.testing import CliRunner - import yaml +from click.testing import CliRunner from aea.cli import cli from aea.configurations.base import PackageId, PackageType, PublicId diff --git a/scripts/generate_ipfs_hashes.py b/scripts/generate_ipfs_hashes.py index faa20c585f..9dffc61d01 100755 --- a/scripts/generate_ipfs_hashes.py +++ b/scripts/generate_ipfs_hashes.py @@ -38,13 +38,13 @@ import time import traceback from pathlib import Path -from typing import Collection, Dict, List, Optional, Tuple, Type, cast +from typing import cast, Collection, Dict, List, Optional, Tuple, Type import ipfshttpclient - import yaml from aea.configurations.base import ( + _compute_fingerprint, AgentConfig, ConnectionConfig, ContractConfig, @@ -52,7 +52,6 @@ PackageType, ProtocolConfig, SkillConfig, - _compute_fingerprint, ) from aea.helpers.base import yaml_dump, yaml_dump_all diff --git a/scripts/oef/launch.py b/scripts/oef/launch.py index 30e7d58c43..1c71a3be0c 100644 --- a/scripts/oef/launch.py +++ b/scripts/oef/launch.py @@ -19,11 +19,12 @@ # ------------------------------------------------------------------------------ from __future__ import print_function + +import argparse import json +import os import subprocess # nosec -import argparse import sys -import os def run(cmd): diff --git a/scripts/update_package_versions.py b/scripts/update_package_versions.py index 58528e34e2..f4fbbd7478 100644 --- a/scripts/update_package_versions.py +++ b/scripts/update_package_versions.py @@ -37,16 +37,13 @@ from pathlib import Path from typing import Dict, Optional, Set, Tuple -from click.testing import CliRunner - import semver - import yaml +from click.testing import CliRunner from aea.cli import cli from aea.configurations.base import PackageId, PackageType, PublicId from aea.configurations.loader import ConfigLoader - from scripts.generate_ipfs_hashes import update_hashes DIRECTORIES = ["packages", "aea", "docs", "benchmark", "examples", "tests"] diff --git a/setup.cfg b/setup.cfg index 98c82a39bb..a21a839073 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,6 +24,15 @@ application-import-names = aea,packages,tests,scripts # D202: blank lines # B014: redundant exception +[isort] +multi_line_output=3 +include_trailing_comma=True +force_grid_wrap=0 +use_parentheses=True +line_length=88 +order_by_type=False + + [mypy] python_version = 3.7 strict_optional = True diff --git a/tests/common/oef_search_pluto_scripts/launch.py b/tests/common/oef_search_pluto_scripts/launch.py index 1664943d05..78127f7868 100755 --- a/tests/common/oef_search_pluto_scripts/launch.py +++ b/tests/common/oef_search_pluto_scripts/launch.py @@ -20,11 +20,12 @@ """This test module contains the launch script for the oef.""" from __future__ import print_function + +import argparse import json +import os import subprocess # nosec -import argparse import sys -import os def run(cmd): diff --git a/tests/common/utils.py b/tests/common/utils.py index ae84d74635..24e90f7626 100644 --- a/tests/common/utils.py +++ b/tests/common/utils.py @@ -24,14 +24,12 @@ from threading import Thread from typing import Any, Callable, Tuple, Type, Union - from aea.aea import AEA from aea.configurations.base import ProtocolId from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Behaviour, Handler - from tests.conftest import ROOT_DIR DEFAULT_SLEEP = 0.0001 diff --git a/tests/conftest.py b/tests/conftest.py index e432671a01..5d1984815b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,51 +31,43 @@ from pathlib import Path from threading import Timer from types import FunctionType, MethodType -from typing import Callable, List, Optional, Sequence, cast +from typing import Callable, cast, List, Optional, Sequence from unittest.mock import patch import docker as docker -from docker.models.containers import Container - import gym - -from oef.agents import AsyncioCore, OEFAgent - import pytest +from docker.models.containers import Container +from oef.agents import AsyncioCore, OEFAgent from aea import AEA_DIR from aea.aea import AEA from aea.cli.utils.config import _init_cli_config from aea.common import Address -from aea.configurations.base import ( - ComponentType, - ConnectionConfig, - ContractConfig, - DEFAULT_AEA_CONFIG_FILE as AGENT_YAML, - DEFAULT_CONNECTION_CONFIG_FILE as CONNECTION_YAML, - DEFAULT_CONTRACT_CONFIG_FILE as CONTRACT_YAML, - DEFAULT_PROTOCOL_CONFIG_FILE as PROTOCOL_YAML, - DEFAULT_SKILL_CONFIG_FILE as SKILL_YAML, - PublicId, -) +from aea.configurations.base import ComponentType, ConnectionConfig, ContractConfig +from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE as AGENT_YAML +from aea.configurations.base import DEFAULT_CONNECTION_CONFIG_FILE as CONNECTION_YAML +from aea.configurations.base import DEFAULT_CONTRACT_CONFIG_FILE as CONTRACT_YAML +from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE as PROTOCOL_YAML +from aea.configurations.base import DEFAULT_SKILL_CONFIG_FILE as SKILL_YAML +from aea.configurations.base import PublicId from aea.configurations.constants import DEFAULT_CONNECTION, DEFAULT_LEDGER from aea.configurations.loader import load_component_configuration from aea.connections.base import Connection from aea.connections.stub.connection import StubConnection from aea.contracts.base import Contract, contract_registry -from aea.crypto.cosmos import DEFAULT_ADDRESS as COSMOS_DEFAULT_ADDRESS from aea.crypto.cosmos import _COSMOS -from aea.crypto.ethereum import DEFAULT_ADDRESS as ETHEREUM_DEFAULT_ADDRESS +from aea.crypto.cosmos import DEFAULT_ADDRESS as COSMOS_DEFAULT_ADDRESS from aea.crypto.ethereum import _ETHEREUM -from aea.crypto.fetchai import DEFAULT_ADDRESS as FETCHAI_DEFAULT_ADDRESS +from aea.crypto.ethereum import DEFAULT_ADDRESS as ETHEREUM_DEFAULT_ADDRESS from aea.crypto.fetchai import _FETCHAI +from aea.crypto.fetchai import DEFAULT_ADDRESS as FETCHAI_DEFAULT_ADDRESS from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA from aea.crypto.registries import make_crypto from aea.crypto.wallet import CryptoStore from aea.identity.base import Identity from aea.test_tools.click_testing import CliRunner as ImportedCliRunner from aea.test_tools.constants import DEFAULT_AUTHOR - from packages.fetchai.connections.local.connection import LocalNode, OEFLocalConnection from packages.fetchai.connections.oef.connection import OEFConnection from packages.fetchai.connections.p2p_libp2p.connection import ( diff --git a/tests/data/generator/t_protocol/dialogues.py b/tests/data/generator/t_protocol/dialogues.py index 7254d504a9..0efcb291ed 100644 --- a/tests/data/generator/t_protocol/dialogues.py +++ b/tests/data/generator/t_protocol/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - from tests.data.generator.t_protocol.message import TProtocolMessage diff --git a/tests/data/generator/t_protocol/message.py b/tests/data/generator/t_protocol/message.py index b07a48d58d..b28dad220f 100644 --- a/tests/data/generator/t_protocol/message.py +++ b/tests/data/generator/t_protocol/message.py @@ -20,12 +20,11 @@ """This module contains t_protocol's message definition.""" import logging -from typing import Dict, FrozenSet, Optional, Set, Tuple, Union, cast +from typing import cast, Dict, FrozenSet, Optional, Set, Tuple, Union from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message - from tests.data.generator.t_protocol.custom_types import DataModel as CustomDataModel logger = logging.getLogger("aea.packages.fetchai.protocols.t_protocol.message") diff --git a/tests/data/generator/t_protocol/serialization.py b/tests/data/generator/t_protocol/serialization.py index 942f766ba8..262df38cc0 100644 --- a/tests/data/generator/t_protocol/serialization.py +++ b/tests/data/generator/t_protocol/serialization.py @@ -19,11 +19,9 @@ """Serialization module for t_protocol protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer from tests.data.generator.t_protocol import t_protocol_pb2 from tests.data.generator.t_protocol.custom_types import DataModel from tests.data.generator.t_protocol.message import TProtocolMessage diff --git a/tests/data/generator/t_protocol_no_ct/dialogues.py b/tests/data/generator/t_protocol_no_ct/dialogues.py index 231c2d90c7..63657c12a3 100644 --- a/tests/data/generator/t_protocol_no_ct/dialogues.py +++ b/tests/data/generator/t_protocol_no_ct/dialogues.py @@ -25,12 +25,11 @@ """ from abc import ABC -from typing import Callable, FrozenSet, Type, cast +from typing import Callable, cast, FrozenSet, Type from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues - from tests.data.generator.t_protocol_no_ct.message import TProtocolNoCtMessage diff --git a/tests/data/generator/t_protocol_no_ct/message.py b/tests/data/generator/t_protocol_no_ct/message.py index 8733c6d431..83138b6176 100644 --- a/tests/data/generator/t_protocol_no_ct/message.py +++ b/tests/data/generator/t_protocol_no_ct/message.py @@ -20,7 +20,7 @@ """This module contains t_protocol_no_ct's message definition.""" import logging -from typing import Dict, FrozenSet, Optional, Set, Tuple, Union, cast +from typing import cast, Dict, FrozenSet, Optional, Set, Tuple, Union from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/tests/data/generator/t_protocol_no_ct/serialization.py b/tests/data/generator/t_protocol_no_ct/serialization.py index bf7b3face3..ff9113c313 100644 --- a/tests/data/generator/t_protocol_no_ct/serialization.py +++ b/tests/data/generator/t_protocol_no_ct/serialization.py @@ -19,11 +19,9 @@ """Serialization module for t_protocol_no_ct protocol.""" -from typing import Any, Dict, cast - -from aea.protocols.base import Message -from aea.protocols.base import Serializer +from typing import Any, cast, Dict +from aea.protocols.base import Message, Serializer from tests.data.generator.t_protocol_no_ct import t_protocol_no_ct_pb2 from tests.data.generator.t_protocol_no_ct.message import TProtocolNoCtMessage diff --git a/tests/test_aea.py b/tests/test_aea.py index 7e5b575bf2..bcc1a5f1b9 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -44,10 +44,8 @@ from aea.protocols.default.serialization import DefaultSerializer from aea.registries.resources import Resources from aea.skills.base import Skill, SkillContext - from packages.fetchai.connections.local.connection import LocalNode from packages.fetchai.protocols.fipa.message import FipaMessage - from tests.common.utils import ( AeaTool, make_behaviour_cls_from_funcion, @@ -58,12 +56,12 @@ ) from .conftest import ( + _make_local_connection, CUR_PATH, DUMMY_SKILL_PUBLIC_ID, FETCHAI_PRIVATE_KEY_PATH, ROOT_DIR, UNKNOWN_PROTOCOL_PUBLIC_ID, - _make_local_connection, ) from .data.dummy_aea.skills.dummy.tasks import DummyTask # type: ignore from .data.dummy_skill.behaviours import DummyBehaviour # type: ignore diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index e9d464538d..4b7aa6571e 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -27,11 +27,10 @@ from unittest.mock import Mock, patch import pytest - import yaml from aea.aea import AEA -from aea.aea_builder import AEABuilder, _DependenciesManager +from aea.aea_builder import _DependenciesManager, AEABuilder from aea.components.base import Component from aea.configurations.base import ( ComponentId, @@ -53,12 +52,11 @@ from aea.registries.resources import Resources from aea.skills.base import Skill from aea.test_tools.test_cases import AEATestCase, AEATestCaseEmpty - from tests.conftest import ( + _make_dummy_connection, CUR_PATH, DEFAULT_PRIVATE_KEY_PATH, ROOT_DIR, - _make_dummy_connection, ) dummy_skill_path = os.path.join(CUR_PATH, "data", "dummy_skill") diff --git a/tests/test_agent.py b/tests/test_agent.py index 35f4ff37a6..30e8093bf7 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -25,9 +25,7 @@ from aea.agent import Agent, Identity from aea.runtime import RuntimeStates - from packages.fetchai.connections.local.connection import LocalNode - from tests.common.utils import wait_for_condition from .conftest import _make_local_connection diff --git a/tests/test_agent_loop.py b/tests/test_agent_loop.py index 77f81453b2..465d12f567 100644 --- a/tests/test_agent_loop.py +++ b/tests/test_agent_loop.py @@ -35,7 +35,6 @@ from aea.registries.resources import Resources from aea.skills.base import Behaviour, Handler, SkillContext from aea.skills.behaviours import TickerBehaviour - from tests.common.utils import run_in_thread, wait_for_condition diff --git a/tests/test_cli/test_add/test_connection.py b/tests/test_cli/test_add/test_connection.py index 39d13712e3..834a9b4425 100644 --- a/tests/test_cli/test_add/test_connection.py +++ b/tests/test_cli/test_add/test_connection.py @@ -25,24 +25,21 @@ import unittest.mock from pathlib import Path -from jsonschema import ValidationError - import pytest - import yaml +from jsonschema import ValidationError import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_CONNECTION_CONFIG_FILE, PublicId from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CUR_PATH, CliRunner, - MAX_FLAKY_RERUNS, + CUR_PATH, double_escape_windows_path_separator, + MAX_FLAKY_RERUNS, ) diff --git a/tests/test_cli/test_add/test_contract.py b/tests/test_cli/test_add/test_contract.py index 030278f521..1d77fee879 100644 --- a/tests/test_cli/test_add/test_contract.py +++ b/tests/test_cli/test_add/test_contract.py @@ -19,13 +19,12 @@ """This test module contains the tests for the `aea add contract` sub-command.""" import os -from unittest import TestCase, mock +from unittest import mock, TestCase import pytest from aea.cli import cli from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import CLI_LOG_OPTION, CliRunner, MAX_FLAKY_RERUNS diff --git a/tests/test_cli/test_add/test_generic.py b/tests/test_cli/test_add/test_generic.py index cc8f33e348..a4661c400e 100644 --- a/tests/test_cli/test_add/test_generic.py +++ b/tests/test_cli/test_add/test_generic.py @@ -18,10 +18,9 @@ # ------------------------------------------------------------------------------ """This test module contains tests for aea.cli.add generic methods.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli.add import _add_item_deps - from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_add/test_protocol.py b/tests/test_cli/test_add/test_protocol.py index c9820afb3a..234c107b20 100644 --- a/tests/test_cli/test_add/test_protocol.py +++ b/tests/test_cli/test_add/test_protocol.py @@ -25,24 +25,21 @@ import unittest.mock from pathlib import Path -from jsonschema import ValidationError - import pytest - import yaml +from jsonschema import ValidationError import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE, PublicId from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CUR_PATH, CliRunner, - MAX_FLAKY_RERUNS, + CUR_PATH, double_escape_windows_path_separator, + MAX_FLAKY_RERUNS, ) diff --git a/tests/test_cli/test_add/test_skill.py b/tests/test_cli/test_add/test_skill.py index 6f200b2c77..46df071ba8 100644 --- a/tests/test_cli/test_add/test_skill.py +++ b/tests/test_cli/test_add/test_skill.py @@ -25,11 +25,9 @@ from pathlib import Path from unittest import mock -from jsonschema import ValidationError - import pytest - import yaml +from jsonschema import ValidationError import aea from aea.cli import cli @@ -40,15 +38,14 @@ PublicId, ) from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CUR_PATH, CliRunner, + CUR_PATH, + double_escape_windows_path_separator, MAX_FLAKY_RERUNS, ROOT_DIR, - double_escape_windows_path_separator, ) diff --git a/tests/test_cli/test_add_key.py b/tests/test_cli/test_add_key.py index f8c84aa07c..8da1917d2f 100644 --- a/tests/test_cli/test_add_key.py +++ b/tests/test_cli/test_add_key.py @@ -22,7 +22,7 @@ import shutil import tempfile from pathlib import Path -from unittest import TestCase, mock +from unittest import mock, TestCase import yaml @@ -30,12 +30,11 @@ from aea.cli import cli from aea.cli.add_key import _try_add_key from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE - from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CUR_PATH, CliRunner, + CUR_PATH, ETHEREUM, ETHEREUM_PRIVATE_KEY_FILE, FETCHAI, diff --git a/tests/test_cli/test_config.py b/tests/test_cli/test_config.py index aae0e685c2..cf3ea585a1 100644 --- a/tests/test_cli/test_config.py +++ b/tests/test_cli/test_config.py @@ -26,8 +26,7 @@ from aea.cli import cli from aea.cli.utils.constants import ALLOWED_PATH_ROOTS - -from tests.conftest import CLI_LOG_OPTION, CUR_PATH, CliRunner +from tests.conftest import CLI_LOG_OPTION, CliRunner, CUR_PATH class TestConfigGet: diff --git a/tests/test_cli/test_core.py b/tests/test_cli/test_core.py index 865043f859..a4b31b1d77 100644 --- a/tests/test_cli/test_core.py +++ b/tests/test_cli/test_core.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI core methods.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException diff --git a/tests/test_cli/test_create.py b/tests/test_cli/test_create.py index 1aa10bdcac..2a3c50aaee 100644 --- a/tests/test_cli/test_create.py +++ b/tests/test_cli/test_create.py @@ -30,11 +30,9 @@ from unittest.mock import patch import jsonschema -from jsonschema import Draft4Validator - import pytest - import yaml +from jsonschema import Draft4Validator import aea from aea.cli import cli @@ -45,13 +43,12 @@ DEFAULT_SKILL, ) from aea.configurations.loader import ConfigLoader, make_jsonschema_base_uri - from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, AUTHOR, CLI_LOG_OPTION, - CONFIGURATION_SCHEMA_DIR, CliRunner, + CONFIGURATION_SCHEMA_DIR, ROOT_DIR, ) diff --git a/tests/test_cli/test_delete.py b/tests/test_cli/test_delete.py index ce66ea73ef..8a694629d5 100644 --- a/tests/test_cli/test_delete.py +++ b/tests/test_cli/test_delete.py @@ -26,7 +26,6 @@ from pathlib import Path from aea.cli import cli - from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_fetch.py b/tests/test_cli/test_fetch.py index 2f6781d5ce..bec3f6fee7 100644 --- a/tests/test_cli/test_fetch.py +++ b/tests/test_cli/test_fetch.py @@ -19,16 +19,14 @@ """This test module contains the tests for CLI Registry fetch methods.""" import os -from unittest import TestCase, mock - -from click import ClickException +from unittest import mock, TestCase import pytest +from click import ClickException from aea.cli import cli from aea.cli.fetch import _is_version_correct, fetch_agent_locally from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import CLI_LOG_OPTION, CliRunner, MAX_FLAKY_RERUNS from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_fingerprint.py b/tests/test_cli/test_fingerprint.py index f89f9ba3a3..c98037d999 100644 --- a/tests/test_cli/test_fingerprint.py +++ b/tests/test_cli/test_fingerprint.py @@ -18,13 +18,12 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI fingerprint command.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException from aea.cli import cli from aea.cli.fingerprint import _fingerprint_item - from tests.conftest import CLI_LOG_OPTION, CliRunner from tests.test_cli.tools_for_testing import ConfigLoaderMock, ContextMock, PublicIdMock diff --git a/tests/test_cli/test_freeze.py b/tests/test_cli/test_freeze.py index bb8fa04b72..788fed1a32 100644 --- a/tests/test_cli/test_freeze.py +++ b/tests/test_cli/test_freeze.py @@ -26,19 +26,17 @@ from pathlib import Path import jsonschema -from jsonschema import Draft4Validator - import pytest +from jsonschema import Draft4Validator from aea.cli import cli from aea.configurations.loader import make_jsonschema_base_uri - from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, CLI_LOG_OPTION, + CliRunner, CONFIGURATION_SCHEMA_DIR, CUR_PATH, - CliRunner, MAX_FLAKY_RERUNS, ) diff --git a/tests/test_cli/test_generate/test_generate.py b/tests/test_cli/test_generate/test_generate.py index 680c6c0e76..c07dd3955c 100644 --- a/tests/test_cli/test_generate/test_generate.py +++ b/tests/test_cli/test_generate/test_generate.py @@ -19,13 +19,12 @@ """This test module contains the tests for the aea.cli.generate sub-module.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException from aea.cli.generate import _generate_item from aea.configurations.base import ProtocolSpecificationParseError - from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_generate/test_protocols.py b/tests/test_cli/test_generate/test_protocols.py index a67f71b3b1..88ac84cc3b 100644 --- a/tests/test_cli/test_generate/test_protocols.py +++ b/tests/test_cli/test_generate/test_protocols.py @@ -27,20 +27,18 @@ from pathlib import Path import jsonschema -from jsonschema import Draft4Validator, ValidationError - import yaml +from jsonschema import Draft4Validator, ValidationError from aea.cli import cli from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE from aea.configurations.loader import make_jsonschema_base_uri - from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, + CliRunner, CONFIGURATION_SCHEMA_DIR, CUR_PATH, - CliRunner, PROTOCOL_CONFIGURATION_SCHEMA, ) diff --git a/tests/test_cli/test_generate_key.py b/tests/test_cli/test_generate_key.py index f30dd52e19..cd6e6961b6 100644 --- a/tests/test_cli/test_generate_key.py +++ b/tests/test_cli/test_generate_key.py @@ -26,7 +26,6 @@ from aea.cli import cli from aea.crypto.registries import make_crypto - from tests.conftest import ( CLI_LOG_OPTION, CliRunner, diff --git a/tests/test_cli/test_generate_wealth.py b/tests/test_cli/test_generate_wealth.py index f061b96d13..5b8a8935d4 100644 --- a/tests/test_cli/test_generate_wealth.py +++ b/tests/test_cli/test_generate_wealth.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for commands in aea.cli.generate_wealth module.""" -from unittest import TestCase, mock +from unittest import mock, TestCase import pytest @@ -26,7 +26,6 @@ from aea.cli.generate_wealth import _try_generate_wealth from aea.test_tools.exceptions import AEATestingException from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( CLI_LOG_OPTION, CliRunner, diff --git a/tests/test_cli/test_get_address.py b/tests/test_cli/test_get_address.py index 82c81b59e3..bb498a93af 100644 --- a/tests/test_cli/test_get_address.py +++ b/tests/test_cli/test_get_address.py @@ -18,11 +18,10 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for commands in aea.cli.get_address module.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli import cli from aea.cli.get_address import _try_get_address - from tests.conftest import CLI_LOG_OPTION, CliRunner, FETCHAI from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_get_multiaddress.py b/tests/test_cli/test_get_multiaddress.py index ba8c00e33c..a46f6f58a2 100644 --- a/tests/test_cli/test_get_multiaddress.py +++ b/tests/test_cli/test_get_multiaddress.py @@ -20,11 +20,9 @@ from unittest import mock import base58 - import pytest from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import FETCHAI diff --git a/tests/test_cli/test_get_wealth.py b/tests/test_cli/test_get_wealth.py index 1d7f45d3a6..c1f5a3b68a 100644 --- a/tests/test_cli/test_get_wealth.py +++ b/tests/test_cli/test_get_wealth.py @@ -18,11 +18,10 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for commands in aea.cli.generate_wealth module.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli import cli from aea.cli.get_wealth import _try_get_wealth - from tests.conftest import CLI_LOG_OPTION, CliRunner, FETCHAI from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_gui.py b/tests/test_cli/test_gui.py index 9d087d385f..78b813d4dc 100644 --- a/tests/test_cli/test_gui.py +++ b/tests/test_cli/test_gui.py @@ -25,14 +25,12 @@ from pathlib import Path import jsonschema -from jsonschema import Draft4Validator - import pytest +from jsonschema import Draft4Validator from aea.cli import cli from aea.configurations.loader import make_jsonschema_base_uri from aea.test_tools.click_testing import CliRunner - from tests.common.pexpect_popen import PexpectWrapper from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, diff --git a/tests/test_cli/test_init.py b/tests/test_cli/test_init.py index 52611313cf..424375b27b 100644 --- a/tests/test_cli/test_init.py +++ b/tests/test_cli/test_init.py @@ -29,7 +29,6 @@ import yaml from aea.cli import cli - from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_install.py b/tests/test_cli/test_install.py index 060efd06fd..ef5d46524e 100644 --- a/tests/test_cli/test_install.py +++ b/tests/test_cli/test_install.py @@ -23,7 +23,7 @@ import shutil import tempfile from pathlib import Path -from unittest import TestCase, mock +from unittest import mock, TestCase import yaml @@ -31,8 +31,7 @@ from aea.cli.install import _install_dependency from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE from aea.exceptions import AEAException - -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, CUR_PATH class TestInstall: diff --git a/tests/test_cli/test_interact.py b/tests/test_cli/test_interact.py index 9d8adb5697..80c464bb4f 100644 --- a/tests/test_cli/test_interact.py +++ b/tests/test_cli/test_interact.py @@ -17,7 +17,7 @@ # # ------------------------------------------------------------------------------ """This test module contains tests for iteract command.""" -from unittest import TestCase, mock +from unittest import mock, TestCase import pytest @@ -29,7 +29,6 @@ from aea.helpers.base import send_control_c from aea.mail.base import Envelope from aea.test_tools.test_cases import AEATestCaseEmpty, AEATestCaseMany - from tests.conftest import MAX_FLAKY_RERUNS diff --git a/tests/test_cli/test_launch.py b/tests/test_cli/test_launch.py index 96ae414009..d0510171b1 100644 --- a/tests/test_cli/test_launch.py +++ b/tests/test_cli/test_launch.py @@ -28,17 +28,14 @@ from pathlib import Path from typing import Generator, List, Optional -from pexpect.exceptions import EOF # type: ignore - import pytest - import yaml +from pexpect.exceptions import EOF # type: ignore from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE - from tests.common.pexpect_popen import PexpectWrapper -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner, MAX_FLAKY_RERUNS +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, CUR_PATH, MAX_FLAKY_RERUNS logger = logging.getLogger(__name__) diff --git a/tests/test_cli/test_list.py b/tests/test_cli/test_list.py index 8b9030e964..aa370e7d4c 100644 --- a/tests/test_cli/test_list.py +++ b/tests/test_cli/test_list.py @@ -24,19 +24,18 @@ import shutil import tempfile from pathlib import Path -from unittest import TestCase, mock +from unittest import mock, TestCase import jsonschema from jsonschema import Draft4Validator from aea.cli import cli - from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, CLI_LOG_OPTION, + CliRunner, CONFIGURATION_SCHEMA_DIR, CUR_PATH, - CliRunner, ) from tests.test_cli.constants import FORMAT_ITEMS_SAMPLE_OUTPUT diff --git a/tests/test_cli/test_loggers.py b/tests/test_cli/test_loggers.py index 61ccf4f70e..be18fd9b8b 100644 --- a/tests/test_cli/test_loggers.py +++ b/tests/test_cli/test_loggers.py @@ -19,7 +19,7 @@ """This test module contains the tests for commands in aea.cli.utils.loggers module.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli.utils.loggers import ColorFormatter diff --git a/tests/test_cli/test_login.py b/tests/test_cli/test_login.py index bb75736b03..051939f2a7 100644 --- a/tests/test_cli/test_login.py +++ b/tests/test_cli/test_login.py @@ -18,10 +18,9 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI login command.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli import cli - from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_logout.py b/tests/test_cli/test_logout.py index 491141119e..04a9a34ad7 100644 --- a/tests/test_cli/test_logout.py +++ b/tests/test_cli/test_logout.py @@ -18,10 +18,9 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI logout command.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli import cli - from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_publish.py b/tests/test_cli/test_publish.py index ab5b97d799..03f492727c 100644 --- a/tests/test_cli/test_publish.py +++ b/tests/test_cli/test_publish.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """Test module for Registry publish methods.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException @@ -28,7 +28,6 @@ _save_agent_locally, _validate_pkp, ) - from tests.conftest import CLI_LOG_OPTION, CliRunner from tests.test_cli.tools_for_testing import ( ContextMock, diff --git a/tests/test_cli/test_push.py b/tests/test_cli/test_push.py index 5856162ea5..3054802a8b 100644 --- a/tests/test_cli/test_push.py +++ b/tests/test_cli/test_push.py @@ -18,13 +18,12 @@ # ------------------------------------------------------------------------------ """Test module for Registry push methods.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException from aea.cli import cli from aea.cli.push import _check_package_public_id, _save_item_locally - from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_register.py b/tests/test_cli/test_register.py index 72f7d771b0..87056c9c4a 100644 --- a/tests/test_cli/test_register.py +++ b/tests/test_cli/test_register.py @@ -18,12 +18,11 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI register command.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli import cli from aea.cli.register import do_register from aea.cli.registry.settings import AUTH_TOKEN_KEY - from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_registry/test_add.py b/tests/test_cli/test_registry/test_add.py index 9a81089cfc..9fd225c6df 100644 --- a/tests/test_cli/test_registry/test_add.py +++ b/tests/test_cli/test_registry/test_add.py @@ -19,7 +19,7 @@ """This test module contains tests for CLI Registry add methods.""" import os -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli.registry.add import fetch_package from aea.configurations.base import PublicId diff --git a/tests/test_cli/test_registry/test_fetch.py b/tests/test_cli/test_registry/test_fetch.py index 1a800c4197..50ede87504 100644 --- a/tests/test_cli/test_registry/test_fetch.py +++ b/tests/test_cli/test_registry/test_fetch.py @@ -21,12 +21,11 @@ import os import shutil import tempfile -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException from aea.cli.registry.fetch import fetch_agent - from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_registry/test_login.py b/tests/test_cli/test_registry/test_login.py index 4b5c45f695..5381893c3e 100644 --- a/tests/test_cli/test_registry/test_login.py +++ b/tests/test_cli/test_registry/test_login.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains tests for CLI Registry login methods.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli.registry.login import registry_login diff --git a/tests/test_cli/test_registry/test_logout.py b/tests/test_cli/test_registry/test_logout.py index 3627eb6fda..ca8485f5ce 100644 --- a/tests/test_cli/test_registry/test_logout.py +++ b/tests/test_cli/test_registry/test_logout.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains tests for CLI Registry logout methods.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli.registry.logout import registry_logout diff --git a/tests/test_cli/test_registry/test_publish.py b/tests/test_cli/test_registry/test_publish.py index 22f2c38100..2d7e9c8e52 100644 --- a/tests/test_cli/test_registry/test_publish.py +++ b/tests/test_cli/test_registry/test_publish.py @@ -18,10 +18,9 @@ # ------------------------------------------------------------------------------ """Test module for Registry publish methods.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli.registry.publish import _compress, publish_agent - from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_registry/test_push.py b/tests/test_cli/test_registry/test_push.py index f60c89b5a8..f7291e4525 100644 --- a/tests/test_cli/test_registry/test_push.py +++ b/tests/test_cli/test_registry/test_push.py @@ -19,12 +19,11 @@ """Test module for Registry push methods.""" import os -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException from aea.cli.registry.push import _compress_dir, _remove_pycache, push_item - from tests.conftest import AUTHOR from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_registry/test_registration.py b/tests/test_cli/test_registry/test_registration.py index 39945b0536..ad6bbb3867 100644 --- a/tests/test_cli/test_registry/test_registration.py +++ b/tests/test_cli/test_registry/test_registration.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """Test module for Registry registration methods.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException diff --git a/tests/test_cli/test_registry/test_utils.py b/tests/test_cli/test_registry/test_utils.py index f8890e468d..a75e648ce1 100644 --- a/tests/test_cli/test_registry/test_utils.py +++ b/tests/test_cli/test_registry/test_utils.py @@ -20,10 +20,9 @@ import os from json.decoder import JSONDecodeError -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException - from requests.exceptions import ConnectionError from aea.cli.registry.settings import AUTH_TOKEN_KEY, REGISTRY_API_URL diff --git a/tests/test_cli/test_remove/test_connection.py b/tests/test_cli/test_remove/test_connection.py index 3e4b5f69b0..24320b5a4c 100644 --- a/tests/test_cli/test_remove/test_connection.py +++ b/tests/test_cli/test_remove/test_connection.py @@ -31,8 +31,7 @@ import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE - -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, CUR_PATH class TestRemoveConnectionWithPublicId: diff --git a/tests/test_cli/test_remove/test_contract.py b/tests/test_cli/test_remove/test_contract.py index 044d563ba8..56a7d9bbbd 100644 --- a/tests/test_cli/test_remove/test_contract.py +++ b/tests/test_cli/test_remove/test_contract.py @@ -18,10 +18,9 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for the `aea remove contract` sub-command.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli import cli - from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_remove/test_protocol.py b/tests/test_cli/test_remove/test_protocol.py index f4b82b2ea9..c166d9094f 100644 --- a/tests/test_cli/test_remove/test_protocol.py +++ b/tests/test_cli/test_remove/test_protocol.py @@ -31,8 +31,7 @@ import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE - -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, CUR_PATH class TestRemoveProtocolWithPublicId: diff --git a/tests/test_cli/test_remove/test_remove_item.py b/tests/test_cli/test_remove/test_remove_item.py index d7769bbcd8..dc2ee28191 100644 --- a/tests/test_cli/test_remove/test_remove_item.py +++ b/tests/test_cli/test_remove/test_remove_item.py @@ -18,12 +18,11 @@ # ------------------------------------------------------------------------------ """Test module for aea.cli.remove.remove_item method.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException from aea.cli.remove import remove_item - from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_remove/test_skill.py b/tests/test_cli/test_remove/test_skill.py index 372836292d..97ce06d2f5 100644 --- a/tests/test_cli/test_remove/test_skill.py +++ b/tests/test_cli/test_remove/test_skill.py @@ -31,7 +31,6 @@ import aea.configurations.base from aea.cli import cli from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE - from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, ROOT_DIR diff --git a/tests/test_cli/test_run.py b/tests/test_cli/test_run.py index b050ec782a..da6622fa89 100644 --- a/tests/test_cli/test_run.py +++ b/tests/test_cli/test_run.py @@ -25,15 +25,12 @@ import tempfile import time from pathlib import Path -from unittest import TestCase, mock - -from click import ClickException - -from pexpect.exceptions import EOF # type: ignore +from unittest import mock, TestCase import pytest - import yaml +from click import ClickException +from pexpect.exceptions import EOF # type: ignore from aea.cli import cli from aea.cli.run import _build_aea, run_aea @@ -44,7 +41,6 @@ ) from aea.configurations.constants import DEFAULT_CONNECTION from aea.exceptions import AEAPackageLoadingError - from tests.common.pexpect_popen import PexpectWrapper from tests.conftest import ( AUTHOR, diff --git a/tests/test_cli/test_scaffold/test_connection.py b/tests/test_cli/test_scaffold/test_connection.py index 7b27f33618..c4fc46e24e 100644 --- a/tests/test_cli/test_scaffold/test_connection.py +++ b/tests/test_cli/test_scaffold/test_connection.py @@ -28,21 +28,19 @@ from pathlib import Path import jsonschema -from jsonschema import Draft4Validator, ValidationError - import yaml +from jsonschema import Draft4Validator, ValidationError from aea import AEA_DIR from aea.cli import cli from aea.configurations.base import DEFAULT_CONNECTION_CONFIG_FILE from aea.configurations.loader import make_jsonschema_base_uri - from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, + CliRunner, CONFIGURATION_SCHEMA_DIR, CONNECTION_CONFIGURATION_SCHEMA, - CliRunner, ) diff --git a/tests/test_cli/test_scaffold/test_generic.py b/tests/test_cli/test_scaffold/test_generic.py index 89d8ab38cd..9710925e44 100644 --- a/tests/test_cli/test_scaffold/test_generic.py +++ b/tests/test_cli/test_scaffold/test_generic.py @@ -18,13 +18,12 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI scaffold generic methods and commands.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from click import ClickException from aea.cli import cli from aea.cli.scaffold import _scaffold_dm_handler - from tests.conftest import CLI_LOG_OPTION, CliRunner from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_scaffold/test_protocols.py b/tests/test_cli/test_scaffold/test_protocols.py index fdf8e23c6c..62b8a38fa8 100644 --- a/tests/test_cli/test_scaffold/test_protocols.py +++ b/tests/test_cli/test_scaffold/test_protocols.py @@ -28,20 +28,18 @@ from pathlib import Path import jsonschema -from jsonschema import Draft4Validator, ValidationError - import yaml +from jsonschema import Draft4Validator, ValidationError from aea import AEA_DIR from aea.cli import cli from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE from aea.configurations.loader import make_jsonschema_base_uri - from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CONFIGURATION_SCHEMA_DIR, CliRunner, + CONFIGURATION_SCHEMA_DIR, PROTOCOL_CONFIGURATION_SCHEMA, ) diff --git a/tests/test_cli/test_scaffold/test_skills.py b/tests/test_cli/test_scaffold/test_skills.py index 40954447ed..523f747fab 100644 --- a/tests/test_cli/test_scaffold/test_skills.py +++ b/tests/test_cli/test_scaffold/test_skills.py @@ -28,20 +28,18 @@ from pathlib import Path import jsonschema -from jsonschema import Draft4Validator, ValidationError - import yaml +from jsonschema import Draft4Validator, ValidationError from aea import AEA_DIR from aea.cli import cli from aea.configurations.base import DEFAULT_SKILL_CONFIG_FILE from aea.configurations.loader import make_jsonschema_base_uri - from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CONFIGURATION_SCHEMA_DIR, CliRunner, + CONFIGURATION_SCHEMA_DIR, SKILL_CONFIGURATION_SCHEMA, ) diff --git a/tests/test_cli/test_search.py b/tests/test_cli/test_search.py index ebcad61cad..6f4938c09d 100644 --- a/tests/test_cli/test_search.py +++ b/tests/test_cli/test_search.py @@ -24,7 +24,7 @@ import shutil import tempfile from pathlib import Path -from unittest import TestCase, mock +from unittest import mock, TestCase import jsonschema from jsonschema import Draft4Validator @@ -32,13 +32,12 @@ from aea import AEA_DIR from aea.cli import cli from aea.configurations.base import PublicId - from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, AUTHOR, CLI_LOG_OPTION, - CONFIGURATION_SCHEMA_DIR, CliRunner, + CONFIGURATION_SCHEMA_DIR, ROOT_DIR, ) from tests.test_cli.constants import FORMAT_ITEMS_SAMPLE_OUTPUT diff --git a/tests/test_cli/test_utils/test_config.py b/tests/test_cli/test_utils/test_config.py index 971eda8410..db09f03927 100644 --- a/tests/test_cli/test_utils/test_config.py +++ b/tests/test_cli/test_utils/test_config.py @@ -20,11 +20,10 @@ """This test module contains the tests for aea.cli.utils.config module.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli.utils.config import validate_item_config from aea.cli.utils.exceptions import AEAConfigException - from tests.test_cli.tools_for_testing import AgentConfigMock, ConfigLoaderMock diff --git a/tests/test_cli/test_utils/test_utils.py b/tests/test_cli/test_utils/test_utils.py index a70b06a98d..41b2fa5a66 100644 --- a/tests/test_cli/test_utils/test_utils.py +++ b/tests/test_cli/test_utils/test_utils.py @@ -21,14 +21,11 @@ from builtins import FileNotFoundError from typing import cast -from unittest import TestCase, mock +from unittest import mock, TestCase +import pytest from click import BadParameter, ClickException - from jsonschema import ValidationError - -import pytest - from yaml import YAMLError from aea.cli.utils.click_utils import AEAJsonPathType, PublicIdParameter @@ -53,14 +50,13 @@ validate_author_name, validate_package_name, ) - from tests.conftest import FETCHAI from tests.test_cli.tools_for_testing import ( ConfigLoaderMock, ContextMock, PublicIdMock, - StopTest, raise_stoptest, + StopTest, ) AUTHOR = "author" diff --git a/tests/test_cli_gui/test_create.py b/tests/test_cli_gui/test_create.py index 5be16113f2..f6f42e6cf7 100644 --- a/tests/test_cli_gui/test_create.py +++ b/tests/test_cli_gui/test_create.py @@ -27,10 +27,9 @@ from aea.cli.create import create_aea from aea.cli.utils.context import Context from aea.test_tools.constants import DEFAULT_AUTHOR - from tests.conftest import CUR_PATH from tests.test_cli.tools_for_testing import raise_click_exception -from tests.test_cli_gui.test_base import TempCWD, create_app +from tests.test_cli_gui.test_base import create_app, TempCWD @patch("aea.cli_gui.cli_create_aea") diff --git a/tests/test_cli_gui/test_get_items.py b/tests/test_cli_gui/test_get_items.py index 3522a5cae0..12466d145c 100644 --- a/tests/test_cli_gui/test_get_items.py +++ b/tests/test_cli_gui/test_get_items.py @@ -19,7 +19,7 @@ """Test module for get registered items with CLI GUI.""" import json -from unittest import TestCase, mock +from unittest import mock, TestCase from tests.test_cli.tools_for_testing import raise_click_exception from tests.test_cli_gui.test_base import create_app diff --git a/tests/test_cli_gui/test_misc.py b/tests/test_cli_gui/test_misc.py index 44b2680380..e7c05c23d4 100644 --- a/tests/test_cli_gui/test_misc.py +++ b/tests/test_cli_gui/test_misc.py @@ -23,7 +23,6 @@ from flask import Flask import aea.cli_gui - from tests.common.mocks import ctx_mock_Popen from .test_base import create_app diff --git a/tests/test_cli_gui/test_run_agent.py b/tests/test_cli_gui/test_run_agent.py index cdf4611e31..a684589b5b 100644 --- a/tests/test_cli_gui/test_run_agent.py +++ b/tests/test_cli_gui/test_run_agent.py @@ -32,9 +32,8 @@ from aea.cli.utils.context import Context from aea.configurations.constants import DEFAULT_CONNECTION from aea.test_tools.constants import DEFAULT_AUTHOR - from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS -from tests.test_cli_gui.test_base import TempCWD, create_app +from tests.test_cli_gui.test_base import create_app, TempCWD @pytest.mark.flaky(reruns=MAX_FLAKY_RERUNS) diff --git a/tests/test_cli_gui/test_utils.py b/tests/test_cli_gui/test_utils.py index fa0bad2aa5..ee663abf67 100644 --- a/tests/test_cli_gui/test_utils.py +++ b/tests/test_cli_gui/test_utils.py @@ -19,13 +19,13 @@ """Test module for utils of CLI GUI.""" from subprocess import TimeoutExpired # nosec -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.cli_gui.utils import ( - ProcessState, _call_subprocess, _terminate_process, get_process_status, + ProcessState, read_error, read_tty, ) diff --git a/tests/test_components/test_base.py b/tests/test_components/test_base.py index 8fbbaf486c..bb520fff59 100644 --- a/tests/test_components/test_base.py +++ b/tests/test_components/test_base.py @@ -24,7 +24,6 @@ from aea.components.base import Component, load_aea_package from aea.configurations.base import ConnectionConfig, ProtocolConfig - from tests.conftest import ROOT_DIR diff --git a/tests/test_configurations/test_aea_config.py b/tests/test_configurations/test_aea_config.py index 039b6a3eb6..edec905c05 100644 --- a/tests/test_configurations/test_aea_config.py +++ b/tests/test_configurations/test_aea_config.py @@ -24,11 +24,9 @@ from typing import Any, List, Sequence from unittest import TestCase -from jsonschema.exceptions import ValidationError # type: ignore - import pytest - import yaml +from jsonschema.exceptions import ValidationError # type: ignore from aea.aea import AEA from aea.aea_builder import AEABuilder @@ -41,7 +39,6 @@ ) from aea.configurations.loader import ConfigLoader, ConfigLoaders from aea.helpers.exception_policy import ExceptionPolicyEnum - from tests.conftest import CUR_PATH, ROOT_DIR diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index 13d523b9ea..f8f617806d 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -20,21 +20,22 @@ """This module contains the tests for the aea.configurations.base module.""" import re from pathlib import Path -from unittest import TestCase, mock +from unittest import mock, TestCase import pytest - import semver - import yaml from aea.configurations.base import ( + _check_aea_version, + _compare_fingerprints, + _get_default_configuration_file_name_from_type, AgentConfig, - CRUDCollection, ComponentId, ComponentType, ConnectionConfig, ContractConfig, + CRUDCollection, DEFAULT_SKILL_CONFIG_FILE, PackageId, PackageType, @@ -44,20 +45,16 @@ PublicId, SkillConfig, SpeechActContentConfig, - _check_aea_version, - _compare_fingerprints, - _get_default_configuration_file_name_from_type, ) from aea.configurations.constants import DEFAULT_LEDGER from aea.configurations.loader import ConfigLoaders, load_component_configuration - from tests.conftest import ( - AUTHOR, - ROOT_DIR, agent_config_files, + AUTHOR, connection_config_files, contract_config_files, protocol_config_files, + ROOT_DIR, skill_config_files, ) diff --git a/tests/test_configurations/test_loader.py b/tests/test_configurations/test_loader.py index b973f932b8..6862dd3d4a 100644 --- a/tests/test_configurations/test_loader.py +++ b/tests/test_configurations/test_loader.py @@ -24,14 +24,12 @@ from unittest.mock import MagicMock import pytest - import yaml import aea from aea.configurations.base import PackageType, ProtocolSpecification from aea.configurations.loader import ConfigLoader, make_jsonschema_base_uri from aea.protocols.generator.common import load_protocol_specification - from tests.conftest import protocol_specification_files diff --git a/tests/test_configurations/test_schema.py b/tests/test_configurations/test_schema.py index fff431060c..c4b33d9685 100644 --- a/tests/test_configurations/test_schema.py +++ b/tests/test_configurations/test_schema.py @@ -25,29 +25,26 @@ from pathlib import Path import jsonschema -from jsonschema import Draft4Validator # type: ignore - import pytest - import yaml +from jsonschema import Draft4Validator # type: ignore from aea.configurations.loader import make_jsonschema_base_uri - from tests.conftest import ( + agent_config_files, AGENT_CONFIGURATION_SCHEMA, CONFIGURATION_SCHEMA_DIR, + connection_config_files, CONNECTION_CONFIGURATION_SCHEMA, + contract_config_files, CONTRACT_CONFIGURATION_SCHEMA, + protocol_config_files, PROTOCOL_CONFIGURATION_SCHEMA, PROTOCOL_SPEC_CONFIGURATION_SCHEMA, - ROOT_DIR, - SKILL_CONFIGURATION_SCHEMA, - agent_config_files, - connection_config_files, - contract_config_files, - protocol_config_files, protocol_specification_files, + ROOT_DIR, skill_config_files, + SKILL_CONFIGURATION_SCHEMA, ) diff --git a/tests/test_connections/test_stub.py b/tests/test_connections/test_stub.py index a9a3219028..d5db2c2f7e 100644 --- a/tests/test_connections/test_stub.py +++ b/tests/test_connections/test_stub.py @@ -31,9 +31,9 @@ import aea from aea.configurations.base import PublicId from aea.connections.stub.connection import ( - StubConnection, _process_line, lock_file, + StubConnection, write_envelope, write_with_lock, ) @@ -42,8 +42,7 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage - -from tests.conftest import ROOT_DIR, _make_stub_connection +from tests.conftest import _make_stub_connection, ROOT_DIR SEPARATOR = "," diff --git a/tests/test_context/test_base.py b/tests/test_context/test_base.py index 4ebe49282f..333a8bacfe 100644 --- a/tests/test_context/test_base.py +++ b/tests/test_context/test_base.py @@ -22,7 +22,6 @@ from aea.context.base import AgentContext from aea.identity.base import Identity - from tests.conftest import FETCHAI diff --git a/tests/test_contracts/test_base.py b/tests/test_contracts/test_base.py index 13e2e10064..fc0de4cfbc 100644 --- a/tests/test_contracts/test_base.py +++ b/tests/test_contracts/test_base.py @@ -24,13 +24,9 @@ from typing import cast import pytest - import web3 -from aea.configurations.base import ( - ComponentType, - ContractConfig, -) +from aea.configurations.base import ComponentType, ContractConfig from aea.configurations.loader import load_component_configuration from aea.contracts import contract_registry from aea.contracts.base import Contract @@ -38,7 +34,6 @@ from aea.crypto.ethereum import DEFAULT_ADDRESS as ETHEREUM_DEFAULT_ADDRESS from aea.crypto.fetchai import DEFAULT_ADDRESS as FETCHAI_DEFAULT_ADDRESS from aea.crypto.registries import crypto_registry, ledger_apis_registry - from tests.conftest import ETHEREUM, FETCHAI, ROOT_DIR diff --git a/tests/test_crypto/test_cosmos.py b/tests/test_crypto/test_cosmos.py index fc9531d515..36bbf49e38 100644 --- a/tests/test_crypto/test_cosmos.py +++ b/tests/test_crypto/test_cosmos.py @@ -21,11 +21,7 @@ from unittest.mock import MagicMock from aea.crypto.cosmos import CosmosApi, CosmosCrypto - -from tests.conftest import ( - COSMOS_PRIVATE_KEY_PATH, - COSMOS_TESTNET_CONFIG, -) +from tests.conftest import COSMOS_PRIVATE_KEY_PATH, COSMOS_TESTNET_CONFIG def test_creation(): diff --git a/tests/test_crypto/test_ethereum.py b/tests/test_crypto/test_ethereum.py index d569c06cf9..b2e80ffcc8 100644 --- a/tests/test_crypto/test_ethereum.py +++ b/tests/test_crypto/test_ethereum.py @@ -25,11 +25,9 @@ from unittest.mock import MagicMock import eth_account - import pytest from aea.crypto.ethereum import EthereumApi, EthereumCrypto, EthereumFaucetApi - from tests.conftest import ( ETHEREUM_PRIVATE_KEY_PATH, ETHEREUM_TESTNET_CONFIG, diff --git a/tests/test_crypto/test_fetchai.py b/tests/test_crypto/test_fetchai.py index aec465043f..f2bcf34731 100644 --- a/tests/test_crypto/test_fetchai.py +++ b/tests/test_crypto/test_fetchai.py @@ -21,12 +21,11 @@ import logging import time from unittest import mock -from unittest.mock import MagicMock, call +from unittest.mock import call, MagicMock import pytest from aea.crypto.fetchai import FetchAIApi, FetchAICrypto, FetchAIFaucetApi - from tests.conftest import ( FETCHAI_PRIVATE_KEY_PATH, FETCHAI_TESTNET_CONFIG, diff --git a/tests/test_crypto/test_helpers.py b/tests/test_crypto/test_helpers.py index 05dcd0876e..2814346786 100644 --- a/tests/test_crypto/test_helpers.py +++ b/tests/test_crypto/test_helpers.py @@ -25,7 +25,6 @@ from unittest.mock import mock_open, patch import pytest - import requests from aea.crypto.cosmos import CosmosCrypto @@ -37,7 +36,6 @@ try_validate_private_key_path, verify_or_create_private_keys, ) - from tests.conftest import ( COSMOS_PRIVATE_KEY_FILE, CUR_PATH, diff --git a/tests/test_crypto/test_ledger_apis.py b/tests/test_crypto/test_ledger_apis.py index d021a04a2d..7bb5bd0a56 100644 --- a/tests/test_crypto/test_ledger_apis.py +++ b/tests/test_crypto/test_ledger_apis.py @@ -29,12 +29,7 @@ from aea.crypto.fetchai import FetchAIApi from aea.crypto.ledger_apis import LedgerApis from aea.exceptions import AEAEnforceError - -from tests.conftest import ( - COSMOS, - COSMOS_ADDRESS_ONE, - ETHEREUM_ADDRESS_ONE, -) +from tests.conftest import COSMOS, COSMOS_ADDRESS_ONE, ETHEREUM_ADDRESS_ONE logger = logging.getLogger(__name__) diff --git a/tests/test_crypto/test_registry/test_crypto_registry.py b/tests/test_crypto/test_registry/test_crypto_registry.py index 19607fc413..e0471b0dcb 100644 --- a/tests/test_crypto/test_registry/test_crypto_registry.py +++ b/tests/test_crypto/test_registry/test_crypto_registry.py @@ -31,7 +31,6 @@ from aea.crypto.fetchai import FetchAICrypto from aea.crypto.registries.base import EntryPoint from aea.exceptions import AEAException - from tests.conftest import COSMOS, ETHEREUM, FETCHAI from tests.data.custom_crypto import CustomCrypto diff --git a/tests/test_crypto/test_registry/test_ledger_api_registry.py b/tests/test_crypto/test_registry/test_ledger_api_registry.py index 088128a9c3..9fe8943e4b 100644 --- a/tests/test_crypto/test_registry/test_ledger_api_registry.py +++ b/tests/test_crypto/test_registry/test_ledger_api_registry.py @@ -24,7 +24,6 @@ import pytest import aea.crypto - from tests.conftest import ( ETHEREUM, ETHEREUM_ADDRESS_ONE, diff --git a/tests/test_crypto/test_wallet.py b/tests/test_crypto/test_wallet.py index efb31f17b2..04ed6d899f 100644 --- a/tests/test_crypto/test_wallet.py +++ b/tests/test_crypto/test_wallet.py @@ -22,7 +22,6 @@ from unittest import TestCase import eth_account - import pytest from aea.crypto.cosmos import CosmosCrypto @@ -30,7 +29,6 @@ from aea.crypto.fetchai import FetchAICrypto from aea.crypto.wallet import Wallet from aea.exceptions import AEAException - from tests.conftest import ( COSMOS_PRIVATE_KEY_PATH, ETHEREUM_PRIVATE_KEY_PATH, diff --git a/tests/test_decision_maker/test_default.py b/tests/test_decision_maker/test_default.py index 859fe720f4..af6846e403 100644 --- a/tests/test_decision_maker/test_default.py +++ b/tests/test_decision_maker/test_default.py @@ -20,11 +20,10 @@ """This module contains tests for decision_maker.""" from queue import Queue -from typing import Optional, cast +from typing import cast, Optional from unittest import mock import eth_account - import pytest import aea @@ -51,7 +50,6 @@ StateUpdateDialogues as BaseStateUpdateDialogues, ) from aea.protocols.state_update.message import StateUpdateMessage - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_PATH, diff --git a/tests/test_decision_maker/test_ownership_state.py b/tests/test_decision_maker/test_ownership_state.py index c5ae85ae26..26c6996ab9 100644 --- a/tests/test_decision_maker/test_ownership_state.py +++ b/tests/test_decision_maker/test_ownership_state.py @@ -23,7 +23,6 @@ from aea.decision_maker.default import OwnershipState from aea.helpers.transaction.base import Terms - from tests.conftest import ETHEREUM diff --git a/tests/test_decision_maker/test_preferences.py b/tests/test_decision_maker/test_preferences.py index e64ce455de..3bd8b09879 100644 --- a/tests/test_decision_maker/test_preferences.py +++ b/tests/test_decision_maker/test_preferences.py @@ -25,7 +25,6 @@ from aea.decision_maker.default import OwnershipState, Preferences from aea.helpers.transaction.base import Terms - from tests.conftest import ETHEREUM diff --git a/tests/test_docs/test_agent_vs_aea/agent_code_block.py b/tests/test_docs/test_agent_vs_aea/agent_code_block.py index e219fd1420..332fc97204 100644 --- a/tests/test_docs/test_agent_vs_aea/agent_code_block.py +++ b/tests/test_docs/test_agent_vs_aea/agent_code_block.py @@ -32,7 +32,6 @@ from aea.mail.base import Envelope from aea.protocols.default.message import DefaultMessage - INPUT_FILE = "input_file" OUTPUT_FILE = "output_file" diff --git a/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py b/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py index 9fe0f5dfad..0f25897695 100644 --- a/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py +++ b/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py @@ -24,7 +24,6 @@ import pytest from aea.test_tools.test_cases import BaseAEATestCase - from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code from tests.test_docs.test_agent_vs_aea.agent_code_block import run diff --git a/tests/test_docs/test_bash_yaml/test_demo_docs.py b/tests/test_docs/test_bash_yaml/test_demo_docs.py index 85b1c5e31b..dde33427ea 100644 --- a/tests/test_docs/test_bash_yaml/test_demo_docs.py +++ b/tests/test_docs/test_bash_yaml/test_demo_docs.py @@ -26,7 +26,6 @@ from tests.conftest import ROOT_DIR from tests.test_docs.helper import extract_code_blocks, read_md_file - logger = logging.getLogger(__name__) diff --git a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py index 5d004506d0..fc80cdf4e7 100644 --- a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py @@ -27,7 +27,7 @@ from aea.configurations.base import SkillConfig from aea.connections.stub.connection import write_with_lock from aea.crypto.fetchai import FetchAICrypto -from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA, create_private_key +from aea.crypto.helpers import create_private_key, PRIVATE_KEY_PATH_SCHEMA from aea.skills.base import Skill ROOT_DIR = "./" diff --git a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py index cb307c49d2..349289ad5c 100644 --- a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py @@ -24,7 +24,6 @@ from aea.configurations.constants import DEFAULT_PRIVATE_KEY_FILE from aea.test_tools.test_cases import BaseAEATestCase - from tests.conftest import CUR_PATH, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py index 737f29fdfa..d9de11f423 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py @@ -28,13 +28,12 @@ from aea.aea import AEA from aea.configurations.base import ConnectionConfig, PublicId from aea.crypto.fetchai import FetchAICrypto -from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA, create_private_key +from aea.crypto.helpers import create_private_key, PRIVATE_KEY_PATH_SCHEMA from aea.crypto.wallet import Wallet from aea.identity.base import Identity from aea.protocols.base import Protocol from aea.registries.resources import Resources from aea.skills.base import Skill - from packages.fetchai.connections.ledger.connection import LedgerConnection from packages.fetchai.connections.p2p_libp2p.connection import P2PLibp2pConnection from packages.fetchai.connections.soef.connection import SOEFConnection diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py index 43c52bda0d..80bd07567d 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py @@ -27,7 +27,6 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( CUR_PATH, FETCHAI, diff --git a/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py b/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py index 10e9ad3055..7c9a968eda 100644 --- a/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py +++ b/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py @@ -22,7 +22,7 @@ import logging import time from threading import Thread -from typing import Optional, cast +from typing import cast, Optional from aea.aea_builder import AEABuilder from aea.configurations.base import ProtocolId, SkillConfig diff --git a/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py b/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py index 7c3065ddde..6a142c3c0e 100644 --- a/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py +++ b/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py @@ -25,12 +25,9 @@ from aea.test_tools.test_cases import BaseAEATestCase -from .decision_maker_transaction import ( - logger, - run, -) -from ..helper import extract_code_blocks, extract_python_code from ...conftest import CUR_PATH, ROOT_DIR +from ..helper import extract_code_blocks, extract_python_code +from .decision_maker_transaction import logger, run MD_FILE = "docs/decision-maker-transaction.md" PY_FILE = "test_docs/test_decision_maker_transaction/decision_maker_transaction.py" diff --git a/tests/test_docs/test_docs_protocol.py b/tests/test_docs/test_docs_protocol.py index 1bec995f56..750dd8e5cf 100644 --- a/tests/test_docs/test_docs_protocol.py +++ b/tests/test_docs/test_docs_protocol.py @@ -24,11 +24,9 @@ import mistune from aea.protocols.default.message import DefaultMessage - from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.oef_search.custom_types import OefErrorOperation from packages.fetchai.protocols.oef_search.message import OefSearchMessage - from tests.conftest import ROOT_DIR from tests.test_docs.helper import compare_enum_classes, compile_and_exec diff --git a/tests/test_docs/test_docs_skill.py b/tests/test_docs/test_docs_skill.py index 00e2b47bb6..1cbde84b96 100644 --- a/tests/test_docs/test_docs_skill.py +++ b/tests/test_docs/test_docs_skill.py @@ -24,7 +24,6 @@ from aea.skills.behaviours import OneShotBehaviour from aea.skills.tasks import Task - from tests.conftest import ROOT_DIR from tests.test_docs.helper import compile_and_exec diff --git a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py index 0789e8019c..762fdcb010 100644 --- a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py +++ b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py @@ -22,15 +22,12 @@ import os from pathlib import Path - from aea.test_tools.test_cases import BaseAEATestCase - from tests.conftest import CUR_PATH, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code from .multiplexer_standalone import run - MD_FILE = "docs/multiplexer-standalone.md" PY_FILE = "test_docs/test_multiplexer_standalone/multiplexer_standalone.py" diff --git a/tests/test_docs/test_orm_integration/test_orm_integration.py b/tests/test_docs/test_orm_integration/test_orm_integration.py index 56f83cf22d..a452a241b5 100644 --- a/tests/test_docs/test_orm_integration/test_orm_integration.py +++ b/tests/test_docs/test_orm_integration/test_orm_integration.py @@ -22,13 +22,10 @@ from random import uniform import mistune - import pytest - import yaml from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_docs/test_skill_guide/test_skill_guide.py b/tests/test_docs/test_skill_guide/test_skill_guide.py index 87fcc76cad..0f77e47bc9 100644 --- a/tests/test_docs/test_skill_guide/test_skill_guide.py +++ b/tests/test_docs/test_skill_guide/test_skill_guide.py @@ -29,7 +29,6 @@ from aea import AEA_DIR from aea.configurations.base import DEFAULT_VERSION from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( AUTHOR, COSMOS, @@ -44,7 +43,6 @@ ) from tests.test_docs.helper import extract_code_blocks - MD_FILE = "docs/skill-guide.md" diff --git a/tests/test_docs/test_standalone_transaction/standalone_transaction.py b/tests/test_docs/test_standalone_transaction/standalone_transaction.py index e137def89f..892d2db880 100644 --- a/tests/test_docs/test_standalone_transaction/standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/standalone_transaction.py @@ -26,7 +26,6 @@ from aea.crypto.ledger_apis import LedgerApis from aea.crypto.wallet import Wallet - logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) 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 3355099c3e..e9df590305 100644 --- a/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py @@ -26,14 +26,10 @@ import pytest from aea.test_tools.test_cases import BaseAEATestCase - from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS_INTEGRATION, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code -from .standalone_transaction import ( - logger, - run, -) +from .standalone_transaction import logger, run MD_FILE = "docs/standalone-transaction.md" PY_FILE = "test_docs/test_standalone_transaction/standalone_transaction.py" diff --git a/tests/test_examples/test_gym_ex.py b/tests/test_examples/test_gym_ex.py index 219de01525..aa950c7153 100644 --- a/tests/test_examples/test_gym_ex.py +++ b/tests/test_examples/test_gym_ex.py @@ -25,7 +25,7 @@ from pathlib import Path from tests.common.pexpect_popen import PexpectWrapper -from tests.conftest import ROOT_DIR, env_path_separator +from tests.conftest import env_path_separator, ROOT_DIR DIRECTORIES = ["packages", "examples"] diff --git a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py index ac2e07b52f..aa572200b0 100644 --- a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py +++ b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py @@ -29,7 +29,6 @@ from typing import Optional import pytest - import yaml from aea import AEA_DIR @@ -47,13 +46,10 @@ from aea.protocols.base import Message, Protocol from aea.registries.resources import Resources from aea.skills.base import Handler, Skill, SkillContext - from packages.fetchai.connections.http_client.connection import HTTPClientConnection from packages.fetchai.protocols.http.message import HttpMessage - from tests.conftest import HTTP_PROTOCOL_PUBLIC_ID - logger = logging.getLogger(__name__) diff --git a/tests/test_helpers/test_async_utils.py b/tests/test_helpers/test_async_utils.py index 6c008a29fd..d54ac7d6c3 100644 --- a/tests/test_helpers/test_async_utils.py +++ b/tests/test_helpers/test_async_utils.py @@ -26,11 +26,11 @@ from aea.helpers.async_utils import ( AsyncState, AwaitableProc, + ensure_list, + ensure_loop, HandlerItemGetter, PeriodicCaller, ThreadedAsyncRunner, - ensure_list, - ensure_loop, ) diff --git a/tests/test_helpers/test_base.py b/tests/test_helpers/test_base.py index b063cc3732..be19160c1c 100644 --- a/tests/test_helpers/test_base.py +++ b/tests/test_helpers/test_base.py @@ -32,12 +32,12 @@ import pytest from aea.helpers.base import ( - MaxRetriesError, - RegexConstrainedString, exception_log_and_reraise, load_env_file, load_module, locate, + MaxRetriesError, + RegexConstrainedString, retry_decorator, send_control_c, try_decorator, @@ -47,9 +47,7 @@ yaml_load, yaml_load_all, ) - from packages.fetchai.connections.oef.connection import OEFConnection - from tests.conftest import CUR_PATH, ROOT_DIR, skip_test_windows diff --git a/tests/test_helpers/test_exec_timeout.py b/tests/test_helpers/test_exec_timeout.py index 3dcf40bf3c..87e7c42c5f 100644 --- a/tests/test_helpers/test_exec_timeout.py +++ b/tests/test_helpers/test_exec_timeout.py @@ -26,12 +26,14 @@ import pytest -from aea.helpers.exec_timeout import BaseExecTimeout, ExecTimeoutSigAlarm -from aea.helpers.exec_timeout import ExecTimeoutThreadGuard, TimeoutException - +from aea.helpers.exec_timeout import ( + BaseExecTimeout, + ExecTimeoutSigAlarm, + ExecTimeoutThreadGuard, + TimeoutException, +) from tests.common.utils import timeit_context - if os.name == "nt": pytest.skip("signal.settimer non available on Windows.", allow_module_level=True) diff --git a/tests/test_helpers/test_ipfs/test_base.py b/tests/test_helpers/test_ipfs/test_base.py index 820f7b40b2..416c9f9390 100644 --- a/tests/test_helpers/test_ipfs/test_base.py +++ b/tests/test_helpers/test_ipfs/test_base.py @@ -22,8 +22,7 @@ import os from unittest.mock import patch -from aea.helpers.ipfs.base import IPFSHashOnly, _is_text - +from aea.helpers.ipfs.base import _is_text, IPFSHashOnly from tests.conftest import CUR_PATH FILE_PATH = "__init__.py" diff --git a/tests/test_helpers/test_pipe/test_pipe.py b/tests/test_helpers/test_pipe/test_pipe.py index f4e5d95ef5..8d4fc3d9b9 100644 --- a/tests/test_helpers/test_pipe/test_pipe.py +++ b/tests/test_helpers/test_pipe/test_pipe.py @@ -25,14 +25,13 @@ from aea.helpers.pipe import ( IPCChannelClient, + make_ipc_channel, + make_ipc_channel_client, PosixNamedPipeChannel, PosixNamedPipeChannelClient, TCPSocketChannel, TCPSocketChannelClient, - make_ipc_channel, - make_ipc_channel_client, ) - from tests.conftest import skip_test_windows diff --git a/tests/test_helpers/test_search/test_models.py b/tests/test_helpers/test_search/test_models.py index fbf6e152ac..6e64f5028f 100644 --- a/tests/test_helpers/test_search/test_models.py +++ b/tests/test_helpers/test_search/test_models.py @@ -32,11 +32,11 @@ ConstraintTypes, DataModel, Description, + generate_data_model, Location, Not, Or, Query, - generate_data_model, ) diff --git a/tests/test_identity/test_base.py b/tests/test_identity/test_base.py index 78ab1e42da..91ad680452 100644 --- a/tests/test_identity/test_base.py +++ b/tests/test_identity/test_base.py @@ -23,7 +23,6 @@ from aea.configurations.constants import DEFAULT_LEDGER from aea.identity.base import Identity - from tests.conftest import FETCHAI diff --git a/tests/test_launcher.py b/tests/test_launcher.py index 34071b62aa..6e0f30e82d 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -25,20 +25,16 @@ from pathlib import Path from threading import Thread - import pytest - import yaml from aea.cli.core import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE from aea.helpers.base import cd -from aea.launcher import AEALauncher, _run_agent +from aea.launcher import _run_agent, AEALauncher from aea.test_tools.test_cases import CLI_LOG_OPTION - - from tests.common.utils import wait_for_condition -from tests.conftest import AUTHOR, CUR_PATH, CliRunner +from tests.conftest import AUTHOR, CliRunner, CUR_PATH class TestThreadLauncherMode: diff --git a/tests/test_mail/test_base.py b/tests/test_mail/test_base.py index d4fdb3e624..71282b3083 100644 --- a/tests/test_mail/test_base.py +++ b/tests/test_mail/test_base.py @@ -29,13 +29,11 @@ from aea.multiplexer import InBox, Multiplexer, OutBox from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage - from packages.fetchai.connections.local.connection import LocalNode - from tests.conftest import ( - UNKNOWN_PROTOCOL_PUBLIC_ID, _make_dummy_connection, _make_local_connection, + UNKNOWN_PROTOCOL_PUBLIC_ID, ) diff --git a/tests/test_multiplexer.py b/tests/test_multiplexer.py index 41693c0f9e..f88202960e 100644 --- a/tests/test_multiplexer.py +++ b/tests/test_multiplexer.py @@ -27,7 +27,7 @@ from pathlib import Path from threading import Thread from unittest import mock -from unittest.mock import MagicMock, call, patch +from unittest.mock import call, MagicMock, patch import pytest @@ -38,25 +38,18 @@ from aea.helpers.exception_policy import ExceptionPolicyEnum from aea.identity.base import Identity from aea.mail.base import AEAConnectionError, Envelope, EnvelopeContext -from aea.multiplexer import ( - AsyncMultiplexer, - InBox, - Multiplexer, - OutBox, -) +from aea.multiplexer import AsyncMultiplexer, InBox, Multiplexer, OutBox from aea.protocols.default.message import DefaultMessage - from packages.fetchai.connections.local.connection import LocalNode - from tests.common.utils import wait_for_condition from .conftest import ( - UNKNOWN_CONNECTION_PUBLIC_ID, - UNKNOWN_PROTOCOL_PUBLIC_ID, _make_dummy_connection, _make_local_connection, _make_stub_connection, logger, + UNKNOWN_CONNECTION_PUBLIC_ID, + UNKNOWN_PROTOCOL_PUBLIC_ID, ) diff --git a/tests/test_package_loading.py b/tests/test_package_loading.py index 4f3717bc12..6b3b5b22c8 100644 --- a/tests/test_package_loading.py +++ b/tests/test_package_loading.py @@ -45,6 +45,8 @@ def test_loading(): ), "Not all the subpackages are importable." # try to import a function from a skill submodule. - from packages.dummy_author.skills.dummy.dummy_subpackage.foo import bar # type: ignore + from packages.dummy_author.skills.dummy.dummy_subpackage.foo import ( # type: ignore + bar, + ) assert bar() == 42 diff --git a/tests/test_packages/test_connections/test_gym/test_gym.py b/tests/test_packages/test_connections/test_gym/test_gym.py index e3e316efe3..dc5dbc56e1 100644 --- a/tests/test_packages/test_connections/test_gym/test_gym.py +++ b/tests/test_packages/test_connections/test_gym/test_gym.py @@ -24,7 +24,6 @@ from unittest.mock import patch import gym - import pytest from aea.common import Address @@ -32,13 +31,10 @@ from aea.identity.base import Identity from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - - from packages.fetchai.connections.gym.connection import GymConnection from packages.fetchai.protocols.gym.dialogues import GymDialogue from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues from packages.fetchai.protocols.gym.message import GymMessage - from tests.conftest import ROOT_DIR, UNKNOWN_PROTOCOL_PUBLIC_ID logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_http_client/test_http_client.py b/tests/test_packages/test_connections/test_http_client/test_http_client.py index efd1560d15..590ae817f1 100644 --- a/tests/test_packages/test_connections/test_http_client/test_http_client.py +++ b/tests/test_packages/test_connections/test_http_client/test_http_client.py @@ -22,9 +22,7 @@ from asyncio import CancelledError from unittest.mock import Mock, patch - import aiohttp - import pytest from aea.common import Address @@ -32,18 +30,12 @@ from aea.identity.base import Identity from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.connections.http_client.connection import HTTPClientConnection from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage - from tests.common.mocks import AnyStringWith -from tests.conftest import ( - UNKNOWN_PROTOCOL_PUBLIC_ID, - get_host, - get_unused_tcp_port, -) +from tests.conftest import get_host, get_unused_tcp_port, UNKNOWN_PROTOCOL_PUBLIC_ID logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_http_server/test_http_server.py b/tests/test_packages/test_connections/test_http_server/test_http_server.py index 215dbc830b..aa5270162e 100644 --- a/tests/test_packages/test_connections/test_http_server/test_http_server.py +++ b/tests/test_packages/test_connections/test_http_server/test_http_server.py @@ -23,20 +23,18 @@ import logging import os from traceback import print_exc -from typing import Tuple, cast +from typing import cast, Tuple from unittest.mock import Mock, patch import aiohttp -from aiohttp.client_reqrep import ClientResponse - import pytest +from aiohttp.client_reqrep import ClientResponse from aea.common import Address from aea.configurations.base import ConnectionConfig, PublicId from aea.identity.base import Identity from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.connections.http_server.connection import ( APISpec, HTTPServerConnection, @@ -45,14 +43,13 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage - from tests.common.mocks import RegexComparator from tests.conftest import ( + get_host, + get_unused_tcp_port, HTTP_PROTOCOL_PUBLIC_ID, ROOT_DIR, UNKNOWN_PROTOCOL_PUBLIC_ID, - get_host, - get_unused_tcp_port, ) logger = logging.getLogger(__name__) 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 5eb224b937..e1fb4f9864 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 @@ -29,18 +29,11 @@ from aea.identity.base import Identity from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.connections.http_client.connection import HTTPClientConnection from packages.fetchai.connections.http_server.connection import HTTPServerConnection -from packages.fetchai.protocols.http.dialogues import HttpDialogue -from packages.fetchai.protocols.http.dialogues import HttpDialogues +from packages.fetchai.protocols.http.dialogues import HttpDialogue, HttpDialogues from packages.fetchai.protocols.http.message import HttpMessage - -from tests.conftest import ( - get_host, - get_unused_tcp_port, -) - +from tests.conftest import get_host, get_unused_tcp_port logger = logging.getLogger(__name__) 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 88bb315259..c37e72d756 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 @@ -31,7 +31,6 @@ from aea.multiplexer import MultiplexerStatus from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue - from packages.fetchai.connections.ledger.contract_dispatcher import ( ContractApiRequestDispatcher, ) @@ -40,7 +39,6 @@ ContractApiDialogues as BaseContractApiDialogues, ) from packages.fetchai.protocols.contract_api.message import ContractApiMessage - from tests.conftest import ETHEREUM, ETHEREUM_ADDRESS_ONE diff --git a/tests/test_packages/test_connections/test_ledger/test_ledger_api.py b/tests/test_packages/test_connections/test_ledger/test_ledger_api.py index 21ceaf2f5c..8b217f7a92 100644 --- a/tests/test_packages/test_connections/test_ledger/test_ledger_api.py +++ b/tests/test_packages/test_connections/test_ledger/test_ledger_api.py @@ -41,7 +41,6 @@ ) from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.connections.ledger.connection import LedgerConnection from packages.fetchai.connections.ledger.ledger_dispatcher import ( LedgerApiRequestDispatcher, @@ -51,7 +50,6 @@ LedgerApiDialogues as BaseLedgerApiDialogues, ) from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage - from tests.conftest import ( ETHEREUM, ETHEREUM_ADDRESS_ONE, diff --git a/tests/test_packages/test_connections/test_local/test_misc.py b/tests/test_packages/test_connections/test_local/test_misc.py index 1c49dcf99d..a4fa2b3d14 100644 --- a/tests/test_packages/test_connections/test_local/test_misc.py +++ b/tests/test_packages/test_connections/test_local/test_misc.py @@ -27,10 +27,8 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage - from packages.fetchai.connections.local.connection import LocalNode from packages.fetchai.protocols.fipa.message import FipaMessage - from tests.conftest import _make_local_connection diff --git a/tests/test_packages/test_connections/test_local/test_search_services.py b/tests/test_packages/test_connections/test_local/test_search_services.py index 4c4c24ba4b..e6633574de 100644 --- a/tests/test_packages/test_connections/test_local/test_search_services.py +++ b/tests/test_packages/test_connections/test_local/test_search_services.py @@ -35,7 +35,6 @@ from aea.multiplexer import InBox, Multiplexer from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.connections.local.connection import LocalNode, OEFLocalConnection from packages.fetchai.protocols.fipa.dialogues import FipaDialogue, FipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage @@ -44,10 +43,9 @@ OefSearchDialogues as BaseOefSearchDialogues, ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage - from tests.common.mocks import AnyStringWith from tests.common.utils import wait_for_condition -from tests.conftest import MAX_FLAKY_RERUNS, _make_local_connection +from tests.conftest import _make_local_connection, MAX_FLAKY_RERUNS class OefSearchDialogues(BaseOefSearchDialogues): diff --git a/tests/test_packages/test_connections/test_oef/test_communication.py b/tests/test_packages/test_connections/test_oef/test_communication.py index 8d2a67ec92..d0afb31781 100644 --- a/tests/test_packages/test_connections/test_oef/test_communication.py +++ b/tests/test_packages/test_connections/test_oef/test_communication.py @@ -25,15 +25,14 @@ import time import unittest from contextlib import suppress -from typing import Dict, cast +from typing import cast, Dict from unittest import mock from unittest.mock import patch +import pytest from oef.messages import OEFErrorOperation from oef.query import ConstraintExpr -import pytest - from aea.common import Address from aea.helpers.search.models import ( Attribute, @@ -51,7 +50,6 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.test_tools.test_cases import UseOef - from packages.fetchai.connections.oef.connection import OEFObjectTranslator from packages.fetchai.protocols.fipa import fipa_pb2 from packages.fetchai.protocols.fipa.message import FipaMessage @@ -60,11 +58,10 @@ OefSearchDialogues as BaseOefSearchDialogues, ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage - from tests.conftest import ( + _make_oef_connection, FETCHAI_ADDRESS_ONE, FETCHAI_ADDRESS_TWO, - _make_oef_connection, ) logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_oef/test_models.py b/tests/test_packages/test_connections/test_oef/test_models.py index accb7470c5..544d8390d3 100644 --- a/tests/test_packages/test_connections/test_oef/test_models.py +++ b/tests/test_packages/test_connections/test_oef/test_models.py @@ -36,7 +36,6 @@ Or, Query, ) - from packages.fetchai.connections.oef.connection import OEFObjectTranslator diff --git a/tests/test_packages/test_connections/test_oef/test_oef_serializer.py b/tests/test_packages/test_connections/test_oef/test_oef_serializer.py index a6e1e20b0b..1240a82c02 100644 --- a/tests/test_packages/test_connections/test_oef/test_oef_serializer.py +++ b/tests/test_packages/test_connections/test_oef/test_oef_serializer.py @@ -27,7 +27,6 @@ Location, Query, ) - from packages.fetchai.connections.oef.object_translator import OEFObjectTranslator from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py index d31a3afbce..3958eff47f 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py @@ -22,7 +22,6 @@ import os from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import libp2p_log_on_failure DEFAULT_PORT = 10234 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py index 49a08a0be9..4893ad2a6e 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py @@ -28,9 +28,7 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage - from packages.fetchai.connections.p2p_libp2p.connection import Uri - from tests.conftest import ( _make_libp2p_connection, libp2p_log_on_failure, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py index 7828bec9ed..9b53827308 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py @@ -30,19 +30,14 @@ from aea.crypto.registries import make_crypto from aea.identity.base import Identity from aea.multiplexer import Multiplexer - from packages.fetchai.connections.p2p_libp2p.connection import ( + _golang_module_build_async, + _golang_module_run, AwaitableProc, LIBP2P_NODE_MODULE_NAME, P2PLibp2pConnection, - _golang_module_build_async, - _golang_module_run, -) - -from tests.conftest import ( - COSMOS, - _make_libp2p_connection, ) +from tests.conftest import _make_libp2p_connection, COSMOS DEFAULT_PORT = 10234 DEFAULT_NET_SIZE = 4 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py index 97553180c5..8b7d39157b 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py @@ -30,7 +30,6 @@ from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage from aea.protocols.default.serialization import DefaultSerializer - from tests.conftest import ( _make_libp2p_connection, libp2p_log_on_failure, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py index 08838b121a..9e726a4f15 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py @@ -29,16 +29,15 @@ from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import ( - PUBLIC_DHT_DELEGATE_URI_1, - PUBLIC_DHT_DELEGATE_URI_2, - PUBLIC_DHT_P2P_MADDR_1, - PUBLIC_DHT_P2P_MADDR_2, _make_libp2p_client_connection, _make_libp2p_connection, libp2p_log_on_failure, libp2p_log_on_failure_all, + PUBLIC_DHT_DELEGATE_URI_1, + PUBLIC_DHT_DELEGATE_URI_2, + PUBLIC_DHT_P2P_MADDR_1, + PUBLIC_DHT_P2P_MADDR_2, ) DEFAULT_PORT = 10234 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py index fc3c87b396..0a03321867 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py @@ -20,7 +20,6 @@ """This test module contains AEA cli tests for Libp2p tcp client connection.""" from aea.multiplexer import Multiplexer from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import ( _make_libp2p_connection, libp2p_log_on_failure, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py index 308f2b6bd2..82a4f55b3f 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py @@ -29,9 +29,7 @@ from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage from aea.protocols.default.serialization import DefaultSerializer - from packages.fetchai.connections.p2p_libp2p_client.connection import Uri - from tests.conftest import ( _make_libp2p_client_connection, _make_libp2p_connection, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py index 4500e3c166..25c898821f 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py @@ -29,15 +29,13 @@ from aea.crypto.registries import make_crypto from aea.identity.base import Identity from aea.multiplexer import Multiplexer - from packages.fetchai.connections.p2p_libp2p_client.connection import ( P2PLibp2pClientConnection, ) - from tests.conftest import ( - COSMOS, _make_libp2p_client_connection, _make_libp2p_connection, + COSMOS, libp2p_log_on_failure, ) diff --git a/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py b/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py index d5cfccb73d..9c56863b1b 100644 --- a/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py +++ b/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py @@ -30,7 +30,6 @@ from aea.identity.base import Identity from aea.mail.base import Envelope from aea.protocols.default.message import DefaultMessage - from packages.fetchai.connections.p2p_stub.connection import P2PStubConnection SEPARATOR = "," diff --git a/tests/test_packages/test_connections/test_soef/models.py b/tests/test_packages/test_connections/test_soef/models.py index 0f523d5807..a2dab6c1b3 100644 --- a/tests/test_packages/test_connections/test_soef/models.py +++ b/tests/test_packages/test_connections/test_soef/models.py @@ -19,10 +19,8 @@ """This module contains models for soef connection tests.""" from aea.helpers.search.models import Attribute, DataModel, Location - from packages.fetchai.connections.soef.connection import ModelNames - AGENT_LOCATION_MODEL = DataModel( ModelNames.location_agent, [ diff --git a/tests/test_packages/test_connections/test_soef/test_soef.py b/tests/test_packages/test_connections/test_soef/test_soef.py index 4cd3630ffd..3957765ebb 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef.py +++ b/tests/test_packages/test_connections/test_soef/test_soef.py @@ -41,14 +41,12 @@ from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue - from packages.fetchai.connections.soef.connection import SOEFConnection, SOEFException from packages.fetchai.protocols.oef_search.dialogues import OefSearchDialogue from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogues as BaseOefSearchDialogues, ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage - from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID from . import models diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index 46d4405451..413f6294c5 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -21,12 +21,11 @@ import logging import time from threading import Thread -from typing import Any, Dict, Optional, Tuple, cast +from typing import Any, cast, Dict, Optional, Tuple from urllib.parse import urlencode -from defusedxml import ElementTree as ET # pylint: disable=wrong-import-order - import pytest +from defusedxml import ElementTree as ET # pylint: disable=wrong-import-order from aea.configurations.base import ConnectionConfig, PublicId from aea.configurations.constants import DEFAULT_LEDGER @@ -42,10 +41,8 @@ from aea.identity.base import Identity from aea.mail.base import Envelope from aea.multiplexer import Multiplexer - from packages.fetchai.connections.soef.connection import SOEFConnection from packages.fetchai.protocols.oef_search.message import OefSearchMessage - from tests.common.utils import wait_for_condition from . import models diff --git a/tests/test_packages/test_connections/test_tcp/test_base.py b/tests/test_packages/test_connections/test_tcp/test_base.py index 4381d84e28..c5a627a1bc 100644 --- a/tests/test_packages/test_connections/test_tcp/test_base.py +++ b/tests/test_packages/test_connections/test_tcp/test_base.py @@ -27,7 +27,6 @@ from aea.mail.base import Envelope from aea.protocols.default.message import DefaultMessage - from tests.conftest import ( _make_tcp_client_connection, _make_tcp_server_connection, diff --git a/tests/test_packages/test_connections/test_tcp/test_communication.py b/tests/test_packages/test_connections/test_tcp/test_communication.py index 1a39f25d22..49da99d4f6 100644 --- a/tests/test_packages/test_connections/test_tcp/test_communication.py +++ b/tests/test_packages/test_connections/test_tcp/test_communication.py @@ -28,7 +28,6 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage - from tests.conftest import ( _make_tcp_client_connection, _make_tcp_server_connection, diff --git a/tests/test_packages/test_connections/test_webhook/test_webhook.py b/tests/test_packages/test_connections/test_webhook/test_webhook.py index 369d7900e4..177842aade 100644 --- a/tests/test_packages/test_connections/test_webhook/test_webhook.py +++ b/tests/test_packages/test_connections/test_webhook/test_webhook.py @@ -26,9 +26,8 @@ from unittest.mock import patch import aiohttp -from aiohttp.client_reqrep import ClientResponse - import pytest +from aiohttp.client_reqrep import ClientResponse from aea.common import Address from aea.configurations.base import ConnectionConfig, PublicId @@ -36,17 +35,12 @@ from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue - from packages.fetchai.connections.webhook.connection import WebhookConnection from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage - from tests.common.mocks import RegexComparator -from tests.conftest import ( - get_host, - get_unused_tcp_port, -) +from tests.conftest import get_host, get_unused_tcp_port logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_contracts/test_erc1155/test_contract.py b/tests/test_packages/test_contracts/test_erc1155/test_contract.py index f2e9d58821..a30b081ff1 100644 --- a/tests/test_packages/test_contracts/test_erc1155/test_contract.py +++ b/tests/test_packages/test_contracts/test_erc1155/test_contract.py @@ -30,7 +30,6 @@ faucet_apis_registry, ledger_apis_registry, ) - from tests.conftest import ( ETHEREUM, ETHEREUM_ADDRESS_ONE, diff --git a/tests/test_packages/test_protocols/test_contract_api.py b/tests/test_packages/test_protocols/test_contract_api.py index 397cc26142..af7ee43db4 100644 --- a/tests/test_packages/test_protocols/test_contract_api.py +++ b/tests/test_packages/test_protocols/test_contract_api.py @@ -26,14 +26,13 @@ import pytest +import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - -import packages from packages.fetchai.protocols.contract_api.dialogues import ( ContractApiDialogue, ContractApiDialogues, @@ -42,7 +41,6 @@ from packages.fetchai.protocols.contract_api.message import ( logger as contract_api_message_logger, ) - from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_protocols/test_fipa.py b/tests/test_packages/test_protocols/test_fipa.py index abead1272a..ebbcf70e7b 100644 --- a/tests/test_packages/test_protocols/test_fipa.py +++ b/tests/test_packages/test_protocols/test_fipa.py @@ -26,6 +26,7 @@ import pytest +import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.helpers.search.models import Constraint, ConstraintType, Description, Query @@ -33,12 +34,9 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - -import packages from packages.fetchai.protocols.fipa.dialogues import FipaDialogue, FipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.fipa.message import logger as fipa_message_logger - from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_protocols/test_gym.py b/tests/test_packages/test_protocols/test_gym.py index 330e9a7833..9393c45328 100644 --- a/tests/test_packages/test_protocols/test_gym.py +++ b/tests/test_packages/test_protocols/test_gym.py @@ -25,18 +25,16 @@ import pytest +import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - -import packages from packages.fetchai.protocols.gym.dialogues import GymDialogue, GymDialogues from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.protocols.gym.message import logger as gym_message_logger - from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_http.py b/tests/test_packages/test_protocols/test_http.py index 0d7d8d9833..39eaaffc5d 100644 --- a/tests/test_packages/test_protocols/test_http.py +++ b/tests/test_packages/test_protocols/test_http.py @@ -25,18 +25,16 @@ import pytest +import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - -import packages from packages.fetchai.protocols.http.dialogues import HttpDialogue, HttpDialogues from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.protocols.http.message import logger as http_message_logger - from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_ledger_api.py b/tests/test_packages/test_protocols/test_ledger_api.py index 01b64fce26..89ab8c7914 100644 --- a/tests/test_packages/test_protocols/test_ledger_api.py +++ b/tests/test_packages/test_protocols/test_ledger_api.py @@ -25,14 +25,13 @@ import pytest +import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - -import packages from packages.fetchai.protocols.ledger_api.dialogues import ( LedgerApiDialogue, LedgerApiDialogues, @@ -41,7 +40,6 @@ from packages.fetchai.protocols.ledger_api.message import ( logger as ledger_api_message_logger, ) - from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_ml_trade.py b/tests/test_packages/test_protocols/test_ml_trade.py index df379a7c7e..fc93e3ba1c 100644 --- a/tests/test_packages/test_protocols/test_ml_trade.py +++ b/tests/test_packages/test_protocols/test_ml_trade.py @@ -26,29 +26,22 @@ import pytest +import packages from aea.common import Address from aea.exceptions import AEAEnforceError -from aea.helpers.search.models import ( - Constraint, - ConstraintType, - Description, - Query, -) +from aea.helpers.search.models import Constraint, ConstraintType, Description, Query from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - -import packages from packages.fetchai.protocols.ml_trade.dialogues import ( MlTradeDialogue, MlTradeDialogues, ) -from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from packages.fetchai.protocols.ml_trade.message import ( logger as ml_trade_message_logger, ) - +from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_protocols/test_oef_search.py b/tests/test_packages/test_protocols/test_oef_search.py index 6c73e6d1e1..41f2d1dccc 100644 --- a/tests/test_packages/test_protocols/test_oef_search.py +++ b/tests/test_packages/test_protocols/test_oef_search.py @@ -25,29 +25,22 @@ import pytest +import packages from aea.common import Address from aea.exceptions import AEAEnforceError -from aea.helpers.search.models import ( - Constraint, - ConstraintType, - Description, - Query, -) +from aea.helpers.search.models import Constraint, ConstraintType, Description, Query from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - -import packages from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue, OefSearchDialogues, ) -from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.oef_search.message import ( logger as oef_search_message_logger, ) - +from packages.fetchai.protocols.oef_search.message import OefSearchMessage from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_tac.py b/tests/test_packages/test_protocols/test_tac.py index 2ea87db305..f9dd8f5ad8 100644 --- a/tests/test_packages/test_protocols/test_tac.py +++ b/tests/test_packages/test_protocols/test_tac.py @@ -25,18 +25,16 @@ import pytest +import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel - -import packages from packages.fetchai.protocols.tac.dialogues import TacDialogue, TacDialogues -from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.protocols.tac.message import logger as tac_message_logger - +from packages.fetchai.protocols.tac.message import TacMessage from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_skills/test_carpark.py b/tests/test_packages/test_skills/test_carpark.py index a95f7128b1..ca63ad4c3e 100644 --- a/tests/test_packages/test_skills/test_carpark.py +++ b/tests/test_packages/test_skills/test_carpark.py @@ -24,7 +24,6 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_erc1155.py b/tests/test_packages/test_skills/test_erc1155.py index f785a87681..439bdf5b27 100644 --- a/tests/test_packages/test_skills/test_erc1155.py +++ b/tests/test_packages/test_skills/test_erc1155.py @@ -23,7 +23,6 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_generic.py b/tests/test_packages/test_skills/test_generic.py index d320798742..7791c37d50 100644 --- a/tests/test_packages/test_skills/test_generic.py +++ b/tests/test_packages/test_skills/test_generic.py @@ -23,7 +23,6 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_gym.py b/tests/test_packages/test_skills/test_gym.py index 1d2126cf88..4f5f3544d2 100644 --- a/tests/test_packages/test_skills/test_gym.py +++ b/tests/test_packages/test_skills/test_gym.py @@ -22,9 +22,7 @@ import os import shutil - from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import ROOT_DIR diff --git a/tests/test_packages/test_skills/test_http_echo.py b/tests/test_packages/test_skills/test_http_echo.py index e476ed7de2..f44520bc57 100644 --- a/tests/test_packages/test_skills/test_http_echo.py +++ b/tests/test_packages/test_skills/test_http_echo.py @@ -24,7 +24,6 @@ import requests from aea.test_tools.test_cases import AEATestCaseEmpty - from tests.conftest import ROOT_DIR API_SPEC_PATH = Path(ROOT_DIR, "examples", "http_ex", "petstore.yaml").absolute() diff --git a/tests/test_packages/test_skills/test_ml_skills.py b/tests/test_packages/test_skills/test_ml_skills.py index 3ed1c80747..0d17f5cc40 100644 --- a/tests/test_packages/test_skills/test_ml_skills.py +++ b/tests/test_packages/test_skills/test_ml_skills.py @@ -25,7 +25,6 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index a2397ffcbc..0ea77c3680 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -23,7 +23,6 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_thermometer.py b/tests/test_packages/test_skills/test_thermometer.py index 0d87abf663..c000784bcd 100644 --- a/tests/test_packages/test_skills/test_thermometer.py +++ b/tests/test_packages/test_skills/test_thermometer.py @@ -23,7 +23,6 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_weather.py b/tests/test_packages/test_skills/test_weather.py index 76f159df7a..ecf0d33309 100644 --- a/tests/test_packages/test_skills/test_weather.py +++ b/tests/test_packages/test_skills/test_weather.py @@ -23,7 +23,6 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany - from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_protocols/test_base.py b/tests/test_protocols/test_base.py index 357b1e9a8e..dd7f7c9e2b 100644 --- a/tests/test_protocols/test_base.py +++ b/tests/test_protocols/test_base.py @@ -40,7 +40,6 @@ StateUpdateDialogue, StateUpdateDialogues, ) - from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID diff --git a/tests/test_protocols/test_dialogue/test_base.py b/tests/test_protocols/test_dialogue/test_base.py index 272676ca91..de3c33d420 100644 --- a/tests/test_protocols/test_dialogue/test_base.py +++ b/tests/test_protocols/test_dialogue/test_base.py @@ -19,7 +19,7 @@ """This module contains the tests for the dialogue/base.py module.""" -from typing import FrozenSet, Tuple, Type, cast +from typing import cast, FrozenSet, Tuple, Type import pytest @@ -28,9 +28,9 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue -from aea.protocols.dialogue.base import DialogueLabel, DialogueStats +from aea.protocols.dialogue.base import DialogueLabel from aea.protocols.dialogue.base import Dialogues as BaseDialogues -from aea.protocols.dialogue.base import InvalidDialogueMessage +from aea.protocols.dialogue.base import DialogueStats, InvalidDialogueMessage from aea.protocols.state_update.message import StateUpdateMessage diff --git a/tests/test_protocols/test_generator/test_common.py b/tests/test_protocols/test_generator/test_common.py index 0c6a86960e..f31b8a072e 100644 --- a/tests/test_protocols/test_generator/test_common.py +++ b/tests/test_protocols/test_generator/test_common.py @@ -23,7 +23,7 @@ import tempfile from pathlib import Path from subprocess import CalledProcessError # nosec -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.protocols.generator.common import ( _camel_case_to_snake_case, @@ -42,7 +42,6 @@ try_run_black_formatting, try_run_protoc, ) - from tests.test_protocols.test_generator.common import ( PATH_TO_T_PROTOCOL_SPECIFICATION, T_PROTOCOL_NAME, diff --git a/tests/test_protocols/test_generator/test_end_to_end.py b/tests/test_protocols/test_generator/test_end_to_end.py index d1b98204c1..217ecf0c9c 100644 --- a/tests/test_protocols/test_generator/test_end_to_end.py +++ b/tests/test_protocols/test_generator/test_end_to_end.py @@ -24,30 +24,22 @@ import time from pathlib import Path from threading import Thread -from typing import Optional, cast +from typing import cast, Optional from aea.aea_builder import AEABuilder -from aea.configurations.base import ( - ComponentType, - ProtocolId, - PublicId, - SkillConfig, -) +from aea.configurations.base import ComponentType, ProtocolId, PublicId, SkillConfig from aea.configurations.constants import DEFAULT_LEDGER, DEFAULT_PRIVATE_KEY_FILE from aea.crypto.helpers import create_private_key from aea.protocols.base import Address, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Handler, Skill, SkillContext from aea.test_tools.test_cases import UseOef - from tests.conftest import ROOT_DIR from tests.data.generator.t_protocol.dialogues import ( TProtocolDialogue, TProtocolDialogues, ) -from tests.data.generator.t_protocol.message import ( # type: ignore - TProtocolMessage, -) +from tests.data.generator.t_protocol.message import TProtocolMessage # type: ignore from tests.test_protocols.test_generator.common import PATH_TO_T_PROTOCOL logger = logging.getLogger("aea") diff --git a/tests/test_protocols/test_generator/test_extract_specification.py b/tests/test_protocols/test_generator/test_extract_specification.py index 9f1122363b..deb111388d 100644 --- a/tests/test_protocols/test_generator/test_extract_specification.py +++ b/tests/test_protocols/test_generator/test_extract_specification.py @@ -21,12 +21,11 @@ import os import shutil import tempfile -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.configurations.base import ProtocolSpecificationParseError from aea.protocols.generator.common import load_protocol_specification from aea.protocols.generator.extract_specification import ( - PythonicProtocolSpecification, _ct_specification_type_to_python_type, _mt_specification_type_to_python_type, _optional_specification_type_to_python_type, @@ -35,8 +34,8 @@ _pt_specification_type_to_python_type, _specification_type_to_python_type, extract, + PythonicProtocolSpecification, ) - from tests.test_protocols.test_generator.common import PATH_TO_T_PROTOCOL_SPECIFICATION logger = logging.getLogger("aea") diff --git a/tests/test_protocols/test_generator/test_generator.py b/tests/test_protocols/test_generator/test_generator.py index 1d57fcee60..82e074b89c 100644 --- a/tests/test_protocols/test_generator/test_generator.py +++ b/tests/test_protocols/test_generator/test_generator.py @@ -24,7 +24,7 @@ import tempfile from pathlib import Path from typing import cast -from unittest import TestCase, mock +from unittest import mock, TestCase import pytest @@ -33,18 +33,14 @@ ProtocolSpecificationParseError, ) from aea.protocols.generator.base import ProtocolGenerator - from tests.conftest import ROOT_DIR -from tests.data.generator.t_protocol.message import ( # type: ignore - TProtocolMessage, -) +from tests.data.generator.t_protocol.message import TProtocolMessage # type: ignore from tests.test_protocols.test_generator.common import ( PATH_TO_T_PROTOCOL, PATH_TO_T_PROTOCOL_SPECIFICATION, T_PROTOCOL_NAME, ) - logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) diff --git a/tests/test_protocols/test_generator/test_validate.py b/tests/test_protocols/test_generator/test_validate.py index eeeda771f3..9211f29623 100644 --- a/tests/test_protocols/test_generator/test_validate.py +++ b/tests/test_protocols/test_generator/test_validate.py @@ -18,14 +18,10 @@ # ------------------------------------------------------------------------------ """This module contains the tests for generator/validate.py module.""" import logging -from unittest import TestCase, mock +from unittest import mock, TestCase from aea.configurations.base import CRUDCollection, SpeechActContentConfig from aea.protocols.generator.validate import ( - CONTENT_NAME_REGEX_PATTERN, - END_STATE_REGEX_PATTERN, - PERFORMATIVE_REGEX_PATTERN, - ROLE_REGEX_PATTERN, _has_brackets, _is_reserved_name, _is_valid_content_type_format, @@ -48,6 +44,10 @@ _validate_roles, _validate_speech_acts_section, _validate_termination, + CONTENT_NAME_REGEX_PATTERN, + END_STATE_REGEX_PATTERN, + PERFORMATIVE_REGEX_PATTERN, + ROLE_REGEX_PATTERN, validate, ) diff --git a/tests/test_protocols/test_signing.py b/tests/test_protocols/test_signing.py index a548e4fa02..24fe1adcf9 100644 --- a/tests/test_protocols/test_signing.py +++ b/tests/test_protocols/test_signing.py @@ -30,7 +30,6 @@ Terms, ) from aea.protocols.signing.message import SigningMessage - from tests.conftest import COSMOS diff --git a/tests/test_registries/test_base.py b/tests/test_registries/test_base.py index 35c145764a..3bc28e1d4d 100644 --- a/tests/test_registries/test_base.py +++ b/tests/test_registries/test_base.py @@ -53,8 +53,7 @@ ) from aea.registries.resources import Resources from aea.skills.base import Skill - -from tests.conftest import CUR_PATH, ROOT_DIR, _make_dummy_connection +from tests.conftest import _make_dummy_connection, CUR_PATH, ROOT_DIR class TestContractRegistry: diff --git a/tests/test_registries/test_filter.py b/tests/test_registries/test_filter.py index eb28fd0f12..4e34d9f14d 100644 --- a/tests/test_registries/test_filter.py +++ b/tests/test_registries/test_filter.py @@ -22,7 +22,6 @@ import pytest - import aea from aea.configurations.base import PublicId, SkillConfig from aea.helpers.async_friendly_queue import AsyncFriendlyQueue @@ -30,7 +29,6 @@ from aea.registries.filter import Filter from aea.registries.resources import Resources from aea.skills.base import Skill - from tests.data.dummy_skill.behaviours import DummyBehaviour from tests.data.dummy_skill.handlers import DummyHandler diff --git a/tests/test_runner.py b/tests/test_runner.py index 36b7be2137..cfeb15bf65 100644 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -25,13 +25,10 @@ from aea.aea_builder import AEABuilder from aea.configurations.base import SkillConfig from aea.configurations.constants import DEFAULT_LEDGER -from aea.helpers.multiple_executor import ( - ExecutorExceptionPolicies, - logger as executor_logger, -) +from aea.helpers.multiple_executor import ExecutorExceptionPolicies +from aea.helpers.multiple_executor import logger as executor_logger from aea.runner import AEARunner from aea.skills.base import Skill, SkillContext - from tests.common.utils import make_behaviour_cls_from_funcion, wait_for_condition from tests.conftest import FETCHAI_PRIVATE_KEY_PATH diff --git a/tests/test_runtime.py b/tests/test_runtime.py index e786ee55f5..c111287df1 100644 --- a/tests/test_runtime.py +++ b/tests/test_runtime.py @@ -27,8 +27,6 @@ from aea.aea_builder import AEABuilder from aea.configurations.constants import DEFAULT_LEDGER, DEFAULT_PRIVATE_KEY_FILE from aea.runtime import AsyncRuntime, BaseRuntime, RuntimeStates, ThreadedRuntime - - from tests.common.utils import run_in_thread, wait_for_condition from tests.conftest import CUR_PATH diff --git a/tests/test_skills/test_base.py b/tests/test_skills/test_base.py index 4becbd346d..a1f193b8e2 100644 --- a/tests/test_skills/test_base.py +++ b/tests/test_skills/test_base.py @@ -23,7 +23,7 @@ from pathlib import Path from queue import Queue from types import SimpleNamespace -from unittest import TestCase, mock +from unittest import mock, TestCase from unittest.mock import MagicMock, Mock import pytest @@ -39,23 +39,22 @@ from aea.protocols.base import Message from aea.registries.resources import Resources from aea.skills.base import ( + _check_duplicate_classes, + _print_warning_message_for_non_declared_skill_components, Behaviour, Handler, Model, Skill, SkillComponent, SkillContext, - _check_duplicate_classes, - _print_warning_message_for_non_declared_skill_components, ) - from tests.conftest import ( + _make_dummy_connection, ETHEREUM, ETHEREUM_PRIVATE_KEY_PATH, FETCHAI, FETCHAI_PRIVATE_KEY_PATH, ROOT_DIR, - _make_dummy_connection, ) diff --git a/tests/test_skills/test_behaviours.py b/tests/test_skills/test_behaviours.py index d0cf7fd4fb..9aee8d143e 100644 --- a/tests/test_skills/test_behaviours.py +++ b/tests/test_skills/test_behaviours.py @@ -19,7 +19,7 @@ """This module contains the tests for the behaviours.""" from collections import Counter -from unittest import TestCase, mock +from unittest import mock, TestCase import pytest diff --git a/tests/test_skills/test_error.py b/tests/test_skills/test_error.py index 926951face..a397c3ba1a 100644 --- a/tests/test_skills/test_error.py +++ b/tests/test_skills/test_error.py @@ -35,12 +35,9 @@ from aea.registries.resources import Resources from aea.skills.base import SkillContext from aea.skills.error.handlers import ErrorHandler - from packages.fetchai.protocols.fipa.message import FipaMessage - from tests.common.utils import wait_for_condition -from tests.conftest import CUR_PATH, _make_dummy_connection - +from tests.conftest import _make_dummy_connection, CUR_PATH logger = logging.getLogger(__file__) diff --git a/tests/test_skills/test_tasks.py b/tests/test_skills/test_tasks.py index 4308e14740..336ec68d3f 100644 --- a/tests/test_skills/test_tasks.py +++ b/tests/test_skills/test_tasks.py @@ -19,10 +19,10 @@ """This module contains the tests for the tasks module.""" -from unittest import TestCase, mock +from unittest import mock, TestCase from unittest.mock import Mock, patch -from aea.skills.tasks import Task, TaskManager, init_worker +from aea.skills.tasks import init_worker, Task, TaskManager def _raise_exception(self, *args, **kwargs): diff --git a/tests/test_test_tools/test_testcases.py b/tests/test_test_tools/test_testcases.py index 0a4567d923..22f5abc4ca 100644 --- a/tests/test_test_tools/test_testcases.py +++ b/tests/test_test_tools/test_testcases.py @@ -31,11 +31,9 @@ from aea.protocols.dialogue.base import Dialogue from aea.test_tools.exceptions import AEATestingException from aea.test_tools.test_cases import AEATestCase, AEATestCaseEmpty - from tests.conftest import FETCHAI from tests.test_cli import test_generate_wealth, test_interact - TestWealthCommandsPositive = test_generate_wealth.TestWealthCommandsPositive TestInteractCommand = test_interact.TestInteractCommand diff --git a/tox.ini b/tox.ini index ed4f4b27b6..d1eab833e6 100644 --- a/tox.ini +++ b/tox.ini @@ -69,6 +69,18 @@ skip_install = True deps = black==19.10b0 commands = black aea benchmark examples packages scripts tests --check --verbose +[testenv:isort] +skipsdist = True +skip_install = True +deps = isort==5.5.2 +commands = isort aea benchmark examples packages scripts tests + +[testenv:isort-check] +skipsdist = True +skip_install = True +deps = isort==5.5.2 +commands = isort --check-only --verbose aea benchmark examples packages scripts tests + [testenv:copyright_check] skipsdist = True skip_install = True @@ -126,7 +138,7 @@ deps = flake8==3.7.9 flake8-bugbear==20.1.4 flake8-docstrings==1.5.0 flake8-eradicate==0.4.0 - flake8-import-order==0.18.1 + flake8-isort==4.0.0 pydocstyle==3.0.0 commands = flake8 aea benchmark examples packages scripts tests From 1ba6d13066cb7a08230a683c03582bac12e14a60 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Sun, 20 Sep 2020 15:34:54 +0200 Subject: [PATCH 014/131] use isort with order_by_type=True --- aea/aea.py | 2 +- aea/aea_builder.py | 4 +- aea/agent_loop.py | 2 +- aea/cli/config.py | 2 +- aea/cli/create.py | 4 +- aea/cli/fetch.py | 2 +- aea/cli/fingerprint.py | 6 +- aea/cli/freeze.py | 2 +- aea/cli/generate_key.py | 2 +- aea/cli/generate_wealth.py | 2 +- aea/cli/get_multiaddress.py | 2 +- aea/cli/get_wealth.py | 2 +- aea/cli/install.py | 2 +- aea/cli/interact.py | 2 +- aea/cli/launch.py | 2 +- aea/cli/list.py | 2 +- aea/cli/publish.py | 2 +- aea/cli/run.py | 2 +- aea/cli/search.py | 2 +- aea/cli/utils/config.py | 2 +- aea/cli/utils/context.py | 4 +- aea/cli/utils/decorators.py | 6 +- aea/cli/utils/package_utils.py | 6 +- aea/cli_gui/__init__.py | 2 +- aea/configurations/base.py | 2 +- aea/configurations/loader.py | 2 +- aea/configurations/pypi.py | 2 +- aea/connections/base.py | 2 +- aea/connections/stub/connection.py | 2 +- aea/connections/stub/connection.yaml | 2 +- aea/contracts/base.py | 2 +- aea/crypto/ethereum.py | 2 +- aea/crypto/fetchai.py | 2 +- aea/crypto/helpers.py | 2 +- aea/crypto/ledger_apis.py | 2 +- aea/crypto/wallet.py | 2 +- aea/decision_maker/default.py | 2 +- aea/helpers/logging.py | 2 +- aea/helpers/multiaddr/base.py | 2 +- aea/helpers/multiple_executor.py | 2 +- aea/helpers/search/models.py | 2 +- aea/multiplexer.py | 2 +- aea/protocols/base.py | 2 +- aea/protocols/default/dialogues.py | 2 +- aea/protocols/default/message.py | 2 +- aea/protocols/default/protocol.yaml | 6 +- aea/protocols/default/serialization.py | 2 +- aea/protocols/dialogue/base.py | 2 +- aea/protocols/generator/base.py | 20 ++--- .../generator/extract_specification.py | 4 +- aea/protocols/generator/validate.py | 6 +- aea/protocols/signing/dialogues.py | 2 +- aea/protocols/signing/message.py | 2 +- aea/protocols/signing/protocol.yaml | 6 +- aea/protocols/signing/serialization.py | 2 +- aea/protocols/state_update/dialogues.py | 2 +- aea/protocols/state_update/message.py | 2 +- aea/protocols/state_update/protocol.yaml | 6 +- aea/protocols/state_update/serialization.py | 2 +- aea/registries/base.py | 2 +- aea/registries/resources.py | 2 +- aea/runtime.py | 2 +- aea/skills/base.py | 2 +- aea/skills/tasks.py | 2 +- aea/test_tools/test_cases.py | 2 +- benchmark/checks/check_reactive.py | 2 +- examples/gym_ex/proxy/env.py | 2 +- .../fetchai/connections/gym/connection.py | 2 +- .../fetchai/connections/gym/connection.yaml | 2 +- .../connections/http_client/connection.py | 2 +- .../connections/http_client/connection.yaml | 2 +- .../connections/http_server/connection.py | 4 +- .../connections/http_server/connection.yaml | 2 +- packages/fetchai/connections/ledger/base.py | 2 +- .../fetchai/connections/ledger/connection.py | 2 +- .../connections/ledger/connection.yaml | 6 +- .../connections/ledger/contract_dispatcher.py | 2 +- .../fetchai/connections/local/connection.py | 2 +- .../fetchai/connections/local/connection.yaml | 2 +- .../fetchai/connections/oef/connection.py | 2 +- .../fetchai/connections/oef/connection.yaml | 2 +- .../connections/p2p_libp2p/connection.py | 2 +- .../connections/p2p_libp2p/connection.yaml | 2 +- .../p2p_libp2p_client/connection.py | 2 +- .../p2p_libp2p_client/connection.yaml | 2 +- .../connections/p2p_stub/connection.py | 2 +- .../connections/p2p_stub/connection.yaml | 2 +- .../fetchai/connections/soef/connection.py | 2 +- .../fetchai/connections/soef/connection.yaml | 2 +- .../fetchai/connections/tcp/connection.yaml | 4 +- .../fetchai/connections/tcp/tcp_client.py | 2 +- .../fetchai/connections/tcp/tcp_server.py | 2 +- .../fetchai/connections/webhook/connection.py | 4 +- .../connections/webhook/connection.yaml | 2 +- .../fetchai/contracts/erc1155/contract.py | 2 +- .../fetchai/contracts/erc1155/contract.yaml | 2 +- .../protocols/contract_api/dialogues.py | 2 +- .../fetchai/protocols/contract_api/message.py | 2 +- .../protocols/contract_api/protocol.yaml | 6 +- .../protocols/contract_api/serialization.py | 2 +- packages/fetchai/protocols/fipa/dialogues.py | 2 +- packages/fetchai/protocols/fipa/message.py | 2 +- packages/fetchai/protocols/fipa/protocol.yaml | 6 +- .../fetchai/protocols/fipa/serialization.py | 2 +- packages/fetchai/protocols/gym/dialogues.py | 2 +- packages/fetchai/protocols/gym/message.py | 2 +- packages/fetchai/protocols/gym/protocol.yaml | 6 +- .../fetchai/protocols/gym/serialization.py | 2 +- packages/fetchai/protocols/http/dialogues.py | 2 +- packages/fetchai/protocols/http/message.py | 2 +- packages/fetchai/protocols/http/protocol.yaml | 6 +- .../fetchai/protocols/http/serialization.py | 2 +- .../fetchai/protocols/ledger_api/dialogues.py | 2 +- .../fetchai/protocols/ledger_api/message.py | 2 +- .../protocols/ledger_api/protocol.yaml | 6 +- .../protocols/ledger_api/serialization.py | 2 +- .../fetchai/protocols/ml_trade/dialogues.py | 2 +- .../fetchai/protocols/ml_trade/message.py | 2 +- .../fetchai/protocols/ml_trade/protocol.yaml | 6 +- .../protocols/ml_trade/serialization.py | 2 +- .../fetchai/protocols/oef_search/dialogues.py | 2 +- .../fetchai/protocols/oef_search/message.py | 2 +- .../protocols/oef_search/protocol.yaml | 6 +- .../protocols/oef_search/serialization.py | 2 +- packages/fetchai/protocols/tac/dialogues.py | 2 +- packages/fetchai/protocols/tac/message.py | 2 +- packages/fetchai/protocols/tac/protocol.yaml | 6 +- .../fetchai/protocols/tac/serialization.py | 2 +- .../fetchai/skills/aries_alice/behaviours.py | 4 +- .../fetchai/skills/aries_alice/handlers.py | 2 +- .../fetchai/skills/aries_alice/skill.yaml | 4 +- .../fetchai/skills/aries_faber/behaviours.py | 4 +- .../fetchai/skills/aries_faber/handlers.py | 4 +- .../fetchai/skills/aries_faber/skill.yaml | 4 +- .../fetchai/skills/erc1155_client/handlers.py | 2 +- .../fetchai/skills/erc1155_client/skill.yaml | 2 +- .../fetchai/skills/erc1155_deploy/handlers.py | 2 +- .../fetchai/skills/erc1155_deploy/skill.yaml | 2 +- .../fetchai/skills/generic_buyer/handlers.py | 2 +- .../fetchai/skills/generic_buyer/skill.yaml | 2 +- .../fetchai/skills/generic_seller/handlers.py | 2 +- .../fetchai/skills/generic_seller/skill.yaml | 2 +- packages/fetchai/skills/gym/helpers.py | 2 +- packages/fetchai/skills/gym/skill.yaml | 4 +- packages/fetchai/skills/gym/tasks.py | 2 +- .../skills/ml_data_provider/handlers.py | 2 +- .../skills/ml_data_provider/skill.yaml | 2 +- packages/fetchai/skills/ml_train/handlers.py | 2 +- packages/fetchai/skills/ml_train/skill.yaml | 2 +- .../simple_service_registration/handlers.py | 2 +- .../simple_service_registration/skill.yaml | 2 +- .../fetchai/skills/tac_control/behaviours.py | 2 +- packages/fetchai/skills/tac_control/game.py | 2 +- .../fetchai/skills/tac_control/handlers.py | 2 +- .../fetchai/skills/tac_control/helpers.py | 2 +- .../fetchai/skills/tac_control/skill.yaml | 8 +- .../skills/tac_control_contract/behaviours.py | 2 +- .../skills/tac_control_contract/game.py | 2 +- .../skills/tac_control_contract/helpers.py | 2 +- .../skills/tac_control_contract/skill.yaml | 6 +- .../skills/tac_negotiation/dialogues.py | 2 +- .../skills/tac_negotiation/handlers.py | 2 +- .../fetchai/skills/tac_negotiation/helpers.py | 2 +- .../fetchai/skills/tac_negotiation/skill.yaml | 10 +-- .../skills/tac_negotiation/strategy.py | 2 +- .../skills/tac_negotiation/transactions.py | 2 +- .../skills/tac_participation/behaviours.py | 2 +- .../skills/tac_participation/handlers.py | 2 +- .../skills/tac_participation/skill.yaml | 4 +- .../weather_station/db_communication.py | 2 +- .../fetchai/skills/weather_station/skill.yaml | 2 +- packages/hashes.csv | 80 +++++++++---------- scripts/acn/run_acn_node_standalone.py | 2 +- scripts/generate_ipfs_hashes.py | 4 +- setup.cfg | 3 +- tests/conftest.py | 10 ++- tests/data/generator/t_protocol/dialogues.py | 2 +- tests/data/generator/t_protocol/message.py | 2 +- .../generator/t_protocol/serialization.py | 2 +- .../generator/t_protocol_no_ct/dialogues.py | 2 +- .../generator/t_protocol_no_ct/message.py | 2 +- .../t_protocol_no_ct/serialization.py | 2 +- tests/test_aea.py | 2 +- tests/test_aea_builder.py | 6 +- tests/test_cli/test_add/test_connection.py | 4 +- tests/test_cli/test_add/test_contract.py | 4 +- tests/test_cli/test_add/test_generic.py | 2 +- tests/test_cli/test_add/test_protocol.py | 4 +- tests/test_cli/test_add/test_skill.py | 6 +- tests/test_cli/test_add_key.py | 6 +- tests/test_cli/test_config.py | 2 +- tests/test_cli/test_core.py | 2 +- tests/test_cli/test_create.py | 2 +- tests/test_cli/test_fetch.py | 4 +- tests/test_cli/test_fingerprint.py | 2 +- tests/test_cli/test_freeze.py | 2 +- tests/test_cli/test_generate/test_generate.py | 2 +- .../test_cli/test_generate/test_protocols.py | 2 +- tests/test_cli/test_generate_key.py | 2 +- tests/test_cli/test_generate_wealth.py | 4 +- tests/test_cli/test_get_address.py | 4 +- tests/test_cli/test_get_wealth.py | 4 +- tests/test_cli/test_install.py | 4 +- tests/test_cli/test_interact.py | 2 +- tests/test_cli/test_launch.py | 2 +- tests/test_cli/test_list.py | 4 +- tests/test_cli/test_loggers.py | 2 +- tests/test_cli/test_login.py | 2 +- tests/test_cli/test_logout.py | 2 +- tests/test_cli/test_publish.py | 2 +- tests/test_cli/test_push.py | 2 +- tests/test_cli/test_register.py | 2 +- tests/test_cli/test_registry/test_add.py | 2 +- tests/test_cli/test_registry/test_fetch.py | 2 +- tests/test_cli/test_registry/test_login.py | 2 +- tests/test_cli/test_registry/test_logout.py | 2 +- tests/test_cli/test_registry/test_publish.py | 2 +- tests/test_cli/test_registry/test_push.py | 2 +- .../test_registry/test_registration.py | 2 +- tests/test_cli/test_registry/test_utils.py | 2 +- tests/test_cli/test_remove/test_connection.py | 2 +- tests/test_cli/test_remove/test_contract.py | 2 +- tests/test_cli/test_remove/test_protocol.py | 2 +- .../test_cli/test_remove/test_remove_item.py | 2 +- tests/test_cli/test_remove/test_skill.py | 4 +- tests/test_cli/test_run.py | 4 +- .../test_cli/test_scaffold/test_connection.py | 2 +- tests/test_cli/test_scaffold/test_generic.py | 2 +- .../test_cli/test_scaffold/test_protocols.py | 2 +- tests/test_cli/test_scaffold/test_skills.py | 2 +- tests/test_cli/test_search.py | 4 +- tests/test_cli/test_utils/test_config.py | 2 +- tests/test_cli/test_utils/test_utils.py | 4 +- tests/test_cli_gui/test_create.py | 2 +- tests/test_cli_gui/test_get_items.py | 2 +- tests/test_cli_gui/test_run_agent.py | 2 +- tests/test_cli_gui/test_utils.py | 4 +- tests/test_configurations/test_base.py | 14 ++-- tests/test_configurations/test_schema.py | 12 +-- tests/test_connections/test_stub.py | 4 +- tests/test_crypto/test_fetchai.py | 2 +- tests/test_decision_maker/test_default.py | 2 +- .../programmatic_aea.py | 2 +- .../programmatic_aea.py | 2 +- .../decision_maker_transaction.py | 2 +- tests/test_examples/test_gym_ex.py | 2 +- tests/test_helpers/test_async_utils.py | 4 +- tests/test_helpers/test_base.py | 4 +- tests/test_helpers/test_ipfs/test_base.py | 2 +- tests/test_helpers/test_pipe/test_pipe.py | 4 +- tests/test_helpers/test_search/test_models.py | 2 +- tests/test_launcher.py | 4 +- tests/test_mail/test_base.py | 4 +- tests/test_multiplexer.py | 6 +- .../test_http_client/test_http_client.py | 2 +- .../test_http_server/test_http_server.py | 6 +- .../test_local/test_search_services.py | 2 +- .../test_oef/test_communication.py | 4 +- .../test_p2p_libp2p/test_errors.py | 8 +- .../test_p2p_libp2p/test_public_dht.py | 8 +- .../test_p2p_libp2p_client/test_errors.py | 2 +- .../test_soef/test_soef_integration.py | 2 +- .../test_protocols/test_ml_trade.py | 2 +- .../test_protocols/test_oef_search.py | 2 +- .../test_packages/test_protocols/test_tac.py | 2 +- .../test_protocols/test_dialogue/test_base.py | 2 +- .../test_generator/test_common.py | 2 +- .../test_generator/test_end_to_end.py | 2 +- .../test_extract_specification.py | 4 +- .../test_generator/test_generator.py | 2 +- .../test_generator/test_validate.py | 10 +-- tests/test_registries/test_base.py | 2 +- tests/test_skills/test_base.py | 8 +- tests/test_skills/test_behaviours.py | 2 +- tests/test_skills/test_error.py | 2 +- tests/test_skills/test_tasks.py | 4 +- 276 files changed, 444 insertions(+), 439 deletions(-) diff --git a/aea/aea.py b/aea/aea.py index 882228b277..bb3ff4c5e2 100644 --- a/aea/aea.py +++ b/aea/aea.py @@ -25,7 +25,6 @@ from typing import ( Any, Callable, - cast, Collection, Dict, List, @@ -33,6 +32,7 @@ Sequence, Tuple, Type, + cast, ) from aea.agent import Agent diff --git a/aea/aea_builder.py b/aea/aea_builder.py index ddfe577a6b..f82307effc 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -29,7 +29,6 @@ from pathlib import Path from typing import ( Any, - cast, Collection, Deque, Dict, @@ -39,6 +38,7 @@ Tuple, Type, Union, + cast, ) import jsonschema @@ -49,13 +49,13 @@ from aea.components.base import Component, load_aea_package from aea.components.loader import load_component_from_config from aea.configurations.base import ( + DEFAULT_AEA_CONFIG_FILE, AgentConfig, ComponentConfiguration, ComponentId, ComponentType, ConnectionConfig, ContractConfig, - DEFAULT_AEA_CONFIG_FILE, Dependencies, PackageType, ProtocolConfig, diff --git a/aea/agent_loop.py b/aea/agent_loop.py index 5be8686f4c..cfed6e08fc 100644 --- a/aea/agent_loop.py +++ b/aea/agent_loop.py @@ -32,9 +32,9 @@ from aea.exceptions import AEAException from aea.helpers.async_utils import ( AsyncState, - ensure_loop, HandlerItemGetter, PeriodicCaller, + ensure_loop, ) from aea.helpers.exec_timeout import ExecTimeoutThreadGuard, TimeoutException from aea.helpers.logging import WithLogger diff --git a/aea/cli/config.py b/aea/cli/config.py index 51591d3ae0..a896e4eea0 100644 --- a/aea/cli/config.py +++ b/aea/cli/config.py @@ -19,7 +19,7 @@ """Implementation of the 'aea list' subcommand.""" -from typing import cast, Dict, List +from typing import Dict, List, cast import click diff --git a/aea/cli/create.py b/aea/cli/create.py index 104e6a854d..d11061c2f3 100644 --- a/aea/cli/create.py +++ b/aea/cli/create.py @@ -21,7 +21,7 @@ import os from pathlib import Path -from typing import cast, Optional +from typing import Optional, cast import click @@ -34,9 +34,9 @@ from aea.cli.utils.decorators import clean_after from aea.cli.utils.loggers import logger from aea.configurations.base import ( - AgentConfig, DEFAULT_AEA_CONFIG_FILE, DEFAULT_VERSION, + AgentConfig, ) from aea.configurations.constants import ( DEFAULT_CONNECTION, diff --git a/aea/cli/fetch.py b/aea/cli/fetch.py index 2e7baff1e7..f56b4a70ad 100644 --- a/aea/cli/fetch.py +++ b/aea/cli/fetch.py @@ -21,7 +21,7 @@ import os from distutils.dir_util import copy_tree -from typing import cast, Optional +from typing import Optional, cast import click diff --git a/aea/cli/fingerprint.py b/aea/cli/fingerprint.py index 5909a9bf07..b1d2aade53 100644 --- a/aea/cli/fingerprint.py +++ b/aea/cli/fingerprint.py @@ -19,19 +19,19 @@ """Implementation of the 'aea add' subcommand.""" from pathlib import Path -from typing import cast, Dict +from typing import Dict, cast import click from aea.cli.utils.click_utils import PublicIdParameter from aea.cli.utils.context import Context from aea.configurations.base import ( # noqa: F401 # pylint: disable=unused-import - _compute_fingerprint, - _get_default_configuration_file_name_from_type, DEFAULT_CONNECTION_CONFIG_FILE, DEFAULT_PROTOCOL_CONFIG_FILE, DEFAULT_SKILL_CONFIG_FILE, PublicId, + _compute_fingerprint, + _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader diff --git a/aea/cli/freeze.py b/aea/cli/freeze.py index a537ffba31..6dbae8eca0 100644 --- a/aea/cli/freeze.py +++ b/aea/cli/freeze.py @@ -19,7 +19,7 @@ """Implementation of the 'aea delete' subcommand.""" -from typing import cast, List +from typing import List, cast import click diff --git a/aea/cli/generate_key.py b/aea/cli/generate_key.py index 1825c34665..8173a276ec 100644 --- a/aea/cli/generate_key.py +++ b/aea/cli/generate_key.py @@ -24,7 +24,7 @@ import click -from aea.crypto.helpers import create_private_key, PRIVATE_KEY_PATH_SCHEMA +from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA, create_private_key from aea.crypto.registries import crypto_registry diff --git a/aea/cli/generate_wealth.py b/aea/cli/generate_wealth.py index 1a6c5d9386..c8d346a4a0 100644 --- a/aea/cli/generate_wealth.py +++ b/aea/cli/generate_wealth.py @@ -19,7 +19,7 @@ """Implementation of the 'aea generate_wealth' subcommand.""" -from typing import cast, Dict, Optional +from typing import Dict, Optional, cast import click diff --git a/aea/cli/get_multiaddress.py b/aea/cli/get_multiaddress.py index a76dcbd1ae..3013f5077d 100644 --- a/aea/cli/get_multiaddress.py +++ b/aea/cli/get_multiaddress.py @@ -21,7 +21,7 @@ import re import typing from pathlib import Path -from typing import cast, Optional, Tuple +from typing import Optional, Tuple, cast import click from click import ClickException diff --git a/aea/cli/get_wealth.py b/aea/cli/get_wealth.py index ee5679e2c4..021c48faa1 100644 --- a/aea/cli/get_wealth.py +++ b/aea/cli/get_wealth.py @@ -19,7 +19,7 @@ """Implementation of the 'aea get_wealth' subcommand.""" -from typing import cast, Dict, Optional +from typing import Dict, Optional, cast import click diff --git a/aea/cli/install.py b/aea/cli/install.py index 5295453ef0..88ce64dfd5 100644 --- a/aea/cli/install.py +++ b/aea/cli/install.py @@ -22,7 +22,7 @@ import pprint import subprocess # nosec import sys -from typing import cast, List, Optional +from typing import List, Optional, cast import click diff --git a/aea/cli/interact.py b/aea/cli/interact.py index 19d1976f4d..62cb63b715 100644 --- a/aea/cli/interact.py +++ b/aea/cli/interact.py @@ -29,8 +29,8 @@ from aea.cli.utils.exceptions import InterruptInputException from aea.common import Address from aea.configurations.base import ( - ConnectionConfig, DEFAULT_AEA_CONFIG_FILE, + ConnectionConfig, PackageType, ) from aea.configurations.loader import ConfigLoader diff --git a/aea/cli/launch.py b/aea/cli/launch.py index 734d19cba8..a35458d39b 100644 --- a/aea/cli/launch.py +++ b/aea/cli/launch.py @@ -20,7 +20,7 @@ import sys from collections import OrderedDict from pathlib import Path -from typing import cast, List +from typing import List, cast import click diff --git a/aea/cli/list.py b/aea/cli/list.py index ecd1c82d04..a827e8c821 100644 --- a/aea/cli/list.py +++ b/aea/cli/list.py @@ -30,9 +30,9 @@ from aea.cli.utils.decorators import check_aea_project, pass_ctx from aea.cli.utils.formatting import format_items, retrieve_details, sort_items from aea.configurations.base import ( - _get_default_configuration_file_name_from_type, PackageType, PublicId, + _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader diff --git a/aea/cli/publish.py b/aea/cli/publish.py index 6653fc3161..a6baa68c17 100644 --- a/aea/cli/publish.py +++ b/aea/cli/publish.py @@ -35,7 +35,7 @@ try_get_item_source_path, try_get_item_target_path, ) -from aea.configurations.base import CRUDCollection, DEFAULT_AEA_CONFIG_FILE, PublicId +from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, CRUDCollection, PublicId from aea.configurations.constants import ( DEFAULT_CONNECTION, DEFAULT_PROTOCOL, diff --git a/aea/cli/run.py b/aea/cli/run.py index 146cfff7eb..1d7e9bb160 100644 --- a/aea/cli/run.py +++ b/aea/cli/run.py @@ -20,7 +20,7 @@ """Implementation of the 'aea run' subcommand.""" from pathlib import Path -from typing import cast, List, Optional +from typing import List, Optional, cast import click diff --git a/aea/cli/search.py b/aea/cli/search.py index 02abc70937..4e5513be1b 100644 --- a/aea/cli/search.py +++ b/aea/cli/search.py @@ -21,7 +21,7 @@ import os from pathlib import Path -from typing import cast, Dict, List, Tuple +from typing import Dict, List, Tuple, cast import click diff --git a/aea/cli/utils/config.py b/aea/cli/utils/config.py index 5903954b40..dbdd476209 100644 --- a/aea/cli/utils/config.py +++ b/aea/cli/utils/config.py @@ -38,10 +38,10 @@ from aea.cli.utils.exceptions import AEAConfigException from aea.cli.utils.generic import load_yaml from aea.configurations.base import ( - _get_default_configuration_file_name_from_type, DEFAULT_AEA_CONFIG_FILE, PackageConfiguration, PackageType, + _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader, ConfigLoaders from aea.exceptions import AEAException diff --git a/aea/cli/utils/context.py b/aea/cli/utils/context.py index 85aeb8a4d1..3bdb651525 100644 --- a/aea/cli/utils/context.py +++ b/aea/cli/utils/context.py @@ -20,15 +20,15 @@ """A module with context tools of the aea cli.""" from pathlib import Path -from typing import cast, Dict, List +from typing import Dict, List, cast from aea.cli.utils.loggers import logger from aea.configurations.base import ( - _get_default_configuration_file_name_from_type, AgentConfig, Dependencies, PackageType, PublicId, + _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader diff --git a/aea/cli/utils/decorators.py b/aea/cli/utils/decorators.py index f702a7226b..87fd3cd604 100644 --- a/aea/cli/utils/decorators.py +++ b/aea/cli/utils/decorators.py @@ -23,7 +23,7 @@ import shutil from functools import update_wrapper from pathlib import Path -from typing import Callable, cast, Dict, Union +from typing import Callable, Dict, Union, cast import click from jsonschema import ValidationError @@ -31,11 +31,11 @@ from aea.cli.utils.config import try_to_load_agent_config from aea.cli.utils.context import Context from aea.configurations.base import ( + PackageType, + PublicId, _check_aea_version, _compare_fingerprints, _get_default_configuration_file_name_from_type, - PackageType, - PublicId, ) from aea.configurations.loader import ConfigLoaders from aea.exceptions import AEAException, enforce diff --git a/aea/cli/utils/package_utils.py b/aea/cli/utils/package_utils.py index ab57fcb89b..f6556c34bf 100644 --- a/aea/cli/utils/package_utils.py +++ b/aea/cli/utils/package_utils.py @@ -33,12 +33,12 @@ from aea.cli.utils.context import Context from aea.cli.utils.loggers import logger from aea.configurations.base import ( - _compute_fingerprint, - _get_default_configuration_file_name_from_type, - AgentConfig, DEFAULT_AEA_CONFIG_FILE, + AgentConfig, PackageType, PublicId, + _compute_fingerprint, + _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader from aea.crypto.helpers import verify_or_create_private_keys diff --git a/aea/cli_gui/__init__.py b/aea/cli_gui/__init__.py index 273eba4bf9..0f17a05e87 100644 --- a/aea/cli_gui/__init__.py +++ b/aea/cli_gui/__init__.py @@ -43,10 +43,10 @@ from aea.cli.utils.context import Context from aea.cli.utils.formatting import sort_items from aea.cli_gui.utils import ( + ProcessState, call_aea_async, get_process_status, is_agent_dir, - ProcessState, read_error, read_tty, stop_agent_process, diff --git a/aea/configurations/base.py b/aea/configurations/base.py index ed2b61d0ba..2e3b245828 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -31,7 +31,6 @@ from pathlib import Path from typing import ( Any, - cast, Collection, Dict, Generic, @@ -43,6 +42,7 @@ Type, TypeVar, Union, + cast, ) import packaging diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index f4466bbf35..5c0b51a1a8 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -25,7 +25,7 @@ import re from copy import deepcopy from pathlib import Path -from typing import cast, Dict, Generic, List, TextIO, Tuple, Type, TypeVar, Union +from typing import Dict, Generic, List, TextIO, Tuple, Type, TypeVar, Union, cast import jsonschema import yaml diff --git a/aea/configurations/pypi.py b/aea/configurations/pypi.py index 440d228bac..5dd0bd0953 100644 --- a/aea/configurations/pypi.py +++ b/aea/configurations/pypi.py @@ -21,7 +21,7 @@ """This module contains a checker for PyPI version consistency.""" import operator from collections import defaultdict -from typing import cast, Dict, Set +from typing import Dict, Set, cast from packaging.specifiers import Specifier, SpecifierSet from packaging.version import InvalidVersion, Version diff --git a/aea/connections/base.py b/aea/connections/base.py index d4a7d5e971..767e2267fd 100644 --- a/aea/connections/base.py +++ b/aea/connections/base.py @@ -26,7 +26,7 @@ from contextlib import contextmanager from enum import Enum from pathlib import Path -from typing import cast, Generator, Optional, Set, TYPE_CHECKING +from typing import TYPE_CHECKING, Generator, Optional, Set, cast from aea.components.base import Component, load_aea_package from aea.configurations.base import ComponentType, ConnectionConfig, PublicId diff --git a/aea/connections/stub/connection.py b/aea/connections/stub/connection.py index 155aee920b..7c1310f01c 100644 --- a/aea/connections/stub/connection.py +++ b/aea/connections/stub/connection.py @@ -27,7 +27,7 @@ from concurrent.futures.thread import ThreadPoolExecutor from contextlib import contextmanager from pathlib import Path -from typing import AsyncIterable, IO, List, Optional, Union +from typing import IO, AsyncIterable, List, Optional, Union from aea.configurations.base import PublicId from aea.connections.base import Connection, ConnectionStates diff --git a/aea/connections/stub/connection.yaml b/aea/connections/stub/connection.yaml index cdd0ca8581..05026c3e63 100644 --- a/aea/connections/stub/connection.yaml +++ b/aea/connections/stub/connection.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: __init__.py: QmWwepN9Fy9gHAp39vUGFSLdnB9JZjdyE3STnbowSUhJkC - connection.py: QmYAWVhNoWhJNaCkEh5cMScJ53a1gkfcBNGt9LLxftyUuR + connection.py: QmUQVdzJ1YWiERHmjoy8YuzLUmtcw39weShXtZESfvoAdj readme.md: QmXSAtxSY7C2YkvUxeVnpqCJY9uJYZxZBmuUcE4zjFXcXz fingerprint_ignore_patterns: [] protocols: [] diff --git a/aea/contracts/base.py b/aea/contracts/base.py index d14bc5d4ce..3d2c10f6d8 100644 --- a/aea/contracts/base.py +++ b/aea/contracts/base.py @@ -22,7 +22,7 @@ import logging import re from pathlib import Path -from typing import Any, cast, Dict, Optional +from typing import Any, Dict, Optional, cast from aea.components.base import Component, load_aea_package from aea.configurations.base import ComponentType, ContractConfig, ContractId diff --git a/aea/crypto/ethereum.py b/aea/crypto/ethereum.py index 2055b52eb3..7e05306166 100644 --- a/aea/crypto/ethereum.py +++ b/aea/crypto/ethereum.py @@ -24,7 +24,7 @@ import time import warnings from pathlib import Path -from typing import Any, BinaryIO, cast, Dict, Optional, Tuple, Union +from typing import Any, BinaryIO, Dict, Optional, Tuple, Union, cast import requests from eth_account import Account diff --git a/aea/crypto/fetchai.py b/aea/crypto/fetchai.py index 60d1772b27..2108fa3512 100644 --- a/aea/crypto/fetchai.py +++ b/aea/crypto/fetchai.py @@ -19,7 +19,7 @@ """Fetchai module wrapping the public and private key cryptography and ledger api.""" -from aea.crypto.cosmos import _CosmosApi, CosmosCrypto, CosmosFaucetApi, CosmosHelper +from aea.crypto.cosmos import CosmosCrypto, CosmosFaucetApi, CosmosHelper, _CosmosApi _FETCHAI = "fetchai" _FETCH = "fetch" diff --git a/aea/crypto/helpers.py b/aea/crypto/helpers.py index 53d64a31a9..8d3cb7d905 100644 --- a/aea/crypto/helpers.py +++ b/aea/crypto/helpers.py @@ -23,7 +23,7 @@ import sys from pathlib import Path -from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE, PackageType +from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig, PackageType from aea.configurations.loader import ConfigLoaders from aea.crypto.registries import crypto_registry, make_crypto, make_faucet_api diff --git a/aea/crypto/ledger_apis.py b/aea/crypto/ledger_apis.py index bdf82496f4..c005e3068f 100644 --- a/aea/crypto/ledger_apis.py +++ b/aea/crypto/ledger_apis.py @@ -24,8 +24,8 @@ from aea.common import Address from aea.configurations.constants import DEFAULT_LEDGER from aea.crypto.base import LedgerApi -from aea.crypto.cosmos import CosmosApi from aea.crypto.cosmos import DEFAULT_ADDRESS as COSMOS_DEFAULT_ADDRESS +from aea.crypto.cosmos import CosmosApi from aea.crypto.ethereum import DEFAULT_ADDRESS as ETHEREUM_DEFAULT_ADDRESS from aea.crypto.ethereum import DEFAULT_CHAIN_ID, EthereumApi from aea.crypto.fetchai import DEFAULT_ADDRESS as FETCHAI_DEFAULT_ADDRESS diff --git a/aea/crypto/wallet.py b/aea/crypto/wallet.py index e27863bc22..29a19f1be2 100644 --- a/aea/crypto/wallet.py +++ b/aea/crypto/wallet.py @@ -20,7 +20,7 @@ """Module wrapping all the public and private keys cryptography.""" import logging -from typing import Any, cast, Dict, Optional +from typing import Any, Dict, Optional, cast from aea.crypto.base import Crypto from aea.crypto.registries import make_crypto diff --git a/aea/decision_maker/default.py b/aea/decision_maker/default.py index 9493d0a2e7..4e4fb3feb7 100644 --- a/aea/decision_maker/default.py +++ b/aea/decision_maker/default.py @@ -22,7 +22,7 @@ import copy import logging from enum import Enum -from typing import Any, cast, Dict, List, Optional +from typing import Any, Dict, List, Optional, cast from aea.common import Address from aea.crypto.wallet import Wallet diff --git a/aea/helpers/logging.py b/aea/helpers/logging.py index 58a99ffa6b..8a085528a5 100644 --- a/aea/helpers/logging.py +++ b/aea/helpers/logging.py @@ -19,7 +19,7 @@ """Logging helpers.""" import logging from logging import Logger, LoggerAdapter -from typing import Any, cast, MutableMapping, Optional, Tuple +from typing import Any, MutableMapping, Optional, Tuple, cast class AgentLoggerAdapter(LoggerAdapter): diff --git a/aea/helpers/multiaddr/base.py b/aea/helpers/multiaddr/base.py index 9ad06d76d0..0f477f448e 100644 --- a/aea/helpers/multiaddr/base.py +++ b/aea/helpers/multiaddr/base.py @@ -23,7 +23,7 @@ import base58 import multihash # type: ignore -from ecdsa import curves, keys, VerifyingKey +from ecdsa import VerifyingKey, curves, keys from aea.helpers.multiaddr.crypto_pb2 import KeyType, PublicKey diff --git a/aea/helpers/multiple_executor.py b/aea/helpers/multiple_executor.py index 40a25ce92e..7768c85dde 100644 --- a/aea/helpers/multiple_executor.py +++ b/aea/helpers/multiple_executor.py @@ -30,7 +30,6 @@ from typing import ( Any, Callable, - cast, Dict, Optional, Sequence, @@ -38,6 +37,7 @@ Tuple, Type, Union, + cast, ) logger = logging.getLogger(__name__) diff --git a/aea/helpers/search/models.py b/aea/helpers/search/models.py index 31a045bbfb..02dbe0b686 100644 --- a/aea/helpers/search/models.py +++ b/aea/helpers/search/models.py @@ -25,7 +25,7 @@ from copy import deepcopy from enum import Enum from math import asin, cos, radians, sin, sqrt -from typing import Any, cast, Dict, List, Mapping, Optional, Tuple, Type, Union +from typing import Any, Dict, List, Mapping, Optional, Tuple, Type, Union, cast from aea.exceptions import enforce diff --git a/aea/multiplexer.py b/aea/multiplexer.py index 0b4a75930b..e58db114a6 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -23,7 +23,7 @@ from asyncio.events import AbstractEventLoop from concurrent.futures._base import CancelledError from contextlib import suppress -from typing import Callable, cast, Collection, Dict, List, Optional, Sequence, Tuple +from typing import Callable, Collection, Dict, List, Optional, Sequence, Tuple, cast from aea.configurations.base import PublicId from aea.connections.base import Connection, ConnectionStates diff --git a/aea/protocols/base.py b/aea/protocols/base.py index eed501dca1..a9a9981fe1 100644 --- a/aea/protocols/base.py +++ b/aea/protocols/base.py @@ -26,7 +26,7 @@ from copy import copy from enum import Enum from pathlib import Path -from typing import Any, cast, Dict, Optional, Tuple, Type +from typing import Any, Dict, Optional, Tuple, Type, cast from google.protobuf.struct_pb2 import Struct diff --git a/aea/protocols/default/dialogues.py b/aea/protocols/default/dialogues.py index f984fbf0c5..9ac396bf19 100644 --- a/aea/protocols/default/dialogues.py +++ b/aea/protocols/default/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/aea/protocols/default/message.py b/aea/protocols/default/message.py index cb75fe0eae..547286e375 100644 --- a/aea/protocols/default/message.py +++ b/aea/protocols/default/message.py @@ -20,7 +20,7 @@ """This module contains default's message definition.""" import logging -from typing import cast, Dict, Set, Tuple +from typing import Dict, Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/aea/protocols/default/protocol.yaml b/aea/protocols/default/protocol.yaml index 20626ed573..ff9675da3a 100644 --- a/aea/protocols/default/protocol.yaml +++ b/aea/protocols/default/protocol.yaml @@ -11,9 +11,9 @@ fingerprint: custom_types.py: QmRcgwDdTxkSHyfF9eoMtsb5P5GJDm4oyLq5W6ZBko1MFU default.proto: QmNzMUvXkBm5bbitR5Yi49ADiwNn1FhCvXqSKKoqAPZyXv default_pb2.py: QmSRFi1s3jcqnPuk4yopJeNuC6o58RL7dvEdt85uns3B3N - dialogues.py: QmNi8Zya7ViRnpuqZsLRsj6bqHaXEsxCBqM4rafL5rsL3A - message.py: QmQPpq2HmjWDuWFcVE4VHRswdrUFYkrAwxMSA9SS9jsc5B - serialization.py: Qmc33mPC3sa2EAYvWBGfFVNQJVCWSk6LzCAXHPFKb1TEAZ + dialogues.py: Qmc991snbS7DwFxo1cKcq1rQ2uj7y8ukp14kfe2zve387C + message.py: QmeaadvKib9QqpjZgd7NiDUqGRpC2eZPVpgq1dY3PYacht + serialization.py: QmRF7XPNEk1emKmFMZaYBCF3gr4CdkMXagoSpjQEmnRGG6 fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/aea/protocols/default/serialization.py b/aea/protocols/default/serialization.py index f24928db33..75c046ac6f 100644 --- a/aea/protocols/default/serialization.py +++ b/aea/protocols/default/serialization.py @@ -19,7 +19,7 @@ """Serialization module for default protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from aea.protocols.default import default_pb2 diff --git a/aea/protocols/dialogue/base.py b/aea/protocols/dialogue/base.py index 4ef54b09d3..52b154609b 100644 --- a/aea/protocols/dialogue/base.py +++ b/aea/protocols/dialogue/base.py @@ -30,7 +30,7 @@ from abc import ABC from enum import Enum from inspect import signature -from typing import Callable, cast, Dict, FrozenSet, List, Optional, Set, Tuple, Type +from typing import Callable, Dict, FrozenSet, List, Optional, Set, Tuple, Type, cast from aea.common import Address from aea.exceptions import enforce diff --git a/aea/protocols/generator/base.py b/aea/protocols/generator/base.py index e16c64427b..198a1a0dab 100644 --- a/aea/protocols/generator/base.py +++ b/aea/protocols/generator/base.py @@ -28,19 +28,9 @@ from typing import Optional, Tuple from aea.protocols.generator.common import ( - _camel_case_to_snake_case, - _create_protocol_file, - _get_sub_types_of_compositional_types, - _includes_custom_type, - _python_pt_or_ct_type_to_proto_type, - _to_camel_case, - _union_sub_type_to_protobuf_variable_name, - check_prerequisites, - check_protobuf_using_protoc, CUSTOM_TYPES_DOT_PY_FILE_NAME, DIALOGUE_DOT_PY_FILE_NAME, INIT_FILE_NAME, - load_protocol_specification, MESSAGE_DOT_PY_FILE_NAME, MESSAGE_IMPORT, PATH_TO_PACKAGES, @@ -48,6 +38,16 @@ PYTHON_TYPE_TO_PROTO_TYPE, SERIALIZATION_DOT_PY_FILE_NAME, SERIALIZER_IMPORT, + _camel_case_to_snake_case, + _create_protocol_file, + _get_sub_types_of_compositional_types, + _includes_custom_type, + _python_pt_or_ct_type_to_proto_type, + _to_camel_case, + _union_sub_type_to_protobuf_variable_name, + check_prerequisites, + check_protobuf_using_protoc, + load_protocol_specification, try_run_black_formatting, try_run_protoc, ) diff --git a/aea/protocols/generator/extract_specification.py b/aea/protocols/generator/extract_specification.py index 3946a11e1f..e3f42cf45c 100644 --- a/aea/protocols/generator/extract_specification.py +++ b/aea/protocols/generator/extract_specification.py @@ -19,15 +19,15 @@ """This module extracts a valid protocol specification into pythonic objects.""" import re -from typing import cast, Dict, List +from typing import Dict, List, cast from aea.configurations.base import ( ProtocolSpecification, ProtocolSpecificationParseError, ) from aea.protocols.generator.common import ( - _get_sub_types_of_compositional_types, SPECIFICATION_PRIMITIVE_TYPES, + _get_sub_types_of_compositional_types, ) from aea.protocols.generator.validate import validate diff --git a/aea/protocols/generator/validate.py b/aea/protocols/generator/validate.py index c2610aea43..bae664d719 100644 --- a/aea/protocols/generator/validate.py +++ b/aea/protocols/generator/validate.py @@ -19,14 +19,14 @@ """This module validates a protocol specification.""" import re -from typing import cast, Dict, List, Optional, Set, Tuple +from typing import Dict, List, Optional, Set, Tuple, cast from aea.configurations.base import ProtocolSpecification from aea.protocols.generator.common import ( - _get_sub_types_of_compositional_types, - _has_matched_brackets, SPECIFICATION_COMPOSITIONAL_TYPES, SPECIFICATION_PRIMITIVE_TYPES, + _get_sub_types_of_compositional_types, + _has_matched_brackets, ) # The following names are reserved for standard message fields and cannot be diff --git a/aea/protocols/signing/dialogues.py b/aea/protocols/signing/dialogues.py index 705342f3a5..2602cbb7d9 100644 --- a/aea/protocols/signing/dialogues.py +++ b/aea/protocols/signing/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/aea/protocols/signing/message.py b/aea/protocols/signing/message.py index 6669ad0633..68a46db489 100644 --- a/aea/protocols/signing/message.py +++ b/aea/protocols/signing/message.py @@ -20,7 +20,7 @@ """This module contains signing's message definition.""" import logging -from typing import cast, Set, Tuple +from typing import Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/aea/protocols/signing/protocol.yaml b/aea/protocols/signing/protocol.yaml index c01952688d..0063a35e85 100644 --- a/aea/protocols/signing/protocol.yaml +++ b/aea/protocols/signing/protocol.yaml @@ -9,9 +9,9 @@ fingerprint: README.md: QmSoa5dnxz53GWpWT2VvcRG4asVbzA8JzguiVgwqiLtguM __init__.py: QmcCL3TTdvd8wxYKzf2d3cgKEtY9RzLjPCn4hex4wmb6h6 custom_types.py: Qmc7sAyCQbAaVs5dZf9hFkTrB2BG8VAioWzbyKBAybrQ1J - dialogues.py: QmaURpsd9ERiJ9CRnrfR1o94PGtMXaCb7k1SU2qyDG1q6x - message.py: QmVtRBy5LGTGHXEQSc9Br1gcpA7mqc7VmKCmmFzERiKqEP - serialization.py: QmS7H7WEBTQe4Nzxqz8kc6bXtVKjMzASvCitGdtFc2nyfT + dialogues.py: QmQ1WKs3Dn15oDSwpc4N8hdADLxrn76U4X5SiLAmyGiPPY + message.py: QmRLWAYfjCQmdg2hH8R5R63DKYaDrzuX4dVTFqNHuyjawq + serialization.py: QmbXSvWYfEmYyGdfuTXVJYaJfzqVLtMaLR8H3UCLZkvbSC signing.proto: QmcxyLzqhTE9xstAEzCVH17osbLxmSdALx9njmuPjhjrvZ signing_pb2.py: QmY3Ak5ih5zGvKjeZ5EnzrGX4tMYn5dWpjPArQwFeJpVKu fingerprint_ignore_patterns: [] diff --git a/aea/protocols/signing/serialization.py b/aea/protocols/signing/serialization.py index b36b6c883f..0f103dfde1 100644 --- a/aea/protocols/signing/serialization.py +++ b/aea/protocols/signing/serialization.py @@ -19,7 +19,7 @@ """Serialization module for signing protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from aea.protocols.signing import signing_pb2 diff --git a/aea/protocols/state_update/dialogues.py b/aea/protocols/state_update/dialogues.py index e0f59bb7e8..53b5fdebda 100644 --- a/aea/protocols/state_update/dialogues.py +++ b/aea/protocols/state_update/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/aea/protocols/state_update/message.py b/aea/protocols/state_update/message.py index a96667a6e1..2444c40c0f 100644 --- a/aea/protocols/state_update/message.py +++ b/aea/protocols/state_update/message.py @@ -20,7 +20,7 @@ """This module contains state_update's message definition.""" import logging -from typing import cast, Dict, Set, Tuple +from typing import Dict, Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/aea/protocols/state_update/protocol.yaml b/aea/protocols/state_update/protocol.yaml index 13fa3717f7..4e9d8b1f7c 100644 --- a/aea/protocols/state_update/protocol.yaml +++ b/aea/protocols/state_update/protocol.yaml @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: Qmc12hnCshAE3TL9ba4vo6L8ZZhynyfhEUoStJggRrbimc __init__.py: Qma2opyN54gwTpkVV1E14jjeMmMfoqgE6XMM9LsvGuTdkm - dialogues.py: Qmettr9uNhMjKJTMPwRgkMsJxFscE6GLVMCjJWYxNNqzaq - message.py: QmezFVx1VikTQBGjPWz3yucbqMBs5E9eBufBYaZaQMhkG8 - serialization.py: QmPp8zqaLLa17YCiVu5SyD5We3cLkmsXcPcnwv2UDjDvMX + dialogues.py: Qmd59WgpFccLn1zhpLdwm3zDCmCsjSoQXVn6M7PgFwwkgR + message.py: QmbXbxXbu1vzrCjzDy6qDtEvssmiHKFLWGgCEenrE4TPZW + serialization.py: QmciaNPHkpyxWLYVtBPnYkKHj6Ur9E3CPJ9QvWbXFD91Yw state_update.proto: QmdmEUSa7PDxJ98ZmGE7bLFPmUJv8refgbkHPejw6uDdwD state_update_pb2.py: QmQr5KXhapRv9AnfQe7Xbr5bBqYWp9DEMLjxX8UWmK75Z4 fingerprint_ignore_patterns: [] diff --git a/aea/protocols/state_update/serialization.py b/aea/protocols/state_update/serialization.py index dbb39e82a1..c90504eba9 100644 --- a/aea/protocols/state_update/serialization.py +++ b/aea/protocols/state_update/serialization.py @@ -19,7 +19,7 @@ """Serialization module for state_update protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from aea.protocols.state_update import state_update_pb2 diff --git a/aea/registries/base.py b/aea/registries/base.py index 15f12ea96b..60fce0f86f 100644 --- a/aea/registries/base.py +++ b/aea/registries/base.py @@ -22,7 +22,7 @@ import copy import logging from abc import ABC, abstractmethod -from typing import cast, Dict, Generic, List, Optional, Set, Tuple, TypeVar +from typing import Dict, Generic, List, Optional, Set, Tuple, TypeVar, cast from aea.components.base import Component from aea.configurations.base import ( diff --git a/aea/registries/resources.py b/aea/registries/resources.py index 9126a7e7bc..d136a7678c 100644 --- a/aea/registries/resources.py +++ b/aea/registries/resources.py @@ -19,7 +19,7 @@ """This module contains the resources class.""" from contextlib import suppress -from typing import cast, List, Optional +from typing import List, Optional, cast from aea.components.base import Component from aea.configurations.base import ( diff --git a/aea/runtime.py b/aea/runtime.py index 89ff68c694..d31342075b 100644 --- a/aea/runtime.py +++ b/aea/runtime.py @@ -26,7 +26,7 @@ from asyncio.events import AbstractEventLoop from contextlib import suppress from enum import Enum -from typing import cast, Dict, Optional, Type +from typing import Dict, Optional, Type, cast from aea.abstract_agent import AbstractAgent from aea.agent_loop import AsyncAgentLoop, AsyncState, BaseAgentLoop, SyncAgentLoop diff --git a/aea/skills/base.py b/aea/skills/base.py index 071bfa98b3..1e9fff3d96 100644 --- a/aea/skills/base.py +++ b/aea/skills/base.py @@ -29,7 +29,7 @@ from pathlib import Path from queue import Queue from types import SimpleNamespace -from typing import Any, cast, Dict, Optional, Sequence, Set, Tuple, Type +from typing import Any, Dict, Optional, Sequence, Set, Tuple, Type, cast from aea.common import Address from aea.components.base import Component, load_aea_package diff --git a/aea/skills/tasks.py b/aea/skills/tasks.py index d49f21fc22..6b0350285c 100644 --- a/aea/skills/tasks.py +++ b/aea/skills/tasks.py @@ -23,7 +23,7 @@ import threading from abc import abstractmethod from multiprocessing.pool import AsyncResult, Pool -from typing import Any, Callable, cast, Dict, Optional, Sequence +from typing import Any, Callable, Dict, Optional, Sequence, cast from aea.helpers.logging import WithLogger diff --git a/aea/test_tools/test_cases.py b/aea/test_tools/test_cases.py index b01dd4895d..2c33b3b758 100644 --- a/aea/test_tools/test_cases.py +++ b/aea/test_tools/test_cases.py @@ -39,7 +39,7 @@ import yaml from aea.cli import cli -from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE, PackageType +from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig, PackageType from aea.configurations.constants import DEFAULT_LEDGER, DEFAULT_PRIVATE_KEY_FILE from aea.configurations.loader import ConfigLoader from aea.connections.stub.connection import ( diff --git a/benchmark/checks/check_reactive.py b/benchmark/checks/check_reactive.py index f2bb484ece..6fe47ffc4d 100755 --- a/benchmark/checks/check_reactive.py +++ b/benchmark/checks/check_reactive.py @@ -31,12 +31,12 @@ from aea.skills.base import Handler from benchmark.checks.utils import GeneratorConnection # noqa: I100 from benchmark.checks.utils import ( + SyncedGeneratorConnection, make_agent, make_envelope, make_skill, multi_run, print_results, - SyncedGeneratorConnection, wait_for_condition, ) diff --git a/examples/gym_ex/proxy/env.py b/examples/gym_ex/proxy/env.py index 9c5e4a467d..3992bb0bd2 100755 --- a/examples/gym_ex/proxy/env.py +++ b/examples/gym_ex/proxy/env.py @@ -22,7 +22,7 @@ import time from queue import Queue from threading import Thread -from typing import Any, cast, Optional, Tuple +from typing import Any, Optional, Tuple, cast import gym diff --git a/packages/fetchai/connections/gym/connection.py b/packages/fetchai/connections/gym/connection.py index 6d0d39dd5d..c60f05297d 100644 --- a/packages/fetchai/connections/gym/connection.py +++ b/packages/fetchai/connections/gym/connection.py @@ -24,7 +24,7 @@ from asyncio import CancelledError from asyncio.events import AbstractEventLoop from concurrent.futures.thread import ThreadPoolExecutor -from typing import cast, Optional, Tuple, Union +from typing import Optional, Tuple, Union, cast import gym diff --git a/packages/fetchai/connections/gym/connection.yaml b/packages/fetchai/connections/gym/connection.yaml index e6ef3b80c0..f55d9694b2 100644 --- a/packages/fetchai/connections/gym/connection.yaml +++ b/packages/fetchai/connections/gym/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPUxpn8smGVFexxhUu3Vy3q5xsJukHnYtQzUXyt965bmL __init__.py: QmWwxj1hGGZNteCvRtZxwtY9PuEKsrWsEmMWCKwiYCdvRR - connection.py: QmavgJYnKS9AY9UXyPM3mWZMZ9kCCSPjNAySn33N92kcV7 + connection.py: QmSnGeGf42n8XTqe3jT9SvpLsEaXaEP7ciSSF1p1sNhMbi fingerprint_ignore_patterns: [] protocols: - fetchai/gym:0.6.0 diff --git a/packages/fetchai/connections/http_client/connection.py b/packages/fetchai/connections/http_client/connection.py index 429b4fee2a..8fe29e6ea1 100644 --- a/packages/fetchai/connections/http_client/connection.py +++ b/packages/fetchai/connections/http_client/connection.py @@ -26,7 +26,7 @@ from asyncio.events import AbstractEventLoop from asyncio.tasks import Task from traceback import format_exc -from typing import Any, cast, Optional, Set, Tuple, Union +from typing import Any, Optional, Set, Tuple, Union, cast import aiohttp from aiohttp.client_reqrep import ClientResponse diff --git a/packages/fetchai/connections/http_client/connection.yaml b/packages/fetchai/connections/http_client/connection.yaml index 8a785639c9..19a78aab55 100644 --- a/packages/fetchai/connections/http_client/connection.yaml +++ b/packages/fetchai/connections/http_client/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmXfZJPAh4Ujt3xj8xzd6ng6HbrpJQUuvjWe8DNQSwSKWU __init__.py: QmPdKAks8A6XKAgZiopJzPZYXJumTeUqChd8UorqmLQQPU - connection.py: QmYTSggRJNrtKMkkigLL2eCWTdcRojJagXNjGz3rJ4emrB + connection.py: QmcUNSyeaKRnbWMtZeHnHhz8VUYMZMdUZn6mipmFciDGzH fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/http_server/connection.py b/packages/fetchai/connections/http_server/connection.py index a774a43e03..d922e8a4c1 100644 --- a/packages/fetchai/connections/http_server/connection.py +++ b/packages/fetchai/connections/http_server/connection.py @@ -27,7 +27,7 @@ from asyncio.events import AbstractEventLoop from asyncio.futures import Future from traceback import format_exc -from typing import cast, Dict, Optional, Set +from typing import Dict, Optional, Set, cast from urllib.parse import parse_qs, urlencode, urlparse from aiohttp import web @@ -49,7 +49,7 @@ from aea.common import Address from aea.configurations.base import PublicId from aea.connections.base import Connection, ConnectionStates -from aea.mail.base import Envelope, EnvelopeContext, Message, URI +from aea.mail.base import URI, Envelope, EnvelopeContext, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel from packages.fetchai.protocols.http.dialogues import HttpDialogue diff --git a/packages/fetchai/connections/http_server/connection.yaml b/packages/fetchai/connections/http_server/connection.yaml index b94bf4851f..0bbcde7cf3 100644 --- a/packages/fetchai/connections/http_server/connection.yaml +++ b/packages/fetchai/connections/http_server/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTmQcnUPKaDHHJHngBFXnUVPdgBLanP9DbjVHZT55Scfn __init__.py: Qmb6JEAkJeb5JweqrSGiGoQp1vGXqddjGgb9WMkm2phTgA - connection.py: QmfZHq3FHwXecTAiRohbHLnaFucpD5h7BXqahJmnVDZA2K + connection.py: QmXLqBCHVsQmpTKdDNUB6GJkHVFRipA39uoij8snVExEP4 fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/ledger/base.py b/packages/fetchai/connections/ledger/base.py index 1afb3aa1a8..da1920fd63 100644 --- a/packages/fetchai/connections/ledger/base.py +++ b/packages/fetchai/connections/ledger/base.py @@ -27,7 +27,7 @@ from aea.configurations.base import PublicId from aea.crypto.base import LedgerApi -from aea.crypto.registries import ledger_apis_registry, Registry +from aea.crypto.registries import Registry, ledger_apis_registry from aea.helpers.async_utils import AsyncState from aea.mail.base import Envelope from aea.protocols.base import Message diff --git a/packages/fetchai/connections/ledger/connection.py b/packages/fetchai/connections/ledger/connection.py index 1b153ef6d9..8e0a1a4fdb 100644 --- a/packages/fetchai/connections/ledger/connection.py +++ b/packages/fetchai/connections/ledger/connection.py @@ -21,7 +21,7 @@ import asyncio from asyncio import Task from collections import deque -from typing import cast, Deque, Dict, List, Optional +from typing import Deque, Dict, List, Optional, cast from aea.connections.base import Connection, ConnectionStates from aea.mail.base import Envelope diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index efcfd06f44..c2b54a95fb 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmfQN7UK1M4pBUzKVzPannPLVi8iiULKHNtJ7XpoWpjqfc __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj - base.py: QmXHmxdtk2Bp5RUG7VZb8rTAShtnnePj8rzS2HLEp14xTx - connection.py: QmdpsBY8SeYmxj8ijv7BuRKwjseoNXMX7gRP9ufLPoTFUM - contract_dispatcher.py: QmVaDEyhBFwf48iLYqeEXijpjDbeoNgsptXWFQ3DWSau5K + base.py: Qmec23f5Be6AkNvjwujzrRJExeXkjhD6fPzhRmGiPgwPLC + connection.py: QmaRg6kLFsSERL4gExFfnXTK3ZAj6Kx4nTVcVL4Yh67ECs + contract_dispatcher.py: QmZnytzjMMgJeACQRgVvhH4iijgvvW4nmP7AD6Fz4rAKjr ledger_dispatcher.py: QmRXSuhgHqRgqkTtcBwdvjPd4QRpVuZWfBubgNeQSh9FJJ fingerprint_ignore_patterns: [] protocols: diff --git a/packages/fetchai/connections/ledger/contract_dispatcher.py b/packages/fetchai/connections/ledger/contract_dispatcher.py index 2d0283b132..70e0f19243 100644 --- a/packages/fetchai/connections/ledger/contract_dispatcher.py +++ b/packages/fetchai/connections/ledger/contract_dispatcher.py @@ -19,7 +19,7 @@ """This module contains the implementation of the contract API request dispatcher.""" import inspect -from typing import Callable, cast, Optional +from typing import Callable, Optional, cast from aea.contracts import Contract, contract_registry from aea.crypto.base import LedgerApi diff --git a/packages/fetchai/connections/local/connection.py b/packages/fetchai/connections/local/connection.py index a7da093a2d..7dab288623 100644 --- a/packages/fetchai/connections/local/connection.py +++ b/packages/fetchai/connections/local/connection.py @@ -23,7 +23,7 @@ from asyncio import AbstractEventLoop, Queue from collections import defaultdict from threading import Thread -from typing import cast, Dict, List, Optional, Tuple +from typing import Dict, List, Optional, Tuple, cast from aea.common import Address from aea.configurations.base import ProtocolId, PublicId diff --git a/packages/fetchai/connections/local/connection.yaml b/packages/fetchai/connections/local/connection.yaml index 3fc3e9c37c..e8d3ffba04 100644 --- a/packages/fetchai/connections/local/connection.yaml +++ b/packages/fetchai/connections/local/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmbK7MtyAVqh2LmSh9TY6yBZqfWaAXURP4rQGATyP2hTKC __init__.py: QmeeoX5E38Ecrb1rLdeFyyxReHLrcJoETnBcPbcNWVbiKG - connection.py: QmVEpirVUJ6QYEzpDSdVUhnyPJHZk1WgHofjrRvY24sLYj + connection.py: QmQcok4CvW1WHqyx3pUUgyKjvLYW5PCYEUH7MFYWbpFGuS fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/connections/oef/connection.py b/packages/fetchai/connections/oef/connection.py index a7db37505a..f693018895 100644 --- a/packages/fetchai/connections/oef/connection.py +++ b/packages/fetchai/connections/oef/connection.py @@ -23,7 +23,7 @@ from asyncio import AbstractEventLoop, CancelledError from concurrent.futures.thread import ThreadPoolExecutor from itertools import cycle -from typing import cast, Dict, List, Optional, Set, Type +from typing import Dict, List, Optional, Set, Type, cast import oef from oef.agents import OEFAgent diff --git a/packages/fetchai/connections/oef/connection.yaml b/packages/fetchai/connections/oef/connection.yaml index da80a8b4ee..803272c1f0 100644 --- a/packages/fetchai/connections/oef/connection.yaml +++ b/packages/fetchai/connections/oef/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVHWxThR1u9a4BEm89oCxUTPGnN6PznvNgo6oZLqDD3n5 __init__.py: QmUAen8tmoBHuCerjA3FSGKJRLG6JYyUS3chuWzPxKYzez - connection.py: QmcFn2NMW3U2Fcc2v3N49kDgwxF7Whe1aGW29dkEkmWcfL + connection.py: QmVCcDnoAVFVCGovD8WUdT99BAkkRgsoxGEiizQBw72CT7 object_translator.py: QmfDTqq9kUhWrAJf8SyevzhcKcuYioiLxLQtWhavxbvawS fingerprint_ignore_patterns: [] protocols: diff --git a/packages/fetchai/connections/p2p_libp2p/connection.py b/packages/fetchai/connections/p2p_libp2p/connection.py index 32f51a2063..84627fb356 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.py +++ b/packages/fetchai/connections/p2p_libp2p/connection.py @@ -28,7 +28,7 @@ from asyncio import AbstractEventLoop, CancelledError from pathlib import Path from random import randint -from typing import cast, IO, List, Optional, Sequence +from typing import IO, List, Optional, Sequence, cast from aea.common import Address from aea.configurations.base import PublicId diff --git a/packages/fetchai/connections/p2p_libp2p/connection.yaml b/packages/fetchai/connections/p2p_libp2p/connection.yaml index 89b5831ea6..217db0e2b6 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p/connection.yaml @@ -15,7 +15,7 @@ fingerprint: aea/envelope.proto: QmSC8EGCKiNFR2vf5bSWymSzYDFMipQW9aQVMwPzQoKb4n aea/pipe_unix.go: QmSzbAexrSUSA9ZE6VT6MmcWF5MhEcmceQjAbnfRoK7Ruv aea/pipe_windows.go: QmdYpfjgdgFbA6Pothg65NYM45ubfpZeKr8cVQoqbFzgUK - connection.py: Qma7mVzE8TddKpJeKHEgeyPjxT4vQX8y9uPEtkWwA9tTaf + connection.py: QmPEcaeBAHS7FQE27idXAB5WP9MnSXTxdVr39jdd5zdX5Z dht/dhtclient/dhtclient.go: QmasA3GrgswTnUJoffBzeeqxeT3GjLu6foN6PHJhWNpMMa dht/dhtclient/dhtclient_test.go: QmPfnHSHXtbaW5VYuq1QsKQWey64pUEvLEaKKkT9eAcmws dht/dhtclient/options.go: QmPorj38wNrxGrzsbFe5wwLmiHzxbTJ2VsgvSd8tLDYS8s diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.py b/packages/fetchai/connections/p2p_libp2p_client/connection.py index dce5235c07..0ae1dfa284 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.py +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.py @@ -25,7 +25,7 @@ import struct from asyncio import CancelledError from random import randint -from typing import cast, List, Optional, Union +from typing import List, Optional, Union, cast from aea.configurations.base import PublicId from aea.configurations.constants import DEFAULT_LEDGER diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml index c3eb2fb000..a51a00d00d 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml @@ -10,7 +10,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUp9UrXSqEYeRxrEsGDhGPTjFrwKmuT3bjHJfGrfP8yjk __init__.py: QmT1FEHkPGMHV5oiVEfQHHr25N2qdZxydSNRJabJvYiTgf - connection.py: QmZLM7ihaCnvGurmAXYd2WesDcY5YWyfb6rmZT5qsbxP6w + connection.py: QmeSyMBkN1Y99g7c7j89Ack8NjzSPw5WDbodbwfqLP6ZLT fingerprint_ignore_patterns: [] protocols: [] class_name: P2PLibp2pClientConnection diff --git a/packages/fetchai/connections/p2p_stub/connection.py b/packages/fetchai/connections/p2p_stub/connection.py index a357aa4295..615b2e6f27 100644 --- a/packages/fetchai/connections/p2p_stub/connection.py +++ b/packages/fetchai/connections/p2p_stub/connection.py @@ -21,7 +21,7 @@ import os import tempfile from pathlib import Path -from typing import cast, Union +from typing import Union, cast from aea.configurations.base import ConnectionConfig, PublicId from aea.connections.stub.connection import StubConnection, write_envelope diff --git a/packages/fetchai/connections/p2p_stub/connection.yaml b/packages/fetchai/connections/p2p_stub/connection.yaml index 98120d9535..c64dd5676d 100644 --- a/packages/fetchai/connections/p2p_stub/connection.yaml +++ b/packages/fetchai/connections/p2p_stub/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmbAStnFJj6jMTwqNu7DG9dt2uy5JGrGhKtCbYuAhWLBCk __init__.py: QmW9XFKGsea4u3fupkFMcQutgsjqusCMBMyTcTmLLmQ4tR - connection.py: QmZ9YcefyzbVP45UaFrZcrKNKQQpeAkk45w5T9q2piEfpy + connection.py: QmSd6uheF634ZkHoPe1DtpPeD6Sx6p11rpB8tYELqWZUoS fingerprint_ignore_patterns: [] protocols: [] class_name: P2PStubConnection diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 913fbfbd77..e587160479 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -26,7 +26,7 @@ from concurrent.futures._base import CancelledError as ConcurrentCancelledError from concurrent.futures.thread import ThreadPoolExecutor from contextlib import suppress -from typing import Callable, cast, Dict, List, Optional, Set, Type, Union +from typing import Callable, Dict, List, Optional, Set, Type, Union, cast from urllib import parse from uuid import uuid4 diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index bc37bd232e..0d3a69b6a9 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmWwjETX39APP9RD5oVPeeCiDnUoDvjAcoVe2FK2Jc6anM __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmTf8NU96LvnDdkB88b37Xk8K4cZFb6tj57TNP86ZL1Gyj + connection.py: QmZUiXzv3TTQN3pRSTXv21zDkaTKCpEbQy4WKEysaNz5iq fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/connections/tcp/connection.yaml b/packages/fetchai/connections/tcp/connection.yaml index e3dcc18244..244e25f814 100644 --- a/packages/fetchai/connections/tcp/connection.yaml +++ b/packages/fetchai/connections/tcp/connection.yaml @@ -10,8 +10,8 @@ fingerprint: __init__.py: QmTxAtQ9ffraStxxLAkvmWxyGhoV3jE16Sw6SJ9xzTthLb base.py: QmRu7RYvTQuXvzM8mj8LQ8d3XtaHKLRdnMo7AvX2X76npe connection.py: QmcQnyUagAhE7UsSBxiBSqsuF4mTMdU26LZLhUhdq5QygR - tcp_client.py: QmevCDDRJBJuw8awsn3TYWHbqPJLegjDZdeHFi5ZUwRKDg - tcp_server.py: QmUQwZmu12FeGNpg22Jn4ZFaoP53WpdLfAM18ySfoCyTsj + tcp_client.py: QmZ525Hun84As512AvVM6imBfeF9Rg9Qu9uqySynEJqeda + tcp_server.py: QmVxWqr4Hr5Kumdwi9xE83Pez5aMx64HqgV2NHeRUUka1A fingerprint_ignore_patterns: [] protocols: [] class_name: TCPClientConnection diff --git a/packages/fetchai/connections/tcp/tcp_client.py b/packages/fetchai/connections/tcp/tcp_client.py index 76e0b52122..00ce22f43e 100644 --- a/packages/fetchai/connections/tcp/tcp_client.py +++ b/packages/fetchai/connections/tcp/tcp_client.py @@ -27,7 +27,7 @@ StreamReader, StreamWriter, ) -from typing import cast, Optional +from typing import Optional, cast from aea.configurations.base import ConnectionConfig from aea.mail.base import Envelope diff --git a/packages/fetchai/connections/tcp/tcp_server.py b/packages/fetchai/connections/tcp/tcp_server.py index c04213ef33..8bcdd72ecb 100644 --- a/packages/fetchai/connections/tcp/tcp_server.py +++ b/packages/fetchai/connections/tcp/tcp_server.py @@ -22,7 +22,7 @@ import asyncio import logging from asyncio import AbstractServer, Future, StreamReader, StreamWriter -from typing import cast, Dict, Optional, Tuple +from typing import Dict, Optional, Tuple, cast from aea.common import Address from aea.configurations.base import ConnectionConfig diff --git a/packages/fetchai/connections/webhook/connection.py b/packages/fetchai/connections/webhook/connection.py index 0d4d6e9dc1..15bcf0490c 100644 --- a/packages/fetchai/connections/webhook/connection.py +++ b/packages/fetchai/connections/webhook/connection.py @@ -22,14 +22,14 @@ import json import logging from asyncio import CancelledError -from typing import cast, Optional, Union +from typing import Optional, Union, cast from aiohttp import web # type: ignore from aea.common import Address from aea.configurations.base import PublicId from aea.connections.base import Connection, ConnectionStates -from aea.mail.base import Envelope, EnvelopeContext, URI +from aea.mail.base import URI, Envelope, EnvelopeContext from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogue diff --git a/packages/fetchai/connections/webhook/connection.yaml b/packages/fetchai/connections/webhook/connection.yaml index 68fec4e29a..8486472c9c 100644 --- a/packages/fetchai/connections/webhook/connection.yaml +++ b/packages/fetchai/connections/webhook/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmQDqfKKsksKsUqdqTcYe8P8Fw3MGovVuZBFHPbhupkkxf __init__.py: QmWUKSmXaBgGMvKgdmzKmMjCx43BnrfW6og2n3afNoAALq - connection.py: QmSTcUqdxmFG4N2NPbKRxpTcbChThVryJ6xGhD7DeWwuT5 + connection.py: QmPXKYLQXdv6QryujJ8JXvLqRxAnEPjN2uWoYx3GkhYkac fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/contracts/erc1155/contract.py b/packages/fetchai/contracts/erc1155/contract.py index 950e2331f2..99db581ea3 100644 --- a/packages/fetchai/contracts/erc1155/contract.py +++ b/packages/fetchai/contracts/erc1155/contract.py @@ -22,7 +22,7 @@ import json import logging import random -from typing import Any, cast, Dict, List, Optional +from typing import Any, Dict, List, Optional, cast from vyper.utils import keccak256 diff --git a/packages/fetchai/contracts/erc1155/contract.yaml b/packages/fetchai/contracts/erc1155/contract.yaml index c07b8fde4c..221b26e0c5 100644 --- a/packages/fetchai/contracts/erc1155/contract.yaml +++ b/packages/fetchai/contracts/erc1155/contract.yaml @@ -10,7 +10,7 @@ fingerprint: build/Migrations.json: QmfFYYWoq1L1Ni6YPBWWoRPvCZKBLZ7qzN3UDX537mCeuE build/erc1155.json: Qma5n7au2NDCg1nLwYfYnmFNwWChFuXtu65w5DV7wAZRvw build/erc1155.wasm: Qmc9gthbdwRSywinTHKjRVQdFzrKTxUuLDx2ryNfQp1xqf - contract.py: QmREF1pSQhJduHCWQpn67EtfNuZp93PzJY152tkqq32B7t + contract.py: QmSEfxq6dH53q9qEw3KrtTgUqvyDgCefy59RNpciGGAGi6 contracts/Migrations.sol: QmbW34mYrj3uLteyHf3S46pnp9bnwovtCXHbdBHfzMkSZx contracts/erc1155.vy: QmXwob8G1uX7fDvtuuKW139LALWtQmGw2vvaTRBVAWRxTx migrations/1_initial_migration.js: QmcxaWKQ2yPkQBmnpXmcuxPZQUMuUudmPmX3We8Z9vtAf7 diff --git a/packages/fetchai/protocols/contract_api/dialogues.py b/packages/fetchai/protocols/contract_api/dialogues.py index c27ccea420..3f2ec696b3 100644 --- a/packages/fetchai/protocols/contract_api/dialogues.py +++ b/packages/fetchai/protocols/contract_api/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/protocols/contract_api/message.py b/packages/fetchai/protocols/contract_api/message.py index 1e666fd247..a663637112 100644 --- a/packages/fetchai/protocols/contract_api/message.py +++ b/packages/fetchai/protocols/contract_api/message.py @@ -20,7 +20,7 @@ """This module contains contract_api's message definition.""" import logging -from typing import cast, Optional, Set, Tuple +from typing import Optional, Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/contract_api/protocol.yaml b/packages/fetchai/protocols/contract_api/protocol.yaml index 98d312b0b9..c2c207893f 100644 --- a/packages/fetchai/protocols/contract_api/protocol.yaml +++ b/packages/fetchai/protocols/contract_api/protocol.yaml @@ -11,9 +11,9 @@ fingerprint: contract_api.proto: QmNwngtcYFSuqL8yeTGVXmrHjfebCybdUa9BnTDKXn8odk contract_api_pb2.py: QmVT6Fv53KyFhshNFEo38seHypd7Y62psBaF8NszV8iRHK custom_types.py: QmbLjpiTcGNfvdBsu8pgQH6PK5y6ujdNnZ53JSk1GZDRCA - dialogues.py: QmatXfb83UiHz78oNir1m7BHUCHcjC2vToX5ym5xg2TsqE - message.py: Qmb1jJji5cKaRTZ5pyXfRvgaVJg39519Py1a3o3FM2QEew - serialization.py: QmYxhZxqEFj6yoLuUuHssR4Hv59C72uAUwom3sM6hLtKad + dialogues.py: QmSDg2B75CTZ3y8hyZgEsCMPseu6XFzcB7QX8XtMXJDWbn + message.py: QmUccjMF97WqBZNuDrsYRMofAsfZ2vZFEHnyoiicNuY73K + serialization.py: QmfGrQURxWxrYQMYATbseN3pggTbJbYccy1kXFkqKSrLeK fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/contract_api/serialization.py b/packages/fetchai/protocols/contract_api/serialization.py index 418d551676..718c9d9819 100644 --- a/packages/fetchai/protocols/contract_api/serialization.py +++ b/packages/fetchai/protocols/contract_api/serialization.py @@ -19,7 +19,7 @@ """Serialization module for contract_api protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.contract_api import contract_api_pb2 diff --git a/packages/fetchai/protocols/fipa/dialogues.py b/packages/fetchai/protocols/fipa/dialogues.py index 784d9e51fd..abf8ada492 100644 --- a/packages/fetchai/protocols/fipa/dialogues.py +++ b/packages/fetchai/protocols/fipa/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/protocols/fipa/message.py b/packages/fetchai/protocols/fipa/message.py index 5fc4da7939..3f1648efff 100644 --- a/packages/fetchai/protocols/fipa/message.py +++ b/packages/fetchai/protocols/fipa/message.py @@ -20,7 +20,7 @@ """This module contains fipa's message definition.""" import logging -from typing import cast, Dict, Set, Tuple +from typing import Dict, Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/fipa/protocol.yaml b/packages/fetchai/protocols/fipa/protocol.yaml index 6a112e5fa4..a03513921d 100644 --- a/packages/fetchai/protocols/fipa/protocol.yaml +++ b/packages/fetchai/protocols/fipa/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmRwxwzxfhotek7WUbyAeufBvoHpWbDwfUVMy3FKitiHKy __init__.py: QmZuv8RGegxunYaJ7sHLwj2oLLCFCAGF139b8DxEY68MRT custom_types.py: Qmb7bzEUAW74ZeSFqL7sTccNCjudStV63K4CFNZtibKUHB - dialogues.py: QmXKE9vDi5byW2qUoooE8qbkETJH9DDPHq5qNkG9drfpRU + dialogues.py: QmdGVV1SqzwYo1UwEfpPMAryzCaYTWXUuraYDSe9ZKQXZZ fipa.proto: QmP7JqnuQSQ9BDcKkscrTydKEX4wFBoyFaY1bkzGkamcit fipa_pb2.py: QmZMkefJLrb3zJKoimb6a9tdpxDBhc8rR2ghimqg7gZ471 - message.py: QmUvHvbZnos2VPfa7CibXpddc1wEKwL55zhCnodqPucj1h - serialization.py: QmQiFE2TzLMVM2mcbNHLrF5reydWt4UWuCC8bX3YJyBs5E + message.py: QmPEx8gqKV6Cw1LeakKfC6frVpe225zb3BjyVxqX3bKwQr + serialization.py: QmW8riKb6M5Bso67hp9XRLXUC86hAR5GJEyyQWcqdkbdt5 fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/fipa/serialization.py b/packages/fetchai/protocols/fipa/serialization.py index cc1f44f309..d7875b9181 100644 --- a/packages/fetchai/protocols/fipa/serialization.py +++ b/packages/fetchai/protocols/fipa/serialization.py @@ -19,7 +19,7 @@ """Serialization module for fipa protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.fipa import fipa_pb2 diff --git a/packages/fetchai/protocols/gym/dialogues.py b/packages/fetchai/protocols/gym/dialogues.py index 7bf4fcf0ac..602ba60402 100644 --- a/packages/fetchai/protocols/gym/dialogues.py +++ b/packages/fetchai/protocols/gym/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/protocols/gym/message.py b/packages/fetchai/protocols/gym/message.py index f8217f85b7..ab08207cec 100644 --- a/packages/fetchai/protocols/gym/message.py +++ b/packages/fetchai/protocols/gym/message.py @@ -20,7 +20,7 @@ """This module contains gym's message definition.""" import logging -from typing import cast, Dict, Set, Tuple +from typing import Dict, Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index 511e35da86..6e3c2e1f63 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmTCkz4cEUcwuPZVtvrVr8Np5qn1SMwm6foGSY9Y68DhZT __init__.py: QmWBvruqGuU2BVCq8cuP1S3mgvuC78yrG4TdtSvKhCT8qX custom_types.py: QmT3VKT86xZKR11RR1vQ3myRpmVZNdzY6ELd8HG9U2ngwa - dialogues.py: QmTUPRyUM8d78KYhsecD9KH6FNhJzTQ4ETv8z1SueerDSB + dialogues.py: QmTJLhmqiB1DpoQVQKwo8RRUeoba8h1jVeTm399vgd2t66 gym.proto: QmQGF9Xz4Z93wmhdKoztzxjo5pS4SsAWe2TQdvZCLuzdGC gym_pb2.py: QmSTz7xrL8ryqzR1Sgu1NpR6PmW7GUhBGnN2qYc8m8NCcN - message.py: QmT7dXmEqwPEi4ngZVWRMaYSddDHeemTAcxLdXv67mAJZB - serialization.py: QmQd94GuH1XZ1QZUCzdYT4cRyM5Vy4B3ABEHQNVfeTSNPC + message.py: Qmd9viV8e1SzaTNmKXVjFnsTavNN64JReJRkkQAnpX1A97 + serialization.py: QmZ4aVD25B2jpEPBXzPgPHj9PeyZyh8VwYrb2knJcgXCbE fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/gym/serialization.py b/packages/fetchai/protocols/gym/serialization.py index f2f0aea130..a69428758c 100644 --- a/packages/fetchai/protocols/gym/serialization.py +++ b/packages/fetchai/protocols/gym/serialization.py @@ -19,7 +19,7 @@ """Serialization module for gym protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.gym import gym_pb2 diff --git a/packages/fetchai/protocols/http/dialogues.py b/packages/fetchai/protocols/http/dialogues.py index 40e5c219b9..7d722c6aa8 100644 --- a/packages/fetchai/protocols/http/dialogues.py +++ b/packages/fetchai/protocols/http/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/protocols/http/message.py b/packages/fetchai/protocols/http/message.py index 95e73ffd59..3c4841038a 100644 --- a/packages/fetchai/protocols/http/message.py +++ b/packages/fetchai/protocols/http/message.py @@ -20,7 +20,7 @@ """This module contains http's message definition.""" import logging -from typing import cast, Set, Tuple +from typing import Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/http/protocol.yaml b/packages/fetchai/protocols/http/protocol.yaml index a93a22a670..75bb043685 100644 --- a/packages/fetchai/protocols/http/protocol.yaml +++ b/packages/fetchai/protocols/http/protocol.yaml @@ -8,11 +8,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmY7fxhyNBgwU7uc6LKtCN4aSQ4bym5BwqtwRAfwPokULN __init__.py: QmRWie4QPiFJE8nK4fFJ6prqoG3u36cPo7st5JUZAGpVWv - dialogues.py: QmbLrJoAwsdDMuZkFnkbDSH2xJ1JZjmwUn7BfzGcEw9VvE + dialogues.py: Qmf69mXWZQU1jaPAKqdyFujgp2LmXu37RJYqzvgYttPfDS http.proto: QmdTUTvvxGxMxSTB67AXjMUSDLdsxBYiSuJNVxHuLKB1jS http_pb2.py: QmYYKqdwiueq54EveL9WXn216FXLSQ6XGJJHoiJxwJjzHC - message.py: QmZ54hhAZXbj5K1eJ23GDhkGVbsG76hnDfon9qG8Pm3dB7 - serialization.py: Qmbx7TrAXy4TCJzxM2fMWfKod7Bgx51FMYU9eVGYBcbP11 + message.py: QmYSmd2xLU8TsLLorxxNnaHj1cVLztgrKtQnaqJ1USFkPY + serialization.py: QmUdYL9PqDEbbjLaotxMSNEoVnEAdvFewffw2CV5SgG7sp fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/http/serialization.py b/packages/fetchai/protocols/http/serialization.py index 16f4dbaf9b..896249bc9b 100644 --- a/packages/fetchai/protocols/http/serialization.py +++ b/packages/fetchai/protocols/http/serialization.py @@ -19,7 +19,7 @@ """Serialization module for http protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.http import http_pb2 diff --git a/packages/fetchai/protocols/ledger_api/dialogues.py b/packages/fetchai/protocols/ledger_api/dialogues.py index 6c3cc92ad2..a1e375a13f 100644 --- a/packages/fetchai/protocols/ledger_api/dialogues.py +++ b/packages/fetchai/protocols/ledger_api/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/protocols/ledger_api/message.py b/packages/fetchai/protocols/ledger_api/message.py index 790c2f58be..e38a9e002d 100644 --- a/packages/fetchai/protocols/ledger_api/message.py +++ b/packages/fetchai/protocols/ledger_api/message.py @@ -20,7 +20,7 @@ """This module contains ledger_api's message definition.""" import logging -from typing import cast, Optional, Set, Tuple +from typing import Optional, Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/ledger_api/protocol.yaml b/packages/fetchai/protocols/ledger_api/protocol.yaml index 6c92685ba9..eb615a0b21 100644 --- a/packages/fetchai/protocols/ledger_api/protocol.yaml +++ b/packages/fetchai/protocols/ledger_api/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmSoo6ds8mKhtoG8CBbu9rb9yj7sqeeuBfcU7CLj584uRX __init__.py: Qmct8jVx6ndWwaa5HXJAJgMraVuZ8kMeyx6rnEeHAYHwDJ custom_types.py: QmQJnWQvtj1D9zqGWM3XrpNtZPmzr4rLgKxoG1MzM5udNA - dialogues.py: QmVJLujzpu7Zm6i4Mqw6Yf4g2sjJbmdT5FqV8KURqjLvg8 + dialogues.py: QmVCWMYaVVhtAoJVfzdpBz3bhGvXZH3XEY3KqbFGhwRx6b ledger_api.proto: QmfLcv7jJcGJ1gAdCMqsyxJcRud7RaTWteSXHL5NvGuViP ledger_api_pb2.py: QmQhM848REJTDKDoiqxkTniChW8bNNm66EtwMRkvVdbMry - message.py: QmYXnMm4fbHyk88qn6VdqfMerZA3R6Xs48LrYRwTr7ghD5 - serialization.py: QmV4F4vqvjHcVt5axZKC9cpCbmtQdQeixKK7KdC6MVKbFH + message.py: QmSoC4Vt4CFWGbZB6rsXn7jLho3CiuvHTTEnKS2RBRg1LZ + serialization.py: QmWnjRaZBpUtErSTGGR6uQmatXy1xcbfhSvsFzYKjRNzM5 fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/ledger_api/serialization.py b/packages/fetchai/protocols/ledger_api/serialization.py index 86f0c9077a..60171b5576 100644 --- a/packages/fetchai/protocols/ledger_api/serialization.py +++ b/packages/fetchai/protocols/ledger_api/serialization.py @@ -19,7 +19,7 @@ """Serialization module for ledger_api protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.ledger_api import ledger_api_pb2 diff --git a/packages/fetchai/protocols/ml_trade/dialogues.py b/packages/fetchai/protocols/ml_trade/dialogues.py index c9a992a235..ac734a9f4e 100644 --- a/packages/fetchai/protocols/ml_trade/dialogues.py +++ b/packages/fetchai/protocols/ml_trade/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/protocols/ml_trade/message.py b/packages/fetchai/protocols/ml_trade/message.py index 2e1b2124e2..f3b96e6949 100644 --- a/packages/fetchai/protocols/ml_trade/message.py +++ b/packages/fetchai/protocols/ml_trade/message.py @@ -20,7 +20,7 @@ """This module contains ml_trade's message definition.""" import logging -from typing import cast, Set, Tuple +from typing import Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/ml_trade/protocol.yaml b/packages/fetchai/protocols/ml_trade/protocol.yaml index ce091dcef8..b57c75503b 100644 --- a/packages/fetchai/protocols/ml_trade/protocol.yaml +++ b/packages/fetchai/protocols/ml_trade/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmSRtzACMh3x3LSjYqWXWTpYpE4C7G8EHbW4zQQoMFFZ4K __init__.py: QmXZMVdsBXUJxLZvwwhWBx58xfxMSyoGxdYp5Aeqmzqhzt custom_types.py: QmeWvNKuezFxfmLYaxKhP9XffeiFFCwH1qowyiJacLAHpF - dialogues.py: QmWywRmmJYXD4TRkPJeDa5ntueK4DPJ6L9sKgM5wuq98wT - message.py: QmeFb86N5UxzQQhJyXFnJKSqgKymVu1wEyCrhaUaCn2K1f + dialogues.py: QmVqaAXZrVvw3Djyi7BgpJCSBtoSmBeDEYFtD7k3y45vu1 + message.py: QmQWqj74tHy16CgnMYYWa8tTSChmjquGNtYtnLkzMdDLEH ml_trade.proto: QmeB21MQduEGQCrtiYZQzPpRqHL4CWEkvvcaKZ9GsfE8f6 ml_trade_pb2.py: QmZVvugPysR1og6kWCJkvo3af2s9pQRHfuj4BptE7gU1EU - serialization.py: QmVGjPRVK7sm82F9XYgT1giVcpQ1X5fEu9ydwvgRP63vZV + serialization.py: QmQCjiTWXmvrfFjsLUwuSBVujRq7zihL1nkcdhQkweakDy fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/ml_trade/serialization.py b/packages/fetchai/protocols/ml_trade/serialization.py index 635f63eb63..faf1ae5665 100644 --- a/packages/fetchai/protocols/ml_trade/serialization.py +++ b/packages/fetchai/protocols/ml_trade/serialization.py @@ -19,7 +19,7 @@ """Serialization module for ml_trade protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.ml_trade import ml_trade_pb2 diff --git a/packages/fetchai/protocols/oef_search/dialogues.py b/packages/fetchai/protocols/oef_search/dialogues.py index 82e4b1c5d1..1a29699488 100644 --- a/packages/fetchai/protocols/oef_search/dialogues.py +++ b/packages/fetchai/protocols/oef_search/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/protocols/oef_search/message.py b/packages/fetchai/protocols/oef_search/message.py index c8281c00af..acff1547b6 100644 --- a/packages/fetchai/protocols/oef_search/message.py +++ b/packages/fetchai/protocols/oef_search/message.py @@ -20,7 +20,7 @@ """This module contains oef_search's message definition.""" import logging -from typing import cast, Set, Tuple +from typing import Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/oef_search/protocol.yaml b/packages/fetchai/protocols/oef_search/protocol.yaml index b035e7433a..c29691d3c0 100644 --- a/packages/fetchai/protocols/oef_search/protocol.yaml +++ b/packages/fetchai/protocols/oef_search/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmaGSTqxvQFKccBnLovhBbfSH3C3Sorrj7kFyZqW9qptLa __init__.py: QmRvTtynKcd7shmzgf8aZdcA5witjNL5cL2a7WPgscp7wq custom_types.py: QmPSAWKkH7R8XCfPUCRmuEqVxCnp8L5PTUq4DBt59AzFUC - dialogues.py: QmZ9AMyHu4pPFHBiE239AWQT8haVK74JFWPVjtd2kPc9ej - message.py: QmdUz4aHSwo1xAtpJuNusakJAz4cU1XdLzKo9bwuL5QLfq + dialogues.py: QmYE5MGfXV2aQEUr3pAMKsuP9ywzWtLEkrDBu7zA25ms3U + message.py: QmXSb2g2Dfeu629wXUZ4WzhrGwWaTNmu28P1hihUnEViVL oef_search.proto: QmNU8WsxT6XNFFneKKeDaZkNn3CEFDfZQkmKv9TyhyxzDB oef_search_pb2.py: QmSAFT1xxYRzJU6h1aFVDuYcx672sZ2vzV6c2ico7f4BLK - serialization.py: QmaVfY1Q5EpkQhoHMip45efayT4a6iPxknTNuMQKGyTf4S + serialization.py: QmSH58UnNGcGTFqEcsokB58CRVEfHtiMskTFtrams8f5CH fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/oef_search/serialization.py b/packages/fetchai/protocols/oef_search/serialization.py index e81792a4c3..15895850df 100644 --- a/packages/fetchai/protocols/oef_search/serialization.py +++ b/packages/fetchai/protocols/oef_search/serialization.py @@ -19,7 +19,7 @@ """Serialization module for oef_search protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.oef_search import oef_search_pb2 diff --git a/packages/fetchai/protocols/tac/dialogues.py b/packages/fetchai/protocols/tac/dialogues.py index b388b9209b..3fd6363ac1 100644 --- a/packages/fetchai/protocols/tac/dialogues.py +++ b/packages/fetchai/protocols/tac/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/protocols/tac/message.py b/packages/fetchai/protocols/tac/message.py index 81c321a38a..9ceb13b045 100644 --- a/packages/fetchai/protocols/tac/message.py +++ b/packages/fetchai/protocols/tac/message.py @@ -20,7 +20,7 @@ """This module contains tac's message definition.""" import logging -from typing import cast, Dict, Optional, Set, Tuple +from typing import Dict, Optional, Set, Tuple, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/protocols/tac/protocol.yaml b/packages/fetchai/protocols/tac/protocol.yaml index 5ff8fe1708..a78d53b0ef 100644 --- a/packages/fetchai/protocols/tac/protocol.yaml +++ b/packages/fetchai/protocols/tac/protocol.yaml @@ -10,9 +10,9 @@ fingerprint: README.md: QmVhm6VBbggxjTe3PEhCBfTomWekNa5buYy3sY7YYN6Er6 __init__.py: QmZYdAjm3o44drRiY3MT4RtG2fFLxtaL8h898DmjoJwJzV custom_types.py: QmXyAhpkE6sLExGgf2GxBv8gRYTDZu7XCDsa2m4rwvQrmp - dialogues.py: QmSZMt9rRFasAkziB3ZtUvLKSpF7dKPRenqUXNtEuBqPhF - message.py: QmWDvBFPBk6cy2Auso4VGxZFrn4K4jqgTtCRLJazmoYx9H - serialization.py: QmZqeRNTVTTpFp7ymKgeKaGj7zHMCHD6KBAe9v1LLJJXyS + dialogues.py: QmQNMQ6J85Jp59vZXRuKZtyh4MessMCxjs75C5EC3TfJbA + message.py: Qme5qTFZr7vTc76rbUwrYuRZNQKuxqHdVdP4pPk3m16Q4S + serialization.py: QmV2haMtVTKaeqZrXriZuzL2TAcNQ245AqYFsGBJzuibx7 tac.proto: QmdpPZNhUW593qVNVoSTWZgd9R69bmBbw6Y9xjzYpvuDvV tac_pb2.py: QmUwW3kixKwD2o1RRdq4NoNoihPb5BXKKRngWXztq32fea fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/protocols/tac/serialization.py b/packages/fetchai/protocols/tac/serialization.py index fabcb1e28d..6f12536758 100644 --- a/packages/fetchai/protocols/tac/serialization.py +++ b/packages/fetchai/protocols/tac/serialization.py @@ -19,7 +19,7 @@ """Serialization module for tac protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from packages.fetchai.protocols.tac import tac_pb2 diff --git a/packages/fetchai/skills/aries_alice/behaviours.py b/packages/fetchai/skills/aries_alice/behaviours.py index 18ede1fb58..52b8c53e2e 100644 --- a/packages/fetchai/skills/aries_alice/behaviours.py +++ b/packages/fetchai/skills/aries_alice/behaviours.py @@ -20,7 +20,7 @@ """This package contains the behaviour of a generic seller AEA.""" import json -from typing import cast, Dict +from typing import Dict, cast from aea.mail.base import EnvelopeContext from aea.skills.behaviours import TickerBehaviour @@ -34,8 +34,8 @@ OefSearchDialogues, ) from packages.fetchai.skills.aries_alice.strategy import ( - AliceStrategy, HTTP_COUNTERPARTY, + AliceStrategy, ) DEFAULT_SERVICES_INTERVAL = 60.0 diff --git a/packages/fetchai/skills/aries_alice/handlers.py b/packages/fetchai/skills/aries_alice/handlers.py index 5eb646663c..59bc2ef6fa 100644 --- a/packages/fetchai/skills/aries_alice/handlers.py +++ b/packages/fetchai/skills/aries_alice/handlers.py @@ -22,7 +22,7 @@ import base64 import binascii import json -from typing import cast, Dict, Optional +from typing import Dict, Optional, cast from urllib.parse import urlparse from aea.configurations.base import ProtocolId diff --git a/packages/fetchai/skills/aries_alice/skill.yaml b/packages/fetchai/skills/aries_alice/skill.yaml index a9bf82b529..d8ccc8de1f 100644 --- a/packages/fetchai/skills/aries_alice/skill.yaml +++ b/packages/fetchai/skills/aries_alice/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmfS1ezD77No8WQkvrkPs4oSXHFbULRxatGzRhMbSMntSx __init__.py: Qma8qSTU34ADKWskBwQKQLGNpe3xDKNgjNQ6Q4MxUnKa3Q - behaviours.py: QmPQ87aRJ4KHAq29ghNPioA7YH36Pz5XbRhQsW4EPh63J6 + behaviours.py: QmaFXL8xKh4vL5qXtQq8nyQXBAGJXEnMY5crL3CBoSjTuW dialogues.py: QmQwremVUhyXMcoPQEvc4yJaUUDBx9ZYmDUCUHZwwux9Gc - handlers.py: QmQg1WLMNdgKmaBphEwdVeXcK9nq7VxkY4QPhT2A4y4ZZp + handlers.py: Qmc4cdzhZPxQsc8FzZXq1P4KfFNX78yPA5LVmEKfVP46Xa strategy.py: QmZ2jhWFQZipk6wAquS1gWxX94iAmhN9Vrh7tcPU9bgpzF fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/aries_faber/behaviours.py b/packages/fetchai/skills/aries_faber/behaviours.py index 3c030933b9..9a4f57c62d 100644 --- a/packages/fetchai/skills/aries_faber/behaviours.py +++ b/packages/fetchai/skills/aries_faber/behaviours.py @@ -20,7 +20,7 @@ """This package contains the behaviour for the aries_faber skill.""" import json -from typing import cast, Dict +from typing import Dict, cast from aea.skills.behaviours import TickerBehaviour from packages.fetchai.protocols.http.message import HttpMessage @@ -30,8 +30,8 @@ OefSearchDialogues, ) from packages.fetchai.skills.aries_faber.strategy import ( - FaberStrategy, HTTP_COUNTERPARTY, + FaberStrategy, ) DEFAULT_SEARCH_INTERVAL = 5.0 diff --git a/packages/fetchai/skills/aries_faber/handlers.py b/packages/fetchai/skills/aries_faber/handlers.py index 66630ded93..c792a3fa51 100644 --- a/packages/fetchai/skills/aries_faber/handlers.py +++ b/packages/fetchai/skills/aries_faber/handlers.py @@ -21,7 +21,7 @@ import json import random -from typing import cast, Dict, Optional +from typing import Dict, Optional, cast from aea.configurations.base import ProtocolId from aea.mail.base import EnvelopeContext @@ -46,8 +46,8 @@ ADMIN_COMMAND_SCEHMAS, ADMIN_COMMAND_STATUS, FABER_ACA_IDENTITY, - FaberStrategy, LEDGER_COMMAND_REGISTER_DID, + FaberStrategy, ) SUPPORT_REVOCATION = False diff --git a/packages/fetchai/skills/aries_faber/skill.yaml b/packages/fetchai/skills/aries_faber/skill.yaml index a2254a2537..37e0837dba 100644 --- a/packages/fetchai/skills/aries_faber/skill.yaml +++ b/packages/fetchai/skills/aries_faber/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdkSNCYx5dNGDAAveapQgoyM7Y7iYeQzR7KN2Sso3CJG4 __init__.py: QmNPVQ6UajvJodqTLWbLvQZkKCfrNn1nYPrQXai3xdj6F7 - behaviours.py: QmfKXbGwvhnNSCDmEjt9z8YjD98gReD7v5MDeDbaPkgLMt + behaviours.py: QmUodVZv8uBeDLCiWnQpRoRGT5oEUauhrSoZdMx1VxGFaU dialogues.py: QmPHqMtprNxvA6VTAi7ZRbLfFNy4pDPUcu9T6sM37wxMyQ - handlers.py: QmYD7CvETEoMmk5sb1rbBSK1sUzbtg3MLDLrVetMsn8quA + handlers.py: QmTDWYft3unkJhhQZGKcEHdyw8LuZPHuCLbFrUg9PHe1Fh strategy.py: QmcUmddp6CUP31Bfckt6EkV3n2VZcJrUagoGBaTDBMTdXR fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/erc1155_client/handlers.py b/packages/fetchai/skills/erc1155_client/handlers.py index ea5ebffbe7..283f1311c1 100644 --- a/packages/fetchai/skills/erc1155_client/handlers.py +++ b/packages/fetchai/skills/erc1155_client/handlers.py @@ -19,7 +19,7 @@ """This package contains handlers for the erc1155-client skill.""" -from typing import cast, Optional +from typing import Optional, cast from aea.configurations.base import ProtocolId from aea.helpers.transaction.base import RawMessage, Terms diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index eb0e11c443..7b624d2b71 100644 --- a/packages/fetchai/skills/erc1155_client/skill.yaml +++ b/packages/fetchai/skills/erc1155_client/skill.yaml @@ -11,7 +11,7 @@ fingerprint: __init__.py: QmRXXJsv5bfvb7qsyxQtVzXwn6PMLJKkbm6kg4DNkT1NtW behaviours.py: QmT1c2JxQf92Em8ohu4qMSmBtebgmW7Gm6ZAK5ifFT2bQS dialogues.py: QmUM3rDDQALcgfKsX7gGpT7sP1DVXsneS6XbqVANaW4Xfh - handlers.py: QmVpnbEiVX1P8E49mbMAtGGMpDD5CA7W7CipEwryubUH8N + handlers.py: Qme7hDcANLpsUcJAm74eLRRzHTDKbBNUxt5sbMmUnE75sr strategy.py: QmNg87LgfLPoPyokFrmvrNghQD7JkWehRNAdRNyB3YogeN fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/erc1155_deploy/handlers.py b/packages/fetchai/skills/erc1155_deploy/handlers.py index 0ce403de5a..5db033feb3 100644 --- a/packages/fetchai/skills/erc1155_deploy/handlers.py +++ b/packages/fetchai/skills/erc1155_deploy/handlers.py @@ -19,7 +19,7 @@ """This package contains the handlers of the erc1155 deploy skill AEA.""" -from typing import cast, Optional +from typing import Optional, cast from aea.configurations.base import ProtocolId from aea.crypto.ethereum import EthereumHelper diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index cacb0033d1..ea1b113692 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -11,7 +11,7 @@ fingerprint: __init__.py: Qmbm3ZtGpfdvvzqykfRqbaReAK9a16mcyK7qweSfeN5pq1 behaviours.py: QmNf5NGKdNaffwFHHyNPv1FMocJ9YbnvU1zKFaYJoUEexA dialogues.py: QmdHxieCCQjSbEf1U1vekKUK86EVu64Hw2HFKWrC9hK5q6 - handlers.py: QmYYvptHAuprPXDjpYGPrGpn4Qp7cioFK3anGK9JBeGMXY + handlers.py: QmR9hFdRrtGyXeijkWH31KXyE835x3CiNXPh6cy1hthv1A strategy.py: QmcmUTRZk4BDm9DyowWm9NT1UzDe6rjQhgyongibSPh3hc fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/generic_buyer/handlers.py b/packages/fetchai/skills/generic_buyer/handlers.py index f521639e09..89eb62d5d2 100644 --- a/packages/fetchai/skills/generic_buyer/handlers.py +++ b/packages/fetchai/skills/generic_buyer/handlers.py @@ -20,7 +20,7 @@ """This package contains handlers for the generic buyer skill.""" import pprint -from typing import cast, Optional +from typing import Optional, cast from aea.configurations.base import ProtocolId from aea.protocols.base import Message diff --git a/packages/fetchai/skills/generic_buyer/skill.yaml b/packages/fetchai/skills/generic_buyer/skill.yaml index c0ca469e65..09725cf577 100644 --- a/packages/fetchai/skills/generic_buyer/skill.yaml +++ b/packages/fetchai/skills/generic_buyer/skill.yaml @@ -10,7 +10,7 @@ fingerprint: __init__.py: QmaEDrNJBeHCJpbdFckRUhLSBqCXQ6umdipTMpYhqSKxSG behaviours.py: QmX2CDEtaNMeP8iSRafRiYcso7rcEYgSZpn6UV3JgFbAio dialogues.py: QmUmPdxtaXK783i63ZB2nvHctHg9sZqRVgP6P7rnsG2V9s - handlers.py: QmU3yFr2XiaBtYEZV6uh9LdjaDi52LHo8e9u5xKfpYUKiQ + handlers.py: QmNo8CT3ev8m25ePhAaRJaqo1BcprpK5kvUYjARoPHnJia strategy.py: Qmb2T99WnQQa4qyZSdu31QyrbtHy8ZWC6Jhv9sVrTYrFxE fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/generic_seller/handlers.py b/packages/fetchai/skills/generic_seller/handlers.py index 8f47a5ee73..2b39a677b0 100644 --- a/packages/fetchai/skills/generic_seller/handlers.py +++ b/packages/fetchai/skills/generic_seller/handlers.py @@ -19,7 +19,7 @@ """This package contains the handlers of a generic seller AEA.""" -from typing import cast, Optional +from typing import Optional, cast from aea.configurations.base import ProtocolId from aea.crypto.ledger_apis import LedgerApis diff --git a/packages/fetchai/skills/generic_seller/skill.yaml b/packages/fetchai/skills/generic_seller/skill.yaml index 528326461c..6397a8f591 100644 --- a/packages/fetchai/skills/generic_seller/skill.yaml +++ b/packages/fetchai/skills/generic_seller/skill.yaml @@ -11,7 +11,7 @@ fingerprint: __init__.py: QmbfkeFnZVKppLEHpBrTXUXBwg2dpPABJWSLND8Lf1cmpG behaviours.py: QmdsS8wmLyxTZc4FdUri4ojRG1nMbasSHC4u6i1AfTQH1V dialogues.py: QmZuFnZKndhsrUZrqjGpYHBzPFAZZbVdzGt6FLXvSi8AdS - handlers.py: QmXtsQEM8MoKL9jSTrARKnrFwDawFc6nQGK4Ba8VBN9S6i + handlers.py: QmeHRB72xVXoWCUd58SQ3q4vnzMZzrGjodWSyKGCyeYTwp strategy.py: QmX1mp7eZkz1P6iVyoDCATZDKZRgwe1EgMVmAyvtGDHvm3 fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/gym/helpers.py b/packages/fetchai/skills/gym/helpers.py index b95a0ebb65..073aabd4ce 100644 --- a/packages/fetchai/skills/gym/helpers.py +++ b/packages/fetchai/skills/gym/helpers.py @@ -22,7 +22,7 @@ from abc import ABC, abstractmethod from queue import Queue -from typing import Any, cast, Optional, Tuple +from typing import Any, Optional, Tuple, cast import gym diff --git a/packages/fetchai/skills/gym/skill.yaml b/packages/fetchai/skills/gym/skill.yaml index c7889c40ab..c44d7e4065 100644 --- a/packages/fetchai/skills/gym/skill.yaml +++ b/packages/fetchai/skills/gym/skill.yaml @@ -10,9 +10,9 @@ fingerprint: __init__.py: QmTf1GCgHxu7qq4HvUNYiBwuGEL1DcsHQuWH7N7TB5TtoC dialogues.py: QmQik8PG4xfuvbDwxocfRHygLHDbHkeqxHEGToAM2EooQz handlers.py: QmbqpPWc3N6MFSpJq2DaPcu78mJG3S9iJuJBuPproSnXHf - helpers.py: Qmc7pKqwSagUXCeT4cTP3Ed2Ji6Lc18Xa42Vs8XCGX6dcT + helpers.py: Qmf48TPcPXxZDVRjFtcJAHAbNJu1qGn8Hju1T1sqnwcL9C rl_agent.py: QmUq3XY9Dd2XZBhNNK9J3S5937d3az4cwP1BmeieHSgJ3m - tasks.py: QmR4zfFktphJrF23feYbeYHczpBRsTAW8icoeTvG19SkjC + tasks.py: QmR6XMqp4uwHyZ4MgJWdgmcUHjk92jWkRjskknZ1Zjji6i fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/gym/tasks.py b/packages/fetchai/skills/gym/tasks.py index f7a725eedb..e10ecf1f7d 100644 --- a/packages/fetchai/skills/gym/tasks.py +++ b/packages/fetchai/skills/gym/tasks.py @@ -25,7 +25,7 @@ from aea.skills.base import SkillContext from aea.skills.tasks import Task from packages.fetchai.skills.gym.helpers import ProxyEnv -from packages.fetchai.skills.gym.rl_agent import DEFAULT_NB_STEPS, MyRLAgent, NB_GOODS +from packages.fetchai.skills.gym.rl_agent import DEFAULT_NB_STEPS, NB_GOODS, MyRLAgent class GymTask(Task): diff --git a/packages/fetchai/skills/ml_data_provider/handlers.py b/packages/fetchai/skills/ml_data_provider/handlers.py index 02359293ce..7ba97e3d7a 100644 --- a/packages/fetchai/skills/ml_data_provider/handlers.py +++ b/packages/fetchai/skills/ml_data_provider/handlers.py @@ -20,7 +20,7 @@ """This module contains the handler for the 'ml_data_provider' skill.""" import pickle # nosec -from typing import cast, Optional +from typing import Optional, cast from aea.configurations.base import ProtocolId from aea.protocols.base import Message diff --git a/packages/fetchai/skills/ml_data_provider/skill.yaml b/packages/fetchai/skills/ml_data_provider/skill.yaml index e94c28834e..61e6dee039 100644 --- a/packages/fetchai/skills/ml_data_provider/skill.yaml +++ b/packages/fetchai/skills/ml_data_provider/skill.yaml @@ -11,7 +11,7 @@ fingerprint: __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ behaviours.py: QmWC4PEwWEyqcEJ9rTFjL9YpZ1pgkSpY9f4pE9mQHviSLz dialogues.py: QmRsg5xMC3QqHK2p2ULDkdcUECiX3YLPwbqfXdWZ3PewhD - handlers.py: QmXk3mCd2uB6mg2aT74jTSLkktY3FntL5cMs5yQ7Mi8uAF + handlers.py: QmePX9rXfypdNaqWfNZb2sXrSTuxwRGR2o3nXSw9yQSo1d strategy.py: QmUsa36TcE6DXjdDDz1u1tAPVPHaJyMnVCTxudJhVCyA3e fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/ml_train/handlers.py b/packages/fetchai/skills/ml_train/handlers.py index fd7a0d16c9..63dcc7451b 100644 --- a/packages/fetchai/skills/ml_train/handlers.py +++ b/packages/fetchai/skills/ml_train/handlers.py @@ -21,7 +21,7 @@ import pickle # nosec import uuid -from typing import cast, Optional +from typing import Optional, cast from aea.configurations.base import ProtocolId from aea.helpers.transaction.base import Terms diff --git a/packages/fetchai/skills/ml_train/skill.yaml b/packages/fetchai/skills/ml_train/skill.yaml index 5af8adcaa2..a1d228f6d9 100644 --- a/packages/fetchai/skills/ml_train/skill.yaml +++ b/packages/fetchai/skills/ml_train/skill.yaml @@ -11,7 +11,7 @@ fingerprint: __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ behaviours.py: QmbJtAxgudXA35gERW14gMnCA9q79iRNQmKfgTTY9e2Bif dialogues.py: Qma7uAuHWEdohLKMxGXHk34tRqXaS3FjFpyWCxpWtwRwEK - handlers.py: QmY2rbcg4agZYuTX5zfLEnpSFAfqqWHsW1hFFw4o58xk5A + handlers.py: QmRUQUVmcV3W8aCL3LEP3ZPx2aENMNbZe5EvS5vRBnK2RF ml_model.py: QmXp667GwVRrGsLxtqricnnyrBUUDn6efem22UCBd2g1y8 model.json: QmdV2tGrRY6VQ5VLgUa4yqAhPDG6X8tYsWecypq8nox9Td strategy.py: QmY8z1DW6PqQuiEpgXAhwasSk1CgvvTNZQH1LtExupif9g diff --git a/packages/fetchai/skills/simple_service_registration/handlers.py b/packages/fetchai/skills/simple_service_registration/handlers.py index 83dcbdd9be..4693d7622a 100644 --- a/packages/fetchai/skills/simple_service_registration/handlers.py +++ b/packages/fetchai/skills/simple_service_registration/handlers.py @@ -19,7 +19,7 @@ """This package contains the handlers of a generic seller AEA.""" -from typing import cast, Optional +from typing import Optional, cast from aea.configurations.base import ProtocolId from aea.protocols.base import Message diff --git a/packages/fetchai/skills/simple_service_registration/skill.yaml b/packages/fetchai/skills/simple_service_registration/skill.yaml index 770186f6c6..6c2dad4ef6 100644 --- a/packages/fetchai/skills/simple_service_registration/skill.yaml +++ b/packages/fetchai/skills/simple_service_registration/skill.yaml @@ -10,7 +10,7 @@ fingerprint: __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta behaviours.py: QmREzo2bxMA9h84utHze1BFptT2MgiSMkfiSydbynthRna dialogues.py: QmRMZk46s3AJ9KUbgP4fMP39qGX1YPsvJAJqmaFanMtZiV - handlers.py: QmTg94BbYLoAe3PUu7ZynGKe1MSw8bBCVr6PKGekjJBiQg + handlers.py: QmVGi8jXkCCJmxkpiwoAiWK1WNTYM4zYcJL4Vid6w7ekX3 strategy.py: QmNTZ6XXAv6nvJs7B1p5mt7bVdH4pb3motxADDrxCpbmWF fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/tac_control/behaviours.py b/packages/fetchai/skills/tac_control/behaviours.py index fe8cd33e43..c396a06557 100644 --- a/packages/fetchai/skills/tac_control/behaviours.py +++ b/packages/fetchai/skills/tac_control/behaviours.py @@ -20,7 +20,7 @@ """This package contains a the behaviours.""" import datetime -from typing import cast, Optional +from typing import Optional, cast from aea.helpers.search.models import Description from aea.skills.base import Behaviour diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index 55335b6ab8..e03ab5e810 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -23,7 +23,7 @@ import datetime import pprint from enum import Enum -from typing import cast, Dict, List, Optional +from typing import Dict, List, Optional, cast from aea.common import Address from aea.crypto.ledger_apis import LedgerApis diff --git a/packages/fetchai/skills/tac_control/handlers.py b/packages/fetchai/skills/tac_control/handlers.py index 382f3941b8..d5e422b0e7 100644 --- a/packages/fetchai/skills/tac_control/handlers.py +++ b/packages/fetchai/skills/tac_control/handlers.py @@ -19,7 +19,7 @@ """This package contains the handlers.""" -from typing import cast, Optional +from typing import Optional, cast from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage diff --git a/packages/fetchai/skills/tac_control/helpers.py b/packages/fetchai/skills/tac_control/helpers.py index a214c7f16d..fbe56fa922 100644 --- a/packages/fetchai/skills/tac_control/helpers.py +++ b/packages/fetchai/skills/tac_control/helpers.py @@ -22,7 +22,7 @@ import math import random -from typing import cast, Dict, List, Tuple +from typing import Dict, List, Tuple, cast import numpy as np diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index 1876fe4347..e29fa64d42 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -9,11 +9,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdWECpRXZXH5JPV6wVHqeUtvjBhieUFTEoT2e7EY16N8M __init__.py: Qme9YfgfPXymvupw1EHMJWGUSMTT6JQZxk2qaeKE76pgyN - behaviours.py: QmPMdhZh9Uzx5zy7qxQGqFanaC9h8SwNRkW94r8fD3DECG + behaviours.py: QmVUdw95id6YWhAxQU79iGdmt3P3C4PthPsDZL6x3M7kV6 dialogues.py: QmVSNY2MaKJ1JKfbt39qJ2CJz1dMhPNFefS6Nn2Ld2WqNA - game.py: QmRrKBB2ithuHbytNWZiW9gq9TA9xkjN7bdFwpd9pZS7Pa - handlers.py: QmfQBa9NLVkcAUhQaY8grMB7yiAARgjoADP7pjVaegcBtt - helpers.py: QmZyaDLh8rAZ7LTbGCRgnQ8zMA4cqzCQjweBwd9MWL7t2t + game.py: QmWrQC1i2dPsDEzS1bjd6KiDCFSRCAgdiMrrrLgfsKMU49 + handlers.py: QmX2N2Nr8DsCQuXxuGhxh89tUAzChTjx8yWtUof8UMQmQM + helpers.py: QmdG31YUJakBz8FdNNxU6RxqhWy9iv1BG253PzfxBhzqq2 parameters.py: QmQB95beEKzyA8Aa7Y9HTPw6BPEVi6BGkpsUqN4QZ4DcVG fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index cd9d91cb0c..5486b259b7 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -20,7 +20,7 @@ """This package contains the behaviours.""" import datetime -from typing import cast, List, Optional +from typing import List, Optional, cast from aea.crypto.base import LedgerApi from aea.helpers.search.models import Attribute, DataModel, Description diff --git a/packages/fetchai/skills/tac_control_contract/game.py b/packages/fetchai/skills/tac_control_contract/game.py index 737e710999..f32e503911 100644 --- a/packages/fetchai/skills/tac_control_contract/game.py +++ b/packages/fetchai/skills/tac_control_contract/game.py @@ -23,7 +23,7 @@ import datetime import pprint from enum import Enum -from typing import cast, Dict, List, Optional +from typing import Dict, List, Optional, cast from aea.common import Address from aea.exceptions import AEAEnforceError, enforce diff --git a/packages/fetchai/skills/tac_control_contract/helpers.py b/packages/fetchai/skills/tac_control_contract/helpers.py index 8fa7c3720b..db746cd1cc 100644 --- a/packages/fetchai/skills/tac_control_contract/helpers.py +++ b/packages/fetchai/skills/tac_control_contract/helpers.py @@ -21,7 +21,7 @@ """This module contains the helpers methods for the controller agent.""" import random -from typing import cast, Dict, List, Tuple +from typing import Dict, List, Tuple, cast import numpy as np diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 34978934be..956895937c 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmV6mToyVnQL9squVJntDPrHvtxFk7sfEYJ61Fyoiy9wsE __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmPNHEtFZ98SkPYGs6LbX5VwKM2xoAoZ6CLbopmTidYuJk - game.py: QmcY99fhKGAQZqDdic3iATmWEM6oMSwpHdH5MeBFmXiX9u + behaviours.py: QmUmKgFhFmrGtCCJNjZggZiu9JotKNqmUfpShAYM2oKsSj + game.py: QmRYzPv29VZbxDKTBqi8Y3Z1iLjwdNhgG6rGuYNYLTw4Z5 handlers.py: QmR2kWAiBB99TrJxpue4JpC8J8aewadg5FSMa6V2YS28Ws - helpers.py: QmS2zGCt2afonTTpNCPm2R74uUS834bpHFUnXFFnuZ1i8C + helpers.py: QmREf3hRufKHwQq6Hr4YFdBWp53Vy8WWo89R4pKRyjX4Bs parameters.py: QmRU9gxsWcxy25g69jbrKve2f8kFxNBjFfRjPZNKsYoYCP fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/tac_negotiation/dialogues.py b/packages/fetchai/skills/tac_negotiation/dialogues.py index 514e81d095..0833070d31 100644 --- a/packages/fetchai/skills/tac_negotiation/dialogues.py +++ b/packages/fetchai/skills/tac_negotiation/dialogues.py @@ -23,7 +23,7 @@ - Dialogues: The dialogues class keeps track of all dialogues. """ -from typing import cast, Optional, Type +from typing import Optional, Type, cast from aea.common import Address from aea.exceptions import enforce diff --git a/packages/fetchai/skills/tac_negotiation/handlers.py b/packages/fetchai/skills/tac_negotiation/handlers.py index 392518aef9..ce4d4a5724 100644 --- a/packages/fetchai/skills/tac_negotiation/handlers.py +++ b/packages/fetchai/skills/tac_negotiation/handlers.py @@ -21,7 +21,7 @@ import pprint import time -from typing import cast, Optional, Tuple +from typing import Optional, Tuple, cast from aea.configurations.base import ProtocolId from aea.helpers.search.models import Query diff --git a/packages/fetchai/skills/tac_negotiation/helpers.py b/packages/fetchai/skills/tac_negotiation/helpers.py index a12267b109..9e965f377f 100644 --- a/packages/fetchai/skills/tac_negotiation/helpers.py +++ b/packages/fetchai/skills/tac_negotiation/helpers.py @@ -20,7 +20,7 @@ """This class contains the helpers for FIPA negotiation.""" import copy -from typing import cast, Dict, List, Union +from typing import Dict, List, Union, cast from aea.helpers.search.models import ( Attribute, diff --git a/packages/fetchai/skills/tac_negotiation/skill.yaml b/packages/fetchai/skills/tac_negotiation/skill.yaml index f8cb6f1d92..60d3ecf09d 100644 --- a/packages/fetchai/skills/tac_negotiation/skill.yaml +++ b/packages/fetchai/skills/tac_negotiation/skill.yaml @@ -10,11 +10,11 @@ fingerprint: README.md: QmZucue4N3TX7BPe9CDZybfMQc1zpYbRKEVXAUGYRpcUfD __init__.py: QmcgZLvHebdfocqBmbu6gJp35khs6nbdbC649jzUyS86wy behaviours.py: QmPnCqPr6c3vqCt2x5rZ9tHZ9hD8mGA4F2fNDTXo1fxfmR - dialogues.py: QmaqBNTf4pMscFp7VRG7s4Ca7TjFQCBcnRD3WLkEJRX4Ah - handlers.py: QmeCNBScErhiWXH7zubEDf7RRWcAZH9NJH1jRxwHjtCqXr - helpers.py: QmTQBUUNbubMc7NkYkVtePL6WCQsGdvmqPFUeSxf2VLAqN - strategy.py: QmYrM2HoKVQXWpjYxtWeZZxjCjiingJ6PJKkmegh3Eiwfg - transactions.py: QmUd1PzECqMtVNrhwDMGfLa7zAfnLhtQoNjugSYYfuSSTN + dialogues.py: QmUZgPaShiApdbrf98x45k6JwYtsLdzJJw8JuMqCqrsHov + handlers.py: QmNbMa9A6D7G95cRwc2zsP1uVymmwpt1QXqz5ccfwcTQcZ + helpers.py: QmfRnfpeCtHMEXSH3q3ofWhoSc7pbpRrSFSBVStUK3JWt3 + strategy.py: QmPG7sCfCk6ozaBSmPPYeexe9Y1zq5fsg383Z5k8RbBDqg + transactions.py: QmdpNcQTG45V8JtrpHgYPMdWanwnF22vBkmAELJdT1AYgt fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/tac_negotiation/strategy.py b/packages/fetchai/skills/tac_negotiation/strategy.py index 13313f9c47..1272be1de2 100644 --- a/packages/fetchai/skills/tac_negotiation/strategy.py +++ b/packages/fetchai/skills/tac_negotiation/strategy.py @@ -22,7 +22,7 @@ import copy import random from enum import Enum -from typing import cast, Dict, List, Optional, Tuple +from typing import Dict, List, Optional, Tuple, cast from aea.decision_maker.default import OwnershipState, Preferences from aea.helpers.search.generic import ( diff --git a/packages/fetchai/skills/tac_negotiation/transactions.py b/packages/fetchai/skills/tac_negotiation/transactions.py index b2a6a0d6a7..91521f5e12 100644 --- a/packages/fetchai/skills/tac_negotiation/transactions.py +++ b/packages/fetchai/skills/tac_negotiation/transactions.py @@ -22,7 +22,7 @@ import copy import datetime from collections import defaultdict, deque -from typing import cast, Deque, Dict, List, Tuple +from typing import Deque, Dict, List, Tuple, cast from aea.common import Address from aea.decision_maker.default import OwnershipState diff --git a/packages/fetchai/skills/tac_participation/behaviours.py b/packages/fetchai/skills/tac_participation/behaviours.py index 1c7d907c7c..f6a70e244c 100644 --- a/packages/fetchai/skills/tac_participation/behaviours.py +++ b/packages/fetchai/skills/tac_participation/behaviours.py @@ -19,7 +19,7 @@ """This package contains a tac search behaviour.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.mail.base import EnvelopeContext from aea.skills.behaviours import TickerBehaviour diff --git a/packages/fetchai/skills/tac_participation/handlers.py b/packages/fetchai/skills/tac_participation/handlers.py index 897b2725ed..c17a27da8e 100644 --- a/packages/fetchai/skills/tac_participation/handlers.py +++ b/packages/fetchai/skills/tac_participation/handlers.py @@ -19,7 +19,7 @@ """This package contains the handlers.""" -from typing import cast, Dict, Optional, Tuple +from typing import Dict, Optional, Tuple, cast from aea.common import Address from aea.protocols.base import Message diff --git a/packages/fetchai/skills/tac_participation/skill.yaml b/packages/fetchai/skills/tac_participation/skill.yaml index 41e519c743..53e9be94f9 100644 --- a/packages/fetchai/skills/tac_participation/skill.yaml +++ b/packages/fetchai/skills/tac_participation/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVNxdGy1pbosYrrvbXczbkJtU7f5ddrBPSNnFoJA9GJzg __init__.py: QmcVpVrbV54Aogmowu6AomDiVMrVMo9BUvwKt9V1bJpBwp - behaviours.py: QmREapjgiTGH3JsTqeJbR2CcCjRa3jnRdeNVVNUaU8mhRX + behaviours.py: QmW3uvkUtkknF7gMFoqbXZWpVcoS274tk7jXouzLTCtdmU dialogues.py: QmNZvomWQBx8p8Ftkgg55Pw44P8RedKTKtFULh9Qb8AJLY game.py: QmUotRmam5EqL2YWAwPR9i1uWHNeBsphcDJwB59ZiLFKSw - handlers.py: QmZqqEiXBjs77DS7GnE8f7tSF9uDoVyVZ7HNMV1uW1wtDX + handlers.py: QmcmPDJrmyiMFSf9neCDczvn6RuJN4XfhtxdABR9GjnTWm fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/weather_station/db_communication.py b/packages/fetchai/skills/weather_station/db_communication.py index e601c7e380..9cd37018b3 100644 --- a/packages/fetchai/skills/weather_station/db_communication.py +++ b/packages/fetchai/skills/weather_station/db_communication.py @@ -22,7 +22,7 @@ import datetime import os.path import sqlite3 -from typing import cast, Dict +from typing import Dict, cast my_path = os.path.dirname(__file__) diff --git a/packages/fetchai/skills/weather_station/skill.yaml b/packages/fetchai/skills/weather_station/skill.yaml index fb62e1bba9..f6ec6e5f55 100644 --- a/packages/fetchai/skills/weather_station/skill.yaml +++ b/packages/fetchai/skills/weather_station/skill.yaml @@ -10,7 +10,7 @@ fingerprint: README.md: Qma72715sXAgDLggNNVkXQoVxCu9hyEEFKbyWTKSavEF2v __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta behaviours.py: QmWRboujPwBEJNHqXJcyNbbVvdGiJ2mabvjXS6td3YDb2Q - db_communication.py: QmNWfTjZirbmCnx5K75fZLA19gsunt34aicvZniLCmZKxB + db_communication.py: QmPHjQJvYp96TRUWxTRW9TE9BHATNuUyMw3wy5oQSftnug dialogues.py: QmeYs1FYc1Ud4yXULoyf1nSqornVx2dczFCJbF1BwM2gzD dummy_weather_station_data.py: QmeSSsAiCKBfMHfUN4QvoKBTQRNCcGxeJicThkDTGRQE7i handlers.py: QmeWzG6R8P7z98M2kfXKzmK5u9vT6ZAp2tG7NcXTwWFSaZ diff --git a/packages/hashes.csv b/packages/hashes.csv index f487ca55cb..dc13684148 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -18,55 +18,55 @@ fetchai/agents/thermometer_aea,QmZzUqFVaDNGfwPnq5EvfPKNoMSfGzgpBic2z8HHWfu1RE fetchai/agents/thermometer_client,QmfMjh5gCDrdipCDYYrAr7jRDXJ2CpfWFij9t6J4EKdXYT fetchai/agents/weather_client,QmXyXQHxeJyBFSXLU2GZnV49t17iwnNLWWpUEFqMTAb8AE fetchai/agents/weather_station,QmW4kSbF5eKuh4itMJ8xKonaPejutaMp2GyobcN7V4zJR8 -fetchai/connections/gym,QmRjx3wvjadxBqZKptWHwTBwkAQBcPeq89g2ikEq7ozmDX -fetchai/connections/http_client,QmajyVnAQoG58R5HiWfFdBfvLwmGaXKGinH7r1NYjfCDWJ -fetchai/connections/http_server,QmXi4BRRxsCf817q72d9QpfwmcdfnHwxKttFF8zH6uWhr5 -fetchai/connections/ledger,QmZmv1G5NK3MYnA4z4JU66f8Yn1c7UAA92UdJet5a7UcjF -fetchai/connections/local,QmcPGZtD76x3RdsJZmUpSzgU7Nvy9hMvFH9GY3hqAVP4Ci -fetchai/connections/oef,Qmbu8UptZnquusUSYA3Yqo1zuvtNsYNEZte7gHNLr5JVoa -fetchai/connections/p2p_libp2p,QmQCf8etp59MDck1ZmciGGQvhP2SkfceNYoHZBcs7KrBgB -fetchai/connections/p2p_libp2p_client,Qmc4LTENH1b6MoeVN7UAKtxe3UU8Y5Pj5G9ojdZsbQTvVL -fetchai/connections/p2p_stub,QmNNstioPgSoQJbvf5NkPNViZE9udnnN6GRxWdLVxrKBA7 +fetchai/connections/gym,QmYpTqreykMfC8iTuoFK3EbjkfgLKBk39aYcvWamGQTrCQ +fetchai/connections/http_client,QmTyfu8TTAQBcecg2CeJZRm9wFqhsi9VtRuFYpU5hEwEoX +fetchai/connections/http_server,QmduD27PwFbYEo5BZ6fTERfPyNVrG7i8XN7QGcwCTHbXjN +fetchai/connections/ledger,QmRUJPXzU2rqykAkNWt4BudP87ryzGdzqt5jJj4q3Gb7HM +fetchai/connections/local,Qmadp2J7U59MvJaPZeytGhqhtLqL4AZghNZLki2YTdLUA1 +fetchai/connections/oef,QmPCrbZ2tdbzLQNkPDJnArwgPqtH6caGdqdfyFSjdcL6R7 +fetchai/connections/p2p_libp2p,QmVXSnhCn37mgacK7iG1HENbEkSvSZMMaf9RTFCUUDa2C9 +fetchai/connections/p2p_libp2p_client,QmVEwABjAPTZcA4BaAgn8BnzUCpHQbSzc4pJ6mdR4bW222 +fetchai/connections/p2p_stub,QmX8EWvFok3UAdqXGgir4TrhfDj2kLhfjuXRg82b6G6XtW fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmbEnyTJoZWDkwQNV2XJw8v6z6fz3gvuyxxay7YJhoHAxE -fetchai/connections/stub,QmU1fuqRkzBufaHTB9qY7GSUkkh4Wq1M6ru6FQKnrcEoUZ -fetchai/connections/tcp,QmS9dWyHZUY4pZEzMVJ3mZs42fBkAQFtLxWq3VXkzbueLY -fetchai/connections/webhook,QmVMNFuX88Fj68hm2WhwfuhPLi1TMnLYNA31asN6HLCW3g -fetchai/contracts/erc1155,Qmf7sDBb6kf3ru18NHjC7irB31vFDEJe8D8UtqYRN3cYrw +fetchai/connections/soef,QmPawrdmAJLQU4jqyEx592HsJaSAHqgEDhmbmmuVz9LnVn +fetchai/connections/stub,QmaxLLkfgUZL4s1r2yP5mbZqV4g1dmLLoA4uEApgPyR3aE +fetchai/connections/tcp,QmeFxgyyEnHUkAxuSHSYvFQLxKgWdV7xob6QvZnCHo9AdX +fetchai/connections/webhook,Qmb3EN5NhFavVZT6rvDzhxdANx6dSo2K95MsJ8owpYDDSD +fetchai/contracts/erc1155,QmUupRwnza2KZBGULZ62xQREtkuQbYUrt1W8NbYZJuqbNt fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 -fetchai/protocols/contract_api,Qme5e9KAzdcKhzzLWzFFqzbYB1EebghS4BY3gtPvPhqHVd -fetchai/protocols/default,QmPo3UzUagCMq4xvWjcECDWdYqur9uzabsug1WRsaAmKFR -fetchai/protocols/fipa,QmbtJuAbuKVuYuXXW7v9VGiK2StSQEVBzLZjSQBftdkgzg -fetchai/protocols/gym,QmXHiPkic2umXCYo5479rQNndSgYSA5xbxZhYugv1D8vC7 -fetchai/protocols/http,Qmbb7kpNdXtRAxnuqh6GULxpb9c3Pu6YckPRVERgSAL4aW -fetchai/protocols/ledger_api,QmYnU11zKVE9LzEVS9H6Tst7cqcuwZDKpgNSAeG26o7ggU -fetchai/protocols/ml_trade,QmShijhkQYbzabZWNUenabn2tqsu3cRFGx42dHReKdn3mA -fetchai/protocols/oef_search,QmQarQdcwwtAo382A4xQKxvExZuUiHnFzrREHT4ZoVGoyv +fetchai/protocols/contract_api,QmbHbjNcYaZ4LDpP5L1qNUu82aKCdGa8MNX9e2wanMsGc5 +fetchai/protocols/default,QmZ4y4M1zZ3j2BAvLKHf1Grf5twcsmSamdgc2zmkBdv254 +fetchai/protocols/fipa,QmYJhzwFtZp5FRZx3jkeiLT2NZTUhNa6dHM9CJ1JXBiEsY +fetchai/protocols/gym,Qmc5UvXeWtGz4aVytmgaB1WGNMsVkutgNGqn57PmXXCRLs +fetchai/protocols/http,QmXEczv6AR7bHoM8CQ55xd31iopWc6wFoR1Kc59xMzb9wP +fetchai/protocols/ledger_api,Qmbr8jpkgjvRXefeCyTFvnb6WZAvQPDsmzoZk6t3AXcyRR +fetchai/protocols/ml_trade,QmSXQbbGihThLyp8djf2PccrzbCBWVymW4uBvCi4pDxB2P +fetchai/protocols/oef_search,QmSrtCZ7JUvxKXzUq3svJiQBLSaQVyhH9MJRnbZm9TWNhD fetchai/protocols/scaffold,QmXJb2kxe228AqQ2iHRiKJnhhKsC9zU8pqNdojLNXqjUvz -fetchai/protocols/signing,QmWm7ThNZFND7ZuWQ7CLkJN6vGjAxauiF7LBLxBTKKstJZ -fetchai/protocols/state_update,QmciKjpSjjd1E34iT8xT2XznCqChU4s6NnCqHfpNALftRQ -fetchai/protocols/tac,QmeyUr7iHGb1mHrM8qiR5uJqHbVpPTP4ryT2ww5piCH8HD -fetchai/skills/aries_alice,QmTLZP3j8xdqWnxCAbWEehZXh4ksPztJYtktb8a6SNA1vj -fetchai/skills/aries_faber,QmfN448ztvQgLN9FTK3pHaRs8nZNCC5pdar5Tut5BCydio +fetchai/protocols/signing,QmYTfrqGX7exRtafwm9wHGzHZB1FziuZdYMVT1ad3fnKYR +fetchai/protocols/state_update,QmejF6NFSBgfa1KTNkBCw4oZGrTnXHvwYXxayHKGLV4PtW +fetchai/protocols/tac,QmcyYPtULaU15VMyfRqwDHCn7g4czUoe9ipcUSBAVqLTFc +fetchai/skills/aries_alice,Qmf2PV9D6WZjjuQ1eqL7S1DKVYc9Ea6wJDNEAD3zxEUpLU +fetchai/skills/aries_faber,QmXBksccX6fBcemjr6gL4KBAfExeoBNKyVK4tJscPk1dsp fetchai/skills/carpark_client,QmPYHXP1TvNihMa6WFSLP1NhiFDKTiArZbStQ6v54ySa8j fetchai/skills/carpark_detection,QmetEJmLHLWCPRyYByvrJ48fjM42sg91fqBfzZukmUth6b fetchai/skills/echo,QmPjabbvqPfabWhyE3vYCtTpPLJgYd4ZQBBsKsSJ5bLbeb -fetchai/skills/erc1155_client,QmeQoL6WgcpMW8NUahWo8E4gcBP6iMoJqAisVNm7LLJZLv -fetchai/skills/erc1155_deploy,QmTjV8pqyFSsj2Ci2tuJ5RmQz1CVFEQTs7kdPYdsiNXe2g +fetchai/skills/erc1155_client,QmeH3ZaMQt4iMz7B8p9mwtbetyt9Gy42rrkXLuk6LpQz69 +fetchai/skills/erc1155_deploy,QmT6UivEs5DbqfkbeRZYr1mF3WYiyUrp2hucLMMXWBwj3r fetchai/skills/error,QmanfpyCmvUkqG9xsEyWULvi1ZZzqvggvs9LnQvSjuRhLb -fetchai/skills/generic_buyer,QmP1iGjhcwor2k9dW6bfYY2xufitdUMBWDiSts4bMTL2u8 -fetchai/skills/generic_seller,QmT6sWte67JD5zkhvki1R6ZfynsvCNPwurbiXtrA6oNtDE -fetchai/skills/gym,QmdSqhucusGCGzAwDqfRg6rVu86sGNiBTj1rueRbfTXUNU +fetchai/skills/generic_buyer,QmUKHWVoBDWJVymwj5PHqkEXjRGkJBoPrV2capmftA717a +fetchai/skills/generic_seller,QmTJabpuQKLfC9t8mGjswKgpU8wGazNsvZegwLtTiRVF8g +fetchai/skills/gym,QmfKQFkyfm89t4MQ1FUgQe2MFLZw1PUapMrTGBiSqn6frn fetchai/skills/http_echo,QmXb9b5YTwxHavSjoGzCC4DaSSoZMsbYgFiuy2fqFQno5J -fetchai/skills/ml_data_provider,QmWU6ZqncZTs6wSs43s1ji2F27VyvcGJXsq1N1W7BKPTUS -fetchai/skills/ml_train,QmUkG9umsnwZKqbQVoKZLxbaFWyAUycMLyzsb8fzKFACzF +fetchai/skills/ml_data_provider,QmXkX14MRTdticWjwF469RfXA9sQ82ddY7pzQMCbRikuz1 +fetchai/skills/ml_train,QmdmnV66naRKrYgLAJDMbCHWTocVLeX8JtYLfJwzMVxBhG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux -fetchai/skills/simple_service_registration,QmbBSb9u5bCYf1aPEzD4oKJRKx8QD48Tf1SbzCmVmquB58 -fetchai/skills/tac_control,QmSJrPKJRwt98AuFJAP91e2JFkD4xqxCCo6jQvgse92ND9 -fetchai/skills/tac_control_contract,QmfFrPNaG3M1YKjFyEYESAAhuBW4yGT6W1Q5XVoX378h4c -fetchai/skills/tac_negotiation,QmQWHy4RutKEQETsQZP3i3Xjz8D2XnSRdiaqexRNA7CSky -fetchai/skills/tac_participation,QmbJqdFPbwFG6c7LUaXxzj9XUnhFd4QxUisJWHdodUyCh8 +fetchai/skills/simple_service_registration,QmSpM3b3GL5Wh9Cu4KYE3Tiyb5XfyUTcYSctUMNSjAjGdk +fetchai/skills/tac_control,QmcPKqAatmFxtQHhSjpdLXL5XcUav4XzT17McZQwwoDcCW +fetchai/skills/tac_control_contract,QmSBWfymLZ4LT4T3cwq4cVRbqnkxSFuviykiw5hYaYBMH4 +fetchai/skills/tac_negotiation,QmVfat3p7G8CPXuPm7wy3i81AtxqeTQzDDbPGMZ439zsLm +fetchai/skills/tac_participation,QmYhmrYZvywb5L15VZDZ91Y2bCF2eD2Lasg79nNBRr3rHs fetchai/skills/thermometer,QmUEuRdsTw3iTzLRA4C6SiRGwEK6gauLP1Apk13fCQYtKw fetchai/skills/thermometer_client,QmdESHLrhNasaUKYpG2m5p6f61dxmqjVKGPiNdEUs5ZHnu fetchai/skills/weather_client,QmTa3Pxv8tD478xGA6DkNjQn8vxKwGfqLhLMbAC73fK6qo -fetchai/skills/weather_station,QmSLdrYpe8yShYECQuFMWqycmihQVp8ZSfmCvCcCTtGRg7 +fetchai/skills/weather_station,QmX75zb2gERaSHXVTcxJ3uRdSBiUVHvwieyWrdUyCSDQYm diff --git a/scripts/acn/run_acn_node_standalone.py b/scripts/acn/run_acn_node_standalone.py index a8bb034cdc..f9e55f63e7 100644 --- a/scripts/acn/run_acn_node_standalone.py +++ b/scripts/acn/run_acn_node_standalone.py @@ -25,7 +25,7 @@ from typing import Dict, List, Optional from base58 import b58decode -from ecdsa import curves, SigningKey +from ecdsa import SigningKey, curves from multihash import decode as multihashdecode # type: ignore # following imports needed only if checks are enabled diff --git a/scripts/generate_ipfs_hashes.py b/scripts/generate_ipfs_hashes.py index 9dffc61d01..e5af338e4b 100755 --- a/scripts/generate_ipfs_hashes.py +++ b/scripts/generate_ipfs_hashes.py @@ -38,13 +38,12 @@ import time import traceback from pathlib import Path -from typing import cast, Collection, Dict, List, Optional, Tuple, Type +from typing import Collection, Dict, List, Optional, Tuple, Type, cast import ipfshttpclient import yaml from aea.configurations.base import ( - _compute_fingerprint, AgentConfig, ConnectionConfig, ContractConfig, @@ -52,6 +51,7 @@ PackageType, ProtocolConfig, SkillConfig, + _compute_fingerprint, ) from aea.helpers.base import yaml_dump, yaml_dump_all diff --git a/setup.cfg b/setup.cfg index a21a839073..6951a36e91 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,8 +29,9 @@ multi_line_output=3 include_trailing_comma=True force_grid_wrap=0 use_parentheses=True +ensure_newline_before_comments = True line_length=88 -order_by_type=False +order_by_type=True [mypy] diff --git a/tests/conftest.py b/tests/conftest.py index 5d1984815b..db82e37561 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,7 +31,7 @@ from pathlib import Path from threading import Timer from types import FunctionType, MethodType -from typing import Callable, cast, List, Optional, Sequence +from typing import Callable, List, Optional, Sequence, cast from unittest.mock import patch import docker as docker @@ -44,13 +44,17 @@ from aea.aea import AEA from aea.cli.utils.config import _init_cli_config from aea.common import Address -from aea.configurations.base import ComponentType, ConnectionConfig, ContractConfig from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE as AGENT_YAML from aea.configurations.base import DEFAULT_CONNECTION_CONFIG_FILE as CONNECTION_YAML from aea.configurations.base import DEFAULT_CONTRACT_CONFIG_FILE as CONTRACT_YAML from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE as PROTOCOL_YAML from aea.configurations.base import DEFAULT_SKILL_CONFIG_FILE as SKILL_YAML -from aea.configurations.base import PublicId +from aea.configurations.base import ( + ComponentType, + ConnectionConfig, + ContractConfig, + PublicId, +) from aea.configurations.constants import DEFAULT_CONNECTION, DEFAULT_LEDGER from aea.configurations.loader import load_component_configuration from aea.connections.base import Connection diff --git a/tests/data/generator/t_protocol/dialogues.py b/tests/data/generator/t_protocol/dialogues.py index 0efcb291ed..d709c0bb49 100644 --- a/tests/data/generator/t_protocol/dialogues.py +++ b/tests/data/generator/t_protocol/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/tests/data/generator/t_protocol/message.py b/tests/data/generator/t_protocol/message.py index b28dad220f..9b1cf47807 100644 --- a/tests/data/generator/t_protocol/message.py +++ b/tests/data/generator/t_protocol/message.py @@ -20,7 +20,7 @@ """This module contains t_protocol's message definition.""" import logging -from typing import cast, Dict, FrozenSet, Optional, Set, Tuple, Union +from typing import Dict, FrozenSet, Optional, Set, Tuple, Union, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/tests/data/generator/t_protocol/serialization.py b/tests/data/generator/t_protocol/serialization.py index 262df38cc0..fb7f28d97f 100644 --- a/tests/data/generator/t_protocol/serialization.py +++ b/tests/data/generator/t_protocol/serialization.py @@ -19,7 +19,7 @@ """Serialization module for t_protocol protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from tests.data.generator.t_protocol import t_protocol_pb2 diff --git a/tests/data/generator/t_protocol_no_ct/dialogues.py b/tests/data/generator/t_protocol_no_ct/dialogues.py index 63657c12a3..c5666a74c9 100644 --- a/tests/data/generator/t_protocol_no_ct/dialogues.py +++ b/tests/data/generator/t_protocol_no_ct/dialogues.py @@ -25,7 +25,7 @@ """ from abc import ABC -from typing import Callable, cast, FrozenSet, Type +from typing import Callable, FrozenSet, Type, cast from aea.common import Address from aea.protocols.base import Message diff --git a/tests/data/generator/t_protocol_no_ct/message.py b/tests/data/generator/t_protocol_no_ct/message.py index 83138b6176..8733c6d431 100644 --- a/tests/data/generator/t_protocol_no_ct/message.py +++ b/tests/data/generator/t_protocol_no_ct/message.py @@ -20,7 +20,7 @@ """This module contains t_protocol_no_ct's message definition.""" import logging -from typing import cast, Dict, FrozenSet, Optional, Set, Tuple, Union +from typing import Dict, FrozenSet, Optional, Set, Tuple, Union, cast from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce diff --git a/tests/data/generator/t_protocol_no_ct/serialization.py b/tests/data/generator/t_protocol_no_ct/serialization.py index ff9113c313..0c8a6879e0 100644 --- a/tests/data/generator/t_protocol_no_ct/serialization.py +++ b/tests/data/generator/t_protocol_no_ct/serialization.py @@ -19,7 +19,7 @@ """Serialization module for t_protocol_no_ct protocol.""" -from typing import Any, cast, Dict +from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer from tests.data.generator.t_protocol_no_ct import t_protocol_no_ct_pb2 diff --git a/tests/test_aea.py b/tests/test_aea.py index bcc1a5f1b9..bbe9f1bccc 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -56,12 +56,12 @@ ) from .conftest import ( - _make_local_connection, CUR_PATH, DUMMY_SKILL_PUBLIC_ID, FETCHAI_PRIVATE_KEY_PATH, ROOT_DIR, UNKNOWN_PROTOCOL_PUBLIC_ID, + _make_local_connection, ) from .data.dummy_aea.skills.dummy.tasks import DummyTask # type: ignore from .data.dummy_skill.behaviours import DummyBehaviour # type: ignore diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index 4b7aa6571e..17e4947edd 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -30,13 +30,13 @@ import yaml from aea.aea import AEA -from aea.aea_builder import _DependenciesManager, AEABuilder +from aea.aea_builder import AEABuilder, _DependenciesManager from aea.components.base import Component from aea.configurations.base import ( + DEFAULT_AEA_CONFIG_FILE, ComponentId, ComponentType, ConnectionConfig, - DEFAULT_AEA_CONFIG_FILE, ProtocolConfig, PublicId, SkillConfig, @@ -53,10 +53,10 @@ from aea.skills.base import Skill from aea.test_tools.test_cases import AEATestCase, AEATestCaseEmpty from tests.conftest import ( - _make_dummy_connection, CUR_PATH, DEFAULT_PRIVATE_KEY_PATH, ROOT_DIR, + _make_dummy_connection, ) dummy_skill_path = os.path.join(CUR_PATH, "data", "dummy_skill") diff --git a/tests/test_cli/test_add/test_connection.py b/tests/test_cli/test_add/test_connection.py index 834a9b4425..98dc2ad55f 100644 --- a/tests/test_cli/test_add/test_connection.py +++ b/tests/test_cli/test_add/test_connection.py @@ -36,10 +36,10 @@ from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, CUR_PATH, - double_escape_windows_path_separator, MAX_FLAKY_RERUNS, + CliRunner, + double_escape_windows_path_separator, ) diff --git a/tests/test_cli/test_add/test_contract.py b/tests/test_cli/test_add/test_contract.py index 1d77fee879..36898a2503 100644 --- a/tests/test_cli/test_add/test_contract.py +++ b/tests/test_cli/test_add/test_contract.py @@ -19,13 +19,13 @@ """This test module contains the tests for the `aea add contract` sub-command.""" import os -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest from aea.cli import cli from aea.test_tools.test_cases import AEATestCaseEmpty -from tests.conftest import CLI_LOG_OPTION, CliRunner, MAX_FLAKY_RERUNS +from tests.conftest import CLI_LOG_OPTION, MAX_FLAKY_RERUNS, CliRunner @mock.patch("aea.cli.utils.decorators.try_to_load_agent_config") diff --git a/tests/test_cli/test_add/test_generic.py b/tests/test_cli/test_add/test_generic.py index a4661c400e..be4ed151f7 100644 --- a/tests/test_cli/test_add/test_generic.py +++ b/tests/test_cli/test_add/test_generic.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains tests for aea.cli.add generic methods.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli.add import _add_item_deps from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_add/test_protocol.py b/tests/test_cli/test_add/test_protocol.py index 234c107b20..370ced6021 100644 --- a/tests/test_cli/test_add/test_protocol.py +++ b/tests/test_cli/test_add/test_protocol.py @@ -36,10 +36,10 @@ from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, CUR_PATH, - double_escape_windows_path_separator, MAX_FLAKY_RERUNS, + CliRunner, + double_escape_windows_path_separator, ) diff --git a/tests/test_cli/test_add/test_skill.py b/tests/test_cli/test_add/test_skill.py index 46df071ba8..3bb7272949 100644 --- a/tests/test_cli/test_add/test_skill.py +++ b/tests/test_cli/test_add/test_skill.py @@ -32,20 +32,20 @@ import aea from aea.cli import cli from aea.configurations.base import ( - AgentConfig, DEFAULT_AEA_CONFIG_FILE, DEFAULT_SKILL_CONFIG_FILE, + AgentConfig, PublicId, ) from aea.test_tools.test_cases import AEATestCaseEmpty from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, CUR_PATH, - double_escape_windows_path_separator, MAX_FLAKY_RERUNS, ROOT_DIR, + CliRunner, + double_escape_windows_path_separator, ) diff --git a/tests/test_cli/test_add_key.py b/tests/test_cli/test_add_key.py index 8da1917d2f..cf2b248f87 100644 --- a/tests/test_cli/test_add_key.py +++ b/tests/test_cli/test_add_key.py @@ -22,24 +22,24 @@ import shutil import tempfile from pathlib import Path -from unittest import mock, TestCase +from unittest import TestCase, mock import yaml import aea from aea.cli import cli from aea.cli.add_key import _try_add_key -from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE +from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, CUR_PATH, ETHEREUM, ETHEREUM_PRIVATE_KEY_FILE, FETCHAI, FETCHAI_PRIVATE_KEY_FILE, ROOT_DIR, + CliRunner, ) from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_config.py b/tests/test_cli/test_config.py index cf3ea585a1..0195ca0675 100644 --- a/tests/test_cli/test_config.py +++ b/tests/test_cli/test_config.py @@ -26,7 +26,7 @@ from aea.cli import cli from aea.cli.utils.constants import ALLOWED_PATH_ROOTS -from tests.conftest import CLI_LOG_OPTION, CliRunner, CUR_PATH +from tests.conftest import CLI_LOG_OPTION, CUR_PATH, CliRunner class TestConfigGet: diff --git a/tests/test_cli/test_core.py b/tests/test_cli/test_core.py index a4b31b1d77..865043f859 100644 --- a/tests/test_cli/test_core.py +++ b/tests/test_cli/test_core.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI core methods.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_create.py b/tests/test_cli/test_create.py index 2a3c50aaee..e30f57d714 100644 --- a/tests/test_cli/test_create.py +++ b/tests/test_cli/test_create.py @@ -47,9 +47,9 @@ AGENT_CONFIGURATION_SCHEMA, AUTHOR, CLI_LOG_OPTION, - CliRunner, CONFIGURATION_SCHEMA_DIR, ROOT_DIR, + CliRunner, ) diff --git a/tests/test_cli/test_fetch.py b/tests/test_cli/test_fetch.py index bec3f6fee7..0b79bc69d0 100644 --- a/tests/test_cli/test_fetch.py +++ b/tests/test_cli/test_fetch.py @@ -19,7 +19,7 @@ """This test module contains the tests for CLI Registry fetch methods.""" import os -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest from click import ClickException @@ -27,7 +27,7 @@ from aea.cli import cli from aea.cli.fetch import _is_version_correct, fetch_agent_locally from aea.test_tools.test_cases import AEATestCaseMany -from tests.conftest import CLI_LOG_OPTION, CliRunner, MAX_FLAKY_RERUNS +from tests.conftest import CLI_LOG_OPTION, MAX_FLAKY_RERUNS, CliRunner from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_fingerprint.py b/tests/test_cli/test_fingerprint.py index c98037d999..3d984fe13c 100644 --- a/tests/test_cli/test_fingerprint.py +++ b/tests/test_cli/test_fingerprint.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI fingerprint command.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_freeze.py b/tests/test_cli/test_freeze.py index 788fed1a32..a6208472c5 100644 --- a/tests/test_cli/test_freeze.py +++ b/tests/test_cli/test_freeze.py @@ -34,10 +34,10 @@ from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, CLI_LOG_OPTION, - CliRunner, CONFIGURATION_SCHEMA_DIR, CUR_PATH, MAX_FLAKY_RERUNS, + CliRunner, ) diff --git a/tests/test_cli/test_generate/test_generate.py b/tests/test_cli/test_generate/test_generate.py index c07dd3955c..673d31157e 100644 --- a/tests/test_cli/test_generate/test_generate.py +++ b/tests/test_cli/test_generate/test_generate.py @@ -19,7 +19,7 @@ """This test module contains the tests for the aea.cli.generate sub-module.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_generate/test_protocols.py b/tests/test_cli/test_generate/test_protocols.py index 88ac84cc3b..9fc2128df1 100644 --- a/tests/test_cli/test_generate/test_protocols.py +++ b/tests/test_cli/test_generate/test_protocols.py @@ -36,10 +36,10 @@ from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, CONFIGURATION_SCHEMA_DIR, CUR_PATH, PROTOCOL_CONFIGURATION_SCHEMA, + CliRunner, ) diff --git a/tests/test_cli/test_generate_key.py b/tests/test_cli/test_generate_key.py index cd6e6961b6..b2795b22bd 100644 --- a/tests/test_cli/test_generate_key.py +++ b/tests/test_cli/test_generate_key.py @@ -28,11 +28,11 @@ from aea.crypto.registries import make_crypto from tests.conftest import ( CLI_LOG_OPTION, - CliRunner, ETHEREUM, ETHEREUM_PRIVATE_KEY_FILE, FETCHAI, FETCHAI_PRIVATE_KEY_FILE, + CliRunner, ) diff --git a/tests/test_cli/test_generate_wealth.py b/tests/test_cli/test_generate_wealth.py index 5b8a8935d4..f71687627b 100644 --- a/tests/test_cli/test_generate_wealth.py +++ b/tests/test_cli/test_generate_wealth.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for commands in aea.cli.generate_wealth module.""" -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest @@ -28,9 +28,9 @@ from aea.test_tools.test_cases import AEATestCaseMany from tests.conftest import ( CLI_LOG_OPTION, - CliRunner, FETCHAI, MAX_FLAKY_RERUNS_INTEGRATION, + CliRunner, ) from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_get_address.py b/tests/test_cli/test_get_address.py index bb498a93af..8d76ac81ea 100644 --- a/tests/test_cli/test_get_address.py +++ b/tests/test_cli/test_get_address.py @@ -18,11 +18,11 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for commands in aea.cli.get_address module.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli import cli from aea.cli.get_address import _try_get_address -from tests.conftest import CLI_LOG_OPTION, CliRunner, FETCHAI +from tests.conftest import CLI_LOG_OPTION, FETCHAI, CliRunner from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_get_wealth.py b/tests/test_cli/test_get_wealth.py index c1f5a3b68a..4f7561eec9 100644 --- a/tests/test_cli/test_get_wealth.py +++ b/tests/test_cli/test_get_wealth.py @@ -18,11 +18,11 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for commands in aea.cli.generate_wealth module.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli import cli from aea.cli.get_wealth import _try_get_wealth -from tests.conftest import CLI_LOG_OPTION, CliRunner, FETCHAI +from tests.conftest import CLI_LOG_OPTION, FETCHAI, CliRunner from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_install.py b/tests/test_cli/test_install.py index ef5d46524e..648ddcc5c5 100644 --- a/tests/test_cli/test_install.py +++ b/tests/test_cli/test_install.py @@ -23,7 +23,7 @@ import shutil import tempfile from pathlib import Path -from unittest import mock, TestCase +from unittest import TestCase, mock import yaml @@ -31,7 +31,7 @@ from aea.cli.install import _install_dependency from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE from aea.exceptions import AEAException -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, CUR_PATH +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner class TestInstall: diff --git a/tests/test_cli/test_interact.py b/tests/test_cli/test_interact.py index 80c464bb4f..43e4bf3628 100644 --- a/tests/test_cli/test_interact.py +++ b/tests/test_cli/test_interact.py @@ -17,7 +17,7 @@ # # ------------------------------------------------------------------------------ """This test module contains tests for iteract command.""" -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest diff --git a/tests/test_cli/test_launch.py b/tests/test_cli/test_launch.py index d0510171b1..e0d8560c4f 100644 --- a/tests/test_cli/test_launch.py +++ b/tests/test_cli/test_launch.py @@ -35,7 +35,7 @@ from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE from tests.common.pexpect_popen import PexpectWrapper -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, CUR_PATH, MAX_FLAKY_RERUNS +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, MAX_FLAKY_RERUNS, CliRunner logger = logging.getLogger(__name__) diff --git a/tests/test_cli/test_list.py b/tests/test_cli/test_list.py index aa370e7d4c..b78583c896 100644 --- a/tests/test_cli/test_list.py +++ b/tests/test_cli/test_list.py @@ -24,7 +24,7 @@ import shutil import tempfile from pathlib import Path -from unittest import mock, TestCase +from unittest import TestCase, mock import jsonschema from jsonschema import Draft4Validator @@ -33,9 +33,9 @@ from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, CLI_LOG_OPTION, - CliRunner, CONFIGURATION_SCHEMA_DIR, CUR_PATH, + CliRunner, ) from tests.test_cli.constants import FORMAT_ITEMS_SAMPLE_OUTPUT diff --git a/tests/test_cli/test_loggers.py b/tests/test_cli/test_loggers.py index be18fd9b8b..61ccf4f70e 100644 --- a/tests/test_cli/test_loggers.py +++ b/tests/test_cli/test_loggers.py @@ -19,7 +19,7 @@ """This test module contains the tests for commands in aea.cli.utils.loggers module.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli.utils.loggers import ColorFormatter diff --git a/tests/test_cli/test_login.py b/tests/test_cli/test_login.py index 051939f2a7..3bdb94e8dc 100644 --- a/tests/test_cli/test_login.py +++ b/tests/test_cli/test_login.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI login command.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli import cli from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_logout.py b/tests/test_cli/test_logout.py index 04a9a34ad7..6847fc5948 100644 --- a/tests/test_cli/test_logout.py +++ b/tests/test_cli/test_logout.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI logout command.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli import cli from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_publish.py b/tests/test_cli/test_publish.py index 03f492727c..63e827c7ab 100644 --- a/tests/test_cli/test_publish.py +++ b/tests/test_cli/test_publish.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """Test module for Registry publish methods.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_push.py b/tests/test_cli/test_push.py index 3054802a8b..86abf6f7a9 100644 --- a/tests/test_cli/test_push.py +++ b/tests/test_cli/test_push.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """Test module for Registry push methods.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_register.py b/tests/test_cli/test_register.py index 87056c9c4a..c0f296f1f9 100644 --- a/tests/test_cli/test_register.py +++ b/tests/test_cli/test_register.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI register command.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli import cli from aea.cli.register import do_register diff --git a/tests/test_cli/test_registry/test_add.py b/tests/test_cli/test_registry/test_add.py index 9fd225c6df..9a81089cfc 100644 --- a/tests/test_cli/test_registry/test_add.py +++ b/tests/test_cli/test_registry/test_add.py @@ -19,7 +19,7 @@ """This test module contains tests for CLI Registry add methods.""" import os -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli.registry.add import fetch_package from aea.configurations.base import PublicId diff --git a/tests/test_cli/test_registry/test_fetch.py b/tests/test_cli/test_registry/test_fetch.py index 50ede87504..81c41143a4 100644 --- a/tests/test_cli/test_registry/test_fetch.py +++ b/tests/test_cli/test_registry/test_fetch.py @@ -21,7 +21,7 @@ import os import shutil import tempfile -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_registry/test_login.py b/tests/test_cli/test_registry/test_login.py index 5381893c3e..4b5c45f695 100644 --- a/tests/test_cli/test_registry/test_login.py +++ b/tests/test_cli/test_registry/test_login.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains tests for CLI Registry login methods.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli.registry.login import registry_login diff --git a/tests/test_cli/test_registry/test_logout.py b/tests/test_cli/test_registry/test_logout.py index ca8485f5ce..3627eb6fda 100644 --- a/tests/test_cli/test_registry/test_logout.py +++ b/tests/test_cli/test_registry/test_logout.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains tests for CLI Registry logout methods.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli.registry.logout import registry_logout diff --git a/tests/test_cli/test_registry/test_publish.py b/tests/test_cli/test_registry/test_publish.py index 2d7e9c8e52..2ec37fcc59 100644 --- a/tests/test_cli/test_registry/test_publish.py +++ b/tests/test_cli/test_registry/test_publish.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """Test module for Registry publish methods.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli.registry.publish import _compress, publish_agent from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_registry/test_push.py b/tests/test_cli/test_registry/test_push.py index f7291e4525..a3b28b3b8a 100644 --- a/tests/test_cli/test_registry/test_push.py +++ b/tests/test_cli/test_registry/test_push.py @@ -19,7 +19,7 @@ """Test module for Registry push methods.""" import os -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_registry/test_registration.py b/tests/test_cli/test_registry/test_registration.py index ad6bbb3867..39945b0536 100644 --- a/tests/test_cli/test_registry/test_registration.py +++ b/tests/test_cli/test_registry/test_registration.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """Test module for Registry registration methods.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_registry/test_utils.py b/tests/test_cli/test_registry/test_utils.py index a75e648ce1..ed085c944a 100644 --- a/tests/test_cli/test_registry/test_utils.py +++ b/tests/test_cli/test_registry/test_utils.py @@ -20,7 +20,7 @@ import os from json.decoder import JSONDecodeError -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException from requests.exceptions import ConnectionError diff --git a/tests/test_cli/test_remove/test_connection.py b/tests/test_cli/test_remove/test_connection.py index 24320b5a4c..3b54a1efcb 100644 --- a/tests/test_cli/test_remove/test_connection.py +++ b/tests/test_cli/test_remove/test_connection.py @@ -31,7 +31,7 @@ import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, CUR_PATH +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner class TestRemoveConnectionWithPublicId: diff --git a/tests/test_cli/test_remove/test_contract.py b/tests/test_cli/test_remove/test_contract.py index 56a7d9bbbd..a2423d27df 100644 --- a/tests/test_cli/test_remove/test_contract.py +++ b/tests/test_cli/test_remove/test_contract.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for the `aea remove contract` sub-command.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli import cli from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_remove/test_protocol.py b/tests/test_cli/test_remove/test_protocol.py index c166d9094f..d06341bc75 100644 --- a/tests/test_cli/test_remove/test_protocol.py +++ b/tests/test_cli/test_remove/test_protocol.py @@ -31,7 +31,7 @@ import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, CUR_PATH +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner class TestRemoveProtocolWithPublicId: diff --git a/tests/test_cli/test_remove/test_remove_item.py b/tests/test_cli/test_remove/test_remove_item.py index dc2ee28191..783f45fa7c 100644 --- a/tests/test_cli/test_remove/test_remove_item.py +++ b/tests/test_cli/test_remove/test_remove_item.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """Test module for aea.cli.remove.remove_item method.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_remove/test_skill.py b/tests/test_cli/test_remove/test_skill.py index 97ce06d2f5..23bcb7649f 100644 --- a/tests/test_cli/test_remove/test_skill.py +++ b/tests/test_cli/test_remove/test_skill.py @@ -30,8 +30,8 @@ import aea import aea.configurations.base from aea.cli import cli -from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, ROOT_DIR +from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig +from tests.conftest import AUTHOR, CLI_LOG_OPTION, ROOT_DIR, CliRunner class TestRemoveSkillWithPublicId: diff --git a/tests/test_cli/test_run.py b/tests/test_cli/test_run.py index da6622fa89..ef7c5b091d 100644 --- a/tests/test_cli/test_run.py +++ b/tests/test_cli/test_run.py @@ -25,7 +25,7 @@ import tempfile import time from pathlib import Path -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest import yaml @@ -45,10 +45,10 @@ from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, FETCHAI_PRIVATE_KEY_FILE, MAX_FLAKY_RERUNS, ROOT_DIR, + CliRunner, ) diff --git a/tests/test_cli/test_scaffold/test_connection.py b/tests/test_cli/test_scaffold/test_connection.py index c4fc46e24e..ba70ef207d 100644 --- a/tests/test_cli/test_scaffold/test_connection.py +++ b/tests/test_cli/test_scaffold/test_connection.py @@ -38,9 +38,9 @@ from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, CONFIGURATION_SCHEMA_DIR, CONNECTION_CONFIGURATION_SCHEMA, + CliRunner, ) diff --git a/tests/test_cli/test_scaffold/test_generic.py b/tests/test_cli/test_scaffold/test_generic.py index 9710925e44..2391b0b84d 100644 --- a/tests/test_cli/test_scaffold/test_generic.py +++ b/tests/test_cli/test_scaffold/test_generic.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for CLI scaffold generic methods and commands.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from click import ClickException diff --git a/tests/test_cli/test_scaffold/test_protocols.py b/tests/test_cli/test_scaffold/test_protocols.py index 62b8a38fa8..22f44ce1e1 100644 --- a/tests/test_cli/test_scaffold/test_protocols.py +++ b/tests/test_cli/test_scaffold/test_protocols.py @@ -38,9 +38,9 @@ from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, CONFIGURATION_SCHEMA_DIR, PROTOCOL_CONFIGURATION_SCHEMA, + CliRunner, ) diff --git a/tests/test_cli/test_scaffold/test_skills.py b/tests/test_cli/test_scaffold/test_skills.py index 523f747fab..22be5fe660 100644 --- a/tests/test_cli/test_scaffold/test_skills.py +++ b/tests/test_cli/test_scaffold/test_skills.py @@ -38,9 +38,9 @@ from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, - CliRunner, CONFIGURATION_SCHEMA_DIR, SKILL_CONFIGURATION_SCHEMA, + CliRunner, ) diff --git a/tests/test_cli/test_search.py b/tests/test_cli/test_search.py index 6f4938c09d..8a983d9f16 100644 --- a/tests/test_cli/test_search.py +++ b/tests/test_cli/test_search.py @@ -24,7 +24,7 @@ import shutil import tempfile from pathlib import Path -from unittest import mock, TestCase +from unittest import TestCase, mock import jsonschema from jsonschema import Draft4Validator @@ -36,9 +36,9 @@ AGENT_CONFIGURATION_SCHEMA, AUTHOR, CLI_LOG_OPTION, - CliRunner, CONFIGURATION_SCHEMA_DIR, ROOT_DIR, + CliRunner, ) from tests.test_cli.constants import FORMAT_ITEMS_SAMPLE_OUTPUT diff --git a/tests/test_cli/test_utils/test_config.py b/tests/test_cli/test_utils/test_config.py index db09f03927..e81b0ab859 100644 --- a/tests/test_cli/test_utils/test_config.py +++ b/tests/test_cli/test_utils/test_config.py @@ -20,7 +20,7 @@ """This test module contains the tests for aea.cli.utils.config module.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli.utils.config import validate_item_config from aea.cli.utils.exceptions import AEAConfigException diff --git a/tests/test_cli/test_utils/test_utils.py b/tests/test_cli/test_utils/test_utils.py index 41b2fa5a66..ce2f250a59 100644 --- a/tests/test_cli/test_utils/test_utils.py +++ b/tests/test_cli/test_utils/test_utils.py @@ -21,7 +21,7 @@ from builtins import FileNotFoundError from typing import cast -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest from click import BadParameter, ClickException @@ -55,8 +55,8 @@ ConfigLoaderMock, ContextMock, PublicIdMock, - raise_stoptest, StopTest, + raise_stoptest, ) AUTHOR = "author" diff --git a/tests/test_cli_gui/test_create.py b/tests/test_cli_gui/test_create.py index f6f42e6cf7..53f83bba3f 100644 --- a/tests/test_cli_gui/test_create.py +++ b/tests/test_cli_gui/test_create.py @@ -29,7 +29,7 @@ from aea.test_tools.constants import DEFAULT_AUTHOR from tests.conftest import CUR_PATH from tests.test_cli.tools_for_testing import raise_click_exception -from tests.test_cli_gui.test_base import create_app, TempCWD +from tests.test_cli_gui.test_base import TempCWD, create_app @patch("aea.cli_gui.cli_create_aea") diff --git a/tests/test_cli_gui/test_get_items.py b/tests/test_cli_gui/test_get_items.py index 12466d145c..3522a5cae0 100644 --- a/tests/test_cli_gui/test_get_items.py +++ b/tests/test_cli_gui/test_get_items.py @@ -19,7 +19,7 @@ """Test module for get registered items with CLI GUI.""" import json -from unittest import mock, TestCase +from unittest import TestCase, mock from tests.test_cli.tools_for_testing import raise_click_exception from tests.test_cli_gui.test_base import create_app diff --git a/tests/test_cli_gui/test_run_agent.py b/tests/test_cli_gui/test_run_agent.py index a684589b5b..dff54f1fa9 100644 --- a/tests/test_cli_gui/test_run_agent.py +++ b/tests/test_cli_gui/test_run_agent.py @@ -33,7 +33,7 @@ from aea.configurations.constants import DEFAULT_CONNECTION from aea.test_tools.constants import DEFAULT_AUTHOR from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS -from tests.test_cli_gui.test_base import create_app, TempCWD +from tests.test_cli_gui.test_base import TempCWD, create_app @pytest.mark.flaky(reruns=MAX_FLAKY_RERUNS) diff --git a/tests/test_cli_gui/test_utils.py b/tests/test_cli_gui/test_utils.py index ee663abf67..fa0bad2aa5 100644 --- a/tests/test_cli_gui/test_utils.py +++ b/tests/test_cli_gui/test_utils.py @@ -19,13 +19,13 @@ """Test module for utils of CLI GUI.""" from subprocess import TimeoutExpired # nosec -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.cli_gui.utils import ( + ProcessState, _call_subprocess, _terminate_process, get_process_status, - ProcessState, read_error, read_tty, ) diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index f8f617806d..d7a8a7b825 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -20,23 +20,20 @@ """This module contains the tests for the aea.configurations.base module.""" import re from pathlib import Path -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest import semver import yaml from aea.configurations.base import ( - _check_aea_version, - _compare_fingerprints, - _get_default_configuration_file_name_from_type, + DEFAULT_SKILL_CONFIG_FILE, AgentConfig, ComponentId, ComponentType, ConnectionConfig, ContractConfig, CRUDCollection, - DEFAULT_SKILL_CONFIG_FILE, PackageId, PackageType, ProtocolConfig, @@ -45,16 +42,19 @@ PublicId, SkillConfig, SpeechActContentConfig, + _check_aea_version, + _compare_fingerprints, + _get_default_configuration_file_name_from_type, ) from aea.configurations.constants import DEFAULT_LEDGER from aea.configurations.loader import ConfigLoaders, load_component_configuration from tests.conftest import ( - agent_config_files, AUTHOR, + ROOT_DIR, + agent_config_files, connection_config_files, contract_config_files, protocol_config_files, - ROOT_DIR, skill_config_files, ) diff --git a/tests/test_configurations/test_schema.py b/tests/test_configurations/test_schema.py index c4b33d9685..dafbb537f1 100644 --- a/tests/test_configurations/test_schema.py +++ b/tests/test_configurations/test_schema.py @@ -31,20 +31,20 @@ from aea.configurations.loader import make_jsonschema_base_uri from tests.conftest import ( - agent_config_files, AGENT_CONFIGURATION_SCHEMA, CONFIGURATION_SCHEMA_DIR, - connection_config_files, CONNECTION_CONFIGURATION_SCHEMA, - contract_config_files, CONTRACT_CONFIGURATION_SCHEMA, - protocol_config_files, PROTOCOL_CONFIGURATION_SCHEMA, PROTOCOL_SPEC_CONFIGURATION_SCHEMA, - protocol_specification_files, ROOT_DIR, - skill_config_files, SKILL_CONFIGURATION_SCHEMA, + agent_config_files, + connection_config_files, + contract_config_files, + protocol_config_files, + protocol_specification_files, + skill_config_files, ) diff --git a/tests/test_connections/test_stub.py b/tests/test_connections/test_stub.py index d5db2c2f7e..2ac56d71fd 100644 --- a/tests/test_connections/test_stub.py +++ b/tests/test_connections/test_stub.py @@ -31,9 +31,9 @@ import aea from aea.configurations.base import PublicId from aea.connections.stub.connection import ( + StubConnection, _process_line, lock_file, - StubConnection, write_envelope, write_with_lock, ) @@ -42,7 +42,7 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage -from tests.conftest import _make_stub_connection, ROOT_DIR +from tests.conftest import ROOT_DIR, _make_stub_connection SEPARATOR = "," diff --git a/tests/test_crypto/test_fetchai.py b/tests/test_crypto/test_fetchai.py index f2bcf34731..e26d8611fd 100644 --- a/tests/test_crypto/test_fetchai.py +++ b/tests/test_crypto/test_fetchai.py @@ -21,7 +21,7 @@ import logging import time from unittest import mock -from unittest.mock import call, MagicMock +from unittest.mock import MagicMock, call import pytest diff --git a/tests/test_decision_maker/test_default.py b/tests/test_decision_maker/test_default.py index af6846e403..47fd7225f3 100644 --- a/tests/test_decision_maker/test_default.py +++ b/tests/test_decision_maker/test_default.py @@ -20,7 +20,7 @@ """This module contains tests for decision_maker.""" from queue import Queue -from typing import cast, Optional +from typing import Optional, cast from unittest import mock import eth_account diff --git a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py index fc80cdf4e7..5d004506d0 100644 --- a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py @@ -27,7 +27,7 @@ from aea.configurations.base import SkillConfig from aea.connections.stub.connection import write_with_lock from aea.crypto.fetchai import FetchAICrypto -from aea.crypto.helpers import create_private_key, PRIVATE_KEY_PATH_SCHEMA +from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA, create_private_key from aea.skills.base import Skill ROOT_DIR = "./" diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py index d9de11f423..5b8b52feeb 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py @@ -28,7 +28,7 @@ from aea.aea import AEA from aea.configurations.base import ConnectionConfig, PublicId from aea.crypto.fetchai import FetchAICrypto -from aea.crypto.helpers import create_private_key, PRIVATE_KEY_PATH_SCHEMA +from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA, create_private_key from aea.crypto.wallet import Wallet from aea.identity.base import Identity from aea.protocols.base import Protocol diff --git a/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py b/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py index 7c9a968eda..10e9ad3055 100644 --- a/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py +++ b/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py @@ -22,7 +22,7 @@ import logging import time from threading import Thread -from typing import cast, Optional +from typing import Optional, cast from aea.aea_builder import AEABuilder from aea.configurations.base import ProtocolId, SkillConfig diff --git a/tests/test_examples/test_gym_ex.py b/tests/test_examples/test_gym_ex.py index aa950c7153..219de01525 100644 --- a/tests/test_examples/test_gym_ex.py +++ b/tests/test_examples/test_gym_ex.py @@ -25,7 +25,7 @@ from pathlib import Path from tests.common.pexpect_popen import PexpectWrapper -from tests.conftest import env_path_separator, ROOT_DIR +from tests.conftest import ROOT_DIR, env_path_separator DIRECTORIES = ["packages", "examples"] diff --git a/tests/test_helpers/test_async_utils.py b/tests/test_helpers/test_async_utils.py index d54ac7d6c3..6c008a29fd 100644 --- a/tests/test_helpers/test_async_utils.py +++ b/tests/test_helpers/test_async_utils.py @@ -26,11 +26,11 @@ from aea.helpers.async_utils import ( AsyncState, AwaitableProc, - ensure_list, - ensure_loop, HandlerItemGetter, PeriodicCaller, ThreadedAsyncRunner, + ensure_list, + ensure_loop, ) diff --git a/tests/test_helpers/test_base.py b/tests/test_helpers/test_base.py index be19160c1c..692ef0ff54 100644 --- a/tests/test_helpers/test_base.py +++ b/tests/test_helpers/test_base.py @@ -32,12 +32,12 @@ import pytest from aea.helpers.base import ( + MaxRetriesError, + RegexConstrainedString, exception_log_and_reraise, load_env_file, load_module, locate, - MaxRetriesError, - RegexConstrainedString, retry_decorator, send_control_c, try_decorator, diff --git a/tests/test_helpers/test_ipfs/test_base.py b/tests/test_helpers/test_ipfs/test_base.py index 416c9f9390..b7f581edb9 100644 --- a/tests/test_helpers/test_ipfs/test_base.py +++ b/tests/test_helpers/test_ipfs/test_base.py @@ -22,7 +22,7 @@ import os from unittest.mock import patch -from aea.helpers.ipfs.base import _is_text, IPFSHashOnly +from aea.helpers.ipfs.base import IPFSHashOnly, _is_text from tests.conftest import CUR_PATH FILE_PATH = "__init__.py" diff --git a/tests/test_helpers/test_pipe/test_pipe.py b/tests/test_helpers/test_pipe/test_pipe.py index 8d4fc3d9b9..41fdb0d1cd 100644 --- a/tests/test_helpers/test_pipe/test_pipe.py +++ b/tests/test_helpers/test_pipe/test_pipe.py @@ -25,12 +25,12 @@ from aea.helpers.pipe import ( IPCChannelClient, - make_ipc_channel, - make_ipc_channel_client, PosixNamedPipeChannel, PosixNamedPipeChannelClient, TCPSocketChannel, TCPSocketChannelClient, + make_ipc_channel, + make_ipc_channel_client, ) from tests.conftest import skip_test_windows diff --git a/tests/test_helpers/test_search/test_models.py b/tests/test_helpers/test_search/test_models.py index 6e64f5028f..fbf6e152ac 100644 --- a/tests/test_helpers/test_search/test_models.py +++ b/tests/test_helpers/test_search/test_models.py @@ -32,11 +32,11 @@ ConstraintTypes, DataModel, Description, - generate_data_model, Location, Not, Or, Query, + generate_data_model, ) diff --git a/tests/test_launcher.py b/tests/test_launcher.py index 6e0f30e82d..3b4ec4c1a5 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -31,10 +31,10 @@ from aea.cli.core import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE from aea.helpers.base import cd -from aea.launcher import _run_agent, AEALauncher +from aea.launcher import AEALauncher, _run_agent from aea.test_tools.test_cases import CLI_LOG_OPTION from tests.common.utils import wait_for_condition -from tests.conftest import AUTHOR, CliRunner, CUR_PATH +from tests.conftest import AUTHOR, CUR_PATH, CliRunner class TestThreadLauncherMode: diff --git a/tests/test_mail/test_base.py b/tests/test_mail/test_base.py index 71282b3083..03cd58bd7b 100644 --- a/tests/test_mail/test_base.py +++ b/tests/test_mail/test_base.py @@ -25,15 +25,15 @@ import aea from aea.configurations.base import PublicId -from aea.mail.base import Envelope, EnvelopeContext, ProtobufEnvelopeSerializer, URI +from aea.mail.base import URI, Envelope, EnvelopeContext, ProtobufEnvelopeSerializer from aea.multiplexer import InBox, Multiplexer, OutBox from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from packages.fetchai.connections.local.connection import LocalNode from tests.conftest import ( + UNKNOWN_PROTOCOL_PUBLIC_ID, _make_dummy_connection, _make_local_connection, - UNKNOWN_PROTOCOL_PUBLIC_ID, ) diff --git a/tests/test_multiplexer.py b/tests/test_multiplexer.py index f88202960e..a33f19f3a5 100644 --- a/tests/test_multiplexer.py +++ b/tests/test_multiplexer.py @@ -27,7 +27,7 @@ from pathlib import Path from threading import Thread from unittest import mock -from unittest.mock import call, MagicMock, patch +from unittest.mock import MagicMock, call, patch import pytest @@ -44,12 +44,12 @@ from tests.common.utils import wait_for_condition from .conftest import ( + UNKNOWN_CONNECTION_PUBLIC_ID, + UNKNOWN_PROTOCOL_PUBLIC_ID, _make_dummy_connection, _make_local_connection, _make_stub_connection, logger, - UNKNOWN_CONNECTION_PUBLIC_ID, - UNKNOWN_PROTOCOL_PUBLIC_ID, ) diff --git a/tests/test_packages/test_connections/test_http_client/test_http_client.py b/tests/test_packages/test_connections/test_http_client/test_http_client.py index 590ae817f1..46fa4697c2 100644 --- a/tests/test_packages/test_connections/test_http_client/test_http_client.py +++ b/tests/test_packages/test_connections/test_http_client/test_http_client.py @@ -35,7 +35,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage from tests.common.mocks import AnyStringWith -from tests.conftest import get_host, get_unused_tcp_port, UNKNOWN_PROTOCOL_PUBLIC_ID +from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID, get_host, get_unused_tcp_port logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_http_server/test_http_server.py b/tests/test_packages/test_connections/test_http_server/test_http_server.py index aa5270162e..a233cff419 100644 --- a/tests/test_packages/test_connections/test_http_server/test_http_server.py +++ b/tests/test_packages/test_connections/test_http_server/test_http_server.py @@ -23,7 +23,7 @@ import logging import os from traceback import print_exc -from typing import cast, Tuple +from typing import Tuple, cast from unittest.mock import Mock, patch import aiohttp @@ -45,11 +45,11 @@ from packages.fetchai.protocols.http.message import HttpMessage from tests.common.mocks import RegexComparator from tests.conftest import ( - get_host, - get_unused_tcp_port, HTTP_PROTOCOL_PUBLIC_ID, ROOT_DIR, UNKNOWN_PROTOCOL_PUBLIC_ID, + get_host, + get_unused_tcp_port, ) logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_local/test_search_services.py b/tests/test_packages/test_connections/test_local/test_search_services.py index e6633574de..dc6dea7450 100644 --- a/tests/test_packages/test_connections/test_local/test_search_services.py +++ b/tests/test_packages/test_connections/test_local/test_search_services.py @@ -45,7 +45,7 @@ from packages.fetchai.protocols.oef_search.message import OefSearchMessage from tests.common.mocks import AnyStringWith from tests.common.utils import wait_for_condition -from tests.conftest import _make_local_connection, MAX_FLAKY_RERUNS +from tests.conftest import MAX_FLAKY_RERUNS, _make_local_connection class OefSearchDialogues(BaseOefSearchDialogues): diff --git a/tests/test_packages/test_connections/test_oef/test_communication.py b/tests/test_packages/test_connections/test_oef/test_communication.py index d0afb31781..e39741e3c1 100644 --- a/tests/test_packages/test_connections/test_oef/test_communication.py +++ b/tests/test_packages/test_connections/test_oef/test_communication.py @@ -25,7 +25,7 @@ import time import unittest from contextlib import suppress -from typing import cast, Dict +from typing import Dict, cast from unittest import mock from unittest.mock import patch @@ -59,9 +59,9 @@ ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage from tests.conftest import ( - _make_oef_connection, FETCHAI_ADDRESS_ONE, FETCHAI_ADDRESS_TWO, + _make_oef_connection, ) logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py index 9b53827308..b9230ea5b1 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py @@ -31,13 +31,13 @@ from aea.identity.base import Identity from aea.multiplexer import Multiplexer from packages.fetchai.connections.p2p_libp2p.connection import ( - _golang_module_build_async, - _golang_module_run, - AwaitableProc, LIBP2P_NODE_MODULE_NAME, + AwaitableProc, P2PLibp2pConnection, + _golang_module_build_async, + _golang_module_run, ) -from tests.conftest import _make_libp2p_connection, COSMOS +from tests.conftest import COSMOS, _make_libp2p_connection DEFAULT_PORT = 10234 DEFAULT_NET_SIZE = 4 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py index 9e726a4f15..c83f9b5887 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py @@ -30,14 +30,14 @@ from aea.protocols.default.message import DefaultMessage from aea.test_tools.test_cases import AEATestCaseEmpty from tests.conftest import ( - _make_libp2p_client_connection, - _make_libp2p_connection, - libp2p_log_on_failure, - libp2p_log_on_failure_all, PUBLIC_DHT_DELEGATE_URI_1, PUBLIC_DHT_DELEGATE_URI_2, PUBLIC_DHT_P2P_MADDR_1, PUBLIC_DHT_P2P_MADDR_2, + _make_libp2p_client_connection, + _make_libp2p_connection, + libp2p_log_on_failure, + libp2p_log_on_failure_all, ) DEFAULT_PORT = 10234 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py index 25c898821f..3d1831717c 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py @@ -33,9 +33,9 @@ P2PLibp2pClientConnection, ) from tests.conftest import ( + COSMOS, _make_libp2p_client_connection, _make_libp2p_connection, - COSMOS, libp2p_log_on_failure, ) diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index 413f6294c5..188089bdb7 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -21,7 +21,7 @@ import logging import time from threading import Thread -from typing import Any, cast, Dict, Optional, Tuple +from typing import Any, Dict, Optional, Tuple, cast from urllib.parse import urlencode import pytest diff --git a/tests/test_packages/test_protocols/test_ml_trade.py b/tests/test_packages/test_protocols/test_ml_trade.py index fc93e3ba1c..3b8add1aa6 100644 --- a/tests/test_packages/test_protocols/test_ml_trade.py +++ b/tests/test_packages/test_protocols/test_ml_trade.py @@ -38,10 +38,10 @@ MlTradeDialogue, MlTradeDialogues, ) +from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from packages.fetchai.protocols.ml_trade.message import ( logger as ml_trade_message_logger, ) -from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_protocols/test_oef_search.py b/tests/test_packages/test_protocols/test_oef_search.py index 41f2d1dccc..36016ac7eb 100644 --- a/tests/test_packages/test_protocols/test_oef_search.py +++ b/tests/test_packages/test_protocols/test_oef_search.py @@ -37,10 +37,10 @@ OefSearchDialogue, OefSearchDialogues, ) +from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.oef_search.message import ( logger as oef_search_message_logger, ) -from packages.fetchai.protocols.oef_search.message import OefSearchMessage from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_tac.py b/tests/test_packages/test_protocols/test_tac.py index f9dd8f5ad8..3cadefbf99 100644 --- a/tests/test_packages/test_protocols/test_tac.py +++ b/tests/test_packages/test_protocols/test_tac.py @@ -33,8 +33,8 @@ from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel from packages.fetchai.protocols.tac.dialogues import TacDialogue, TacDialogues -from packages.fetchai.protocols.tac.message import logger as tac_message_logger from packages.fetchai.protocols.tac.message import TacMessage +from packages.fetchai.protocols.tac.message import logger as tac_message_logger from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_protocols/test_dialogue/test_base.py b/tests/test_protocols/test_dialogue/test_base.py index de3c33d420..19994e658b 100644 --- a/tests/test_protocols/test_dialogue/test_base.py +++ b/tests/test_protocols/test_dialogue/test_base.py @@ -19,7 +19,7 @@ """This module contains the tests for the dialogue/base.py module.""" -from typing import cast, FrozenSet, Tuple, Type +from typing import FrozenSet, Tuple, Type, cast import pytest diff --git a/tests/test_protocols/test_generator/test_common.py b/tests/test_protocols/test_generator/test_common.py index f31b8a072e..dbd496f6b9 100644 --- a/tests/test_protocols/test_generator/test_common.py +++ b/tests/test_protocols/test_generator/test_common.py @@ -23,7 +23,7 @@ import tempfile from pathlib import Path from subprocess import CalledProcessError # nosec -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.protocols.generator.common import ( _camel_case_to_snake_case, diff --git a/tests/test_protocols/test_generator/test_end_to_end.py b/tests/test_protocols/test_generator/test_end_to_end.py index 217ecf0c9c..bc9f189eca 100644 --- a/tests/test_protocols/test_generator/test_end_to_end.py +++ b/tests/test_protocols/test_generator/test_end_to_end.py @@ -24,7 +24,7 @@ import time from pathlib import Path from threading import Thread -from typing import cast, Optional +from typing import Optional, cast from aea.aea_builder import AEABuilder from aea.configurations.base import ComponentType, ProtocolId, PublicId, SkillConfig diff --git a/tests/test_protocols/test_generator/test_extract_specification.py b/tests/test_protocols/test_generator/test_extract_specification.py index deb111388d..2161c9d559 100644 --- a/tests/test_protocols/test_generator/test_extract_specification.py +++ b/tests/test_protocols/test_generator/test_extract_specification.py @@ -21,11 +21,12 @@ import os import shutil import tempfile -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.configurations.base import ProtocolSpecificationParseError from aea.protocols.generator.common import load_protocol_specification from aea.protocols.generator.extract_specification import ( + PythonicProtocolSpecification, _ct_specification_type_to_python_type, _mt_specification_type_to_python_type, _optional_specification_type_to_python_type, @@ -34,7 +35,6 @@ _pt_specification_type_to_python_type, _specification_type_to_python_type, extract, - PythonicProtocolSpecification, ) from tests.test_protocols.test_generator.common import PATH_TO_T_PROTOCOL_SPECIFICATION diff --git a/tests/test_protocols/test_generator/test_generator.py b/tests/test_protocols/test_generator/test_generator.py index 82e074b89c..d47b575af4 100644 --- a/tests/test_protocols/test_generator/test_generator.py +++ b/tests/test_protocols/test_generator/test_generator.py @@ -24,7 +24,7 @@ import tempfile from pathlib import Path from typing import cast -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest diff --git a/tests/test_protocols/test_generator/test_validate.py b/tests/test_protocols/test_generator/test_validate.py index 9211f29623..eeeda771f3 100644 --- a/tests/test_protocols/test_generator/test_validate.py +++ b/tests/test_protocols/test_generator/test_validate.py @@ -18,10 +18,14 @@ # ------------------------------------------------------------------------------ """This module contains the tests for generator/validate.py module.""" import logging -from unittest import mock, TestCase +from unittest import TestCase, mock from aea.configurations.base import CRUDCollection, SpeechActContentConfig from aea.protocols.generator.validate import ( + CONTENT_NAME_REGEX_PATTERN, + END_STATE_REGEX_PATTERN, + PERFORMATIVE_REGEX_PATTERN, + ROLE_REGEX_PATTERN, _has_brackets, _is_reserved_name, _is_valid_content_type_format, @@ -44,10 +48,6 @@ _validate_roles, _validate_speech_acts_section, _validate_termination, - CONTENT_NAME_REGEX_PATTERN, - END_STATE_REGEX_PATTERN, - PERFORMATIVE_REGEX_PATTERN, - ROLE_REGEX_PATTERN, validate, ) diff --git a/tests/test_registries/test_base.py b/tests/test_registries/test_base.py index 3bc28e1d4d..f8e94145c9 100644 --- a/tests/test_registries/test_base.py +++ b/tests/test_registries/test_base.py @@ -53,7 +53,7 @@ ) from aea.registries.resources import Resources from aea.skills.base import Skill -from tests.conftest import _make_dummy_connection, CUR_PATH, ROOT_DIR +from tests.conftest import CUR_PATH, ROOT_DIR, _make_dummy_connection class TestContractRegistry: diff --git a/tests/test_skills/test_base.py b/tests/test_skills/test_base.py index a1f193b8e2..9468b317d9 100644 --- a/tests/test_skills/test_base.py +++ b/tests/test_skills/test_base.py @@ -23,7 +23,7 @@ from pathlib import Path from queue import Queue from types import SimpleNamespace -from unittest import mock, TestCase +from unittest import TestCase, mock from unittest.mock import MagicMock, Mock import pytest @@ -39,22 +39,22 @@ from aea.protocols.base import Message from aea.registries.resources import Resources from aea.skills.base import ( - _check_duplicate_classes, - _print_warning_message_for_non_declared_skill_components, Behaviour, Handler, Model, Skill, SkillComponent, SkillContext, + _check_duplicate_classes, + _print_warning_message_for_non_declared_skill_components, ) from tests.conftest import ( - _make_dummy_connection, ETHEREUM, ETHEREUM_PRIVATE_KEY_PATH, FETCHAI, FETCHAI_PRIVATE_KEY_PATH, ROOT_DIR, + _make_dummy_connection, ) diff --git a/tests/test_skills/test_behaviours.py b/tests/test_skills/test_behaviours.py index 9aee8d143e..d0cf7fd4fb 100644 --- a/tests/test_skills/test_behaviours.py +++ b/tests/test_skills/test_behaviours.py @@ -19,7 +19,7 @@ """This module contains the tests for the behaviours.""" from collections import Counter -from unittest import mock, TestCase +from unittest import TestCase, mock import pytest diff --git a/tests/test_skills/test_error.py b/tests/test_skills/test_error.py index a397c3ba1a..ff38b21c2b 100644 --- a/tests/test_skills/test_error.py +++ b/tests/test_skills/test_error.py @@ -37,7 +37,7 @@ from aea.skills.error.handlers import ErrorHandler from packages.fetchai.protocols.fipa.message import FipaMessage from tests.common.utils import wait_for_condition -from tests.conftest import _make_dummy_connection, CUR_PATH +from tests.conftest import CUR_PATH, _make_dummy_connection logger = logging.getLogger(__file__) diff --git a/tests/test_skills/test_tasks.py b/tests/test_skills/test_tasks.py index 336ec68d3f..4308e14740 100644 --- a/tests/test_skills/test_tasks.py +++ b/tests/test_skills/test_tasks.py @@ -19,10 +19,10 @@ """This module contains the tests for the tasks module.""" -from unittest import mock, TestCase +from unittest import TestCase, mock from unittest.mock import Mock, patch -from aea.skills.tasks import init_worker, Task, TaskManager +from aea.skills.tasks import Task, TaskManager, init_worker def _raise_exception(self, *args, **kwargs): From f9b7d51fe730e485b2694ae0963dce7d5f3a30f0 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Sun, 20 Sep 2020 15:40:29 +0200 Subject: [PATCH 015/131] ignore *_pb2.py files --- aea/helpers/ipfs/pb/merkledag_pb2.py | 3 +-- aea/helpers/ipfs/pb/unixfs_pb2.py | 3 +-- aea/helpers/multiaddr/crypto_pb2.py | 5 ++--- aea/mail/base_pb2.py | 3 +-- setup.cfg | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/aea/helpers/ipfs/pb/merkledag_pb2.py b/aea/helpers/ipfs/pb/merkledag_pb2.py index 8a5a344e8a..e58b9a94c8 100644 --- a/aea/helpers/ipfs/pb/merkledag_pb2.py +++ b/aea/helpers/ipfs/pb/merkledag_pb2.py @@ -4,13 +4,12 @@ import sys +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) 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 symbol_database as _symbol_database -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/aea/helpers/ipfs/pb/unixfs_pb2.py b/aea/helpers/ipfs/pb/unixfs_pb2.py index f0c93e07b1..08d096b3c5 100644 --- a/aea/helpers/ipfs/pb/unixfs_pb2.py +++ b/aea/helpers/ipfs/pb/unixfs_pb2.py @@ -4,13 +4,12 @@ import sys +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) 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 symbol_database as _symbol_database -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/aea/helpers/multiaddr/crypto_pb2.py b/aea/helpers/multiaddr/crypto_pb2.py index 5838976bd0..9094243b4c 100644 --- a/aea/helpers/multiaddr/crypto_pb2.py +++ b/aea/helpers/multiaddr/crypto_pb2.py @@ -4,13 +4,12 @@ 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 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 symbol_database as _symbol_database -from google.protobuf.internal import enum_type_wrapper - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) # @@protoc_insertion_point(imports) diff --git a/aea/mail/base_pb2.py b/aea/mail/base_pb2.py index 8adfaeb583..60579813c1 100644 --- a/aea/mail/base_pb2.py +++ b/aea/mail/base_pb2.py @@ -4,13 +4,12 @@ import sys +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) 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 symbol_database as _symbol_database -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/setup.cfg b/setup.cfg index 6951a36e91..15b772d51b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ use_parentheses=True ensure_newline_before_comments = True line_length=88 order_by_type=True - +skip_glob = **/*_pb2.py [mypy] python_version = 3.7 From 11a6c6cafa6003ed69146375a74261cc8d8e163f Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Sun, 20 Sep 2020 16:05:13 +0200 Subject: [PATCH 016/131] fix docs according to isort changes --- docs/agent-vs-aea.md | 1 - docs/cli-vs-programmatic-aeas.md | 1 - docs/generic-skills-step-by-step.md | 8 -------- 3 files changed, 10 deletions(-) diff --git a/docs/agent-vs-aea.md b/docs/agent-vs-aea.md index a49868c25d..0d31c84ae9 100644 --- a/docs/agent-vs-aea.md +++ b/docs/agent-vs-aea.md @@ -173,7 +173,6 @@ from aea.identity.base import Identity from aea.mail.base import Envelope from aea.protocols.default.message import DefaultMessage - INPUT_FILE = "input_file" OUTPUT_FILE = "output_file" diff --git a/docs/cli-vs-programmatic-aeas.md b/docs/cli-vs-programmatic-aeas.md index 379e573926..2bd526eb3a 100644 --- a/docs/cli-vs-programmatic-aeas.md +++ b/docs/cli-vs-programmatic-aeas.md @@ -80,7 +80,6 @@ from aea.identity.base import Identity from aea.protocols.base import Protocol from aea.registries.resources import Resources from aea.skills.base import Skill - from packages.fetchai.connections.ledger.connection import LedgerConnection from packages.fetchai.connections.p2p_libp2p.connection import P2PLibp2pConnection from packages.fetchai.connections.soef.connection import SOEFConnection diff --git a/docs/generic-skills-step-by-step.md b/docs/generic-skills-step-by-step.md index 55d354ed9f..37fb56f7e3 100644 --- a/docs/generic-skills-step-by-step.md +++ b/docs/generic-skills-step-by-step.md @@ -94,7 +94,6 @@ Open the `behaviours.py` file (`my_generic_seller/skills/generic_seller/behaviou from typing import cast from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.generic_seller.dialogues import ( @@ -103,7 +102,6 @@ from packages.fetchai.skills.generic_seller.dialogues import ( ) from packages.fetchai.skills.generic_seller.strategy import GenericStrategy - DEFAULT_SERVICES_INTERVAL = 60.0 LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" @@ -298,7 +296,6 @@ from aea.helpers.transaction.base import TransactionDigest from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler - from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage @@ -1057,7 +1054,6 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialo from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel from aea.skills.base import Model - from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage @@ -1410,7 +1406,6 @@ Open the `behaviours.py` (`my_generic_buyer/skills/generic_buyer/behaviours.py`) from typing import cast from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.generic_buyer.dialogues import ( @@ -1495,7 +1490,6 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler - from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage @@ -2425,8 +2419,6 @@ from aea.protocols.signing.dialogues import SigningDialogue as BaseSigningDialog from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model - - from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage From 50cbbcef22d272bd9244d0ed7e9330448e0cccb4 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Sun, 20 Sep 2020 16:34:33 +0200 Subject: [PATCH 017/131] add isort and isort-check to tox.ini envlist --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d1eab833e6..02d40f3a99 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ ; we set the associated flag (e.g. for linting we don't need ; the package installation). [tox] -envlist = bandit, black, black-check, copyright_check, docs, flake8, liccheck, mypy, py{3.6,3.7,3.8} +envlist = bandit, black, black-check, isort, isort-check, copyright_check, docs, flake8, liccheck, mypy, py{3.6,3.7,3.8} [testenv] basepython = python3 From 6d5253811242b9e95b093ff1b32300b95fb13ffe Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Sun, 20 Sep 2020 16:35:07 +0200 Subject: [PATCH 018/131] add isort in Contribute section of README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2e21a4006b..63505da775 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,10 @@ The following steps are **only relevant if you intend to contribute** to the rep tox -e black +- To run isort code formatter: + + tox -e isort + - To run bandit security checks: tox -e bandit From db7bedea51560b16ae200cc31dfd991b7c365283 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Sun, 20 Sep 2020 16:35:25 +0200 Subject: [PATCH 019/131] make generator to call 'isort' --- aea/protocols/generator/base.py | 6 ++++ aea/protocols/generator/common.py | 34 +++++++++++++++++-- docs/api/protocols/generator/base.md | 2 ++ tests/test_cli/test_generate/test_generate.py | 25 ++++++++++++-- .../test_generator/test_common.py | 7 ++++ tox.ini | 1 + 6 files changed, 70 insertions(+), 5 deletions(-) diff --git a/aea/protocols/generator/base.py b/aea/protocols/generator/base.py index 198a1a0dab..f1d06a53dd 100644 --- a/aea/protocols/generator/base.py +++ b/aea/protocols/generator/base.py @@ -49,6 +49,7 @@ check_protobuf_using_protoc, load_protocol_specification, try_run_black_formatting, + try_run_isort_formatting, try_run_protoc, ) from aea.protocols.generator.extract_specification import extract @@ -1942,6 +1943,7 @@ def generate_full_mode(self) -> None: b) creates the protocol buffer schema file. c) generates python modules. d) applies black formatting + e) applies isort formatting :return: None """ @@ -1991,6 +1993,9 @@ def generate_full_mode(self) -> None: # Run black formatting try_run_black_formatting(self.path_to_generated_protocol_package) + # Run isort formatting + try_run_isort_formatting(self.path_to_generated_protocol_package) + # Warn if specification has custom types if len(self.spec.all_custom_types) > 0: incomplete_generation_warning_msg = "The generated protocol is incomplete, because the protocol specification contains the following custom types: {}. Update the generated '{}' file with the appropriate implementations of these custom types.".format( @@ -2006,6 +2011,7 @@ def generate(self, protobuf_only: bool = False) -> None: b) creates the protocol buffer schema file. c) generates python modules. d) applies black formatting + e) applies isort formatting If in "protobuf only" mode (protobuf_only is True), it only does a) and b). diff --git a/aea/protocols/generator/common.py b/aea/protocols/generator/common.py index 226c29ece9..e0f8350f64 100644 --- a/aea/protocols/generator/common.py +++ b/aea/protocols/generator/common.py @@ -63,6 +63,17 @@ "str": "string", } +ISORT_CLI_ARGS = [ + "--multi-line=3", + "--trailing-comma", + "--force-grid-wrap=0", + "--use-parentheses", + "--line-width=88", + "--quiet", + "--sg", + "**/*_pb2.py", +] + def _to_camel_case(text: str) -> str: """ @@ -294,13 +305,19 @@ def check_prerequisites() -> None: :return: None """ - # check protocol buffer compiler is installed + # check black code formatter is installed if not is_installed("black"): raise FileNotFoundError( "Cannot find black code formatter! To install, please follow this link: https://black.readthedocs.io/en/stable/installation_and_usage.html" ) - # check black code formatter is installed + # check isort code formatter is installed + if not is_installed("isort"): + raise FileNotFoundError( + "Cannot find isort code formatter! To install, please follow this link: https://pycqa.github.io/isort/#installing-isort" + ) + + # check protocol buffer compiler is installed if not is_installed("protoc"): raise FileNotFoundError( "Cannot find protocol buffer compiler! To install, please follow this link: https://developers.google.com/protocol-buffers/" @@ -352,6 +369,19 @@ def try_run_black_formatting(path_to_protocol_package: str) -> None: ) +def try_run_isort_formatting(path_to_protocol_package: str) -> None: + """ + Run Isort code formatting via subprocess. + + :param path_to_protocol_package: a path where formatting should be applied. + :return: None + """ + subprocess.run( # nosec + [sys.executable, "-m", "isort", *ISORT_CLI_ARGS, path_to_protocol_package], + check=True, + ) + + def try_run_protoc(path_to_generated_protocol_package, name) -> None: """ Run 'protoc' protocol buffer compiler via subprocess. diff --git a/docs/api/protocols/generator/base.md b/docs/api/protocols/generator/base.md index 52e1235f26..ef1bead8e6 100644 --- a/docs/api/protocols/generator/base.md +++ b/docs/api/protocols/generator/base.md @@ -58,6 +58,7 @@ a) validates the protocol specification. b) creates the protocol buffer schema file. c) generates python modules. d) applies black formatting +d) applies isort formatting **Returns**: @@ -75,6 +76,7 @@ a) validates the protocol specification. b) creates the protocol buffer schema file. c) generates python modules. d) applies black formatting +d) applies isort formatting If in "protobuf only" mode (protobuf_only is True), it only does a) and b). diff --git a/tests/test_cli/test_generate/test_generate.py b/tests/test_cli/test_generate/test_generate.py index 673d31157e..0528b6e166 100644 --- a/tests/test_cli/test_generate/test_generate.py +++ b/tests/test_cli/test_generate/test_generate.py @@ -18,7 +18,6 @@ # ------------------------------------------------------------------------------ """This test module contains the tests for the aea.cli.generate sub-module.""" - from unittest import TestCase, mock from click import ClickException @@ -39,6 +38,13 @@ def _which_mock(arg): return None +def _which_mock_isort(arg): + if arg == "isort": + return None + else: + return True + + def _raise_psperror(*args, **kwargs): raise ProtocolSpecificationParseError() @@ -50,14 +56,14 @@ def _raise_psperror(*args, **kwargs): class GenerateItemTestCase(TestCase): """Test case for fetch_agent_locally method.""" - def test__generate_item_file_exists(self, *mocks): + def test__generate_item_file_exists(self, *_mocks): """Test for fetch_agent_locally method file exists result.""" ctx_mock = ContextMock() with self.assertRaises(ClickException): _generate_item(ctx_mock, "protocol", "path") @mock.patch("aea.protocols.generator.base.shutil.which", _which_mock) - def test__generate_item_no_res(self, *mocks): + def test__generate_item_no_res(self, *_mocks): """Test for fetch_agent_locally method no black.""" ctx_mock = ContextMock() with self.assertRaises(ClickException) as cm: @@ -69,6 +75,19 @@ def test__generate_item_no_res(self, *mocks): ) self.assertEqual(cm.exception.message, expected_msg) + @mock.patch("aea.protocols.generator.base.shutil.which", _which_mock_isort) + def test__generate_item_no_res_isort_missing(self, *_mocks): + """Test for fetch_agent_locally method no isort.""" + ctx_mock = ContextMock() + with self.assertRaises(ClickException) as cm: + _generate_item(ctx_mock, "protocol", "path") + expected_msg = ( + "Protocol is NOT generated. The following error happened while generating the protocol:\n" + "Cannot find isort code formatter! To install, please follow this link: " + "https://pycqa.github.io/isort/#installing-isort" + ) + self.assertEqual(cm.exception.message, expected_msg) + @mock.patch("aea.cli.generate.os.path.exists", return_value=False) @mock.patch("aea.protocols.generator.base.shutil.which", return_value="some") @mock.patch("aea.cli.generate.ProtocolGenerator.generate", _raise_psperror) diff --git a/tests/test_protocols/test_generator/test_common.py b/tests/test_protocols/test_generator/test_common.py index dbd496f6b9..5dce4dd880 100644 --- a/tests/test_protocols/test_generator/test_common.py +++ b/tests/test_protocols/test_generator/test_common.py @@ -40,6 +40,7 @@ is_installed, load_protocol_specification, try_run_black_formatting, + try_run_isort_formatting, try_run_protoc, ) from tests.test_protocols.test_generator.common import ( @@ -398,6 +399,12 @@ def test_try_run_black_formatting(self, mocked_subprocess): try_run_black_formatting("some_path") mocked_subprocess.assert_called_once() + @mock.patch("subprocess.run") + def test_try_run_isort_formatting(self, mocked_subprocess): + """Test the 'try_run_isort_formatting' method""" + try_run_isort_formatting("some_path") + mocked_subprocess.assert_called_once() + @mock.patch("subprocess.run") def test_try_run_protoc(self, mocked_subprocess): """Test the 'try_run_protoc' method""" diff --git a/tox.ini b/tox.ini index 02d40f3a99..651d091b37 100644 --- a/tox.ini +++ b/tox.ini @@ -28,6 +28,7 @@ deps = openapi-core==0.13.2 openapi-spec-validator==0.2.8 black==19.10b0 + isort==5.5.2 mistune==2.0.0a4 aiohttp==3.6.2 SQLAlchemy==1.3.16 From 0a40de7dfd84fe02a6e3fb4f32cdfedf8c73b525 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Sun, 20 Sep 2020 17:23:34 +0200 Subject: [PATCH 020/131] update standalone transaction docs after isort --- docs/standalone-transaction.md | 2 -- .../test_standalone_transaction/test_standalone_transaction.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/standalone-transaction.md b/docs/standalone-transaction.md index bf23bb1275..1c43c03f21 100644 --- a/docs/standalone-transaction.md +++ b/docs/standalone-transaction.md @@ -10,7 +10,6 @@ from aea.crypto.helpers import create_private_key, try_generate_testnet_wealth from aea.crypto.ledger_apis import LedgerApis from aea.crypto.wallet import Wallet - logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) @@ -91,7 +90,6 @@ from aea.crypto.helpers import create_private_key, try_generate_testnet_wealth from aea.crypto.ledger_apis import LedgerApis from aea.crypto.wallet import Wallet - logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) 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 e9df590305..2a98cb68e1 100644 --- a/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py @@ -37,7 +37,6 @@ test_logger = logging.getLogger(__name__) -@pytest.mark.integration(reruns=MAX_FLAKY_RERUNS_INTEGRATION) class TestStandaloneTransaction(BaseAEATestCase): """This class contains the tests for the code-blocks in the agent-vs-aea.md file.""" @@ -67,6 +66,7 @@ def test_read_md_file(self): self.code_blocks[-1] == self.python_file ), "Files must be exactly the same." + @pytest.mark.integration(reruns=MAX_FLAKY_RERUNS_INTEGRATION) def test_run_end_to_end(self): """Run the transaction from the file.""" try: From 1c06001ccdfcf255aa0f38165e972e0580bc2aae Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 10:11:44 +0200 Subject: [PATCH 021/131] add new line before local_folder group 'packages' and 'tests' --- aea/test_tools/test_cases.py | 1 + benchmark/checks/check_multiagent.py | 1 + benchmark/framework/executor.py | 1 + examples/gym_ex/proxy/agent.py | 1 + examples/gym_ex/proxy/env.py | 4 ++-- .../fetchai/connections/gym/connection.py | 1 + .../connections/http_client/connection.py | 1 + .../connections/http_server/connection.py | 1 + .../fetchai/connections/ledger/connection.py | 1 + .../connections/ledger/contract_dispatcher.py | 1 + .../connections/ledger/ledger_dispatcher.py | 1 + .../fetchai/connections/local/connection.py | 1 + .../fetchai/connections/oef/connection.py | 1 + .../fetchai/connections/soef/connection.py | 1 + .../fetchai/connections/tcp/tcp_client.py | 1 + .../fetchai/connections/tcp/tcp_server.py | 1 + .../fetchai/connections/webhook/connection.py | 1 + .../protocols/contract_api/dialogues.py | 1 + .../fetchai/protocols/contract_api/message.py | 1 + .../protocols/contract_api/serialization.py | 1 + packages/fetchai/protocols/fipa/dialogues.py | 1 + packages/fetchai/protocols/fipa/message.py | 1 + .../fetchai/protocols/fipa/serialization.py | 1 + packages/fetchai/protocols/gym/dialogues.py | 1 + packages/fetchai/protocols/gym/message.py | 1 + .../fetchai/protocols/gym/serialization.py | 1 + packages/fetchai/protocols/http/dialogues.py | 1 + .../fetchai/protocols/http/serialization.py | 1 + .../fetchai/protocols/ledger_api/dialogues.py | 1 + .../fetchai/protocols/ledger_api/message.py | 1 + .../protocols/ledger_api/serialization.py | 1 + .../fetchai/protocols/ml_trade/dialogues.py | 1 + .../fetchai/protocols/ml_trade/message.py | 1 + .../protocols/ml_trade/serialization.py | 1 + .../fetchai/protocols/oef_search/dialogues.py | 1 + .../fetchai/protocols/oef_search/message.py | 1 + .../protocols/oef_search/serialization.py | 1 + packages/fetchai/protocols/tac/dialogues.py | 1 + packages/fetchai/protocols/tac/message.py | 1 + .../fetchai/protocols/tac/serialization.py | 1 + .../fetchai/skills/aries_alice/behaviours.py | 1 + .../fetchai/skills/aries_alice/dialogues.py | 1 + .../fetchai/skills/aries_alice/handlers.py | 1 + .../fetchai/skills/aries_faber/behaviours.py | 1 + .../fetchai/skills/aries_faber/dialogues.py | 1 + .../fetchai/skills/aries_faber/handlers.py | 1 + .../skills/carpark_detection/strategy.py | 1 + packages/fetchai/skills/echo/handlers.py | 1 + .../skills/erc1155_client/behaviours.py | 1 + .../skills/erc1155_client/dialogues.py | 1 + .../fetchai/skills/erc1155_client/handlers.py | 1 + .../skills/erc1155_deploy/behaviours.py | 1 + .../skills/erc1155_deploy/dialogues.py | 1 + .../fetchai/skills/erc1155_deploy/handlers.py | 1 + .../fetchai/skills/erc1155_deploy/strategy.py | 1 + .../skills/generic_buyer/behaviours.py | 1 + .../fetchai/skills/generic_buyer/dialogues.py | 1 + .../fetchai/skills/generic_buyer/handlers.py | 1 + .../skills/generic_seller/behaviours.py | 1 + .../skills/generic_seller/dialogues.py | 1 + .../fetchai/skills/generic_seller/handlers.py | 1 + packages/fetchai/skills/gym/dialogues.py | 1 + packages/fetchai/skills/gym/handlers.py | 1 + packages/fetchai/skills/gym/helpers.py | 1 + packages/fetchai/skills/gym/tasks.py | 1 + .../fetchai/skills/http_echo/dialogues.py | 1 + packages/fetchai/skills/http_echo/handlers.py | 1 + .../skills/ml_data_provider/dialogues.py | 1 + .../skills/ml_data_provider/handlers.py | 1 + packages/fetchai/skills/ml_train/dialogues.py | 1 + packages/fetchai/skills/ml_train/handlers.py | 1 + .../simple_service_registration/behaviours.py | 1 + .../simple_service_registration/dialogues.py | 1 + .../simple_service_registration/handlers.py | 1 + .../fetchai/skills/tac_control/behaviours.py | 1 + .../fetchai/skills/tac_control/dialogues.py | 1 + packages/fetchai/skills/tac_control/game.py | 1 + .../fetchai/skills/tac_control/handlers.py | 1 + .../skills/tac_control_contract/behaviours.py | 1 + .../skills/tac_control_contract/game.py | 1 + .../skills/tac_control_contract/handlers.py | 1 + .../skills/tac_control_contract/helpers.py | 1 + .../skills/tac_negotiation/behaviours.py | 1 + .../skills/tac_negotiation/dialogues.py | 1 + .../skills/tac_negotiation/handlers.py | 1 + .../skills/tac_negotiation/strategy.py | 1 + .../skills/tac_negotiation/transactions.py | 1 + .../skills/tac_participation/behaviours.py | 1 + .../skills/tac_participation/dialogues.py | 1 + .../fetchai/skills/tac_participation/game.py | 1 + .../skills/tac_participation/handlers.py | 1 + setup.cfg | 3 +++ tests/common/utils.py | 1 + tests/conftest.py | 4 ++-- tests/data/generator/t_protocol/dialogues.py | 1 + tests/data/generator/t_protocol/message.py | 1 + .../generator/t_protocol/serialization.py | 1 + .../generator/t_protocol_no_ct/dialogues.py | 1 + .../t_protocol_no_ct/serialization.py | 1 + tests/test_aea.py | 20 +++++++++---------- tests/test_aea_builder.py | 1 + tests/test_agent.py | 4 ++-- tests/test_agent_loop.py | 1 + tests/test_cli/test_add/test_connection.py | 1 + tests/test_cli/test_add/test_contract.py | 1 + tests/test_cli/test_add/test_generic.py | 1 + tests/test_cli/test_add/test_protocol.py | 1 + tests/test_cli/test_add/test_skill.py | 1 + tests/test_cli/test_add_key.py | 1 + tests/test_cli/test_config.py | 1 + tests/test_cli/test_create.py | 1 + tests/test_cli/test_delete.py | 1 + tests/test_cli/test_fetch.py | 1 + tests/test_cli/test_fingerprint.py | 1 + tests/test_cli/test_freeze.py | 1 + tests/test_cli/test_generate/test_generate.py | 1 + .../test_cli/test_generate/test_protocols.py | 1 + tests/test_cli/test_generate_key.py | 1 + tests/test_cli/test_generate_wealth.py | 1 + tests/test_cli/test_get_address.py | 1 + tests/test_cli/test_get_multiaddress.py | 1 + tests/test_cli/test_get_wealth.py | 1 + tests/test_cli/test_gui.py | 1 + tests/test_cli/test_init.py | 1 + tests/test_cli/test_install.py | 1 + tests/test_cli/test_interact.py | 1 + tests/test_cli/test_launch.py | 1 + tests/test_cli/test_list.py | 1 + tests/test_cli/test_login.py | 1 + tests/test_cli/test_logout.py | 1 + tests/test_cli/test_publish.py | 1 + tests/test_cli/test_push.py | 1 + tests/test_cli/test_register.py | 1 + tests/test_cli/test_registry/test_fetch.py | 1 + tests/test_cli/test_registry/test_publish.py | 1 + tests/test_cli/test_registry/test_push.py | 1 + tests/test_cli/test_remove/test_connection.py | 1 + tests/test_cli/test_remove/test_contract.py | 1 + tests/test_cli/test_remove/test_protocol.py | 1 + .../test_cli/test_remove/test_remove_item.py | 1 + tests/test_cli/test_remove/test_skill.py | 1 + tests/test_cli/test_run.py | 1 + .../test_cli/test_scaffold/test_connection.py | 1 + tests/test_cli/test_scaffold/test_generic.py | 1 + .../test_cli/test_scaffold/test_protocols.py | 1 + tests/test_cli/test_scaffold/test_skills.py | 1 + tests/test_cli/test_search.py | 1 + tests/test_cli/test_utils/test_config.py | 1 + tests/test_cli/test_utils/test_utils.py | 1 + tests/test_cli_gui/test_create.py | 1 + tests/test_cli_gui/test_misc.py | 2 +- tests/test_cli_gui/test_run_agent.py | 1 + tests/test_components/test_base.py | 1 + tests/test_configurations/test_aea_config.py | 1 + tests/test_configurations/test_base.py | 1 + tests/test_configurations/test_loader.py | 1 + tests/test_configurations/test_schema.py | 1 + tests/test_connections/test_stub.py | 1 + tests/test_context/test_base.py | 1 + tests/test_contracts/test_base.py | 1 + tests/test_crypto/test_cosmos.py | 1 + tests/test_crypto/test_ethereum.py | 1 + tests/test_crypto/test_fetchai.py | 1 + tests/test_crypto/test_helpers.py | 1 + tests/test_crypto/test_ledger_apis.py | 1 + .../test_registry/test_crypto_registry.py | 1 + .../test_registry/test_ledger_api_registry.py | 1 + tests/test_crypto/test_wallet.py | 1 + tests/test_decision_maker/test_default.py | 1 + .../test_ownership_state.py | 1 + tests/test_decision_maker/test_preferences.py | 1 + .../test_agent_vs_aea/test_agent_vs_aea.py | 1 + .../test_programmatic_aea.py | 4 ++-- .../programmatic_aea.py | 1 + .../test_cli_vs_programmatic_aea.py | 1 + tests/test_docs/test_docs_protocol.py | 1 + tests/test_docs/test_docs_skill.py | 1 + .../test_multiplexer_standalone.py | 4 ++-- .../test_orm_integration.py | 1 + .../test_skill_guide/test_skill_guide.py | 1 + .../test_standalone_transaction.py | 4 ++-- ..._client_connection_to_aries_cloud_agent.py | 1 + tests/test_helpers/test_base.py | 1 + tests/test_helpers/test_exec_timeout.py | 1 + tests/test_helpers/test_ipfs/test_base.py | 1 + tests/test_helpers/test_pipe/test_pipe.py | 1 + tests/test_identity/test_base.py | 1 + tests/test_launcher.py | 1 + tests/test_mail/test_base.py | 1 + tests/test_multiplexer.py | 4 ++-- .../test_connections/test_gym/test_gym.py | 1 + .../test_http_client/test_http_client.py | 1 + .../test_http_server/test_http_server.py | 1 + .../test_http_server_and_client.py | 1 + .../test_ledger/test_contract_api.py | 1 + .../test_ledger/test_ledger_api.py | 1 + .../test_connections/test_local/test_misc.py | 1 + .../test_local/test_search_services.py | 1 + .../test_oef/test_communication.py | 1 + .../test_connections/test_oef/test_models.py | 1 + .../test_oef/test_oef_serializer.py | 1 + .../test_p2p_libp2p/test_aea_cli.py | 1 + .../test_p2p_libp2p/test_communication.py | 1 + .../test_p2p_libp2p/test_errors.py | 1 + .../test_p2p_libp2p/test_fault_tolerance.py | 1 + .../test_p2p_libp2p/test_public_dht.py | 1 + .../test_p2p_libp2p_client/test_aea_cli.py | 1 + .../test_communication.py | 1 + .../test_p2p_libp2p_client/test_errors.py | 1 + .../test_p2p_stub/test_p2p_stub.py | 1 + .../test_connections/test_soef/models.py | 1 + .../test_connections/test_soef/test_soef.py | 4 ++-- .../test_soef/test_soef_integration.py | 6 +++--- .../test_connections/test_tcp/test_base.py | 1 + .../test_tcp/test_communication.py | 1 + .../test_webhook/test_webhook.py | 1 + .../test_erc1155/test_contract.py | 1 + .../test_protocols/test_contract_api.py | 3 ++- .../test_packages/test_protocols/test_fipa.py | 3 ++- .../test_packages/test_protocols/test_gym.py | 3 ++- .../test_packages/test_protocols/test_http.py | 3 ++- .../test_protocols/test_ledger_api.py | 3 ++- .../test_protocols/test_ml_trade.py | 3 ++- .../test_protocols/test_oef_search.py | 3 ++- .../test_packages/test_protocols/test_tac.py | 3 ++- .../test_packages/test_skills/test_carpark.py | 1 + .../test_packages/test_skills/test_erc1155.py | 1 + .../test_packages/test_skills/test_generic.py | 1 + tests/test_packages/test_skills/test_gym.py | 1 + .../test_skills/test_http_echo.py | 1 + .../test_skills/test_ml_skills.py | 1 + tests/test_packages/test_skills/test_tac.py | 1 + .../test_skills/test_thermometer.py | 1 + .../test_packages/test_skills/test_weather.py | 1 + tests/test_protocols/test_base.py | 1 + .../test_generator/test_common.py | 1 + .../test_generator/test_end_to_end.py | 1 + .../test_extract_specification.py | 1 + .../test_generator/test_generator.py | 1 + tests/test_protocols/test_signing.py | 1 + tests/test_registries/test_base.py | 1 + tests/test_registries/test_filter.py | 1 + tests/test_runner.py | 1 + tests/test_runtime.py | 1 + tests/test_skills/test_base.py | 1 + tests/test_skills/test_error.py | 1 + tests/test_test_tools/test_testcases.py | 1 + 247 files changed, 276 insertions(+), 38 deletions(-) diff --git a/aea/test_tools/test_cases.py b/aea/test_tools/test_cases.py index 2c33b3b758..26ce7365c7 100644 --- a/aea/test_tools/test_cases.py +++ b/aea/test_tools/test_cases.py @@ -57,6 +57,7 @@ read_envelope_from_file, write_envelope_to_file, ) + from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/benchmark/checks/check_multiagent.py b/benchmark/checks/check_multiagent.py index 549f8f43e3..70c0450220 100755 --- a/benchmark/checks/check_multiagent.py +++ b/benchmark/checks/check_multiagent.py @@ -40,6 +40,7 @@ print_results, wait_for_condition, ) + from packages.fetchai.connections.local.connection import ( # noqa: E402 # pylint: disable=C0413 LocalNode, OEFLocalConnection, diff --git a/benchmark/framework/executor.py b/benchmark/framework/executor.py index 0f4645fb36..f46acb95e7 100644 --- a/benchmark/framework/executor.py +++ b/benchmark/framework/executor.py @@ -31,6 +31,7 @@ import psutil # type: ignore from benchmark.framework.benchmark import BenchmarkControl # noqa: I100 + from tests.common.utils import timeit_context ResourceStats = namedtuple("ResourceStats", "time,cpu,mem") diff --git a/examples/gym_ex/proxy/agent.py b/examples/gym_ex/proxy/agent.py index 90b87cf225..f008b1ec52 100644 --- a/examples/gym_ex/proxy/agent.py +++ b/examples/gym_ex/proxy/agent.py @@ -29,6 +29,7 @@ from aea.helpers.base import locate from aea.identity.base import Identity from aea.mail.base import Envelope + from packages.fetchai.connections.gym.connection import ( # noqa: E402 # pylint: disable=wrong-import-position GymConnection, ) diff --git a/examples/gym_ex/proxy/env.py b/examples/gym_ex/proxy/env.py index 3992bb0bd2..e40c89babb 100755 --- a/examples/gym_ex/proxy/env.py +++ b/examples/gym_ex/proxy/env.py @@ -31,6 +31,8 @@ from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + +from .agent import ProxyAgent # noqa: E402 # pylint: disable=wrong-import-position from packages.fetchai.protocols.gym.dialogues import ( # noqa: E402 # pylint: disable=wrong-import-position GymDialogue as BaseGymDialogue, ) @@ -41,8 +43,6 @@ GymMessage, ) -from .agent import ProxyAgent # noqa: E402 # pylint: disable=wrong-import-position - sys.modules["packages.fetchai.connections.gym"] = locate( "packages.fetchai.connections.gym" ) diff --git a/packages/fetchai/connections/gym/connection.py b/packages/fetchai/connections/gym/connection.py index c60f05297d..593a57d7d8 100644 --- a/packages/fetchai/connections/gym/connection.py +++ b/packages/fetchai/connections/gym/connection.py @@ -35,6 +35,7 @@ from aea.helpers.base import locate from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.protocols.gym.dialogues import GymDialogue from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues from packages.fetchai.protocols.gym.message import GymMessage diff --git a/packages/fetchai/connections/http_client/connection.py b/packages/fetchai/connections/http_client/connection.py index 8fe29e6ea1..6d8d158165 100644 --- a/packages/fetchai/connections/http_client/connection.py +++ b/packages/fetchai/connections/http_client/connection.py @@ -37,6 +37,7 @@ from aea.exceptions import enforce from aea.mail.base import Envelope, EnvelopeContext, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/connections/http_server/connection.py b/packages/fetchai/connections/http_server/connection.py index d922e8a4c1..95ff9d12b1 100644 --- a/packages/fetchai/connections/http_server/connection.py +++ b/packages/fetchai/connections/http_server/connection.py @@ -52,6 +52,7 @@ from aea.mail.base import URI, Envelope, EnvelopeContext, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/connections/ledger/connection.py b/packages/fetchai/connections/ledger/connection.py index 8e0a1a4fdb..d3f02c51f4 100644 --- a/packages/fetchai/connections/ledger/connection.py +++ b/packages/fetchai/connections/ledger/connection.py @@ -26,6 +26,7 @@ from aea.connections.base import Connection, ConnectionStates from aea.mail.base import Envelope from aea.protocols.base import Message + from packages.fetchai.connections.ledger.base import CONNECTION_ID, RequestDispatcher from packages.fetchai.connections.ledger.contract_dispatcher import ( ContractApiRequestDispatcher, diff --git a/packages/fetchai/connections/ledger/contract_dispatcher.py b/packages/fetchai/connections/ledger/contract_dispatcher.py index 70e0f19243..c553633baa 100644 --- a/packages/fetchai/connections/ledger/contract_dispatcher.py +++ b/packages/fetchai/connections/ledger/contract_dispatcher.py @@ -29,6 +29,7 @@ from aea.protocols.base import Address, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import Dialogues as BaseDialogues + from packages.fetchai.connections.ledger.base import CONNECTION_ID, RequestDispatcher from packages.fetchai.protocols.contract_api import ContractApiMessage from packages.fetchai.protocols.contract_api.dialogues import ContractApiDialogue diff --git a/packages/fetchai/connections/ledger/ledger_dispatcher.py b/packages/fetchai/connections/ledger/ledger_dispatcher.py index fdc76f0f03..224e5dfbe3 100644 --- a/packages/fetchai/connections/ledger/ledger_dispatcher.py +++ b/packages/fetchai/connections/ledger/ledger_dispatcher.py @@ -26,6 +26,7 @@ from aea.protocols.base import Address, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import Dialogues as BaseDialogues + from packages.fetchai.connections.ledger.base import CONNECTION_ID, RequestDispatcher from packages.fetchai.protocols.ledger_api.custom_types import TransactionReceipt from packages.fetchai.protocols.ledger_api.dialogues import LedgerApiDialogue diff --git a/packages/fetchai/connections/local/connection.py b/packages/fetchai/connections/local/connection.py index 7dab288623..3d79dc86b2 100644 --- a/packages/fetchai/connections/local/connection.py +++ b/packages/fetchai/connections/local/connection.py @@ -32,6 +32,7 @@ from aea.mail.base import Envelope, Message from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.protocols.oef_search.dialogues import OefSearchDialogue from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogues as BaseOefSearchDialogues, diff --git a/packages/fetchai/connections/oef/connection.py b/packages/fetchai/connections/oef/connection.py index f693018895..8470f41a8a 100644 --- a/packages/fetchai/connections/oef/connection.py +++ b/packages/fetchai/connections/oef/connection.py @@ -39,6 +39,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel + from packages.fetchai.connections.oef.object_translator import OEFObjectTranslator from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue as BaseOefSearchDialogue, diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index e587160479..822944c72e 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -48,6 +48,7 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel + from packages.fetchai.protocols.oef_search.custom_types import ( AgentsInfo, OefErrorOperation, diff --git a/packages/fetchai/connections/tcp/tcp_client.py b/packages/fetchai/connections/tcp/tcp_client.py index 00ce22f43e..4b1fd007fc 100644 --- a/packages/fetchai/connections/tcp/tcp_client.py +++ b/packages/fetchai/connections/tcp/tcp_client.py @@ -31,6 +31,7 @@ from aea.configurations.base import ConnectionConfig from aea.mail.base import Envelope + from packages.fetchai.connections.tcp.base import TCPConnection logger = logging.getLogger("aea.packages.fetchai.connections.tcp.tcp_client") diff --git a/packages/fetchai/connections/tcp/tcp_server.py b/packages/fetchai/connections/tcp/tcp_server.py index 8bcdd72ecb..9b0325ecfd 100644 --- a/packages/fetchai/connections/tcp/tcp_server.py +++ b/packages/fetchai/connections/tcp/tcp_server.py @@ -27,6 +27,7 @@ from aea.common import Address from aea.configurations.base import ConnectionConfig from aea.mail.base import Envelope + from packages.fetchai.connections.tcp.base import TCPConnection logger = logging.getLogger("aea.packages.fetchai.connections.tcp.tcp_server") diff --git a/packages/fetchai/connections/webhook/connection.py b/packages/fetchai/connections/webhook/connection.py index 15bcf0490c..ec356aac75 100644 --- a/packages/fetchai/connections/webhook/connection.py +++ b/packages/fetchai/connections/webhook/connection.py @@ -32,6 +32,7 @@ from aea.mail.base import URI, Envelope, EnvelopeContext from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/protocols/contract_api/dialogues.py b/packages/fetchai/protocols/contract_api/dialogues.py index 3f2ec696b3..ca9cb3c8ab 100644 --- a/packages/fetchai/protocols/contract_api/dialogues.py +++ b/packages/fetchai/protocols/contract_api/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + from packages.fetchai.protocols.contract_api.message import ContractApiMessage diff --git a/packages/fetchai/protocols/contract_api/message.py b/packages/fetchai/protocols/contract_api/message.py index a663637112..d84c69c714 100644 --- a/packages/fetchai/protocols/contract_api/message.py +++ b/packages/fetchai/protocols/contract_api/message.py @@ -25,6 +25,7 @@ from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + from packages.fetchai.protocols.contract_api.custom_types import Kwargs as CustomKwargs from packages.fetchai.protocols.contract_api.custom_types import ( RawMessage as CustomRawMessage, diff --git a/packages/fetchai/protocols/contract_api/serialization.py b/packages/fetchai/protocols/contract_api/serialization.py index 718c9d9819..faba77c2e4 100644 --- a/packages/fetchai/protocols/contract_api/serialization.py +++ b/packages/fetchai/protocols/contract_api/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + from packages.fetchai.protocols.contract_api import contract_api_pb2 from packages.fetchai.protocols.contract_api.custom_types import ( Kwargs, diff --git a/packages/fetchai/protocols/fipa/dialogues.py b/packages/fetchai/protocols/fipa/dialogues.py index abf8ada492..39a531fd20 100644 --- a/packages/fetchai/protocols/fipa/dialogues.py +++ b/packages/fetchai/protocols/fipa/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/protocols/fipa/message.py b/packages/fetchai/protocols/fipa/message.py index 3f1648efff..02328af938 100644 --- a/packages/fetchai/protocols/fipa/message.py +++ b/packages/fetchai/protocols/fipa/message.py @@ -25,6 +25,7 @@ from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + from packages.fetchai.protocols.fipa.custom_types import ( Description as CustomDescription, ) diff --git a/packages/fetchai/protocols/fipa/serialization.py b/packages/fetchai/protocols/fipa/serialization.py index d7875b9181..15a0d8270b 100644 --- a/packages/fetchai/protocols/fipa/serialization.py +++ b/packages/fetchai/protocols/fipa/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + 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 diff --git a/packages/fetchai/protocols/gym/dialogues.py b/packages/fetchai/protocols/gym/dialogues.py index 602ba60402..cf665a79b0 100644 --- a/packages/fetchai/protocols/gym/dialogues.py +++ b/packages/fetchai/protocols/gym/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + from packages.fetchai.protocols.gym.message import GymMessage diff --git a/packages/fetchai/protocols/gym/message.py b/packages/fetchai/protocols/gym/message.py index ab08207cec..7642fde42f 100644 --- a/packages/fetchai/protocols/gym/message.py +++ b/packages/fetchai/protocols/gym/message.py @@ -25,6 +25,7 @@ from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + from packages.fetchai.protocols.gym.custom_types import AnyObject as CustomAnyObject logger = logging.getLogger("aea.packages.fetchai.protocols.gym.message") diff --git a/packages/fetchai/protocols/gym/serialization.py b/packages/fetchai/protocols/gym/serialization.py index a69428758c..c96b1fc1ae 100644 --- a/packages/fetchai/protocols/gym/serialization.py +++ b/packages/fetchai/protocols/gym/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + 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 diff --git a/packages/fetchai/protocols/http/dialogues.py b/packages/fetchai/protocols/http/dialogues.py index 7d722c6aa8..f5c52a86e5 100644 --- a/packages/fetchai/protocols/http/dialogues.py +++ b/packages/fetchai/protocols/http/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/protocols/http/serialization.py b/packages/fetchai/protocols/http/serialization.py index 896249bc9b..123479cc69 100644 --- a/packages/fetchai/protocols/http/serialization.py +++ b/packages/fetchai/protocols/http/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + from packages.fetchai.protocols.http import http_pb2 from packages.fetchai.protocols.http.message import HttpMessage diff --git a/packages/fetchai/protocols/ledger_api/dialogues.py b/packages/fetchai/protocols/ledger_api/dialogues.py index a1e375a13f..c53552918c 100644 --- a/packages/fetchai/protocols/ledger_api/dialogues.py +++ b/packages/fetchai/protocols/ledger_api/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage diff --git a/packages/fetchai/protocols/ledger_api/message.py b/packages/fetchai/protocols/ledger_api/message.py index e38a9e002d..6b60d32682 100644 --- a/packages/fetchai/protocols/ledger_api/message.py +++ b/packages/fetchai/protocols/ledger_api/message.py @@ -25,6 +25,7 @@ from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + from packages.fetchai.protocols.ledger_api.custom_types import ( RawTransaction as CustomRawTransaction, ) diff --git a/packages/fetchai/protocols/ledger_api/serialization.py b/packages/fetchai/protocols/ledger_api/serialization.py index 60171b5576..7877d294bb 100644 --- a/packages/fetchai/protocols/ledger_api/serialization.py +++ b/packages/fetchai/protocols/ledger_api/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + from packages.fetchai.protocols.ledger_api import ledger_api_pb2 from packages.fetchai.protocols.ledger_api.custom_types import ( RawTransaction, diff --git a/packages/fetchai/protocols/ml_trade/dialogues.py b/packages/fetchai/protocols/ml_trade/dialogues.py index ac734a9f4e..2bb14a478f 100644 --- a/packages/fetchai/protocols/ml_trade/dialogues.py +++ b/packages/fetchai/protocols/ml_trade/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + from packages.fetchai.protocols.ml_trade.message import MlTradeMessage diff --git a/packages/fetchai/protocols/ml_trade/message.py b/packages/fetchai/protocols/ml_trade/message.py index f3b96e6949..f99abeaa98 100644 --- a/packages/fetchai/protocols/ml_trade/message.py +++ b/packages/fetchai/protocols/ml_trade/message.py @@ -25,6 +25,7 @@ from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + from packages.fetchai.protocols.ml_trade.custom_types import ( Description as CustomDescription, ) diff --git a/packages/fetchai/protocols/ml_trade/serialization.py b/packages/fetchai/protocols/ml_trade/serialization.py index faf1ae5665..3065702423 100644 --- a/packages/fetchai/protocols/ml_trade/serialization.py +++ b/packages/fetchai/protocols/ml_trade/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + from packages.fetchai.protocols.ml_trade import ml_trade_pb2 from packages.fetchai.protocols.ml_trade.custom_types import Description, Query from packages.fetchai.protocols.ml_trade.message import MlTradeMessage diff --git a/packages/fetchai/protocols/oef_search/dialogues.py b/packages/fetchai/protocols/oef_search/dialogues.py index 1a29699488..add8484e76 100644 --- a/packages/fetchai/protocols/oef_search/dialogues.py +++ b/packages/fetchai/protocols/oef_search/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + 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 acff1547b6..51190e1eee 100644 --- a/packages/fetchai/protocols/oef_search/message.py +++ b/packages/fetchai/protocols/oef_search/message.py @@ -25,6 +25,7 @@ from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + from packages.fetchai.protocols.oef_search.custom_types import ( AgentsInfo as CustomAgentsInfo, ) diff --git a/packages/fetchai/protocols/oef_search/serialization.py b/packages/fetchai/protocols/oef_search/serialization.py index 15895850df..f547763780 100644 --- a/packages/fetchai/protocols/oef_search/serialization.py +++ b/packages/fetchai/protocols/oef_search/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + from packages.fetchai.protocols.oef_search import oef_search_pb2 from packages.fetchai.protocols.oef_search.custom_types import ( AgentsInfo, diff --git a/packages/fetchai/protocols/tac/dialogues.py b/packages/fetchai/protocols/tac/dialogues.py index 3fd6363ac1..250ae33e75 100644 --- a/packages/fetchai/protocols/tac/dialogues.py +++ b/packages/fetchai/protocols/tac/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + 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 9ceb13b045..999a42bbf9 100644 --- a/packages/fetchai/protocols/tac/message.py +++ b/packages/fetchai/protocols/tac/message.py @@ -25,6 +25,7 @@ from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + from packages.fetchai.protocols.tac.custom_types import ErrorCode as CustomErrorCode logger = logging.getLogger("aea.packages.fetchai.protocols.tac.message") diff --git a/packages/fetchai/protocols/tac/serialization.py b/packages/fetchai/protocols/tac/serialization.py index 6f12536758..312aa4563b 100644 --- a/packages/fetchai/protocols/tac/serialization.py +++ b/packages/fetchai/protocols/tac/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + 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 diff --git a/packages/fetchai/skills/aries_alice/behaviours.py b/packages/fetchai/skills/aries_alice/behaviours.py index 52b8c53e2e..192879fc28 100644 --- a/packages/fetchai/skills/aries_alice/behaviours.py +++ b/packages/fetchai/skills/aries_alice/behaviours.py @@ -24,6 +24,7 @@ from aea.mail.base import EnvelopeContext from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.connections.http_client.connection import ( PUBLIC_ID as HTTP_CLIENT_CONNECTION_PUBLIC_ID, ) diff --git a/packages/fetchai/skills/aries_alice/dialogues.py b/packages/fetchai/skills/aries_alice/dialogues.py index 1384d1fd26..96983efc95 100644 --- a/packages/fetchai/skills/aries_alice/dialogues.py +++ b/packages/fetchai/skills/aries_alice/dialogues.py @@ -29,6 +29,7 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model + from packages.fetchai.protocols.http.dialogues import HttpDialogue as BaseHttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.oef_search.dialogues import ( diff --git a/packages/fetchai/skills/aries_alice/handlers.py b/packages/fetchai/skills/aries_alice/handlers.py index 59bc2ef6fa..5bb7f3b52b 100644 --- a/packages/fetchai/skills/aries_alice/handlers.py +++ b/packages/fetchai/skills/aries_alice/handlers.py @@ -29,6 +29,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.aries_alice.dialogues import ( diff --git a/packages/fetchai/skills/aries_faber/behaviours.py b/packages/fetchai/skills/aries_faber/behaviours.py index 9a4f57c62d..b3706e86e7 100644 --- a/packages/fetchai/skills/aries_faber/behaviours.py +++ b/packages/fetchai/skills/aries_faber/behaviours.py @@ -23,6 +23,7 @@ from typing import Dict, cast from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.aries_faber.dialogues import ( diff --git a/packages/fetchai/skills/aries_faber/dialogues.py b/packages/fetchai/skills/aries_faber/dialogues.py index 334b38e46b..f00b84bd56 100644 --- a/packages/fetchai/skills/aries_faber/dialogues.py +++ b/packages/fetchai/skills/aries_faber/dialogues.py @@ -29,6 +29,7 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model + from packages.fetchai.protocols.http.dialogues import HttpDialogue as BaseHttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.oef_search.dialogues import ( diff --git a/packages/fetchai/skills/aries_faber/handlers.py b/packages/fetchai/skills/aries_faber/handlers.py index c792a3fa51..77be923810 100644 --- a/packages/fetchai/skills/aries_faber/handlers.py +++ b/packages/fetchai/skills/aries_faber/handlers.py @@ -28,6 +28,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.connections.p2p_libp2p.connection import ( PUBLIC_ID as P2P_CONNECTION_PUBLIC_ID, ) diff --git a/packages/fetchai/skills/carpark_detection/strategy.py b/packages/fetchai/skills/carpark_detection/strategy.py index 0f46795b8f..f3cde2bdf7 100644 --- a/packages/fetchai/skills/carpark_detection/strategy.py +++ b/packages/fetchai/skills/carpark_detection/strategy.py @@ -23,6 +23,7 @@ from typing import Dict from aea.exceptions import enforce + from packages.fetchai.skills.carpark_detection.database import DetectionDatabase from packages.fetchai.skills.generic_seller.strategy import GenericStrategy diff --git a/packages/fetchai/skills/echo/handlers.py b/packages/fetchai/skills/echo/handlers.py index 551cd4c4b9..3d7b315320 100644 --- a/packages/fetchai/skills/echo/handlers.py +++ b/packages/fetchai/skills/echo/handlers.py @@ -23,6 +23,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.skills.echo.dialogues import DefaultDialogue, DefaultDialogues diff --git a/packages/fetchai/skills/erc1155_client/behaviours.py b/packages/fetchai/skills/erc1155_client/behaviours.py index 16937ccf57..dfa465d175 100644 --- a/packages/fetchai/skills/erc1155_client/behaviours.py +++ b/packages/fetchai/skills/erc1155_client/behaviours.py @@ -22,6 +22,7 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.erc1155_client.dialogues import ( diff --git a/packages/fetchai/skills/erc1155_client/dialogues.py b/packages/fetchai/skills/erc1155_client/dialogues.py index bbc010b99f..10af7d3bea 100644 --- a/packages/fetchai/skills/erc1155_client/dialogues.py +++ b/packages/fetchai/skills/erc1155_client/dialogues.py @@ -38,6 +38,7 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model + from packages.fetchai.protocols.contract_api.dialogues import ( ContractApiDialogue as BaseContractApiDialogue, ) diff --git a/packages/fetchai/skills/erc1155_client/handlers.py b/packages/fetchai/skills/erc1155_client/handlers.py index 283f1311c1..fd542bd2b1 100644 --- a/packages/fetchai/skills/erc1155_client/handlers.py +++ b/packages/fetchai/skills/erc1155_client/handlers.py @@ -27,6 +27,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler + from packages.fetchai.protocols.contract_api.message import ContractApiMessage from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage diff --git a/packages/fetchai/skills/erc1155_deploy/behaviours.py b/packages/fetchai/skills/erc1155_deploy/behaviours.py index 93baf383cb..84357c3b9c 100644 --- a/packages/fetchai/skills/erc1155_deploy/behaviours.py +++ b/packages/fetchai/skills/erc1155_deploy/behaviours.py @@ -22,6 +22,7 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.contract_api.message import ContractApiMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/erc1155_deploy/dialogues.py b/packages/fetchai/skills/erc1155_deploy/dialogues.py index b73adcf187..b3ba399f52 100644 --- a/packages/fetchai/skills/erc1155_deploy/dialogues.py +++ b/packages/fetchai/skills/erc1155_deploy/dialogues.py @@ -39,6 +39,7 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model + from packages.fetchai.protocols.contract_api.dialogues import ( ContractApiDialogue as BaseContractApiDialogue, ) diff --git a/packages/fetchai/skills/erc1155_deploy/handlers.py b/packages/fetchai/skills/erc1155_deploy/handlers.py index 5db033feb3..540cf087af 100644 --- a/packages/fetchai/skills/erc1155_deploy/handlers.py +++ b/packages/fetchai/skills/erc1155_deploy/handlers.py @@ -27,6 +27,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler + from packages.fetchai.protocols.contract_api.message import ContractApiMessage from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage diff --git a/packages/fetchai/skills/erc1155_deploy/strategy.py b/packages/fetchai/skills/erc1155_deploy/strategy.py index 266af5d71e..bdb058f810 100644 --- a/packages/fetchai/skills/erc1155_deploy/strategy.py +++ b/packages/fetchai/skills/erc1155_deploy/strategy.py @@ -33,6 +33,7 @@ from aea.helpers.search.models import Description, Location from aea.helpers.transaction.base import Terms from aea.skills.base import Model + from packages.fetchai.contracts.erc1155.contract import ERC1155Contract DEFAULT_IS_LEDGER_TX = True diff --git a/packages/fetchai/skills/generic_buyer/behaviours.py b/packages/fetchai/skills/generic_buyer/behaviours.py index b3e721520d..1eecadaa15 100644 --- a/packages/fetchai/skills/generic_buyer/behaviours.py +++ b/packages/fetchai/skills/generic_buyer/behaviours.py @@ -22,6 +22,7 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.generic_buyer.dialogues import ( diff --git a/packages/fetchai/skills/generic_buyer/dialogues.py b/packages/fetchai/skills/generic_buyer/dialogues.py index 1f91a5aa66..3e57ed0b77 100644 --- a/packages/fetchai/skills/generic_buyer/dialogues.py +++ b/packages/fetchai/skills/generic_buyer/dialogues.py @@ -40,6 +40,7 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model + from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/skills/generic_buyer/handlers.py b/packages/fetchai/skills/generic_buyer/handlers.py index 89eb62d5d2..0e60ef1b1a 100644 --- a/packages/fetchai/skills/generic_buyer/handlers.py +++ b/packages/fetchai/skills/generic_buyer/handlers.py @@ -27,6 +27,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler + from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/generic_seller/behaviours.py b/packages/fetchai/skills/generic_seller/behaviours.py index ec68164ef7..0a7cb9028f 100644 --- a/packages/fetchai/skills/generic_seller/behaviours.py +++ b/packages/fetchai/skills/generic_seller/behaviours.py @@ -22,6 +22,7 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.generic_seller.dialogues import ( diff --git a/packages/fetchai/skills/generic_seller/dialogues.py b/packages/fetchai/skills/generic_seller/dialogues.py index 4acb51bd2b..dbdff8f02d 100644 --- a/packages/fetchai/skills/generic_seller/dialogues.py +++ b/packages/fetchai/skills/generic_seller/dialogues.py @@ -35,6 +35,7 @@ from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel from aea.skills.base import Model + from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/skills/generic_seller/handlers.py b/packages/fetchai/skills/generic_seller/handlers.py index 2b39a677b0..1fe577cb7a 100644 --- a/packages/fetchai/skills/generic_seller/handlers.py +++ b/packages/fetchai/skills/generic_seller/handlers.py @@ -27,6 +27,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/gym/dialogues.py b/packages/fetchai/skills/gym/dialogues.py index 0100e7bdff..831524be4f 100644 --- a/packages/fetchai/skills/gym/dialogues.py +++ b/packages/fetchai/skills/gym/dialogues.py @@ -31,6 +31,7 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model + from packages.fetchai.protocols.gym.dialogues import GymDialogue as BaseGymDialogue from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues diff --git a/packages/fetchai/skills/gym/handlers.py b/packages/fetchai/skills/gym/handlers.py index fe521f392e..82c76d5be5 100644 --- a/packages/fetchai/skills/gym/handlers.py +++ b/packages/fetchai/skills/gym/handlers.py @@ -24,6 +24,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.skills.gym.dialogues import ( DefaultDialogues, diff --git a/packages/fetchai/skills/gym/helpers.py b/packages/fetchai/skills/gym/helpers.py index 073aabd4ce..f32e80eb2a 100644 --- a/packages/fetchai/skills/gym/helpers.py +++ b/packages/fetchai/skills/gym/helpers.py @@ -28,6 +28,7 @@ from aea.protocols.base import Message from aea.skills.base import SkillContext + from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.skills.gym.dialogues import GymDialogue, GymDialogues diff --git a/packages/fetchai/skills/gym/tasks.py b/packages/fetchai/skills/gym/tasks.py index e10ecf1f7d..d96e02029c 100644 --- a/packages/fetchai/skills/gym/tasks.py +++ b/packages/fetchai/skills/gym/tasks.py @@ -24,6 +24,7 @@ from aea.skills.base import SkillContext from aea.skills.tasks import Task + from packages.fetchai.skills.gym.helpers import ProxyEnv from packages.fetchai.skills.gym.rl_agent import DEFAULT_NB_STEPS, NB_GOODS, MyRLAgent diff --git a/packages/fetchai/skills/http_echo/dialogues.py b/packages/fetchai/skills/http_echo/dialogues.py index 055a035e58..e2d7d164e5 100644 --- a/packages/fetchai/skills/http_echo/dialogues.py +++ b/packages/fetchai/skills/http_echo/dialogues.py @@ -31,6 +31,7 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model + from packages.fetchai.protocols.http.dialogues import HttpDialogue as BaseHttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues diff --git a/packages/fetchai/skills/http_echo/handlers.py b/packages/fetchai/skills/http_echo/handlers.py index a5e1ba1487..f0dba0c4fc 100644 --- a/packages/fetchai/skills/http_echo/handlers.py +++ b/packages/fetchai/skills/http_echo/handlers.py @@ -25,6 +25,7 @@ from aea.protocols.base import Message from aea.protocols.default import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.skills.http_echo.dialogues import ( DefaultDialogues, diff --git a/packages/fetchai/skills/ml_data_provider/dialogues.py b/packages/fetchai/skills/ml_data_provider/dialogues.py index 30ee046b0f..e175dac3b9 100644 --- a/packages/fetchai/skills/ml_data_provider/dialogues.py +++ b/packages/fetchai/skills/ml_data_provider/dialogues.py @@ -33,6 +33,7 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model + from packages.fetchai.protocols.ledger_api.dialogues import ( LedgerApiDialogue as BaseLedgerApiDialogue, ) diff --git a/packages/fetchai/skills/ml_data_provider/handlers.py b/packages/fetchai/skills/ml_data_provider/handlers.py index 7ba97e3d7a..0c06eeaa7e 100644 --- a/packages/fetchai/skills/ml_data_provider/handlers.py +++ b/packages/fetchai/skills/ml_data_provider/handlers.py @@ -26,6 +26,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/ml_train/dialogues.py b/packages/fetchai/skills/ml_train/dialogues.py index b26923a1ba..4fe3d6c61a 100644 --- a/packages/fetchai/skills/ml_train/dialogues.py +++ b/packages/fetchai/skills/ml_train/dialogues.py @@ -41,6 +41,7 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model + from packages.fetchai.protocols.ledger_api.dialogues import ( LedgerApiDialogue as BaseLedgerApiDialogue, ) diff --git a/packages/fetchai/skills/ml_train/handlers.py b/packages/fetchai/skills/ml_train/handlers.py index 63dcc7451b..f5c82a88dc 100644 --- a/packages/fetchai/skills/ml_train/handlers.py +++ b/packages/fetchai/skills/ml_train/handlers.py @@ -29,6 +29,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler + from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/packages/fetchai/skills/simple_service_registration/behaviours.py b/packages/fetchai/skills/simple_service_registration/behaviours.py index 16e2d91eda..d2fba8f27c 100644 --- a/packages/fetchai/skills/simple_service_registration/behaviours.py +++ b/packages/fetchai/skills/simple_service_registration/behaviours.py @@ -22,6 +22,7 @@ from typing import cast from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.simple_service_registration.dialogues import ( OefSearchDialogues, diff --git a/packages/fetchai/skills/simple_service_registration/dialogues.py b/packages/fetchai/skills/simple_service_registration/dialogues.py index 75541e3ff0..8cfa6723d6 100644 --- a/packages/fetchai/skills/simple_service_registration/dialogues.py +++ b/packages/fetchai/skills/simple_service_registration/dialogues.py @@ -27,6 +27,7 @@ from aea.protocols.base import Address, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model + from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue as BaseOefSearchDialogue, ) diff --git a/packages/fetchai/skills/simple_service_registration/handlers.py b/packages/fetchai/skills/simple_service_registration/handlers.py index 4693d7622a..3826e190f2 100644 --- a/packages/fetchai/skills/simple_service_registration/handlers.py +++ b/packages/fetchai/skills/simple_service_registration/handlers.py @@ -24,6 +24,7 @@ from aea.configurations.base import ProtocolId from aea.protocols.base import Message from aea.skills.base import Handler + from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.simple_service_registration.dialogues import ( OefSearchDialogue, diff --git a/packages/fetchai/skills/tac_control/behaviours.py b/packages/fetchai/skills/tac_control/behaviours.py index c396a06557..50df1bcc61 100644 --- a/packages/fetchai/skills/tac_control/behaviours.py +++ b/packages/fetchai/skills/tac_control/behaviours.py @@ -24,6 +24,7 @@ from aea.helpers.search.models import Description from aea.skills.base import Behaviour + from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control.dialogues import ( diff --git a/packages/fetchai/skills/tac_control/dialogues.py b/packages/fetchai/skills/tac_control/dialogues.py index 3c831c3726..ad7982d1d5 100644 --- a/packages/fetchai/skills/tac_control/dialogues.py +++ b/packages/fetchai/skills/tac_control/dialogues.py @@ -33,6 +33,7 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialogues from aea.protocols.dialogue.base import Dialogue from aea.skills.base import Model + from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue as BaseOefSearchDialogue, ) diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index e03ab5e810..99cd613e18 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -40,6 +40,7 @@ from aea.helpers.search.models import Description from aea.helpers.transaction.base import Terms from aea.skills.base import Model + from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control.helpers import ( determine_scaling_factor, diff --git a/packages/fetchai/skills/tac_control/handlers.py b/packages/fetchai/skills/tac_control/handlers.py index d5e422b0e7..8dd75f55a5 100644 --- a/packages/fetchai/skills/tac_control/handlers.py +++ b/packages/fetchai/skills/tac_control/handlers.py @@ -24,6 +24,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control.dialogues import ( diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 5486b259b7..28562d5ae1 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -26,6 +26,7 @@ from aea.helpers.search.models import Attribute, DataModel, Description from aea.protocols.signing.message import SigningMessage from aea.skills.behaviours import SimpleBehaviour, TickerBehaviour + from packages.fetchai.contracts.erc1155.contract import ERC1155Contract from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage diff --git a/packages/fetchai/skills/tac_control_contract/game.py b/packages/fetchai/skills/tac_control_contract/game.py index f32e503911..5120453dc0 100644 --- a/packages/fetchai/skills/tac_control_contract/game.py +++ b/packages/fetchai/skills/tac_control_contract/game.py @@ -33,6 +33,7 @@ ) from aea.helpers.transaction.base import Terms from aea.skills.base import Model + from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control_contract.helpers import ( determine_scaling_factor, diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index ca8f0f7a12..0445ede7c1 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -24,6 +24,7 @@ from aea.protocols.base import Message from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler + from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_control_contract.game import Game, Phase diff --git a/packages/fetchai/skills/tac_control_contract/helpers.py b/packages/fetchai/skills/tac_control_contract/helpers.py index db746cd1cc..6441d00f9f 100644 --- a/packages/fetchai/skills/tac_control_contract/helpers.py +++ b/packages/fetchai/skills/tac_control_contract/helpers.py @@ -26,6 +26,7 @@ import numpy as np from aea.exceptions import enforce + from packages.fetchai.contracts.erc1155.contract import ERC1155Contract QUANTITY_SHIFT = 1 # Any non-negative integer is fine. diff --git a/packages/fetchai/skills/tac_negotiation/behaviours.py b/packages/fetchai/skills/tac_negotiation/behaviours.py index 59b593a2bc..536ad27706 100644 --- a/packages/fetchai/skills/tac_negotiation/behaviours.py +++ b/packages/fetchai/skills/tac_negotiation/behaviours.py @@ -23,6 +23,7 @@ from aea.mail.base import EnvelopeContext from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.tac_negotiation.dialogues import ( OefSearchDialogue, diff --git a/packages/fetchai/skills/tac_negotiation/dialogues.py b/packages/fetchai/skills/tac_negotiation/dialogues.py index 0833070d31..cd8c7c1b7f 100644 --- a/packages/fetchai/skills/tac_negotiation/dialogues.py +++ b/packages/fetchai/skills/tac_negotiation/dialogues.py @@ -35,6 +35,7 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model + from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/packages/fetchai/skills/tac_negotiation/handlers.py b/packages/fetchai/skills/tac_negotiation/handlers.py index ce4d4a5724..016d018775 100644 --- a/packages/fetchai/skills/tac_negotiation/handlers.py +++ b/packages/fetchai/skills/tac_negotiation/handlers.py @@ -29,6 +29,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler + from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.tac_negotiation.dialogues import ( diff --git a/packages/fetchai/skills/tac_negotiation/strategy.py b/packages/fetchai/skills/tac_negotiation/strategy.py index 1272be1de2..2496848c7a 100644 --- a/packages/fetchai/skills/tac_negotiation/strategy.py +++ b/packages/fetchai/skills/tac_negotiation/strategy.py @@ -39,6 +39,7 @@ ) from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model + from packages.fetchai.skills.tac_negotiation.dialogues import FipaDialogue from packages.fetchai.skills.tac_negotiation.helpers import ( build_goods_description, diff --git a/packages/fetchai/skills/tac_negotiation/transactions.py b/packages/fetchai/skills/tac_negotiation/transactions.py index 91521f5e12..1997572150 100644 --- a/packages/fetchai/skills/tac_negotiation/transactions.py +++ b/packages/fetchai/skills/tac_negotiation/transactions.py @@ -32,6 +32,7 @@ from aea.protocols.dialogue.base import DialogueLabel from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model + from packages.fetchai.skills.tac_negotiation.dialogues import ( FipaDialogue, SigningDialogue, diff --git a/packages/fetchai/skills/tac_participation/behaviours.py b/packages/fetchai/skills/tac_participation/behaviours.py index f6a70e244c..018fe26085 100644 --- a/packages/fetchai/skills/tac_participation/behaviours.py +++ b/packages/fetchai/skills/tac_participation/behaviours.py @@ -23,6 +23,7 @@ from aea.mail.base import EnvelopeContext from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_participation.dialogues import OefSearchDialogues diff --git a/packages/fetchai/skills/tac_participation/dialogues.py b/packages/fetchai/skills/tac_participation/dialogues.py index 3ecacbde03..f63c6d7c5b 100644 --- a/packages/fetchai/skills/tac_participation/dialogues.py +++ b/packages/fetchai/skills/tac_participation/dialogues.py @@ -37,6 +37,7 @@ StateUpdateDialogues as BaseStateUpdateDialogues, ) from aea.skills.base import Model + from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue as BaseOefSearchDialogue, ) diff --git a/packages/fetchai/skills/tac_participation/game.py b/packages/fetchai/skills/tac_participation/game.py index 4b96be9dad..534c2bd01a 100644 --- a/packages/fetchai/skills/tac_participation/game.py +++ b/packages/fetchai/skills/tac_participation/game.py @@ -25,6 +25,7 @@ from aea.exceptions import AEAEnforceError, enforce from aea.helpers.search.models import Constraint, ConstraintType, Location, Query from aea.skills.base import Model + from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_participation.dialogues import ( StateUpdateDialogue, diff --git a/packages/fetchai/skills/tac_participation/handlers.py b/packages/fetchai/skills/tac_participation/handlers.py index c17a27da8e..4530402a6a 100644 --- a/packages/fetchai/skills/tac_participation/handlers.py +++ b/packages/fetchai/skills/tac_participation/handlers.py @@ -25,6 +25,7 @@ from aea.protocols.base import Message from aea.protocols.state_update.message import StateUpdateMessage from aea.skills.base import Handler + from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.skills.tac_participation.dialogues import ( diff --git a/setup.cfg b/setup.cfg index 15b772d51b..5e175502fa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,14 +25,17 @@ application-import-names = aea,packages,tests,scripts # B014: redundant exception [isort] +# for black compatibility multi_line_output=3 include_trailing_comma=True force_grid_wrap=0 use_parentheses=True ensure_newline_before_comments = True line_length=88 +# custom configurations order_by_type=True skip_glob = **/*_pb2.py +known_local_folder=packages,tests [mypy] python_version = 3.7 diff --git a/tests/common/utils.py b/tests/common/utils.py index 24e90f7626..81a64a5ac6 100644 --- a/tests/common/utils.py +++ b/tests/common/utils.py @@ -30,6 +30,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Behaviour, Handler + from tests.conftest import ROOT_DIR DEFAULT_SLEEP = 0.0001 diff --git a/tests/conftest.py b/tests/conftest.py index db82e37561..f18aae15c2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -72,6 +72,8 @@ from aea.identity.base import Identity from aea.test_tools.click_testing import CliRunner as ImportedCliRunner from aea.test_tools.constants import DEFAULT_AUTHOR + +from .data.dummy_connection.connection import DummyConnection # type: ignore from packages.fetchai.connections.local.connection import LocalNode, OEFLocalConnection from packages.fetchai.connections.oef.connection import OEFConnection from packages.fetchai.connections.p2p_libp2p.connection import ( @@ -84,8 +86,6 @@ from packages.fetchai.connections.tcp.tcp_client import TCPClientConnection from packages.fetchai.connections.tcp.tcp_server import TCPServerConnection -from .data.dummy_connection.connection import DummyConnection # type: ignore - logger = logging.getLogger(__name__) CliRunner = ImportedCliRunner diff --git a/tests/data/generator/t_protocol/dialogues.py b/tests/data/generator/t_protocol/dialogues.py index d709c0bb49..7254d504a9 100644 --- a/tests/data/generator/t_protocol/dialogues.py +++ b/tests/data/generator/t_protocol/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + from tests.data.generator.t_protocol.message import TProtocolMessage diff --git a/tests/data/generator/t_protocol/message.py b/tests/data/generator/t_protocol/message.py index 9b1cf47807..b07a48d58d 100644 --- a/tests/data/generator/t_protocol/message.py +++ b/tests/data/generator/t_protocol/message.py @@ -25,6 +25,7 @@ from aea.configurations.base import ProtocolId from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + from tests.data.generator.t_protocol.custom_types import DataModel as CustomDataModel logger = logging.getLogger("aea.packages.fetchai.protocols.t_protocol.message") diff --git a/tests/data/generator/t_protocol/serialization.py b/tests/data/generator/t_protocol/serialization.py index fb7f28d97f..f258300973 100644 --- a/tests/data/generator/t_protocol/serialization.py +++ b/tests/data/generator/t_protocol/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + from tests.data.generator.t_protocol import t_protocol_pb2 from tests.data.generator.t_protocol.custom_types import DataModel from tests.data.generator.t_protocol.message import TProtocolMessage diff --git a/tests/data/generator/t_protocol_no_ct/dialogues.py b/tests/data/generator/t_protocol_no_ct/dialogues.py index c5666a74c9..231c2d90c7 100644 --- a/tests/data/generator/t_protocol_no_ct/dialogues.py +++ b/tests/data/generator/t_protocol_no_ct/dialogues.py @@ -30,6 +30,7 @@ from aea.common import Address from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, DialogueLabel, Dialogues + from tests.data.generator.t_protocol_no_ct.message import TProtocolNoCtMessage diff --git a/tests/data/generator/t_protocol_no_ct/serialization.py b/tests/data/generator/t_protocol_no_ct/serialization.py index 0c8a6879e0..65c911b6d2 100644 --- a/tests/data/generator/t_protocol_no_ct/serialization.py +++ b/tests/data/generator/t_protocol_no_ct/serialization.py @@ -22,6 +22,7 @@ from typing import Any, Dict, cast from aea.protocols.base import Message, Serializer + from tests.data.generator.t_protocol_no_ct import t_protocol_no_ct_pb2 from tests.data.generator.t_protocol_no_ct.message import TProtocolNoCtMessage diff --git a/tests/test_aea.py b/tests/test_aea.py index bbe9f1bccc..573582b97a 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -44,16 +44,6 @@ from aea.protocols.default.serialization import DefaultSerializer from aea.registries.resources import Resources from aea.skills.base import Skill, SkillContext -from packages.fetchai.connections.local.connection import LocalNode -from packages.fetchai.protocols.fipa.message import FipaMessage -from tests.common.utils import ( - AeaTool, - make_behaviour_cls_from_funcion, - make_handler_cls_from_funcion, - run_in_thread, - timeit_context, - wait_for_condition, -) from .conftest import ( CUR_PATH, @@ -65,6 +55,16 @@ ) from .data.dummy_aea.skills.dummy.tasks import DummyTask # type: ignore from .data.dummy_skill.behaviours import DummyBehaviour # type: ignore +from packages.fetchai.connections.local.connection import LocalNode +from packages.fetchai.protocols.fipa.message import FipaMessage +from tests.common.utils import ( + AeaTool, + make_behaviour_cls_from_funcion, + make_handler_cls_from_funcion, + run_in_thread, + timeit_context, + wait_for_condition, +) def test_setup_aea(): diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index 17e4947edd..d99333f678 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -52,6 +52,7 @@ from aea.registries.resources import Resources from aea.skills.base import Skill from aea.test_tools.test_cases import AEATestCase, AEATestCaseEmpty + from tests.conftest import ( CUR_PATH, DEFAULT_PRIVATE_KEY_PATH, diff --git a/tests/test_agent.py b/tests/test_agent.py index 30e8093bf7..3d05a0bacf 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -25,10 +25,10 @@ from aea.agent import Agent, Identity from aea.runtime import RuntimeStates -from packages.fetchai.connections.local.connection import LocalNode -from tests.common.utils import wait_for_condition from .conftest import _make_local_connection +from packages.fetchai.connections.local.connection import LocalNode +from tests.common.utils import wait_for_condition class DummyAgent(Agent): diff --git a/tests/test_agent_loop.py b/tests/test_agent_loop.py index 465d12f567..77f81453b2 100644 --- a/tests/test_agent_loop.py +++ b/tests/test_agent_loop.py @@ -35,6 +35,7 @@ from aea.registries.resources import Resources from aea.skills.base import Behaviour, Handler, SkillContext from aea.skills.behaviours import TickerBehaviour + from tests.common.utils import run_in_thread, wait_for_condition diff --git a/tests/test_cli/test_add/test_connection.py b/tests/test_cli/test_add/test_connection.py index 98dc2ad55f..e83d766785 100644 --- a/tests/test_cli/test_add/test_connection.py +++ b/tests/test_cli/test_add/test_connection.py @@ -33,6 +33,7 @@ from aea.cli import cli from aea.configurations.base import DEFAULT_CONNECTION_CONFIG_FILE, PublicId from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_add/test_contract.py b/tests/test_cli/test_add/test_contract.py index 36898a2503..829a25c3d6 100644 --- a/tests/test_cli/test_add/test_contract.py +++ b/tests/test_cli/test_add/test_contract.py @@ -25,6 +25,7 @@ from aea.cli import cli from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import CLI_LOG_OPTION, MAX_FLAKY_RERUNS, CliRunner diff --git a/tests/test_cli/test_add/test_generic.py b/tests/test_cli/test_add/test_generic.py index be4ed151f7..cc8f33e348 100644 --- a/tests/test_cli/test_add/test_generic.py +++ b/tests/test_cli/test_add/test_generic.py @@ -21,6 +21,7 @@ from unittest import TestCase, mock from aea.cli.add import _add_item_deps + from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_add/test_protocol.py b/tests/test_cli/test_add/test_protocol.py index 370ced6021..5f009b6285 100644 --- a/tests/test_cli/test_add/test_protocol.py +++ b/tests/test_cli/test_add/test_protocol.py @@ -33,6 +33,7 @@ from aea.cli import cli from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE, PublicId from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_add/test_skill.py b/tests/test_cli/test_add/test_skill.py index 3bb7272949..1dda532ee9 100644 --- a/tests/test_cli/test_add/test_skill.py +++ b/tests/test_cli/test_add/test_skill.py @@ -38,6 +38,7 @@ PublicId, ) from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_add_key.py b/tests/test_cli/test_add_key.py index cf2b248f87..e064351450 100644 --- a/tests/test_cli/test_add_key.py +++ b/tests/test_cli/test_add_key.py @@ -30,6 +30,7 @@ from aea.cli import cli from aea.cli.add_key import _try_add_key from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig + from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_config.py b/tests/test_cli/test_config.py index 0195ca0675..aae0e685c2 100644 --- a/tests/test_cli/test_config.py +++ b/tests/test_cli/test_config.py @@ -26,6 +26,7 @@ from aea.cli import cli from aea.cli.utils.constants import ALLOWED_PATH_ROOTS + from tests.conftest import CLI_LOG_OPTION, CUR_PATH, CliRunner diff --git a/tests/test_cli/test_create.py b/tests/test_cli/test_create.py index e30f57d714..33432b81e2 100644 --- a/tests/test_cli/test_create.py +++ b/tests/test_cli/test_create.py @@ -43,6 +43,7 @@ DEFAULT_SKILL, ) from aea.configurations.loader import ConfigLoader, make_jsonschema_base_uri + from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, AUTHOR, diff --git a/tests/test_cli/test_delete.py b/tests/test_cli/test_delete.py index 8a694629d5..ce66ea73ef 100644 --- a/tests/test_cli/test_delete.py +++ b/tests/test_cli/test_delete.py @@ -26,6 +26,7 @@ from pathlib import Path from aea.cli import cli + from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_fetch.py b/tests/test_cli/test_fetch.py index 0b79bc69d0..618546666a 100644 --- a/tests/test_cli/test_fetch.py +++ b/tests/test_cli/test_fetch.py @@ -27,6 +27,7 @@ from aea.cli import cli from aea.cli.fetch import _is_version_correct, fetch_agent_locally from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import CLI_LOG_OPTION, MAX_FLAKY_RERUNS, CliRunner from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_fingerprint.py b/tests/test_cli/test_fingerprint.py index 3d984fe13c..f89f9ba3a3 100644 --- a/tests/test_cli/test_fingerprint.py +++ b/tests/test_cli/test_fingerprint.py @@ -24,6 +24,7 @@ from aea.cli import cli from aea.cli.fingerprint import _fingerprint_item + from tests.conftest import CLI_LOG_OPTION, CliRunner from tests.test_cli.tools_for_testing import ConfigLoaderMock, ContextMock, PublicIdMock diff --git a/tests/test_cli/test_freeze.py b/tests/test_cli/test_freeze.py index a6208472c5..c939ad7e40 100644 --- a/tests/test_cli/test_freeze.py +++ b/tests/test_cli/test_freeze.py @@ -31,6 +31,7 @@ from aea.cli import cli from aea.configurations.loader import make_jsonschema_base_uri + from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_generate/test_generate.py b/tests/test_cli/test_generate/test_generate.py index 0528b6e166..78df934c71 100644 --- a/tests/test_cli/test_generate/test_generate.py +++ b/tests/test_cli/test_generate/test_generate.py @@ -24,6 +24,7 @@ from aea.cli.generate import _generate_item from aea.configurations.base import ProtocolSpecificationParseError + from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_generate/test_protocols.py b/tests/test_cli/test_generate/test_protocols.py index 9fc2128df1..36d60b7271 100644 --- a/tests/test_cli/test_generate/test_protocols.py +++ b/tests/test_cli/test_generate/test_protocols.py @@ -33,6 +33,7 @@ from aea.cli import cli from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE from aea.configurations.loader import make_jsonschema_base_uri + from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_generate_key.py b/tests/test_cli/test_generate_key.py index b2795b22bd..67801b6f4a 100644 --- a/tests/test_cli/test_generate_key.py +++ b/tests/test_cli/test_generate_key.py @@ -26,6 +26,7 @@ from aea.cli import cli from aea.crypto.registries import make_crypto + from tests.conftest import ( CLI_LOG_OPTION, ETHEREUM, diff --git a/tests/test_cli/test_generate_wealth.py b/tests/test_cli/test_generate_wealth.py index f71687627b..01ac6d42c4 100644 --- a/tests/test_cli/test_generate_wealth.py +++ b/tests/test_cli/test_generate_wealth.py @@ -26,6 +26,7 @@ from aea.cli.generate_wealth import _try_generate_wealth from aea.test_tools.exceptions import AEATestingException from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( CLI_LOG_OPTION, FETCHAI, diff --git a/tests/test_cli/test_get_address.py b/tests/test_cli/test_get_address.py index 8d76ac81ea..86e582f7a1 100644 --- a/tests/test_cli/test_get_address.py +++ b/tests/test_cli/test_get_address.py @@ -22,6 +22,7 @@ from aea.cli import cli from aea.cli.get_address import _try_get_address + from tests.conftest import CLI_LOG_OPTION, FETCHAI, CliRunner from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_get_multiaddress.py b/tests/test_cli/test_get_multiaddress.py index a46f6f58a2..6f2c13e138 100644 --- a/tests/test_cli/test_get_multiaddress.py +++ b/tests/test_cli/test_get_multiaddress.py @@ -23,6 +23,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import FETCHAI diff --git a/tests/test_cli/test_get_wealth.py b/tests/test_cli/test_get_wealth.py index 4f7561eec9..ff6f118a2d 100644 --- a/tests/test_cli/test_get_wealth.py +++ b/tests/test_cli/test_get_wealth.py @@ -22,6 +22,7 @@ from aea.cli import cli from aea.cli.get_wealth import _try_get_wealth + from tests.conftest import CLI_LOG_OPTION, FETCHAI, CliRunner from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_gui.py b/tests/test_cli/test_gui.py index 78b813d4dc..a52d3d964e 100644 --- a/tests/test_cli/test_gui.py +++ b/tests/test_cli/test_gui.py @@ -31,6 +31,7 @@ from aea.cli import cli from aea.configurations.loader import make_jsonschema_base_uri from aea.test_tools.click_testing import CliRunner + from tests.common.pexpect_popen import PexpectWrapper from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, diff --git a/tests/test_cli/test_init.py b/tests/test_cli/test_init.py index 424375b27b..52611313cf 100644 --- a/tests/test_cli/test_init.py +++ b/tests/test_cli/test_init.py @@ -29,6 +29,7 @@ import yaml from aea.cli import cli + from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_install.py b/tests/test_cli/test_install.py index 648ddcc5c5..060efd06fd 100644 --- a/tests/test_cli/test_install.py +++ b/tests/test_cli/test_install.py @@ -31,6 +31,7 @@ from aea.cli.install import _install_dependency from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE from aea.exceptions import AEAException + from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner diff --git a/tests/test_cli/test_interact.py b/tests/test_cli/test_interact.py index 43e4bf3628..9d8adb5697 100644 --- a/tests/test_cli/test_interact.py +++ b/tests/test_cli/test_interact.py @@ -29,6 +29,7 @@ from aea.helpers.base import send_control_c from aea.mail.base import Envelope from aea.test_tools.test_cases import AEATestCaseEmpty, AEATestCaseMany + from tests.conftest import MAX_FLAKY_RERUNS diff --git a/tests/test_cli/test_launch.py b/tests/test_cli/test_launch.py index e0d8560c4f..cf9054a9af 100644 --- a/tests/test_cli/test_launch.py +++ b/tests/test_cli/test_launch.py @@ -34,6 +34,7 @@ from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE + from tests.common.pexpect_popen import PexpectWrapper from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, MAX_FLAKY_RERUNS, CliRunner diff --git a/tests/test_cli/test_list.py b/tests/test_cli/test_list.py index b78583c896..8b9030e964 100644 --- a/tests/test_cli/test_list.py +++ b/tests/test_cli/test_list.py @@ -30,6 +30,7 @@ from jsonschema import Draft4Validator from aea.cli import cli + from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_login.py b/tests/test_cli/test_login.py index 3bdb94e8dc..bb75736b03 100644 --- a/tests/test_cli/test_login.py +++ b/tests/test_cli/test_login.py @@ -21,6 +21,7 @@ from unittest import TestCase, mock from aea.cli import cli + from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_logout.py b/tests/test_cli/test_logout.py index 6847fc5948..491141119e 100644 --- a/tests/test_cli/test_logout.py +++ b/tests/test_cli/test_logout.py @@ -21,6 +21,7 @@ from unittest import TestCase, mock from aea.cli import cli + from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_publish.py b/tests/test_cli/test_publish.py index 63e827c7ab..ab5b97d799 100644 --- a/tests/test_cli/test_publish.py +++ b/tests/test_cli/test_publish.py @@ -28,6 +28,7 @@ _save_agent_locally, _validate_pkp, ) + from tests.conftest import CLI_LOG_OPTION, CliRunner from tests.test_cli.tools_for_testing import ( ContextMock, diff --git a/tests/test_cli/test_push.py b/tests/test_cli/test_push.py index 86abf6f7a9..5856162ea5 100644 --- a/tests/test_cli/test_push.py +++ b/tests/test_cli/test_push.py @@ -24,6 +24,7 @@ from aea.cli import cli from aea.cli.push import _check_package_public_id, _save_item_locally + from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_register.py b/tests/test_cli/test_register.py index c0f296f1f9..72f7d771b0 100644 --- a/tests/test_cli/test_register.py +++ b/tests/test_cli/test_register.py @@ -23,6 +23,7 @@ from aea.cli import cli from aea.cli.register import do_register from aea.cli.registry.settings import AUTH_TOKEN_KEY + from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_registry/test_fetch.py b/tests/test_cli/test_registry/test_fetch.py index 81c41143a4..1a800c4197 100644 --- a/tests/test_cli/test_registry/test_fetch.py +++ b/tests/test_cli/test_registry/test_fetch.py @@ -26,6 +26,7 @@ from click import ClickException from aea.cli.registry.fetch import fetch_agent + from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_registry/test_publish.py b/tests/test_cli/test_registry/test_publish.py index 2ec37fcc59..22f2c38100 100644 --- a/tests/test_cli/test_registry/test_publish.py +++ b/tests/test_cli/test_registry/test_publish.py @@ -21,6 +21,7 @@ from unittest import TestCase, mock from aea.cli.registry.publish import _compress, publish_agent + from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_registry/test_push.py b/tests/test_cli/test_registry/test_push.py index a3b28b3b8a..f60c89b5a8 100644 --- a/tests/test_cli/test_registry/test_push.py +++ b/tests/test_cli/test_registry/test_push.py @@ -24,6 +24,7 @@ from click import ClickException from aea.cli.registry.push import _compress_dir, _remove_pycache, push_item + from tests.conftest import AUTHOR from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_remove/test_connection.py b/tests/test_cli/test_remove/test_connection.py index 3b54a1efcb..3e4b5f69b0 100644 --- a/tests/test_cli/test_remove/test_connection.py +++ b/tests/test_cli/test_remove/test_connection.py @@ -31,6 +31,7 @@ import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE + from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner diff --git a/tests/test_cli/test_remove/test_contract.py b/tests/test_cli/test_remove/test_contract.py index a2423d27df..044d563ba8 100644 --- a/tests/test_cli/test_remove/test_contract.py +++ b/tests/test_cli/test_remove/test_contract.py @@ -21,6 +21,7 @@ from unittest import TestCase, mock from aea.cli import cli + from tests.conftest import CLI_LOG_OPTION, CliRunner diff --git a/tests/test_cli/test_remove/test_protocol.py b/tests/test_cli/test_remove/test_protocol.py index d06341bc75..f4b82b2ea9 100644 --- a/tests/test_cli/test_remove/test_protocol.py +++ b/tests/test_cli/test_remove/test_protocol.py @@ -31,6 +31,7 @@ import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE + from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner diff --git a/tests/test_cli/test_remove/test_remove_item.py b/tests/test_cli/test_remove/test_remove_item.py index 783f45fa7c..d7769bbcd8 100644 --- a/tests/test_cli/test_remove/test_remove_item.py +++ b/tests/test_cli/test_remove/test_remove_item.py @@ -23,6 +23,7 @@ from click import ClickException from aea.cli.remove import remove_item + from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_remove/test_skill.py b/tests/test_cli/test_remove/test_skill.py index 23bcb7649f..659a94cc9c 100644 --- a/tests/test_cli/test_remove/test_skill.py +++ b/tests/test_cli/test_remove/test_skill.py @@ -31,6 +31,7 @@ import aea.configurations.base from aea.cli import cli from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig + from tests.conftest import AUTHOR, CLI_LOG_OPTION, ROOT_DIR, CliRunner diff --git a/tests/test_cli/test_run.py b/tests/test_cli/test_run.py index ef7c5b091d..6ad47c3502 100644 --- a/tests/test_cli/test_run.py +++ b/tests/test_cli/test_run.py @@ -41,6 +41,7 @@ ) from aea.configurations.constants import DEFAULT_CONNECTION from aea.exceptions import AEAPackageLoadingError + from tests.common.pexpect_popen import PexpectWrapper from tests.conftest import ( AUTHOR, diff --git a/tests/test_cli/test_scaffold/test_connection.py b/tests/test_cli/test_scaffold/test_connection.py index ba70ef207d..c8fe7fad7b 100644 --- a/tests/test_cli/test_scaffold/test_connection.py +++ b/tests/test_cli/test_scaffold/test_connection.py @@ -35,6 +35,7 @@ from aea.cli import cli from aea.configurations.base import DEFAULT_CONNECTION_CONFIG_FILE from aea.configurations.loader import make_jsonschema_base_uri + from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_scaffold/test_generic.py b/tests/test_cli/test_scaffold/test_generic.py index 2391b0b84d..89d8ab38cd 100644 --- a/tests/test_cli/test_scaffold/test_generic.py +++ b/tests/test_cli/test_scaffold/test_generic.py @@ -24,6 +24,7 @@ from aea.cli import cli from aea.cli.scaffold import _scaffold_dm_handler + from tests.conftest import CLI_LOG_OPTION, CliRunner from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_scaffold/test_protocols.py b/tests/test_cli/test_scaffold/test_protocols.py index 22f44ce1e1..65df7b4b89 100644 --- a/tests/test_cli/test_scaffold/test_protocols.py +++ b/tests/test_cli/test_scaffold/test_protocols.py @@ -35,6 +35,7 @@ from aea.cli import cli from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE from aea.configurations.loader import make_jsonschema_base_uri + from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_scaffold/test_skills.py b/tests/test_cli/test_scaffold/test_skills.py index 22be5fe660..5c1b593e61 100644 --- a/tests/test_cli/test_scaffold/test_skills.py +++ b/tests/test_cli/test_scaffold/test_skills.py @@ -35,6 +35,7 @@ from aea.cli import cli from aea.configurations.base import DEFAULT_SKILL_CONFIG_FILE from aea.configurations.loader import make_jsonschema_base_uri + from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, diff --git a/tests/test_cli/test_search.py b/tests/test_cli/test_search.py index 8a983d9f16..6989eb16d2 100644 --- a/tests/test_cli/test_search.py +++ b/tests/test_cli/test_search.py @@ -32,6 +32,7 @@ from aea import AEA_DIR from aea.cli import cli from aea.configurations.base import PublicId + from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, AUTHOR, diff --git a/tests/test_cli/test_utils/test_config.py b/tests/test_cli/test_utils/test_config.py index e81b0ab859..971eda8410 100644 --- a/tests/test_cli/test_utils/test_config.py +++ b/tests/test_cli/test_utils/test_config.py @@ -24,6 +24,7 @@ from aea.cli.utils.config import validate_item_config from aea.cli.utils.exceptions import AEAConfigException + from tests.test_cli.tools_for_testing import AgentConfigMock, ConfigLoaderMock diff --git a/tests/test_cli/test_utils/test_utils.py b/tests/test_cli/test_utils/test_utils.py index ce2f250a59..455570208b 100644 --- a/tests/test_cli/test_utils/test_utils.py +++ b/tests/test_cli/test_utils/test_utils.py @@ -50,6 +50,7 @@ validate_author_name, validate_package_name, ) + from tests.conftest import FETCHAI from tests.test_cli.tools_for_testing import ( ConfigLoaderMock, diff --git a/tests/test_cli_gui/test_create.py b/tests/test_cli_gui/test_create.py index 53f83bba3f..5be16113f2 100644 --- a/tests/test_cli_gui/test_create.py +++ b/tests/test_cli_gui/test_create.py @@ -27,6 +27,7 @@ from aea.cli.create import create_aea from aea.cli.utils.context import Context from aea.test_tools.constants import DEFAULT_AUTHOR + from tests.conftest import CUR_PATH from tests.test_cli.tools_for_testing import raise_click_exception from tests.test_cli_gui.test_base import TempCWD, create_app diff --git a/tests/test_cli_gui/test_misc.py b/tests/test_cli_gui/test_misc.py index e7c05c23d4..86beb80b0a 100644 --- a/tests/test_cli_gui/test_misc.py +++ b/tests/test_cli_gui/test_misc.py @@ -23,9 +23,9 @@ from flask import Flask import aea.cli_gui -from tests.common.mocks import ctx_mock_Popen from .test_base import create_app +from tests.common.mocks import ctx_mock_Popen def test_home_page_exits(): diff --git a/tests/test_cli_gui/test_run_agent.py b/tests/test_cli_gui/test_run_agent.py index dff54f1fa9..cdf4611e31 100644 --- a/tests/test_cli_gui/test_run_agent.py +++ b/tests/test_cli_gui/test_run_agent.py @@ -32,6 +32,7 @@ from aea.cli.utils.context import Context from aea.configurations.constants import DEFAULT_CONNECTION from aea.test_tools.constants import DEFAULT_AUTHOR + from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS from tests.test_cli_gui.test_base import TempCWD, create_app diff --git a/tests/test_components/test_base.py b/tests/test_components/test_base.py index bb520fff59..8fbbaf486c 100644 --- a/tests/test_components/test_base.py +++ b/tests/test_components/test_base.py @@ -24,6 +24,7 @@ from aea.components.base import Component, load_aea_package from aea.configurations.base import ConnectionConfig, ProtocolConfig + from tests.conftest import ROOT_DIR diff --git a/tests/test_configurations/test_aea_config.py b/tests/test_configurations/test_aea_config.py index edec905c05..e7616166e4 100644 --- a/tests/test_configurations/test_aea_config.py +++ b/tests/test_configurations/test_aea_config.py @@ -39,6 +39,7 @@ ) from aea.configurations.loader import ConfigLoader, ConfigLoaders from aea.helpers.exception_policy import ExceptionPolicyEnum + from tests.conftest import CUR_PATH, ROOT_DIR diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index d7a8a7b825..cc5095176a 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -48,6 +48,7 @@ ) from aea.configurations.constants import DEFAULT_LEDGER from aea.configurations.loader import ConfigLoaders, load_component_configuration + from tests.conftest import ( AUTHOR, ROOT_DIR, diff --git a/tests/test_configurations/test_loader.py b/tests/test_configurations/test_loader.py index 6862dd3d4a..11fb64e920 100644 --- a/tests/test_configurations/test_loader.py +++ b/tests/test_configurations/test_loader.py @@ -30,6 +30,7 @@ from aea.configurations.base import PackageType, ProtocolSpecification from aea.configurations.loader import ConfigLoader, make_jsonschema_base_uri from aea.protocols.generator.common import load_protocol_specification + from tests.conftest import protocol_specification_files diff --git a/tests/test_configurations/test_schema.py b/tests/test_configurations/test_schema.py index dafbb537f1..08c1fcefd7 100644 --- a/tests/test_configurations/test_schema.py +++ b/tests/test_configurations/test_schema.py @@ -30,6 +30,7 @@ from jsonschema import Draft4Validator # type: ignore from aea.configurations.loader import make_jsonschema_base_uri + from tests.conftest import ( AGENT_CONFIGURATION_SCHEMA, CONFIGURATION_SCHEMA_DIR, diff --git a/tests/test_connections/test_stub.py b/tests/test_connections/test_stub.py index 2ac56d71fd..a9a3219028 100644 --- a/tests/test_connections/test_stub.py +++ b/tests/test_connections/test_stub.py @@ -42,6 +42,7 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage + from tests.conftest import ROOT_DIR, _make_stub_connection SEPARATOR = "," diff --git a/tests/test_context/test_base.py b/tests/test_context/test_base.py index 333a8bacfe..4ebe49282f 100644 --- a/tests/test_context/test_base.py +++ b/tests/test_context/test_base.py @@ -22,6 +22,7 @@ from aea.context.base import AgentContext from aea.identity.base import Identity + from tests.conftest import FETCHAI diff --git a/tests/test_contracts/test_base.py b/tests/test_contracts/test_base.py index fc0de4cfbc..2dfc07a4a7 100644 --- a/tests/test_contracts/test_base.py +++ b/tests/test_contracts/test_base.py @@ -34,6 +34,7 @@ from aea.crypto.ethereum import DEFAULT_ADDRESS as ETHEREUM_DEFAULT_ADDRESS from aea.crypto.fetchai import DEFAULT_ADDRESS as FETCHAI_DEFAULT_ADDRESS from aea.crypto.registries import crypto_registry, ledger_apis_registry + from tests.conftest import ETHEREUM, FETCHAI, ROOT_DIR diff --git a/tests/test_crypto/test_cosmos.py b/tests/test_crypto/test_cosmos.py index 36bbf49e38..521cd0267e 100644 --- a/tests/test_crypto/test_cosmos.py +++ b/tests/test_crypto/test_cosmos.py @@ -21,6 +21,7 @@ from unittest.mock import MagicMock from aea.crypto.cosmos import CosmosApi, CosmosCrypto + from tests.conftest import COSMOS_PRIVATE_KEY_PATH, COSMOS_TESTNET_CONFIG diff --git a/tests/test_crypto/test_ethereum.py b/tests/test_crypto/test_ethereum.py index b2e80ffcc8..e0aafd7d78 100644 --- a/tests/test_crypto/test_ethereum.py +++ b/tests/test_crypto/test_ethereum.py @@ -28,6 +28,7 @@ import pytest from aea.crypto.ethereum import EthereumApi, EthereumCrypto, EthereumFaucetApi + from tests.conftest import ( ETHEREUM_PRIVATE_KEY_PATH, ETHEREUM_TESTNET_CONFIG, diff --git a/tests/test_crypto/test_fetchai.py b/tests/test_crypto/test_fetchai.py index e26d8611fd..aec465043f 100644 --- a/tests/test_crypto/test_fetchai.py +++ b/tests/test_crypto/test_fetchai.py @@ -26,6 +26,7 @@ import pytest from aea.crypto.fetchai import FetchAIApi, FetchAICrypto, FetchAIFaucetApi + from tests.conftest import ( FETCHAI_PRIVATE_KEY_PATH, FETCHAI_TESTNET_CONFIG, diff --git a/tests/test_crypto/test_helpers.py b/tests/test_crypto/test_helpers.py index 2814346786..1bb71be721 100644 --- a/tests/test_crypto/test_helpers.py +++ b/tests/test_crypto/test_helpers.py @@ -36,6 +36,7 @@ try_validate_private_key_path, verify_or_create_private_keys, ) + from tests.conftest import ( COSMOS_PRIVATE_KEY_FILE, CUR_PATH, diff --git a/tests/test_crypto/test_ledger_apis.py b/tests/test_crypto/test_ledger_apis.py index 7bb5bd0a56..ade3ee345d 100644 --- a/tests/test_crypto/test_ledger_apis.py +++ b/tests/test_crypto/test_ledger_apis.py @@ -29,6 +29,7 @@ from aea.crypto.fetchai import FetchAIApi from aea.crypto.ledger_apis import LedgerApis from aea.exceptions import AEAEnforceError + from tests.conftest import COSMOS, COSMOS_ADDRESS_ONE, ETHEREUM_ADDRESS_ONE logger = logging.getLogger(__name__) diff --git a/tests/test_crypto/test_registry/test_crypto_registry.py b/tests/test_crypto/test_registry/test_crypto_registry.py index e0471b0dcb..19607fc413 100644 --- a/tests/test_crypto/test_registry/test_crypto_registry.py +++ b/tests/test_crypto/test_registry/test_crypto_registry.py @@ -31,6 +31,7 @@ from aea.crypto.fetchai import FetchAICrypto from aea.crypto.registries.base import EntryPoint from aea.exceptions import AEAException + from tests.conftest import COSMOS, ETHEREUM, FETCHAI from tests.data.custom_crypto import CustomCrypto diff --git a/tests/test_crypto/test_registry/test_ledger_api_registry.py b/tests/test_crypto/test_registry/test_ledger_api_registry.py index 9fe8943e4b..088128a9c3 100644 --- a/tests/test_crypto/test_registry/test_ledger_api_registry.py +++ b/tests/test_crypto/test_registry/test_ledger_api_registry.py @@ -24,6 +24,7 @@ import pytest import aea.crypto + from tests.conftest import ( ETHEREUM, ETHEREUM_ADDRESS_ONE, diff --git a/tests/test_crypto/test_wallet.py b/tests/test_crypto/test_wallet.py index 04ed6d899f..6f82c08868 100644 --- a/tests/test_crypto/test_wallet.py +++ b/tests/test_crypto/test_wallet.py @@ -29,6 +29,7 @@ from aea.crypto.fetchai import FetchAICrypto from aea.crypto.wallet import Wallet from aea.exceptions import AEAException + from tests.conftest import ( COSMOS_PRIVATE_KEY_PATH, ETHEREUM_PRIVATE_KEY_PATH, diff --git a/tests/test_decision_maker/test_default.py b/tests/test_decision_maker/test_default.py index 47fd7225f3..c475bd2d29 100644 --- a/tests/test_decision_maker/test_default.py +++ b/tests/test_decision_maker/test_default.py @@ -50,6 +50,7 @@ StateUpdateDialogues as BaseStateUpdateDialogues, ) from aea.protocols.state_update.message import StateUpdateMessage + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_PATH, diff --git a/tests/test_decision_maker/test_ownership_state.py b/tests/test_decision_maker/test_ownership_state.py index 26c6996ab9..c5ae85ae26 100644 --- a/tests/test_decision_maker/test_ownership_state.py +++ b/tests/test_decision_maker/test_ownership_state.py @@ -23,6 +23,7 @@ from aea.decision_maker.default import OwnershipState from aea.helpers.transaction.base import Terms + from tests.conftest import ETHEREUM diff --git a/tests/test_decision_maker/test_preferences.py b/tests/test_decision_maker/test_preferences.py index 3bd8b09879..e64ce455de 100644 --- a/tests/test_decision_maker/test_preferences.py +++ b/tests/test_decision_maker/test_preferences.py @@ -25,6 +25,7 @@ from aea.decision_maker.default import OwnershipState, Preferences from aea.helpers.transaction.base import Terms + from tests.conftest import ETHEREUM diff --git a/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py b/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py index 0f25897695..9fe0f5dfad 100644 --- a/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py +++ b/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py @@ -24,6 +24,7 @@ import pytest from aea.test_tools.test_cases import BaseAEATestCase + from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code from tests.test_docs.test_agent_vs_aea.agent_code_block import run diff --git a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py index 349289ad5c..834963d279 100644 --- a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py @@ -24,10 +24,10 @@ from aea.configurations.constants import DEFAULT_PRIVATE_KEY_FILE from aea.test_tools.test_cases import BaseAEATestCase -from tests.conftest import CUR_PATH, ROOT_DIR -from tests.test_docs.helper import extract_code_blocks, extract_python_code from .programmatic_aea import run +from tests.conftest import CUR_PATH, ROOT_DIR +from tests.test_docs.helper import extract_code_blocks, extract_python_code MD_FILE = "docs/build-aea-programmatically.md" PY_FILE = "test_docs/test_build_aea_programmatically/programmatic_aea.py" diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py index 5b8b52feeb..737f29fdfa 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py @@ -34,6 +34,7 @@ from aea.protocols.base import Protocol from aea.registries.resources import Resources from aea.skills.base import Skill + from packages.fetchai.connections.ledger.connection import LedgerConnection from packages.fetchai.connections.p2p_libp2p.connection import P2PLibp2pConnection from packages.fetchai.connections.soef.connection import SOEFConnection diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py index 80bd07567d..43c52bda0d 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py @@ -27,6 +27,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( CUR_PATH, FETCHAI, diff --git a/tests/test_docs/test_docs_protocol.py b/tests/test_docs/test_docs_protocol.py index 750dd8e5cf..4f68f4abf1 100644 --- a/tests/test_docs/test_docs_protocol.py +++ b/tests/test_docs/test_docs_protocol.py @@ -24,6 +24,7 @@ import mistune from aea.protocols.default.message import DefaultMessage + from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.oef_search.custom_types import OefErrorOperation from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/tests/test_docs/test_docs_skill.py b/tests/test_docs/test_docs_skill.py index 1cbde84b96..00e2b47bb6 100644 --- a/tests/test_docs/test_docs_skill.py +++ b/tests/test_docs/test_docs_skill.py @@ -24,6 +24,7 @@ from aea.skills.behaviours import OneShotBehaviour from aea.skills.tasks import Task + from tests.conftest import ROOT_DIR from tests.test_docs.helper import compile_and_exec diff --git a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py index 762fdcb010..615e30e44a 100644 --- a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py +++ b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py @@ -23,10 +23,10 @@ from pathlib import Path from aea.test_tools.test_cases import BaseAEATestCase -from tests.conftest import CUR_PATH, ROOT_DIR -from tests.test_docs.helper import extract_code_blocks, extract_python_code from .multiplexer_standalone import run +from tests.conftest import CUR_PATH, ROOT_DIR +from tests.test_docs.helper import extract_code_blocks, extract_python_code MD_FILE = "docs/multiplexer-standalone.md" PY_FILE = "test_docs/test_multiplexer_standalone/multiplexer_standalone.py" diff --git a/tests/test_docs/test_orm_integration/test_orm_integration.py b/tests/test_docs/test_orm_integration/test_orm_integration.py index a452a241b5..e111461af7 100644 --- a/tests/test_docs/test_orm_integration/test_orm_integration.py +++ b/tests/test_docs/test_orm_integration/test_orm_integration.py @@ -26,6 +26,7 @@ import yaml from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_docs/test_skill_guide/test_skill_guide.py b/tests/test_docs/test_skill_guide/test_skill_guide.py index 0f77e47bc9..0c9a5e1663 100644 --- a/tests/test_docs/test_skill_guide/test_skill_guide.py +++ b/tests/test_docs/test_skill_guide/test_skill_guide.py @@ -29,6 +29,7 @@ from aea import AEA_DIR from aea.configurations.base import DEFAULT_VERSION from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( AUTHOR, COSMOS, 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 2a98cb68e1..277e18c5fc 100644 --- a/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py @@ -26,10 +26,10 @@ import pytest from aea.test_tools.test_cases import BaseAEATestCase -from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS_INTEGRATION, ROOT_DIR -from tests.test_docs.helper import extract_code_blocks, extract_python_code from .standalone_transaction import logger, run +from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS_INTEGRATION, ROOT_DIR +from tests.test_docs.helper import extract_code_blocks, extract_python_code MD_FILE = "docs/standalone-transaction.md" PY_FILE = "test_docs/test_standalone_transaction/standalone_transaction.py" diff --git a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py index aa572200b0..1a8234e66e 100644 --- a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py +++ b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py @@ -46,6 +46,7 @@ from aea.protocols.base import Message, Protocol from aea.registries.resources import Resources from aea.skills.base import Handler, Skill, SkillContext + from packages.fetchai.connections.http_client.connection import HTTPClientConnection from packages.fetchai.protocols.http.message import HttpMessage from tests.conftest import HTTP_PROTOCOL_PUBLIC_ID diff --git a/tests/test_helpers/test_base.py b/tests/test_helpers/test_base.py index 692ef0ff54..d2b2ee347a 100644 --- a/tests/test_helpers/test_base.py +++ b/tests/test_helpers/test_base.py @@ -47,6 +47,7 @@ yaml_load, yaml_load_all, ) + from packages.fetchai.connections.oef.connection import OEFConnection from tests.conftest import CUR_PATH, ROOT_DIR, skip_test_windows diff --git a/tests/test_helpers/test_exec_timeout.py b/tests/test_helpers/test_exec_timeout.py index 87e7c42c5f..683a449f2f 100644 --- a/tests/test_helpers/test_exec_timeout.py +++ b/tests/test_helpers/test_exec_timeout.py @@ -32,6 +32,7 @@ ExecTimeoutThreadGuard, TimeoutException, ) + from tests.common.utils import timeit_context if os.name == "nt": diff --git a/tests/test_helpers/test_ipfs/test_base.py b/tests/test_helpers/test_ipfs/test_base.py index b7f581edb9..820f7b40b2 100644 --- a/tests/test_helpers/test_ipfs/test_base.py +++ b/tests/test_helpers/test_ipfs/test_base.py @@ -23,6 +23,7 @@ from unittest.mock import patch from aea.helpers.ipfs.base import IPFSHashOnly, _is_text + from tests.conftest import CUR_PATH FILE_PATH = "__init__.py" diff --git a/tests/test_helpers/test_pipe/test_pipe.py b/tests/test_helpers/test_pipe/test_pipe.py index 41fdb0d1cd..f4e5d95ef5 100644 --- a/tests/test_helpers/test_pipe/test_pipe.py +++ b/tests/test_helpers/test_pipe/test_pipe.py @@ -32,6 +32,7 @@ make_ipc_channel, make_ipc_channel_client, ) + from tests.conftest import skip_test_windows diff --git a/tests/test_identity/test_base.py b/tests/test_identity/test_base.py index 91ad680452..78ab1e42da 100644 --- a/tests/test_identity/test_base.py +++ b/tests/test_identity/test_base.py @@ -23,6 +23,7 @@ from aea.configurations.constants import DEFAULT_LEDGER from aea.identity.base import Identity + from tests.conftest import FETCHAI diff --git a/tests/test_launcher.py b/tests/test_launcher.py index 3b4ec4c1a5..2ea05053ff 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -33,6 +33,7 @@ from aea.helpers.base import cd from aea.launcher import AEALauncher, _run_agent from aea.test_tools.test_cases import CLI_LOG_OPTION + from tests.common.utils import wait_for_condition from tests.conftest import AUTHOR, CUR_PATH, CliRunner diff --git a/tests/test_mail/test_base.py b/tests/test_mail/test_base.py index 03cd58bd7b..0c24589ca9 100644 --- a/tests/test_mail/test_base.py +++ b/tests/test_mail/test_base.py @@ -29,6 +29,7 @@ from aea.multiplexer import InBox, Multiplexer, OutBox from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage + from packages.fetchai.connections.local.connection import LocalNode from tests.conftest import ( UNKNOWN_PROTOCOL_PUBLIC_ID, diff --git a/tests/test_multiplexer.py b/tests/test_multiplexer.py index a33f19f3a5..f3048912e7 100644 --- a/tests/test_multiplexer.py +++ b/tests/test_multiplexer.py @@ -40,8 +40,6 @@ from aea.mail.base import AEAConnectionError, Envelope, EnvelopeContext from aea.multiplexer import AsyncMultiplexer, InBox, Multiplexer, OutBox from aea.protocols.default.message import DefaultMessage -from packages.fetchai.connections.local.connection import LocalNode -from tests.common.utils import wait_for_condition from .conftest import ( UNKNOWN_CONNECTION_PUBLIC_ID, @@ -51,6 +49,8 @@ _make_stub_connection, logger, ) +from packages.fetchai.connections.local.connection import LocalNode +from tests.common.utils import wait_for_condition @pytest.mark.asyncio diff --git a/tests/test_packages/test_connections/test_gym/test_gym.py b/tests/test_packages/test_connections/test_gym/test_gym.py index dc5dbc56e1..f2bced4db9 100644 --- a/tests/test_packages/test_connections/test_gym/test_gym.py +++ b/tests/test_packages/test_connections/test_gym/test_gym.py @@ -31,6 +31,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.connections.gym.connection import GymConnection from packages.fetchai.protocols.gym.dialogues import GymDialogue from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues diff --git a/tests/test_packages/test_connections/test_http_client/test_http_client.py b/tests/test_packages/test_connections/test_http_client/test_http_client.py index 46fa4697c2..5ce8c66936 100644 --- a/tests/test_packages/test_connections/test_http_client/test_http_client.py +++ b/tests/test_packages/test_connections/test_http_client/test_http_client.py @@ -30,6 +30,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.connections.http_client.connection import HTTPClientConnection from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues diff --git a/tests/test_packages/test_connections/test_http_server/test_http_server.py b/tests/test_packages/test_connections/test_http_server/test_http_server.py index a233cff419..a63e7af233 100644 --- a/tests/test_packages/test_connections/test_http_server/test_http_server.py +++ b/tests/test_packages/test_connections/test_http_server/test_http_server.py @@ -35,6 +35,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.connections.http_server.connection import ( APISpec, HTTPServerConnection, 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 e1fb4f9864..faddbd6f72 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 @@ -29,6 +29,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.connections.http_client.connection import HTTPClientConnection from packages.fetchai.connections.http_server.connection import HTTPServerConnection from packages.fetchai.protocols.http.dialogues import HttpDialogue, HttpDialogues 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 c37e72d756..a0b314f5f7 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 @@ -31,6 +31,7 @@ from aea.multiplexer import MultiplexerStatus from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue + from packages.fetchai.connections.ledger.contract_dispatcher import ( ContractApiRequestDispatcher, ) diff --git a/tests/test_packages/test_connections/test_ledger/test_ledger_api.py b/tests/test_packages/test_connections/test_ledger/test_ledger_api.py index 8b217f7a92..edcf7358b0 100644 --- a/tests/test_packages/test_connections/test_ledger/test_ledger_api.py +++ b/tests/test_packages/test_connections/test_ledger/test_ledger_api.py @@ -41,6 +41,7 @@ ) from aea.mail.base import Envelope, Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.connections.ledger.connection import LedgerConnection from packages.fetchai.connections.ledger.ledger_dispatcher import ( LedgerApiRequestDispatcher, diff --git a/tests/test_packages/test_connections/test_local/test_misc.py b/tests/test_packages/test_connections/test_local/test_misc.py index a4fa2b3d14..9f89eac9e6 100644 --- a/tests/test_packages/test_connections/test_local/test_misc.py +++ b/tests/test_packages/test_connections/test_local/test_misc.py @@ -27,6 +27,7 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage + from packages.fetchai.connections.local.connection import LocalNode from packages.fetchai.protocols.fipa.message import FipaMessage from tests.conftest import _make_local_connection diff --git a/tests/test_packages/test_connections/test_local/test_search_services.py b/tests/test_packages/test_connections/test_local/test_search_services.py index dc6dea7450..97e03fd4bf 100644 --- a/tests/test_packages/test_connections/test_local/test_search_services.py +++ b/tests/test_packages/test_connections/test_local/test_search_services.py @@ -35,6 +35,7 @@ from aea.multiplexer import InBox, Multiplexer from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue + from packages.fetchai.connections.local.connection import LocalNode, OEFLocalConnection from packages.fetchai.protocols.fipa.dialogues import FipaDialogue, FipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/tests/test_packages/test_connections/test_oef/test_communication.py b/tests/test_packages/test_connections/test_oef/test_communication.py index e39741e3c1..79972d8107 100644 --- a/tests/test_packages/test_connections/test_oef/test_communication.py +++ b/tests/test_packages/test_connections/test_oef/test_communication.py @@ -50,6 +50,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.test_tools.test_cases import UseOef + from packages.fetchai.connections.oef.connection import OEFObjectTranslator from packages.fetchai.protocols.fipa import fipa_pb2 from packages.fetchai.protocols.fipa.message import FipaMessage diff --git a/tests/test_packages/test_connections/test_oef/test_models.py b/tests/test_packages/test_connections/test_oef/test_models.py index 544d8390d3..accb7470c5 100644 --- a/tests/test_packages/test_connections/test_oef/test_models.py +++ b/tests/test_packages/test_connections/test_oef/test_models.py @@ -36,6 +36,7 @@ Or, Query, ) + from packages.fetchai.connections.oef.connection import OEFObjectTranslator diff --git a/tests/test_packages/test_connections/test_oef/test_oef_serializer.py b/tests/test_packages/test_connections/test_oef/test_oef_serializer.py index 1240a82c02..a6e1e20b0b 100644 --- a/tests/test_packages/test_connections/test_oef/test_oef_serializer.py +++ b/tests/test_packages/test_connections/test_oef/test_oef_serializer.py @@ -27,6 +27,7 @@ Location, Query, ) + from packages.fetchai.connections.oef.object_translator import OEFObjectTranslator from packages.fetchai.protocols.oef_search.message import OefSearchMessage diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py index 3958eff47f..d31a3afbce 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py @@ -22,6 +22,7 @@ import os from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import libp2p_log_on_failure DEFAULT_PORT = 10234 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py index 4893ad2a6e..8b42415786 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py @@ -28,6 +28,7 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage + from packages.fetchai.connections.p2p_libp2p.connection import Uri from tests.conftest import ( _make_libp2p_connection, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py index b9230ea5b1..27deba8716 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py @@ -30,6 +30,7 @@ from aea.crypto.registries import make_crypto from aea.identity.base import Identity from aea.multiplexer import Multiplexer + from packages.fetchai.connections.p2p_libp2p.connection import ( LIBP2P_NODE_MODULE_NAME, AwaitableProc, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py index 8b7d39157b..97553180c5 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py @@ -30,6 +30,7 @@ from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage from aea.protocols.default.serialization import DefaultSerializer + from tests.conftest import ( _make_libp2p_connection, libp2p_log_on_failure, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py index c83f9b5887..08838b121a 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py @@ -29,6 +29,7 @@ from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import ( PUBLIC_DHT_DELEGATE_URI_1, PUBLIC_DHT_DELEGATE_URI_2, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py index 0a03321867..fc3c87b396 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py @@ -20,6 +20,7 @@ """This test module contains AEA cli tests for Libp2p tcp client connection.""" from aea.multiplexer import Multiplexer from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import ( _make_libp2p_connection, libp2p_log_on_failure, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py index 82a4f55b3f..51f293def8 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py @@ -29,6 +29,7 @@ from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage from aea.protocols.default.serialization import DefaultSerializer + from packages.fetchai.connections.p2p_libp2p_client.connection import Uri from tests.conftest import ( _make_libp2p_client_connection, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py index 3d1831717c..1834e135fb 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py @@ -29,6 +29,7 @@ from aea.crypto.registries import make_crypto from aea.identity.base import Identity from aea.multiplexer import Multiplexer + from packages.fetchai.connections.p2p_libp2p_client.connection import ( P2PLibp2pClientConnection, ) diff --git a/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py b/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py index 9c56863b1b..d5cfccb73d 100644 --- a/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py +++ b/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py @@ -30,6 +30,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope from aea.protocols.default.message import DefaultMessage + from packages.fetchai.connections.p2p_stub.connection import P2PStubConnection SEPARATOR = "," diff --git a/tests/test_packages/test_connections/test_soef/models.py b/tests/test_packages/test_connections/test_soef/models.py index a2dab6c1b3..245a50d19f 100644 --- a/tests/test_packages/test_connections/test_soef/models.py +++ b/tests/test_packages/test_connections/test_soef/models.py @@ -19,6 +19,7 @@ """This module contains models for soef connection tests.""" from aea.helpers.search.models import Attribute, DataModel, Location + from packages.fetchai.connections.soef.connection import ModelNames AGENT_LOCATION_MODEL = DataModel( diff --git a/tests/test_packages/test_connections/test_soef/test_soef.py b/tests/test_packages/test_connections/test_soef/test_soef.py index 3957765ebb..dcecd3b2fb 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef.py +++ b/tests/test_packages/test_connections/test_soef/test_soef.py @@ -41,6 +41,8 @@ from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + +from . import models from packages.fetchai.connections.soef.connection import SOEFConnection, SOEFException from packages.fetchai.protocols.oef_search.dialogues import OefSearchDialogue from packages.fetchai.protocols.oef_search.dialogues import ( @@ -49,8 +51,6 @@ from packages.fetchai.protocols.oef_search.message import OefSearchMessage from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID -from . import models - def make_async(return_value: Any) -> Callable: """Wrap value into async function.""" diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index 188089bdb7..3366cee8ca 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -41,12 +41,12 @@ from aea.identity.base import Identity from aea.mail.base import Envelope from aea.multiplexer import Multiplexer -from packages.fetchai.connections.soef.connection import SOEFConnection -from packages.fetchai.protocols.oef_search.message import OefSearchMessage -from tests.common.utils import wait_for_condition from . import models from .test_soef import OefSearchDialogues +from packages.fetchai.connections.soef.connection import SOEFConnection +from packages.fetchai.protocols.oef_search.message import OefSearchMessage +from tests.common.utils import wait_for_condition logging.basicConfig(level=logging.DEBUG) diff --git a/tests/test_packages/test_connections/test_tcp/test_base.py b/tests/test_packages/test_connections/test_tcp/test_base.py index c5a627a1bc..4381d84e28 100644 --- a/tests/test_packages/test_connections/test_tcp/test_base.py +++ b/tests/test_packages/test_connections/test_tcp/test_base.py @@ -27,6 +27,7 @@ from aea.mail.base import Envelope from aea.protocols.default.message import DefaultMessage + from tests.conftest import ( _make_tcp_client_connection, _make_tcp_server_connection, diff --git a/tests/test_packages/test_connections/test_tcp/test_communication.py b/tests/test_packages/test_connections/test_tcp/test_communication.py index 49da99d4f6..1a39f25d22 100644 --- a/tests/test_packages/test_connections/test_tcp/test_communication.py +++ b/tests/test_packages/test_connections/test_tcp/test_communication.py @@ -28,6 +28,7 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer from aea.protocols.default.message import DefaultMessage + from tests.conftest import ( _make_tcp_client_connection, _make_tcp_server_connection, diff --git a/tests/test_packages/test_connections/test_webhook/test_webhook.py b/tests/test_packages/test_connections/test_webhook/test_webhook.py index 177842aade..5a68208fc8 100644 --- a/tests/test_packages/test_connections/test_webhook/test_webhook.py +++ b/tests/test_packages/test_connections/test_webhook/test_webhook.py @@ -35,6 +35,7 @@ from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue + from packages.fetchai.connections.webhook.connection import WebhookConnection from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues diff --git a/tests/test_packages/test_contracts/test_erc1155/test_contract.py b/tests/test_packages/test_contracts/test_erc1155/test_contract.py index a30b081ff1..f2e9d58821 100644 --- a/tests/test_packages/test_contracts/test_erc1155/test_contract.py +++ b/tests/test_packages/test_contracts/test_erc1155/test_contract.py @@ -30,6 +30,7 @@ faucet_apis_registry, ledger_apis_registry, ) + from tests.conftest import ( ETHEREUM, ETHEREUM_ADDRESS_ONE, diff --git a/tests/test_packages/test_protocols/test_contract_api.py b/tests/test_packages/test_protocols/test_contract_api.py index af7ee43db4..d9a3ca45ce 100644 --- a/tests/test_packages/test_protocols/test_contract_api.py +++ b/tests/test_packages/test_protocols/test_contract_api.py @@ -26,13 +26,14 @@ import pytest -import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + +import packages from packages.fetchai.protocols.contract_api.dialogues import ( ContractApiDialogue, ContractApiDialogues, diff --git a/tests/test_packages/test_protocols/test_fipa.py b/tests/test_packages/test_protocols/test_fipa.py index ebbcf70e7b..0383e3d837 100644 --- a/tests/test_packages/test_protocols/test_fipa.py +++ b/tests/test_packages/test_protocols/test_fipa.py @@ -26,7 +26,6 @@ import pytest -import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.helpers.search.models import Constraint, ConstraintType, Description, Query @@ -34,6 +33,8 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + +import packages from packages.fetchai.protocols.fipa.dialogues import FipaDialogue, FipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.fipa.message import logger as fipa_message_logger diff --git a/tests/test_packages/test_protocols/test_gym.py b/tests/test_packages/test_protocols/test_gym.py index 9393c45328..2189e884b1 100644 --- a/tests/test_packages/test_protocols/test_gym.py +++ b/tests/test_packages/test_protocols/test_gym.py @@ -25,13 +25,14 @@ import pytest -import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + +import packages from packages.fetchai.protocols.gym.dialogues import GymDialogue, GymDialogues from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.protocols.gym.message import logger as gym_message_logger diff --git a/tests/test_packages/test_protocols/test_http.py b/tests/test_packages/test_protocols/test_http.py index 39eaaffc5d..ccd682fbd3 100644 --- a/tests/test_packages/test_protocols/test_http.py +++ b/tests/test_packages/test_protocols/test_http.py @@ -25,13 +25,14 @@ import pytest -import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + +import packages from packages.fetchai.protocols.http.dialogues import HttpDialogue, HttpDialogues from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.protocols.http.message import logger as http_message_logger diff --git a/tests/test_packages/test_protocols/test_ledger_api.py b/tests/test_packages/test_protocols/test_ledger_api.py index 89ab8c7914..ab4b545fb8 100644 --- a/tests/test_packages/test_protocols/test_ledger_api.py +++ b/tests/test_packages/test_protocols/test_ledger_api.py @@ -25,13 +25,14 @@ import pytest -import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + +import packages from packages.fetchai.protocols.ledger_api.dialogues import ( LedgerApiDialogue, LedgerApiDialogues, diff --git a/tests/test_packages/test_protocols/test_ml_trade.py b/tests/test_packages/test_protocols/test_ml_trade.py index 3b8add1aa6..51e1c309d9 100644 --- a/tests/test_packages/test_protocols/test_ml_trade.py +++ b/tests/test_packages/test_protocols/test_ml_trade.py @@ -26,7 +26,6 @@ import pytest -import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.helpers.search.models import Constraint, ConstraintType, Description, Query @@ -34,6 +33,8 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + +import packages from packages.fetchai.protocols.ml_trade.dialogues import ( MlTradeDialogue, MlTradeDialogues, diff --git a/tests/test_packages/test_protocols/test_oef_search.py b/tests/test_packages/test_protocols/test_oef_search.py index 36016ac7eb..5efd5a8735 100644 --- a/tests/test_packages/test_protocols/test_oef_search.py +++ b/tests/test_packages/test_protocols/test_oef_search.py @@ -25,7 +25,6 @@ import pytest -import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.helpers.search.models import Constraint, ConstraintType, Description, Query @@ -33,6 +32,8 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + +import packages from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogue, OefSearchDialogues, diff --git a/tests/test_packages/test_protocols/test_tac.py b/tests/test_packages/test_protocols/test_tac.py index 3cadefbf99..ea4cfa7809 100644 --- a/tests/test_packages/test_protocols/test_tac.py +++ b/tests/test_packages/test_protocols/test_tac.py @@ -25,13 +25,14 @@ import pytest -import packages from aea.common import Address from aea.exceptions import AEAEnforceError from aea.mail.base import Envelope from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel + +import packages from packages.fetchai.protocols.tac.dialogues import TacDialogue, TacDialogues from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.protocols.tac.message import logger as tac_message_logger diff --git a/tests/test_packages/test_skills/test_carpark.py b/tests/test_packages/test_skills/test_carpark.py index ca63ad4c3e..a95f7128b1 100644 --- a/tests/test_packages/test_skills/test_carpark.py +++ b/tests/test_packages/test_skills/test_carpark.py @@ -24,6 +24,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_erc1155.py b/tests/test_packages/test_skills/test_erc1155.py index 439bdf5b27..f785a87681 100644 --- a/tests/test_packages/test_skills/test_erc1155.py +++ b/tests/test_packages/test_skills/test_erc1155.py @@ -23,6 +23,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_generic.py b/tests/test_packages/test_skills/test_generic.py index 7791c37d50..d320798742 100644 --- a/tests/test_packages/test_skills/test_generic.py +++ b/tests/test_packages/test_skills/test_generic.py @@ -23,6 +23,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_gym.py b/tests/test_packages/test_skills/test_gym.py index 4f5f3544d2..91619b6314 100644 --- a/tests/test_packages/test_skills/test_gym.py +++ b/tests/test_packages/test_skills/test_gym.py @@ -23,6 +23,7 @@ import shutil from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import ROOT_DIR diff --git a/tests/test_packages/test_skills/test_http_echo.py b/tests/test_packages/test_skills/test_http_echo.py index f44520bc57..e476ed7de2 100644 --- a/tests/test_packages/test_skills/test_http_echo.py +++ b/tests/test_packages/test_skills/test_http_echo.py @@ -24,6 +24,7 @@ import requests from aea.test_tools.test_cases import AEATestCaseEmpty + from tests.conftest import ROOT_DIR API_SPEC_PATH = Path(ROOT_DIR, "examples", "http_ex", "petstore.yaml").absolute() diff --git a/tests/test_packages/test_skills/test_ml_skills.py b/tests/test_packages/test_skills/test_ml_skills.py index 0d17f5cc40..3ed1c80747 100644 --- a/tests/test_packages/test_skills/test_ml_skills.py +++ b/tests/test_packages/test_skills/test_ml_skills.py @@ -25,6 +25,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index 0ea77c3680..a2397ffcbc 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -23,6 +23,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_thermometer.py b/tests/test_packages/test_skills/test_thermometer.py index c000784bcd..0d87abf663 100644 --- a/tests/test_packages/test_skills/test_thermometer.py +++ b/tests/test_packages/test_skills/test_thermometer.py @@ -23,6 +23,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_packages/test_skills/test_weather.py b/tests/test_packages/test_skills/test_weather.py index ecf0d33309..76f159df7a 100644 --- a/tests/test_packages/test_skills/test_weather.py +++ b/tests/test_packages/test_skills/test_weather.py @@ -23,6 +23,7 @@ import pytest from aea.test_tools.test_cases import AEATestCaseMany + from tests.conftest import ( COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, diff --git a/tests/test_protocols/test_base.py b/tests/test_protocols/test_base.py index dd7f7c9e2b..357b1e9a8e 100644 --- a/tests/test_protocols/test_base.py +++ b/tests/test_protocols/test_base.py @@ -40,6 +40,7 @@ StateUpdateDialogue, StateUpdateDialogues, ) + from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID diff --git a/tests/test_protocols/test_generator/test_common.py b/tests/test_protocols/test_generator/test_common.py index 5dce4dd880..a2d8a12360 100644 --- a/tests/test_protocols/test_generator/test_common.py +++ b/tests/test_protocols/test_generator/test_common.py @@ -43,6 +43,7 @@ try_run_isort_formatting, try_run_protoc, ) + from tests.test_protocols.test_generator.common import ( PATH_TO_T_PROTOCOL_SPECIFICATION, T_PROTOCOL_NAME, diff --git a/tests/test_protocols/test_generator/test_end_to_end.py b/tests/test_protocols/test_generator/test_end_to_end.py index bc9f189eca..bae4a62cad 100644 --- a/tests/test_protocols/test_generator/test_end_to_end.py +++ b/tests/test_protocols/test_generator/test_end_to_end.py @@ -34,6 +34,7 @@ from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Handler, Skill, SkillContext from aea.test_tools.test_cases import UseOef + from tests.conftest import ROOT_DIR from tests.data.generator.t_protocol.dialogues import ( TProtocolDialogue, diff --git a/tests/test_protocols/test_generator/test_extract_specification.py b/tests/test_protocols/test_generator/test_extract_specification.py index 2161c9d559..9f1122363b 100644 --- a/tests/test_protocols/test_generator/test_extract_specification.py +++ b/tests/test_protocols/test_generator/test_extract_specification.py @@ -36,6 +36,7 @@ _specification_type_to_python_type, extract, ) + from tests.test_protocols.test_generator.common import PATH_TO_T_PROTOCOL_SPECIFICATION logger = logging.getLogger("aea") diff --git a/tests/test_protocols/test_generator/test_generator.py b/tests/test_protocols/test_generator/test_generator.py index d47b575af4..b6038accee 100644 --- a/tests/test_protocols/test_generator/test_generator.py +++ b/tests/test_protocols/test_generator/test_generator.py @@ -33,6 +33,7 @@ ProtocolSpecificationParseError, ) from aea.protocols.generator.base import ProtocolGenerator + from tests.conftest import ROOT_DIR from tests.data.generator.t_protocol.message import TProtocolMessage # type: ignore from tests.test_protocols.test_generator.common import ( diff --git a/tests/test_protocols/test_signing.py b/tests/test_protocols/test_signing.py index 24fe1adcf9..a548e4fa02 100644 --- a/tests/test_protocols/test_signing.py +++ b/tests/test_protocols/test_signing.py @@ -30,6 +30,7 @@ Terms, ) from aea.protocols.signing.message import SigningMessage + from tests.conftest import COSMOS diff --git a/tests/test_registries/test_base.py b/tests/test_registries/test_base.py index f8e94145c9..35c145764a 100644 --- a/tests/test_registries/test_base.py +++ b/tests/test_registries/test_base.py @@ -53,6 +53,7 @@ ) from aea.registries.resources import Resources from aea.skills.base import Skill + from tests.conftest import CUR_PATH, ROOT_DIR, _make_dummy_connection diff --git a/tests/test_registries/test_filter.py b/tests/test_registries/test_filter.py index 4e34d9f14d..f07b9b2db7 100644 --- a/tests/test_registries/test_filter.py +++ b/tests/test_registries/test_filter.py @@ -29,6 +29,7 @@ from aea.registries.filter import Filter from aea.registries.resources import Resources from aea.skills.base import Skill + from tests.data.dummy_skill.behaviours import DummyBehaviour from tests.data.dummy_skill.handlers import DummyHandler diff --git a/tests/test_runner.py b/tests/test_runner.py index cfeb15bf65..170ef93eac 100644 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -29,6 +29,7 @@ from aea.helpers.multiple_executor import logger as executor_logger from aea.runner import AEARunner from aea.skills.base import Skill, SkillContext + from tests.common.utils import make_behaviour_cls_from_funcion, wait_for_condition from tests.conftest import FETCHAI_PRIVATE_KEY_PATH diff --git a/tests/test_runtime.py b/tests/test_runtime.py index c111287df1..05cc970e66 100644 --- a/tests/test_runtime.py +++ b/tests/test_runtime.py @@ -27,6 +27,7 @@ from aea.aea_builder import AEABuilder from aea.configurations.constants import DEFAULT_LEDGER, DEFAULT_PRIVATE_KEY_FILE from aea.runtime import AsyncRuntime, BaseRuntime, RuntimeStates, ThreadedRuntime + from tests.common.utils import run_in_thread, wait_for_condition from tests.conftest import CUR_PATH diff --git a/tests/test_skills/test_base.py b/tests/test_skills/test_base.py index 9468b317d9..4becbd346d 100644 --- a/tests/test_skills/test_base.py +++ b/tests/test_skills/test_base.py @@ -48,6 +48,7 @@ _check_duplicate_classes, _print_warning_message_for_non_declared_skill_components, ) + from tests.conftest import ( ETHEREUM, ETHEREUM_PRIVATE_KEY_PATH, diff --git a/tests/test_skills/test_error.py b/tests/test_skills/test_error.py index ff38b21c2b..f8e3d4c2ad 100644 --- a/tests/test_skills/test_error.py +++ b/tests/test_skills/test_error.py @@ -35,6 +35,7 @@ from aea.registries.resources import Resources from aea.skills.base import SkillContext from aea.skills.error.handlers import ErrorHandler + from packages.fetchai.protocols.fipa.message import FipaMessage from tests.common.utils import wait_for_condition from tests.conftest import CUR_PATH, _make_dummy_connection diff --git a/tests/test_test_tools/test_testcases.py b/tests/test_test_tools/test_testcases.py index 22f5abc4ca..3a8b77b366 100644 --- a/tests/test_test_tools/test_testcases.py +++ b/tests/test_test_tools/test_testcases.py @@ -31,6 +31,7 @@ from aea.protocols.dialogue.base import Dialogue from aea.test_tools.exceptions import AEATestingException from aea.test_tools.test_cases import AEATestCase, AEATestCaseEmpty + from tests.conftest import FETCHAI from tests.test_cli import test_generate_wealth, test_interact From b6bd3b61b60cbb118ef74fea3378731d59992014 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 10:15:12 +0200 Subject: [PATCH 022/131] update hashes --- .../fetchai/connections/gym/connection.yaml | 2 +- .../connections/http_client/connection.yaml | 2 +- .../connections/http_server/connection.yaml | 2 +- .../connections/ledger/connection.yaml | 6 +- .../fetchai/connections/local/connection.yaml | 2 +- .../fetchai/connections/oef/connection.yaml | 2 +- .../fetchai/connections/soef/connection.yaml | 2 +- .../fetchai/connections/tcp/connection.yaml | 4 +- .../connections/webhook/connection.yaml | 2 +- .../protocols/contract_api/protocol.yaml | 6 +- packages/fetchai/protocols/fipa/protocol.yaml | 6 +- packages/fetchai/protocols/gym/protocol.yaml | 6 +- packages/fetchai/protocols/http/protocol.yaml | 4 +- .../protocols/ledger_api/protocol.yaml | 6 +- .../fetchai/protocols/ml_trade/protocol.yaml | 6 +- .../protocols/oef_search/protocol.yaml | 6 +- packages/fetchai/protocols/tac/protocol.yaml | 6 +- .../fetchai/skills/aries_alice/skill.yaml | 6 +- .../fetchai/skills/aries_faber/skill.yaml | 6 +- .../skills/carpark_detection/skill.yaml | 2 +- packages/fetchai/skills/echo/skill.yaml | 2 +- .../fetchai/skills/erc1155_client/skill.yaml | 6 +- .../fetchai/skills/erc1155_deploy/skill.yaml | 8 +-- .../fetchai/skills/generic_buyer/skill.yaml | 6 +- .../fetchai/skills/generic_seller/skill.yaml | 6 +- packages/fetchai/skills/gym/skill.yaml | 8 +-- packages/fetchai/skills/http_echo/skill.yaml | 4 +- .../skills/ml_data_provider/skill.yaml | 4 +- packages/fetchai/skills/ml_train/skill.yaml | 4 +- .../simple_service_registration/skill.yaml | 6 +- .../fetchai/skills/tac_control/skill.yaml | 8 +-- .../skills/tac_control_contract/skill.yaml | 8 +-- .../fetchai/skills/tac_negotiation/skill.yaml | 10 +-- .../skills/tac_participation/skill.yaml | 8 +-- packages/hashes.csv | 68 +++++++++---------- 35 files changed, 120 insertions(+), 120 deletions(-) diff --git a/packages/fetchai/connections/gym/connection.yaml b/packages/fetchai/connections/gym/connection.yaml index f55d9694b2..2ecf2a9b7a 100644 --- a/packages/fetchai/connections/gym/connection.yaml +++ b/packages/fetchai/connections/gym/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPUxpn8smGVFexxhUu3Vy3q5xsJukHnYtQzUXyt965bmL __init__.py: QmWwxj1hGGZNteCvRtZxwtY9PuEKsrWsEmMWCKwiYCdvRR - connection.py: QmSnGeGf42n8XTqe3jT9SvpLsEaXaEP7ciSSF1p1sNhMbi + connection.py: QmVDJV8G9xdk4QN2izxRH183WesDjPxXxrZ8PAurqtZ9D3 fingerprint_ignore_patterns: [] protocols: - fetchai/gym:0.6.0 diff --git a/packages/fetchai/connections/http_client/connection.yaml b/packages/fetchai/connections/http_client/connection.yaml index 19a78aab55..f87a4b0e3f 100644 --- a/packages/fetchai/connections/http_client/connection.yaml +++ b/packages/fetchai/connections/http_client/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmXfZJPAh4Ujt3xj8xzd6ng6HbrpJQUuvjWe8DNQSwSKWU __init__.py: QmPdKAks8A6XKAgZiopJzPZYXJumTeUqChd8UorqmLQQPU - connection.py: QmcUNSyeaKRnbWMtZeHnHhz8VUYMZMdUZn6mipmFciDGzH + connection.py: QmSBQnD19bcfrmgv5zFex94DLeY33osLwduozYqABRiSvo fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/http_server/connection.yaml b/packages/fetchai/connections/http_server/connection.yaml index 0bbcde7cf3..f6ba1d652a 100644 --- a/packages/fetchai/connections/http_server/connection.yaml +++ b/packages/fetchai/connections/http_server/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTmQcnUPKaDHHJHngBFXnUVPdgBLanP9DbjVHZT55Scfn __init__.py: Qmb6JEAkJeb5JweqrSGiGoQp1vGXqddjGgb9WMkm2phTgA - connection.py: QmXLqBCHVsQmpTKdDNUB6GJkHVFRipA39uoij8snVExEP4 + connection.py: QmTbxD1VE4nA8uonSWa1b4hZwji8UEJ8aCXb71LVxeFFYY fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index c2b54a95fb..1fa8d81190 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -9,9 +9,9 @@ fingerprint: README.md: QmfQN7UK1M4pBUzKVzPannPLVi8iiULKHNtJ7XpoWpjqfc __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj base.py: Qmec23f5Be6AkNvjwujzrRJExeXkjhD6fPzhRmGiPgwPLC - connection.py: QmaRg6kLFsSERL4gExFfnXTK3ZAj6Kx4nTVcVL4Yh67ECs - contract_dispatcher.py: QmZnytzjMMgJeACQRgVvhH4iijgvvW4nmP7AD6Fz4rAKjr - ledger_dispatcher.py: QmRXSuhgHqRgqkTtcBwdvjPd4QRpVuZWfBubgNeQSh9FJJ + connection.py: Qmdibf99GzdFjFCcoTX7AiiBVWznKvPZWvur8cngSRNdye + contract_dispatcher.py: QmXMPf7Mekyfo8SofcVYWWgMwADQZw68cXbmtf1pyKchVc + ledger_dispatcher.py: QmTGvnN5W7VHZ9McQSyDQ1jPQoFWmQmuR2a3y8LL6J7aiM fingerprint_ignore_patterns: [] protocols: - fetchai/contract_api:0.5.0 diff --git a/packages/fetchai/connections/local/connection.yaml b/packages/fetchai/connections/local/connection.yaml index e8d3ffba04..5c722defd8 100644 --- a/packages/fetchai/connections/local/connection.yaml +++ b/packages/fetchai/connections/local/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmbK7MtyAVqh2LmSh9TY6yBZqfWaAXURP4rQGATyP2hTKC __init__.py: QmeeoX5E38Ecrb1rLdeFyyxReHLrcJoETnBcPbcNWVbiKG - connection.py: QmQcok4CvW1WHqyx3pUUgyKjvLYW5PCYEUH7MFYWbpFGuS + connection.py: QmaydCZEzNwBiDw5rVAW9oh63S9ymaG4WHcj2TWDnWViF2 fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/connections/oef/connection.yaml b/packages/fetchai/connections/oef/connection.yaml index 803272c1f0..0f429611ed 100644 --- a/packages/fetchai/connections/oef/connection.yaml +++ b/packages/fetchai/connections/oef/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVHWxThR1u9a4BEm89oCxUTPGnN6PznvNgo6oZLqDD3n5 __init__.py: QmUAen8tmoBHuCerjA3FSGKJRLG6JYyUS3chuWzPxKYzez - connection.py: QmVCcDnoAVFVCGovD8WUdT99BAkkRgsoxGEiizQBw72CT7 + connection.py: QmQZf8YSviqEi2KbkQUdAAU5Z2TCAdXuQXTLv2sVCncrQ9 object_translator.py: QmfDTqq9kUhWrAJf8SyevzhcKcuYioiLxLQtWhavxbvawS fingerprint_ignore_patterns: [] protocols: diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index 0d3a69b6a9..8a6ca5d174 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmWwjETX39APP9RD5oVPeeCiDnUoDvjAcoVe2FK2Jc6anM __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmZUiXzv3TTQN3pRSTXv21zDkaTKCpEbQy4WKEysaNz5iq + connection.py: QmaBSm4WJgew1c2tChSR3683PTKBqdXgdHaPaQJXuEFXFL fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/connections/tcp/connection.yaml b/packages/fetchai/connections/tcp/connection.yaml index 244e25f814..7ecf44617c 100644 --- a/packages/fetchai/connections/tcp/connection.yaml +++ b/packages/fetchai/connections/tcp/connection.yaml @@ -10,8 +10,8 @@ fingerprint: __init__.py: QmTxAtQ9ffraStxxLAkvmWxyGhoV3jE16Sw6SJ9xzTthLb base.py: QmRu7RYvTQuXvzM8mj8LQ8d3XtaHKLRdnMo7AvX2X76npe connection.py: QmcQnyUagAhE7UsSBxiBSqsuF4mTMdU26LZLhUhdq5QygR - tcp_client.py: QmZ525Hun84As512AvVM6imBfeF9Rg9Qu9uqySynEJqeda - tcp_server.py: QmVxWqr4Hr5Kumdwi9xE83Pez5aMx64HqgV2NHeRUUka1A + tcp_client.py: QmR96SGPA9ZKQSJuhXXuQhPu55X3pygwGKhjtVZaynFVF1 + tcp_server.py: Qme1JTrtwuR1aGsA24yCnuPeGq1NRXrLDuG4ANUK5Uv317 fingerprint_ignore_patterns: [] protocols: [] class_name: TCPClientConnection diff --git a/packages/fetchai/connections/webhook/connection.yaml b/packages/fetchai/connections/webhook/connection.yaml index 8486472c9c..e234b9719c 100644 --- a/packages/fetchai/connections/webhook/connection.yaml +++ b/packages/fetchai/connections/webhook/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmQDqfKKsksKsUqdqTcYe8P8Fw3MGovVuZBFHPbhupkkxf __init__.py: QmWUKSmXaBgGMvKgdmzKmMjCx43BnrfW6og2n3afNoAALq - connection.py: QmPXKYLQXdv6QryujJ8JXvLqRxAnEPjN2uWoYx3GkhYkac + connection.py: Qme93KgLYqvUkqspcrLb2wyBqN4v2wbvcNMXFnuVMRKJBx fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/protocols/contract_api/protocol.yaml b/packages/fetchai/protocols/contract_api/protocol.yaml index c2c207893f..f1bf7e424c 100644 --- a/packages/fetchai/protocols/contract_api/protocol.yaml +++ b/packages/fetchai/protocols/contract_api/protocol.yaml @@ -11,9 +11,9 @@ fingerprint: contract_api.proto: QmNwngtcYFSuqL8yeTGVXmrHjfebCybdUa9BnTDKXn8odk contract_api_pb2.py: QmVT6Fv53KyFhshNFEo38seHypd7Y62psBaF8NszV8iRHK custom_types.py: QmbLjpiTcGNfvdBsu8pgQH6PK5y6ujdNnZ53JSk1GZDRCA - dialogues.py: QmSDg2B75CTZ3y8hyZgEsCMPseu6XFzcB7QX8XtMXJDWbn - message.py: QmUccjMF97WqBZNuDrsYRMofAsfZ2vZFEHnyoiicNuY73K - serialization.py: QmfGrQURxWxrYQMYATbseN3pggTbJbYccy1kXFkqKSrLeK + dialogues.py: QmTjXH8JUtziUFDawKsSTYE5dxn1n1FmMPeWexyxiPYd6k + message.py: Qmbxqt2TauoUkP6bqeYz1LZ7FukMvW3szs26HU87QCEFya + serialization.py: QmQzS931wTQNt758wvnB81aD16hUMQ19WVK6f1p1XuEwUp fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/fipa/protocol.yaml b/packages/fetchai/protocols/fipa/protocol.yaml index a03513921d..f1f2a5a028 100644 --- a/packages/fetchai/protocols/fipa/protocol.yaml +++ b/packages/fetchai/protocols/fipa/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmRwxwzxfhotek7WUbyAeufBvoHpWbDwfUVMy3FKitiHKy __init__.py: QmZuv8RGegxunYaJ7sHLwj2oLLCFCAGF139b8DxEY68MRT custom_types.py: Qmb7bzEUAW74ZeSFqL7sTccNCjudStV63K4CFNZtibKUHB - dialogues.py: QmdGVV1SqzwYo1UwEfpPMAryzCaYTWXUuraYDSe9ZKQXZZ + dialogues.py: QmWaciW35ZTVeTeLWeyp3hjehKkWB5ZY7Di8N8cDH8Mjwb fipa.proto: QmP7JqnuQSQ9BDcKkscrTydKEX4wFBoyFaY1bkzGkamcit fipa_pb2.py: QmZMkefJLrb3zJKoimb6a9tdpxDBhc8rR2ghimqg7gZ471 - message.py: QmPEx8gqKV6Cw1LeakKfC6frVpe225zb3BjyVxqX3bKwQr - serialization.py: QmW8riKb6M5Bso67hp9XRLXUC86hAR5GJEyyQWcqdkbdt5 + message.py: QmbFtigdnmqqmKZMTxjmk6JQJtcyhVY9a4mpEEcHmFJd24 + serialization.py: QmQMb8F8hJm1gkJFSPPCtDAoxSX3bFkshtzRgDWfWB8ynd fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index 6e3c2e1f63..e53d9e38d6 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmTCkz4cEUcwuPZVtvrVr8Np5qn1SMwm6foGSY9Y68DhZT __init__.py: QmWBvruqGuU2BVCq8cuP1S3mgvuC78yrG4TdtSvKhCT8qX custom_types.py: QmT3VKT86xZKR11RR1vQ3myRpmVZNdzY6ELd8HG9U2ngwa - dialogues.py: QmTJLhmqiB1DpoQVQKwo8RRUeoba8h1jVeTm399vgd2t66 + dialogues.py: QmdCzcFfyPF43U2SoxwshG5p4hd6dK49m6GYKduDHbnNPo gym.proto: QmQGF9Xz4Z93wmhdKoztzxjo5pS4SsAWe2TQdvZCLuzdGC gym_pb2.py: QmSTz7xrL8ryqzR1Sgu1NpR6PmW7GUhBGnN2qYc8m8NCcN - message.py: Qmd9viV8e1SzaTNmKXVjFnsTavNN64JReJRkkQAnpX1A97 - serialization.py: QmZ4aVD25B2jpEPBXzPgPHj9PeyZyh8VwYrb2knJcgXCbE + message.py: QmTaiHDJkdduU4HLn7i17oAigJQwrws8FmfQCwbfAagnGp + serialization.py: QmPNsgeGkagzQuAyq97fcGXA2LoPwiuq8X1tcfVXoLwnSV fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/http/protocol.yaml b/packages/fetchai/protocols/http/protocol.yaml index 75bb043685..fba165de7c 100644 --- a/packages/fetchai/protocols/http/protocol.yaml +++ b/packages/fetchai/protocols/http/protocol.yaml @@ -8,11 +8,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmY7fxhyNBgwU7uc6LKtCN4aSQ4bym5BwqtwRAfwPokULN __init__.py: QmRWie4QPiFJE8nK4fFJ6prqoG3u36cPo7st5JUZAGpVWv - dialogues.py: Qmf69mXWZQU1jaPAKqdyFujgp2LmXu37RJYqzvgYttPfDS + dialogues.py: QmdwTehjCppcxyDid8m6zuHY5YwprUhato88R9Zdm9aXaM http.proto: QmdTUTvvxGxMxSTB67AXjMUSDLdsxBYiSuJNVxHuLKB1jS http_pb2.py: QmYYKqdwiueq54EveL9WXn216FXLSQ6XGJJHoiJxwJjzHC message.py: QmYSmd2xLU8TsLLorxxNnaHj1cVLztgrKtQnaqJ1USFkPY - serialization.py: QmUdYL9PqDEbbjLaotxMSNEoVnEAdvFewffw2CV5SgG7sp + serialization.py: QmTq34k2PD6Ybhk8x1EboY3UcNp8r3H6Tb3egZsWJN9nFv fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/ledger_api/protocol.yaml b/packages/fetchai/protocols/ledger_api/protocol.yaml index eb615a0b21..e74aaec3e3 100644 --- a/packages/fetchai/protocols/ledger_api/protocol.yaml +++ b/packages/fetchai/protocols/ledger_api/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmSoo6ds8mKhtoG8CBbu9rb9yj7sqeeuBfcU7CLj584uRX __init__.py: Qmct8jVx6ndWwaa5HXJAJgMraVuZ8kMeyx6rnEeHAYHwDJ custom_types.py: QmQJnWQvtj1D9zqGWM3XrpNtZPmzr4rLgKxoG1MzM5udNA - dialogues.py: QmVCWMYaVVhtAoJVfzdpBz3bhGvXZH3XEY3KqbFGhwRx6b + dialogues.py: QmRtWkAfR9WTvygMJ36R758RzdY2mGQs2fgtHCfjxmeaHy ledger_api.proto: QmfLcv7jJcGJ1gAdCMqsyxJcRud7RaTWteSXHL5NvGuViP ledger_api_pb2.py: QmQhM848REJTDKDoiqxkTniChW8bNNm66EtwMRkvVdbMry - message.py: QmSoC4Vt4CFWGbZB6rsXn7jLho3CiuvHTTEnKS2RBRg1LZ - serialization.py: QmWnjRaZBpUtErSTGGR6uQmatXy1xcbfhSvsFzYKjRNzM5 + message.py: QmcLuy4YcL22qs3jHf5KHZ7vZueiTDrEmbWjfRTbyzwc5m + serialization.py: QmRuTqH9t9JtsnpWX5wpC438DdRxWKiqAB2u9fvQ2oy1GE fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/ml_trade/protocol.yaml b/packages/fetchai/protocols/ml_trade/protocol.yaml index b57c75503b..160ce8cb5c 100644 --- a/packages/fetchai/protocols/ml_trade/protocol.yaml +++ b/packages/fetchai/protocols/ml_trade/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmSRtzACMh3x3LSjYqWXWTpYpE4C7G8EHbW4zQQoMFFZ4K __init__.py: QmXZMVdsBXUJxLZvwwhWBx58xfxMSyoGxdYp5Aeqmzqhzt custom_types.py: QmeWvNKuezFxfmLYaxKhP9XffeiFFCwH1qowyiJacLAHpF - dialogues.py: QmVqaAXZrVvw3Djyi7BgpJCSBtoSmBeDEYFtD7k3y45vu1 - message.py: QmQWqj74tHy16CgnMYYWa8tTSChmjquGNtYtnLkzMdDLEH + dialogues.py: QmVvP34aKWEtHrKmccNMvEdDnx5B7xpE5aEGzr6GU2u8UK + message.py: QmZdRAScKbmJgKVbRJvDyMUNfRZKWCwWFYjGNDDBAq5fUT ml_trade.proto: QmeB21MQduEGQCrtiYZQzPpRqHL4CWEkvvcaKZ9GsfE8f6 ml_trade_pb2.py: QmZVvugPysR1og6kWCJkvo3af2s9pQRHfuj4BptE7gU1EU - serialization.py: QmQCjiTWXmvrfFjsLUwuSBVujRq7zihL1nkcdhQkweakDy + serialization.py: QmTamQzo8ZNM6T7QnsA7qNzs2uJ7CHTUczzCsHwU9Q6Z5K fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/oef_search/protocol.yaml b/packages/fetchai/protocols/oef_search/protocol.yaml index c29691d3c0..656d835d6f 100644 --- a/packages/fetchai/protocols/oef_search/protocol.yaml +++ b/packages/fetchai/protocols/oef_search/protocol.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: QmaGSTqxvQFKccBnLovhBbfSH3C3Sorrj7kFyZqW9qptLa __init__.py: QmRvTtynKcd7shmzgf8aZdcA5witjNL5cL2a7WPgscp7wq custom_types.py: QmPSAWKkH7R8XCfPUCRmuEqVxCnp8L5PTUq4DBt59AzFUC - dialogues.py: QmYE5MGfXV2aQEUr3pAMKsuP9ywzWtLEkrDBu7zA25ms3U - message.py: QmXSb2g2Dfeu629wXUZ4WzhrGwWaTNmu28P1hihUnEViVL + dialogues.py: QmQPLnW3jAs6tLLmhkX4C7texGRHM9bfdjs83dUH5TkJ4v + message.py: QmU8jH94qxrcr9eUtXWn5PzqmHT7NBc62gs53HPXKVk1Ts oef_search.proto: QmNU8WsxT6XNFFneKKeDaZkNn3CEFDfZQkmKv9TyhyxzDB oef_search_pb2.py: QmSAFT1xxYRzJU6h1aFVDuYcx672sZ2vzV6c2ico7f4BLK - serialization.py: QmSH58UnNGcGTFqEcsokB58CRVEfHtiMskTFtrams8f5CH + serialization.py: QmU3ipyvogbpkFuQki6xqscdiPahDVYw4sBaPHaH3LVvwJ fingerprint_ignore_patterns: [] dependencies: protobuf: {} diff --git a/packages/fetchai/protocols/tac/protocol.yaml b/packages/fetchai/protocols/tac/protocol.yaml index a78d53b0ef..db3fb0f167 100644 --- a/packages/fetchai/protocols/tac/protocol.yaml +++ b/packages/fetchai/protocols/tac/protocol.yaml @@ -10,9 +10,9 @@ fingerprint: README.md: QmVhm6VBbggxjTe3PEhCBfTomWekNa5buYy3sY7YYN6Er6 __init__.py: QmZYdAjm3o44drRiY3MT4RtG2fFLxtaL8h898DmjoJwJzV custom_types.py: QmXyAhpkE6sLExGgf2GxBv8gRYTDZu7XCDsa2m4rwvQrmp - dialogues.py: QmQNMQ6J85Jp59vZXRuKZtyh4MessMCxjs75C5EC3TfJbA - message.py: Qme5qTFZr7vTc76rbUwrYuRZNQKuxqHdVdP4pPk3m16Q4S - serialization.py: QmV2haMtVTKaeqZrXriZuzL2TAcNQ245AqYFsGBJzuibx7 + dialogues.py: QmTxHrcGujP1RUYvfJygZyQoUwmDg2GBWfmbR3tWUSbyop + message.py: QmfNdmYk3wssDJvHwMsMxXaiWCjm3fSH9Su4KmsYDZJoWg + serialization.py: QmTk2Jp19dQ4SJdjSHAr8wbxw4rQSMheSuf1XzXG8CaoB4 tac.proto: QmdpPZNhUW593qVNVoSTWZgd9R69bmBbw6Y9xjzYpvuDvV tac_pb2.py: QmUwW3kixKwD2o1RRdq4NoNoihPb5BXKKRngWXztq32fea fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/aries_alice/skill.yaml b/packages/fetchai/skills/aries_alice/skill.yaml index d8ccc8de1f..38cb454605 100644 --- a/packages/fetchai/skills/aries_alice/skill.yaml +++ b/packages/fetchai/skills/aries_alice/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmfS1ezD77No8WQkvrkPs4oSXHFbULRxatGzRhMbSMntSx __init__.py: Qma8qSTU34ADKWskBwQKQLGNpe3xDKNgjNQ6Q4MxUnKa3Q - behaviours.py: QmaFXL8xKh4vL5qXtQq8nyQXBAGJXEnMY5crL3CBoSjTuW - dialogues.py: QmQwremVUhyXMcoPQEvc4yJaUUDBx9ZYmDUCUHZwwux9Gc - handlers.py: Qmc4cdzhZPxQsc8FzZXq1P4KfFNX78yPA5LVmEKfVP46Xa + behaviours.py: QmVCaSA8nEDYfB99EhBVr9pWyRcuAgAgWjburFaHLTXdbK + dialogues.py: QmRbbuYSXuNzMVK3gkHVFhwqH8k6oPo4ThGvVPrrn9N3Yq + handlers.py: QmTtqM5oWBEAZcHdTuwuPtbiZZGWontMNEtmDxcccS2u2Y strategy.py: QmZ2jhWFQZipk6wAquS1gWxX94iAmhN9Vrh7tcPU9bgpzF fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/aries_faber/skill.yaml b/packages/fetchai/skills/aries_faber/skill.yaml index 37e0837dba..3b4021817d 100644 --- a/packages/fetchai/skills/aries_faber/skill.yaml +++ b/packages/fetchai/skills/aries_faber/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdkSNCYx5dNGDAAveapQgoyM7Y7iYeQzR7KN2Sso3CJG4 __init__.py: QmNPVQ6UajvJodqTLWbLvQZkKCfrNn1nYPrQXai3xdj6F7 - behaviours.py: QmUodVZv8uBeDLCiWnQpRoRGT5oEUauhrSoZdMx1VxGFaU - dialogues.py: QmPHqMtprNxvA6VTAi7ZRbLfFNy4pDPUcu9T6sM37wxMyQ - handlers.py: QmTDWYft3unkJhhQZGKcEHdyw8LuZPHuCLbFrUg9PHe1Fh + behaviours.py: QmYvoagukgT4oRGxLThY8QcgZBAbZfogVBuuuytVpnMsMR + dialogues.py: QmXveWmeU3eTDDhqDkBcVE2pJAtxJUAzcjbM8ZEjRvKUYW + handlers.py: QmcJ2c4enNm2K2ZdY5KKQtUri1MRYcDgQsPV4G8U8ndnmD strategy.py: QmcUmddp6CUP31Bfckt6EkV3n2VZcJrUagoGBaTDBMTdXR fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/carpark_detection/skill.yaml b/packages/fetchai/skills/carpark_detection/skill.yaml index 1dc69e1ef1..1371479964 100644 --- a/packages/fetchai/skills/carpark_detection/skill.yaml +++ b/packages/fetchai/skills/carpark_detection/skill.yaml @@ -13,7 +13,7 @@ fingerprint: database.py: QmQv79qDxNk8v9chNYq7AxxChAJVGs4B8Y9we35rjzaonP dialogues.py: QmeYs1FYc1Ud4yXULoyf1nSqornVx2dczFCJbF1BwM2gzD handlers.py: QmZ7r1LaYnjjkW6T7XLdmWdHjmyd9DsBjnFDvf5zoa6U6V - strategy.py: QmX2LcvY3yHDeKH4VeCCJM9JFihj5Hwwii6zZi3efMXSpV + strategy.py: QmTHW32BzzYrBF1YkmftAMuyx6cKKGrp554qeKiFBJieJJ fingerprint_ignore_patterns: - temp_files_placeholder/* contracts: [] diff --git a/packages/fetchai/skills/echo/skill.yaml b/packages/fetchai/skills/echo/skill.yaml index 94480f9071..ea30fccd22 100644 --- a/packages/fetchai/skills/echo/skill.yaml +++ b/packages/fetchai/skills/echo/skill.yaml @@ -10,7 +10,7 @@ fingerprint: __init__.py: QmTf1GCgHxu7qq4HvUNYiBwuGEL1DcsHQuWH7N7TB5TtoC behaviours.py: QmXARXRvJkpzuqnYNhJhv42Sk6J4KzRW2AKvC6FJWLU9JL dialogues.py: QmTWhg4VnPFVsEq6D4KQvLWZntFDBxY7ujEjgD7ZspKcen - handlers.py: QmSapUa6eiyRFFuXthGY8ELJ4byK6SykE6TuMMspF3i3Ep + handlers.py: QmfD1dbce2WoPF54DNgu9DUNZrHeTucA5LyDoiFr8j5pTx fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index 7b624d2b71..099ed84f66 100644 --- a/packages/fetchai/skills/erc1155_client/skill.yaml +++ b/packages/fetchai/skills/erc1155_client/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZLsx2wJE762rqDqfeqLMg9RBczvALxy3H2U9kfRvgK3s __init__.py: QmRXXJsv5bfvb7qsyxQtVzXwn6PMLJKkbm6kg4DNkT1NtW - behaviours.py: QmT1c2JxQf92Em8ohu4qMSmBtebgmW7Gm6ZAK5ifFT2bQS - dialogues.py: QmUM3rDDQALcgfKsX7gGpT7sP1DVXsneS6XbqVANaW4Xfh - handlers.py: Qme7hDcANLpsUcJAm74eLRRzHTDKbBNUxt5sbMmUnE75sr + behaviours.py: QmaCak7V3jYEWdj4fLdd2tEG4fiSazbLBC5WKjDeSAQhrh + dialogues.py: QmPb2odXbXxuY5Ygm9mfCufM2mtMZ23oapsAzsWHC2x2k4 + handlers.py: QmSahx4wij2w9X6Zm9wAHyeJVRifpKGkstwYKDzcosqkfe strategy.py: QmNg87LgfLPoPyokFrmvrNghQD7JkWehRNAdRNyB3YogeN fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index ea1b113692..fadc21b3bf 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZ7swVkRpmJbJZ2NoLb9CWwH8p3QjnjRJg71UbAXdrKyx __init__.py: Qmbm3ZtGpfdvvzqykfRqbaReAK9a16mcyK7qweSfeN5pq1 - behaviours.py: QmNf5NGKdNaffwFHHyNPv1FMocJ9YbnvU1zKFaYJoUEexA - dialogues.py: QmdHxieCCQjSbEf1U1vekKUK86EVu64Hw2HFKWrC9hK5q6 - handlers.py: QmR9hFdRrtGyXeijkWH31KXyE835x3CiNXPh6cy1hthv1A - strategy.py: QmcmUTRZk4BDm9DyowWm9NT1UzDe6rjQhgyongibSPh3hc + behaviours.py: QmaiK1q2cYeP64YriCw6PHm9Mr1okMRU9esPftQDXXFy1f + dialogues.py: QmcCbdxFM4SX3MgXDxxbsC66gp8QK3C4W2czniQ5oDNc7G + handlers.py: Qmeof4YFVmZGUacBBbibhnEH4CU4hDCDmcKRoEBx6NPvvd + strategy.py: QmeoDg7UT5MG5khmrZna3v8HYrC6QJjjEV26kcq1mPs6yx fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/generic_buyer/skill.yaml b/packages/fetchai/skills/generic_buyer/skill.yaml index 09725cf577..3072c5b6b0 100644 --- a/packages/fetchai/skills/generic_buyer/skill.yaml +++ b/packages/fetchai/skills/generic_buyer/skill.yaml @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTR91jm7WfJpmabisy74NR5mc35YXjDU1zQAUKZeHRw8L __init__.py: QmaEDrNJBeHCJpbdFckRUhLSBqCXQ6umdipTMpYhqSKxSG - behaviours.py: QmX2CDEtaNMeP8iSRafRiYcso7rcEYgSZpn6UV3JgFbAio - dialogues.py: QmUmPdxtaXK783i63ZB2nvHctHg9sZqRVgP6P7rnsG2V9s - handlers.py: QmNo8CT3ev8m25ePhAaRJaqo1BcprpK5kvUYjARoPHnJia + behaviours.py: QmSEymQerdUYooELqC2NyXJFpXLpwBX49G1DjMzzMVa69s + dialogues.py: QmeUqYS9BXKfVJZDPUwLQZAzzEwPJcdDt9hPiBAKPYazt6 + handlers.py: QmZVuiu84WgGX3R438kuDVcNJZrahzWgLxsPAy34R6kc34 strategy.py: Qmb2T99WnQQa4qyZSdu31QyrbtHy8ZWC6Jhv9sVrTYrFxE fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/generic_seller/skill.yaml b/packages/fetchai/skills/generic_seller/skill.yaml index 6397a8f591..24bb952fc8 100644 --- a/packages/fetchai/skills/generic_seller/skill.yaml +++ b/packages/fetchai/skills/generic_seller/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPb5kHYZyhUN87EKmuahyGqDGgqVdGPyfC1KpGC3xfmcP __init__.py: QmbfkeFnZVKppLEHpBrTXUXBwg2dpPABJWSLND8Lf1cmpG - behaviours.py: QmdsS8wmLyxTZc4FdUri4ojRG1nMbasSHC4u6i1AfTQH1V - dialogues.py: QmZuFnZKndhsrUZrqjGpYHBzPFAZZbVdzGt6FLXvSi8AdS - handlers.py: QmeHRB72xVXoWCUd58SQ3q4vnzMZzrGjodWSyKGCyeYTwp + behaviours.py: QmTYpaELjbZxs128wSAxLry6vKgjnz3EuuDVy86T7XVAQ6 + dialogues.py: QmRJCregJWVs8scTMjQptvztKa5NEHKUfeZECVxdU233C6 + handlers.py: QmYyAYGiSMzUAq96LuFsVewYut9njvCR3NG9uEKonnwGf5 strategy.py: QmX1mp7eZkz1P6iVyoDCATZDKZRgwe1EgMVmAyvtGDHvm3 fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/gym/skill.yaml b/packages/fetchai/skills/gym/skill.yaml index c44d7e4065..d6108e6eae 100644 --- a/packages/fetchai/skills/gym/skill.yaml +++ b/packages/fetchai/skills/gym/skill.yaml @@ -8,11 +8,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUpD7PeLHS8nH7HJ48hBafSFhLn8Yrh571RCmxnStpNwq __init__.py: QmTf1GCgHxu7qq4HvUNYiBwuGEL1DcsHQuWH7N7TB5TtoC - dialogues.py: QmQik8PG4xfuvbDwxocfRHygLHDbHkeqxHEGToAM2EooQz - handlers.py: QmbqpPWc3N6MFSpJq2DaPcu78mJG3S9iJuJBuPproSnXHf - helpers.py: Qmf48TPcPXxZDVRjFtcJAHAbNJu1qGn8Hju1T1sqnwcL9C + dialogues.py: QmWQrpkx9GP3E1a9STqDQtKfXmKEUtrVkCEQjXh8YTeL8U + handlers.py: QmagqBdQaGuGbVS5dFqxFtEww2e1YF2NprBNPtt5pVA2hZ + helpers.py: QmbRSMX7UCRAEotS4ocTEcZLo1qietAAU9K5zBtqY1nE82 rl_agent.py: QmUq3XY9Dd2XZBhNNK9J3S5937d3az4cwP1BmeieHSgJ3m - tasks.py: QmR6XMqp4uwHyZ4MgJWdgmcUHjk92jWkRjskknZ1Zjji6i + tasks.py: QmW4WBzC2pkcnjnwJZKu63qXXWEbMVV3fwQMozGxjWnEdt fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/http_echo/skill.yaml b/packages/fetchai/skills/http_echo/skill.yaml index 20dd372b38..86be8f91e3 100644 --- a/packages/fetchai/skills/http_echo/skill.yaml +++ b/packages/fetchai/skills/http_echo/skill.yaml @@ -9,8 +9,8 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmYMHPsBX3wTMZZP89aKa7FzDCqGyvvue54ZBN8NZt4mNt __init__.py: QmaKik9dXg6cajBPG9RTDr6BhVdWk8aoR8QDNfPQgiy1kv - dialogues.py: QmVXAbsx66KousdDsy8dH3LHS52SqZAFfP8a967yynbMxr - handlers.py: QmWRgGGnNyGSyYwdUB3u1k4zdygs196iYQ2sNjWHYt1qww + dialogues.py: QmQNBqcRDZwYSK3hucbNZf4CiTxEei5c4MV5wXvu1tZx1C + handlers.py: QmdTuiao42XEvbp2wuqKP4U4noRqAVdec9rss51pswYCoe fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/ml_data_provider/skill.yaml b/packages/fetchai/skills/ml_data_provider/skill.yaml index 61e6dee039..6747072baf 100644 --- a/packages/fetchai/skills/ml_data_provider/skill.yaml +++ b/packages/fetchai/skills/ml_data_provider/skill.yaml @@ -10,8 +10,8 @@ fingerprint: README.md: QmakpsKWJrGRsoFaKR1Gf94KqcuPrkdXTYyciq5d4EhoFF __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ behaviours.py: QmWC4PEwWEyqcEJ9rTFjL9YpZ1pgkSpY9f4pE9mQHviSLz - dialogues.py: QmRsg5xMC3QqHK2p2ULDkdcUECiX3YLPwbqfXdWZ3PewhD - handlers.py: QmePX9rXfypdNaqWfNZb2sXrSTuxwRGR2o3nXSw9yQSo1d + dialogues.py: QmdFsEXJdTiQo7GSS1U7n9ukd79ZEDVki3ifeYeGsowv2G + handlers.py: QmbmS4C1GdumnVkA5dc7czWRkjb9HGzY7YeATrnuMVU2X9 strategy.py: QmUsa36TcE6DXjdDDz1u1tAPVPHaJyMnVCTxudJhVCyA3e fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/ml_train/skill.yaml b/packages/fetchai/skills/ml_train/skill.yaml index a1d228f6d9..9a1766f226 100644 --- a/packages/fetchai/skills/ml_train/skill.yaml +++ b/packages/fetchai/skills/ml_train/skill.yaml @@ -10,8 +10,8 @@ fingerprint: README.md: QmeHcYRhDJi6gqAHpK29UJz3doiyaicoqeTrPddqM3gh64 __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ behaviours.py: QmbJtAxgudXA35gERW14gMnCA9q79iRNQmKfgTTY9e2Bif - dialogues.py: Qma7uAuHWEdohLKMxGXHk34tRqXaS3FjFpyWCxpWtwRwEK - handlers.py: QmRUQUVmcV3W8aCL3LEP3ZPx2aENMNbZe5EvS5vRBnK2RF + dialogues.py: QmT5owqhNghzRDXrm5FjDX4juGnSUxdCZX76jRCrPGevt7 + handlers.py: QmbXT1EAHEX7hct6auLdBJXX9k9ujdoQgkXZCZqzTfdto1 ml_model.py: QmXp667GwVRrGsLxtqricnnyrBUUDn6efem22UCBd2g1y8 model.json: QmdV2tGrRY6VQ5VLgUa4yqAhPDG6X8tYsWecypq8nox9Td strategy.py: QmY8z1DW6PqQuiEpgXAhwasSk1CgvvTNZQH1LtExupif9g diff --git a/packages/fetchai/skills/simple_service_registration/skill.yaml b/packages/fetchai/skills/simple_service_registration/skill.yaml index 6c2dad4ef6..04c176e168 100644 --- a/packages/fetchai/skills/simple_service_registration/skill.yaml +++ b/packages/fetchai/skills/simple_service_registration/skill.yaml @@ -8,9 +8,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPuD9EtLKV143FbAaGUht5ZVtemVWXnm1jYmQxyUNnZ9T __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmREzo2bxMA9h84utHze1BFptT2MgiSMkfiSydbynthRna - dialogues.py: QmRMZk46s3AJ9KUbgP4fMP39qGX1YPsvJAJqmaFanMtZiV - handlers.py: QmVGi8jXkCCJmxkpiwoAiWK1WNTYM4zYcJL4Vid6w7ekX3 + behaviours.py: Qmcz55RRytuCEZTkAU5PxX4jjaPxkp3f747ivJcceH78b4 + dialogues.py: QmRJP7qGj2X74KoKrSMQiPkCRP6dGKtunw4e7qVwh1Sa3E + handlers.py: QmcFWEWmjDFxiksQiwWSUJ3mzJhVRXt9EmrD6PTHCmUX5G strategy.py: QmNTZ6XXAv6nvJs7B1p5mt7bVdH4pb3motxADDrxCpbmWF fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index e29fa64d42..e1b7dbd0fc 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdWECpRXZXH5JPV6wVHqeUtvjBhieUFTEoT2e7EY16N8M __init__.py: Qme9YfgfPXymvupw1EHMJWGUSMTT6JQZxk2qaeKE76pgyN - behaviours.py: QmVUdw95id6YWhAxQU79iGdmt3P3C4PthPsDZL6x3M7kV6 - dialogues.py: QmVSNY2MaKJ1JKfbt39qJ2CJz1dMhPNFefS6Nn2Ld2WqNA - game.py: QmWrQC1i2dPsDEzS1bjd6KiDCFSRCAgdiMrrrLgfsKMU49 - handlers.py: QmX2N2Nr8DsCQuXxuGhxh89tUAzChTjx8yWtUof8UMQmQM + behaviours.py: QmTVCXtTpH1A55vWnynz1PjM4VCrQ6EDy5XfcJpT93doEq + dialogues.py: QmV38FUrGYZeBcnC5cexQrNA5bdsJ44dC5hWTRSZiUxQmK + game.py: QmeAmG3LH1xBFRvUATrWY7spSDmjNeXVD4ZNYrt1BRY3jB + handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW helpers.py: QmdG31YUJakBz8FdNNxU6RxqhWy9iv1BG253PzfxBhzqq2 parameters.py: QmQB95beEKzyA8Aa7Y9HTPw6BPEVi6BGkpsUqN4QZ4DcVG fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 956895937c..42af59473b 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmV6mToyVnQL9squVJntDPrHvtxFk7sfEYJ61Fyoiy9wsE __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmUmKgFhFmrGtCCJNjZggZiu9JotKNqmUfpShAYM2oKsSj - game.py: QmRYzPv29VZbxDKTBqi8Y3Z1iLjwdNhgG6rGuYNYLTw4Z5 - handlers.py: QmR2kWAiBB99TrJxpue4JpC8J8aewadg5FSMa6V2YS28Ws - helpers.py: QmREf3hRufKHwQq6Hr4YFdBWp53Vy8WWo89R4pKRyjX4Bs + behaviours.py: QmcLSggJr1XpiDEwefCGGpfwUp282J4i97ziCNFH7X1M9C + game.py: Qmdz91tAYzEFDsvN4hNBawK7D7beTfocps1hpQc3RgavUK + handlers.py: QmWyibFRxcunBLqb7FJEkx9RpS6fNZpAvNDkG6cCfK7mQd + helpers.py: QmQ36tdx5itzz189tUgmyR74Q63vSRUcPTsg9qEwBUYdNU parameters.py: QmRU9gxsWcxy25g69jbrKve2f8kFxNBjFfRjPZNKsYoYCP fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/tac_negotiation/skill.yaml b/packages/fetchai/skills/tac_negotiation/skill.yaml index 60d3ecf09d..c7eae7a763 100644 --- a/packages/fetchai/skills/tac_negotiation/skill.yaml +++ b/packages/fetchai/skills/tac_negotiation/skill.yaml @@ -9,12 +9,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZucue4N3TX7BPe9CDZybfMQc1zpYbRKEVXAUGYRpcUfD __init__.py: QmcgZLvHebdfocqBmbu6gJp35khs6nbdbC649jzUyS86wy - behaviours.py: QmPnCqPr6c3vqCt2x5rZ9tHZ9hD8mGA4F2fNDTXo1fxfmR - dialogues.py: QmUZgPaShiApdbrf98x45k6JwYtsLdzJJw8JuMqCqrsHov - handlers.py: QmNbMa9A6D7G95cRwc2zsP1uVymmwpt1QXqz5ccfwcTQcZ + behaviours.py: QmUm9C86crCZpXkHGCaPKeMfuMnP8BjMzSsjrUGkysmg9T + dialogues.py: QmdzrSoUvvjRzKvAZ53ErHCgwj1r4oQnf8D6tbRnctKTMW + handlers.py: QmeSaLfQV3rzHuHPhzsBps9z4AbX1MNevTs2YTjnZaWuEA helpers.py: QmfRnfpeCtHMEXSH3q3ofWhoSc7pbpRrSFSBVStUK3JWt3 - strategy.py: QmPG7sCfCk6ozaBSmPPYeexe9Y1zq5fsg383Z5k8RbBDqg - transactions.py: QmdpNcQTG45V8JtrpHgYPMdWanwnF22vBkmAELJdT1AYgt + strategy.py: QmUd3cH7TDnc9f3cmDxhSuwQU33Hdn5eb2J4AuKHVE9Uxm + transactions.py: Qmc9Re92RLFkfds1NspTRym1wn7XPGSNDRFGtaG6Hrix4E fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/tac_participation/skill.yaml b/packages/fetchai/skills/tac_participation/skill.yaml index 53e9be94f9..a28101841d 100644 --- a/packages/fetchai/skills/tac_participation/skill.yaml +++ b/packages/fetchai/skills/tac_participation/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVNxdGy1pbosYrrvbXczbkJtU7f5ddrBPSNnFoJA9GJzg __init__.py: QmcVpVrbV54Aogmowu6AomDiVMrVMo9BUvwKt9V1bJpBwp - behaviours.py: QmW3uvkUtkknF7gMFoqbXZWpVcoS274tk7jXouzLTCtdmU - dialogues.py: QmNZvomWQBx8p8Ftkgg55Pw44P8RedKTKtFULh9Qb8AJLY - game.py: QmUotRmam5EqL2YWAwPR9i1uWHNeBsphcDJwB59ZiLFKSw - handlers.py: QmcmPDJrmyiMFSf9neCDczvn6RuJN4XfhtxdABR9GjnTWm + behaviours.py: QmX3UbuLohnPSLM2W6LrWcZyo4zXCr1YN5Bznu61v27SZC + dialogues.py: QmNz8EeBvoR4QCMcVxVqVuLaPvU4nEhRgvxQnXCq1x7jS1 + game.py: QmVGeCGEfwmzktSPQN4xWL5yxjHqNyenneQzeW2vfx4giv + handlers.py: QmSseAwQqHsSmj2eBPPnC9eygNSSwL1kheRVsgbLqyeDvV fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index dc13684148..bc02fd394e 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -18,54 +18,54 @@ fetchai/agents/thermometer_aea,QmZzUqFVaDNGfwPnq5EvfPKNoMSfGzgpBic2z8HHWfu1RE fetchai/agents/thermometer_client,QmfMjh5gCDrdipCDYYrAr7jRDXJ2CpfWFij9t6J4EKdXYT fetchai/agents/weather_client,QmXyXQHxeJyBFSXLU2GZnV49t17iwnNLWWpUEFqMTAb8AE fetchai/agents/weather_station,QmW4kSbF5eKuh4itMJ8xKonaPejutaMp2GyobcN7V4zJR8 -fetchai/connections/gym,QmYpTqreykMfC8iTuoFK3EbjkfgLKBk39aYcvWamGQTrCQ -fetchai/connections/http_client,QmTyfu8TTAQBcecg2CeJZRm9wFqhsi9VtRuFYpU5hEwEoX -fetchai/connections/http_server,QmduD27PwFbYEo5BZ6fTERfPyNVrG7i8XN7QGcwCTHbXjN -fetchai/connections/ledger,QmRUJPXzU2rqykAkNWt4BudP87ryzGdzqt5jJj4q3Gb7HM -fetchai/connections/local,Qmadp2J7U59MvJaPZeytGhqhtLqL4AZghNZLki2YTdLUA1 -fetchai/connections/oef,QmPCrbZ2tdbzLQNkPDJnArwgPqtH6caGdqdfyFSjdcL6R7 +fetchai/connections/gym,QmeVoxp49pwDh57ZirtpjZrC7YmdV7YYn5GHJVq7ekovEV +fetchai/connections/http_client,QmeSZGTkJfG95iBjdhmevfEU1qAdX2gnrawHpwQrbG8DfS +fetchai/connections/http_server,QmU8RjATmQ8X95p2aCahZGfUEs5eQjYam2vAepX1tAM64i +fetchai/connections/ledger,QmXZjQkskqt5UbAw9bJbj6Lo9h4TRvengRqAchDRuJwGJd +fetchai/connections/local,QmWZPDvqjZjzNDUX4ivHF3kGvkNCUYM449RqNEyyoexFix +fetchai/connections/oef,QmaJZCCrYCjA8eY3zav9QjxWNcVJ6yQw2n6ZJ53fQT22xb fetchai/connections/p2p_libp2p,QmVXSnhCn37mgacK7iG1HENbEkSvSZMMaf9RTFCUUDa2C9 fetchai/connections/p2p_libp2p_client,QmVEwABjAPTZcA4BaAgn8BnzUCpHQbSzc4pJ6mdR4bW222 fetchai/connections/p2p_stub,QmX8EWvFok3UAdqXGgir4TrhfDj2kLhfjuXRg82b6G6XtW fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmPawrdmAJLQU4jqyEx592HsJaSAHqgEDhmbmmuVz9LnVn +fetchai/connections/soef,QmQ82mNiuBc9jEUFU8TeaAk5ktqnXX512h4X67yYUxRrX5 fetchai/connections/stub,QmaxLLkfgUZL4s1r2yP5mbZqV4g1dmLLoA4uEApgPyR3aE -fetchai/connections/tcp,QmeFxgyyEnHUkAxuSHSYvFQLxKgWdV7xob6QvZnCHo9AdX -fetchai/connections/webhook,Qmb3EN5NhFavVZT6rvDzhxdANx6dSo2K95MsJ8owpYDDSD +fetchai/connections/tcp,QmU93B7yajCHwXsgDXXhv1uSuXi7VmFBhdahcFosbrr6nA +fetchai/connections/webhook,QmTjyENiT8KZDKUD1B6dDC1gAEYDU8UMNkXa8tSbZYKPsk fetchai/contracts/erc1155,QmUupRwnza2KZBGULZ62xQREtkuQbYUrt1W8NbYZJuqbNt fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 -fetchai/protocols/contract_api,QmbHbjNcYaZ4LDpP5L1qNUu82aKCdGa8MNX9e2wanMsGc5 +fetchai/protocols/contract_api,QmWWMHyzRT7rvdiBsPJ4xrE1nF5TZFfkW6J44D7Dc6g4mT fetchai/protocols/default,QmZ4y4M1zZ3j2BAvLKHf1Grf5twcsmSamdgc2zmkBdv254 -fetchai/protocols/fipa,QmYJhzwFtZp5FRZx3jkeiLT2NZTUhNa6dHM9CJ1JXBiEsY -fetchai/protocols/gym,Qmc5UvXeWtGz4aVytmgaB1WGNMsVkutgNGqn57PmXXCRLs -fetchai/protocols/http,QmXEczv6AR7bHoM8CQ55xd31iopWc6wFoR1Kc59xMzb9wP -fetchai/protocols/ledger_api,Qmbr8jpkgjvRXefeCyTFvnb6WZAvQPDsmzoZk6t3AXcyRR -fetchai/protocols/ml_trade,QmSXQbbGihThLyp8djf2PccrzbCBWVymW4uBvCi4pDxB2P -fetchai/protocols/oef_search,QmSrtCZ7JUvxKXzUq3svJiQBLSaQVyhH9MJRnbZm9TWNhD +fetchai/protocols/fipa,QmerHPCMw8rGSrtM7mxuD93CgdCZ5YTreeNC8BNU8UskbK +fetchai/protocols/gym,QmTEWeswAtuJrG4Uo8GWnpvgsGRTHxfDoQAohp42hFdkW9 +fetchai/protocols/http,QmYF8drqdddj8tRt9H9QQ1oMKSfrr6kGQvtpsseWBe8FjA +fetchai/protocols/ledger_api,QmbF7U9YZbanjqJjAScHA5uiVp7HxfSnQxugwLptBKcVUc +fetchai/protocols/ml_trade,Qmdx55dM9fFXeWrVzhHeUU9CoTt9t7YJACBwfg5EwBa2Rz +fetchai/protocols/oef_search,Qmee5Bi3xQ98qX2uFkhUjhXTZi7uMFWnicK2yp7LBcuTYF fetchai/protocols/scaffold,QmXJb2kxe228AqQ2iHRiKJnhhKsC9zU8pqNdojLNXqjUvz fetchai/protocols/signing,QmYTfrqGX7exRtafwm9wHGzHZB1FziuZdYMVT1ad3fnKYR fetchai/protocols/state_update,QmejF6NFSBgfa1KTNkBCw4oZGrTnXHvwYXxayHKGLV4PtW -fetchai/protocols/tac,QmcyYPtULaU15VMyfRqwDHCn7g4czUoe9ipcUSBAVqLTFc -fetchai/skills/aries_alice,Qmf2PV9D6WZjjuQ1eqL7S1DKVYc9Ea6wJDNEAD3zxEUpLU -fetchai/skills/aries_faber,QmXBksccX6fBcemjr6gL4KBAfExeoBNKyVK4tJscPk1dsp +fetchai/protocols/tac,QmchXXv217Dyft4PN6s1iE1Y5EKYUiYeSv9qLPZVrMwaLr +fetchai/skills/aries_alice,QmVqS1TMK5Mp3zV59gGN3Ef9xJBcxqKpN6PhrDV9UzEQd6 +fetchai/skills/aries_faber,QmeipFxDi2tPz3taPDPZJvstxjAPUdUcCwckFmjjFhBps5 fetchai/skills/carpark_client,QmPYHXP1TvNihMa6WFSLP1NhiFDKTiArZbStQ6v54ySa8j -fetchai/skills/carpark_detection,QmetEJmLHLWCPRyYByvrJ48fjM42sg91fqBfzZukmUth6b -fetchai/skills/echo,QmPjabbvqPfabWhyE3vYCtTpPLJgYd4ZQBBsKsSJ5bLbeb -fetchai/skills/erc1155_client,QmeH3ZaMQt4iMz7B8p9mwtbetyt9Gy42rrkXLuk6LpQz69 -fetchai/skills/erc1155_deploy,QmT6UivEs5DbqfkbeRZYr1mF3WYiyUrp2hucLMMXWBwj3r +fetchai/skills/carpark_detection,QmUDRJUJm9UTCyM9o3AwphD6q1L7mNLXPqSizJJvivtRe4 +fetchai/skills/echo,QmcHx9UjP429vnTxMpM3wSphkY2umanW1CZJyn7B1FkpWV +fetchai/skills/erc1155_client,Qma5wTx1huj5DAcsBkRwCvZVczRREwyUawVJhyaC4UTrRE +fetchai/skills/erc1155_deploy,QmYyeafnykiRwNHyk8hhLhyG3EaHijSMAoFXkrfeXv4DcE fetchai/skills/error,QmanfpyCmvUkqG9xsEyWULvi1ZZzqvggvs9LnQvSjuRhLb -fetchai/skills/generic_buyer,QmUKHWVoBDWJVymwj5PHqkEXjRGkJBoPrV2capmftA717a -fetchai/skills/generic_seller,QmTJabpuQKLfC9t8mGjswKgpU8wGazNsvZegwLtTiRVF8g -fetchai/skills/gym,QmfKQFkyfm89t4MQ1FUgQe2MFLZw1PUapMrTGBiSqn6frn -fetchai/skills/http_echo,QmXb9b5YTwxHavSjoGzCC4DaSSoZMsbYgFiuy2fqFQno5J -fetchai/skills/ml_data_provider,QmXkX14MRTdticWjwF469RfXA9sQ82ddY7pzQMCbRikuz1 -fetchai/skills/ml_train,QmdmnV66naRKrYgLAJDMbCHWTocVLeX8JtYLfJwzMVxBhG +fetchai/skills/generic_buyer,QmT6F5P2ZajWNHi4XiHXPa3iEuvVCrNcCNTzEi8XSkkHTT +fetchai/skills/generic_seller,QmXzF3FiqNbFMYu2nMNbonzqZAY5Lf7NN6S9whd7c8Ek18 +fetchai/skills/gym,QmPeiufnXTJ424Tcep8JcjJYErHJmFKh4XY8ituJWL6SAg +fetchai/skills/http_echo,QmaBNGNtDDcfCTQY6hsANAeZz7F4ZXEEPgTMd3ip75Zh1D +fetchai/skills/ml_data_provider,QmXZpzAetLKPfoPSMAafjha2qjF38dWsLpZQg2jCQ3QgAV +fetchai/skills/ml_train,QmU4HiyQUagkEwbU9rutL3g9xmQbo8WHUAULMBUcrEULks fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux -fetchai/skills/simple_service_registration,QmSpM3b3GL5Wh9Cu4KYE3Tiyb5XfyUTcYSctUMNSjAjGdk -fetchai/skills/tac_control,QmcPKqAatmFxtQHhSjpdLXL5XcUav4XzT17McZQwwoDcCW -fetchai/skills/tac_control_contract,QmSBWfymLZ4LT4T3cwq4cVRbqnkxSFuviykiw5hYaYBMH4 -fetchai/skills/tac_negotiation,QmVfat3p7G8CPXuPm7wy3i81AtxqeTQzDDbPGMZ439zsLm -fetchai/skills/tac_participation,QmYhmrYZvywb5L15VZDZ91Y2bCF2eD2Lasg79nNBRr3rHs +fetchai/skills/simple_service_registration,Qmdqf1kGGfEb65UZcDmhEzW6GcTQyKdW5zjKhQjmLo3J11 +fetchai/skills/tac_control,QmXxSSNbHztL5UYSep2bLbsC7jUzyzeFQwDtf7VXnGMY1j +fetchai/skills/tac_control_contract,QmNz5pNPvS7LBUMdjVPrRAFgJbaD2xTL1HJQnCoYK3Va4J +fetchai/skills/tac_negotiation,QmT78rzq6dDBSguehay3R19LwcfXZDpuxYEsvgvY8mf1V7 +fetchai/skills/tac_participation,QmckgUZ2YoLi5j7btqWLRZLxPx9RkeUdYdp9cfu95sZMXy fetchai/skills/thermometer,QmUEuRdsTw3iTzLRA4C6SiRGwEK6gauLP1Apk13fCQYtKw fetchai/skills/thermometer_client,QmdESHLrhNasaUKYpG2m5p6f61dxmqjVKGPiNdEUs5ZHnu fetchai/skills/weather_client,QmTa3Pxv8tD478xGA6DkNjQn8vxKwGfqLhLMbAC73fK6qo From ad0cb8ffce88724bbbe0a0700cf3fe2c506710a7 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 10:28:38 +0200 Subject: [PATCH 023/131] set isort to be case-sensitive --- aea/aea_builder.py | 2 +- aea/cli/create.py | 2 +- aea/cli/interact.py | 2 +- aea/cli/publish.py | 2 +- aea/cli/utils/package_utils.py | 2 +- aea/connections/base.py | 2 +- aea/connections/stub/connection.py | 2 +- aea/connections/stub/connection.yaml | 2 +- aea/crypto/helpers.py | 2 +- aea/crypto/ledger_apis.py | 2 +- aea/test_tools/test_cases.py | 2 +- .../fetchai/connections/http_server/connection.py | 2 +- .../connections/http_server/connection.yaml | 2 +- packages/fetchai/connections/webhook/connection.py | 2 +- .../fetchai/connections/webhook/connection.yaml | 2 +- packages/fetchai/skills/aries_alice/behaviours.py | 2 +- packages/fetchai/skills/aries_alice/skill.yaml | 2 +- packages/fetchai/skills/aries_faber/behaviours.py | 2 +- packages/fetchai/skills/aries_faber/handlers.py | 2 +- packages/fetchai/skills/aries_faber/skill.yaml | 4 ++-- packages/fetchai/skills/gym/skill.yaml | 2 +- packages/fetchai/skills/gym/tasks.py | 2 +- packages/hashes.csv | 12 ++++++------ setup.cfg | 3 ++- tests/conftest.py | 14 +++++--------- tests/test_aea_builder.py | 2 +- tests/test_cli/test_add/test_connection.py | 2 +- tests/test_cli/test_add/test_contract.py | 2 +- tests/test_cli/test_add/test_protocol.py | 2 +- tests/test_cli/test_add/test_skill.py | 4 ++-- tests/test_cli/test_add_key.py | 4 ++-- tests/test_cli/test_create.py | 2 +- tests/test_cli/test_fetch.py | 2 +- tests/test_cli/test_freeze.py | 2 +- tests/test_cli/test_generate/test_protocols.py | 2 +- tests/test_cli/test_generate_key.py | 2 +- tests/test_cli/test_generate_wealth.py | 2 +- tests/test_cli/test_get_address.py | 2 +- tests/test_cli/test_get_wealth.py | 2 +- tests/test_cli/test_launch.py | 2 +- tests/test_cli/test_remove/test_skill.py | 4 ++-- tests/test_cli/test_run.py | 2 +- tests/test_cli/test_scaffold/test_protocols.py | 2 +- tests/test_cli/test_scaffold/test_skills.py | 2 +- tests/test_cli/test_search.py | 2 +- tests/test_configurations/test_base.py | 4 ++-- tests/test_mail/test_base.py | 2 +- .../test_p2p_libp2p/test_errors.py | 2 +- tests/test_protocols/test_dialogue/test_base.py | 4 ++-- 49 files changed, 65 insertions(+), 68 deletions(-) diff --git a/aea/aea_builder.py b/aea/aea_builder.py index f82307effc..c302b710ba 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -49,13 +49,13 @@ from aea.components.base import Component, load_aea_package from aea.components.loader import load_component_from_config from aea.configurations.base import ( - DEFAULT_AEA_CONFIG_FILE, AgentConfig, ComponentConfiguration, ComponentId, ComponentType, ConnectionConfig, ContractConfig, + DEFAULT_AEA_CONFIG_FILE, Dependencies, PackageType, ProtocolConfig, diff --git a/aea/cli/create.py b/aea/cli/create.py index d11061c2f3..691ed37cdc 100644 --- a/aea/cli/create.py +++ b/aea/cli/create.py @@ -34,9 +34,9 @@ from aea.cli.utils.decorators import clean_after from aea.cli.utils.loggers import logger from aea.configurations.base import ( + AgentConfig, DEFAULT_AEA_CONFIG_FILE, DEFAULT_VERSION, - AgentConfig, ) from aea.configurations.constants import ( DEFAULT_CONNECTION, diff --git a/aea/cli/interact.py b/aea/cli/interact.py index 62cb63b715..19d1976f4d 100644 --- a/aea/cli/interact.py +++ b/aea/cli/interact.py @@ -29,8 +29,8 @@ from aea.cli.utils.exceptions import InterruptInputException from aea.common import Address from aea.configurations.base import ( - DEFAULT_AEA_CONFIG_FILE, ConnectionConfig, + DEFAULT_AEA_CONFIG_FILE, PackageType, ) from aea.configurations.loader import ConfigLoader diff --git a/aea/cli/publish.py b/aea/cli/publish.py index a6baa68c17..6653fc3161 100644 --- a/aea/cli/publish.py +++ b/aea/cli/publish.py @@ -35,7 +35,7 @@ try_get_item_source_path, try_get_item_target_path, ) -from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, CRUDCollection, PublicId +from aea.configurations.base import CRUDCollection, DEFAULT_AEA_CONFIG_FILE, PublicId from aea.configurations.constants import ( DEFAULT_CONNECTION, DEFAULT_PROTOCOL, diff --git a/aea/cli/utils/package_utils.py b/aea/cli/utils/package_utils.py index f6556c34bf..f36dc4c469 100644 --- a/aea/cli/utils/package_utils.py +++ b/aea/cli/utils/package_utils.py @@ -33,8 +33,8 @@ from aea.cli.utils.context import Context from aea.cli.utils.loggers import logger from aea.configurations.base import ( - DEFAULT_AEA_CONFIG_FILE, AgentConfig, + DEFAULT_AEA_CONFIG_FILE, PackageType, PublicId, _compute_fingerprint, diff --git a/aea/connections/base.py b/aea/connections/base.py index 767e2267fd..9542b78b6b 100644 --- a/aea/connections/base.py +++ b/aea/connections/base.py @@ -26,7 +26,7 @@ from contextlib import contextmanager from enum import Enum from pathlib import Path -from typing import TYPE_CHECKING, Generator, Optional, Set, cast +from typing import Generator, Optional, Set, TYPE_CHECKING, cast from aea.components.base import Component, load_aea_package from aea.configurations.base import ComponentType, ConnectionConfig, PublicId diff --git a/aea/connections/stub/connection.py b/aea/connections/stub/connection.py index 7c1310f01c..155aee920b 100644 --- a/aea/connections/stub/connection.py +++ b/aea/connections/stub/connection.py @@ -27,7 +27,7 @@ from concurrent.futures.thread import ThreadPoolExecutor from contextlib import contextmanager from pathlib import Path -from typing import IO, AsyncIterable, List, Optional, Union +from typing import AsyncIterable, IO, List, Optional, Union from aea.configurations.base import PublicId from aea.connections.base import Connection, ConnectionStates diff --git a/aea/connections/stub/connection.yaml b/aea/connections/stub/connection.yaml index 05026c3e63..cdd0ca8581 100644 --- a/aea/connections/stub/connection.yaml +++ b/aea/connections/stub/connection.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: __init__.py: QmWwepN9Fy9gHAp39vUGFSLdnB9JZjdyE3STnbowSUhJkC - connection.py: QmUQVdzJ1YWiERHmjoy8YuzLUmtcw39weShXtZESfvoAdj + connection.py: QmYAWVhNoWhJNaCkEh5cMScJ53a1gkfcBNGt9LLxftyUuR readme.md: QmXSAtxSY7C2YkvUxeVnpqCJY9uJYZxZBmuUcE4zjFXcXz fingerprint_ignore_patterns: [] protocols: [] diff --git a/aea/crypto/helpers.py b/aea/crypto/helpers.py index 8d3cb7d905..53d64a31a9 100644 --- a/aea/crypto/helpers.py +++ b/aea/crypto/helpers.py @@ -23,7 +23,7 @@ import sys from pathlib import Path -from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig, PackageType +from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE, PackageType from aea.configurations.loader import ConfigLoaders from aea.crypto.registries import crypto_registry, make_crypto, make_faucet_api diff --git a/aea/crypto/ledger_apis.py b/aea/crypto/ledger_apis.py index c005e3068f..bdf82496f4 100644 --- a/aea/crypto/ledger_apis.py +++ b/aea/crypto/ledger_apis.py @@ -24,8 +24,8 @@ from aea.common import Address from aea.configurations.constants import DEFAULT_LEDGER from aea.crypto.base import LedgerApi -from aea.crypto.cosmos import DEFAULT_ADDRESS as COSMOS_DEFAULT_ADDRESS from aea.crypto.cosmos import CosmosApi +from aea.crypto.cosmos import DEFAULT_ADDRESS as COSMOS_DEFAULT_ADDRESS from aea.crypto.ethereum import DEFAULT_ADDRESS as ETHEREUM_DEFAULT_ADDRESS from aea.crypto.ethereum import DEFAULT_CHAIN_ID, EthereumApi from aea.crypto.fetchai import DEFAULT_ADDRESS as FETCHAI_DEFAULT_ADDRESS diff --git a/aea/test_tools/test_cases.py b/aea/test_tools/test_cases.py index 26ce7365c7..fdf105a486 100644 --- a/aea/test_tools/test_cases.py +++ b/aea/test_tools/test_cases.py @@ -39,7 +39,7 @@ import yaml from aea.cli import cli -from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig, PackageType +from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE, PackageType from aea.configurations.constants import DEFAULT_LEDGER, DEFAULT_PRIVATE_KEY_FILE from aea.configurations.loader import ConfigLoader from aea.connections.stub.connection import ( diff --git a/packages/fetchai/connections/http_server/connection.py b/packages/fetchai/connections/http_server/connection.py index 95ff9d12b1..c5629419dc 100644 --- a/packages/fetchai/connections/http_server/connection.py +++ b/packages/fetchai/connections/http_server/connection.py @@ -49,7 +49,7 @@ from aea.common import Address from aea.configurations.base import PublicId from aea.connections.base import Connection, ConnectionStates -from aea.mail.base import URI, Envelope, EnvelopeContext, Message +from aea.mail.base import Envelope, EnvelopeContext, Message, URI from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel diff --git a/packages/fetchai/connections/http_server/connection.yaml b/packages/fetchai/connections/http_server/connection.yaml index f6ba1d652a..7878887307 100644 --- a/packages/fetchai/connections/http_server/connection.yaml +++ b/packages/fetchai/connections/http_server/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTmQcnUPKaDHHJHngBFXnUVPdgBLanP9DbjVHZT55Scfn __init__.py: Qmb6JEAkJeb5JweqrSGiGoQp1vGXqddjGgb9WMkm2phTgA - connection.py: QmTbxD1VE4nA8uonSWa1b4hZwji8UEJ8aCXb71LVxeFFYY + connection.py: QmUdFW1587JpJEfwzb9LS55imtdNkXnZZKZfQNWtrLbDAa fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/webhook/connection.py b/packages/fetchai/connections/webhook/connection.py index ec356aac75..b4e28cfa38 100644 --- a/packages/fetchai/connections/webhook/connection.py +++ b/packages/fetchai/connections/webhook/connection.py @@ -29,7 +29,7 @@ from aea.common import Address from aea.configurations.base import PublicId from aea.connections.base import Connection, ConnectionStates -from aea.mail.base import URI, Envelope, EnvelopeContext +from aea.mail.base import Envelope, EnvelopeContext, URI from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue diff --git a/packages/fetchai/connections/webhook/connection.yaml b/packages/fetchai/connections/webhook/connection.yaml index e234b9719c..edbd4803ec 100644 --- a/packages/fetchai/connections/webhook/connection.yaml +++ b/packages/fetchai/connections/webhook/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmQDqfKKsksKsUqdqTcYe8P8Fw3MGovVuZBFHPbhupkkxf __init__.py: QmWUKSmXaBgGMvKgdmzKmMjCx43BnrfW6og2n3afNoAALq - connection.py: Qme93KgLYqvUkqspcrLb2wyBqN4v2wbvcNMXFnuVMRKJBx + connection.py: QmVzx4qbqru7oLCsUnSqWCMt9e69yUr9BquhaLXdTKz16U fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/skills/aries_alice/behaviours.py b/packages/fetchai/skills/aries_alice/behaviours.py index 192879fc28..847c40c3b8 100644 --- a/packages/fetchai/skills/aries_alice/behaviours.py +++ b/packages/fetchai/skills/aries_alice/behaviours.py @@ -35,8 +35,8 @@ OefSearchDialogues, ) from packages.fetchai.skills.aries_alice.strategy import ( - HTTP_COUNTERPARTY, AliceStrategy, + HTTP_COUNTERPARTY, ) DEFAULT_SERVICES_INTERVAL = 60.0 diff --git a/packages/fetchai/skills/aries_alice/skill.yaml b/packages/fetchai/skills/aries_alice/skill.yaml index 38cb454605..7bdeae07c0 100644 --- a/packages/fetchai/skills/aries_alice/skill.yaml +++ b/packages/fetchai/skills/aries_alice/skill.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmfS1ezD77No8WQkvrkPs4oSXHFbULRxatGzRhMbSMntSx __init__.py: Qma8qSTU34ADKWskBwQKQLGNpe3xDKNgjNQ6Q4MxUnKa3Q - behaviours.py: QmVCaSA8nEDYfB99EhBVr9pWyRcuAgAgWjburFaHLTXdbK + behaviours.py: QmZafoGe1KJ6ZfQhAkgVQFUAbDfackh8YHRjxVdCLm2TQE dialogues.py: QmRbbuYSXuNzMVK3gkHVFhwqH8k6oPo4ThGvVPrrn9N3Yq handlers.py: QmTtqM5oWBEAZcHdTuwuPtbiZZGWontMNEtmDxcccS2u2Y strategy.py: QmZ2jhWFQZipk6wAquS1gWxX94iAmhN9Vrh7tcPU9bgpzF diff --git a/packages/fetchai/skills/aries_faber/behaviours.py b/packages/fetchai/skills/aries_faber/behaviours.py index b3706e86e7..2e0080d319 100644 --- a/packages/fetchai/skills/aries_faber/behaviours.py +++ b/packages/fetchai/skills/aries_faber/behaviours.py @@ -31,8 +31,8 @@ OefSearchDialogues, ) from packages.fetchai.skills.aries_faber.strategy import ( - HTTP_COUNTERPARTY, FaberStrategy, + HTTP_COUNTERPARTY, ) DEFAULT_SEARCH_INTERVAL = 5.0 diff --git a/packages/fetchai/skills/aries_faber/handlers.py b/packages/fetchai/skills/aries_faber/handlers.py index 77be923810..dd46d1205c 100644 --- a/packages/fetchai/skills/aries_faber/handlers.py +++ b/packages/fetchai/skills/aries_faber/handlers.py @@ -47,8 +47,8 @@ ADMIN_COMMAND_SCEHMAS, ADMIN_COMMAND_STATUS, FABER_ACA_IDENTITY, - LEDGER_COMMAND_REGISTER_DID, FaberStrategy, + LEDGER_COMMAND_REGISTER_DID, ) SUPPORT_REVOCATION = False diff --git a/packages/fetchai/skills/aries_faber/skill.yaml b/packages/fetchai/skills/aries_faber/skill.yaml index 3b4021817d..6e25d53973 100644 --- a/packages/fetchai/skills/aries_faber/skill.yaml +++ b/packages/fetchai/skills/aries_faber/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdkSNCYx5dNGDAAveapQgoyM7Y7iYeQzR7KN2Sso3CJG4 __init__.py: QmNPVQ6UajvJodqTLWbLvQZkKCfrNn1nYPrQXai3xdj6F7 - behaviours.py: QmYvoagukgT4oRGxLThY8QcgZBAbZfogVBuuuytVpnMsMR + behaviours.py: QmfF39uLgQinDRfWHo4fzbgJBGm1xanL1BbvdDwAHT7HPQ dialogues.py: QmXveWmeU3eTDDhqDkBcVE2pJAtxJUAzcjbM8ZEjRvKUYW - handlers.py: QmcJ2c4enNm2K2ZdY5KKQtUri1MRYcDgQsPV4G8U8ndnmD + handlers.py: QmZMEEQ3tGdfE1N5oMem5AZkXqreJ6BuGu7HsYrNwH99C3 strategy.py: QmcUmddp6CUP31Bfckt6EkV3n2VZcJrUagoGBaTDBMTdXR fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/gym/skill.yaml b/packages/fetchai/skills/gym/skill.yaml index d6108e6eae..5f983718bd 100644 --- a/packages/fetchai/skills/gym/skill.yaml +++ b/packages/fetchai/skills/gym/skill.yaml @@ -12,7 +12,7 @@ fingerprint: handlers.py: QmagqBdQaGuGbVS5dFqxFtEww2e1YF2NprBNPtt5pVA2hZ helpers.py: QmbRSMX7UCRAEotS4ocTEcZLo1qietAAU9K5zBtqY1nE82 rl_agent.py: QmUq3XY9Dd2XZBhNNK9J3S5937d3az4cwP1BmeieHSgJ3m - tasks.py: QmW4WBzC2pkcnjnwJZKu63qXXWEbMVV3fwQMozGxjWnEdt + tasks.py: QmVf9K7zCkKYduTnS7nS3d8FvUbEVy7s7a26yaCC8Q3rgd fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/gym/tasks.py b/packages/fetchai/skills/gym/tasks.py index d96e02029c..0972210c19 100644 --- a/packages/fetchai/skills/gym/tasks.py +++ b/packages/fetchai/skills/gym/tasks.py @@ -26,7 +26,7 @@ from aea.skills.tasks import Task from packages.fetchai.skills.gym.helpers import ProxyEnv -from packages.fetchai.skills.gym.rl_agent import DEFAULT_NB_STEPS, NB_GOODS, MyRLAgent +from packages.fetchai.skills.gym.rl_agent import DEFAULT_NB_STEPS, MyRLAgent, NB_GOODS class GymTask(Task): diff --git a/packages/hashes.csv b/packages/hashes.csv index bc02fd394e..0341ac6d1c 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -20,7 +20,7 @@ fetchai/agents/weather_client,QmXyXQHxeJyBFSXLU2GZnV49t17iwnNLWWpUEFqMTAb8AE fetchai/agents/weather_station,QmW4kSbF5eKuh4itMJ8xKonaPejutaMp2GyobcN7V4zJR8 fetchai/connections/gym,QmeVoxp49pwDh57ZirtpjZrC7YmdV7YYn5GHJVq7ekovEV fetchai/connections/http_client,QmeSZGTkJfG95iBjdhmevfEU1qAdX2gnrawHpwQrbG8DfS -fetchai/connections/http_server,QmU8RjATmQ8X95p2aCahZGfUEs5eQjYam2vAepX1tAM64i +fetchai/connections/http_server,Qmbjf44kA8X3axcBX5AohNd8rF1K2uweSCDc9x6AsE4S9y fetchai/connections/ledger,QmXZjQkskqt5UbAw9bJbj6Lo9h4TRvengRqAchDRuJwGJd fetchai/connections/local,QmWZPDvqjZjzNDUX4ivHF3kGvkNCUYM449RqNEyyoexFix fetchai/connections/oef,QmaJZCCrYCjA8eY3zav9QjxWNcVJ6yQw2n6ZJ53fQT22xb @@ -29,9 +29,9 @@ fetchai/connections/p2p_libp2p_client,QmVEwABjAPTZcA4BaAgn8BnzUCpHQbSzc4pJ6mdR4b fetchai/connections/p2p_stub,QmX8EWvFok3UAdqXGgir4TrhfDj2kLhfjuXRg82b6G6XtW fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS fetchai/connections/soef,QmQ82mNiuBc9jEUFU8TeaAk5ktqnXX512h4X67yYUxRrX5 -fetchai/connections/stub,QmaxLLkfgUZL4s1r2yP5mbZqV4g1dmLLoA4uEApgPyR3aE +fetchai/connections/stub,QmU1fuqRkzBufaHTB9qY7GSUkkh4Wq1M6ru6FQKnrcEoUZ fetchai/connections/tcp,QmU93B7yajCHwXsgDXXhv1uSuXi7VmFBhdahcFosbrr6nA -fetchai/connections/webhook,QmTjyENiT8KZDKUD1B6dDC1gAEYDU8UMNkXa8tSbZYKPsk +fetchai/connections/webhook,QmaJunWQT1ypkqGnzrj5gYjjQBywjTHJmyktCZXZsa8hv8 fetchai/contracts/erc1155,QmUupRwnza2KZBGULZ62xQREtkuQbYUrt1W8NbYZJuqbNt fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 fetchai/protocols/contract_api,QmWWMHyzRT7rvdiBsPJ4xrE1nF5TZFfkW6J44D7Dc6g4mT @@ -46,8 +46,8 @@ fetchai/protocols/scaffold,QmXJb2kxe228AqQ2iHRiKJnhhKsC9zU8pqNdojLNXqjUvz fetchai/protocols/signing,QmYTfrqGX7exRtafwm9wHGzHZB1FziuZdYMVT1ad3fnKYR fetchai/protocols/state_update,QmejF6NFSBgfa1KTNkBCw4oZGrTnXHvwYXxayHKGLV4PtW fetchai/protocols/tac,QmchXXv217Dyft4PN6s1iE1Y5EKYUiYeSv9qLPZVrMwaLr -fetchai/skills/aries_alice,QmVqS1TMK5Mp3zV59gGN3Ef9xJBcxqKpN6PhrDV9UzEQd6 -fetchai/skills/aries_faber,QmeipFxDi2tPz3taPDPZJvstxjAPUdUcCwckFmjjFhBps5 +fetchai/skills/aries_alice,QmXp6W2vFmQgYCchQwLa3yDUwWw7hjeC8WnuPmtrXebZnq +fetchai/skills/aries_faber,QmcuNdL6rJz6xy9bqarRzmoJCVXk4NJjMfqeNnaS6WhwSD fetchai/skills/carpark_client,QmPYHXP1TvNihMa6WFSLP1NhiFDKTiArZbStQ6v54ySa8j fetchai/skills/carpark_detection,QmUDRJUJm9UTCyM9o3AwphD6q1L7mNLXPqSizJJvivtRe4 fetchai/skills/echo,QmcHx9UjP429vnTxMpM3wSphkY2umanW1CZJyn7B1FkpWV @@ -56,7 +56,7 @@ fetchai/skills/erc1155_deploy,QmYyeafnykiRwNHyk8hhLhyG3EaHijSMAoFXkrfeXv4DcE fetchai/skills/error,QmanfpyCmvUkqG9xsEyWULvi1ZZzqvggvs9LnQvSjuRhLb fetchai/skills/generic_buyer,QmT6F5P2ZajWNHi4XiHXPa3iEuvVCrNcCNTzEi8XSkkHTT fetchai/skills/generic_seller,QmXzF3FiqNbFMYu2nMNbonzqZAY5Lf7NN6S9whd7c8Ek18 -fetchai/skills/gym,QmPeiufnXTJ424Tcep8JcjJYErHJmFKh4XY8ituJWL6SAg +fetchai/skills/gym,QmTXKPy2QGtHe1Nko7jXzUnq8EqT6Uto8ZETmMGH2Zyu4Z fetchai/skills/http_echo,QmaBNGNtDDcfCTQY6hsANAeZz7F4ZXEEPgTMd3ip75Zh1D fetchai/skills/ml_data_provider,QmXZpzAetLKPfoPSMAafjha2qjF38dWsLpZQg2jCQ3QgAV fetchai/skills/ml_train,QmU4HiyQUagkEwbU9rutL3g9xmQbo8WHUAULMBUcrEULks diff --git a/setup.cfg b/setup.cfg index 5e175502fa..502c1c9ba7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,9 +33,10 @@ use_parentheses=True ensure_newline_before_comments = True line_length=88 # custom configurations -order_by_type=True +order_by_type=False skip_glob = **/*_pb2.py known_local_folder=packages,tests +case_sensitive=True [mypy] python_version = 3.7 diff --git a/tests/conftest.py b/tests/conftest.py index f18aae15c2..4be0997617 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -44,28 +44,24 @@ from aea.aea import AEA from aea.cli.utils.config import _init_cli_config from aea.common import Address +from aea.configurations.base import ComponentType, ConnectionConfig, ContractConfig from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE as AGENT_YAML from aea.configurations.base import DEFAULT_CONNECTION_CONFIG_FILE as CONNECTION_YAML from aea.configurations.base import DEFAULT_CONTRACT_CONFIG_FILE as CONTRACT_YAML from aea.configurations.base import DEFAULT_PROTOCOL_CONFIG_FILE as PROTOCOL_YAML from aea.configurations.base import DEFAULT_SKILL_CONFIG_FILE as SKILL_YAML -from aea.configurations.base import ( - ComponentType, - ConnectionConfig, - ContractConfig, - PublicId, -) +from aea.configurations.base import PublicId from aea.configurations.constants import DEFAULT_CONNECTION, DEFAULT_LEDGER from aea.configurations.loader import load_component_configuration from aea.connections.base import Connection from aea.connections.stub.connection import StubConnection from aea.contracts.base import Contract, contract_registry -from aea.crypto.cosmos import _COSMOS from aea.crypto.cosmos import DEFAULT_ADDRESS as COSMOS_DEFAULT_ADDRESS -from aea.crypto.ethereum import _ETHEREUM +from aea.crypto.cosmos import _COSMOS from aea.crypto.ethereum import DEFAULT_ADDRESS as ETHEREUM_DEFAULT_ADDRESS -from aea.crypto.fetchai import _FETCHAI +from aea.crypto.ethereum import _ETHEREUM from aea.crypto.fetchai import DEFAULT_ADDRESS as FETCHAI_DEFAULT_ADDRESS +from aea.crypto.fetchai import _FETCHAI from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA from aea.crypto.registries import make_crypto from aea.crypto.wallet import CryptoStore diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index d99333f678..94516cc5c6 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -33,10 +33,10 @@ from aea.aea_builder import AEABuilder, _DependenciesManager from aea.components.base import Component from aea.configurations.base import ( - DEFAULT_AEA_CONFIG_FILE, ComponentId, ComponentType, ConnectionConfig, + DEFAULT_AEA_CONFIG_FILE, ProtocolConfig, PublicId, SkillConfig, diff --git a/tests/test_cli/test_add/test_connection.py b/tests/test_cli/test_add/test_connection.py index e83d766785..47cbef9433 100644 --- a/tests/test_cli/test_add/test_connection.py +++ b/tests/test_cli/test_add/test_connection.py @@ -38,8 +38,8 @@ AUTHOR, CLI_LOG_OPTION, CUR_PATH, - MAX_FLAKY_RERUNS, CliRunner, + MAX_FLAKY_RERUNS, double_escape_windows_path_separator, ) diff --git a/tests/test_cli/test_add/test_contract.py b/tests/test_cli/test_add/test_contract.py index 829a25c3d6..030278f521 100644 --- a/tests/test_cli/test_add/test_contract.py +++ b/tests/test_cli/test_add/test_contract.py @@ -26,7 +26,7 @@ from aea.cli import cli from aea.test_tools.test_cases import AEATestCaseEmpty -from tests.conftest import CLI_LOG_OPTION, MAX_FLAKY_RERUNS, CliRunner +from tests.conftest import CLI_LOG_OPTION, CliRunner, MAX_FLAKY_RERUNS @mock.patch("aea.cli.utils.decorators.try_to_load_agent_config") diff --git a/tests/test_cli/test_add/test_protocol.py b/tests/test_cli/test_add/test_protocol.py index 5f009b6285..705021ee1f 100644 --- a/tests/test_cli/test_add/test_protocol.py +++ b/tests/test_cli/test_add/test_protocol.py @@ -38,8 +38,8 @@ AUTHOR, CLI_LOG_OPTION, CUR_PATH, - MAX_FLAKY_RERUNS, CliRunner, + MAX_FLAKY_RERUNS, double_escape_windows_path_separator, ) diff --git a/tests/test_cli/test_add/test_skill.py b/tests/test_cli/test_add/test_skill.py index 1dda532ee9..01d3a980ed 100644 --- a/tests/test_cli/test_add/test_skill.py +++ b/tests/test_cli/test_add/test_skill.py @@ -32,9 +32,9 @@ import aea from aea.cli import cli from aea.configurations.base import ( + AgentConfig, DEFAULT_AEA_CONFIG_FILE, DEFAULT_SKILL_CONFIG_FILE, - AgentConfig, PublicId, ) from aea.test_tools.test_cases import AEATestCaseEmpty @@ -43,9 +43,9 @@ AUTHOR, CLI_LOG_OPTION, CUR_PATH, + CliRunner, MAX_FLAKY_RERUNS, ROOT_DIR, - CliRunner, double_escape_windows_path_separator, ) diff --git a/tests/test_cli/test_add_key.py b/tests/test_cli/test_add_key.py index e064351450..f8c84aa07c 100644 --- a/tests/test_cli/test_add_key.py +++ b/tests/test_cli/test_add_key.py @@ -29,18 +29,18 @@ import aea from aea.cli import cli from aea.cli.add_key import _try_add_key -from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig +from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, CUR_PATH, + CliRunner, ETHEREUM, ETHEREUM_PRIVATE_KEY_FILE, FETCHAI, FETCHAI_PRIVATE_KEY_FILE, ROOT_DIR, - CliRunner, ) from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_create.py b/tests/test_cli/test_create.py index 33432b81e2..b9aba65181 100644 --- a/tests/test_cli/test_create.py +++ b/tests/test_cli/test_create.py @@ -49,8 +49,8 @@ AUTHOR, CLI_LOG_OPTION, CONFIGURATION_SCHEMA_DIR, - ROOT_DIR, CliRunner, + ROOT_DIR, ) diff --git a/tests/test_cli/test_fetch.py b/tests/test_cli/test_fetch.py index 618546666a..56aa93d944 100644 --- a/tests/test_cli/test_fetch.py +++ b/tests/test_cli/test_fetch.py @@ -28,7 +28,7 @@ from aea.cli.fetch import _is_version_correct, fetch_agent_locally from aea.test_tools.test_cases import AEATestCaseMany -from tests.conftest import CLI_LOG_OPTION, MAX_FLAKY_RERUNS, CliRunner +from tests.conftest import CLI_LOG_OPTION, CliRunner, MAX_FLAKY_RERUNS from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock diff --git a/tests/test_cli/test_freeze.py b/tests/test_cli/test_freeze.py index c939ad7e40..8e44bccabe 100644 --- a/tests/test_cli/test_freeze.py +++ b/tests/test_cli/test_freeze.py @@ -37,8 +37,8 @@ CLI_LOG_OPTION, CONFIGURATION_SCHEMA_DIR, CUR_PATH, - MAX_FLAKY_RERUNS, CliRunner, + MAX_FLAKY_RERUNS, ) diff --git a/tests/test_cli/test_generate/test_protocols.py b/tests/test_cli/test_generate/test_protocols.py index 36d60b7271..9b594c6348 100644 --- a/tests/test_cli/test_generate/test_protocols.py +++ b/tests/test_cli/test_generate/test_protocols.py @@ -39,8 +39,8 @@ CLI_LOG_OPTION, CONFIGURATION_SCHEMA_DIR, CUR_PATH, - PROTOCOL_CONFIGURATION_SCHEMA, CliRunner, + PROTOCOL_CONFIGURATION_SCHEMA, ) diff --git a/tests/test_cli/test_generate_key.py b/tests/test_cli/test_generate_key.py index 67801b6f4a..f30dd52e19 100644 --- a/tests/test_cli/test_generate_key.py +++ b/tests/test_cli/test_generate_key.py @@ -29,11 +29,11 @@ from tests.conftest import ( CLI_LOG_OPTION, + CliRunner, ETHEREUM, ETHEREUM_PRIVATE_KEY_FILE, FETCHAI, FETCHAI_PRIVATE_KEY_FILE, - CliRunner, ) diff --git a/tests/test_cli/test_generate_wealth.py b/tests/test_cli/test_generate_wealth.py index 01ac6d42c4..f061b96d13 100644 --- a/tests/test_cli/test_generate_wealth.py +++ b/tests/test_cli/test_generate_wealth.py @@ -29,9 +29,9 @@ from tests.conftest import ( CLI_LOG_OPTION, + CliRunner, FETCHAI, MAX_FLAKY_RERUNS_INTEGRATION, - CliRunner, ) from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_get_address.py b/tests/test_cli/test_get_address.py index 86e582f7a1..82c81b59e3 100644 --- a/tests/test_cli/test_get_address.py +++ b/tests/test_cli/test_get_address.py @@ -23,7 +23,7 @@ from aea.cli import cli from aea.cli.get_address import _try_get_address -from tests.conftest import CLI_LOG_OPTION, FETCHAI, CliRunner +from tests.conftest import CLI_LOG_OPTION, CliRunner, FETCHAI from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_get_wealth.py b/tests/test_cli/test_get_wealth.py index ff6f118a2d..1d7f45d3a6 100644 --- a/tests/test_cli/test_get_wealth.py +++ b/tests/test_cli/test_get_wealth.py @@ -23,7 +23,7 @@ from aea.cli import cli from aea.cli.get_wealth import _try_get_wealth -from tests.conftest import CLI_LOG_OPTION, FETCHAI, CliRunner +from tests.conftest import CLI_LOG_OPTION, CliRunner, FETCHAI from tests.test_cli.tools_for_testing import ContextMock diff --git a/tests/test_cli/test_launch.py b/tests/test_cli/test_launch.py index cf9054a9af..664036df3e 100644 --- a/tests/test_cli/test_launch.py +++ b/tests/test_cli/test_launch.py @@ -36,7 +36,7 @@ from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE from tests.common.pexpect_popen import PexpectWrapper -from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, MAX_FLAKY_RERUNS, CliRunner +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner, MAX_FLAKY_RERUNS logger = logging.getLogger(__name__) diff --git a/tests/test_cli/test_remove/test_skill.py b/tests/test_cli/test_remove/test_skill.py index 659a94cc9c..372836292d 100644 --- a/tests/test_cli/test_remove/test_skill.py +++ b/tests/test_cli/test_remove/test_skill.py @@ -30,9 +30,9 @@ import aea import aea.configurations.base from aea.cli import cli -from aea.configurations.base import DEFAULT_AEA_CONFIG_FILE, AgentConfig +from aea.configurations.base import AgentConfig, DEFAULT_AEA_CONFIG_FILE -from tests.conftest import AUTHOR, CLI_LOG_OPTION, ROOT_DIR, CliRunner +from tests.conftest import AUTHOR, CLI_LOG_OPTION, CliRunner, ROOT_DIR class TestRemoveSkillWithPublicId: diff --git a/tests/test_cli/test_run.py b/tests/test_cli/test_run.py index 6ad47c3502..b263fe0677 100644 --- a/tests/test_cli/test_run.py +++ b/tests/test_cli/test_run.py @@ -46,10 +46,10 @@ from tests.conftest import ( AUTHOR, CLI_LOG_OPTION, + CliRunner, FETCHAI_PRIVATE_KEY_FILE, MAX_FLAKY_RERUNS, ROOT_DIR, - CliRunner, ) diff --git a/tests/test_cli/test_scaffold/test_protocols.py b/tests/test_cli/test_scaffold/test_protocols.py index 65df7b4b89..1fbbb707e0 100644 --- a/tests/test_cli/test_scaffold/test_protocols.py +++ b/tests/test_cli/test_scaffold/test_protocols.py @@ -40,8 +40,8 @@ AUTHOR, CLI_LOG_OPTION, CONFIGURATION_SCHEMA_DIR, - PROTOCOL_CONFIGURATION_SCHEMA, CliRunner, + PROTOCOL_CONFIGURATION_SCHEMA, ) diff --git a/tests/test_cli/test_scaffold/test_skills.py b/tests/test_cli/test_scaffold/test_skills.py index 5c1b593e61..d4c1a50248 100644 --- a/tests/test_cli/test_scaffold/test_skills.py +++ b/tests/test_cli/test_scaffold/test_skills.py @@ -40,8 +40,8 @@ AUTHOR, CLI_LOG_OPTION, CONFIGURATION_SCHEMA_DIR, - SKILL_CONFIGURATION_SCHEMA, CliRunner, + SKILL_CONFIGURATION_SCHEMA, ) diff --git a/tests/test_cli/test_search.py b/tests/test_cli/test_search.py index 6989eb16d2..ebcad61cad 100644 --- a/tests/test_cli/test_search.py +++ b/tests/test_cli/test_search.py @@ -38,8 +38,8 @@ AUTHOR, CLI_LOG_OPTION, CONFIGURATION_SCHEMA_DIR, - ROOT_DIR, CliRunner, + ROOT_DIR, ) from tests.test_cli.constants import FORMAT_ITEMS_SAMPLE_OUTPUT diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index cc5095176a..3409f549ff 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -27,13 +27,13 @@ import yaml from aea.configurations.base import ( - DEFAULT_SKILL_CONFIG_FILE, AgentConfig, + CRUDCollection, ComponentId, ComponentType, ConnectionConfig, ContractConfig, - CRUDCollection, + DEFAULT_SKILL_CONFIG_FILE, PackageId, PackageType, ProtocolConfig, diff --git a/tests/test_mail/test_base.py b/tests/test_mail/test_base.py index 0c24589ca9..518d5b4eaa 100644 --- a/tests/test_mail/test_base.py +++ b/tests/test_mail/test_base.py @@ -25,7 +25,7 @@ import aea from aea.configurations.base import PublicId -from aea.mail.base import URI, Envelope, EnvelopeContext, ProtobufEnvelopeSerializer +from aea.mail.base import Envelope, EnvelopeContext, ProtobufEnvelopeSerializer, URI from aea.multiplexer import InBox, Multiplexer, OutBox from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py index 27deba8716..b53367abc8 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py @@ -32,8 +32,8 @@ from aea.multiplexer import Multiplexer from packages.fetchai.connections.p2p_libp2p.connection import ( - LIBP2P_NODE_MODULE_NAME, AwaitableProc, + LIBP2P_NODE_MODULE_NAME, P2PLibp2pConnection, _golang_module_build_async, _golang_module_run, diff --git a/tests/test_protocols/test_dialogue/test_base.py b/tests/test_protocols/test_dialogue/test_base.py index 19994e658b..272676ca91 100644 --- a/tests/test_protocols/test_dialogue/test_base.py +++ b/tests/test_protocols/test_dialogue/test_base.py @@ -28,9 +28,9 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.protocols.dialogue.base import Dialogue as BaseDialogue -from aea.protocols.dialogue.base import DialogueLabel +from aea.protocols.dialogue.base import DialogueLabel, DialogueStats from aea.protocols.dialogue.base import Dialogues as BaseDialogues -from aea.protocols.dialogue.base import DialogueStats, InvalidDialogueMessage +from aea.protocols.dialogue.base import InvalidDialogueMessage from aea.protocols.state_update.message import StateUpdateMessage From c7843665a445f4928da22c1b1099ebe1b2714860 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 10:49:04 +0200 Subject: [PATCH 024/131] add 'packages' import group --- examples/gym_ex/proxy/env.py | 3 ++- setup.cfg | 4 +++- tests/conftest.py | 3 ++- tests/test_aea.py | 5 +++-- tests/test_agent.py | 3 ++- tests/test_docs/test_docs_protocol.py | 1 + .../test_http_client_connection_to_aries_cloud_agent.py | 1 + tests/test_helpers/test_base.py | 1 + tests/test_mail/test_base.py | 1 + tests/test_multiplexer.py | 3 ++- tests/test_packages/test_connections/test_gym/test_gym.py | 1 + .../test_connections/test_http_client/test_http_client.py | 1 + .../test_connections/test_http_server/test_http_server.py | 1 + .../test_http_server/test_http_server_and_client.py | 1 + .../test_connections/test_ledger/test_contract_api.py | 1 + .../test_connections/test_ledger/test_ledger_api.py | 1 + tests/test_packages/test_connections/test_local/test_misc.py | 1 + .../test_connections/test_local/test_search_services.py | 1 + .../test_connections/test_oef/test_communication.py | 1 + .../test_connections/test_p2p_libp2p/test_communication.py | 1 + .../test_connections/test_p2p_libp2p/test_errors.py | 1 + .../test_p2p_libp2p_client/test_communication.py | 1 + .../test_connections/test_p2p_libp2p_client/test_errors.py | 1 + tests/test_packages/test_connections/test_soef/test_soef.py | 3 ++- .../test_connections/test_soef/test_soef_integration.py | 5 +++-- .../test_connections/test_webhook/test_webhook.py | 1 + tests/test_packages/test_protocols/test_contract_api.py | 1 + tests/test_packages/test_protocols/test_fipa.py | 1 + tests/test_packages/test_protocols/test_gym.py | 1 + tests/test_packages/test_protocols/test_http.py | 1 + tests/test_packages/test_protocols/test_ledger_api.py | 1 + tests/test_packages/test_protocols/test_ml_trade.py | 1 + tests/test_packages/test_protocols/test_oef_search.py | 1 + tests/test_packages/test_protocols/test_tac.py | 1 + tests/test_skills/test_error.py | 1 + 35 files changed, 46 insertions(+), 10 deletions(-) diff --git a/examples/gym_ex/proxy/env.py b/examples/gym_ex/proxy/env.py index e40c89babb..815985da5f 100755 --- a/examples/gym_ex/proxy/env.py +++ b/examples/gym_ex/proxy/env.py @@ -32,7 +32,6 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue -from .agent import ProxyAgent # noqa: E402 # pylint: disable=wrong-import-position from packages.fetchai.protocols.gym.dialogues import ( # noqa: E402 # pylint: disable=wrong-import-position GymDialogue as BaseGymDialogue, ) @@ -43,6 +42,8 @@ GymMessage, ) +from .agent import ProxyAgent # noqa: E402 # pylint: disable=wrong-import-position + sys.modules["packages.fetchai.connections.gym"] = locate( "packages.fetchai.connections.gym" ) diff --git a/setup.cfg b/setup.cfg index 502c1c9ba7..69fd0de769 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,9 @@ line_length=88 # custom configurations order_by_type=False skip_glob = **/*_pb2.py -known_local_folder=packages,tests +known_packages=packages +known_local_folder=tests +sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PACKAGES,LOCALFOLDER case_sensitive=True [mypy] diff --git a/tests/conftest.py b/tests/conftest.py index 4be0997617..f6998ac373 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -69,7 +69,6 @@ from aea.test_tools.click_testing import CliRunner as ImportedCliRunner from aea.test_tools.constants import DEFAULT_AUTHOR -from .data.dummy_connection.connection import DummyConnection # type: ignore from packages.fetchai.connections.local.connection import LocalNode, OEFLocalConnection from packages.fetchai.connections.oef.connection import OEFConnection from packages.fetchai.connections.p2p_libp2p.connection import ( @@ -82,6 +81,8 @@ from packages.fetchai.connections.tcp.tcp_client import TCPClientConnection from packages.fetchai.connections.tcp.tcp_server import TCPServerConnection +from .data.dummy_connection.connection import DummyConnection # type: ignore + logger = logging.getLogger(__name__) CliRunner = ImportedCliRunner diff --git a/tests/test_aea.py b/tests/test_aea.py index 573582b97a..46553c275c 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -45,6 +45,9 @@ from aea.registries.resources import Resources from aea.skills.base import Skill, SkillContext +from packages.fetchai.connections.local.connection import LocalNode +from packages.fetchai.protocols.fipa.message import FipaMessage + from .conftest import ( CUR_PATH, DUMMY_SKILL_PUBLIC_ID, @@ -55,8 +58,6 @@ ) from .data.dummy_aea.skills.dummy.tasks import DummyTask # type: ignore from .data.dummy_skill.behaviours import DummyBehaviour # type: ignore -from packages.fetchai.connections.local.connection import LocalNode -from packages.fetchai.protocols.fipa.message import FipaMessage from tests.common.utils import ( AeaTool, make_behaviour_cls_from_funcion, diff --git a/tests/test_agent.py b/tests/test_agent.py index 3d05a0bacf..e16446fc07 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -26,8 +26,9 @@ from aea.agent import Agent, Identity from aea.runtime import RuntimeStates -from .conftest import _make_local_connection from packages.fetchai.connections.local.connection import LocalNode + +from .conftest import _make_local_connection from tests.common.utils import wait_for_condition diff --git a/tests/test_docs/test_docs_protocol.py b/tests/test_docs/test_docs_protocol.py index 4f68f4abf1..1bec995f56 100644 --- a/tests/test_docs/test_docs_protocol.py +++ b/tests/test_docs/test_docs_protocol.py @@ -28,6 +28,7 @@ from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.oef_search.custom_types import OefErrorOperation from packages.fetchai.protocols.oef_search.message import OefSearchMessage + from tests.conftest import ROOT_DIR from tests.test_docs.helper import compare_enum_classes, compile_and_exec diff --git a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py index 1a8234e66e..b2b78230dc 100644 --- a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py +++ b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py @@ -49,6 +49,7 @@ from packages.fetchai.connections.http_client.connection import HTTPClientConnection from packages.fetchai.protocols.http.message import HttpMessage + from tests.conftest import HTTP_PROTOCOL_PUBLIC_ID logger = logging.getLogger(__name__) diff --git a/tests/test_helpers/test_base.py b/tests/test_helpers/test_base.py index d2b2ee347a..b063cc3732 100644 --- a/tests/test_helpers/test_base.py +++ b/tests/test_helpers/test_base.py @@ -49,6 +49,7 @@ ) from packages.fetchai.connections.oef.connection import OEFConnection + from tests.conftest import CUR_PATH, ROOT_DIR, skip_test_windows diff --git a/tests/test_mail/test_base.py b/tests/test_mail/test_base.py index 518d5b4eaa..d4fdb3e624 100644 --- a/tests/test_mail/test_base.py +++ b/tests/test_mail/test_base.py @@ -31,6 +31,7 @@ from aea.protocols.default.message import DefaultMessage from packages.fetchai.connections.local.connection import LocalNode + from tests.conftest import ( UNKNOWN_PROTOCOL_PUBLIC_ID, _make_dummy_connection, diff --git a/tests/test_multiplexer.py b/tests/test_multiplexer.py index f3048912e7..07f507b13f 100644 --- a/tests/test_multiplexer.py +++ b/tests/test_multiplexer.py @@ -41,6 +41,8 @@ from aea.multiplexer import AsyncMultiplexer, InBox, Multiplexer, OutBox from aea.protocols.default.message import DefaultMessage +from packages.fetchai.connections.local.connection import LocalNode + from .conftest import ( UNKNOWN_CONNECTION_PUBLIC_ID, UNKNOWN_PROTOCOL_PUBLIC_ID, @@ -49,7 +51,6 @@ _make_stub_connection, logger, ) -from packages.fetchai.connections.local.connection import LocalNode from tests.common.utils import wait_for_condition diff --git a/tests/test_packages/test_connections/test_gym/test_gym.py b/tests/test_packages/test_connections/test_gym/test_gym.py index f2bced4db9..281b163905 100644 --- a/tests/test_packages/test_connections/test_gym/test_gym.py +++ b/tests/test_packages/test_connections/test_gym/test_gym.py @@ -36,6 +36,7 @@ from packages.fetchai.protocols.gym.dialogues import GymDialogue from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues from packages.fetchai.protocols.gym.message import GymMessage + from tests.conftest import ROOT_DIR, UNKNOWN_PROTOCOL_PUBLIC_ID logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_http_client/test_http_client.py b/tests/test_packages/test_connections/test_http_client/test_http_client.py index 5ce8c66936..07be0cee65 100644 --- a/tests/test_packages/test_connections/test_http_client/test_http_client.py +++ b/tests/test_packages/test_connections/test_http_client/test_http_client.py @@ -35,6 +35,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage + from tests.common.mocks import AnyStringWith from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID, get_host, get_unused_tcp_port diff --git a/tests/test_packages/test_connections/test_http_server/test_http_server.py b/tests/test_packages/test_connections/test_http_server/test_http_server.py index a63e7af233..495178987d 100644 --- a/tests/test_packages/test_connections/test_http_server/test_http_server.py +++ b/tests/test_packages/test_connections/test_http_server/test_http_server.py @@ -44,6 +44,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage + from tests.common.mocks import RegexComparator from tests.conftest import ( HTTP_PROTOCOL_PUBLIC_ID, 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 faddbd6f72..9bbd81a3f4 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 @@ -34,6 +34,7 @@ from packages.fetchai.connections.http_server.connection import HTTPServerConnection from packages.fetchai.protocols.http.dialogues import HttpDialogue, HttpDialogues from packages.fetchai.protocols.http.message import HttpMessage + from tests.conftest import get_host, get_unused_tcp_port logger = logging.getLogger(__name__) 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 a0b314f5f7..88bb315259 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 @@ -40,6 +40,7 @@ ContractApiDialogues as BaseContractApiDialogues, ) from packages.fetchai.protocols.contract_api.message import ContractApiMessage + from tests.conftest import ETHEREUM, ETHEREUM_ADDRESS_ONE diff --git a/tests/test_packages/test_connections/test_ledger/test_ledger_api.py b/tests/test_packages/test_connections/test_ledger/test_ledger_api.py index edcf7358b0..21ceaf2f5c 100644 --- a/tests/test_packages/test_connections/test_ledger/test_ledger_api.py +++ b/tests/test_packages/test_connections/test_ledger/test_ledger_api.py @@ -51,6 +51,7 @@ LedgerApiDialogues as BaseLedgerApiDialogues, ) from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage + from tests.conftest import ( ETHEREUM, ETHEREUM_ADDRESS_ONE, diff --git a/tests/test_packages/test_connections/test_local/test_misc.py b/tests/test_packages/test_connections/test_local/test_misc.py index 9f89eac9e6..1c49dcf99d 100644 --- a/tests/test_packages/test_connections/test_local/test_misc.py +++ b/tests/test_packages/test_connections/test_local/test_misc.py @@ -30,6 +30,7 @@ from packages.fetchai.connections.local.connection import LocalNode from packages.fetchai.protocols.fipa.message import FipaMessage + from tests.conftest import _make_local_connection diff --git a/tests/test_packages/test_connections/test_local/test_search_services.py b/tests/test_packages/test_connections/test_local/test_search_services.py index 97e03fd4bf..4c4c24ba4b 100644 --- a/tests/test_packages/test_connections/test_local/test_search_services.py +++ b/tests/test_packages/test_connections/test_local/test_search_services.py @@ -44,6 +44,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage + from tests.common.mocks import AnyStringWith from tests.common.utils import wait_for_condition from tests.conftest import MAX_FLAKY_RERUNS, _make_local_connection diff --git a/tests/test_packages/test_connections/test_oef/test_communication.py b/tests/test_packages/test_connections/test_oef/test_communication.py index 79972d8107..ea4676d068 100644 --- a/tests/test_packages/test_connections/test_oef/test_communication.py +++ b/tests/test_packages/test_connections/test_oef/test_communication.py @@ -59,6 +59,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage + from tests.conftest import ( FETCHAI_ADDRESS_ONE, FETCHAI_ADDRESS_TWO, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py index 8b42415786..49a08a0be9 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py @@ -30,6 +30,7 @@ from aea.protocols.default.message import DefaultMessage from packages.fetchai.connections.p2p_libp2p.connection import Uri + from tests.conftest import ( _make_libp2p_connection, libp2p_log_on_failure, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py index b53367abc8..1ef0791958 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py @@ -38,6 +38,7 @@ _golang_module_build_async, _golang_module_run, ) + from tests.conftest import COSMOS, _make_libp2p_connection DEFAULT_PORT = 10234 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py index 51f293def8..308f2b6bd2 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py @@ -31,6 +31,7 @@ from aea.protocols.default.serialization import DefaultSerializer from packages.fetchai.connections.p2p_libp2p_client.connection import Uri + from tests.conftest import ( _make_libp2p_client_connection, _make_libp2p_connection, diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py index 1834e135fb..4500e3c166 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_errors.py @@ -33,6 +33,7 @@ from packages.fetchai.connections.p2p_libp2p_client.connection import ( P2PLibp2pClientConnection, ) + from tests.conftest import ( COSMOS, _make_libp2p_client_connection, diff --git a/tests/test_packages/test_connections/test_soef/test_soef.py b/tests/test_packages/test_connections/test_soef/test_soef.py index dcecd3b2fb..1f4517f016 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef.py +++ b/tests/test_packages/test_connections/test_soef/test_soef.py @@ -42,13 +42,14 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue -from . import models from packages.fetchai.connections.soef.connection import SOEFConnection, SOEFException from packages.fetchai.protocols.oef_search.dialogues import OefSearchDialogue from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogues as BaseOefSearchDialogues, ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage + +from . import models from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index 3366cee8ca..9f0d345ffa 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -42,10 +42,11 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer -from . import models -from .test_soef import OefSearchDialogues from packages.fetchai.connections.soef.connection import SOEFConnection from packages.fetchai.protocols.oef_search.message import OefSearchMessage + +from . import models +from .test_soef import OefSearchDialogues from tests.common.utils import wait_for_condition logging.basicConfig(level=logging.DEBUG) diff --git a/tests/test_packages/test_connections/test_webhook/test_webhook.py b/tests/test_packages/test_connections/test_webhook/test_webhook.py index 5a68208fc8..d7e09becbe 100644 --- a/tests/test_packages/test_connections/test_webhook/test_webhook.py +++ b/tests/test_packages/test_connections/test_webhook/test_webhook.py @@ -40,6 +40,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage + from tests.common.mocks import RegexComparator from tests.conftest import get_host, get_unused_tcp_port diff --git a/tests/test_packages/test_protocols/test_contract_api.py b/tests/test_packages/test_protocols/test_contract_api.py index d9a3ca45ce..397cc26142 100644 --- a/tests/test_packages/test_protocols/test_contract_api.py +++ b/tests/test_packages/test_protocols/test_contract_api.py @@ -42,6 +42,7 @@ from packages.fetchai.protocols.contract_api.message import ( logger as contract_api_message_logger, ) + from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_protocols/test_fipa.py b/tests/test_packages/test_protocols/test_fipa.py index 0383e3d837..abead1272a 100644 --- a/tests/test_packages/test_protocols/test_fipa.py +++ b/tests/test_packages/test_protocols/test_fipa.py @@ -38,6 +38,7 @@ from packages.fetchai.protocols.fipa.dialogues import FipaDialogue, FipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.fipa.message import logger as fipa_message_logger + from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_protocols/test_gym.py b/tests/test_packages/test_protocols/test_gym.py index 2189e884b1..330e9a7833 100644 --- a/tests/test_packages/test_protocols/test_gym.py +++ b/tests/test_packages/test_protocols/test_gym.py @@ -36,6 +36,7 @@ from packages.fetchai.protocols.gym.dialogues import GymDialogue, GymDialogues from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.protocols.gym.message import logger as gym_message_logger + from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_http.py b/tests/test_packages/test_protocols/test_http.py index ccd682fbd3..0d7d8d9833 100644 --- a/tests/test_packages/test_protocols/test_http.py +++ b/tests/test_packages/test_protocols/test_http.py @@ -36,6 +36,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogue, HttpDialogues from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.protocols.http.message import logger as http_message_logger + from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_ledger_api.py b/tests/test_packages/test_protocols/test_ledger_api.py index ab4b545fb8..01b64fce26 100644 --- a/tests/test_packages/test_protocols/test_ledger_api.py +++ b/tests/test_packages/test_protocols/test_ledger_api.py @@ -41,6 +41,7 @@ from packages.fetchai.protocols.ledger_api.message import ( logger as ledger_api_message_logger, ) + from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_ml_trade.py b/tests/test_packages/test_protocols/test_ml_trade.py index 51e1c309d9..3377373631 100644 --- a/tests/test_packages/test_protocols/test_ml_trade.py +++ b/tests/test_packages/test_protocols/test_ml_trade.py @@ -43,6 +43,7 @@ from packages.fetchai.protocols.ml_trade.message import ( logger as ml_trade_message_logger, ) + from tests.conftest import ROOT_DIR logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_protocols/test_oef_search.py b/tests/test_packages/test_protocols/test_oef_search.py index 5efd5a8735..11fd064554 100644 --- a/tests/test_packages/test_protocols/test_oef_search.py +++ b/tests/test_packages/test_protocols/test_oef_search.py @@ -42,6 +42,7 @@ from packages.fetchai.protocols.oef_search.message import ( logger as oef_search_message_logger, ) + from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_tac.py b/tests/test_packages/test_protocols/test_tac.py index ea4cfa7809..2ea87db305 100644 --- a/tests/test_packages/test_protocols/test_tac.py +++ b/tests/test_packages/test_protocols/test_tac.py @@ -36,6 +36,7 @@ from packages.fetchai.protocols.tac.dialogues import TacDialogue, TacDialogues from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.protocols.tac.message import logger as tac_message_logger + from tests.conftest import ROOT_DIR sys.path.append(ROOT_DIR) diff --git a/tests/test_skills/test_error.py b/tests/test_skills/test_error.py index f8e3d4c2ad..813a78e4ca 100644 --- a/tests/test_skills/test_error.py +++ b/tests/test_skills/test_error.py @@ -37,6 +37,7 @@ from aea.skills.error.handlers import ErrorHandler from packages.fetchai.protocols.fipa.message import FipaMessage + from tests.common.utils import wait_for_condition from tests.conftest import CUR_PATH, _make_dummy_connection From dba7e92c5891f49aa2c78be3ef1748d3cfc38884 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 10:52:25 +0200 Subject: [PATCH 025/131] add isort:skip to import comment --- scripts/acn/run_acn_node_standalone.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/acn/run_acn_node_standalone.py b/scripts/acn/run_acn_node_standalone.py index f9e55f63e7..5ab3e59de2 100644 --- a/scripts/acn/run_acn_node_standalone.py +++ b/scripts/acn/run_acn_node_standalone.py @@ -24,12 +24,11 @@ from binascii import unhexlify from typing import Dict, List, Optional +# following imports needed only if checks are enabled # isort:skip from base58 import b58decode from ecdsa import SigningKey, curves from multihash import decode as multihashdecode # type: ignore -# following imports needed only if checks are enabled - class AcnNodeConfig: """Store the configuration of an acn node as a dictionary.""" From 7c1aec4df26021b3c3b529a58b3506cc6085f3d7 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 12:40:09 +0200 Subject: [PATCH 026/131] fix tests for 'aea fetch' due to version 'latest' changes --- tests/test_cli/test_fetch.py | 11 +++++++---- tests/test_configurations/test_base.py | 9 +++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/test_cli/test_fetch.py b/tests/test_cli/test_fetch.py index 2f6781d5ce..a9a5af2e7f 100644 --- a/tests/test_cli/test_fetch.py +++ b/tests/test_cli/test_fetch.py @@ -27,6 +27,7 @@ from aea.cli import cli from aea.cli.fetch import _is_version_correct, fetch_agent_locally +from aea.configurations.base import PackageVersion from aea.test_tools.test_cases import AEATestCaseMany from tests.conftest import CLI_LOG_OPTION, CliRunner, MAX_FLAKY_RERUNS @@ -127,17 +128,19 @@ class IsVersionCorrectTestCase(TestCase): def test__is_version_correct_positive(self): """Test for _is_version_correct method positive result.""" - ctx_mock = ContextMock(version="correct") + package_version = PackageVersion("0.1.0") + ctx_mock = ContextMock(version=str(package_version)) public_id_mock = PublicIdMock() - public_id_mock.version = "correct" + public_id_mock.package_version = package_version result = _is_version_correct(ctx_mock, public_id_mock) self.assertTrue(result) def test__is_version_correct_negative(self): """Test for _is_version_correct method negative result.""" - ctx_mock = ContextMock(version="correct") + package_version = PackageVersion("0.1.0") + ctx_mock = ContextMock(version="0.1.1") public_id_mock = PublicIdMock() - public_id_mock.version = "incorrect" + public_id_mock.package_version = package_version result = _is_version_correct(ctx_mock, public_id_mock) self.assertFalse(result) diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index 6da2b38d32..90d27cefa2 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -436,12 +436,21 @@ def test_public_id_from_string(): def test_public_id_from_string_without_version_string(): + """Test parsing the public id without version string.""" public_id = PublicId.from_str("author/package") assert public_id.author == "author" assert public_id.name == "package" assert public_id.version == "latest" +def test_public_id_from_string_with_version_string_latest(): + """Test parsing the public id with version string 'latest'.""" + public_id = PublicId.from_str("author/package:latest") + assert public_id.author == "author" + assert public_id.name == "package" + assert public_id.version == "latest" + + def test_public_id_from_uri_path(): """Test PublicId.from_uri_path""" result = PublicId.from_uri_path("author/package_name/0.1.0") From adb263be4b9e4a40947576577e513ca6ecbec062 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Mon, 21 Sep 2020 11:50:27 +0100 Subject: [PATCH 027/131] part 2 of conversion to message based tac control contract skill --- .../fetchai/skills/erc1155_deploy/handlers.py | 7 +- .../fetchai/skills/tac_control/behaviours.py | 7 +- packages/fetchai/skills/tac_control/game.py | 19 + .../fetchai/skills/tac_control/parameters.py | 27 +- .../skills/tac_control_contract/README.md | 7 +- .../skills/tac_control_contract/behaviours.py | 133 +----- .../skills/tac_control_contract/dialogues.py | 256 +++++++++++ .../skills/tac_control_contract/game.py | 139 +----- .../skills/tac_control_contract/handlers.py | 435 ++++++++++++++++-- .../skills/tac_control_contract/parameters.py | 143 +++++- .../skills/tac_control_contract/skill.yaml | 28 +- 11 files changed, 884 insertions(+), 317 deletions(-) diff --git a/packages/fetchai/skills/erc1155_deploy/handlers.py b/packages/fetchai/skills/erc1155_deploy/handlers.py index fd9f0a7168..2caf6908fc 100644 --- a/packages/fetchai/skills/erc1155_deploy/handlers.py +++ b/packages/fetchai/skills/erc1155_deploy/handlers.py @@ -22,7 +22,7 @@ from typing import Optional, cast from aea.configurations.base import ProtocolId -from aea.crypto.ethereum import EthereumHelper +from aea.crypto.ledger_apis import LedgerApis from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage @@ -329,8 +329,9 @@ def _handle_transaction_receipt(self, ledger_api_msg: LedgerApiMessage) -> None: :param ledger_api_message: the ledger api message """ - is_transaction_successful = EthereumHelper.is_transaction_settled( - ledger_api_msg.transaction_receipt.receipt + is_transaction_successful = LedgerApis.is_transaction_settled( + ledger_api_msg.transaction_receipt.ledger_id, + ledger_api_msg.transaction_receipt.receipt, ) if is_transaction_successful: self.context.logger.info( diff --git a/packages/fetchai/skills/tac_control/behaviours.py b/packages/fetchai/skills/tac_control/behaviours.py index 658d9e41fd..6b79c0f094 100644 --- a/packages/fetchai/skills/tac_control/behaviours.py +++ b/packages/fetchai/skills/tac_control/behaviours.py @@ -193,6 +193,11 @@ def _start_tac(self, game: Game): if last_msg is None: raise ValueError("Error when retrieving last message.") agent_state = game.current_agent_states[agent_address] + info = ( + {"contract_address": game.conf.contract_address} + if game.conf.has_contract_address + else {} + ) tac_msg = tac_dialogue.reply( performative=TacMessage.Performative.GAME_DATA, target_message=last_msg, @@ -205,7 +210,7 @@ def _start_tac(self, game: Game): agent_addr_to_name=game.conf.agent_addr_to_name, good_id_to_name=game.conf.good_id_to_name, version_id=game.conf.version_id, - info={"contract_address": game.conf.contract_address}, + info=info, ) self.context.outbox.put_message(message=tac_msg) self.context.logger.debug( diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index d3624c88d0..b49d8432f2 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -111,6 +111,7 @@ def __init__( self._agent_addr_to_name = agent_addr_to_name self._currency_id_to_name = currency_id_to_name self._good_id_to_name = good_id_to_name + self._contract_address = None # type: Optional[str] self._check_consistency() @property @@ -138,6 +139,24 @@ def good_id_to_name(self) -> Dict[str, str]: """Map good ids to names.""" return self._good_id_to_name + @property + def has_contract_address(self) -> bool: + """Check if contract address is present.""" + return self._contract_address is not None + + @property + def contract_address(self) -> str: + """Get the contract address for the game.""" + if self._contract_address is None: + raise AEAEnforceError("Contract_address not set yet!") + return self._contract_address + + @contract_address.setter + def contract_address(self, contract_address: str) -> None: + """Set the contract address for the game.""" + enforce(self._contract_address is None, "Contract_address already set!") + self._contract_address = contract_address + def _check_consistency(self): """ Check the consistency of the game configuration. diff --git a/packages/fetchai/skills/tac_control/parameters.py b/packages/fetchai/skills/tac_control/parameters.py index a93b1b2ab1..a5da9ae09a 100644 --- a/packages/fetchai/skills/tac_control/parameters.py +++ b/packages/fetchai/skills/tac_control/parameters.py @@ -23,12 +23,13 @@ from typing import Dict, List, Optional, Set from aea.exceptions import AEAEnforceError, enforce -from aea.helpers.search.models import ( - Location, -) +from aea.helpers.search.models import Location from aea.skills.base import Model -from packages.fetchai.skills.tac_control.helpers import generate_currency_id_to_name, generate_good_id_to_name +from packages.fetchai.skills.tac_control.helpers import ( + generate_currency_id_to_name, + generate_good_id_to_name, +) DEFAULT_LEDGER_ID = "ethereum" DEFAULT_MIN_NB_AGENTS = 2 @@ -52,7 +53,7 @@ class Parameters(Model): """This class contains the parameters of the game.""" def __init__(self, **kwargs): - """Instantiate the search class.""" + """Instantiate the parameter class.""" self._ledger_id = kwargs.pop("ledger_id", DEFAULT_LEDGER_ID) self._contract_address = kwargs.pop( "contract_adress", None @@ -155,6 +156,13 @@ def contract_address(self) -> str: raise AEAEnforceError("No contract address provided.") return self._contract_address + @contract_address.setter + def contract_address(self, contract_address: str) -> None: + """Set contract address of an already deployed smart-contract.""" + if self._contract_address is not None: + raise AEAEnforceError("Contract address already provided.") + self._contract_address = contract_address + @property def is_contract_deployed(self) -> bool: """Check if there is a deployed instance of the contract.""" @@ -282,10 +290,11 @@ def simple_service_data(self) -> Dict[str, str]: def _check_consistency(self) -> None: """Check the parameters are consistent.""" if self._contract_address is not None and ( - self._good_ids is not None - or self._currency_ids is not None - or len(self._good_ids) != self._nb_goods - or len(self._currency_ids) != self._nb_currencies + (self._good_ids is not None and len(self._good_ids) != self._nb_goods) + or ( + self._currency_ids is not None + and len(self._currency_ids) != self._nb_currencies + ) ): raise ValueError( "If the contract address is set, then good ids and currency id must be provided and consistent." diff --git a/packages/fetchai/skills/tac_control_contract/README.md b/packages/fetchai/skills/tac_control_contract/README.md index 7032d335ee..47fdb3903a 100644 --- a/packages/fetchai/skills/tac_control_contract/README.md +++ b/packages/fetchai/skills/tac_control_contract/README.md @@ -8,14 +8,15 @@ This skill is part of the Fetch.ai TAC demo. It manages the smart contract (cont ## Behaviours -* contract: manages the contract (deploying the contract, creating tokens, minting tokens) * tac: deploys smart contract, manages progression of the competition ## Handlers -* tac: handles TAC messages for registering/unregistering agents in the TAC +* contract_api: handles contract_api messages for interaction with contract +* ledger_api: handles ledger_api messages for interaction with ledger * oef: handles oef_search messages if (un)registration on SOEF is unsuccessful -* transaction: handles signing messages for communication with the ledger +* signing: handles signing messages for interaction with decision maker +* tac: handles TAC messages for registering/unregistering agents in the TAC ## Links diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 702a2ef1a9..7b2b87104c 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -22,31 +22,24 @@ import datetime from typing import List, cast -from aea.skills.behaviours import TickerBehaviour - from packages.fetchai.protocols.contract_api.message import ContractApiMessage -from packages.fetchai.skills.tac_control.behaviours import TacBehaviour +from packages.fetchai.skills.tac_control.behaviours import ( + TacBehaviour as BaseTacBehaviour, +) from packages.fetchai.skills.tac_control_contract.dialogues import ( ContractApiDialogue, ContractApiDialogues, ) from packages.fetchai.skills.tac_control_contract.game import ( - Configuration, Game, Phase, ) -from packages.fetchai.skills.tac_control_contract.helpers import ( - generate_currency_id_to_name, - generate_currency_ids, - generate_good_id_to_name, - generate_good_ids, -) from packages.fetchai.skills.tac_control_contract.parameters import Parameters -LEDGER_API_ADDRESS = "///" +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" -class TacBehaviour(TacBehaviour): +class TacBehaviour(BaseTacBehaviour): """This class implements the TAC control behaviour.""" def setup(self) -> None: @@ -81,7 +74,7 @@ def _request_contract_deploy_transaction(self) -> None: ), ) contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue,) - contract_api_dialogue.terms = strategy.get_deploy_terms() + contract_api_dialogue.terms = parameters.get_deploy_terms() self.context.outbox.put_message(message=contract_api_msg) self.context.logger.info("requesting contract deployment transaction...") @@ -101,7 +94,7 @@ def act(self) -> None: < parameters.registration_end_time ): game.phase = Phase.GAME_REGISTRATION - self._register_tac(parameters) + self._register_tac() self.context.logger.info( "TAC open for registration until: {}".format(parameters.start_time) ) @@ -144,14 +137,6 @@ def act(self) -> None: self._cancel_tac(game) self.context.is_active = False - def teardown(self) -> None: - """ - Implement the task teardown. - - :return: None - """ - super().teardown() - def _request_create_items_transaction(self, game: Game) -> None: """ Request token create transaction @@ -176,7 +161,7 @@ def _request_create_items_transaction(self, game: Game) -> None: ), ) contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue) - contract_api_dialogue.terms = strategy.get_create_items_terms() + contract_api_dialogue.terms = parameters.get_create_token_terms() self.context.outbox.put_message(message=contract_api_msg) self.context.logger.info("requesting create items transaction...") @@ -217,105 +202,5 @@ def _request_mint_items_transaction(self, game: Game) -> None: ), ) contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue) - contract_api_dialogue.terms = strategy.get_mint_token_terms() + contract_api_dialogue.terms = parameters.get_mint_token_terms() self.context.outbox.put_message(message=contract_api_msg) - - -class ContractBehaviour(TickerBehaviour): - """This class implements the TAC control behaviour.""" - - def act(self) -> None: - """ - Implement the act. - - :return: None - """ - game = cast(Game, self.context.game) - parameters = cast(Parameters, self.context.parameters) - ledger_api = self.context.ledger_apis.get_api(parameters.ledger) - if game.phase.value == Phase.CONTRACT_DEPLOYING.value: - tx_receipt = ledger_api.get_transaction_receipt( - tx_digest=game.contract_manager.deploy_tx_digest - ) - if tx_receipt is None: - self.context.logger.info( - "cannot verify whether contract deployment was successful. Retrying..." - ) - elif tx_receipt.status != 1: - self.context.is_active = False - self.context.warning( - "the contract did not deployed successfully. Transaction hash: {}. Aborting!".format( - tx_receipt.transactionHash.hex() - ) - ) - else: - self.context.logger.info( - "the contract was successfully deployed. Contract address: {}. Transaction hash: {}".format( - tx_receipt.contractAddress, tx_receipt.transactionHash.hex(), - ) - ) - configuration = Configuration(parameters.version_id, parameters.tx_fee,) - currency_ids = generate_currency_ids(parameters.nb_currencies) - configuration.currency_id_to_name = generate_currency_id_to_name( - currency_ids - ) - good_ids = generate_good_ids(parameters.nb_goods) - configuration.good_id_to_name = generate_good_id_to_name(good_ids) - configuration.contract_address = tx_receipt.contractAddress - game.conf = configuration - game.phase = Phase.CONTRACT_DEPLOYED - elif game.phase.value == Phase.TOKENS_CREATING.value: - tx_receipt = ledger_api.get_transaction_receipt( - tx_digest=game.contract_manager.create_tokens_tx_digest - ) - if tx_receipt is None: - self.context.logger.info( - "cannot verify whether token creation was successful. Retrying..." - ) - elif tx_receipt.status != 1: - self.context.is_active = False - self.context.warning( - "the token creation wasn't successful. Transaction hash: {}. Aborting!".format( - tx_receipt.transactionHash.hex() - ) - ) - else: - self.context.logger.info( - "successfully created the tokens. Transaction hash: {}".format( - tx_receipt.transactionHash.hex() - ) - ) - game.phase = Phase.TOKENS_CREATED - elif game.phase.value == Phase.TOKENS_MINTING.value: - for ( - agent_addr, - tx_digest, - ) in game.contract_manager.mint_tokens_tx_digests.items(): - if agent_addr in game.contract_manager.confirmed_mint_tokens_agents: - continue - tx_receipt = ledger_api.get_transaction_receipt(tx_digest=tx_digest) - if tx_receipt is None: - self.context.logger.info( - "cannot verify whether token minting for agent_addr={} was successful. Retrying...".format( - agent_addr - ) - ) - elif tx_receipt.status != 1: - self.context.is_active = False - self.context.logger.warning( - "the token minting for agent_addr={} wasn't successful. Transaction hash: {}. Aborting!".format( - agent_addr, tx_receipt.transactionHash.hex(), - ) - ) - else: - self.context.logger.info( - "successfully minted the tokens for agent_addr={}. Transaction hash: {}".format( - agent_addr, tx_receipt.transactionHash.hex(), - ) - ) - game.contract_manager.add_confirmed_mint_tokens_agents(agent_addr) - if len(game.contract_manager.confirmed_mint_tokens_agents) == len( - game.initial_agent_states - ): - self.context.logger.info("All tokens minted!") - game.phase = Phase.TOKENS_MINTED diff --git a/packages/fetchai/skills/tac_control_contract/dialogues.py b/packages/fetchai/skills/tac_control_contract/dialogues.py index 2f15292e02..77718207a2 100644 --- a/packages/fetchai/skills/tac_control_contract/dialogues.py +++ b/packages/fetchai/skills/tac_control_contract/dialogues.py @@ -28,6 +28,33 @@ - TacDialogues: The dialogues class keeps track of all dialogues of type tac. """ +from typing import Optional, Type + +from aea.common import Address +from aea.exceptions import enforce +from aea.helpers.transaction.base import Terms +from aea.protocols.base import Message +from aea.protocols.dialogue.base import Dialogue as BaseDialogue +from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel +from aea.protocols.signing.dialogues import SigningDialogue as BaseSigningDialogue +from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues +from aea.protocols.signing.message import SigningMessage +from aea.skills.base import Model + +from packages.fetchai.protocols.contract_api.dialogues import ( + ContractApiDialogue as BaseContractApiDialogue, +) +from packages.fetchai.protocols.contract_api.dialogues import ( + ContractApiDialogues as BaseContractApiDialogues, +) +from packages.fetchai.protocols.contract_api.message import ContractApiMessage +from packages.fetchai.protocols.ledger_api.dialogues import ( + LedgerApiDialogue as BaseLedgerApiDialogue, +) +from packages.fetchai.protocols.ledger_api.dialogues import ( + LedgerApiDialogues as BaseLedgerApiDialogues, +) +from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.skills.tac_control.dialogues import ( DefaultDialogue as BaseDefaultDialogue, ) @@ -57,3 +84,232 @@ TacDialogue = BaseTacDialogue TacDialogues = BaseTacDialogues + + +class ContractApiDialogue(BaseContractApiDialogue): + """The dialogue class maintains state of a dialogue and manages it.""" + + def __init__( + self, + dialogue_label: BaseDialogueLabel, + self_address: Address, + role: BaseDialogue.Role, + message_class: Type[ContractApiMessage] = ContractApiMessage, + ) -> None: + """ + Initialize a dialogue. + + :param dialogue_label: the identifier of the dialogue + :param self_address: the address of the entity for whom this dialogue is maintained + :param role: the role of the agent this dialogue is maintained for + + :return: None + """ + BaseContractApiDialogue.__init__( + self, + dialogue_label=dialogue_label, + self_address=self_address, + role=role, + message_class=message_class, + ) + self._terms = None # type: Optional[Terms] + + @property + def terms(self) -> Terms: + """Get the terms.""" + if self._terms is None: + raise ValueError("Terms not set!") + return self._terms + + @terms.setter + def terms(self, terms: Terms) -> None: + """Set the terms.""" + enforce(self._terms is None, "Terms already set!") + self._terms = terms + + +class ContractApiDialogues(Model, BaseContractApiDialogues): + """The dialogues class keeps track of all dialogues.""" + + def __init__(self, **kwargs) -> None: + """ + Initialize dialogues. + + :return: None + """ + Model.__init__(self, **kwargs) + + def role_from_first_message( # pylint: disable=unused-argument + message: Message, receiver_address: Address + ) -> BaseDialogue.Role: + """Infer the role of the agent from an incoming/outgoing first message + + :param message: an incoming/outgoing first message + :param receiver_address: the address of the receiving agent + :return: The role of the agent + """ + return ContractApiDialogue.Role.AGENT + + BaseContractApiDialogues.__init__( + self, + self_address=self.context.agent_address, + role_from_first_message=role_from_first_message, + dialogue_class=ContractApiDialogue, + ) + + +class SigningDialogue(BaseSigningDialogue): + """The dialogue class maintains state of a dialogue and manages it.""" + + def __init__( + self, + dialogue_label: BaseDialogueLabel, + self_address: Address, + role: BaseDialogue.Role, + message_class: Type[SigningMessage] = SigningMessage, + ) -> None: + """ + Initialize a dialogue. + + :param dialogue_label: the identifier of the dialogue + :param self_address: the address of the entity for whom this dialogue is maintained + :param role: the role of the agent this dialogue is maintained for + + :return: None + """ + BaseSigningDialogue.__init__( + self, + dialogue_label=dialogue_label, + self_address=self_address, + role=role, + message_class=message_class, + ) + self._associated_contract_api_dialogue = ( + None + ) # type: Optional[ContractApiDialogue] + + @property + def associated_contract_api_dialogue(self) -> ContractApiDialogue: + """Get the associated contract api dialogue.""" + if self._associated_contract_api_dialogue is None: + raise ValueError("Associated contract api dialogue not set!") + return self._associated_contract_api_dialogue + + @associated_contract_api_dialogue.setter + def associated_contract_api_dialogue( + self, associated_contract_api_dialogue: ContractApiDialogue + ) -> None: + """Set the associated contract api dialogue.""" + enforce( + self._associated_contract_api_dialogue is None, + "Associated contract api dialogue already set!", + ) + self._associated_contract_api_dialogue = associated_contract_api_dialogue + + +class SigningDialogues(Model, BaseSigningDialogues): + """This class keeps track of all oef_search dialogues.""" + + def __init__(self, **kwargs) -> None: + """ + Initialize dialogues. + + :param agent_address: the address of the agent for whom dialogues are maintained + :return: None + """ + Model.__init__(self, **kwargs) + + def role_from_first_message( # pylint: disable=unused-argument + message: Message, receiver_address: Address + ) -> BaseDialogue.Role: + """Infer the role of the agent from an incoming/outgoing first message + + :param message: an incoming/outgoing first message + :param receiver_address: the address of the receiving agent + :return: The role of the agent + """ + return BaseSigningDialogue.Role.SKILL + + BaseSigningDialogues.__init__( + self, + self_address=str(self.skill_id), + role_from_first_message=role_from_first_message, + dialogue_class=SigningDialogue, + ) + + +class LedgerApiDialogue(BaseLedgerApiDialogue): + """The dialogue class maintains state of a dialogue and manages it.""" + + def __init__( + self, + dialogue_label: BaseDialogueLabel, + self_address: Address, + role: BaseDialogue.Role, + message_class: Type[LedgerApiMessage] = LedgerApiMessage, + ) -> None: + """ + Initialize a dialogue. + + :param dialogue_label: the identifier of the dialogue + :param self_address: the address of the entity for whom this dialogue is maintained + :param role: the role of the agent this dialogue is maintained for + + :return: None + """ + BaseLedgerApiDialogue.__init__( + self, + dialogue_label=dialogue_label, + self_address=self_address, + role=role, + message_class=message_class, + ) + self._associated_signing_dialogue = None # type: Optional[SigningDialogue] + + @property + def associated_signing_dialogue(self) -> "SigningDialogue": + """Get the associated signing dialogue.""" + if self._associated_signing_dialogue is None: + raise ValueError("Associated signing dialogue not set!") + return self._associated_signing_dialogue + + @associated_signing_dialogue.setter + def associated_signing_dialogue( + self, associated_signing_dialogue: "SigningDialogue" + ) -> None: + """Set the associated signing dialogue.""" + enforce( + self._associated_signing_dialogue is None, + "Associated signing dialogue already set!", + ) + self._associated_signing_dialogue = associated_signing_dialogue + + +class LedgerApiDialogues(Model, BaseLedgerApiDialogues): + """The dialogues class keeps track of all dialogues.""" + + def __init__(self, **kwargs) -> None: + """ + Initialize dialogues. + + :return: None + """ + Model.__init__(self, **kwargs) + + def role_from_first_message( # pylint: disable=unused-argument + message: Message, receiver_address: Address + ) -> BaseDialogue.Role: + """Infer the role of the agent from an incoming/outgoing first message + + :param message: an incoming/outgoing first message + :param receiver_address: the address of the receiving agent + :return: The role of the agent + """ + return BaseLedgerApiDialogue.Role.AGENT + + BaseLedgerApiDialogues.__init__( + self, + self_address=self.context.agent_address, + role_from_first_message=role_from_first_message, + dialogue_class=LedgerApiDialogue, + ) diff --git a/packages/fetchai/skills/tac_control_contract/game.py b/packages/fetchai/skills/tac_control_contract/game.py index 23baa86044..8d315b3dfd 100644 --- a/packages/fetchai/skills/tac_control_contract/game.py +++ b/packages/fetchai/skills/tac_control_contract/game.py @@ -19,11 +19,6 @@ """This package contains a class representing the game.""" -from typing import Dict, List, Optional - -from aea.common import Address -from aea.exceptions import AEAEnforceError, enforce - from packages.fetchai.skills.tac_control.game import AgentState as BaseAgentState from packages.fetchai.skills.tac_control.game import Configuration as BaseConfiguration from packages.fetchai.skills.tac_control.game import Game as BaseGame @@ -36,143 +31,25 @@ from packages.fetchai.skills.tac_control.game import Transactions as BaseTransactions -Phase = BasePhase +AgentState = BaseAgentState -class Configuration(BaseConfiguration): - """Class containing the configuration of the game.""" - - def __init__( - self, - version_id: str, - tx_fee: int, - agent_addr_to_name: Dict[Address, str], - currency_id_to_name: Dict[str, str], - good_id_to_name: Dict[str, str], - ): - """ - Instantiate a game configuration. - - :param version_id: the version of the game. - :param tx_fee: the fee for a transaction. - :param agent_addr_to_name: a dictionary mapping agent addresses to agent names (as strings). - :param nb_goods: the number of goods. - """ - super().__init__(version_id, tx_fee, agent_addr_to_name, currency_id_to_name, good_id_to_name) - self._contract_address = None # type: Optional[str] - - @property - def contract_address(self) -> str: - """Get the contract address for the game.""" - if self._contract_address is None: - raise AEAEnforceError("Contract_address not set yet!") - return self._contract_address - - @contract_address.setter - def contract_address(self, contract_address: str) -> None: - """Set the contract address for the game.""" - enforce(self._contract_address is None, "Contract_address already set!") - self._contract_address = contract_address +Configuration = BaseConfiguration -Initialization = BaseInitialization +Game = BaseGame -Transaction = BaseTransaction +Initialization = BaseInitialization -AgentState = BaseAgentState +Phase = BasePhase -Transactions = BaseTransactions +Registration = BaseRegistration -Registration = BaseRegistration +Transaction = BaseTransaction -class ContractManager: - """Class managing the contract.""" - - def __init__(self): - """Instantiate the contract manager class.""" - self._deploy_tx_digest = None # type: Optional[str] - self._create_tokens_tx_digest = None # type: Optional[str] - self._mint_tokens_tx_digests = {} # type: Dict[str, str] - self._confirmed_mint_tokens_agents = [] # type: List[str, str] - - @property - def deploy_tx_digest(self) -> str: - """Get the contract deployment tx digest.""" - if self._deploy_tx_digest is None: - raise AEAEnforceError("Deploy_tx_digest is not set yet!") - return self._deploy_tx_digest - - @deploy_tx_digest.setter - def deploy_tx_digest(self, deploy_tx_digest: str) -> None: - """Set the contract deployment tx digest.""" - enforce(self._deploy_tx_digest is None, "Deploy_tx_digest already set!") - self._deploy_tx_digest = deploy_tx_digest - - @property - def create_tokens_tx_digest(self) -> str: - """Get the contract deployment tx digest.""" - if self._create_tokens_tx_digest is None: - raise AEAEnforceError("Create_tokens_tx_digest is not set yet!") - return self._create_tokens_tx_digest - - @create_tokens_tx_digest.setter - def create_tokens_tx_digest(self, create_tokens_tx_digest: str) -> None: - """Set the contract deployment tx digest.""" - enforce( - self._create_tokens_tx_digest is None, - "Create_tokens_tx_digest already set!", - ) - self._create_tokens_tx_digest = create_tokens_tx_digest - - @property - def mint_tokens_tx_digests(self) -> Dict[str, str]: - """Get the mint tokens tx digests.""" - return self._mint_tokens_tx_digests - - def set_mint_tokens_tx_digest(self, agent_addr: str, tx_digest: str) -> None: - """ - Set a mint token tx digest for an agent. - - :param agent_addr: the agent addresss - :param tx_digest: the transaction digest - """ - enforce( - agent_addr not in self._mint_tokens_tx_digests, "Tx digest already set." - ) - self._mint_tokens_tx_digests[agent_addr] = tx_digest - - @property - def confirmed_mint_tokens_agents(self) -> List[str]: - """Get the agents which are confirmed to have minted tokens on chain.""" - return self._confirmed_mint_tokens_agents - - def add_confirmed_mint_tokens_agents(self, agent_addr: str) -> None: - """ - Set agent addresses whose tokens have been minted. - - :param agent_addr: the agent address - """ - enforce( - agent_addr not in self.confirmed_mint_tokens_agents, - "Agent already in list.", - ) - self._confirmed_mint_tokens_agents.append(agent_addr) - - -class Game(BaseGame): - """A class to manage a TAC instance.""" - - def __init__(self, **kwargs): - """Instantiate the search class.""" - super().__init__(**kwargs) - self._contract_manager = ContractManager() - - @property - def contract_manager(self) -> ContractManager: - """Get the contract manager.""" - return self._contract_manager +Transactions = BaseTransactions diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index 37ded8d678..304445a5e3 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -19,8 +19,10 @@ """This package contains the handlers.""" -from typing import cast +from typing import Optional, cast +from aea.configurations.base import ProtocolId +from aea.crypto.ledger_apis import LedgerApis from aea.protocols.base import Message from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler @@ -29,9 +31,20 @@ OefSearchHandler as BaseOefSearchHandler, ) from packages.fetchai.skills.tac_control.handlers import TacHandler as BaseTacHandler -from packages.fetchai.skills.tac_control_contract.game import Game, Phase +from packages.fetchai.skills.tac_control_contract.dialogues import ( + ContractApiDialogue, + ContractApiDialogues, + ContractApiMessage, + LedgerApiDialogue, + LedgerApiDialogues, + LedgerApiMessage, + SigningDialogue, + SigningDialogues, +) from packages.fetchai.skills.tac_control_contract.parameters import Parameters +LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" + TacHandler = BaseTacHandler @@ -39,10 +52,134 @@ OefSearchHandler = BaseOefSearchHandler +class ContractApiHandler(Handler): + """Implement the contract api handler.""" + + SUPPORTED_PROTOCOL = ContractApiMessage.protocol_id # type: Optional[ProtocolId] + + def setup(self) -> None: + """Implement the setup for the handler.""" + pass + + def handle(self, message: Message) -> None: + """ + Implement the reaction to a message. + + :param message: the message + :return: None + """ + contract_api_msg = cast(ContractApiMessage, message) + + # recover dialogue + contract_api_dialogues = cast( + ContractApiDialogues, self.context.contract_api_dialogues + ) + contract_api_dialogue = cast( + Optional[ContractApiDialogue], + contract_api_dialogues.update(contract_api_msg), + ) + if contract_api_dialogue is None: + self._handle_unidentified_dialogue(contract_api_msg) + return + + # handle message + if ( + contract_api_msg.performative + is ContractApiMessage.Performative.RAW_TRANSACTION + ): + self._handle_raw_transaction(contract_api_msg, contract_api_dialogue) + elif contract_api_msg.performative == ContractApiMessage.Performative.ERROR: + self._handle_error(contract_api_msg, contract_api_dialogue) + else: + self._handle_invalid(contract_api_msg, contract_api_dialogue) + + def teardown(self) -> None: + """ + Implement the handler teardown. + + :return: None + """ + pass + + def _handle_unidentified_dialogue( + self, contract_api_msg: ContractApiMessage + ) -> None: + """ + Handle an unidentified dialogue. + + :param msg: the message + """ + self.context.logger.info( + "received invalid contract_api message={}, unidentified dialogue.".format( + contract_api_msg + ) + ) + + def _handle_raw_transaction( + self, + contract_api_msg: ContractApiMessage, + contract_api_dialogue: ContractApiDialogue, + ) -> None: + """ + Handle a message of raw_transaction performative. + + :param contract_api_message: the ledger api message + :param contract_api_dialogue: the ledger api dialogue + """ + self.context.logger.info("received raw transaction={}".format(contract_api_msg)) + signing_dialogues = cast(SigningDialogues, self.context.signing_dialogues) + signing_msg, signing_dialogue = signing_dialogues.create( + counterparty=self.context.decision_maker_address, + performative=SigningMessage.Performative.SIGN_TRANSACTION, + raw_transaction=contract_api_msg.raw_transaction, + terms=contract_api_dialogue.terms, + ) + signing_dialogue = cast(SigningDialogue, signing_dialogue) + signing_dialogue.associated_contract_api_dialogue = contract_api_dialogue + self.context.decision_maker_message_queue.put_nowait(signing_msg) + self.context.logger.info( + "proposing the transaction to the decision maker. Waiting for confirmation ..." + ) + + def _handle_error( + self, + contract_api_msg: ContractApiMessage, + contract_api_dialogue: ContractApiDialogue, + ) -> None: + """ + Handle a message of error performative. + + :param contract_api_message: the ledger api message + :param contract_api_dialogue: the ledger api dialogue + """ + self.context.logger.info( + "received ledger_api error message={} in dialogue={}.".format( + contract_api_msg, contract_api_dialogue + ) + ) + + def _handle_invalid( + self, + contract_api_msg: ContractApiMessage, + contract_api_dialogue: ContractApiDialogue, + ) -> None: + """ + Handle a message of invalid performative. + + :param contract_api_message: the ledger api message + :param contract_api_dialogue: the ledger api dialogue + """ + self.context.logger.warning( + "cannot handle contract_api message of performative={} in dialogue={}.".format( + contract_api_msg.performative, contract_api_dialogue, + ) + ) + + class SigningHandler(Handler): """Implement the transaction handler.""" - SUPPORTED_PROTOCOL = SigningMessage.protocol_id + SUPPORTED_PROTOCOL = SigningMessage.protocol_id # type: Optional[ProtocolId] def setup(self) -> None: """Implement the setup for the handler.""" @@ -55,41 +192,24 @@ def handle(self, message: Message) -> None: :param message: the message :return: None """ - signing_msg_response = cast(SigningMessage, message) - game = cast(Game, self.context.game) - parameters = cast(Parameters, self.context.parameters) - ledger_api = self.context.ledger_apis.get_api(parameters.ledger) - if signing_msg_response.dialogue_reference[0] == "contract_deploy": - game.phase = Phase.CONTRACT_DEPLOYING - self.context.logger.info("sending deployment transaction to the ledger...") - tx_signed = signing_msg_response.signed_transaction - tx_digest = ledger_api.send_signed_transaction(tx_signed=tx_signed) - if tx_digest is None: - self.context.logger.warning("sending transaction failed. Aborting!") - self.context.is_active = False - else: - game.contract_manager.deploy_tx_digest = tx_digest - elif signing_msg_response.dialogue_reference[0] == "contract_create_batch": - game.phase = Phase.TOKENS_CREATING - self.context.logger.info("sending creation transaction to the ledger...") - tx_signed = signing_msg_response.signed_transaction - tx_digest = ledger_api.send_signed_transaction(tx_signed=tx_signed) - if tx_digest is None: - self.context.logger.warning("sending transaction failed. Aborting!") - self.context.is_active = False - else: - game.contract_manager.create_tokens_tx_digest = tx_digest - elif signing_msg_response.dialogue_reference[0] == "contract_mint_batch": - game.phase = Phase.TOKENS_MINTING - self.context.logger.info("sending minting transaction to the ledger...") - tx_signed = signing_msg_response.signed_transaction - agent_addr = signing_msg_response.terms.counterparty_address - tx_digest = ledger_api.send_signed_transaction(tx_signed=tx_signed) - if tx_digest is None: - self.context.logger.warning("sending transaction failed. Aborting!") - self.context.is_active = False - else: - game.contract_manager.set_mint_tokens_tx_digest(agent_addr, tx_digest) + signing_msg = cast(SigningMessage, message) + + # recover dialogue + signing_dialogues = cast(SigningDialogues, self.context.signing_dialogues) + signing_dialogue = cast( + Optional[SigningDialogue], signing_dialogues.update(signing_msg) + ) + if signing_dialogue is None: + self._handle_unidentified_dialogue(signing_msg) + return + + # handle message + if signing_msg.performative is SigningMessage.Performative.SIGNED_TRANSACTION: + self._handle_signed_transaction(signing_msg, signing_dialogue) + elif signing_msg.performative is SigningMessage.Performative.ERROR: + self._handle_error(signing_msg, signing_dialogue) + else: + self._handle_invalid(signing_msg, signing_dialogue) def teardown(self) -> None: """ @@ -98,3 +218,242 @@ def teardown(self) -> None: :return: None """ pass + + def _handle_unidentified_dialogue(self, signing_msg: SigningMessage) -> None: + """ + Handle an unidentified dialogue. + + :param msg: the message + """ + self.context.logger.info( + "received invalid signing message={}, unidentified dialogue.".format( + signing_msg + ) + ) + + def _handle_signed_transaction( + self, signing_msg: SigningMessage, signing_dialogue: SigningDialogue + ) -> None: + """ + Handle an oef search message. + + :param signing_msg: the signing message + :param signing_dialogue: the dialogue + :return: None + """ + self.context.logger.info("transaction signing was successful.") + ledger_api_dialogues = cast( + LedgerApiDialogues, self.context.ledger_api_dialogues + ) + ledger_api_msg, ledger_api_dialogue = ledger_api_dialogues.create( + counterparty=LEDGER_API_ADDRESS, + performative=LedgerApiMessage.Performative.SEND_SIGNED_TRANSACTION, + signed_transaction=signing_msg.signed_transaction, + ) + ledger_api_dialogue = cast(LedgerApiDialogue, ledger_api_dialogue) + ledger_api_dialogue.associated_signing_dialogue = signing_dialogue + self.context.outbox.put_message(message=ledger_api_msg) + self.context.logger.info("sending transaction to ledger.") + + def _handle_error( + self, signing_msg: SigningMessage, signing_dialogue: SigningDialogue + ) -> None: + """ + Handle an oef search message. + + :param signing_msg: the signing message + :param signing_dialogue: the dialogue + :return: None + """ + self.context.logger.info( + "transaction signing was not successful. Error_code={} in dialogue={}".format( + signing_msg.error_code, signing_dialogue + ) + ) + + def _handle_invalid( + self, signing_msg: SigningMessage, signing_dialogue: SigningDialogue + ) -> None: + """ + Handle an oef search message. + + :param signing_msg: the signing message + :param signing_dialogue: the dialogue + :return: None + """ + self.context.logger.warning( + "cannot handle signing message of performative={} in dialogue={}.".format( + signing_msg.performative, signing_dialogue + ) + ) + + +class LedgerApiHandler(Handler): + """Implement the ledger api handler.""" + + SUPPORTED_PROTOCOL = LedgerApiMessage.protocol_id # type: Optional[ProtocolId] + + def setup(self) -> None: + """Implement the setup for the handler.""" + pass + + def handle(self, message: Message) -> None: + """ + Implement the reaction to a message. + + :param message: the message + :return: None + """ + ledger_api_msg = cast(LedgerApiMessage, message) + + # recover dialogue + ledger_api_dialogues = cast( + LedgerApiDialogues, self.context.ledger_api_dialogues + ) + ledger_api_dialogue = cast( + Optional[LedgerApiDialogue], ledger_api_dialogues.update(ledger_api_msg) + ) + if ledger_api_dialogue is None: + self._handle_unidentified_dialogue(ledger_api_msg) + return + + # handle message + if ledger_api_msg.performative is LedgerApiMessage.Performative.BALANCE: + self._handle_balance(ledger_api_msg) + elif ( + ledger_api_msg.performative + is LedgerApiMessage.Performative.TRANSACTION_DIGEST + ): + self._handle_transaction_digest(ledger_api_msg, ledger_api_dialogue) + elif ( + ledger_api_msg.performative + is LedgerApiMessage.Performative.TRANSACTION_RECEIPT + ): + self._handle_transaction_receipt(ledger_api_msg) + elif ledger_api_msg.performative == LedgerApiMessage.Performative.ERROR: + self._handle_error(ledger_api_msg, ledger_api_dialogue) + else: + self._handle_invalid(ledger_api_msg, ledger_api_dialogue) + + def teardown(self) -> None: + """ + Implement the handler teardown. + + :return: None + """ + pass + + def _handle_unidentified_dialogue(self, ledger_api_msg: LedgerApiMessage) -> None: + """ + Handle an unidentified dialogue. + + :param msg: the message + """ + self.context.logger.info( + "received invalid ledger_api message={}, unidentified dialogue.".format( + ledger_api_msg + ) + ) + + def _handle_balance(self, ledger_api_msg: LedgerApiMessage) -> None: + """ + Handle a message of balance performative. + + :param ledger_api_message: the ledger api message + """ + self.context.logger.info( + "starting balance on {} ledger={}.".format( + ledger_api_msg.ledger_id, ledger_api_msg.balance, + ) + ) + + def _handle_transaction_digest( + self, ledger_api_msg: LedgerApiMessage, ledger_api_dialogue: LedgerApiDialogue + ) -> None: + """ + Handle a message of transaction_digest performative. + + :param ledger_api_message: the ledger api message + :param ledger_api_dialogue: the ledger api dialogue + """ + self.context.logger.info( + "transaction was successfully submitted. Transaction digest={}".format( + ledger_api_msg.transaction_digest + ) + ) + msg = ledger_api_dialogue.reply( + performative=LedgerApiMessage.Performative.GET_TRANSACTION_RECEIPT, + target_message=ledger_api_msg, + transaction_digest=ledger_api_msg.transaction_digest, + ) + self.context.outbox.put_message(message=msg) + self.context.logger.info("requesting transaction receipt.") + + def _handle_transaction_receipt(self, ledger_api_msg: LedgerApiMessage) -> None: + """ + Handle a message of transaction_receipt performative. + + :param ledger_api_message: the ledger api message + """ + is_transaction_successful = LedgerApis.is_transaction_settled( + ledger_api_msg.transaction_receipt.ledger_id, + ledger_api_msg.transaction_receipt.receipt, + ) + if is_transaction_successful: + self.context.logger.info( + "transaction was successfully settled. Transaction receipt={}".format( + ledger_api_msg.transaction_receipt + ) + ) + parameters = cast(Parameters, self.context.parameters) + if not parameters.contract_manager.is_contract_deployed: + contract_address = ledger_api_msg.transaction_receipt.receipt.get( + "contractAddress", None + ) + parameters.contract_address = contract_address + parameters.contract_manager.is_contract_deployed = is_transaction_successful + elif not parameters.contract_manager.is_tokens_created: + parameters.contract_manager.is_tokens_created = is_transaction_successful + elif not parameters.contract_manager.is_tokens_minted: + parameters.is_tokens_minted = is_transaction_successful + elif parameters.is_tokens_minted: + self.context.is_active = False + self.context.logger.info("demo finished!") + else: + self.context.logger.error("unexpected transaction receipt!") + else: + self.context.logger.error( + "transaction failed. Transaction receipt={}".format( + ledger_api_msg.transaction_receipt + ) + ) + + def _handle_error( + self, ledger_api_msg: LedgerApiMessage, ledger_api_dialogue: LedgerApiDialogue + ) -> None: + """ + Handle a message of error performative. + + :param ledger_api_message: the ledger api message + :param ledger_api_dialogue: the ledger api dialogue + """ + self.context.logger.info( + "received ledger_api error message={} in dialogue={}.".format( + ledger_api_msg, ledger_api_dialogue + ) + ) + + def _handle_invalid( + self, ledger_api_msg: LedgerApiMessage, ledger_api_dialogue: LedgerApiDialogue + ) -> None: + """ + Handle a message of invalid performative. + + :param ledger_api_message: the ledger api message + :param ledger_api_dialogue: the ledger api dialogue + """ + self.context.logger.warning( + "cannot handle ledger_api message of performative={} in dialogue={}.".format( + ledger_api_msg.performative, ledger_api_dialogue, + ) + ) diff --git a/packages/fetchai/skills/tac_control_contract/parameters.py b/packages/fetchai/skills/tac_control_contract/parameters.py index 5046c98a66..f9ea7ee3b0 100644 --- a/packages/fetchai/skills/tac_control_contract/parameters.py +++ b/packages/fetchai/skills/tac_control_contract/parameters.py @@ -19,7 +19,148 @@ """This package contains a class representing the game parameters.""" +from typing import Dict, List, Optional + +from aea.exceptions import AEAEnforceError, enforce +from aea.helpers.transaction.base import Terms + from packages.fetchai.skills.tac_control.parameters import Parameters as BaseParameters -Parameters = BaseParameters +class ContractManager: + """Class managing the contract.""" + + def __init__(self, is_contract_deployed: bool = False): + """Instantiate the contract manager class.""" + self._deploy_tx_digest = None # type: Optional[str] + self._create_tokens_tx_digest = None # type: Optional[str] + self._mint_tokens_tx_digests = {} # type: Dict[str, str] + self._confirmed_mint_tokens_agents = [] # type: List[str] + self.is_contract_deployed = is_contract_deployed + self.is_tokens_created = False + self.is_tokens_minted = False + + @property + def deploy_tx_digest(self) -> str: + """Get the contract deployment tx digest.""" + if self._deploy_tx_digest is None: + raise AEAEnforceError("Deploy_tx_digest is not set yet!") + return self._deploy_tx_digest + + @deploy_tx_digest.setter + def deploy_tx_digest(self, deploy_tx_digest: str) -> None: + """Set the contract deployment tx digest.""" + enforce(self._deploy_tx_digest is None, "Deploy_tx_digest already set!") + self._deploy_tx_digest = deploy_tx_digest + + @property + def create_tokens_tx_digest(self) -> str: + """Get the contract deployment tx digest.""" + if self._create_tokens_tx_digest is None: + raise AEAEnforceError("Create_tokens_tx_digest is not set yet!") + return self._create_tokens_tx_digest + + @create_tokens_tx_digest.setter + def create_tokens_tx_digest(self, create_tokens_tx_digest: str) -> None: + """Set the contract deployment tx digest.""" + enforce( + self._create_tokens_tx_digest is None, + "Create_tokens_tx_digest already set!", + ) + self._create_tokens_tx_digest = create_tokens_tx_digest + + @property + def mint_tokens_tx_digests(self) -> Dict[str, str]: + """Get the mint tokens tx digests.""" + return self._mint_tokens_tx_digests + + def set_mint_tokens_tx_digest(self, agent_addr: str, tx_digest: str) -> None: + """ + Set a mint token tx digest for an agent. + + :param agent_addr: the agent addresss + :param tx_digest: the transaction digest + """ + enforce( + agent_addr not in self._mint_tokens_tx_digests, "Tx digest already set." + ) + self._mint_tokens_tx_digests[agent_addr] = tx_digest + + @property + def confirmed_mint_tokens_agents(self) -> List[str]: + """Get the agents which are confirmed to have minted tokens on chain.""" + return self._confirmed_mint_tokens_agents + + def add_confirmed_mint_tokens_agents(self, agent_addr: str) -> None: + """ + Set agent addresses whose tokens have been minted. + + :param agent_addr: the agent address + """ + enforce( + agent_addr not in self.confirmed_mint_tokens_agents, + "Agent already in list.", + ) + self._confirmed_mint_tokens_agents.append(agent_addr) + + +class Parameters(BaseParameters): + """This class contains the parameters of the game.""" + + def __init__(self, **kwargs): + """Instantiate the parameter class.""" + super().__init__(**kwargs) + self._contract_manager = ContractManager() + + @property + def contract_manager(self) -> ContractManager: + """Get contract manager.""" + return self._contract_manager + + def get_deploy_terms(self) -> Terms: + """ + Get deploy terms of deployment. + + :return: terms + """ + terms = Terms( + ledger_id=self.ledger_id, + sender_address=self.context.agent_address, + counterparty_address=self.context.agent_address, + amount_by_currency_id={}, + quantities_by_good_id={}, + nonce="", + ) + return terms + + def get_create_token_terms(self) -> Terms: + """ + Get create token terms of deployment. + + :return: terms + """ + terms = Terms( + ledger_id=self.ledger_id, + sender_address=self.context.agent_address, + counterparty_address=self.context.agent_address, + amount_by_currency_id={}, + quantities_by_good_id={}, + nonce="", + ) + return terms + + def get_mint_token_terms(self) -> Terms: + """ + Get mint token terms of deployment. + + :return: terms + """ + terms = Terms( + ledger_id=self.ledger_id, + sender_address=self.context.agent_address, + counterparty_address=self.context.agent_address, + amount_by_currency_id={}, + quantities_by_good_id={}, + nonce="", + ) + return terms diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index e23ef0f683..ac1f539616 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -18,35 +18,46 @@ fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 protocols: +- fetchai/contract_api:0.5.0 +- fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 +- fetchai/signing:0.3.0 - fetchai/tac:0.6.0 skills: - fetchai/tac_control:0.7.0 behaviours: - contract: - args: - tick_interval: 5 - class_name: ContractBehaviour tac: args: {} class_name: TacBehaviour handlers: + contract_api: + args: {} + class_name: ContractApiHandler + ledger_api: + args: {} + class_name: LedgerApiHandler oef: args: {} class_name: OefSearchHandler + signing: + args: {} + class_name: SigningHandler tac: args: {} class_name: TacHandler - transaction: - args: {} - class_name: TransactionHandler models: + contract_api_dialogues: + args: {} + class_name: ContractApiDialogues default_dialogues: args: {} class_name: DefaultDialogues game: args: {} class_name: Game + ledger_api_dialogues: + args: {} + class_name: LedgerApiDialogues oef_search_dialogues: args: {} class_name: OefSearchDialogues @@ -76,6 +87,9 @@ models: version_id: v1 whitelist: [] class_name: Parameters + signing_dialogues: + args: {} + class_name: SigningDialogues tac_dialogues: args: {} class_name: TacDialogues From 966992126488f5ab565fe5c609a7dd1ed5213915 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Mon, 21 Sep 2020 15:29:05 +0300 Subject: [PATCH 028/131] set declared name test for soef integration --- .../test_soef/test_soef_integration.py | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index 46d4405451..49c620805b 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -20,6 +20,7 @@ import logging import time +import urllib from threading import Thread from typing import Any, Dict, Optional, Tuple, cast from urllib.parse import urlencode @@ -236,7 +237,6 @@ class TestRealNetwork: @pytest.mark.integration def test_search_no_filters(self): """Perform tests over real networ with no filters.""" - agent_location = Location(*self.LOCATION) agent = Instance(agent_location) agent2 = Instance(agent_location) @@ -382,3 +382,60 @@ def test_generic_command(self): finally: agent.stop() + + @pytest.mark.integration + def test_generic_command_set_declared_name(self): + """Test generic command.""" + agent_location = Location(*self.LOCATION) + agent1 = Instance(agent_location) + agent1.start() + agent2 = Instance(agent_location) + agent2.start() + + declared_name = "new_declared_name" + try: + # send generic command.""" + service_description = Description( + { + "command": "set_declared_name", + "parameters": urllib.parse.urlencode({"name": declared_name}), + }, + data_model=models.AGENT_GENERIC_COMMAND_MODEL, + ) + message, _ = agent1.oef_search_dialogues.create( + performative=OefSearchMessage.Performative.REGISTER_SERVICE, + service_description=service_description, + counterparty=SOEFConnection.connection_id.latest, + ) + + envelope = Envelope( + to=message.to, + sender=message.sender, + protocol_id=message.protocol_id, + message=message, + ) + agent1.multiplexer.put(envelope) + + envelope = agent1.get() + assert ( + envelope.message.performative == OefSearchMessage.Performative.SUCCESS + ) + + radius = 0.1 + close_to_my_service = Constraint( + "location", ConstraintType("distance", (agent_location, radius)) + ) + closeness_query = Query( + [close_to_my_service], model=models.AGENT_LOCATION_MODEL + ) + + message = agent2.search(closeness_query) + assert message.performative == OefSearchMessage.Performative.SEARCH_RESULT + assert len(message.agents) >= 1 + + assert agent1.address in message.agents_info.body + assert message.agents_info.body[agent1.address]["name"] == declared_name + + finally: + agent1.stop() + agent2.stop() From c43375f7da2a9c683de99653d7ebe7f150a35b22 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 15:40:49 +0200 Subject: [PATCH 029/131] make add/fetch/remove commands to accept 'latest' as public id version. --- aea/cli/add.py | 8 ++---- aea/cli/fetch.py | 2 +- aea/cli/remove.py | 7 +++--- aea/cli/utils/package_utils.py | 31 ++++++++++++++++++++--- aea/configurations/base.py | 4 +++ aea/registries/base.py | 1 - scripts/whitelist.py | 1 + tests/test_cli/test_fetch.py | 21 ++++++++-------- tests/test_cli/test_utils/test_utils.py | 33 +++++++++++++++++++++++++ tests/test_configurations/test_base.py | 16 ++++++++++++ 10 files changed, 98 insertions(+), 26 deletions(-) diff --git a/aea/cli/add.py b/aea/cli/add.py index 0049ee4202..093a881751 100644 --- a/aea/cli/add.py +++ b/aea/cli/add.py @@ -35,14 +35,10 @@ get_package_path, is_fingerprint_correct, is_item_present, + is_local_item, register_item, ) from aea.configurations.base import PublicId -from aea.configurations.constants import ( - DEFAULT_CONNECTION, - DEFAULT_SKILL, - LOCAL_PROTOCOLS, -) @click.group() @@ -116,7 +112,7 @@ def add_item(ctx: Context, item_type: str, item_public_id: PublicId) -> None: is_local = ctx.config.get("is_local") ctx.clean_paths.append(dest_path) - if item_public_id in [DEFAULT_CONNECTION, *LOCAL_PROTOCOLS, DEFAULT_SKILL]: + if is_local_item(item_public_id): source_path = find_item_in_distribution(ctx, item_type, item_public_id) package_path = copy_package_directory(source_path, dest_path) elif is_local: diff --git a/aea/cli/fetch.py b/aea/cli/fetch.py index 05d8a076f7..e10b9eae29 100644 --- a/aea/cli/fetch.py +++ b/aea/cli/fetch.py @@ -61,7 +61,7 @@ def _is_version_correct(ctx: Context, agent_public_id: PublicId) -> bool: :return: bool is version correct. """ - return ( + return ctx.agent_config.public_id.same_prefix(agent_public_id) and ( agent_public_id.package_version.is_latest or ctx.agent_config.version == agent_public_id.version ) diff --git a/aea/cli/remove.py b/aea/cli/remove.py index 7e8243d7d7..d301368503 100644 --- a/aea/cli/remove.py +++ b/aea/cli/remove.py @@ -112,9 +112,8 @@ def remove_item(ctx: Context, item_type: str, item_id: PublicId) -> None: ) ) - if ( - item_id not in existing_items_name_to_ids.keys() - and item_id not in existing_item_ids + if item_name not in existing_items_name_to_ids.keys() and not any( + item_id.same_prefix(existing_id) for existing_id in existing_item_ids ): raise click.ClickException( "The {} '{}' is not supported.".format(item_type, item_id) @@ -144,7 +143,7 @@ def remove_item(ctx: Context, item_type: str, item_id: PublicId) -> None: except BaseException: raise click.ClickException("An error occurred.") - # removing the protocol to the configurations. + # removing the item from the configurations. item_public_id = existing_items_name_to_ids[item_name] logger.debug("Removing the {} from {}".format(item_type, DEFAULT_AEA_CONFIG_FILE)) existing_item_ids.remove(item_public_id) diff --git a/aea/cli/utils/package_utils.py b/aea/cli/utils/package_utils.py index bf3a7b91c2..20c06a9cf7 100644 --- a/aea/cli/utils/package_utils.py +++ b/aea/cli/utils/package_utils.py @@ -23,7 +23,7 @@ import re import shutil from pathlib import Path -from typing import Optional +from typing import List, Optional import click @@ -41,6 +41,11 @@ _compute_fingerprint, _get_default_configuration_file_name_from_type, ) +from aea.configurations.constants import ( + DEFAULT_CONNECTION, + DEFAULT_SKILL, + LOCAL_PROTOCOLS, +) from aea.configurations.loader import ConfigLoader from aea.crypto.helpers import verify_or_create_private_keys from aea.crypto.ledger_apis import DEFAULT_LEDGER_CONFIGS, LedgerApis @@ -270,7 +275,7 @@ def find_item_locally(ctx, item_type, item_public_id) -> Path: def find_item_in_distribution( # pylint: disable=unused-argument - ctx, item_type, item_public_id + ctx, item_type, item_public_id: PublicId ) -> Path: """ Find an item in the AEA directory. @@ -310,7 +315,10 @@ def find_item_in_distribution( # pylint: disable=unused-argument # check that the configuration file of the found package matches the expected author and version. version = item_configuration.version author = item_configuration.author - if item_public_id.author != author or item_public_id.version != version: + if item_public_id.author != author or ( + not item_public_id.package_version.is_latest + and item_public_id.version != version + ): raise click.ClickException( "Cannot find {} with author and version specified.".format(item_type) ) @@ -442,6 +450,23 @@ def is_item_present( ).exists() +def is_local_item(item_public_id: PublicId) -> bool: + """ + Check whether the item public id correspond to a local package. + + If the provided item has version 'latest', only the prefixes are compared. + Otherwise, the function will try to match the exact version occurrence among the local packages. + """ + local_packages: List[PublicId] = [ + DEFAULT_CONNECTION, + *LOCAL_PROTOCOLS, + DEFAULT_SKILL, + ] + if item_public_id.package_version.is_latest: + return any(item_public_id.same_prefix(other) for other in local_packages) + return item_public_id in local_packages + + def try_get_balance( # pylint: disable=unused-argument agent_config: AgentConfig, wallet: Wallet, type_: str ) -> int: diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 390a572cd0..5cec8c5aa7 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -439,6 +439,10 @@ def same_prefix(self, other: "PublicId") -> bool: """Check if the other public id has the same author and name of this.""" return self.name == other.name and self.author == other.author + def to_latest(self) -> "PublicId": + """Return the same public id, but with latest version.""" + return PublicId(self.author, self.name, self.LATEST_VERSION) + @classmethod def from_str(cls, public_id_string: str) -> "PublicId": """ diff --git a/aea/registries/base.py b/aea/registries/base.py index 98ba2fff37..f7c05a2383 100644 --- a/aea/registries/base.py +++ b/aea/registries/base.py @@ -543,7 +543,6 @@ def register( protocol_handlers_by_skill is not None and skill_id in protocol_handlers_by_skill.ids() ): - # clean up previous modifications done by super().register raise ValueError( "A handler already registered with pair of protocol id {} and skill id {}".format( protocol_id, skill_id diff --git a/scripts/whitelist.py b/scripts/whitelist.py index 735667e245..296f020813 100644 --- a/scripts/whitelist.py +++ b/scripts/whitelist.py @@ -62,6 +62,7 @@ STOPPING # unused variable (aea/cli_gui/utils.py:35) _call_subprocess # unused function (aea/cli_gui/utils.py:44) _.latest # unused property (aea/configurations/base.py:384) +_.to_latest # unused property (aea/configurations/base.py:442) _.to_uri_path # unused property (aea/configurations/base.py:445) _.to_uri_path # unused property (aea/configurations/base.py:605) _.has_crypto_store # unused property (aea/connections/base.py:138) diff --git a/tests/test_cli/test_fetch.py b/tests/test_cli/test_fetch.py index a9a5af2e7f..9d92e3b934 100644 --- a/tests/test_cli/test_fetch.py +++ b/tests/test_cli/test_fetch.py @@ -27,7 +27,7 @@ from aea.cli import cli from aea.cli.fetch import _is_version_correct, fetch_agent_locally -from aea.configurations.base import PackageVersion +from aea.configurations.base import PublicId from aea.test_tools.test_cases import AEATestCaseMany from tests.conftest import CLI_LOG_OPTION, CliRunner, MAX_FLAKY_RERUNS @@ -128,20 +128,19 @@ class IsVersionCorrectTestCase(TestCase): def test__is_version_correct_positive(self): """Test for _is_version_correct method positive result.""" - package_version = PackageVersion("0.1.0") - ctx_mock = ContextMock(version=str(package_version)) - public_id_mock = PublicIdMock() - public_id_mock.package_version = package_version - result = _is_version_correct(ctx_mock, public_id_mock) + public_id = PublicId("author", "package", "0.1.0") + ctx_mock = ContextMock() + ctx_mock.agent_config.public_id = public_id + result = _is_version_correct(ctx_mock, public_id) self.assertTrue(result) def test__is_version_correct_negative(self): """Test for _is_version_correct method negative result.""" - package_version = PackageVersion("0.1.0") - ctx_mock = ContextMock(version="0.1.1") - public_id_mock = PublicIdMock() - public_id_mock.package_version = package_version - result = _is_version_correct(ctx_mock, public_id_mock) + public_id_a = PublicId("author", "package", "0.1.0") + public_id_b = PublicId("author", "package", "0.1.1") + ctx_mock = ContextMock() + ctx_mock.agent_config.public_id = public_id_b + result = _is_version_correct(ctx_mock, public_id_a) self.assertFalse(result) diff --git a/tests/test_cli/test_utils/test_utils.py b/tests/test_cli/test_utils/test_utils.py index 79349330d9..01bf05c49f 100644 --- a/tests/test_cli/test_utils/test_utils.py +++ b/tests/test_cli/test_utils/test_utils.py @@ -47,12 +47,21 @@ get_package_path_unified, is_fingerprint_correct, is_item_present_unified, + is_local_item, try_get_balance, try_get_item_source_path, try_get_item_target_path, validate_author_name, validate_package_name, ) +from aea.configurations.base import PublicId +from aea.configurations.constants import ( + DEFAULT_CONNECTION, + DEFAULT_PROTOCOL, + DEFAULT_SKILL, + SIGNING_PROTOCOL, + STATE_UPDATE_PROTOCOL, +) from tests.conftest import FETCHAI from tests.test_cli.tools_for_testing import ( @@ -454,3 +463,27 @@ def test_is_item_present_unified(mock_, vendor): public_id_mock = mock.MagicMock(author="some_author") result = is_item_present_unified(contex_mock, "some_component_type", public_id_mock) assert not result + + +@pytest.mark.parametrize( + ["public_id", "expected_outcome"], + [ + (PublicId.from_str("author/package:0.1.0"), False), + (PublicId.from_str("author/package:latest"), False), + (PublicId.from_str("fetchai/oef:0.1.0"), False), + (PublicId.from_str("fetchai/oef:latest"), False), + (DEFAULT_CONNECTION, True), + (DEFAULT_SKILL, True), + (DEFAULT_PROTOCOL, True), + (SIGNING_PROTOCOL, True), + (STATE_UPDATE_PROTOCOL, True), + (DEFAULT_CONNECTION.to_latest(), True), + (DEFAULT_SKILL.to_latest(), True), + (DEFAULT_PROTOCOL.to_latest(), True), + (SIGNING_PROTOCOL.to_latest(), True), + (STATE_UPDATE_PROTOCOL.to_latest(), True), + ], +) +def test_is_local_item(public_id, expected_outcome): + """Test the 'is_local_item' CLI utility function.""" + assert is_local_item(public_id) is expected_outcome diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index 90d27cefa2..5c4c842131 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -480,6 +480,22 @@ def test_pubic_id_repr(): assert repr(public_id) == "" +def test_pubic_id_same_prefix(): + """Test PublicId.same_prefix""" + same_1 = PublicId("author", "name", "0.1.0") + same_2 = PublicId("author", "name", "0.1.1") + different = PublicId("author", "different_name", "0.1.0") + + assert same_1.same_prefix(same_2) + assert same_2.same_prefix(same_1) + + assert not different.same_prefix(same_1) + assert not same_1.same_prefix(different) + + assert not different.same_prefix(same_2) + assert not same_2.same_prefix(different) + + def test_public_id_comparator_when_author_is_different(): """Test PublicId.__lt__ when author is different.""" pid1 = PublicId("author_1", "name", "0.1.0") From ad705faddfb8580c515de18f779471a450396305 Mon Sep 17 00:00:00 2001 From: Oleg Panasevych Date: Mon, 21 Sep 2020 17:19:52 +0300 Subject: [PATCH 030/131] CLI reset_password command implemented. --- aea/cli/core.py | 2 + aea/cli/registry/login.py | 11 ++++ aea/cli/reset_password.py | 43 ++++++++++++++++ tests/test_cli/test_misc.py | 1 + tests/test_cli/test_registry/test_login.py | 14 ++++- tests/test_cli/test_reset_password.py | 59 ++++++++++++++++++++++ 6 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 aea/cli/reset_password.py create mode 100644 tests/test_cli/test_reset_password.py diff --git a/aea/cli/core.py b/aea/cli/core.py index 9bdb9f40db..829a63a0d3 100644 --- a/aea/cli/core.py +++ b/aea/cli/core.py @@ -50,6 +50,7 @@ from aea.cli.push import push from aea.cli.register import register from aea.cli.remove import remove +from aea.cli.reset_password import reset_password from aea.cli.run import run from aea.cli.scaffold import scaffold from aea.cli.search import search @@ -138,6 +139,7 @@ def _init_gui() -> None: cli.add_command(push) cli.add_command(register) cli.add_command(remove) +cli.add_command(reset_password) cli.add_command(run) cli.add_command(scaffold) cli.add_command(search) diff --git a/aea/cli/registry/login.py b/aea/cli/registry/login.py index 4aa307de0e..3bbc6a3879 100644 --- a/aea/cli/registry/login.py +++ b/aea/cli/registry/login.py @@ -34,3 +34,14 @@ def registry_login(username: str, password: str) -> str: "POST", "/rest-auth/login/", data={"username": username, "password": password} ) return resp["key"] + + +def registry_reset_password(email: str) -> None: + """ + Request Registry to reset password. + + :param email: user email. + + :return: None. + """ + request_api("POST", "/rest-auth/password/reset/", data={"email": email}) diff --git a/aea/cli/reset_password.py b/aea/cli/reset_password.py new file mode 100644 index 0000000000..4313957b9d --- /dev/null +++ b/aea/cli/reset_password.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2018-2020 Fetch.AI Limited +# +# 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. +# +# ------------------------------------------------------------------------------ + +"""Implementation of the 'aea reset_password' subcommand.""" + +import click + +from aea.cli.registry.login import registry_reset_password + + +@click.command(name="reset_password", help="Reset password of Registry account.") +@click.argument("email", type=str, required=True) +def reset_password(email): + """Command to request Registry to reset password.""" + _do_password_reset(email) + + +def _do_password_reset(email: str) -> None: + """ + Request Registry to reset password. + + :param email: str email. + + :return: + """ + registry_reset_password(email) + click.echo("A letter with password reset link was sent to {}".format(email)) diff --git a/tests/test_cli/test_misc.py b/tests/test_cli/test_misc.py index b43b70870c..4d1bbc7e1b 100644 --- a/tests/test_cli/test_misc.py +++ b/tests/test_cli/test_misc.py @@ -85,6 +85,7 @@ def test_flag_help(): push Push item to Registry or save it in local packages. register Register a new Registry account. remove Remove a resource from the agent. + reset_password Reset password of Registry account. run Run the agent. scaffold Scaffold a resource for the agent. search Search for components in the registry. diff --git a/tests/test_cli/test_registry/test_login.py b/tests/test_cli/test_registry/test_login.py index 4b5c45f695..ed1a797212 100644 --- a/tests/test_cli/test_registry/test_login.py +++ b/tests/test_cli/test_registry/test_login.py @@ -20,7 +20,7 @@ from unittest import TestCase, mock -from aea.cli.registry.login import registry_login +from aea.cli.registry.login import registry_login, registry_reset_password @mock.patch("aea.cli.registry.login.request_api", return_value={"key": "key"}) @@ -33,3 +33,15 @@ def test_registry_login_positive(self, request_api_mock): expected_result = "key" self.assertEqual(result, expected_result) request_api_mock.assert_called_once() + + +@mock.patch( + "aea.cli.registry.login.request_api", return_value={"message": "Email was sent."} +) +class RegistryResetPasswordTestCase(TestCase): + """Test case for registry_reset_password method.""" + + def test_registry_reset_password_positive(self, request_api_mock): + """Test for registry_reset_password method positive result.""" + registry_reset_password("email@example.com") + request_api_mock.assert_called_once() diff --git a/tests/test_cli/test_reset_password.py b/tests/test_cli/test_reset_password.py new file mode 100644 index 0000000000..b8b28437c4 --- /dev/null +++ b/tests/test_cli/test_reset_password.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2018-2020 Fetch.AI Limited +# +# 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. +# +# ------------------------------------------------------------------------------ +"""This test module contains the tests for CLI reset_password command.""" + +from unittest import TestCase, mock + +from aea.cli import cli +from aea.cli.reset_password import _do_password_reset + +from tests.conftest import CLI_LOG_OPTION, CliRunner + + +@mock.patch("aea.cli.reset_password._do_password_reset") +class ResetPasswordTestCase(TestCase): + """Test case for CLI reset_password command.""" + + def setUp(self): + """Set it up.""" + self.runner = CliRunner() + + def test_reset_password_positive(self, registry_reset_password_mock): + """Test for CLI reset_password positive result.""" + email = "email@example.com" + result = self.runner.invoke( + cli, [*CLI_LOG_OPTION, "reset_password", email], standalone_mode=False, + ) + self.assertEqual(result.exit_code, 0) + registry_reset_password_mock.assert_called_once_with(email) + + +class DoPasswordResetTestCase(TestCase): + """Test case for _do_password_reset method.""" + + @mock.patch("aea.cli.reset_password.registry_reset_password") + @mock.patch("aea.cli.reset_password.click.echo") + def test__do_password_reset_positive(self, echo_mock, registry_reset_password_mock): + """Test _do_password_reset for positive result.""" + email = "email@example.com" + _do_password_reset(email) + registry_reset_password_mock.assert_called_once_with(email) + echo_mock.assert_called_once_with( + "A letter with password reset link was sent to {}".format(email) + ) From 7423ba776cf7dc3f9a056bf43e8a41e4b0b464c7 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 16:32:07 +0200 Subject: [PATCH 031/131] add tests on 'aea add/fetch/remove' with latest as id version --- tests/test_cli/test_add/test_connection.py | 13 ++++++ tests/test_cli/test_add/test_contract.py | 15 +++++++ tests/test_cli/test_add/test_protocol.py | 13 ++++++ tests/test_cli/test_add/test_skill.py | 13 ++++++ tests/test_cli/test_fetch.py | 13 +++++- .../{test_remove_item.py => test_base.py} | 44 ++++++++++++++++++- 6 files changed, 108 insertions(+), 3 deletions(-) rename tests/test_cli/test_remove/{test_remove_item.py => test_base.py} (50%) diff --git a/tests/test_cli/test_add/test_connection.py b/tests/test_cli/test_add/test_connection.py index 39d13712e3..e8ecb9b81f 100644 --- a/tests/test_cli/test_add/test_connection.py +++ b/tests/test_cli/test_add/test_connection.py @@ -488,3 +488,16 @@ def test_add_connection_from_remote_registry_positive(self): items_folders = os.listdir(items_path) item_name = "local" assert item_name in items_folders + + +class TestAddConnectionWithLatestVersion(AEATestCaseEmpty): + """Test case for add connection with latest version.""" + + def test_add_connection_latest_version(self): + """Test add connection with latest version.""" + self.add_item("connection", "fetchai/local:latest", local=True) + + items_path = os.path.join(self.agent_name, "vendor", "fetchai", "connections") + items_folders = os.listdir(items_path) + item_name = "local" + assert item_name in items_folders diff --git a/tests/test_cli/test_add/test_contract.py b/tests/test_cli/test_add/test_contract.py index 030278f521..18662e80fd 100644 --- a/tests/test_cli/test_add/test_contract.py +++ b/tests/test_cli/test_add/test_contract.py @@ -68,3 +68,18 @@ def test_add_contract_from_remote_registry_positive(self): items_folders = os.listdir(items_path) item_name = "erc1155" assert item_name in items_folders + + +class TestAddContractWithLatestVersion(AEATestCaseEmpty): + """Test case for add contract with latest version.""" + + @pytest.mark.integration + @pytest.mark.flaky(reruns=MAX_FLAKY_RERUNS) + def test_add_contract_latest_version(self): + """Test add contract with latest version.""" + self.add_item("contract", "fetchai/erc1155:latest", local=True) + + items_path = os.path.join(self.agent_name, "vendor", "fetchai", "contracts") + items_folders = os.listdir(items_path) + item_name = "erc1155" + assert item_name in items_folders diff --git a/tests/test_cli/test_add/test_protocol.py b/tests/test_cli/test_add/test_protocol.py index 6e013f0944..786f7aed20 100644 --- a/tests/test_cli/test_add/test_protocol.py +++ b/tests/test_cli/test_add/test_protocol.py @@ -469,3 +469,16 @@ def test_add_protocol_from_remote_registry_positive(self): items_folders = os.listdir(items_path) item_name = "fipa" assert item_name in items_folders + + +class TestAddProtocolWithLatestVersion(AEATestCaseEmpty): + """Test case for add protocol with latest version.""" + + def test_add_protocol_latest_version(self): + """Test add protocol with latest version.""" + self.add_item("protocol", "fetchai/fipa:latest", local=True) + + items_path = os.path.join(self.agent_name, "vendor", "fetchai", "protocols") + items_folders = os.listdir(items_path) + item_name = "fipa" + assert item_name in items_folders diff --git a/tests/test_cli/test_add/test_skill.py b/tests/test_cli/test_add/test_skill.py index 4dbffc1abe..ad8e4d3084 100644 --- a/tests/test_cli/test_add/test_skill.py +++ b/tests/test_cli/test_add/test_skill.py @@ -497,3 +497,16 @@ def test_add_skill_from_remote_registry_positive(self): items_folders = os.listdir(items_path) item_name = "echo" assert item_name in items_folders + + +class TestAddSkillWithLatestVersion(AEATestCaseEmpty): + """Test case for add skill with latest version.""" + + def test_add_skill_latest_version(self): + """Test add skill with latest version.""" + self.add_item("skill", "fetchai/echo:latest", local=True) + + items_path = os.path.join(self.agent_name, "vendor", "fetchai", "skills") + items_folders = os.listdir(items_path) + item_name = "echo" + assert item_name in items_folders diff --git a/tests/test_cli/test_fetch.py b/tests/test_cli/test_fetch.py index 9d92e3b934..0221620518 100644 --- a/tests/test_cli/test_fetch.py +++ b/tests/test_cli/test_fetch.py @@ -129,7 +129,7 @@ class IsVersionCorrectTestCase(TestCase): def test__is_version_correct_positive(self): """Test for _is_version_correct method positive result.""" public_id = PublicId("author", "package", "0.1.0") - ctx_mock = ContextMock() + ctx_mock = ContextMock(version=public_id.version) ctx_mock.agent_config.public_id = public_id result = _is_version_correct(ctx_mock, public_id) self.assertTrue(result) @@ -138,7 +138,7 @@ def test__is_version_correct_negative(self): """Test for _is_version_correct method negative result.""" public_id_a = PublicId("author", "package", "0.1.0") public_id_b = PublicId("author", "package", "0.1.1") - ctx_mock = ContextMock() + ctx_mock = ContextMock(version=public_id_b.version) ctx_mock.agent_config.public_id = public_id_b result = _is_version_correct(ctx_mock, public_id_a) self.assertFalse(result) @@ -153,3 +153,12 @@ def test_fetch_agent_from_remote_registry_positive(self): """Test fetch agent from Registry for positive result.""" self.run_cli_command("fetch", "fetchai/my_first_aea:0.7.0") assert "my_first_aea" in os.listdir(self.t) + + +class TestFetchLatestVersion(AEATestCaseMany): + """Test case for fetch agent, latest version.""" + + def test_fetch_agent_latest(self): + """Test fetch agent, latest version.""" + self.run_cli_command("fetch", "--local", "fetchai/my_first_aea:latest") + assert "my_first_aea" in os.listdir(self.t) diff --git a/tests/test_cli/test_remove/test_remove_item.py b/tests/test_cli/test_remove/test_base.py similarity index 50% rename from tests/test_cli/test_remove/test_remove_item.py rename to tests/test_cli/test_remove/test_base.py index d7769bbcd8..7f4f797f8e 100644 --- a/tests/test_cli/test_remove/test_remove_item.py +++ b/tests/test_cli/test_remove/test_base.py @@ -17,12 +17,21 @@ # # ------------------------------------------------------------------------------ """Test module for aea.cli.remove.remove_item method.""" - +import os from unittest import TestCase, mock from click import ClickException +import pytest + from aea.cli.remove import remove_item +from aea.configurations.base import PublicId +from aea.configurations.constants import ( + DEFAULT_CONNECTION, + DEFAULT_PROTOCOL, + DEFAULT_SKILL, +) +from aea.test_tools.test_cases import AEATestCaseEmpty from tests.test_cli.tools_for_testing import ContextMock, PublicIdMock @@ -37,3 +46,36 @@ def test_remove_item_item_folder_not_exists(self, *mocks): public_id = PublicIdMock.from_str("author/name:0.1.0") with self.assertRaises(ClickException): remove_item(ContextMock(protocols=[public_id]), "protocol", public_id) + + +class TestRemovePackageWithLatestVersion(AEATestCaseEmpty): + """Test case for remove package with latest version.""" + + @pytest.mark.parametrize( + ["type_", "public_id"], + [ + ("protocol", DEFAULT_PROTOCOL.to_latest()), + ("connection", DEFAULT_CONNECTION.to_latest()), + ("contract", PublicId("fetchai", "erc1155").to_latest()), + ("skill", DEFAULT_SKILL.to_latest()), + ], + ) + def test_remove_pacakge_latest_version(self, type_, public_id): + """Test remove protocol with latest version.""" + assert public_id.package_version.is_latest + # we need this because there isn't a default contract + if type_ == "contract": + self.add_item("contract", str(public_id)) + + # first, check the package is present + items_path = os.path.join(self.agent_name, "vendor", "fetchai", type_ + "s") + items_folders = os.listdir(items_path) + item_name = public_id.name + assert item_name in items_folders + + # remove the package + self.run_cli_command(*["remove", type_, str(public_id)], cwd=self._get_cwd()) + + # check that the 'aea remove' took effect. + items_folders = os.listdir(items_path) + assert item_name not in items_folders From 95545da04e80e8e8c8d3815d01009e65b893d226 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 16:40:53 +0200 Subject: [PATCH 032/131] configure isort to add two lines after imports --- aea/__init__.py | 1 + aea/aea_builder.py | 1 + aea/agent.py | 1 + aea/agent_loop.py | 1 + aea/cli/__main__.py | 1 + aea/cli/get_multiaddress.py | 1 + aea/cli/utils/constants.py | 1 + aea/cli/utils/decorators.py | 1 + aea/cli/utils/loggers.py | 1 + aea/cli/utils/package_utils.py | 1 + aea/cli_gui/__init__.py | 1 + aea/cli_gui/__main__.py | 1 + aea/components/base.py | 1 + aea/components/loader.py | 1 + aea/configurations/base.py | 1 + aea/configurations/constants.py | 1 + aea/configurations/loader.py | 1 + aea/connections/base.py | 1 + aea/connections/stub/connection.py | 1 + aea/connections/stub/connection.yaml | 2 +- aea/contracts/base.py | 1 + aea/crypto/__init__.py | 1 + aea/crypto/base.py | 1 + aea/crypto/cosmos.py | 1 + aea/crypto/ethereum.py | 1 + aea/crypto/fetchai.py | 1 + aea/crypto/helpers.py | 1 + aea/crypto/ledger_apis.py | 1 + aea/crypto/registries/__init__.py | 1 + aea/crypto/registries/base.py | 1 + aea/crypto/wallet.py | 1 + aea/decision_maker/base.py | 1 + aea/decision_maker/default.py | 1 + aea/helpers/async_utils.py | 1 + aea/helpers/base.py | 1 + aea/helpers/exec_timeout.py | 1 + aea/helpers/file_lock.py | 1 + aea/helpers/ipfs/base.py | 1 + aea/helpers/multiaddr/base.py | 1 + aea/helpers/multiple_executor.py | 1 + aea/helpers/pipe.py | 1 + aea/helpers/search/generic.py | 1 + aea/helpers/search/models.py | 1 + aea/helpers/transaction/base.py | 1 + aea/helpers/win32.py | 1 + aea/identity/base.py | 1 + aea/launcher.py | 1 + aea/mail/base.py | 1 + aea/protocols/base.py | 1 + aea/protocols/default/__init__.py | 1 + aea/protocols/default/message.py | 1 + aea/protocols/default/protocol.yaml | 4 +- aea/protocols/generator/base.py | 1 + aea/protocols/generator/common.py | 1 + aea/protocols/generator/validate.py | 1 + aea/protocols/scaffold/__init__.py | 1 + aea/protocols/scaffold/protocol.yaml | 2 +- aea/protocols/signing/__init__.py | 1 + aea/protocols/signing/message.py | 1 + aea/protocols/signing/protocol.yaml | 4 +- aea/protocols/state_update/__init__.py | 1 + aea/protocols/state_update/message.py | 1 + aea/protocols/state_update/protocol.yaml | 4 +- aea/registries/base.py | 1 + aea/registries/filter.py | 1 + aea/runner.py | 1 + aea/runtime.py | 1 + aea/skills/base.py | 1 + aea/test_tools/test_cases.py | 1 + benchmark/checks/check_multiagent.py | 1 + benchmark/checks/utils.py | 1 + benchmark/framework/executor.py | 1 + examples/gym_ex/gyms/env.py | 1 + examples/gym_ex/proxy/agent.py | 1 + examples/gym_ex/proxy/env.py | 1 + examples/gym_ex/rl/agent.py | 1 + examples/gym_ex/train.py | 1 + .../fetchai/connections/gym/connection.py | 1 + .../fetchai/connections/gym/connection.yaml | 2 +- .../connections/http_client/connection.py | 1 + .../connections/http_client/connection.yaml | 2 +- .../connections/http_server/connection.py | 1 + .../connections/http_server/connection.yaml | 2 +- packages/fetchai/connections/ledger/base.py | 1 + .../connections/ledger/connection.yaml | 2 +- .../fetchai/connections/local/connection.py | 1 + .../fetchai/connections/local/connection.yaml | 2 +- .../fetchai/connections/oef/connection.py | 1 + .../fetchai/connections/oef/connection.yaml | 4 +- .../connections/oef/object_translator.py | 1 + .../connections/p2p_libp2p/connection.py | 1 + .../connections/p2p_libp2p/connection.yaml | 2 +- .../p2p_libp2p_client/connection.py | 1 + .../p2p_libp2p_client/connection.yaml | 2 +- .../connections/p2p_stub/connection.py | 1 + .../connections/p2p_stub/connection.yaml | 2 +- .../fetchai/connections/soef/connection.py | 1 + .../fetchai/connections/soef/connection.yaml | 2 +- packages/fetchai/connections/tcp/base.py | 1 + .../fetchai/connections/tcp/connection.yaml | 6 +- .../fetchai/connections/tcp/tcp_client.py | 1 + .../fetchai/connections/tcp/tcp_server.py | 1 + .../fetchai/connections/webhook/connection.py | 1 + .../connections/webhook/connection.yaml | 2 +- .../fetchai/contracts/erc1155/contract.py | 1 + .../fetchai/contracts/erc1155/contract.yaml | 2 +- .../protocols/contract_api/__init__.py | 1 + .../protocols/contract_api/custom_types.py | 1 + .../fetchai/protocols/contract_api/message.py | 1 + .../protocols/contract_api/protocol.yaml | 6 +- packages/fetchai/protocols/fipa/__init__.py | 1 + .../fetchai/protocols/fipa/custom_types.py | 1 + packages/fetchai/protocols/fipa/message.py | 1 + packages/fetchai/protocols/fipa/protocol.yaml | 6 +- packages/fetchai/protocols/gym/__init__.py | 1 + packages/fetchai/protocols/gym/message.py | 1 + packages/fetchai/protocols/gym/protocol.yaml | 4 +- packages/fetchai/protocols/http/__init__.py | 1 + packages/fetchai/protocols/http/message.py | 1 + packages/fetchai/protocols/http/protocol.yaml | 4 +- .../fetchai/protocols/ledger_api/__init__.py | 1 + .../protocols/ledger_api/custom_types.py | 1 + .../fetchai/protocols/ledger_api/message.py | 1 + .../protocols/ledger_api/protocol.yaml | 6 +- .../fetchai/protocols/ml_trade/__init__.py | 1 + .../protocols/ml_trade/custom_types.py | 1 + .../fetchai/protocols/ml_trade/message.py | 1 + .../fetchai/protocols/ml_trade/protocol.yaml | 6 +- .../fetchai/protocols/oef_search/__init__.py | 1 + .../protocols/oef_search/custom_types.py | 1 + .../fetchai/protocols/oef_search/message.py | 1 + .../protocols/oef_search/protocol.yaml | 6 +- packages/fetchai/protocols/tac/__init__.py | 1 + .../fetchai/protocols/tac/custom_types.py | 1 + packages/fetchai/protocols/tac/message.py | 1 + packages/fetchai/protocols/tac/protocol.yaml | 6 +- .../fetchai/skills/aries_alice/behaviours.py | 1 + .../fetchai/skills/aries_alice/dialogues.py | 1 + .../fetchai/skills/aries_alice/skill.yaml | 6 +- .../fetchai/skills/aries_alice/strategy.py | 1 + .../fetchai/skills/aries_faber/behaviours.py | 1 + .../fetchai/skills/aries_faber/dialogues.py | 1 + .../fetchai/skills/aries_faber/handlers.py | 1 + .../fetchai/skills/aries_faber/skill.yaml | 8 +- .../fetchai/skills/aries_faber/strategy.py | 1 + .../skills/carpark_client/behaviours.py | 1 + .../skills/carpark_client/dialogues.py | 1 + .../fetchai/skills/carpark_client/handlers.py | 1 + .../fetchai/skills/carpark_client/skill.yaml | 8 +- .../fetchai/skills/carpark_client/strategy.py | 1 + .../skills/carpark_detection/behaviours.py | 1 + .../skills/carpark_detection/database.py | 1 + .../skills/carpark_detection/dialogues.py | 1 + .../skills/carpark_detection/handlers.py | 1 + .../skills/carpark_detection/skill.yaml | 10 +- .../skills/carpark_detection/strategy.py | 1 + packages/fetchai/skills/echo/dialogues.py | 1 + packages/fetchai/skills/echo/skill.yaml | 2 +- .../skills/erc1155_client/behaviours.py | 1 + .../fetchai/skills/erc1155_client/handlers.py | 1 + .../fetchai/skills/erc1155_client/skill.yaml | 6 +- .../fetchai/skills/erc1155_client/strategy.py | 1 + .../skills/erc1155_deploy/behaviours.py | 1 + .../fetchai/skills/erc1155_deploy/handlers.py | 1 + .../fetchai/skills/erc1155_deploy/skill.yaml | 6 +- .../fetchai/skills/erc1155_deploy/strategy.py | 1 + .../skills/generic_buyer/behaviours.py | 1 + .../fetchai/skills/generic_buyer/dialogues.py | 1 + .../fetchai/skills/generic_buyer/handlers.py | 1 + .../fetchai/skills/generic_buyer/skill.yaml | 8 +- .../fetchai/skills/generic_buyer/strategy.py | 1 + .../skills/generic_seller/behaviours.py | 1 + .../skills/generic_seller/dialogues.py | 1 + .../fetchai/skills/generic_seller/handlers.py | 1 + .../fetchai/skills/generic_seller/skill.yaml | 8 +- .../fetchai/skills/generic_seller/strategy.py | 1 + packages/fetchai/skills/gym/dialogues.py | 1 + packages/fetchai/skills/gym/helpers.py | 1 + packages/fetchai/skills/gym/rl_agent.py | 1 + packages/fetchai/skills/gym/skill.yaml | 6 +- .../fetchai/skills/http_echo/dialogues.py | 1 + packages/fetchai/skills/http_echo/skill.yaml | 2 +- .../skills/ml_data_provider/behaviours.py | 1 + .../skills/ml_data_provider/dialogues.py | 1 + .../skills/ml_data_provider/skill.yaml | 6 +- .../skills/ml_data_provider/strategy.py | 1 + .../fetchai/skills/ml_train/behaviours.py | 1 + packages/fetchai/skills/ml_train/dialogues.py | 1 + packages/fetchai/skills/ml_train/handlers.py | 1 + packages/fetchai/skills/ml_train/ml_model.py | 1 + packages/fetchai/skills/ml_train/skill.yaml | 10 +- packages/fetchai/skills/ml_train/strategy.py | 1 + .../simple_service_registration/behaviours.py | 1 + .../simple_service_registration/dialogues.py | 1 + .../simple_service_registration/handlers.py | 1 + .../simple_service_registration/skill.yaml | 8 +- .../simple_service_registration/strategy.py | 1 + .../fetchai/skills/tac_control/dialogues.py | 1 + packages/fetchai/skills/tac_control/game.py | 1 + .../fetchai/skills/tac_control/helpers.py | 1 + .../fetchai/skills/tac_control/parameters.py | 1 + .../fetchai/skills/tac_control/skill.yaml | 8 +- .../skills/tac_control_contract/behaviours.py | 1 + .../skills/tac_control_contract/game.py | 1 + .../skills/tac_control_contract/helpers.py | 1 + .../skills/tac_control_contract/parameters.py | 1 + .../skills/tac_control_contract/skill.yaml | 8 +- .../skills/tac_negotiation/behaviours.py | 1 + .../skills/tac_negotiation/dialogues.py | 1 + .../fetchai/skills/tac_negotiation/helpers.py | 1 + .../fetchai/skills/tac_negotiation/skill.yaml | 10 +- .../skills/tac_negotiation/strategy.py | 1 + .../skills/tac_negotiation/transactions.py | 1 + .../skills/tac_participation/dialogues.py | 1 + .../fetchai/skills/tac_participation/game.py | 1 + .../skills/tac_participation/skill.yaml | 4 +- .../fetchai/skills/thermometer/behaviours.py | 1 + .../fetchai/skills/thermometer/dialogues.py | 1 + .../fetchai/skills/thermometer/handlers.py | 1 + .../fetchai/skills/thermometer/skill.yaml | 8 +- .../fetchai/skills/thermometer/strategy.py | 1 + .../skills/thermometer_client/behaviours.py | 1 + .../skills/thermometer_client/dialogues.py | 1 + .../skills/thermometer_client/handlers.py | 1 + .../skills/thermometer_client/skill.yaml | 8 +- .../skills/thermometer_client/strategy.py | 1 + .../skills/weather_client/behaviours.py | 1 + .../skills/weather_client/dialogues.py | 1 + .../fetchai/skills/weather_client/handlers.py | 1 + .../fetchai/skills/weather_client/skill.yaml | 8 +- .../fetchai/skills/weather_client/strategy.py | 1 + .../skills/weather_station/behaviours.py | 1 + .../weather_station/db_communication.py | 1 + .../skills/weather_station/dialogues.py | 1 + .../dummy_weather_station_data.py | 1 + .../skills/weather_station/handlers.py | 1 + .../fetchai/skills/weather_station/skill.yaml | 12 +-- .../skills/weather_station/strategy.py | 1 + packages/hashes.csv | 96 +++++++++---------- scripts/check_copyright_notice.py | 1 + scripts/check_doc_links.py | 1 + scripts/check_package_dependencies.py | 1 + scripts/check_package_versions_in_docs.py | 1 + scripts/deploy_to_registry.py | 1 + scripts/generate_api_docs.py | 1 + scripts/generate_ipfs_hashes.py | 1 + scripts/update_package_versions.py | 1 + scripts/update_symlinks_cross_platform.py | 1 + setup.cfg | 1 + tests/common/utils.py | 1 + tests/conftest.py | 1 + tests/data/generator/t_protocol/__init__.py | 1 + tests/data/generator/t_protocol/message.py | 1 + .../generator/t_protocol_no_ct/__init__.py | 1 + .../generator/t_protocol_no_ct/message.py | 1 + tests/test_aea_builder.py | 1 + tests/test_cli/constants.py | 1 + tests/test_cli/test_launch.py | 1 + tests/test_cli/test_utils/test_utils.py | 1 + tests/test_connections/test_stub.py | 1 + tests/test_crypto/test_helpers.py | 1 + tests/test_crypto/test_ledger_apis.py | 1 + tests/test_crypto/test_registries.py | 1 + .../test_registry/test_crypto_registry.py | 1 + .../test_registry/test_ledger_api_registry.py | 1 + .../test_agent_vs_aea/agent_code_block.py | 1 + .../test_agent_vs_aea/test_agent_vs_aea.py | 1 + .../test_bash_yaml/test_demo_docs.py | 1 + .../programmatic_aea.py | 1 + .../test_programmatic_aea.py | 1 + .../programmatic_aea.py | 1 + .../test_cli_vs_programmatic_aea.py | 1 + .../decision_maker_transaction.py | 1 + .../test_decision_maker_transaction.py | 1 + .../test_generic_step_by_step_guide.py | 1 + .../multiplexer_standalone.py | 1 + .../test_multiplexer_standalone.py | 1 + .../test_orm_integration.py | 1 + .../test_skill_guide/test_skill_guide.py | 1 + .../standalone_transaction.py | 1 + .../test_standalone_transaction.py | 1 + tests/test_examples/test_gym_ex.py | 1 + ..._client_connection_to_aries_cloud_agent.py | 1 + tests/test_helpers/test_exec_timeout.py | 1 + tests/test_helpers/test_ipfs/test_base.py | 1 + tests/test_helpers/test_multiaddr.py | 1 + .../test_connections/test_gym/test_gym.py | 1 + .../test_http_client/test_http_client.py | 1 + .../test_http_server/test_http_server.py | 1 + .../test_http_server_and_client.py | 1 + .../test_ledger/test_ledger_api.py | 1 + .../test_oef/test_communication.py | 1 + .../test_p2p_libp2p/test_aea_cli.py | 1 + .../test_p2p_libp2p/test_communication.py | 1 + .../test_p2p_libp2p/test_errors.py | 1 + .../test_p2p_libp2p/test_fault_tolerance.py | 1 + .../test_p2p_libp2p/test_public_dht.py | 1 + .../test_p2p_libp2p_client/test_aea_cli.py | 1 + .../test_communication.py | 1 + .../test_p2p_stub/test_p2p_stub.py | 1 + .../test_connections/test_soef/models.py | 1 + .../test_soef/test_soef_integration.py | 1 + .../test_webhook/test_webhook.py | 1 + .../test_erc1155/test_contract.py | 1 + .../test_protocols/test_contract_api.py | 1 + .../test_packages/test_protocols/test_fipa.py | 1 + .../test_packages/test_protocols/test_gym.py | 1 + .../test_packages/test_protocols/test_http.py | 1 + .../test_protocols/test_ledger_api.py | 1 + .../test_protocols/test_ml_trade.py | 1 + .../test_protocols/test_oef_search.py | 1 + .../test_packages/test_protocols/test_tac.py | 1 + .../test_skills/test_http_echo.py | 1 + tests/test_protocols/test_generator/common.py | 1 + .../test_generator/test_common.py | 1 + .../test_generator/test_end_to_end.py | 1 + .../test_extract_specification.py | 1 + .../test_generator/test_generator.py | 1 + .../test_generator/test_validate.py | 1 + tests/test_skills/test_error.py | 1 + tests/test_test_tools/test_testcases.py | 1 + 321 files changed, 446 insertions(+), 174 deletions(-) diff --git a/aea/__init__.py b/aea/__init__.py index 23ed8227c4..8fc0f884ed 100644 --- a/aea/__init__.py +++ b/aea/__init__.py @@ -33,4 +33,5 @@ __version__, ) + AEA_DIR = os.path.dirname(inspect.getfile(inspect.currentframe())) # type: ignore diff --git a/aea/aea_builder.py b/aea/aea_builder.py index c302b710ba..a3570bbdef 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -83,6 +83,7 @@ from aea.identity.base import Identity from aea.registries.resources import Resources + PathLike = Union[os.PathLike, Path, str] logger = logging.getLogger(__name__) diff --git a/aea/agent.py b/aea/agent.py index 16188a0e03..b62acaadf6 100644 --- a/aea/agent.py +++ b/aea/agent.py @@ -29,6 +29,7 @@ from aea.multiplexer import InBox, OutBox from aea.runtime import AsyncRuntime, BaseRuntime, RuntimeStates, ThreadedRuntime + logger = logging.getLogger(__name__) diff --git a/aea/agent_loop.py b/aea/agent_loop.py index cfed6e08fc..59fff7c62d 100644 --- a/aea/agent_loop.py +++ b/aea/agent_loop.py @@ -39,6 +39,7 @@ from aea.helpers.exec_timeout import ExecTimeoutThreadGuard, TimeoutException from aea.helpers.logging import WithLogger + logger = logging.getLogger(__name__) diff --git a/aea/cli/__main__.py b/aea/cli/__main__.py index 129ecab13f..b67db019ec 100755 --- a/aea/cli/__main__.py +++ b/aea/cli/__main__.py @@ -22,5 +22,6 @@ from aea.cli.core import cli + if __name__ == "__main__": cli(prog_name="aea") # pragma: no cover diff --git a/aea/cli/get_multiaddress.py b/aea/cli/get_multiaddress.py index 3013f5077d..59ce38b96e 100644 --- a/aea/cli/get_multiaddress.py +++ b/aea/cli/get_multiaddress.py @@ -37,6 +37,7 @@ from aea.exceptions import enforce from aea.helpers.multiaddr.base import MultiAddr + URI_REGEX = re.compile(r"(?:https?://)?(?P[^:/ ]+):(?P[0-9]*)") diff --git a/aea/cli/utils/constants.py b/aea/cli/utils/constants.py index 4f699a7be6..0504843d48 100644 --- a/aea/cli/utils/constants.py +++ b/aea/cli/utils/constants.py @@ -30,6 +30,7 @@ DEFAULT_SKILL_CONFIG_FILE, ) + AEA_DIR = str(Path(".")) ITEM_TYPES = ("connection", "contract", "protocol", "skill") diff --git a/aea/cli/utils/decorators.py b/aea/cli/utils/decorators.py index 87fd3cd604..a05830e4b4 100644 --- a/aea/cli/utils/decorators.py +++ b/aea/cli/utils/decorators.py @@ -40,6 +40,7 @@ from aea.configurations.loader import ConfigLoaders from aea.exceptions import AEAException, enforce + pass_ctx = click.make_pass_decorator(Context) diff --git a/aea/cli/utils/loggers.py b/aea/cli/utils/loggers.py index b549d39aa5..237315f396 100644 --- a/aea/cli/utils/loggers.py +++ b/aea/cli/utils/loggers.py @@ -24,6 +24,7 @@ import click + OFF = 100 logging.addLevelName(OFF, "OFF") diff --git a/aea/cli/utils/package_utils.py b/aea/cli/utils/package_utils.py index f36dc4c469..c4c57b7f76 100644 --- a/aea/cli/utils/package_utils.py +++ b/aea/cli/utils/package_utils.py @@ -45,6 +45,7 @@ from aea.crypto.ledger_apis import DEFAULT_LEDGER_CONFIGS, LedgerApis from aea.crypto.wallet import Wallet + ROOT = Path(".") diff --git a/aea/cli_gui/__init__.py b/aea/cli_gui/__init__.py index 0f17a05e87..e9a490bbf9 100644 --- a/aea/cli_gui/__init__.py +++ b/aea/cli_gui/__init__.py @@ -54,6 +54,7 @@ ) from aea.configurations.base import PublicId + elements = [ ["local", "agent", "localAgents"], ["registered", "protocol", "registeredProtocols"], diff --git a/aea/cli_gui/__main__.py b/aea/cli_gui/__main__.py index ec96f89fb2..7bed31763d 100644 --- a/aea/cli_gui/__main__.py +++ b/aea/cli_gui/__main__.py @@ -23,6 +23,7 @@ import aea.cli_gui # pragma: no cover + parser = argparse.ArgumentParser( description="Launch the gui through python" ) # pragma: no cover diff --git a/aea/components/base.py b/aea/components/base.py index 08e906fe27..d02c1ef295 100644 --- a/aea/components/base.py +++ b/aea/components/base.py @@ -35,6 +35,7 @@ from aea.exceptions import AEAEnforceError from aea.helpers.logging import WithLogger + logger = logging.getLogger(__name__) diff --git a/aea/components/loader.py b/aea/components/loader.py index 8e192bd68f..c2a4ad8f0e 100644 --- a/aea/components/loader.py +++ b/aea/components/loader.py @@ -30,6 +30,7 @@ from aea.protocols.base import Protocol from aea.skills.base import Skill + logger = logging.getLogger(__name__) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 2e3b245828..9d633e2776 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -54,6 +54,7 @@ from aea.exceptions import enforce from aea.helpers.ipfs.base import IPFSHashOnly + T = TypeVar("T") DEFAULT_VERSION = "0.1.0" DEFAULT_AEA_CONFIG_FILE = "aea-config.yaml" diff --git a/aea/configurations/constants.py b/aea/configurations/constants.py index 9370662185..128ffd8080 100644 --- a/aea/configurations/constants.py +++ b/aea/configurations/constants.py @@ -25,6 +25,7 @@ from aea.crypto.fetchai import FetchAICrypto from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA + DEFAULT_CONNECTION = PublicId.from_str("fetchai/stub:0.9.0") DEFAULT_PROTOCOL = PublicId.from_str("fetchai/default:0.5.0") DEFAULT_SKILL = PublicId.from_str("fetchai/error:0.5.0") diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index 5c0b51a1a8..8a5c1e84d0 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -48,6 +48,7 @@ from aea.exceptions import enforce from aea.helpers.base import yaml_dump, yaml_dump_all, yaml_load, yaml_load_all + _CUR_DIR = os.path.dirname(inspect.getfile(inspect.currentframe())) # type: ignore _SCHEMAS_DIR = os.path.join(_CUR_DIR, "schemas") diff --git a/aea/connections/base.py b/aea/connections/base.py index 9542b78b6b..a34afba31e 100644 --- a/aea/connections/base.py +++ b/aea/connections/base.py @@ -37,6 +37,7 @@ from aea.helpers.base import load_module from aea.identity.base import Identity + if TYPE_CHECKING: from aea.mail.base import Address, Envelope # pragma: no cover diff --git a/aea/connections/stub/connection.py b/aea/connections/stub/connection.py index 155aee920b..a80267f0c9 100644 --- a/aea/connections/stub/connection.py +++ b/aea/connections/stub/connection.py @@ -35,6 +35,7 @@ from aea.helpers.base import exception_log_and_reraise from aea.mail.base import Envelope + logger = logging.getLogger(__name__) INPUT_FILE_KEY = "input_file" diff --git a/aea/connections/stub/connection.yaml b/aea/connections/stub/connection.yaml index cdd0ca8581..743ee3598a 100644 --- a/aea/connections/stub/connection.yaml +++ b/aea/connections/stub/connection.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: __init__.py: QmWwepN9Fy9gHAp39vUGFSLdnB9JZjdyE3STnbowSUhJkC - connection.py: QmYAWVhNoWhJNaCkEh5cMScJ53a1gkfcBNGt9LLxftyUuR + connection.py: QmTSESVFvsDc9iq2QM3YdZju3yHqTA3wHbLkAzHXEFY17Z readme.md: QmXSAtxSY7C2YkvUxeVnpqCJY9uJYZxZBmuUcE4zjFXcXz fingerprint_ignore_patterns: [] protocols: [] diff --git a/aea/contracts/base.py b/aea/contracts/base.py index 3d2c10f6d8..21b34fd78b 100644 --- a/aea/contracts/base.py +++ b/aea/contracts/base.py @@ -32,6 +32,7 @@ from aea.exceptions import AEAException, enforce from aea.helpers.base import load_module + contract_registry: Registry["Contract"] = Registry["Contract"]() logger = logging.getLogger(__name__) diff --git a/aea/crypto/__init__.py b/aea/crypto/__init__.py index 11df4e865b..3006b6a9a8 100644 --- a/aea/crypto/__init__.py +++ b/aea/crypto/__init__.py @@ -25,6 +25,7 @@ from aea.crypto.registries import register_crypto # noqa from aea.crypto.registries import register_faucet_api, register_ledger_api + register_crypto( id_=FetchAICrypto.identifier, entry_point="aea.crypto.fetchai:FetchAICrypto" ) diff --git a/aea/crypto/base.py b/aea/crypto/base.py index 0b8fb15d75..2f70e8513b 100644 --- a/aea/crypto/base.py +++ b/aea/crypto/base.py @@ -24,6 +24,7 @@ from aea.common import Address + EntityClass = TypeVar("EntityClass") diff --git a/aea/crypto/cosmos.py b/aea/crypto/cosmos.py index 051fb376f6..d0a94db085 100644 --- a/aea/crypto/cosmos.py +++ b/aea/crypto/cosmos.py @@ -41,6 +41,7 @@ from aea.exceptions import AEAEnforceError from aea.helpers.base import try_decorator + logger = logging.getLogger(__name__) _COSMOS = "cosmos" diff --git a/aea/crypto/ethereum.py b/aea/crypto/ethereum.py index 7e05306166..0f4eb47d3c 100644 --- a/aea/crypto/ethereum.py +++ b/aea/crypto/ethereum.py @@ -39,6 +39,7 @@ from aea.exceptions import enforce from aea.helpers.base import try_decorator + logger = logging.getLogger(__name__) _ETHEREUM = "ethereum" diff --git a/aea/crypto/fetchai.py b/aea/crypto/fetchai.py index 2108fa3512..f3f77a1355 100644 --- a/aea/crypto/fetchai.py +++ b/aea/crypto/fetchai.py @@ -21,6 +21,7 @@ from aea.crypto.cosmos import CosmosCrypto, CosmosFaucetApi, CosmosHelper, _CosmosApi + _FETCHAI = "fetchai" _FETCH = "fetch" TESTNET_NAME = "testnet" diff --git a/aea/crypto/helpers.py b/aea/crypto/helpers.py index 53d64a31a9..cffc763e35 100644 --- a/aea/crypto/helpers.py +++ b/aea/crypto/helpers.py @@ -27,6 +27,7 @@ from aea.configurations.loader import ConfigLoaders from aea.crypto.registries import crypto_registry, make_crypto, make_faucet_api + PRIVATE_KEY_PATH_SCHEMA = "{}_private_key.txt" logger = logging.getLogger(__name__) diff --git a/aea/crypto/ledger_apis.py b/aea/crypto/ledger_apis.py index bdf82496f4..5773b5b83f 100644 --- a/aea/crypto/ledger_apis.py +++ b/aea/crypto/ledger_apis.py @@ -37,6 +37,7 @@ ) from aea.exceptions import enforce + DEFAULT_LEDGER_CONFIGS = { CosmosApi.identifier: {"address": COSMOS_DEFAULT_ADDRESS}, EthereumApi.identifier: { diff --git a/aea/crypto/registries/__init__.py b/aea/crypto/registries/__init__.py index 21c94d61cc..0087cc6fe7 100644 --- a/aea/crypto/registries/__init__.py +++ b/aea/crypto/registries/__init__.py @@ -23,6 +23,7 @@ from aea.crypto.base import Crypto, FaucetApi, LedgerApi from aea.crypto.registries.base import Registry + crypto_registry: Registry[Crypto] = Registry[Crypto]() register_crypto = crypto_registry.register make_crypto: Callable[..., Crypto] = crypto_registry.make diff --git a/aea/crypto/registries/base.py b/aea/crypto/registries/base.py index 854a1cb26e..2bd4427d31 100644 --- a/aea/crypto/registries/base.py +++ b/aea/crypto/registries/base.py @@ -26,6 +26,7 @@ from aea.exceptions import AEAException from aea.helpers.base import RegexConstrainedString + """A regex to match a Python identifier (i.e. a module/class name).""" PY_ID_REGEX = r"[^\d\W]\w*" ITEM_ID_REGEX = r"[:/._A-Za-z0-9]+" diff --git a/aea/crypto/wallet.py b/aea/crypto/wallet.py index 29a19f1be2..e030ef31d7 100644 --- a/aea/crypto/wallet.py +++ b/aea/crypto/wallet.py @@ -25,6 +25,7 @@ from aea.crypto.base import Crypto from aea.crypto.registries import make_crypto + logger = logging.getLogger(__name__) diff --git a/aea/decision_maker/base.py b/aea/decision_maker/base.py index d70a7a0eba..2565b84f75 100644 --- a/aea/decision_maker/base.py +++ b/aea/decision_maker/base.py @@ -34,6 +34,7 @@ from aea.identity.base import Identity from aea.protocols.base import Message + logger = logging.getLogger(__name__) diff --git a/aea/decision_maker/default.py b/aea/decision_maker/default.py index 4e4fb3feb7..a43d6c1973 100644 --- a/aea/decision_maker/default.py +++ b/aea/decision_maker/default.py @@ -47,6 +47,7 @@ ) from aea.protocols.state_update.message import StateUpdateMessage + CurrencyHoldings = Dict[str, int] # a map from identifier to quantity GoodHoldings = Dict[str, int] # a map from identifier to quantity UtilityParams = Dict[str, float] # a map from identifier to quantity diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 435ec5a72d..3adb111db1 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -44,6 +44,7 @@ Union, ) + try: from asyncio import create_task # pylint: disable=ungrouped-imports,unused-import except ImportError: # pragma: no cover diff --git a/aea/helpers/base.py b/aea/helpers/base.py index ed1a8aed80..89cd6e3e71 100644 --- a/aea/helpers/base.py +++ b/aea/helpers/base.py @@ -39,6 +39,7 @@ import yaml from dotenv import load_dotenv + logger = logging.getLogger(__name__) diff --git a/aea/helpers/exec_timeout.py b/aea/helpers/exec_timeout.py index d291a1f88b..674e80e79b 100644 --- a/aea/helpers/exec_timeout.py +++ b/aea/helpers/exec_timeout.py @@ -30,6 +30,7 @@ from types import TracebackType from typing import Optional, Type + logger = logging.getLogger(__file__) diff --git a/aea/helpers/file_lock.py b/aea/helpers/file_lock.py index 7939178331..afb99642c8 100644 --- a/aea/helpers/file_lock.py +++ b/aea/helpers/file_lock.py @@ -22,6 +22,7 @@ import os + # needs win32all to work on Windows if os.name == "nt": # pragma: nocover # cause platform dependent! import pywintypes # pylint: disable=import-error diff --git a/aea/helpers/ipfs/base.py b/aea/helpers/ipfs/base.py index 8f218db261..8a837d54e9 100644 --- a/aea/helpers/ipfs/base.py +++ b/aea/helpers/ipfs/base.py @@ -27,6 +27,7 @@ from aea.helpers.ipfs.pb import merkledag_pb2, unixfs_pb2 + # https://github.com/multiformats/multicodec/blob/master/table.csv SHA256_ID = "12" # 0x12 LEN_SHA256 = "20" # 0x20 diff --git a/aea/helpers/multiaddr/base.py b/aea/helpers/multiaddr/base.py index 0f477f448e..01d12a4289 100644 --- a/aea/helpers/multiaddr/base.py +++ b/aea/helpers/multiaddr/base.py @@ -27,6 +27,7 @@ from aea.helpers.multiaddr.crypto_pb2 import KeyType, PublicKey + # NOTE: # - Reference: https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md#keys # - Implementation inspired from https://github.com/libp2p/py-libp2p diff --git a/aea/helpers/multiple_executor.py b/aea/helpers/multiple_executor.py index 7768c85dde..a4d0772c12 100644 --- a/aea/helpers/multiple_executor.py +++ b/aea/helpers/multiple_executor.py @@ -40,6 +40,7 @@ cast, ) + logger = logging.getLogger(__name__) diff --git a/aea/helpers/pipe.py b/aea/helpers/pipe.py index f2e19ccf92..d0738f4a91 100644 --- a/aea/helpers/pipe.py +++ b/aea/helpers/pipe.py @@ -33,6 +33,7 @@ from aea.exceptions import enforce + _default_logger = logging.getLogger(__name__) PIPE_CONN_TIMEOUT = 10.0 diff --git a/aea/helpers/search/generic.py b/aea/helpers/search/generic.py index 5af99adc88..5891d71a3a 100644 --- a/aea/helpers/search/generic.py +++ b/aea/helpers/search/generic.py @@ -24,6 +24,7 @@ from aea.exceptions import enforce from aea.helpers.search.models import Attribute, DataModel, Location + SUPPORTED_TYPES = {"str": str, "int": int, "float": float, "bool": bool} diff --git a/aea/helpers/search/models.py b/aea/helpers/search/models.py index 02dbe0b686..164b52dc59 100644 --- a/aea/helpers/search/models.py +++ b/aea/helpers/search/models.py @@ -29,6 +29,7 @@ from aea.exceptions import enforce + logger = logging.getLogger(__name__) diff --git a/aea/helpers/transaction/base.py b/aea/helpers/transaction/base.py index d096b01792..f281627435 100644 --- a/aea/helpers/transaction/base.py +++ b/aea/helpers/transaction/base.py @@ -27,6 +27,7 @@ from aea.crypto.ledger_apis import LedgerApis from aea.exceptions import enforce + Address = str diff --git a/aea/helpers/win32.py b/aea/helpers/win32.py index c5a81b91c7..d48b67874f 100644 --- a/aea/helpers/win32.py +++ b/aea/helpers/win32.py @@ -22,6 +22,7 @@ import logging import platform + logger = logging.getLogger(__file__) diff --git a/aea/identity/base.py b/aea/identity/base.py index 888a3b4375..20f61dc4fd 100644 --- a/aea/identity/base.py +++ b/aea/identity/base.py @@ -24,6 +24,7 @@ from aea.common import Address from aea.configurations.constants import DEFAULT_LEDGER + DEFAULT_ADDRESS_KEY = DEFAULT_LEDGER diff --git a/aea/launcher.py b/aea/launcher.py index 36c0352e24..c8af13f718 100644 --- a/aea/launcher.py +++ b/aea/launcher.py @@ -44,6 +44,7 @@ ) from aea.runtime import AsyncRuntime + logger = logging.getLogger(__name__) diff --git a/aea/mail/base.py b/aea/mail/base.py index 7e41685ec5..a21fb58527 100644 --- a/aea/mail/base.py +++ b/aea/mail/base.py @@ -29,6 +29,7 @@ from aea.mail import base_pb2 from aea.protocols.base import Message + logger = logging.getLogger(__name__) diff --git a/aea/protocols/base.py b/aea/protocols/base.py index a9a9981fe1..b9eae56380 100644 --- a/aea/protocols/base.py +++ b/aea/protocols/base.py @@ -35,6 +35,7 @@ from aea.configurations.loader import load_component_configuration from aea.exceptions import enforce + logger = logging.getLogger(__name__) Address = str diff --git a/aea/protocols/default/__init__.py b/aea/protocols/default/__init__.py index 8b6776854d..84923b00ef 100644 --- a/aea/protocols/default/__init__.py +++ b/aea/protocols/default/__init__.py @@ -22,4 +22,5 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.default.serialization import DefaultSerializer + DefaultMessage.serializer = DefaultSerializer diff --git a/aea/protocols/default/message.py b/aea/protocols/default/message.py index 547286e375..b6c2b75073 100644 --- a/aea/protocols/default/message.py +++ b/aea/protocols/default/message.py @@ -27,6 +27,7 @@ from aea.protocols.base import Message from aea.protocols.default.custom_types import ErrorCode as CustomErrorCode + logger = logging.getLogger("aea.protocols.default.message") DEFAULT_BODY_SIZE = 4 diff --git a/aea/protocols/default/protocol.yaml b/aea/protocols/default/protocol.yaml index ff9675da3a..14c867de1a 100644 --- a/aea/protocols/default/protocol.yaml +++ b/aea/protocols/default/protocol.yaml @@ -7,12 +7,12 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmP3q9463opixzdv17QXkCSQvgR8KJXgLAVkfUPpdHJzPv - __init__.py: QmPMtKUrzVJp594VqNuapJzCesWLQ6Awjqv2ufG3wKNRmH + __init__.py: QmWpWuGcXu2SodVGUZiAdMrF8Tn7MAPDbiGh7vd9nEfEX6 custom_types.py: QmRcgwDdTxkSHyfF9eoMtsb5P5GJDm4oyLq5W6ZBko1MFU default.proto: QmNzMUvXkBm5bbitR5Yi49ADiwNn1FhCvXqSKKoqAPZyXv default_pb2.py: QmSRFi1s3jcqnPuk4yopJeNuC6o58RL7dvEdt85uns3B3N dialogues.py: Qmc991snbS7DwFxo1cKcq1rQ2uj7y8ukp14kfe2zve387C - message.py: QmeaadvKib9QqpjZgd7NiDUqGRpC2eZPVpgq1dY3PYacht + message.py: QmWzSGcSeRGaHERQg6E8QaYDiCqmeJYdFqE7rrwMBP7mP2 serialization.py: QmRF7XPNEk1emKmFMZaYBCF3gr4CdkMXagoSpjQEmnRGG6 fingerprint_ignore_patterns: [] dependencies: diff --git a/aea/protocols/generator/base.py b/aea/protocols/generator/base.py index f1d06a53dd..79725aaf03 100644 --- a/aea/protocols/generator/base.py +++ b/aea/protocols/generator/base.py @@ -54,6 +54,7 @@ ) from aea.protocols.generator.extract_specification import extract + logger = logging.getLogger(__name__) diff --git a/aea/protocols/generator/common.py b/aea/protocols/generator/common.py index e0f8350f64..2e576ed293 100644 --- a/aea/protocols/generator/common.py +++ b/aea/protocols/generator/common.py @@ -28,6 +28,7 @@ from aea.configurations.base import ProtocolSpecification from aea.configurations.loader import ConfigLoader + SPECIFICATION_PRIMITIVE_TYPES = ["pt:bytes", "pt:int", "pt:float", "pt:bool", "pt:str"] SPECIFICATION_COMPOSITIONAL_TYPES = [ "pt:set", diff --git a/aea/protocols/generator/validate.py b/aea/protocols/generator/validate.py index bae664d719..6e21ce2cf0 100644 --- a/aea/protocols/generator/validate.py +++ b/aea/protocols/generator/validate.py @@ -29,6 +29,7 @@ _has_matched_brackets, ) + # The following names are reserved for standard message fields and cannot be # used as user defined names for performative or contents RESERVED_NAMES = {"body", "message_id", "dialogue_reference", "target", "performative"} diff --git a/aea/protocols/scaffold/__init__.py b/aea/protocols/scaffold/__init__.py index ffaf5d0866..8529f6170f 100644 --- a/aea/protocols/scaffold/__init__.py +++ b/aea/protocols/scaffold/__init__.py @@ -22,4 +22,5 @@ from aea.protocols.scaffold.message import MyScaffoldMessage from aea.protocols.scaffold.serialization import MyScaffoldSerializer + MyScaffoldMessage.serializer = MyScaffoldSerializer diff --git a/aea/protocols/scaffold/protocol.yaml b/aea/protocols/scaffold/protocol.yaml index 9574de00c7..e5377c1b93 100644 --- a/aea/protocols/scaffold/protocol.yaml +++ b/aea/protocols/scaffold/protocol.yaml @@ -6,7 +6,7 @@ description: The scaffold protocol scaffolds a protocol to be implemented by the license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - __init__.py: QmedGZfo1UqT6UJoRkHys9kmquia9BQcK17y2touwSENDU + __init__.py: Qmc9Ln8THrWmwou4nr3Acag7vcZ1fv8v5oRSkCWtv1aH6t message.py: QmQRGUakU9MGVAXy8Hmte5DEAvNYuzw8znt1h9Jg62ZEpM serialization.py: QmaAf5fppirUWe8JaeBbsqfbeofTHe8DDGHJooe2X389qo fingerprint_ignore_patterns: [] diff --git a/aea/protocols/signing/__init__.py b/aea/protocols/signing/__init__.py index a64e961fd6..7fd69707d7 100644 --- a/aea/protocols/signing/__init__.py +++ b/aea/protocols/signing/__init__.py @@ -22,4 +22,5 @@ from aea.protocols.signing.message import SigningMessage from aea.protocols.signing.serialization import SigningSerializer + SigningMessage.serializer = SigningSerializer diff --git a/aea/protocols/signing/message.py b/aea/protocols/signing/message.py index 68a46db489..ae0f9224b2 100644 --- a/aea/protocols/signing/message.py +++ b/aea/protocols/signing/message.py @@ -34,6 +34,7 @@ ) from aea.protocols.signing.custom_types import Terms as CustomTerms + logger = logging.getLogger("aea.packages.fetchai.protocols.signing.message") DEFAULT_BODY_SIZE = 4 diff --git a/aea/protocols/signing/protocol.yaml b/aea/protocols/signing/protocol.yaml index 0063a35e85..fc81b885eb 100644 --- a/aea/protocols/signing/protocol.yaml +++ b/aea/protocols/signing/protocol.yaml @@ -7,10 +7,10 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmSoa5dnxz53GWpWT2VvcRG4asVbzA8JzguiVgwqiLtguM - __init__.py: QmcCL3TTdvd8wxYKzf2d3cgKEtY9RzLjPCn4hex4wmb6h6 + __init__.py: Qmd7JYjcrD95jdYfSZs6j7UX5TPZfPYXuTFrUzS3FHCxhS custom_types.py: Qmc7sAyCQbAaVs5dZf9hFkTrB2BG8VAioWzbyKBAybrQ1J dialogues.py: QmQ1WKs3Dn15oDSwpc4N8hdADLxrn76U4X5SiLAmyGiPPY - message.py: QmRLWAYfjCQmdg2hH8R5R63DKYaDrzuX4dVTFqNHuyjawq + message.py: QmRX642Lz3DDWuNmkncP8jdfFaMamuv9wFhwc2fGqss5om serialization.py: QmbXSvWYfEmYyGdfuTXVJYaJfzqVLtMaLR8H3UCLZkvbSC signing.proto: QmcxyLzqhTE9xstAEzCVH17osbLxmSdALx9njmuPjhjrvZ signing_pb2.py: QmY3Ak5ih5zGvKjeZ5EnzrGX4tMYn5dWpjPArQwFeJpVKu diff --git a/aea/protocols/state_update/__init__.py b/aea/protocols/state_update/__init__.py index 0ede0392d3..7e271c83c4 100644 --- a/aea/protocols/state_update/__init__.py +++ b/aea/protocols/state_update/__init__.py @@ -22,4 +22,5 @@ from aea.protocols.state_update.message import StateUpdateMessage from aea.protocols.state_update.serialization import StateUpdateSerializer + StateUpdateMessage.serializer = StateUpdateSerializer diff --git a/aea/protocols/state_update/message.py b/aea/protocols/state_update/message.py index 2444c40c0f..eee05054c2 100644 --- a/aea/protocols/state_update/message.py +++ b/aea/protocols/state_update/message.py @@ -26,6 +26,7 @@ from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + logger = logging.getLogger("aea.packages.fetchai.protocols.state_update.message") DEFAULT_BODY_SIZE = 4 diff --git a/aea/protocols/state_update/protocol.yaml b/aea/protocols/state_update/protocol.yaml index 4e9d8b1f7c..66b150339e 100644 --- a/aea/protocols/state_update/protocol.yaml +++ b/aea/protocols/state_update/protocol.yaml @@ -7,9 +7,9 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: Qmc12hnCshAE3TL9ba4vo6L8ZZhynyfhEUoStJggRrbimc - __init__.py: Qma2opyN54gwTpkVV1E14jjeMmMfoqgE6XMM9LsvGuTdkm + __init__.py: QmUrvqDr24Ph1nnUqjTUPh9QoftuTsef3Dj3yzPUMY38fu dialogues.py: Qmd59WgpFccLn1zhpLdwm3zDCmCsjSoQXVn6M7PgFwwkgR - message.py: QmbXbxXbu1vzrCjzDy6qDtEvssmiHKFLWGgCEenrE4TPZW + message.py: QmchGWKst8yaXthWYT6prHAXJF4RACuaq81Tnc4Y4PFuXE serialization.py: QmciaNPHkpyxWLYVtBPnYkKHj6Ur9E3CPJ9QvWbXFD91Yw state_update.proto: QmdmEUSa7PDxJ98ZmGE7bLFPmUJv8refgbkHPejw6uDdwD state_update_pb2.py: QmQr5KXhapRv9AnfQe7Xbr5bBqYWp9DEMLjxX8UWmK75Z4 diff --git a/aea/registries/base.py b/aea/registries/base.py index 60fce0f86f..ed265d83a5 100644 --- a/aea/registries/base.py +++ b/aea/registries/base.py @@ -35,6 +35,7 @@ from aea.helpers.logging import WithLogger from aea.skills.base import Behaviour, Handler, Model + logger = logging.getLogger(__name__) Item = TypeVar("Item") diff --git a/aea/registries/filter.py b/aea/registries/filter.py index fde6e48ce7..38c434b953 100644 --- a/aea/registries/filter.py +++ b/aea/registries/filter.py @@ -27,6 +27,7 @@ from aea.registries.resources import Resources from aea.skills.base import Behaviour, Handler + logger = logging.getLogger(__name__) diff --git a/aea/runner.py b/aea/runner.py index 3620ff03f4..4b00f4e0a4 100644 --- a/aea/runner.py +++ b/aea/runner.py @@ -33,6 +33,7 @@ ) from aea.runtime import AsyncRuntime + logger = logging.getLogger(__name__) diff --git a/aea/runtime.py b/aea/runtime.py index d31342075b..d8c81f139c 100644 --- a/aea/runtime.py +++ b/aea/runtime.py @@ -36,6 +36,7 @@ from aea.multiplexer import AsyncMultiplexer, Multiplexer from aea.skills.tasks import TaskManager + logger = logging.getLogger(__name__) diff --git a/aea/skills/base.py b/aea/skills/base.py index 1e9fff3d96..25b1756a0c 100644 --- a/aea/skills/base.py +++ b/aea/skills/base.py @@ -49,6 +49,7 @@ from aea.protocols.base import Message from aea.skills.tasks import TaskManager + _default_logger = logging.getLogger(__name__) diff --git a/aea/test_tools/test_cases.py b/aea/test_tools/test_cases.py index fdf105a486..55e1b9d2bc 100644 --- a/aea/test_tools/test_cases.py +++ b/aea/test_tools/test_cases.py @@ -60,6 +60,7 @@ from tests.conftest import ROOT_DIR + logger = logging.getLogger(__name__) CLI_LOG_OPTION = ["-v", "OFF"] diff --git a/benchmark/checks/check_multiagent.py b/benchmark/checks/check_multiagent.py index 70c0450220..ad4dbe8c58 100755 --- a/benchmark/checks/check_multiagent.py +++ b/benchmark/checks/check_multiagent.py @@ -46,6 +46,7 @@ OEFLocalConnection, ) + ROOT_PATH = os.path.join(os.path.abspath(__file__), "..", "..") sys.path.append(ROOT_PATH) diff --git a/benchmark/checks/utils.py b/benchmark/checks/utils.py index 89ab2b50b5..18859f6fe5 100644 --- a/benchmark/checks/utils.py +++ b/benchmark/checks/utils.py @@ -44,6 +44,7 @@ from aea.registries.resources import Resources from aea.skills.base import Skill, SkillContext + ROOT_DIR = os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe()))) # type: ignore diff --git a/benchmark/framework/executor.py b/benchmark/framework/executor.py index f46acb95e7..c1abb69963 100644 --- a/benchmark/framework/executor.py +++ b/benchmark/framework/executor.py @@ -34,6 +34,7 @@ from tests.common.utils import timeit_context + ResourceStats = namedtuple("ResourceStats", "time,cpu,mem") diff --git a/examples/gym_ex/gyms/env.py b/examples/gym_ex/gyms/env.py index 66acc54026..ee06b0a789 100644 --- a/examples/gym_ex/gyms/env.py +++ b/examples/gym_ex/gyms/env.py @@ -25,6 +25,7 @@ import numpy as np from gym import spaces # type: ignore + BanditId = int Price = int diff --git a/examples/gym_ex/proxy/agent.py b/examples/gym_ex/proxy/agent.py index f008b1ec52..2c638ba0c7 100644 --- a/examples/gym_ex/proxy/agent.py +++ b/examples/gym_ex/proxy/agent.py @@ -34,6 +34,7 @@ GymConnection, ) + sys.modules["packages.fetchai.connections.gym"] = locate( "packages.fetchai.connections.gym" ) diff --git a/examples/gym_ex/proxy/env.py b/examples/gym_ex/proxy/env.py index 815985da5f..7066819cf3 100755 --- a/examples/gym_ex/proxy/env.py +++ b/examples/gym_ex/proxy/env.py @@ -44,6 +44,7 @@ from .agent import ProxyAgent # noqa: E402 # pylint: disable=wrong-import-position + sys.modules["packages.fetchai.connections.gym"] = locate( "packages.fetchai.connections.gym" ) diff --git a/examples/gym_ex/rl/agent.py b/examples/gym_ex/rl/agent.py index aa71d0ac66..1890358afe 100644 --- a/examples/gym_ex/rl/agent.py +++ b/examples/gym_ex/rl/agent.py @@ -25,6 +25,7 @@ import gym import numpy as np + BanditId = int Price = int diff --git a/examples/gym_ex/train.py b/examples/gym_ex/train.py index dc9d98bed7..2c3a2a0708 100644 --- a/examples/gym_ex/train.py +++ b/examples/gym_ex/train.py @@ -25,6 +25,7 @@ from proxy.env import ProxyEnv # noqa: I201 from rl.agent import RLAgent # noqa: I201 + DEFAULT_NB_GOODS = 10 DEFAULT_NB_PRICES_PER_GOOD = 100 DEFAULT_NB_STEPS = 4000 diff --git a/packages/fetchai/connections/gym/connection.py b/packages/fetchai/connections/gym/connection.py index 593a57d7d8..395a566099 100644 --- a/packages/fetchai/connections/gym/connection.py +++ b/packages/fetchai/connections/gym/connection.py @@ -40,6 +40,7 @@ from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues from packages.fetchai.protocols.gym.message import GymMessage + logger = logging.getLogger("aea.packages.fetchai.connections.gym") PUBLIC_ID = PublicId.from_str("fetchai/gym:0.8.0") diff --git a/packages/fetchai/connections/gym/connection.yaml b/packages/fetchai/connections/gym/connection.yaml index 2ecf2a9b7a..cce17f13a0 100644 --- a/packages/fetchai/connections/gym/connection.yaml +++ b/packages/fetchai/connections/gym/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPUxpn8smGVFexxhUu3Vy3q5xsJukHnYtQzUXyt965bmL __init__.py: QmWwxj1hGGZNteCvRtZxwtY9PuEKsrWsEmMWCKwiYCdvRR - connection.py: QmVDJV8G9xdk4QN2izxRH183WesDjPxXxrZ8PAurqtZ9D3 + connection.py: QmeBfJXcmyFzH84siPgKjTCrsSnTw7V1Jza1ZL9vUjpBS3 fingerprint_ignore_patterns: [] protocols: - fetchai/gym:0.6.0 diff --git a/packages/fetchai/connections/http_client/connection.py b/packages/fetchai/connections/http_client/connection.py index 6d8d158165..72ed44788f 100644 --- a/packages/fetchai/connections/http_client/connection.py +++ b/packages/fetchai/connections/http_client/connection.py @@ -42,6 +42,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage + SUCCESS = 200 NOT_FOUND = 404 REQUEST_TIMEOUT = 408 diff --git a/packages/fetchai/connections/http_client/connection.yaml b/packages/fetchai/connections/http_client/connection.yaml index f87a4b0e3f..462f0c8937 100644 --- a/packages/fetchai/connections/http_client/connection.yaml +++ b/packages/fetchai/connections/http_client/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmXfZJPAh4Ujt3xj8xzd6ng6HbrpJQUuvjWe8DNQSwSKWU __init__.py: QmPdKAks8A6XKAgZiopJzPZYXJumTeUqChd8UorqmLQQPU - connection.py: QmSBQnD19bcfrmgv5zFex94DLeY33osLwduozYqABRiSvo + connection.py: QmW9DVSJwTdD8BkjiZc8fYa2ndHVCy6HepFpmnX8H8TVMH fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/http_server/connection.py b/packages/fetchai/connections/http_server/connection.py index c5629419dc..9655657e13 100644 --- a/packages/fetchai/connections/http_server/connection.py +++ b/packages/fetchai/connections/http_server/connection.py @@ -57,6 +57,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage + SUCCESS = 200 NOT_FOUND = 404 REQUEST_TIMEOUT = 408 diff --git a/packages/fetchai/connections/http_server/connection.yaml b/packages/fetchai/connections/http_server/connection.yaml index 7878887307..9f5b628ccb 100644 --- a/packages/fetchai/connections/http_server/connection.yaml +++ b/packages/fetchai/connections/http_server/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTmQcnUPKaDHHJHngBFXnUVPdgBLanP9DbjVHZT55Scfn __init__.py: Qmb6JEAkJeb5JweqrSGiGoQp1vGXqddjGgb9WMkm2phTgA - connection.py: QmUdFW1587JpJEfwzb9LS55imtdNkXnZZKZfQNWtrLbDAa + connection.py: QmNxiS2h8QhqraJTiNdrGtM7BNCxiFfZvgdaWK9T1ghgxj fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/connections/ledger/base.py b/packages/fetchai/connections/ledger/base.py index da1920fd63..c9fbdd4411 100644 --- a/packages/fetchai/connections/ledger/base.py +++ b/packages/fetchai/connections/ledger/base.py @@ -33,6 +33,7 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue, Dialogues + CONNECTION_ID = PublicId.from_str("fetchai/ledger:0.6.0") diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index 1fa8d81190..abf2098efc 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmfQN7UK1M4pBUzKVzPannPLVi8iiULKHNtJ7XpoWpjqfc __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj - base.py: Qmec23f5Be6AkNvjwujzrRJExeXkjhD6fPzhRmGiPgwPLC + base.py: QmNnSBVmVgdDFwzqDUncwLHeyDfMEfmvujJdKbdGNGH4Be connection.py: Qmdibf99GzdFjFCcoTX7AiiBVWznKvPZWvur8cngSRNdye contract_dispatcher.py: QmXMPf7Mekyfo8SofcVYWWgMwADQZw68cXbmtf1pyKchVc ledger_dispatcher.py: QmTGvnN5W7VHZ9McQSyDQ1jPQoFWmQmuR2a3y8LL6J7aiM diff --git a/packages/fetchai/connections/local/connection.py b/packages/fetchai/connections/local/connection.py index 3d79dc86b2..53c10fe68c 100644 --- a/packages/fetchai/connections/local/connection.py +++ b/packages/fetchai/connections/local/connection.py @@ -39,6 +39,7 @@ ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage + _default_logger = logging.getLogger("aea.packages.fetchai.connections.local") TARGET = 0 diff --git a/packages/fetchai/connections/local/connection.yaml b/packages/fetchai/connections/local/connection.yaml index 5c722defd8..625d62d1ef 100644 --- a/packages/fetchai/connections/local/connection.yaml +++ b/packages/fetchai/connections/local/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmbK7MtyAVqh2LmSh9TY6yBZqfWaAXURP4rQGATyP2hTKC __init__.py: QmeeoX5E38Ecrb1rLdeFyyxReHLrcJoETnBcPbcNWVbiKG - connection.py: QmaydCZEzNwBiDw5rVAW9oh63S9ymaG4WHcj2TWDnWViF2 + connection.py: QmXtme7q9RZaLb53Gjsv2GcBg1XfrPGZprzxu2eNHyFdFY fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/connections/oef/connection.py b/packages/fetchai/connections/oef/connection.py index 8470f41a8a..124d6ad822 100644 --- a/packages/fetchai/connections/oef/connection.py +++ b/packages/fetchai/connections/oef/connection.py @@ -49,6 +49,7 @@ ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage + logger = logging.getLogger("aea.packages.fetchai.connections.oef") TARGET = 0 diff --git a/packages/fetchai/connections/oef/connection.yaml b/packages/fetchai/connections/oef/connection.yaml index 0f429611ed..807f12d66e 100644 --- a/packages/fetchai/connections/oef/connection.yaml +++ b/packages/fetchai/connections/oef/connection.yaml @@ -9,8 +9,8 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVHWxThR1u9a4BEm89oCxUTPGnN6PznvNgo6oZLqDD3n5 __init__.py: QmUAen8tmoBHuCerjA3FSGKJRLG6JYyUS3chuWzPxKYzez - connection.py: QmQZf8YSviqEi2KbkQUdAAU5Z2TCAdXuQXTLv2sVCncrQ9 - object_translator.py: QmfDTqq9kUhWrAJf8SyevzhcKcuYioiLxLQtWhavxbvawS + connection.py: QmfDKjDageCc4Pxdqokw7s2foEgwrWnoexcdHL9PcVWS45 + object_translator.py: QmZbRaJgFC1RKDA8hox6xTpqmrpTbp8SyYQoKarTmS5HwG fingerprint_ignore_patterns: [] protocols: - fetchai/default:0.5.0 diff --git a/packages/fetchai/connections/oef/object_translator.py b/packages/fetchai/connections/oef/object_translator.py index 98fe4241b3..ddbf63fe26 100644 --- a/packages/fetchai/connections/oef/object_translator.py +++ b/packages/fetchai/connections/oef/object_translator.py @@ -52,6 +52,7 @@ Query, ) + logger = logging.getLogger("aea.packages.fetchai.connections.oef") diff --git a/packages/fetchai/connections/p2p_libp2p/connection.py b/packages/fetchai/connections/p2p_libp2p/connection.py index 84627fb356..67107f20ac 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.py +++ b/packages/fetchai/connections/p2p_libp2p/connection.py @@ -41,6 +41,7 @@ from aea.helpers.pipe import IPCChannel, make_ipc_channel from aea.mail.base import Envelope + _default_logger = logging.getLogger("aea.packages.fetchai.connections.p2p_libp2p") LIBP2P_NODE_MODULE = str(os.path.abspath(os.path.dirname(__file__))) diff --git a/packages/fetchai/connections/p2p_libp2p/connection.yaml b/packages/fetchai/connections/p2p_libp2p/connection.yaml index 217db0e2b6..323a12b3e1 100644 --- a/packages/fetchai/connections/p2p_libp2p/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p/connection.yaml @@ -15,7 +15,7 @@ fingerprint: aea/envelope.proto: QmSC8EGCKiNFR2vf5bSWymSzYDFMipQW9aQVMwPzQoKb4n aea/pipe_unix.go: QmSzbAexrSUSA9ZE6VT6MmcWF5MhEcmceQjAbnfRoK7Ruv aea/pipe_windows.go: QmdYpfjgdgFbA6Pothg65NYM45ubfpZeKr8cVQoqbFzgUK - connection.py: QmPEcaeBAHS7FQE27idXAB5WP9MnSXTxdVr39jdd5zdX5Z + connection.py: QmXR4qF92gJDMvphLX14GwnPbGdYYWr3f7oM6dWjMScgzy dht/dhtclient/dhtclient.go: QmasA3GrgswTnUJoffBzeeqxeT3GjLu6foN6PHJhWNpMMa dht/dhtclient/dhtclient_test.go: QmPfnHSHXtbaW5VYuq1QsKQWey64pUEvLEaKKkT9eAcmws dht/dhtclient/options.go: QmPorj38wNrxGrzsbFe5wwLmiHzxbTJ2VsgvSd8tLDYS8s diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.py b/packages/fetchai/connections/p2p_libp2p_client/connection.py index 0ae1dfa284..07b795f36e 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.py +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.py @@ -34,6 +34,7 @@ from aea.exceptions import enforce from aea.mail.base import Envelope + logger = logging.getLogger("aea.packages.fetchai.connections.p2p_libp2p_client") PUBLIC_ID = PublicId.from_str("fetchai/p2p_libp2p_client:0.7.0") diff --git a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml index a51a00d00d..dbe1904eb8 100644 --- a/packages/fetchai/connections/p2p_libp2p_client/connection.yaml +++ b/packages/fetchai/connections/p2p_libp2p_client/connection.yaml @@ -10,7 +10,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUp9UrXSqEYeRxrEsGDhGPTjFrwKmuT3bjHJfGrfP8yjk __init__.py: QmT1FEHkPGMHV5oiVEfQHHr25N2qdZxydSNRJabJvYiTgf - connection.py: QmeSyMBkN1Y99g7c7j89Ack8NjzSPw5WDbodbwfqLP6ZLT + connection.py: QmSrJKGLtRogfMr6ZMGsZHeUfwkTAPDY49Hccw5QJzJ7K2 fingerprint_ignore_patterns: [] protocols: [] class_name: P2PLibp2pClientConnection diff --git a/packages/fetchai/connections/p2p_stub/connection.py b/packages/fetchai/connections/p2p_stub/connection.py index 615b2e6f27..868ef46cb8 100644 --- a/packages/fetchai/connections/p2p_stub/connection.py +++ b/packages/fetchai/connections/p2p_stub/connection.py @@ -28,6 +28,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope + PUBLIC_ID = PublicId.from_str("fetchai/p2p_stub:0.6.0") diff --git a/packages/fetchai/connections/p2p_stub/connection.yaml b/packages/fetchai/connections/p2p_stub/connection.yaml index c64dd5676d..cd89b62ea5 100644 --- a/packages/fetchai/connections/p2p_stub/connection.yaml +++ b/packages/fetchai/connections/p2p_stub/connection.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmbAStnFJj6jMTwqNu7DG9dt2uy5JGrGhKtCbYuAhWLBCk __init__.py: QmW9XFKGsea4u3fupkFMcQutgsjqusCMBMyTcTmLLmQ4tR - connection.py: QmSd6uheF634ZkHoPe1DtpPeD6Sx6p11rpB8tYELqWZUoS + connection.py: QmVcCQYuXoXbYUVDi3BBarf6fxeg9GjKYkr814CMGUq3UW fingerprint_ignore_patterns: [] protocols: [] class_name: P2PStubConnection diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 822944c72e..b6dd3a9a14 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -61,6 +61,7 @@ ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage + _default_logger = logging.getLogger("aea.packages.fetchai.connections.oef") PUBLIC_ID = PublicId.from_str("fetchai/soef:0.8.0") diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index 8a6ca5d174..5e40dea962 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmWwjETX39APP9RD5oVPeeCiDnUoDvjAcoVe2FK2Jc6anM __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmaBSm4WJgew1c2tChSR3683PTKBqdXgdHaPaQJXuEFXFL + connection.py: QmYzSA9zWn4r3kdBxvV1TGeqb1oGKCuvHruoH8Nkexneb7 fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/connections/tcp/base.py b/packages/fetchai/connections/tcp/base.py index da399a3792..dc5bddd500 100644 --- a/packages/fetchai/connections/tcp/base.py +++ b/packages/fetchai/connections/tcp/base.py @@ -28,6 +28,7 @@ from aea.connections.base import Connection, ConnectionStates from aea.mail.base import Envelope + logger = logging.getLogger("aea.packages.fetchai.connections.tcp") PUBLIC_ID = PublicId.from_str("fetchai/tcp:0.7.0") diff --git a/packages/fetchai/connections/tcp/connection.yaml b/packages/fetchai/connections/tcp/connection.yaml index 7ecf44617c..0e740d4432 100644 --- a/packages/fetchai/connections/tcp/connection.yaml +++ b/packages/fetchai/connections/tcp/connection.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVtv8cSd49aAYHFjbCdmvJJoD4mPCuG5PR7QKXxcAquJw __init__.py: QmTxAtQ9ffraStxxLAkvmWxyGhoV3jE16Sw6SJ9xzTthLb - base.py: QmRu7RYvTQuXvzM8mj8LQ8d3XtaHKLRdnMo7AvX2X76npe + base.py: Qmf3rJCzi6dmEXa87X1HpZRqWvuirAykeTnNyEt5SKzLJ9 connection.py: QmcQnyUagAhE7UsSBxiBSqsuF4mTMdU26LZLhUhdq5QygR - tcp_client.py: QmR96SGPA9ZKQSJuhXXuQhPu55X3pygwGKhjtVZaynFVF1 - tcp_server.py: Qme1JTrtwuR1aGsA24yCnuPeGq1NRXrLDuG4ANUK5Uv317 + tcp_client.py: QmfTTuC41Wp8dRBeNJWXKa6ryu98TRT8H3oSCFmvfypCEy + tcp_server.py: QmZ8tNfGzqNepjjspMfjWdwsGX2Afj56nSEdyAJfdHcHqS fingerprint_ignore_patterns: [] protocols: [] class_name: TCPClientConnection diff --git a/packages/fetchai/connections/tcp/tcp_client.py b/packages/fetchai/connections/tcp/tcp_client.py index 4b1fd007fc..4d4446d27d 100644 --- a/packages/fetchai/connections/tcp/tcp_client.py +++ b/packages/fetchai/connections/tcp/tcp_client.py @@ -34,6 +34,7 @@ from packages.fetchai.connections.tcp.base import TCPConnection + logger = logging.getLogger("aea.packages.fetchai.connections.tcp.tcp_client") STUB_DIALOGUE_ID = 0 diff --git a/packages/fetchai/connections/tcp/tcp_server.py b/packages/fetchai/connections/tcp/tcp_server.py index 9b0325ecfd..515d3d3c71 100644 --- a/packages/fetchai/connections/tcp/tcp_server.py +++ b/packages/fetchai/connections/tcp/tcp_server.py @@ -30,6 +30,7 @@ from packages.fetchai.connections.tcp.base import TCPConnection + logger = logging.getLogger("aea.packages.fetchai.connections.tcp.tcp_server") STUB_DIALOGUE_ID = 0 diff --git a/packages/fetchai/connections/webhook/connection.py b/packages/fetchai/connections/webhook/connection.py index b4e28cfa38..18d65e6d1a 100644 --- a/packages/fetchai/connections/webhook/connection.py +++ b/packages/fetchai/connections/webhook/connection.py @@ -37,6 +37,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues from packages.fetchai.protocols.http.message import HttpMessage + SUCCESS = 200 NOT_FOUND = 404 REQUEST_TIMEOUT = 408 diff --git a/packages/fetchai/connections/webhook/connection.yaml b/packages/fetchai/connections/webhook/connection.yaml index edbd4803ec..ca03a8df41 100644 --- a/packages/fetchai/connections/webhook/connection.yaml +++ b/packages/fetchai/connections/webhook/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmQDqfKKsksKsUqdqTcYe8P8Fw3MGovVuZBFHPbhupkkxf __init__.py: QmWUKSmXaBgGMvKgdmzKmMjCx43BnrfW6og2n3afNoAALq - connection.py: QmVzx4qbqru7oLCsUnSqWCMt9e69yUr9BquhaLXdTKz16U + connection.py: QmVZv722GNjJkXxQSnvVBQgWCTnG2uBfAVAkgvn2E5qWzX fingerprint_ignore_patterns: [] protocols: - fetchai/http:0.5.0 diff --git a/packages/fetchai/contracts/erc1155/contract.py b/packages/fetchai/contracts/erc1155/contract.py index 99db581ea3..9d8b9852c8 100644 --- a/packages/fetchai/contracts/erc1155/contract.py +++ b/packages/fetchai/contracts/erc1155/contract.py @@ -33,6 +33,7 @@ from aea.crypto.ethereum import EthereumApi from aea.crypto.fetchai import FetchAIApi + logger = logging.getLogger("aea.packages.fetchai.contracts.erc1155.contract") MAX_UINT_256 = 2 ^ 256 - 1 diff --git a/packages/fetchai/contracts/erc1155/contract.yaml b/packages/fetchai/contracts/erc1155/contract.yaml index 221b26e0c5..b482f4aa6c 100644 --- a/packages/fetchai/contracts/erc1155/contract.yaml +++ b/packages/fetchai/contracts/erc1155/contract.yaml @@ -10,7 +10,7 @@ fingerprint: build/Migrations.json: QmfFYYWoq1L1Ni6YPBWWoRPvCZKBLZ7qzN3UDX537mCeuE build/erc1155.json: Qma5n7au2NDCg1nLwYfYnmFNwWChFuXtu65w5DV7wAZRvw build/erc1155.wasm: Qmc9gthbdwRSywinTHKjRVQdFzrKTxUuLDx2ryNfQp1xqf - contract.py: QmSEfxq6dH53q9qEw3KrtTgUqvyDgCefy59RNpciGGAGi6 + contract.py: QmeSSDsCXpXiaj3ZHJGPE7QCFcfw8EgP6kCr8CNg6SnN4Q contracts/Migrations.sol: QmbW34mYrj3uLteyHf3S46pnp9bnwovtCXHbdBHfzMkSZx contracts/erc1155.vy: QmXwob8G1uX7fDvtuuKW139LALWtQmGw2vvaTRBVAWRxTx migrations/1_initial_migration.js: QmcxaWKQ2yPkQBmnpXmcuxPZQUMuUudmPmX3We8Z9vtAf7 diff --git a/packages/fetchai/protocols/contract_api/__init__.py b/packages/fetchai/protocols/contract_api/__init__.py index 4674ea494b..b93cfc3722 100644 --- a/packages/fetchai/protocols/contract_api/__init__.py +++ b/packages/fetchai/protocols/contract_api/__init__.py @@ -22,4 +22,5 @@ from packages.fetchai.protocols.contract_api.message import ContractApiMessage from packages.fetchai.protocols.contract_api.serialization import ContractApiSerializer + ContractApiMessage.serializer = ContractApiSerializer diff --git a/packages/fetchai/protocols/contract_api/custom_types.py b/packages/fetchai/protocols/contract_api/custom_types.py index 430b1dea25..6d8449867c 100644 --- a/packages/fetchai/protocols/contract_api/custom_types.py +++ b/packages/fetchai/protocols/contract_api/custom_types.py @@ -27,6 +27,7 @@ from aea.helpers.transaction.base import RawTransaction as BaseRawTransaction from aea.helpers.transaction.base import State as BaseState + RawMessage = BaseRawMessage RawTransaction = BaseRawTransaction State = BaseState diff --git a/packages/fetchai/protocols/contract_api/message.py b/packages/fetchai/protocols/contract_api/message.py index d84c69c714..eb6202f927 100644 --- a/packages/fetchai/protocols/contract_api/message.py +++ b/packages/fetchai/protocols/contract_api/message.py @@ -35,6 +35,7 @@ ) from packages.fetchai.protocols.contract_api.custom_types import State as CustomState + logger = logging.getLogger("aea.packages.fetchai.protocols.contract_api.message") DEFAULT_BODY_SIZE = 4 diff --git a/packages/fetchai/protocols/contract_api/protocol.yaml b/packages/fetchai/protocols/contract_api/protocol.yaml index f1bf7e424c..fb4df12be8 100644 --- a/packages/fetchai/protocols/contract_api/protocol.yaml +++ b/packages/fetchai/protocols/contract_api/protocol.yaml @@ -7,12 +7,12 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVR8NKCTfaoLCiepHWqPGPVRuhmbwaM4v9iheK4FzaWwj - __init__.py: QmZodYjNqoMgGAGKfkCU4zU9t1Cx9MAownqSy4wyVdwaHF + __init__.py: QmcZFuqoBkEx1fYytpLr7142vtXf9qh8cpeRYVZcaWdmrD contract_api.proto: QmNwngtcYFSuqL8yeTGVXmrHjfebCybdUa9BnTDKXn8odk contract_api_pb2.py: QmVT6Fv53KyFhshNFEo38seHypd7Y62psBaF8NszV8iRHK - custom_types.py: QmbLjpiTcGNfvdBsu8pgQH6PK5y6ujdNnZ53JSk1GZDRCA + custom_types.py: QmcMtzozPhcL2H9hDmnUd9bHDE3ihy7HQgvGKkhqxdAXf4 dialogues.py: QmTjXH8JUtziUFDawKsSTYE5dxn1n1FmMPeWexyxiPYd6k - message.py: Qmbxqt2TauoUkP6bqeYz1LZ7FukMvW3szs26HU87QCEFya + message.py: QmNodRNJKx6N2ToPRdVFark7e3S3j4VZU4c5rbTKa9Y5pw serialization.py: QmQzS931wTQNt758wvnB81aD16hUMQ19WVK6f1p1XuEwUp fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/fipa/__init__.py b/packages/fetchai/protocols/fipa/__init__.py index 51ed765862..84ca80bc01 100644 --- a/packages/fetchai/protocols/fipa/__init__.py +++ b/packages/fetchai/protocols/fipa/__init__.py @@ -22,4 +22,5 @@ from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.fipa.serialization import FipaSerializer + FipaMessage.serializer = FipaSerializer diff --git a/packages/fetchai/protocols/fipa/custom_types.py b/packages/fetchai/protocols/fipa/custom_types.py index f00f139fdf..c028276b05 100644 --- a/packages/fetchai/protocols/fipa/custom_types.py +++ b/packages/fetchai/protocols/fipa/custom_types.py @@ -23,6 +23,7 @@ from aea.helpers.search.models import Description as BaseDescription from aea.helpers.search.models import Query as BaseQuery + Description = BaseDescription Query = BaseQuery diff --git a/packages/fetchai/protocols/fipa/message.py b/packages/fetchai/protocols/fipa/message.py index 02328af938..57f781e3ac 100644 --- a/packages/fetchai/protocols/fipa/message.py +++ b/packages/fetchai/protocols/fipa/message.py @@ -31,6 +31,7 @@ ) from packages.fetchai.protocols.fipa.custom_types import Query as CustomQuery + logger = logging.getLogger("aea.packages.fetchai.protocols.fipa.message") DEFAULT_BODY_SIZE = 4 diff --git a/packages/fetchai/protocols/fipa/protocol.yaml b/packages/fetchai/protocols/fipa/protocol.yaml index f1f2a5a028..93295d63a5 100644 --- a/packages/fetchai/protocols/fipa/protocol.yaml +++ b/packages/fetchai/protocols/fipa/protocol.yaml @@ -7,12 +7,12 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmRwxwzxfhotek7WUbyAeufBvoHpWbDwfUVMy3FKitiHKy - __init__.py: QmZuv8RGegxunYaJ7sHLwj2oLLCFCAGF139b8DxEY68MRT - custom_types.py: Qmb7bzEUAW74ZeSFqL7sTccNCjudStV63K4CFNZtibKUHB + __init__.py: QmR6pcWX14FsQip4eYJRNeiQdrNMPj6y4m6Tsgd6hd7yU6 + custom_types.py: Qmf72KRbkNsxxAHwMtkmJc5TRL23fU7AuzJAdSTftckwJQ dialogues.py: QmWaciW35ZTVeTeLWeyp3hjehKkWB5ZY7Di8N8cDH8Mjwb fipa.proto: QmP7JqnuQSQ9BDcKkscrTydKEX4wFBoyFaY1bkzGkamcit fipa_pb2.py: QmZMkefJLrb3zJKoimb6a9tdpxDBhc8rR2ghimqg7gZ471 - message.py: QmbFtigdnmqqmKZMTxjmk6JQJtcyhVY9a4mpEEcHmFJd24 + message.py: QmSnzY8G89gUsgo21wF2TxnjZr7czba9a7HEfLpWg9tqQq serialization.py: QmQMb8F8hJm1gkJFSPPCtDAoxSX3bFkshtzRgDWfWB8ynd fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/gym/__init__.py b/packages/fetchai/protocols/gym/__init__.py index ce5eacc728..6e25f7d246 100644 --- a/packages/fetchai/protocols/gym/__init__.py +++ b/packages/fetchai/protocols/gym/__init__.py @@ -22,4 +22,5 @@ from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.protocols.gym.serialization import GymSerializer + GymMessage.serializer = GymSerializer diff --git a/packages/fetchai/protocols/gym/message.py b/packages/fetchai/protocols/gym/message.py index 7642fde42f..a9ef1b03fe 100644 --- a/packages/fetchai/protocols/gym/message.py +++ b/packages/fetchai/protocols/gym/message.py @@ -28,6 +28,7 @@ from packages.fetchai.protocols.gym.custom_types import AnyObject as CustomAnyObject + logger = logging.getLogger("aea.packages.fetchai.protocols.gym.message") DEFAULT_BODY_SIZE = 4 diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index e53d9e38d6..c806a183ef 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -7,12 +7,12 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTCkz4cEUcwuPZVtvrVr8Np5qn1SMwm6foGSY9Y68DhZT - __init__.py: QmWBvruqGuU2BVCq8cuP1S3mgvuC78yrG4TdtSvKhCT8qX + __init__.py: QmQvogZ6FVrp15UX2GZ2YKqZASS9gamA72MGt79oieE2tq custom_types.py: QmT3VKT86xZKR11RR1vQ3myRpmVZNdzY6ELd8HG9U2ngwa dialogues.py: QmdCzcFfyPF43U2SoxwshG5p4hd6dK49m6GYKduDHbnNPo gym.proto: QmQGF9Xz4Z93wmhdKoztzxjo5pS4SsAWe2TQdvZCLuzdGC gym_pb2.py: QmSTz7xrL8ryqzR1Sgu1NpR6PmW7GUhBGnN2qYc8m8NCcN - message.py: QmTaiHDJkdduU4HLn7i17oAigJQwrws8FmfQCwbfAagnGp + message.py: QmW1FwzkVpqcVmEWjwuX79ZYPuxwrmvfJEqtMcQjRC19AS serialization.py: QmPNsgeGkagzQuAyq97fcGXA2LoPwiuq8X1tcfVXoLwnSV fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/http/__init__.py b/packages/fetchai/protocols/http/__init__.py index 8159b9d27c..9ec736425a 100644 --- a/packages/fetchai/protocols/http/__init__.py +++ b/packages/fetchai/protocols/http/__init__.py @@ -22,4 +22,5 @@ from packages.fetchai.protocols.http.message import HttpMessage from packages.fetchai.protocols.http.serialization import HttpSerializer + HttpMessage.serializer = HttpSerializer diff --git a/packages/fetchai/protocols/http/message.py b/packages/fetchai/protocols/http/message.py index 3c4841038a..e1facfecc5 100644 --- a/packages/fetchai/protocols/http/message.py +++ b/packages/fetchai/protocols/http/message.py @@ -26,6 +26,7 @@ from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + logger = logging.getLogger("aea.packages.fetchai.protocols.http.message") DEFAULT_BODY_SIZE = 4 diff --git a/packages/fetchai/protocols/http/protocol.yaml b/packages/fetchai/protocols/http/protocol.yaml index fba165de7c..9fd9a926a5 100644 --- a/packages/fetchai/protocols/http/protocol.yaml +++ b/packages/fetchai/protocols/http/protocol.yaml @@ -7,11 +7,11 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmY7fxhyNBgwU7uc6LKtCN4aSQ4bym5BwqtwRAfwPokULN - __init__.py: QmRWie4QPiFJE8nK4fFJ6prqoG3u36cPo7st5JUZAGpVWv + __init__.py: QmWzgWYrnS7PhjYrrx2mykLoaCbb7rDnVRcDqifsRukTy4 dialogues.py: QmdwTehjCppcxyDid8m6zuHY5YwprUhato88R9Zdm9aXaM http.proto: QmdTUTvvxGxMxSTB67AXjMUSDLdsxBYiSuJNVxHuLKB1jS http_pb2.py: QmYYKqdwiueq54EveL9WXn216FXLSQ6XGJJHoiJxwJjzHC - message.py: QmYSmd2xLU8TsLLorxxNnaHj1cVLztgrKtQnaqJ1USFkPY + message.py: QmcZaEZbRbcx5U5KVEi2QTr6BVyHGDXcRrSqKhpngXRZ15 serialization.py: QmTq34k2PD6Ybhk8x1EboY3UcNp8r3H6Tb3egZsWJN9nFv fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/ledger_api/__init__.py b/packages/fetchai/protocols/ledger_api/__init__.py index 03712dc20d..99f0907397 100644 --- a/packages/fetchai/protocols/ledger_api/__init__.py +++ b/packages/fetchai/protocols/ledger_api/__init__.py @@ -22,4 +22,5 @@ from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.ledger_api.serialization import LedgerApiSerializer + LedgerApiMessage.serializer = LedgerApiSerializer diff --git a/packages/fetchai/protocols/ledger_api/custom_types.py b/packages/fetchai/protocols/ledger_api/custom_types.py index adde5cd580..43508e0ee5 100644 --- a/packages/fetchai/protocols/ledger_api/custom_types.py +++ b/packages/fetchai/protocols/ledger_api/custom_types.py @@ -25,6 +25,7 @@ from aea.helpers.transaction.base import TransactionDigest as BaseTransactionDigest from aea.helpers.transaction.base import TransactionReceipt as BaseTransactionReceipt + RawTransaction = BaseRawTransaction SignedTransaction = BaseSignedTransaction Terms = BaseTerms diff --git a/packages/fetchai/protocols/ledger_api/message.py b/packages/fetchai/protocols/ledger_api/message.py index 6b60d32682..ef64a3fcf8 100644 --- a/packages/fetchai/protocols/ledger_api/message.py +++ b/packages/fetchai/protocols/ledger_api/message.py @@ -40,6 +40,7 @@ TransactionReceipt as CustomTransactionReceipt, ) + logger = logging.getLogger("aea.packages.fetchai.protocols.ledger_api.message") DEFAULT_BODY_SIZE = 4 diff --git a/packages/fetchai/protocols/ledger_api/protocol.yaml b/packages/fetchai/protocols/ledger_api/protocol.yaml index e74aaec3e3..b08f57e1c4 100644 --- a/packages/fetchai/protocols/ledger_api/protocol.yaml +++ b/packages/fetchai/protocols/ledger_api/protocol.yaml @@ -7,12 +7,12 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmSoo6ds8mKhtoG8CBbu9rb9yj7sqeeuBfcU7CLj584uRX - __init__.py: Qmct8jVx6ndWwaa5HXJAJgMraVuZ8kMeyx6rnEeHAYHwDJ - custom_types.py: QmQJnWQvtj1D9zqGWM3XrpNtZPmzr4rLgKxoG1MzM5udNA + __init__.py: QmX6ta6j6ust7qhVk1kZygzZK3gTTg7hSCBbSMKUxJgWgG + custom_types.py: QmWRrvFStMhVJy8P2WD6qjDgk14ZnxErN7XymxUtof7HQo dialogues.py: QmRtWkAfR9WTvygMJ36R758RzdY2mGQs2fgtHCfjxmeaHy ledger_api.proto: QmfLcv7jJcGJ1gAdCMqsyxJcRud7RaTWteSXHL5NvGuViP ledger_api_pb2.py: QmQhM848REJTDKDoiqxkTniChW8bNNm66EtwMRkvVdbMry - message.py: QmcLuy4YcL22qs3jHf5KHZ7vZueiTDrEmbWjfRTbyzwc5m + message.py: QmNnb5uwsWZjQizDnuTwCAw1sGmmiARLeesTVDE4nLJi7j serialization.py: QmRuTqH9t9JtsnpWX5wpC438DdRxWKiqAB2u9fvQ2oy1GE fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/ml_trade/__init__.py b/packages/fetchai/protocols/ml_trade/__init__.py index 84bc74eaac..bb602e2a47 100644 --- a/packages/fetchai/protocols/ml_trade/__init__.py +++ b/packages/fetchai/protocols/ml_trade/__init__.py @@ -22,4 +22,5 @@ from packages.fetchai.protocols.ml_trade.message import MlTradeMessage from packages.fetchai.protocols.ml_trade.serialization import MlTradeSerializer + MlTradeMessage.serializer = MlTradeSerializer diff --git a/packages/fetchai/protocols/ml_trade/custom_types.py b/packages/fetchai/protocols/ml_trade/custom_types.py index 995f1444a6..12aef0abc9 100644 --- a/packages/fetchai/protocols/ml_trade/custom_types.py +++ b/packages/fetchai/protocols/ml_trade/custom_types.py @@ -22,6 +22,7 @@ from aea.helpers.search.models import Description as BaseDescription from aea.helpers.search.models import Query as BaseQuery + Description = BaseDescription Query = BaseQuery diff --git a/packages/fetchai/protocols/ml_trade/message.py b/packages/fetchai/protocols/ml_trade/message.py index f99abeaa98..7cf62d08ed 100644 --- a/packages/fetchai/protocols/ml_trade/message.py +++ b/packages/fetchai/protocols/ml_trade/message.py @@ -31,6 +31,7 @@ ) from packages.fetchai.protocols.ml_trade.custom_types import Query as CustomQuery + logger = logging.getLogger("aea.packages.fetchai.protocols.ml_trade.message") DEFAULT_BODY_SIZE = 4 diff --git a/packages/fetchai/protocols/ml_trade/protocol.yaml b/packages/fetchai/protocols/ml_trade/protocol.yaml index 160ce8cb5c..b519b0114f 100644 --- a/packages/fetchai/protocols/ml_trade/protocol.yaml +++ b/packages/fetchai/protocols/ml_trade/protocol.yaml @@ -7,10 +7,10 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmSRtzACMh3x3LSjYqWXWTpYpE4C7G8EHbW4zQQoMFFZ4K - __init__.py: QmXZMVdsBXUJxLZvwwhWBx58xfxMSyoGxdYp5Aeqmzqhzt - custom_types.py: QmeWvNKuezFxfmLYaxKhP9XffeiFFCwH1qowyiJacLAHpF + __init__.py: QmcCS9uUQTTS2w85dTNiN5rQ14wyBhmBkr7pPPPcbLphcn + custom_types.py: QmPa6mxbN8WShsniQxJACfzAPRjGzYLbUFGoVU4N9DewUw dialogues.py: QmVvP34aKWEtHrKmccNMvEdDnx5B7xpE5aEGzr6GU2u8UK - message.py: QmZdRAScKbmJgKVbRJvDyMUNfRZKWCwWFYjGNDDBAq5fUT + message.py: QmZ8HzNw27TdxoZBHRf1YJheACo7kU6n1497DYgxjbCwZu ml_trade.proto: QmeB21MQduEGQCrtiYZQzPpRqHL4CWEkvvcaKZ9GsfE8f6 ml_trade_pb2.py: QmZVvugPysR1og6kWCJkvo3af2s9pQRHfuj4BptE7gU1EU serialization.py: QmTamQzo8ZNM6T7QnsA7qNzs2uJ7CHTUczzCsHwU9Q6Z5K diff --git a/packages/fetchai/protocols/oef_search/__init__.py b/packages/fetchai/protocols/oef_search/__init__.py index b8296a656d..f130fc2c1b 100644 --- a/packages/fetchai/protocols/oef_search/__init__.py +++ b/packages/fetchai/protocols/oef_search/__init__.py @@ -22,4 +22,5 @@ from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.protocols.oef_search.serialization import OefSearchSerializer + OefSearchMessage.serializer = OefSearchSerializer diff --git a/packages/fetchai/protocols/oef_search/custom_types.py b/packages/fetchai/protocols/oef_search/custom_types.py index 9a0fb4dc0d..b7bfeb8e5b 100644 --- a/packages/fetchai/protocols/oef_search/custom_types.py +++ b/packages/fetchai/protocols/oef_search/custom_types.py @@ -27,6 +27,7 @@ from aea.helpers.search.models import Description as BaseDescription from aea.helpers.search.models import Query as BaseQuery + Description = BaseDescription diff --git a/packages/fetchai/protocols/oef_search/message.py b/packages/fetchai/protocols/oef_search/message.py index 51190e1eee..824e80d505 100644 --- a/packages/fetchai/protocols/oef_search/message.py +++ b/packages/fetchai/protocols/oef_search/message.py @@ -37,6 +37,7 @@ ) from packages.fetchai.protocols.oef_search.custom_types import Query as CustomQuery + logger = logging.getLogger("aea.packages.fetchai.protocols.oef_search.message") DEFAULT_BODY_SIZE = 4 diff --git a/packages/fetchai/protocols/oef_search/protocol.yaml b/packages/fetchai/protocols/oef_search/protocol.yaml index 656d835d6f..4ab18b4d2f 100644 --- a/packages/fetchai/protocols/oef_search/protocol.yaml +++ b/packages/fetchai/protocols/oef_search/protocol.yaml @@ -7,10 +7,10 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmaGSTqxvQFKccBnLovhBbfSH3C3Sorrj7kFyZqW9qptLa - __init__.py: QmRvTtynKcd7shmzgf8aZdcA5witjNL5cL2a7WPgscp7wq - custom_types.py: QmPSAWKkH7R8XCfPUCRmuEqVxCnp8L5PTUq4DBt59AzFUC + __init__.py: Qmdr5ks5X4YtnpH6yKUcNu9uouyv3EGmrKFhyvNH7ZBjvT + custom_types.py: QmYAkKYj9gGHaij7uTejoJe9KRhNcsU4sJC1utMfhUYhg3 dialogues.py: QmQPLnW3jAs6tLLmhkX4C7texGRHM9bfdjs83dUH5TkJ4v - message.py: QmU8jH94qxrcr9eUtXWn5PzqmHT7NBc62gs53HPXKVk1Ts + message.py: QmWFvjX7spNHQx6QQevBRXmFyJBuenyAPYAjxVLYvKdC7B oef_search.proto: QmNU8WsxT6XNFFneKKeDaZkNn3CEFDfZQkmKv9TyhyxzDB oef_search_pb2.py: QmSAFT1xxYRzJU6h1aFVDuYcx672sZ2vzV6c2ico7f4BLK serialization.py: QmU3ipyvogbpkFuQki6xqscdiPahDVYw4sBaPHaH3LVvwJ diff --git a/packages/fetchai/protocols/tac/__init__.py b/packages/fetchai/protocols/tac/__init__.py index 0563c30ca3..0dd910252c 100644 --- a/packages/fetchai/protocols/tac/__init__.py +++ b/packages/fetchai/protocols/tac/__init__.py @@ -22,4 +22,5 @@ from packages.fetchai.protocols.tac.message import TacMessage from packages.fetchai.protocols.tac.serialization import TacSerializer + TacMessage.serializer = TacSerializer diff --git a/packages/fetchai/protocols/tac/custom_types.py b/packages/fetchai/protocols/tac/custom_types.py index 453dab2932..094741edfe 100644 --- a/packages/fetchai/protocols/tac/custom_types.py +++ b/packages/fetchai/protocols/tac/custom_types.py @@ -22,6 +22,7 @@ from enum import Enum from typing import Dict + CODE_TO_MSG = { 0: "Unexpected error.", 1: "Request not recognized", diff --git a/packages/fetchai/protocols/tac/message.py b/packages/fetchai/protocols/tac/message.py index 999a42bbf9..29a6c32f5c 100644 --- a/packages/fetchai/protocols/tac/message.py +++ b/packages/fetchai/protocols/tac/message.py @@ -28,6 +28,7 @@ from packages.fetchai.protocols.tac.custom_types import ErrorCode as CustomErrorCode + logger = logging.getLogger("aea.packages.fetchai.protocols.tac.message") DEFAULT_BODY_SIZE = 4 diff --git a/packages/fetchai/protocols/tac/protocol.yaml b/packages/fetchai/protocols/tac/protocol.yaml index db3fb0f167..d33f7cc5c9 100644 --- a/packages/fetchai/protocols/tac/protocol.yaml +++ b/packages/fetchai/protocols/tac/protocol.yaml @@ -8,10 +8,10 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmVhm6VBbggxjTe3PEhCBfTomWekNa5buYy3sY7YYN6Er6 - __init__.py: QmZYdAjm3o44drRiY3MT4RtG2fFLxtaL8h898DmjoJwJzV - custom_types.py: QmXyAhpkE6sLExGgf2GxBv8gRYTDZu7XCDsa2m4rwvQrmp + __init__.py: QmSAC7PGra9fig8RhhF1j3XEVpgie9UZNNYPc2AB9Kx9xJ + custom_types.py: QmXQATfnvuCpt4FicF4QcqCcLj9PQNsSHjCBvVQknWpyaN dialogues.py: QmTxHrcGujP1RUYvfJygZyQoUwmDg2GBWfmbR3tWUSbyop - message.py: QmfNdmYk3wssDJvHwMsMxXaiWCjm3fSH9Su4KmsYDZJoWg + message.py: QmfNRtqEpLyAf4knnTecsiNxzehqwWjk8agfg9oe2XvCt3 serialization.py: QmTk2Jp19dQ4SJdjSHAr8wbxw4rQSMheSuf1XzXG8CaoB4 tac.proto: QmdpPZNhUW593qVNVoSTWZgd9R69bmBbw6Y9xjzYpvuDvV tac_pb2.py: QmUwW3kixKwD2o1RRdq4NoNoihPb5BXKKRngWXztq32fea diff --git a/packages/fetchai/skills/aries_alice/behaviours.py b/packages/fetchai/skills/aries_alice/behaviours.py index 847c40c3b8..e505883362 100644 --- a/packages/fetchai/skills/aries_alice/behaviours.py +++ b/packages/fetchai/skills/aries_alice/behaviours.py @@ -39,6 +39,7 @@ HTTP_COUNTERPARTY, ) + DEFAULT_SERVICES_INTERVAL = 60.0 diff --git a/packages/fetchai/skills/aries_alice/dialogues.py b/packages/fetchai/skills/aries_alice/dialogues.py index 96983efc95..d004587009 100644 --- a/packages/fetchai/skills/aries_alice/dialogues.py +++ b/packages/fetchai/skills/aries_alice/dialogues.py @@ -39,6 +39,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/aries_alice/skill.yaml b/packages/fetchai/skills/aries_alice/skill.yaml index 7bdeae07c0..10baa733fa 100644 --- a/packages/fetchai/skills/aries_alice/skill.yaml +++ b/packages/fetchai/skills/aries_alice/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmfS1ezD77No8WQkvrkPs4oSXHFbULRxatGzRhMbSMntSx __init__.py: Qma8qSTU34ADKWskBwQKQLGNpe3xDKNgjNQ6Q4MxUnKa3Q - behaviours.py: QmZafoGe1KJ6ZfQhAkgVQFUAbDfackh8YHRjxVdCLm2TQE - dialogues.py: QmRbbuYSXuNzMVK3gkHVFhwqH8k6oPo4ThGvVPrrn9N3Yq + behaviours.py: QmTdJbrP1N3W1M6CLDyPFc6erfcrhnbRJtDNN6ZuY9eRUt + dialogues.py: QmbCkYZ9mQK6az3qWVMuYmpy5bapq2szYigUbVzE2GgiJi handlers.py: QmTtqM5oWBEAZcHdTuwuPtbiZZGWontMNEtmDxcccS2u2Y - strategy.py: QmZ2jhWFQZipk6wAquS1gWxX94iAmhN9Vrh7tcPU9bgpzF + strategy.py: QmS6MYMF3TdZSqRNugUAoHcWcirsQ9kK2do28i5abKz4oM fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/aries_alice/strategy.py b/packages/fetchai/skills/aries_alice/strategy.py index e18db9e729..af3158d7a6 100644 --- a/packages/fetchai/skills/aries_alice/strategy.py +++ b/packages/fetchai/skills/aries_alice/strategy.py @@ -28,6 +28,7 @@ from aea.helpers.search.models import Description, Location from aea.skills.base import Model + # default configs DEFAULT_ADMIN_HOST = "127.0.0.1" DEFAULT_ADMIN_PORT = 8031 diff --git a/packages/fetchai/skills/aries_faber/behaviours.py b/packages/fetchai/skills/aries_faber/behaviours.py index 2e0080d319..629536e422 100644 --- a/packages/fetchai/skills/aries_faber/behaviours.py +++ b/packages/fetchai/skills/aries_faber/behaviours.py @@ -35,6 +35,7 @@ HTTP_COUNTERPARTY, ) + DEFAULT_SEARCH_INTERVAL = 5.0 diff --git a/packages/fetchai/skills/aries_faber/dialogues.py b/packages/fetchai/skills/aries_faber/dialogues.py index f00b84bd56..a82aad4e09 100644 --- a/packages/fetchai/skills/aries_faber/dialogues.py +++ b/packages/fetchai/skills/aries_faber/dialogues.py @@ -39,6 +39,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/aries_faber/handlers.py b/packages/fetchai/skills/aries_faber/handlers.py index dd46d1205c..76c395f34b 100644 --- a/packages/fetchai/skills/aries_faber/handlers.py +++ b/packages/fetchai/skills/aries_faber/handlers.py @@ -51,6 +51,7 @@ LEDGER_COMMAND_REGISTER_DID, ) + SUPPORT_REVOCATION = False diff --git a/packages/fetchai/skills/aries_faber/skill.yaml b/packages/fetchai/skills/aries_faber/skill.yaml index 6e25d53973..1841b6823a 100644 --- a/packages/fetchai/skills/aries_faber/skill.yaml +++ b/packages/fetchai/skills/aries_faber/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdkSNCYx5dNGDAAveapQgoyM7Y7iYeQzR7KN2Sso3CJG4 __init__.py: QmNPVQ6UajvJodqTLWbLvQZkKCfrNn1nYPrQXai3xdj6F7 - behaviours.py: QmfF39uLgQinDRfWHo4fzbgJBGm1xanL1BbvdDwAHT7HPQ - dialogues.py: QmXveWmeU3eTDDhqDkBcVE2pJAtxJUAzcjbM8ZEjRvKUYW - handlers.py: QmZMEEQ3tGdfE1N5oMem5AZkXqreJ6BuGu7HsYrNwH99C3 - strategy.py: QmcUmddp6CUP31Bfckt6EkV3n2VZcJrUagoGBaTDBMTdXR + behaviours.py: QmQUmnhHmEFjGp9SvkLqcBrmCe2CSFngzqTHNadqJXQMgw + dialogues.py: Qmeynv4h5ArYBJ2wkQurW7VXdDP1VXNbg5GiADkgMPFqj3 + handlers.py: QmXpCVgMTLyewXPmXMmPHUpnZhQZ35GFAhZtcpujAd3WZ8 + strategy.py: QmPPL4aZhf2jtCHjQyuzh9gyWiNYRt9V29UYvPvp9Lbqhw fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/aries_faber/strategy.py b/packages/fetchai/skills/aries_faber/strategy.py index a73030b91e..c7fd743f3c 100644 --- a/packages/fetchai/skills/aries_faber/strategy.py +++ b/packages/fetchai/skills/aries_faber/strategy.py @@ -24,6 +24,7 @@ from aea.helpers.search.models import Constraint, ConstraintType, Location, Query from aea.skills.base import Model + # Default Config DEFAULT_ADMIN_HOST = "127.0.0.1" DEFAULT_ADMIN_PORT = 8021 diff --git a/packages/fetchai/skills/carpark_client/behaviours.py b/packages/fetchai/skills/carpark_client/behaviours.py index deda9acdac..3f2e38b180 100644 --- a/packages/fetchai/skills/carpark_client/behaviours.py +++ b/packages/fetchai/skills/carpark_client/behaviours.py @@ -21,4 +21,5 @@ from packages.fetchai.skills.generic_buyer.behaviours import GenericSearchBehaviour + SearchBehaviour = GenericSearchBehaviour diff --git a/packages/fetchai/skills/carpark_client/dialogues.py b/packages/fetchai/skills/carpark_client/dialogues.py index 6f1ea07d83..40b2d5a2ac 100644 --- a/packages/fetchai/skills/carpark_client/dialogues.py +++ b/packages/fetchai/skills/carpark_client/dialogues.py @@ -43,6 +43,7 @@ SigningDialogues as GenericSigningDialogues, ) + DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/carpark_client/handlers.py b/packages/fetchai/skills/carpark_client/handlers.py index ce8f9a83a0..2f1e9cb165 100644 --- a/packages/fetchai/skills/carpark_client/handlers.py +++ b/packages/fetchai/skills/carpark_client/handlers.py @@ -26,6 +26,7 @@ GenericSigningHandler, ) + FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/carpark_client/skill.yaml b/packages/fetchai/skills/carpark_client/skill.yaml index acc3ffab98..9b81cf6b92 100644 --- a/packages/fetchai/skills/carpark_client/skill.yaml +++ b/packages/fetchai/skills/carpark_client/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmeypYUvYR61ZD7qWQmeMnGq3ior9dQ6uuRpAduws65rFG __init__.py: QmPZ4bRmXpsDKD7ogCJHEMrtm67hpA5aqxvujgfQD1PtMd - behaviours.py: QmW2VLVXoepN7V1u4rgARXjp9d9PpPfVgMz2KuNdR76aRg - dialogues.py: QmcMynppu7B2nZR21LzxFQMpoRdegpWpwcXti2ba4Vcei5 - handlers.py: Qme3AaVj6UPLufnMFoXVQKZn5EbEa1JsUqUNHh7jrxKWBE - strategy.py: QmRSgvrswoay8vF6woRm97vYVK9ZAGk1Gh26EkD4fFmbjz + behaviours.py: QmXw3wGKAqCT55MRX61g3eN1T2YVY4XC5z9b4Dg7x1Wihc + dialogues.py: QmcUgBjxeytE5aAx3VvPyna5EcBuqck9KazG3HygCWjawv + handlers.py: QmYx8WzeR2aCg2b2uiR1K2NHLn8DKhzAahLXoFnrXyDoDz + strategy.py: QmZVALhDnpEdxLhk3HLAmTs3JdEr9tk1QTS33ZsVnxkLXZ fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/carpark_client/strategy.py b/packages/fetchai/skills/carpark_client/strategy.py index 9748064074..4b755b9173 100644 --- a/packages/fetchai/skills/carpark_client/strategy.py +++ b/packages/fetchai/skills/carpark_client/strategy.py @@ -21,4 +21,5 @@ from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy + Strategy = GenericStrategy diff --git a/packages/fetchai/skills/carpark_detection/behaviours.py b/packages/fetchai/skills/carpark_detection/behaviours.py index 24754d2cd2..589ac88e89 100755 --- a/packages/fetchai/skills/carpark_detection/behaviours.py +++ b/packages/fetchai/skills/carpark_detection/behaviours.py @@ -23,4 +23,5 @@ GenericServiceRegistrationBehaviour, ) + ServiceRegistrationBehaviour = GenericServiceRegistrationBehaviour diff --git a/packages/fetchai/skills/carpark_detection/database.py b/packages/fetchai/skills/carpark_detection/database.py index 5d74865ad1..31dd90e8f9 100644 --- a/packages/fetchai/skills/carpark_detection/database.py +++ b/packages/fetchai/skills/carpark_detection/database.py @@ -27,6 +27,7 @@ import skimage # type: ignore + _logger = logging.getLogger( "aea.packages.fetchai.skills.carpark_detection.detection_database" ) diff --git a/packages/fetchai/skills/carpark_detection/dialogues.py b/packages/fetchai/skills/carpark_detection/dialogues.py index aa3bde5528..d493129414 100644 --- a/packages/fetchai/skills/carpark_detection/dialogues.py +++ b/packages/fetchai/skills/carpark_detection/dialogues.py @@ -39,6 +39,7 @@ OefSearchDialogues as GenericOefSearchDialogues, ) + DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/carpark_detection/handlers.py b/packages/fetchai/skills/carpark_detection/handlers.py index f0d711e69c..d92a4497fd 100644 --- a/packages/fetchai/skills/carpark_detection/handlers.py +++ b/packages/fetchai/skills/carpark_detection/handlers.py @@ -25,6 +25,7 @@ GenericOefSearchHandler, ) + FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/carpark_detection/skill.yaml b/packages/fetchai/skills/carpark_detection/skill.yaml index 1371479964..57a671e830 100644 --- a/packages/fetchai/skills/carpark_detection/skill.yaml +++ b/packages/fetchai/skills/carpark_detection/skill.yaml @@ -9,11 +9,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmcwNhv5N8m4ZtWvXY5eMDeL5ciivryDZPtGWXMFfTbYR7 __init__.py: QmQoECB7dpCDCG3xCnBsoMy6oqgSdu69CzRcAcuZuyapnQ - behaviours.py: QmaPS7Q3jJMASLRzGBpM5nzw3qQfkEwa9AW6kRv8nAjDo7 - database.py: QmQv79qDxNk8v9chNYq7AxxChAJVGs4B8Y9we35rjzaonP - dialogues.py: QmeYs1FYc1Ud4yXULoyf1nSqornVx2dczFCJbF1BwM2gzD - handlers.py: QmZ7r1LaYnjjkW6T7XLdmWdHjmyd9DsBjnFDvf5zoa6U6V - strategy.py: QmTHW32BzzYrBF1YkmftAMuyx6cKKGrp554qeKiFBJieJJ + behaviours.py: QmTNboU3YH8DehWnpZmoiDUCncpNmqoSVt1Yp4j7NsgY2S + database.py: QmcZ7zomRfpVakRQBaDFzkuAN8noEWkHo2LLxUMNpF1xUp + dialogues.py: QmPXfUWDxnHDaHQqsgtVhJ2v9dEgGWLtvEHKFvvFcDXGms + handlers.py: QmbkmEP9K4Qu2MsRtnkdx3PGNbSW46qi48bCHVCUJHpcQF + strategy.py: QmUCmsvvKqRsM4nFuhsUUTfCnZ6zPffXytD3PjMjFdqHdU fingerprint_ignore_patterns: - temp_files_placeholder/* contracts: [] diff --git a/packages/fetchai/skills/carpark_detection/strategy.py b/packages/fetchai/skills/carpark_detection/strategy.py index f3cde2bdf7..fda05ba286 100644 --- a/packages/fetchai/skills/carpark_detection/strategy.py +++ b/packages/fetchai/skills/carpark_detection/strategy.py @@ -27,6 +27,7 @@ from packages.fetchai.skills.carpark_detection.database import DetectionDatabase from packages.fetchai.skills.generic_seller.strategy import GenericStrategy + DEFAULT_DB_IS_REL_TO_CWD = False DEFAULT_DB_REL_DIR = "temp_files_placeholder" diff --git a/packages/fetchai/skills/echo/dialogues.py b/packages/fetchai/skills/echo/dialogues.py index 877e8356dd..a0b0c96e5e 100644 --- a/packages/fetchai/skills/echo/dialogues.py +++ b/packages/fetchai/skills/echo/dialogues.py @@ -25,6 +25,7 @@ from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.skills.base import Model + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/echo/skill.yaml b/packages/fetchai/skills/echo/skill.yaml index ea30fccd22..e83fba6fd6 100644 --- a/packages/fetchai/skills/echo/skill.yaml +++ b/packages/fetchai/skills/echo/skill.yaml @@ -9,7 +9,7 @@ fingerprint: README.md: Qmd884WK35W5JuT6i1gXQFspxVPnCpeXv9kqWXnUaUAx4E __init__.py: QmTf1GCgHxu7qq4HvUNYiBwuGEL1DcsHQuWH7N7TB5TtoC behaviours.py: QmXARXRvJkpzuqnYNhJhv42Sk6J4KzRW2AKvC6FJWLU9JL - dialogues.py: QmTWhg4VnPFVsEq6D4KQvLWZntFDBxY7ujEjgD7ZspKcen + dialogues.py: QmbfLMqP1aScVV68rEUpenKiWA5KsnT1Zq48jVnk5jFmQ5 handlers.py: QmfD1dbce2WoPF54DNgu9DUNZrHeTucA5LyDoiFr8j5pTx fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/erc1155_client/behaviours.py b/packages/fetchai/skills/erc1155_client/behaviours.py index dfa465d175..fd336e7fad 100644 --- a/packages/fetchai/skills/erc1155_client/behaviours.py +++ b/packages/fetchai/skills/erc1155_client/behaviours.py @@ -31,6 +31,7 @@ ) from packages.fetchai.skills.erc1155_client.strategy import Strategy + DEFAULT_SEARCH_INTERVAL = 5.0 LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/erc1155_client/handlers.py b/packages/fetchai/skills/erc1155_client/handlers.py index fd542bd2b1..b0466bf9c5 100644 --- a/packages/fetchai/skills/erc1155_client/handlers.py +++ b/packages/fetchai/skills/erc1155_client/handlers.py @@ -47,6 +47,7 @@ ) from packages.fetchai.skills.erc1155_client.strategy import Strategy + LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index 099ed84f66..8f419f4185 100644 --- a/packages/fetchai/skills/erc1155_client/skill.yaml +++ b/packages/fetchai/skills/erc1155_client/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZLsx2wJE762rqDqfeqLMg9RBczvALxy3H2U9kfRvgK3s __init__.py: QmRXXJsv5bfvb7qsyxQtVzXwn6PMLJKkbm6kg4DNkT1NtW - behaviours.py: QmaCak7V3jYEWdj4fLdd2tEG4fiSazbLBC5WKjDeSAQhrh + behaviours.py: QmZwfSsHuCquNXfWaj2y4x5iTS7hhborRkkcaSCf83ELNo dialogues.py: QmPb2odXbXxuY5Ygm9mfCufM2mtMZ23oapsAzsWHC2x2k4 - handlers.py: QmSahx4wij2w9X6Zm9wAHyeJVRifpKGkstwYKDzcosqkfe - strategy.py: QmNg87LgfLPoPyokFrmvrNghQD7JkWehRNAdRNyB3YogeN + handlers.py: QmNPXo4j4tZDSGBfufz6xocH6yJiCAfqw2bo7L2nhBSTiL + strategy.py: QmNroEjE9CZ5VKdCK3ojeEzknPdum2A2XjoYAGQRuFSjZS fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/erc1155_client/strategy.py b/packages/fetchai/skills/erc1155_client/strategy.py index d528a4bb95..c4a9e5ddd9 100644 --- a/packages/fetchai/skills/erc1155_client/strategy.py +++ b/packages/fetchai/skills/erc1155_client/strategy.py @@ -24,6 +24,7 @@ from aea.helpers.search.models import Constraint, ConstraintType, Location, Query from aea.skills.base import Model + DEFAULT_LOCATION = {"longitude": 51.5194, "latitude": 0.1270} DEFAULT_SEARCH_QUERY = { "search_key": "seller_service", diff --git a/packages/fetchai/skills/erc1155_deploy/behaviours.py b/packages/fetchai/skills/erc1155_deploy/behaviours.py index 84357c3b9c..397b93405c 100644 --- a/packages/fetchai/skills/erc1155_deploy/behaviours.py +++ b/packages/fetchai/skills/erc1155_deploy/behaviours.py @@ -34,6 +34,7 @@ ) from packages.fetchai.skills.erc1155_deploy.strategy import Strategy + DEFAULT_SERVICES_INTERVAL = 30.0 LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/erc1155_deploy/handlers.py b/packages/fetchai/skills/erc1155_deploy/handlers.py index 540cf087af..fd9f0a7168 100644 --- a/packages/fetchai/skills/erc1155_deploy/handlers.py +++ b/packages/fetchai/skills/erc1155_deploy/handlers.py @@ -47,6 +47,7 @@ ) from packages.fetchai.skills.erc1155_deploy.strategy import Strategy + LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index fadc21b3bf..a69c4d2d60 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZ7swVkRpmJbJZ2NoLb9CWwH8p3QjnjRJg71UbAXdrKyx __init__.py: Qmbm3ZtGpfdvvzqykfRqbaReAK9a16mcyK7qweSfeN5pq1 - behaviours.py: QmaiK1q2cYeP64YriCw6PHm9Mr1okMRU9esPftQDXXFy1f + behaviours.py: QmTxNwRPPSavQQFSnQLkEX6c49qJVg9cFfJuFv8HBpgvKo dialogues.py: QmcCbdxFM4SX3MgXDxxbsC66gp8QK3C4W2czniQ5oDNc7G - handlers.py: Qmeof4YFVmZGUacBBbibhnEH4CU4hDCDmcKRoEBx6NPvvd - strategy.py: QmeoDg7UT5MG5khmrZna3v8HYrC6QJjjEV26kcq1mPs6yx + handlers.py: QmSp3YuFz5nLy6Bc6qQr27ZUtwNQR6LyKiRHXcYpnmhm9r + strategy.py: QmaHiqKdShWi1ZAUeLpmKAKYN7Np9wZ3SnKYadMStqWdZn fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/erc1155_deploy/strategy.py b/packages/fetchai/skills/erc1155_deploy/strategy.py index bdb058f810..c47f57ac4d 100644 --- a/packages/fetchai/skills/erc1155_deploy/strategy.py +++ b/packages/fetchai/skills/erc1155_deploy/strategy.py @@ -36,6 +36,7 @@ from packages.fetchai.contracts.erc1155.contract import ERC1155Contract + DEFAULT_IS_LEDGER_TX = True DEFAULT_NFT = 1 DEFAULT_FT = 2 diff --git a/packages/fetchai/skills/generic_buyer/behaviours.py b/packages/fetchai/skills/generic_buyer/behaviours.py index 1eecadaa15..5a8a0c2c8f 100644 --- a/packages/fetchai/skills/generic_buyer/behaviours.py +++ b/packages/fetchai/skills/generic_buyer/behaviours.py @@ -31,6 +31,7 @@ ) from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy + DEFAULT_SEARCH_INTERVAL = 5.0 LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/generic_buyer/dialogues.py b/packages/fetchai/skills/generic_buyer/dialogues.py index 3e57ed0b77..aeffb739e0 100644 --- a/packages/fetchai/skills/generic_buyer/dialogues.py +++ b/packages/fetchai/skills/generic_buyer/dialogues.py @@ -58,6 +58,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/generic_buyer/handlers.py b/packages/fetchai/skills/generic_buyer/handlers.py index 0e60ef1b1a..dc2318533f 100644 --- a/packages/fetchai/skills/generic_buyer/handlers.py +++ b/packages/fetchai/skills/generic_buyer/handlers.py @@ -44,6 +44,7 @@ ) from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy + LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/generic_buyer/skill.yaml b/packages/fetchai/skills/generic_buyer/skill.yaml index 3072c5b6b0..3d6c91eef6 100644 --- a/packages/fetchai/skills/generic_buyer/skill.yaml +++ b/packages/fetchai/skills/generic_buyer/skill.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmTR91jm7WfJpmabisy74NR5mc35YXjDU1zQAUKZeHRw8L __init__.py: QmaEDrNJBeHCJpbdFckRUhLSBqCXQ6umdipTMpYhqSKxSG - behaviours.py: QmSEymQerdUYooELqC2NyXJFpXLpwBX49G1DjMzzMVa69s - dialogues.py: QmeUqYS9BXKfVJZDPUwLQZAzzEwPJcdDt9hPiBAKPYazt6 - handlers.py: QmZVuiu84WgGX3R438kuDVcNJZrahzWgLxsPAy34R6kc34 - strategy.py: Qmb2T99WnQQa4qyZSdu31QyrbtHy8ZWC6Jhv9sVrTYrFxE + behaviours.py: QmX7Km1haWpc8bXm24kD7d5F14me9sSfAo5X3JZtBhGUph + dialogues.py: QmY3uJpB2UpWsa9SipZQzMjYr7WtSycuF5YS3SLyCuh78N + handlers.py: QmTHw6Eg4zga1yzeskxu3qUKYcj56kLeogpJSYUwsvs29o + strategy.py: QmchU21Gb1pmNoGmFTDass7zhNE8rCvWGNh1UYFK5DzhoK fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/generic_buyer/strategy.py b/packages/fetchai/skills/generic_buyer/strategy.py index bb7797bc11..d0966aa86e 100644 --- a/packages/fetchai/skills/generic_buyer/strategy.py +++ b/packages/fetchai/skills/generic_buyer/strategy.py @@ -33,6 +33,7 @@ from aea.helpers.transaction.base import Terms from aea.skills.base import Model + DEFAULT_LEDGER_ID = DEFAULT_LEDGER DEFAULT_IS_LEDGER_TX = True diff --git a/packages/fetchai/skills/generic_seller/behaviours.py b/packages/fetchai/skills/generic_seller/behaviours.py index 0a7cb9028f..c60d770500 100644 --- a/packages/fetchai/skills/generic_seller/behaviours.py +++ b/packages/fetchai/skills/generic_seller/behaviours.py @@ -31,6 +31,7 @@ ) from packages.fetchai.skills.generic_seller.strategy import GenericStrategy + DEFAULT_SERVICES_INTERVAL = 60.0 LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/generic_seller/dialogues.py b/packages/fetchai/skills/generic_seller/dialogues.py index dbdff8f02d..72ef9bf837 100644 --- a/packages/fetchai/skills/generic_seller/dialogues.py +++ b/packages/fetchai/skills/generic_seller/dialogues.py @@ -53,6 +53,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/generic_seller/handlers.py b/packages/fetchai/skills/generic_seller/handlers.py index 1fe577cb7a..db4547380b 100644 --- a/packages/fetchai/skills/generic_seller/handlers.py +++ b/packages/fetchai/skills/generic_seller/handlers.py @@ -42,6 +42,7 @@ ) from packages.fetchai.skills.generic_seller.strategy import GenericStrategy + LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/generic_seller/skill.yaml b/packages/fetchai/skills/generic_seller/skill.yaml index 24bb952fc8..942e3dfa32 100644 --- a/packages/fetchai/skills/generic_seller/skill.yaml +++ b/packages/fetchai/skills/generic_seller/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPb5kHYZyhUN87EKmuahyGqDGgqVdGPyfC1KpGC3xfmcP __init__.py: QmbfkeFnZVKppLEHpBrTXUXBwg2dpPABJWSLND8Lf1cmpG - behaviours.py: QmTYpaELjbZxs128wSAxLry6vKgjnz3EuuDVy86T7XVAQ6 - dialogues.py: QmRJCregJWVs8scTMjQptvztKa5NEHKUfeZECVxdU233C6 - handlers.py: QmYyAYGiSMzUAq96LuFsVewYut9njvCR3NG9uEKonnwGf5 - strategy.py: QmX1mp7eZkz1P6iVyoDCATZDKZRgwe1EgMVmAyvtGDHvm3 + behaviours.py: QmdHumzBTxWg2PgWzwNVF4a5eG1dhGXzDwrY9eq4uevHqs + dialogues.py: QmfBWHVuKTzXu8vV5AkgWF6ZqMTZ3bs7SHEykoKXdmqvnH + handlers.py: QmdCtELzeNVBtVozwMLqMeVDuk2JdS8CG5D3xssBWEjTrk + strategy.py: QmUrUJzDoKFk6mhoz5ui58pXxVjTkPfEMnSdM8UezTjy3S fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/generic_seller/strategy.py b/packages/fetchai/skills/generic_seller/strategy.py index 0233da532b..a22aa9e183 100644 --- a/packages/fetchai/skills/generic_seller/strategy.py +++ b/packages/fetchai/skills/generic_seller/strategy.py @@ -36,6 +36,7 @@ from aea.helpers.transaction.base import Terms from aea.skills.base import Model + DEFAULT_LEDGER_ID = DEFAULT_LEDGER DEFAULT_IS_LEDGER_TX = True diff --git a/packages/fetchai/skills/gym/dialogues.py b/packages/fetchai/skills/gym/dialogues.py index 831524be4f..be966cc833 100644 --- a/packages/fetchai/skills/gym/dialogues.py +++ b/packages/fetchai/skills/gym/dialogues.py @@ -35,6 +35,7 @@ from packages.fetchai.protocols.gym.dialogues import GymDialogue as BaseGymDialogue from packages.fetchai.protocols.gym.dialogues import GymDialogues as BaseGymDialogues + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/gym/helpers.py b/packages/fetchai/skills/gym/helpers.py index f32e80eb2a..6347f05b1d 100644 --- a/packages/fetchai/skills/gym/helpers.py +++ b/packages/fetchai/skills/gym/helpers.py @@ -32,6 +32,7 @@ from packages.fetchai.protocols.gym.message import GymMessage from packages.fetchai.skills.gym.dialogues import GymDialogue, GymDialogues + Action = Any Observation = Any Reward = float diff --git a/packages/fetchai/skills/gym/rl_agent.py b/packages/fetchai/skills/gym/rl_agent.py index 64b8a61493..771178fa0f 100644 --- a/packages/fetchai/skills/gym/rl_agent.py +++ b/packages/fetchai/skills/gym/rl_agent.py @@ -27,6 +27,7 @@ from packages.fetchai.skills.gym.helpers import ProxyEnv, RLAgent + DEFAULT_NB_STEPS = 4000 NB_GOODS = 10 diff --git a/packages/fetchai/skills/gym/skill.yaml b/packages/fetchai/skills/gym/skill.yaml index 5f983718bd..a045eb7c63 100644 --- a/packages/fetchai/skills/gym/skill.yaml +++ b/packages/fetchai/skills/gym/skill.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUpD7PeLHS8nH7HJ48hBafSFhLn8Yrh571RCmxnStpNwq __init__.py: QmTf1GCgHxu7qq4HvUNYiBwuGEL1DcsHQuWH7N7TB5TtoC - dialogues.py: QmWQrpkx9GP3E1a9STqDQtKfXmKEUtrVkCEQjXh8YTeL8U + dialogues.py: QmTETCiWFK7vu8PMM9AaY64xHZhHivafmX33n4FXVKSub6 handlers.py: QmagqBdQaGuGbVS5dFqxFtEww2e1YF2NprBNPtt5pVA2hZ - helpers.py: QmbRSMX7UCRAEotS4ocTEcZLo1qietAAU9K5zBtqY1nE82 - rl_agent.py: QmUq3XY9Dd2XZBhNNK9J3S5937d3az4cwP1BmeieHSgJ3m + helpers.py: QmeYUyhPUeR6umfUGwMuE9nH6QCPhwkBpGxRG6P3s1avHu + rl_agent.py: QmQMrewAKFZn7EmmHajm1wn1NJHvVUgxosaGR5zapWt13s tasks.py: QmVf9K7zCkKYduTnS7nS3d8FvUbEVy7s7a26yaCC8Q3rgd fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/http_echo/dialogues.py b/packages/fetchai/skills/http_echo/dialogues.py index e2d7d164e5..e0006a7855 100644 --- a/packages/fetchai/skills/http_echo/dialogues.py +++ b/packages/fetchai/skills/http_echo/dialogues.py @@ -35,6 +35,7 @@ from packages.fetchai.protocols.http.dialogues import HttpDialogue as BaseHttpDialogue from packages.fetchai.protocols.http.dialogues import HttpDialogues as BaseHttpDialogues + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/http_echo/skill.yaml b/packages/fetchai/skills/http_echo/skill.yaml index 86be8f91e3..1866ee9702 100644 --- a/packages/fetchai/skills/http_echo/skill.yaml +++ b/packages/fetchai/skills/http_echo/skill.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmYMHPsBX3wTMZZP89aKa7FzDCqGyvvue54ZBN8NZt4mNt __init__.py: QmaKik9dXg6cajBPG9RTDr6BhVdWk8aoR8QDNfPQgiy1kv - dialogues.py: QmQNBqcRDZwYSK3hucbNZf4CiTxEei5c4MV5wXvu1tZx1C + dialogues.py: QmNWC7bEimPQUL1QbJD4uyZ16szPR6WsrKt3MuHZXKkwAH handlers.py: QmdTuiao42XEvbp2wuqKP4U4noRqAVdec9rss51pswYCoe fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/ml_data_provider/behaviours.py b/packages/fetchai/skills/ml_data_provider/behaviours.py index 0c086baff1..76a04e4899 100644 --- a/packages/fetchai/skills/ml_data_provider/behaviours.py +++ b/packages/fetchai/skills/ml_data_provider/behaviours.py @@ -23,4 +23,5 @@ GenericServiceRegistrationBehaviour, ) + ServiceRegistrationBehaviour = GenericServiceRegistrationBehaviour diff --git a/packages/fetchai/skills/ml_data_provider/dialogues.py b/packages/fetchai/skills/ml_data_provider/dialogues.py index e175dac3b9..627e4c03c3 100644 --- a/packages/fetchai/skills/ml_data_provider/dialogues.py +++ b/packages/fetchai/skills/ml_data_provider/dialogues.py @@ -53,6 +53,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/ml_data_provider/skill.yaml b/packages/fetchai/skills/ml_data_provider/skill.yaml index 6747072baf..a4cdf26aed 100644 --- a/packages/fetchai/skills/ml_data_provider/skill.yaml +++ b/packages/fetchai/skills/ml_data_provider/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmakpsKWJrGRsoFaKR1Gf94KqcuPrkdXTYyciq5d4EhoFF __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ - behaviours.py: QmWC4PEwWEyqcEJ9rTFjL9YpZ1pgkSpY9f4pE9mQHviSLz - dialogues.py: QmdFsEXJdTiQo7GSS1U7n9ukd79ZEDVki3ifeYeGsowv2G + behaviours.py: QmWgXU9qgahXwMKNqLLfDiGNYJozSXv2SVMkoPDQncC7ok + dialogues.py: QmUExSjdSxrtTDzMB8tZ5J9tFrgd78LhdMuvptpViSPfAW handlers.py: QmbmS4C1GdumnVkA5dc7czWRkjb9HGzY7YeATrnuMVU2X9 - strategy.py: QmUsa36TcE6DXjdDDz1u1tAPVPHaJyMnVCTxudJhVCyA3e + strategy.py: QmaCViuN7q33drEtnJLSFjvBnr4Q6GF9LrJCCdv9AVukxk fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/ml_data_provider/strategy.py b/packages/fetchai/skills/ml_data_provider/strategy.py index 04cd032521..25bf63464d 100644 --- a/packages/fetchai/skills/ml_data_provider/strategy.py +++ b/packages/fetchai/skills/ml_data_provider/strategy.py @@ -33,6 +33,7 @@ from aea.helpers.search.models import Description, Location, Query from aea.skills.base import Model + DEFAULT_PRICE_PER_DATA_BATCH = 10 DEFAULT_BATCH_SIZE = 32 DEFAULT_SELLER_TX_FEE = 0 diff --git a/packages/fetchai/skills/ml_train/behaviours.py b/packages/fetchai/skills/ml_train/behaviours.py index 90540c71f5..875e5c4090 100644 --- a/packages/fetchai/skills/ml_train/behaviours.py +++ b/packages/fetchai/skills/ml_train/behaviours.py @@ -21,4 +21,5 @@ from packages.fetchai.skills.generic_buyer.behaviours import GenericSearchBehaviour + SearchBehaviour = GenericSearchBehaviour diff --git a/packages/fetchai/skills/ml_train/dialogues.py b/packages/fetchai/skills/ml_train/dialogues.py index 4fe3d6c61a..d9c2f2cbb4 100644 --- a/packages/fetchai/skills/ml_train/dialogues.py +++ b/packages/fetchai/skills/ml_train/dialogues.py @@ -62,6 +62,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/ml_train/handlers.py b/packages/fetchai/skills/ml_train/handlers.py index f5c82a88dc..2b94f46624 100644 --- a/packages/fetchai/skills/ml_train/handlers.py +++ b/packages/fetchai/skills/ml_train/handlers.py @@ -46,6 +46,7 @@ ) from packages.fetchai.skills.ml_train.strategy import Strategy + DUMMY_DIGEST = "dummy_digest" LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/ml_train/ml_model.py b/packages/fetchai/skills/ml_train/ml_model.py index 258cd23e01..24b4e56af6 100644 --- a/packages/fetchai/skills/ml_train/ml_model.py +++ b/packages/fetchai/skills/ml_train/ml_model.py @@ -27,6 +27,7 @@ from aea.skills.base import Model + DEFAULT_MODEL_CONFIG_PATH = str(Path("..", "..", "model.config").resolve()) diff --git a/packages/fetchai/skills/ml_train/skill.yaml b/packages/fetchai/skills/ml_train/skill.yaml index 9a1766f226..5f20f79b17 100644 --- a/packages/fetchai/skills/ml_train/skill.yaml +++ b/packages/fetchai/skills/ml_train/skill.yaml @@ -9,12 +9,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmeHcYRhDJi6gqAHpK29UJz3doiyaicoqeTrPddqM3gh64 __init__.py: QmbQigh7SV7dD2hLTGv3k9tnvpYWN1otG5yjiM7F3bbGEQ - behaviours.py: QmbJtAxgudXA35gERW14gMnCA9q79iRNQmKfgTTY9e2Bif - dialogues.py: QmT5owqhNghzRDXrm5FjDX4juGnSUxdCZX76jRCrPGevt7 - handlers.py: QmbXT1EAHEX7hct6auLdBJXX9k9ujdoQgkXZCZqzTfdto1 - ml_model.py: QmXp667GwVRrGsLxtqricnnyrBUUDn6efem22UCBd2g1y8 + behaviours.py: QmQiBzKV5rEFpMQbSjfjzAJ7SqwwGmso6TozWkjdytucLR + dialogues.py: QmPVJzrAKhfhG8n2JLhvycFYRReBFBj362LxH6s885rSQM + handlers.py: QmSZR738THX7bCaXkuuoPDgwF3fo6DSD3hDt7EY2pRGxBm + ml_model.py: QmTfshn6dFnz9gKXZt7aJJczRH14bN7nk6TybwFpzkEPnk model.json: QmdV2tGrRY6VQ5VLgUa4yqAhPDG6X8tYsWecypq8nox9Td - strategy.py: QmY8z1DW6PqQuiEpgXAhwasSk1CgvvTNZQH1LtExupif9g + strategy.py: QmR98NbFLJntoDfMMdps4XVZqXyoWNU97PF8WbxwpsxXxJ tasks.py: QmahJRCf6V61FsqrKgMMUyJ8F7PRd6C2bjunZg2XtM9fpF fingerprint_ignore_patterns: [] contracts: [] diff --git a/packages/fetchai/skills/ml_train/strategy.py b/packages/fetchai/skills/ml_train/strategy.py index e772102d23..4eb44a3826 100644 --- a/packages/fetchai/skills/ml_train/strategy.py +++ b/packages/fetchai/skills/ml_train/strategy.py @@ -30,6 +30,7 @@ ) from aea.skills.base import Model + DEFAULT_MAX_ROW_PRICE = 5 DEFAULT_MAX_TX_FEE = 2 DEFAULT_CURRENCY_ID = "FET" diff --git a/packages/fetchai/skills/simple_service_registration/behaviours.py b/packages/fetchai/skills/simple_service_registration/behaviours.py index d2fba8f27c..a8d56d99f2 100644 --- a/packages/fetchai/skills/simple_service_registration/behaviours.py +++ b/packages/fetchai/skills/simple_service_registration/behaviours.py @@ -29,6 +29,7 @@ ) from packages.fetchai.skills.simple_service_registration.strategy import Strategy + DEFAULT_SERVICES_INTERVAL = 30.0 diff --git a/packages/fetchai/skills/simple_service_registration/dialogues.py b/packages/fetchai/skills/simple_service_registration/dialogues.py index 8cfa6723d6..9b1b4b03d3 100644 --- a/packages/fetchai/skills/simple_service_registration/dialogues.py +++ b/packages/fetchai/skills/simple_service_registration/dialogues.py @@ -35,6 +35,7 @@ OefSearchDialogues as BaseOefSearchDialogues, ) + OefSearchDialogue = BaseOefSearchDialogue diff --git a/packages/fetchai/skills/simple_service_registration/handlers.py b/packages/fetchai/skills/simple_service_registration/handlers.py index 3826e190f2..2a09d52d4e 100644 --- a/packages/fetchai/skills/simple_service_registration/handlers.py +++ b/packages/fetchai/skills/simple_service_registration/handlers.py @@ -31,6 +31,7 @@ OefSearchDialogues, ) + LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" diff --git a/packages/fetchai/skills/simple_service_registration/skill.yaml b/packages/fetchai/skills/simple_service_registration/skill.yaml index 04c176e168..ebd93696c0 100644 --- a/packages/fetchai/skills/simple_service_registration/skill.yaml +++ b/packages/fetchai/skills/simple_service_registration/skill.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmPuD9EtLKV143FbAaGUht5ZVtemVWXnm1jYmQxyUNnZ9T __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: Qmcz55RRytuCEZTkAU5PxX4jjaPxkp3f747ivJcceH78b4 - dialogues.py: QmRJP7qGj2X74KoKrSMQiPkCRP6dGKtunw4e7qVwh1Sa3E - handlers.py: QmcFWEWmjDFxiksQiwWSUJ3mzJhVRXt9EmrD6PTHCmUX5G - strategy.py: QmNTZ6XXAv6nvJs7B1p5mt7bVdH4pb3motxADDrxCpbmWF + behaviours.py: QmbAQq8xchbxFu7QT3RofR1VX1ExQGUBemCQuNjc5bUnVA + dialogues.py: QmX8L6qMd4X6LHLyPmiXaQL2LA5Ca9Q6B77qYdfvfJ3aen + handlers.py: QmSjcePSvevn3msjeyTsrE9fzsJARCMyrM2TWGPCfQuAEi + strategy.py: QmSBEPT151kejVVjQG4fuyHMPK1PZ4KQkY2fV4p9MKLAXb fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/simple_service_registration/strategy.py b/packages/fetchai/skills/simple_service_registration/strategy.py index 116822eca4..ca6fa6d145 100644 --- a/packages/fetchai/skills/simple_service_registration/strategy.py +++ b/packages/fetchai/skills/simple_service_registration/strategy.py @@ -28,6 +28,7 @@ from aea.helpers.search.models import Description, Location from aea.skills.base import Model + DEFAULT_LOCATION = {"longitude": 51.5194, "latitude": 0.1270} DEFAULT_SERVICE_DATA = {"key": "seller_service", "value": "generic_service"} diff --git a/packages/fetchai/skills/tac_control/dialogues.py b/packages/fetchai/skills/tac_control/dialogues.py index ad7982d1d5..dc1f522c68 100644 --- a/packages/fetchai/skills/tac_control/dialogues.py +++ b/packages/fetchai/skills/tac_control/dialogues.py @@ -43,6 +43,7 @@ from packages.fetchai.protocols.tac.dialogues import TacDialogue as BaseTacDialogue from packages.fetchai.protocols.tac.dialogues import TacDialogues as BaseTacDialogues + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index 99cd613e18..7688887183 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -54,6 +54,7 @@ ) from packages.fetchai.skills.tac_control.parameters import Parameters + GoodId = str CurrencyId = str Quantity = int diff --git a/packages/fetchai/skills/tac_control/helpers.py b/packages/fetchai/skills/tac_control/helpers.py index fbe56fa922..803d5289af 100644 --- a/packages/fetchai/skills/tac_control/helpers.py +++ b/packages/fetchai/skills/tac_control/helpers.py @@ -28,6 +28,7 @@ from aea.exceptions import enforce + QUANTITY_SHIFT = 1 # Any non-negative integer is fine. DEFAULT_CURRENCY_ID_TO_NAME = {"0": "FET"} diff --git a/packages/fetchai/skills/tac_control/parameters.py b/packages/fetchai/skills/tac_control/parameters.py index 8198910907..7d89b288af 100644 --- a/packages/fetchai/skills/tac_control/parameters.py +++ b/packages/fetchai/skills/tac_control/parameters.py @@ -26,6 +26,7 @@ from aea.helpers.search.models import Location from aea.skills.base import Model + DEFAULT_LOCATION = {"longitude": 51.5194, "latitude": 0.1270} DEFAULT_SERVICE_DATA = {"key": "tac", "value": "v1"} diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index e1b7dbd0fc..8c6978739b 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -10,11 +10,11 @@ fingerprint: README.md: QmdWECpRXZXH5JPV6wVHqeUtvjBhieUFTEoT2e7EY16N8M __init__.py: Qme9YfgfPXymvupw1EHMJWGUSMTT6JQZxk2qaeKE76pgyN behaviours.py: QmTVCXtTpH1A55vWnynz1PjM4VCrQ6EDy5XfcJpT93doEq - dialogues.py: QmV38FUrGYZeBcnC5cexQrNA5bdsJ44dC5hWTRSZiUxQmK - game.py: QmeAmG3LH1xBFRvUATrWY7spSDmjNeXVD4ZNYrt1BRY3jB + dialogues.py: QmcVYVTZ95UKBnXzmKyGLo5LwSVcGYUTrifosQMSpzNnCX + game.py: QmUALtQyMid2o58DjbJ7uHR5Vx3ZnTxP6dyPHMLJWUo8SN handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW - helpers.py: QmdG31YUJakBz8FdNNxU6RxqhWy9iv1BG253PzfxBhzqq2 - parameters.py: QmQB95beEKzyA8Aa7Y9HTPw6BPEVi6BGkpsUqN4QZ4DcVG + helpers.py: QmQxT9wX8KLEMudJci9ST5M9RswmdZoiKSS5RY5UgRvrAP + parameters.py: QmNwnsG5um2E56ymc4y7akCwXLof94Y9wxe5bqkygk3VAa fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 28562d5ae1..6df52ee3b6 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -44,6 +44,7 @@ ) from packages.fetchai.skills.tac_control_contract.parameters import Parameters + CONTROLLER_DATAMODEL = DataModel( "tac", [Attribute("version", str, True, "Version number of the TAC Controller Agent.")], diff --git a/packages/fetchai/skills/tac_control_contract/game.py b/packages/fetchai/skills/tac_control_contract/game.py index 5120453dc0..eb145223a0 100644 --- a/packages/fetchai/skills/tac_control_contract/game.py +++ b/packages/fetchai/skills/tac_control_contract/game.py @@ -45,6 +45,7 @@ ) from packages.fetchai.skills.tac_control_contract.parameters import Parameters + GoodId = str CurrencyId = str Quantity = int diff --git a/packages/fetchai/skills/tac_control_contract/helpers.py b/packages/fetchai/skills/tac_control_contract/helpers.py index 6441d00f9f..ef4a86225c 100644 --- a/packages/fetchai/skills/tac_control_contract/helpers.py +++ b/packages/fetchai/skills/tac_control_contract/helpers.py @@ -29,6 +29,7 @@ from packages.fetchai.contracts.erc1155.contract import ERC1155Contract + QUANTITY_SHIFT = 1 # Any non-negative integer is fine. FT_NAME = "FT" FT_ID = 2 diff --git a/packages/fetchai/skills/tac_control_contract/parameters.py b/packages/fetchai/skills/tac_control_contract/parameters.py index 7b7d098d80..b723de9e01 100644 --- a/packages/fetchai/skills/tac_control_contract/parameters.py +++ b/packages/fetchai/skills/tac_control_contract/parameters.py @@ -25,6 +25,7 @@ from aea.exceptions import AEAEnforceError, enforce from aea.skills.base import Model + DEFAULT_MIN_NB_AGENTS = 5 DEFAULT_MONEY_ENDOWMENT = 200 DEFAULT_NB_GOODS = 9 # ERC1155 vyper contract only accepts 10 tokens per mint/create diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 42af59473b..360abaaf9b 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,11 +9,11 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmV6mToyVnQL9squVJntDPrHvtxFk7sfEYJ61Fyoiy9wsE __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmcLSggJr1XpiDEwefCGGpfwUp282J4i97ziCNFH7X1M9C - game.py: Qmdz91tAYzEFDsvN4hNBawK7D7beTfocps1hpQc3RgavUK + behaviours.py: QmPWZCP4kPGqxK1L6xEm98R533Pi1WYgEw7EByuuvMHezK + game.py: QmfUHpi9KPnJbV3yneSh7tWen3JXPKhXw9Sn927Nth3obV handlers.py: QmWyibFRxcunBLqb7FJEkx9RpS6fNZpAvNDkG6cCfK7mQd - helpers.py: QmQ36tdx5itzz189tUgmyR74Q63vSRUcPTsg9qEwBUYdNU - parameters.py: QmRU9gxsWcxy25g69jbrKve2f8kFxNBjFfRjPZNKsYoYCP + helpers.py: QmX3iv37Z5CmGupCtikc4muTpJyQ9zvjeLbNKDLF7iPhSZ + parameters.py: QmXYqasdtJacZFYXJgprG1i24pNeM2P6ehzg2qrxKt3GZc fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/tac_negotiation/behaviours.py b/packages/fetchai/skills/tac_negotiation/behaviours.py index 536ad27706..27be3e7a0c 100644 --- a/packages/fetchai/skills/tac_negotiation/behaviours.py +++ b/packages/fetchai/skills/tac_negotiation/behaviours.py @@ -32,6 +32,7 @@ from packages.fetchai.skills.tac_negotiation.strategy import Strategy from packages.fetchai.skills.tac_negotiation.transactions import Transactions + DEFAULT_REGISTER_AND_SEARCH_INTERVAL = 5.0 diff --git a/packages/fetchai/skills/tac_negotiation/dialogues.py b/packages/fetchai/skills/tac_negotiation/dialogues.py index cd8c7c1b7f..493185e91d 100644 --- a/packages/fetchai/skills/tac_negotiation/dialogues.py +++ b/packages/fetchai/skills/tac_negotiation/dialogues.py @@ -51,6 +51,7 @@ SUPPLY_DATAMODEL_NAME, ) + DefaultDialogue = BaseDefaultDialogue diff --git a/packages/fetchai/skills/tac_negotiation/helpers.py b/packages/fetchai/skills/tac_negotiation/helpers.py index 9e965f377f..b767cda175 100644 --- a/packages/fetchai/skills/tac_negotiation/helpers.py +++ b/packages/fetchai/skills/tac_negotiation/helpers.py @@ -33,6 +33,7 @@ Query, ) + SUPPLY_DATAMODEL_NAME = "supply" DEMAND_DATAMODEL_NAME = "demand" diff --git a/packages/fetchai/skills/tac_negotiation/skill.yaml b/packages/fetchai/skills/tac_negotiation/skill.yaml index c7eae7a763..267b3e3a04 100644 --- a/packages/fetchai/skills/tac_negotiation/skill.yaml +++ b/packages/fetchai/skills/tac_negotiation/skill.yaml @@ -9,12 +9,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmZucue4N3TX7BPe9CDZybfMQc1zpYbRKEVXAUGYRpcUfD __init__.py: QmcgZLvHebdfocqBmbu6gJp35khs6nbdbC649jzUyS86wy - behaviours.py: QmUm9C86crCZpXkHGCaPKeMfuMnP8BjMzSsjrUGkysmg9T - dialogues.py: QmdzrSoUvvjRzKvAZ53ErHCgwj1r4oQnf8D6tbRnctKTMW + behaviours.py: QmcBCRFpM6ZtcuNZ12HUuwKgQKVdiAqQ6jDNMvzTGMpDdx + dialogues.py: QmdPAjBTpgrW9qP8SnAjKHWxBQRiGUqmgiiXMdrPKAJUKj handlers.py: QmeSaLfQV3rzHuHPhzsBps9z4AbX1MNevTs2YTjnZaWuEA - helpers.py: QmfRnfpeCtHMEXSH3q3ofWhoSc7pbpRrSFSBVStUK3JWt3 - strategy.py: QmUd3cH7TDnc9f3cmDxhSuwQU33Hdn5eb2J4AuKHVE9Uxm - transactions.py: Qmc9Re92RLFkfds1NspTRym1wn7XPGSNDRFGtaG6Hrix4E + helpers.py: QmTJbGL8V6CLhbVhLekqKkHbu7cJMfBcv8DtWLSpkKP5tk + strategy.py: QmYcwqZ9ejjK2zxN8nKoc3kvBoGamTxwGQqXJrWV5s8STx + transactions.py: QmSFgjuvFMymkpCErkEFDiy5o2WCXPJXzVvmWyNjCFFT22 fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/tac_negotiation/strategy.py b/packages/fetchai/skills/tac_negotiation/strategy.py index 2496848c7a..23cadbaa3d 100644 --- a/packages/fetchai/skills/tac_negotiation/strategy.py +++ b/packages/fetchai/skills/tac_negotiation/strategy.py @@ -47,6 +47,7 @@ ) from packages.fetchai.skills.tac_negotiation.transactions import Transactions + ROUNDING_ADJUSTMENT = 1 DEFAULT_LOCATION = {"longitude": 51.5194, "latitude": 0.1270} DEFAULT_SERVICE_KEY = "tac_service" diff --git a/packages/fetchai/skills/tac_negotiation/transactions.py b/packages/fetchai/skills/tac_negotiation/transactions.py index 1997572150..3b7cacb7b1 100644 --- a/packages/fetchai/skills/tac_negotiation/transactions.py +++ b/packages/fetchai/skills/tac_negotiation/transactions.py @@ -39,6 +39,7 @@ SigningDialogues, ) + MessageId = int diff --git a/packages/fetchai/skills/tac_participation/dialogues.py b/packages/fetchai/skills/tac_participation/dialogues.py index f63c6d7c5b..bb05c4b233 100644 --- a/packages/fetchai/skills/tac_participation/dialogues.py +++ b/packages/fetchai/skills/tac_participation/dialogues.py @@ -47,6 +47,7 @@ from packages.fetchai.protocols.tac.dialogues import TacDialogue as BaseTacDialogue from packages.fetchai.protocols.tac.dialogues import TacDialogues as BaseTacDialogues + OefSearchDialogue = BaseOefSearchDialogue diff --git a/packages/fetchai/skills/tac_participation/game.py b/packages/fetchai/skills/tac_participation/game.py index 534c2bd01a..50a508125c 100644 --- a/packages/fetchai/skills/tac_participation/game.py +++ b/packages/fetchai/skills/tac_participation/game.py @@ -32,6 +32,7 @@ TacDialogue, ) + DEFAULT_LEDGER_ID = "ethereum" DEFAULT_LOCATION = {"longitude": 51.5194, "latitude": 0.1270} diff --git a/packages/fetchai/skills/tac_participation/skill.yaml b/packages/fetchai/skills/tac_participation/skill.yaml index a28101841d..74cd860e52 100644 --- a/packages/fetchai/skills/tac_participation/skill.yaml +++ b/packages/fetchai/skills/tac_participation/skill.yaml @@ -10,8 +10,8 @@ fingerprint: README.md: QmVNxdGy1pbosYrrvbXczbkJtU7f5ddrBPSNnFoJA9GJzg __init__.py: QmcVpVrbV54Aogmowu6AomDiVMrVMo9BUvwKt9V1bJpBwp behaviours.py: QmX3UbuLohnPSLM2W6LrWcZyo4zXCr1YN5Bznu61v27SZC - dialogues.py: QmNz8EeBvoR4QCMcVxVqVuLaPvU4nEhRgvxQnXCq1x7jS1 - game.py: QmVGeCGEfwmzktSPQN4xWL5yxjHqNyenneQzeW2vfx4giv + dialogues.py: QmZrJ1d9mhtfkxRg5QfsKbbtVZFa6cKna4anRWHvzNTEdD + game.py: QmWkoofaEnbaNp2X63HCi6pnrpJ9b8i3t7bV36GqeuVNgo handlers.py: QmSseAwQqHsSmj2eBPPnC9eygNSSwL1kheRVsgbLqyeDvV fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/thermometer/behaviours.py b/packages/fetchai/skills/thermometer/behaviours.py index 0c086baff1..76a04e4899 100644 --- a/packages/fetchai/skills/thermometer/behaviours.py +++ b/packages/fetchai/skills/thermometer/behaviours.py @@ -23,4 +23,5 @@ GenericServiceRegistrationBehaviour, ) + ServiceRegistrationBehaviour = GenericServiceRegistrationBehaviour diff --git a/packages/fetchai/skills/thermometer/dialogues.py b/packages/fetchai/skills/thermometer/dialogues.py index aa3bde5528..d493129414 100644 --- a/packages/fetchai/skills/thermometer/dialogues.py +++ b/packages/fetchai/skills/thermometer/dialogues.py @@ -39,6 +39,7 @@ OefSearchDialogues as GenericOefSearchDialogues, ) + DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/thermometer/handlers.py b/packages/fetchai/skills/thermometer/handlers.py index 1c9dec0554..3766f61003 100644 --- a/packages/fetchai/skills/thermometer/handlers.py +++ b/packages/fetchai/skills/thermometer/handlers.py @@ -25,6 +25,7 @@ GenericOefSearchHandler, ) + FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/thermometer/skill.yaml b/packages/fetchai/skills/thermometer/skill.yaml index a975946e98..1e1194ec55 100644 --- a/packages/fetchai/skills/thermometer/skill.yaml +++ b/packages/fetchai/skills/thermometer/skill.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUH2RCKZZ3sKBptXtYZaFJTsJFyk5P1aeTNYYV1YPRNxP __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmWC4PEwWEyqcEJ9rTFjL9YpZ1pgkSpY9f4pE9mQHviSLz - dialogues.py: QmeYs1FYc1Ud4yXULoyf1nSqornVx2dczFCJbF1BwM2gzD - handlers.py: QmeWzG6R8P7z98M2kfXKzmK5u9vT6ZAp2tG7NcXTwWFSaZ - strategy.py: QmcFRUUhi6VubFw51rhkTH28QjQEV67kBFeTmAviroopmZ + behaviours.py: QmWgXU9qgahXwMKNqLLfDiGNYJozSXv2SVMkoPDQncC7ok + dialogues.py: QmPXfUWDxnHDaHQqsgtVhJ2v9dEgGWLtvEHKFvvFcDXGms + handlers.py: QmNujxh4FtecTar5coHTJyY3BnVnsseuARSpyTLUDmFmfX + strategy.py: Qmd3Ugpid9WTMnJUMLdK89PQrcivae264vWk7UrEntb9z9 fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/thermometer/strategy.py b/packages/fetchai/skills/thermometer/strategy.py index e83b9684f8..ecefc1b778 100644 --- a/packages/fetchai/skills/thermometer/strategy.py +++ b/packages/fetchai/skills/thermometer/strategy.py @@ -26,6 +26,7 @@ from packages.fetchai.skills.generic_seller.strategy import GenericStrategy + MAX_RETRIES = 10 diff --git a/packages/fetchai/skills/thermometer_client/behaviours.py b/packages/fetchai/skills/thermometer_client/behaviours.py index deda9acdac..3f2e38b180 100644 --- a/packages/fetchai/skills/thermometer_client/behaviours.py +++ b/packages/fetchai/skills/thermometer_client/behaviours.py @@ -21,4 +21,5 @@ from packages.fetchai.skills.generic_buyer.behaviours import GenericSearchBehaviour + SearchBehaviour = GenericSearchBehaviour diff --git a/packages/fetchai/skills/thermometer_client/dialogues.py b/packages/fetchai/skills/thermometer_client/dialogues.py index 6f1ea07d83..40b2d5a2ac 100644 --- a/packages/fetchai/skills/thermometer_client/dialogues.py +++ b/packages/fetchai/skills/thermometer_client/dialogues.py @@ -43,6 +43,7 @@ SigningDialogues as GenericSigningDialogues, ) + DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/thermometer_client/handlers.py b/packages/fetchai/skills/thermometer_client/handlers.py index ce8f9a83a0..2f1e9cb165 100644 --- a/packages/fetchai/skills/thermometer_client/handlers.py +++ b/packages/fetchai/skills/thermometer_client/handlers.py @@ -26,6 +26,7 @@ GenericSigningHandler, ) + FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/thermometer_client/skill.yaml b/packages/fetchai/skills/thermometer_client/skill.yaml index dd9d186bb6..8f53b3b101 100644 --- a/packages/fetchai/skills/thermometer_client/skill.yaml +++ b/packages/fetchai/skills/thermometer_client/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmSn1bh9J7RT241DGT4812rTNGe2S2YLpEvy8ApNqNNqjf __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmW2VLVXoepN7V1u4rgARXjp9d9PpPfVgMz2KuNdR76aRg - dialogues.py: QmcMynppu7B2nZR21LzxFQMpoRdegpWpwcXti2ba4Vcei5 - handlers.py: Qme3AaVj6UPLufnMFoXVQKZn5EbEa1JsUqUNHh7jrxKWBE - strategy.py: QmRSgvrswoay8vF6woRm97vYVK9ZAGk1Gh26EkD4fFmbjz + behaviours.py: QmXw3wGKAqCT55MRX61g3eN1T2YVY4XC5z9b4Dg7x1Wihc + dialogues.py: QmcUgBjxeytE5aAx3VvPyna5EcBuqck9KazG3HygCWjawv + handlers.py: QmYx8WzeR2aCg2b2uiR1K2NHLn8DKhzAahLXoFnrXyDoDz + strategy.py: QmZVALhDnpEdxLhk3HLAmTs3JdEr9tk1QTS33ZsVnxkLXZ fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/thermometer_client/strategy.py b/packages/fetchai/skills/thermometer_client/strategy.py index 9748064074..4b755b9173 100644 --- a/packages/fetchai/skills/thermometer_client/strategy.py +++ b/packages/fetchai/skills/thermometer_client/strategy.py @@ -21,4 +21,5 @@ from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy + Strategy = GenericStrategy diff --git a/packages/fetchai/skills/weather_client/behaviours.py b/packages/fetchai/skills/weather_client/behaviours.py index deda9acdac..3f2e38b180 100644 --- a/packages/fetchai/skills/weather_client/behaviours.py +++ b/packages/fetchai/skills/weather_client/behaviours.py @@ -21,4 +21,5 @@ from packages.fetchai.skills.generic_buyer.behaviours import GenericSearchBehaviour + SearchBehaviour = GenericSearchBehaviour diff --git a/packages/fetchai/skills/weather_client/dialogues.py b/packages/fetchai/skills/weather_client/dialogues.py index 6f1ea07d83..40b2d5a2ac 100644 --- a/packages/fetchai/skills/weather_client/dialogues.py +++ b/packages/fetchai/skills/weather_client/dialogues.py @@ -43,6 +43,7 @@ SigningDialogues as GenericSigningDialogues, ) + DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/weather_client/handlers.py b/packages/fetchai/skills/weather_client/handlers.py index ce8f9a83a0..2f1e9cb165 100644 --- a/packages/fetchai/skills/weather_client/handlers.py +++ b/packages/fetchai/skills/weather_client/handlers.py @@ -26,6 +26,7 @@ GenericSigningHandler, ) + FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/weather_client/skill.yaml b/packages/fetchai/skills/weather_client/skill.yaml index a2bf4ab038..c0f0253f86 100644 --- a/packages/fetchai/skills/weather_client/skill.yaml +++ b/packages/fetchai/skills/weather_client/skill.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmP5vjtJk1TirWqzFcgvQYTZeZwaV3Qs5HKVW1WNWgMTPM __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmW2VLVXoepN7V1u4rgARXjp9d9PpPfVgMz2KuNdR76aRg - dialogues.py: QmcMynppu7B2nZR21LzxFQMpoRdegpWpwcXti2ba4Vcei5 - handlers.py: Qme3AaVj6UPLufnMFoXVQKZn5EbEa1JsUqUNHh7jrxKWBE - strategy.py: QmRSgvrswoay8vF6woRm97vYVK9ZAGk1Gh26EkD4fFmbjz + behaviours.py: QmXw3wGKAqCT55MRX61g3eN1T2YVY4XC5z9b4Dg7x1Wihc + dialogues.py: QmcUgBjxeytE5aAx3VvPyna5EcBuqck9KazG3HygCWjawv + handlers.py: QmYx8WzeR2aCg2b2uiR1K2NHLn8DKhzAahLXoFnrXyDoDz + strategy.py: QmZVALhDnpEdxLhk3HLAmTs3JdEr9tk1QTS33ZsVnxkLXZ fingerprint_ignore_patterns: [] contracts: [] protocols: diff --git a/packages/fetchai/skills/weather_client/strategy.py b/packages/fetchai/skills/weather_client/strategy.py index 9748064074..4b755b9173 100644 --- a/packages/fetchai/skills/weather_client/strategy.py +++ b/packages/fetchai/skills/weather_client/strategy.py @@ -21,4 +21,5 @@ from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy + Strategy = GenericStrategy diff --git a/packages/fetchai/skills/weather_station/behaviours.py b/packages/fetchai/skills/weather_station/behaviours.py index 93d026803e..3218eb045c 100644 --- a/packages/fetchai/skills/weather_station/behaviours.py +++ b/packages/fetchai/skills/weather_station/behaviours.py @@ -24,4 +24,5 @@ GenericServiceRegistrationBehaviour, ) + ServiceRegistrationBehaviour = GenericServiceRegistrationBehaviour diff --git a/packages/fetchai/skills/weather_station/db_communication.py b/packages/fetchai/skills/weather_station/db_communication.py index 9cd37018b3..2ee5d86fb1 100644 --- a/packages/fetchai/skills/weather_station/db_communication.py +++ b/packages/fetchai/skills/weather_station/db_communication.py @@ -24,6 +24,7 @@ import sqlite3 from typing import Dict, cast + my_path = os.path.dirname(__file__) DB_SOURCE = os.path.join(my_path, "dummy_weather_station_data.db") diff --git a/packages/fetchai/skills/weather_station/dialogues.py b/packages/fetchai/skills/weather_station/dialogues.py index aa3bde5528..d493129414 100644 --- a/packages/fetchai/skills/weather_station/dialogues.py +++ b/packages/fetchai/skills/weather_station/dialogues.py @@ -39,6 +39,7 @@ OefSearchDialogues as GenericOefSearchDialogues, ) + DefaultDialogues = GenericDefaultDialogues FipaDialogues = GenericFipaDialogues LedgerApiDialogues = GenericLedgerApiDialogues diff --git a/packages/fetchai/skills/weather_station/dummy_weather_station_data.py b/packages/fetchai/skills/weather_station/dummy_weather_station_data.py index 05068dc684..bfde1963c9 100644 --- a/packages/fetchai/skills/weather_station/dummy_weather_station_data.py +++ b/packages/fetchai/skills/weather_station/dummy_weather_station_data.py @@ -27,6 +27,7 @@ import time from typing import Dict, Union + logger = logging.getLogger( "aea.packages.fetchai.skills.weather_station.dummy_weather_station_data" ) diff --git a/packages/fetchai/skills/weather_station/handlers.py b/packages/fetchai/skills/weather_station/handlers.py index 1c9dec0554..3766f61003 100644 --- a/packages/fetchai/skills/weather_station/handlers.py +++ b/packages/fetchai/skills/weather_station/handlers.py @@ -25,6 +25,7 @@ GenericOefSearchHandler, ) + FipaHandler = GenericFipaHandler LedgerApiHandler = GenericLedgerApiHandler OefSearchHandler = GenericOefSearchHandler diff --git a/packages/fetchai/skills/weather_station/skill.yaml b/packages/fetchai/skills/weather_station/skill.yaml index f6ec6e5f55..4dc6ece6a5 100644 --- a/packages/fetchai/skills/weather_station/skill.yaml +++ b/packages/fetchai/skills/weather_station/skill.yaml @@ -9,12 +9,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: Qma72715sXAgDLggNNVkXQoVxCu9hyEEFKbyWTKSavEF2v __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta - behaviours.py: QmWRboujPwBEJNHqXJcyNbbVvdGiJ2mabvjXS6td3YDb2Q - db_communication.py: QmPHjQJvYp96TRUWxTRW9TE9BHATNuUyMw3wy5oQSftnug - dialogues.py: QmeYs1FYc1Ud4yXULoyf1nSqornVx2dczFCJbF1BwM2gzD - dummy_weather_station_data.py: QmeSSsAiCKBfMHfUN4QvoKBTQRNCcGxeJicThkDTGRQE7i - handlers.py: QmeWzG6R8P7z98M2kfXKzmK5u9vT6ZAp2tG7NcXTwWFSaZ - strategy.py: QmWZiiNXeXGiduzro1bWdTr6ZLjL45TtvxFtY1dUQNWfYZ + behaviours.py: QmfPE6zrMmY2QARQt3gNZ2oiV3uAqvAQXSvU3XWnFDUQkG + db_communication.py: QmSLm4jic8JbP2wz35WyWevc9H2ZxsEYfaBMWcEx4pzVcy + dialogues.py: QmPXfUWDxnHDaHQqsgtVhJ2v9dEgGWLtvEHKFvvFcDXGms + dummy_weather_station_data.py: QmVurNWKjXvCZk62JdYLMvrhCuU3kUpBqcRGQs2E5KnrV7 + handlers.py: QmNujxh4FtecTar5coHTJyY3BnVnsseuARSpyTLUDmFmfX + strategy.py: QmVDAXUA1YBGa2PSQKDekyf5j1qZfEfLvZpuLJ6MnURvS8 fingerprint_ignore_patterns: - '*.db' contracts: [] diff --git a/packages/fetchai/skills/weather_station/strategy.py b/packages/fetchai/skills/weather_station/strategy.py index b0eeac39c7..7885d95fcb 100644 --- a/packages/fetchai/skills/weather_station/strategy.py +++ b/packages/fetchai/skills/weather_station/strategy.py @@ -26,6 +26,7 @@ from packages.fetchai.skills.generic_seller.strategy import GenericStrategy from packages.fetchai.skills.weather_station.db_communication import DBCommunication + DEFAULT_DATE_ONE = "3/10/2019" DEFAULT_DATE_TWO = "15/10/2019" diff --git a/packages/hashes.csv b/packages/hashes.csv index 0341ac6d1c..06d740acae 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -18,55 +18,55 @@ fetchai/agents/thermometer_aea,QmZzUqFVaDNGfwPnq5EvfPKNoMSfGzgpBic2z8HHWfu1RE fetchai/agents/thermometer_client,QmfMjh5gCDrdipCDYYrAr7jRDXJ2CpfWFij9t6J4EKdXYT fetchai/agents/weather_client,QmXyXQHxeJyBFSXLU2GZnV49t17iwnNLWWpUEFqMTAb8AE fetchai/agents/weather_station,QmW4kSbF5eKuh4itMJ8xKonaPejutaMp2GyobcN7V4zJR8 -fetchai/connections/gym,QmeVoxp49pwDh57ZirtpjZrC7YmdV7YYn5GHJVq7ekovEV -fetchai/connections/http_client,QmeSZGTkJfG95iBjdhmevfEU1qAdX2gnrawHpwQrbG8DfS -fetchai/connections/http_server,Qmbjf44kA8X3axcBX5AohNd8rF1K2uweSCDc9x6AsE4S9y -fetchai/connections/ledger,QmXZjQkskqt5UbAw9bJbj6Lo9h4TRvengRqAchDRuJwGJd -fetchai/connections/local,QmWZPDvqjZjzNDUX4ivHF3kGvkNCUYM449RqNEyyoexFix -fetchai/connections/oef,QmaJZCCrYCjA8eY3zav9QjxWNcVJ6yQw2n6ZJ53fQT22xb -fetchai/connections/p2p_libp2p,QmVXSnhCn37mgacK7iG1HENbEkSvSZMMaf9RTFCUUDa2C9 -fetchai/connections/p2p_libp2p_client,QmVEwABjAPTZcA4BaAgn8BnzUCpHQbSzc4pJ6mdR4bW222 -fetchai/connections/p2p_stub,QmX8EWvFok3UAdqXGgir4TrhfDj2kLhfjuXRg82b6G6XtW +fetchai/connections/gym,Qmack3EaCW6ARrHrtCnJmL3kR2xrHutJmgD8uoRVGFz6kH +fetchai/connections/http_client,QmfSuWhrseBCVcmzwKmqFDC6qX3ryFzfx2uuUTb8HPGuEd +fetchai/connections/http_server,QmcqvHZbzGX1zdfwVTpqq5j6ugJhpuKEcrWkCW6JJrLJSC +fetchai/connections/ledger,Qmb7dP2cQcYdYMthh5P7EwipNops9CKn2N3TBGNgwNnA2u +fetchai/connections/local,Qmconur9cKrzYY1113AukHUPhgxUjzFrHExWnVpPBV8cRx +fetchai/connections/oef,QmNpYX8XX6uXbFmBDi3s3W9qA48bRcrJatqSHAXDjhLwax +fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh +fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4Jb27b +fetchai/connections/p2p_stub,QmaP81r3ZCqKdL925fbRB8YKxHYaVBR1yW3iwzaErUYDSC fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmQ82mNiuBc9jEUFU8TeaAk5ktqnXX512h4X67yYUxRrX5 -fetchai/connections/stub,QmU1fuqRkzBufaHTB9qY7GSUkkh4Wq1M6ru6FQKnrcEoUZ -fetchai/connections/tcp,QmU93B7yajCHwXsgDXXhv1uSuXi7VmFBhdahcFosbrr6nA -fetchai/connections/webhook,QmaJunWQT1ypkqGnzrj5gYjjQBywjTHJmyktCZXZsa8hv8 -fetchai/contracts/erc1155,QmUupRwnza2KZBGULZ62xQREtkuQbYUrt1W8NbYZJuqbNt +fetchai/connections/soef,QmNLzoPJXUrFLoTKSy8WgF1ivedTyXrKXwd4tmA8mxn7As +fetchai/connections/stub,QmSuUAA2k1E1M9dpeAgkWpfKdssjqghSDfFfrQzC9ZLKbD +fetchai/connections/tcp,QmQZBeN6EqH61GMLwuHqAw3LzdyKi7uj7zJtJ5ekYDpY4n +fetchai/connections/webhook,QmXLbSSUSbsgqk3Zwo7sfBob5nKL6MLA4MCTQ3BXA2Bex3 +fetchai/contracts/erc1155,QmWu22zW9AVMBVySwF413JMiT5dcWsLsU2gk1KvFYWAwPq fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 -fetchai/protocols/contract_api,QmWWMHyzRT7rvdiBsPJ4xrE1nF5TZFfkW6J44D7Dc6g4mT -fetchai/protocols/default,QmZ4y4M1zZ3j2BAvLKHf1Grf5twcsmSamdgc2zmkBdv254 -fetchai/protocols/fipa,QmerHPCMw8rGSrtM7mxuD93CgdCZ5YTreeNC8BNU8UskbK -fetchai/protocols/gym,QmTEWeswAtuJrG4Uo8GWnpvgsGRTHxfDoQAohp42hFdkW9 -fetchai/protocols/http,QmYF8drqdddj8tRt9H9QQ1oMKSfrr6kGQvtpsseWBe8FjA -fetchai/protocols/ledger_api,QmbF7U9YZbanjqJjAScHA5uiVp7HxfSnQxugwLptBKcVUc -fetchai/protocols/ml_trade,Qmdx55dM9fFXeWrVzhHeUU9CoTt9t7YJACBwfg5EwBa2Rz -fetchai/protocols/oef_search,Qmee5Bi3xQ98qX2uFkhUjhXTZi7uMFWnicK2yp7LBcuTYF -fetchai/protocols/scaffold,QmXJb2kxe228AqQ2iHRiKJnhhKsC9zU8pqNdojLNXqjUvz -fetchai/protocols/signing,QmYTfrqGX7exRtafwm9wHGzHZB1FziuZdYMVT1ad3fnKYR -fetchai/protocols/state_update,QmejF6NFSBgfa1KTNkBCw4oZGrTnXHvwYXxayHKGLV4PtW -fetchai/protocols/tac,QmchXXv217Dyft4PN6s1iE1Y5EKYUiYeSv9qLPZVrMwaLr -fetchai/skills/aries_alice,QmXp6W2vFmQgYCchQwLa3yDUwWw7hjeC8WnuPmtrXebZnq -fetchai/skills/aries_faber,QmcuNdL6rJz6xy9bqarRzmoJCVXk4NJjMfqeNnaS6WhwSD -fetchai/skills/carpark_client,QmPYHXP1TvNihMa6WFSLP1NhiFDKTiArZbStQ6v54ySa8j -fetchai/skills/carpark_detection,QmUDRJUJm9UTCyM9o3AwphD6q1L7mNLXPqSizJJvivtRe4 -fetchai/skills/echo,QmcHx9UjP429vnTxMpM3wSphkY2umanW1CZJyn7B1FkpWV -fetchai/skills/erc1155_client,Qma5wTx1huj5DAcsBkRwCvZVczRREwyUawVJhyaC4UTrRE -fetchai/skills/erc1155_deploy,QmYyeafnykiRwNHyk8hhLhyG3EaHijSMAoFXkrfeXv4DcE +fetchai/protocols/contract_api,QmZbbYPdpewfBfLWBQNGzjYr45ZDYJ5PqL5TMrMxa7PrjZ +fetchai/protocols/default,QmaU6VsHxLfrFxcnBAzXNmYA7yQ23kRY1Ddq5pq4NsVhyu +fetchai/protocols/fipa,QmYtTLb4Gk7eHo2Q8VwYZomTdUoa5N37a22Dnh4bjpTvxt +fetchai/protocols/gym,QmWv9Hi8cDypDYPLJTbbgXGmw6jvzZLUB2idbMTFdbDDqM +fetchai/protocols/http,QmWDjfvkAGGt6eA1Ja6sXeBeGqE3vtNbGBwnVhGPJrEq4g +fetchai/protocols/ledger_api,QmQERKQhT9JQNvy6vvT2xsQpv4GnEdvwGdFx7J6AY1j3hw +fetchai/protocols/ml_trade,QmVrv8SnxKoRM5pZLWNB3tZP9VggvDK4ygDqy6DmweFKQH +fetchai/protocols/oef_search,QmYPsjL1m3KUbT9UFSUickf19ydK6DLTNXT1sqtftJA1py +fetchai/protocols/scaffold,QmaQJxMae5XaHKDc838pcGEKhhYSUyKHGWiMfU6zEcVHsy +fetchai/protocols/signing,QmaaX5WnjhFE4BKR99B2KN3yY9DmnHnavbUpzb8EQ612T3 +fetchai/protocols/state_update,QmeczT1eBFtY2Kr9ZcpzATJRmjDgqKSGhi3x1arCbhXTb6 +fetchai/protocols/tac,QmYryedEw85W99BYM8exZSERbkzHXPag6hp6HQtmmJppJ7 +fetchai/skills/aries_alice,QmXFSjt8FSHMnw4yjsmw4SVxKRj9N1i5aPcnmPpyoh3Bu1 +fetchai/skills/aries_faber,QmX3k9N3VmUE8bYaZ4KCq1Ny3ANTVw7sN8nuCRLDZcTTZK +fetchai/skills/carpark_client,QmdfgS34Q7mo7yZ4uThZePudEoPgsmybC66YdVZAXYEybv +fetchai/skills/carpark_detection,QmXwpLqW72SNbfEXrkHXCq6wucmsx6eTUTn9aZzXJaB8Gw +fetchai/skills/echo,QmPu8BeKw5DRYdjHqVWqQnXjW1ZgRBjVthGmVerHLBmJPA +fetchai/skills/erc1155_client,QmPceeYCnt1PC9dDv9EN9dHfzfFUESSZdEsKGTcesEVpsR +fetchai/skills/erc1155_deploy,QmYyerCPVQg7zUagT6FxZEthdSFrLXKMG5LtJbCYnRPALN fetchai/skills/error,QmanfpyCmvUkqG9xsEyWULvi1ZZzqvggvs9LnQvSjuRhLb -fetchai/skills/generic_buyer,QmT6F5P2ZajWNHi4XiHXPa3iEuvVCrNcCNTzEi8XSkkHTT -fetchai/skills/generic_seller,QmXzF3FiqNbFMYu2nMNbonzqZAY5Lf7NN6S9whd7c8Ek18 -fetchai/skills/gym,QmTXKPy2QGtHe1Nko7jXzUnq8EqT6Uto8ZETmMGH2Zyu4Z -fetchai/skills/http_echo,QmaBNGNtDDcfCTQY6hsANAeZz7F4ZXEEPgTMd3ip75Zh1D -fetchai/skills/ml_data_provider,QmXZpzAetLKPfoPSMAafjha2qjF38dWsLpZQg2jCQ3QgAV -fetchai/skills/ml_train,QmU4HiyQUagkEwbU9rutL3g9xmQbo8WHUAULMBUcrEULks +fetchai/skills/generic_buyer,Qmdx6M3y9gRCPJv5Lp8YnJP9nqJCgYAyp4gggqw9V85rY3 +fetchai/skills/generic_seller,Qmf1SYiBVfF6NYSir7ES9reSBpAGqtN9GkULH3fpBjatNZ +fetchai/skills/gym,QmUqB5EJafEGWX5xkTngAgXW2857RnCEk6St2HE5x9hgtZ +fetchai/skills/http_echo,QmQk7NbMpMRT3GEKtPVkWFv2UzwJHajU27qQV9UHKV1xPz +fetchai/skills/ml_data_provider,QmZS1fm9ZCmZ1quW1LH2K9tdBPWL2woHBdJ1N912vL7BsV +fetchai/skills/ml_train,QmRgu8MwTF8CWfGTudkRPc6bGkQy3P8tLNmWYXCLcJiehg fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux -fetchai/skills/simple_service_registration,Qmdqf1kGGfEb65UZcDmhEzW6GcTQyKdW5zjKhQjmLo3J11 -fetchai/skills/tac_control,QmXxSSNbHztL5UYSep2bLbsC7jUzyzeFQwDtf7VXnGMY1j -fetchai/skills/tac_control_contract,QmNz5pNPvS7LBUMdjVPrRAFgJbaD2xTL1HJQnCoYK3Va4J -fetchai/skills/tac_negotiation,QmT78rzq6dDBSguehay3R19LwcfXZDpuxYEsvgvY8mf1V7 -fetchai/skills/tac_participation,QmckgUZ2YoLi5j7btqWLRZLxPx9RkeUdYdp9cfu95sZMXy -fetchai/skills/thermometer,QmUEuRdsTw3iTzLRA4C6SiRGwEK6gauLP1Apk13fCQYtKw -fetchai/skills/thermometer_client,QmdESHLrhNasaUKYpG2m5p6f61dxmqjVKGPiNdEUs5ZHnu -fetchai/skills/weather_client,QmTa3Pxv8tD478xGA6DkNjQn8vxKwGfqLhLMbAC73fK6qo -fetchai/skills/weather_station,QmX75zb2gERaSHXVTcxJ3uRdSBiUVHvwieyWrdUyCSDQYm +fetchai/skills/simple_service_registration,QmR3SLTfRxyqUQGpBkq3nGbB6Cfm9fXzXgaknJDGNe1Mkr +fetchai/skills/tac_control,QmWtrSiEfdPocyDFHwADj2xmPCeP29iFhdcbfgWrRfT68b +fetchai/skills/tac_control_contract,QmbhmoLPCWY7sKBDnN3qVxtnzsE8tXCJFEZsXyJBKwnfYL +fetchai/skills/tac_negotiation,QmYHjhKPCNQ83gsthbW7qYygrLzuFUy3tiqwhwtieHdXEu +fetchai/skills/tac_participation,Qmdh6sM8GPf53Kbr9HGPBvUD5goz4fYnFLwLLcdqo5pedn +fetchai/skills/thermometer,Qmf2ntUbVmfawJw8AU2nfUf2m9Nrn8Qg6CQZNg1ECrcitc +fetchai/skills/thermometer_client,QmP5vL38Nw4pkJ6y1UVvMwmBWazenMzSs2afHEfTzNqLEb +fetchai/skills/weather_client,QmYDzApib8cgGnaQVfsibV7sfKNQzrDTeTFiYAakfUyoSb +fetchai/skills/weather_station,QmXF23jHpe56wXr8HfBUgYBR63zRaHFsLkCWaWfXvb2mHi diff --git a/scripts/check_copyright_notice.py b/scripts/check_copyright_notice.py index ccb19ed670..d85faacd8a 100755 --- a/scripts/check_copyright_notice.py +++ b/scripts/check_copyright_notice.py @@ -33,6 +33,7 @@ import sys from pathlib import Path + HEADER_REGEX = r"""(#!/usr/bin/env python3 )?# -\*- coding: utf-8 -\*- # ------------------------------------------------------------------------------ diff --git a/scripts/check_doc_links.py b/scripts/check_doc_links.py index 46a33ed5a5..a6e8b8ad73 100644 --- a/scripts/check_doc_links.py +++ b/scripts/check_doc_links.py @@ -27,6 +27,7 @@ import requests + LINK_PATTERN_MD = re.compile(r"\[([^]]+)]\(\s*([^]]+)\s*\)") LINK_PATTERN = re.compile(r'(?<=]+src="([^">]+)"') diff --git a/scripts/check_package_dependencies.py b/scripts/check_package_dependencies.py index 25ce34d07a..882030b6e8 100755 --- a/scripts/check_package_dependencies.py +++ b/scripts/check_package_dependencies.py @@ -36,6 +36,7 @@ from aea.configurations.base import PackageId, PackageType, PublicId + DEFAULT_CONFIG_FILE_PATHS = [ Path("aea", "connections", "stub", "connection.yaml"), Path("aea", "protocols", "default", "protocol.yaml"), diff --git a/scripts/check_package_versions_in_docs.py b/scripts/check_package_versions_in_docs.py index 2252870b35..33ddb38144 100755 --- a/scripts/check_package_versions_in_docs.py +++ b/scripts/check_package_versions_in_docs.py @@ -35,6 +35,7 @@ from aea.configurations.base import ComponentType, PackageId, PackageType, PublicId + PUBLIC_ID_REGEX = PublicId.PUBLIC_ID_REGEX[1:-1] """This regex removes the '^' and '$' respectively, at the beginning and at the end.""" diff --git a/scripts/deploy_to_registry.py b/scripts/deploy_to_registry.py index b2e5ad866e..97729d068a 100644 --- a/scripts/deploy_to_registry.py +++ b/scripts/deploy_to_registry.py @@ -33,6 +33,7 @@ from aea.cli import cli from aea.configurations.base import PackageId, PackageType, PublicId + CLI_LOG_OPTION = ["-v", "OFF"] DEFAULT_CONFIG_FILE_PATHS = [ diff --git a/scripts/generate_api_docs.py b/scripts/generate_api_docs.py index dffa0d5954..a282611af5 100755 --- a/scripts/generate_api_docs.py +++ b/scripts/generate_api_docs.py @@ -25,6 +25,7 @@ import sys from pathlib import Path + DOCS_DIR = "docs/" MODULES_TO_PATH = { "aea.abstract_agent": "api/abstract_agent.md", diff --git a/scripts/generate_ipfs_hashes.py b/scripts/generate_ipfs_hashes.py index e5af338e4b..017b7deb42 100755 --- a/scripts/generate_ipfs_hashes.py +++ b/scripts/generate_ipfs_hashes.py @@ -55,6 +55,7 @@ ) from aea.helpers.base import yaml_dump, yaml_dump_all + AUTHOR = "fetchai" CORE_PATH = Path("aea") TEST_PATH = Path("tests") / "data" diff --git a/scripts/update_package_versions.py b/scripts/update_package_versions.py index f4fbbd7478..f1c368362d 100644 --- a/scripts/update_package_versions.py +++ b/scripts/update_package_versions.py @@ -46,6 +46,7 @@ from aea.configurations.loader import ConfigLoader from scripts.generate_ipfs_hashes import update_hashes + DIRECTORIES = ["packages", "aea", "docs", "benchmark", "examples", "tests"] CLI_LOG_OPTION = ["-v", "OFF"] TYPES = set(map(lambda x: x.to_plural(), PackageType)) diff --git a/scripts/update_symlinks_cross_platform.py b/scripts/update_symlinks_cross_platform.py index 0a6f1f5fc0..3e87242bcd 100755 --- a/scripts/update_symlinks_cross_platform.py +++ b/scripts/update_symlinks_cross_platform.py @@ -30,6 +30,7 @@ from pathlib import Path from typing import List, Tuple + SCRIPTS_PATH = Path(os.path.dirname(inspect.getfile(inspect.currentframe()))) # type: ignore ROOT_PATH = SCRIPTS_PATH.parent.absolute() TEST_DATA = ROOT_PATH / "tests" / "data" diff --git a/setup.cfg b/setup.cfg index 69fd0de769..86f14c6af0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,6 +39,7 @@ known_packages=packages known_local_folder=tests sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PACKAGES,LOCALFOLDER case_sensitive=True +lines_after_imports=2 [mypy] python_version = 3.7 diff --git a/tests/common/utils.py b/tests/common/utils.py index 81a64a5ac6..f44ec39d37 100644 --- a/tests/common/utils.py +++ b/tests/common/utils.py @@ -33,6 +33,7 @@ from tests.conftest import ROOT_DIR + DEFAULT_SLEEP = 0.0001 DEFAULT_TIMEOUT = 3 diff --git a/tests/conftest.py b/tests/conftest.py index f6998ac373..eb3a412978 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -83,6 +83,7 @@ from .data.dummy_connection.connection import DummyConnection # type: ignore + logger = logging.getLogger(__name__) CliRunner = ImportedCliRunner diff --git a/tests/data/generator/t_protocol/__init__.py b/tests/data/generator/t_protocol/__init__.py index 183352784d..56de0d0a42 100644 --- a/tests/data/generator/t_protocol/__init__.py +++ b/tests/data/generator/t_protocol/__init__.py @@ -22,4 +22,5 @@ from tests.data.generator.t_protocol.message import TProtocolMessage from tests.data.generator.t_protocol.serialization import TProtocolSerializer + TProtocolMessage.serializer = TProtocolSerializer diff --git a/tests/data/generator/t_protocol/message.py b/tests/data/generator/t_protocol/message.py index b07a48d58d..cd24500c6c 100644 --- a/tests/data/generator/t_protocol/message.py +++ b/tests/data/generator/t_protocol/message.py @@ -28,6 +28,7 @@ from tests.data.generator.t_protocol.custom_types import DataModel as CustomDataModel + logger = logging.getLogger("aea.packages.fetchai.protocols.t_protocol.message") DEFAULT_BODY_SIZE = 4 diff --git a/tests/data/generator/t_protocol_no_ct/__init__.py b/tests/data/generator/t_protocol_no_ct/__init__.py index 4ce3b6e598..2518f2ff75 100644 --- a/tests/data/generator/t_protocol_no_ct/__init__.py +++ b/tests/data/generator/t_protocol_no_ct/__init__.py @@ -22,4 +22,5 @@ from tests.data.generator.t_protocol_no_ct.message import TProtocolNoCtMessage from tests.data.generator.t_protocol_no_ct.serialization import TProtocolNoCtSerializer + TProtocolNoCtMessage.serializer = TProtocolNoCtSerializer diff --git a/tests/data/generator/t_protocol_no_ct/message.py b/tests/data/generator/t_protocol_no_ct/message.py index 8733c6d431..3d71c4dfb7 100644 --- a/tests/data/generator/t_protocol_no_ct/message.py +++ b/tests/data/generator/t_protocol_no_ct/message.py @@ -26,6 +26,7 @@ from aea.exceptions import AEAEnforceError, enforce from aea.protocols.base import Message + logger = logging.getLogger("aea.packages.fetchai.protocols.t_protocol_no_ct.message") DEFAULT_BODY_SIZE = 4 diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index 94516cc5c6..c7f15be116 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -60,6 +60,7 @@ _make_dummy_connection, ) + dummy_skill_path = os.path.join(CUR_PATH, "data", "dummy_skill") contract_path = os.path.join(ROOT_DIR, "packages", "fetchai", "contracts", "erc1155") diff --git a/tests/test_cli/constants.py b/tests/test_cli/constants.py index 7d395e0e78..77265bdfbd 100644 --- a/tests/test_cli/constants.py +++ b/tests/test_cli/constants.py @@ -20,6 +20,7 @@ from aea.configurations.base import DEFAULT_VERSION + FORMAT_ITEMS_SAMPLE_OUTPUT = "Correct items" DEFAULT_TESTING_VERSION = DEFAULT_VERSION diff --git a/tests/test_cli/test_launch.py b/tests/test_cli/test_launch.py index 664036df3e..91b7a65fba 100644 --- a/tests/test_cli/test_launch.py +++ b/tests/test_cli/test_launch.py @@ -38,6 +38,7 @@ from tests.common.pexpect_popen import PexpectWrapper from tests.conftest import AUTHOR, CLI_LOG_OPTION, CUR_PATH, CliRunner, MAX_FLAKY_RERUNS + logger = logging.getLogger(__name__) diff --git a/tests/test_cli/test_utils/test_utils.py b/tests/test_cli/test_utils/test_utils.py index 455570208b..341dc18c3f 100644 --- a/tests/test_cli/test_utils/test_utils.py +++ b/tests/test_cli/test_utils/test_utils.py @@ -60,6 +60,7 @@ raise_stoptest, ) + AUTHOR = "author" diff --git a/tests/test_connections/test_stub.py b/tests/test_connections/test_stub.py index a9a3219028..113b9936d6 100644 --- a/tests/test_connections/test_stub.py +++ b/tests/test_connections/test_stub.py @@ -45,6 +45,7 @@ from tests.conftest import ROOT_DIR, _make_stub_connection + SEPARATOR = "," diff --git a/tests/test_crypto/test_helpers.py b/tests/test_crypto/test_helpers.py index 1bb71be721..a4821001fb 100644 --- a/tests/test_crypto/test_helpers.py +++ b/tests/test_crypto/test_helpers.py @@ -45,6 +45,7 @@ FETCHAI_PRIVATE_KEY_PATH, ) + logger = logging.getLogger(__name__) diff --git a/tests/test_crypto/test_ledger_apis.py b/tests/test_crypto/test_ledger_apis.py index ade3ee345d..fd3c0375f0 100644 --- a/tests/test_crypto/test_ledger_apis.py +++ b/tests/test_crypto/test_ledger_apis.py @@ -32,6 +32,7 @@ from tests.conftest import COSMOS, COSMOS_ADDRESS_ONE, ETHEREUM_ADDRESS_ONE + logger = logging.getLogger(__name__) diff --git a/tests/test_crypto/test_registries.py b/tests/test_crypto/test_registries.py index 52cc7cedaa..3958c210be 100644 --- a/tests/test_crypto/test_registries.py +++ b/tests/test_crypto/test_registries.py @@ -26,6 +26,7 @@ from aea.crypto.registries import make_crypto, make_ledger_api from aea.crypto.registries.base import ItemId, Registry + COSMOS = CosmosCrypto.identifier diff --git a/tests/test_crypto/test_registry/test_crypto_registry.py b/tests/test_crypto/test_registry/test_crypto_registry.py index 19607fc413..de374c7600 100644 --- a/tests/test_crypto/test_registry/test_crypto_registry.py +++ b/tests/test_crypto/test_registry/test_crypto_registry.py @@ -35,6 +35,7 @@ from tests.conftest import COSMOS, ETHEREUM, FETCHAI from tests.data.custom_crypto import CustomCrypto + logger = logging.getLogger(__name__) forbidden_special_characters = "".join( diff --git a/tests/test_crypto/test_registry/test_ledger_api_registry.py b/tests/test_crypto/test_registry/test_ledger_api_registry.py index 088128a9c3..5f93927748 100644 --- a/tests/test_crypto/test_registry/test_ledger_api_registry.py +++ b/tests/test_crypto/test_registry/test_ledger_api_registry.py @@ -34,6 +34,7 @@ FETCHAI_TESTNET_CONFIG, ) + logger = logging.getLogger(__name__) diff --git a/tests/test_docs/test_agent_vs_aea/agent_code_block.py b/tests/test_docs/test_agent_vs_aea/agent_code_block.py index 332fc97204..e219fd1420 100644 --- a/tests/test_docs/test_agent_vs_aea/agent_code_block.py +++ b/tests/test_docs/test_agent_vs_aea/agent_code_block.py @@ -32,6 +32,7 @@ from aea.mail.base import Envelope from aea.protocols.default.message import DefaultMessage + INPUT_FILE = "input_file" OUTPUT_FILE = "output_file" diff --git a/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py b/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py index 9fe0f5dfad..154f9bf84d 100644 --- a/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py +++ b/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py @@ -29,6 +29,7 @@ from tests.test_docs.helper import extract_code_blocks, extract_python_code from tests.test_docs.test_agent_vs_aea.agent_code_block import run + MD_FILE = "docs/agent-vs-aea.md" PY_FILE = "test_docs/test_agent_vs_aea/agent_code_block.py" diff --git a/tests/test_docs/test_bash_yaml/test_demo_docs.py b/tests/test_docs/test_bash_yaml/test_demo_docs.py index dde33427ea..85b1c5e31b 100644 --- a/tests/test_docs/test_bash_yaml/test_demo_docs.py +++ b/tests/test_docs/test_bash_yaml/test_demo_docs.py @@ -26,6 +26,7 @@ from tests.conftest import ROOT_DIR from tests.test_docs.helper import extract_code_blocks, read_md_file + logger = logging.getLogger(__name__) diff --git a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py index 5d004506d0..bdbac810af 100644 --- a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py @@ -30,6 +30,7 @@ from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA, create_private_key from aea.skills.base import Skill + ROOT_DIR = "./" INPUT_FILE = "input_file" OUTPUT_FILE = "output_file" diff --git a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py index 834963d279..d58f7ff8e7 100644 --- a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py @@ -29,6 +29,7 @@ from tests.conftest import CUR_PATH, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code + MD_FILE = "docs/build-aea-programmatically.md" PY_FILE = "test_docs/test_build_aea_programmatically/programmatic_aea.py" diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py index 737f29fdfa..79428e901d 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py @@ -40,6 +40,7 @@ from packages.fetchai.connections.soef.connection import SOEFConnection from packages.fetchai.skills.weather_client.strategy import Strategy + API_KEY = "TwiCIriSl0mLahw17pyqoA" SOEF_ADDR = "soef.fetch.ai" SOEF_PORT = 9002 diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py index 43c52bda0d..e944ab7b5e 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py @@ -40,6 +40,7 @@ ) from tests.test_docs.helper import extract_code_blocks, extract_python_code + MD_FILE = "docs/cli-vs-programmatic-aeas.md" PY_FILE = "test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py" DEST = "programmatic_aea.py" diff --git a/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py b/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py index 10e9ad3055..d4c1d27cde 100644 --- a/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py +++ b/tests/test_docs/test_decision_maker_transaction/decision_maker_transaction.py @@ -39,6 +39,7 @@ from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler, Model, Skill, SkillContext + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) diff --git a/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py b/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py index 6a142c3c0e..5721c18354 100644 --- a/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py +++ b/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py @@ -29,6 +29,7 @@ from ..helper import extract_code_blocks, extract_python_code from .decision_maker_transaction import logger, run + MD_FILE = "docs/decision-maker-transaction.md" PY_FILE = "test_docs/test_decision_maker_transaction/decision_maker_transaction.py" diff --git a/tests/test_docs/test_generic_step_by_step_guide/test_generic_step_by_step_guide.py b/tests/test_docs/test_generic_step_by_step_guide/test_generic_step_by_step_guide.py index 6fd3428997..4c2a4e7080 100644 --- a/tests/test_docs/test_generic_step_by_step_guide/test_generic_step_by_step_guide.py +++ b/tests/test_docs/test_generic_step_by_step_guide/test_generic_step_by_step_guide.py @@ -26,6 +26,7 @@ from tests.conftest import ROOT_DIR from tests.test_docs.helper import extract_code_blocks + logger = logging.getLogger(__name__) diff --git a/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py b/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py index b4e1d47dde..53c69f4f8b 100644 --- a/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py +++ b/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py @@ -31,6 +31,7 @@ from aea.mail.base import Envelope from aea.multiplexer import Multiplexer + INPUT_FILE = "input.txt" OUTPUT_FILE = "output.txt" diff --git a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py index 615e30e44a..ef04685096 100644 --- a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py +++ b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py @@ -28,6 +28,7 @@ from tests.conftest import CUR_PATH, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code + MD_FILE = "docs/multiplexer-standalone.md" PY_FILE = "test_docs/test_multiplexer_standalone/multiplexer_standalone.py" diff --git a/tests/test_docs/test_orm_integration/test_orm_integration.py b/tests/test_docs/test_orm_integration/test_orm_integration.py index e111461af7..5b3448a617 100644 --- a/tests/test_docs/test_orm_integration/test_orm_integration.py +++ b/tests/test_docs/test_orm_integration/test_orm_integration.py @@ -39,6 +39,7 @@ wait_for_localhost_ports_to_close, ) + seller_strategy_replacement = """models: default_dialogues: args: {} diff --git a/tests/test_docs/test_skill_guide/test_skill_guide.py b/tests/test_docs/test_skill_guide/test_skill_guide.py index 0c9a5e1663..87fcc76cad 100644 --- a/tests/test_docs/test_skill_guide/test_skill_guide.py +++ b/tests/test_docs/test_skill_guide/test_skill_guide.py @@ -44,6 +44,7 @@ ) from tests.test_docs.helper import extract_code_blocks + MD_FILE = "docs/skill-guide.md" diff --git a/tests/test_docs/test_standalone_transaction/standalone_transaction.py b/tests/test_docs/test_standalone_transaction/standalone_transaction.py index 892d2db880..e137def89f 100644 --- a/tests/test_docs/test_standalone_transaction/standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/standalone_transaction.py @@ -26,6 +26,7 @@ from aea.crypto.ledger_apis import LedgerApis from aea.crypto.wallet import Wallet + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) 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 277e18c5fc..f501a2e803 100644 --- a/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py @@ -31,6 +31,7 @@ from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS_INTEGRATION, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code + MD_FILE = "docs/standalone-transaction.md" PY_FILE = "test_docs/test_standalone_transaction/standalone_transaction.py" diff --git a/tests/test_examples/test_gym_ex.py b/tests/test_examples/test_gym_ex.py index 219de01525..191e60979f 100644 --- a/tests/test_examples/test_gym_ex.py +++ b/tests/test_examples/test_gym_ex.py @@ -27,6 +27,7 @@ from tests.common.pexpect_popen import PexpectWrapper from tests.conftest import ROOT_DIR, env_path_separator + DIRECTORIES = ["packages", "examples"] diff --git a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py index b2b78230dc..6477669016 100644 --- a/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py +++ b/tests/test_examples/test_http_client_connection_to_aries_cloud_agent.py @@ -52,6 +52,7 @@ from tests.conftest import HTTP_PROTOCOL_PUBLIC_ID + logger = logging.getLogger(__name__) diff --git a/tests/test_helpers/test_exec_timeout.py b/tests/test_helpers/test_exec_timeout.py index 683a449f2f..2a031f66c3 100644 --- a/tests/test_helpers/test_exec_timeout.py +++ b/tests/test_helpers/test_exec_timeout.py @@ -35,6 +35,7 @@ from tests.common.utils import timeit_context + if os.name == "nt": pytest.skip("signal.settimer non available on Windows.", allow_module_level=True) diff --git a/tests/test_helpers/test_ipfs/test_base.py b/tests/test_helpers/test_ipfs/test_base.py index 820f7b40b2..eec6a1b39a 100644 --- a/tests/test_helpers/test_ipfs/test_base.py +++ b/tests/test_helpers/test_ipfs/test_base.py @@ -26,6 +26,7 @@ from tests.conftest import CUR_PATH + FILE_PATH = "__init__.py" diff --git a/tests/test_helpers/test_multiaddr.py b/tests/test_helpers/test_multiaddr.py index 74218e7134..022c65e22b 100644 --- a/tests/test_helpers/test_multiaddr.py +++ b/tests/test_helpers/test_multiaddr.py @@ -25,6 +25,7 @@ from aea.crypto.registries import make_crypto from aea.helpers.multiaddr.base import MultiAddr + HOST = "127.0.0.1" PORT = 13000 diff --git a/tests/test_packages/test_connections/test_gym/test_gym.py b/tests/test_packages/test_connections/test_gym/test_gym.py index 281b163905..0efd2f482c 100644 --- a/tests/test_packages/test_connections/test_gym/test_gym.py +++ b/tests/test_packages/test_connections/test_gym/test_gym.py @@ -39,6 +39,7 @@ from tests.conftest import ROOT_DIR, UNKNOWN_PROTOCOL_PUBLIC_ID + logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_http_client/test_http_client.py b/tests/test_packages/test_connections/test_http_client/test_http_client.py index 07be0cee65..200003cfa7 100644 --- a/tests/test_packages/test_connections/test_http_client/test_http_client.py +++ b/tests/test_packages/test_connections/test_http_client/test_http_client.py @@ -39,6 +39,7 @@ from tests.common.mocks import AnyStringWith from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID, get_host, get_unused_tcp_port + logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_http_server/test_http_server.py b/tests/test_packages/test_connections/test_http_server/test_http_server.py index 495178987d..a3db1f3fe9 100644 --- a/tests/test_packages/test_connections/test_http_server/test_http_server.py +++ b/tests/test_packages/test_connections/test_http_server/test_http_server.py @@ -54,6 +54,7 @@ get_unused_tcp_port, ) + logger = logging.getLogger(__name__) 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 9bbd81a3f4..7998701578 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 @@ -37,6 +37,7 @@ from tests.conftest import get_host, get_unused_tcp_port + logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_ledger/test_ledger_api.py b/tests/test_packages/test_connections/test_ledger/test_ledger_api.py index 21ceaf2f5c..0f9703b6d7 100644 --- a/tests/test_packages/test_connections/test_ledger/test_ledger_api.py +++ b/tests/test_packages/test_connections/test_ledger/test_ledger_api.py @@ -62,6 +62,7 @@ FETCHAI_TESTNET_CONFIG, ) + logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_oef/test_communication.py b/tests/test_packages/test_connections/test_oef/test_communication.py index ea4676d068..191012d022 100644 --- a/tests/test_packages/test_connections/test_oef/test_communication.py +++ b/tests/test_packages/test_connections/test_oef/test_communication.py @@ -66,6 +66,7 @@ _make_oef_connection, ) + logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py index d31a3afbce..956e4956c4 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_aea_cli.py @@ -25,6 +25,7 @@ from tests.conftest import libp2p_log_on_failure + DEFAULT_PORT = 10234 DEFAULT_DELEGATE_PORT = 11234 DEFAULT_NET_SIZE = 4 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py index 49a08a0be9..e81d69d58b 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_communication.py @@ -37,6 +37,7 @@ libp2p_log_on_failure_all, ) + DEFAULT_PORT = 10234 DEFAULT_NET_SIZE = 4 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py index 1ef0791958..c16e33f7a5 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_errors.py @@ -41,6 +41,7 @@ from tests.conftest import COSMOS, _make_libp2p_connection + DEFAULT_PORT = 10234 DEFAULT_NET_SIZE = 4 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py index 97553180c5..2466da846f 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_fault_tolerance.py @@ -37,6 +37,7 @@ libp2p_log_on_failure_all, ) + DEFAULT_PORT = 10234 diff --git a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py index 08838b121a..c05e9c6c3c 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p/test_public_dht.py @@ -41,6 +41,7 @@ libp2p_log_on_failure_all, ) + DEFAULT_PORT = 10234 PUBLIC_DHT_MADDRS = [PUBLIC_DHT_P2P_MADDR_1, PUBLIC_DHT_P2P_MADDR_2] PUBLIC_DHT_DELEGATE_URIS = [PUBLIC_DHT_DELEGATE_URI_1, PUBLIC_DHT_DELEGATE_URI_2] diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py index fc3c87b396..63351cecfa 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_aea_cli.py @@ -27,6 +27,7 @@ libp2p_log_on_failure_all, ) + DEFAULT_PORT = 10234 DEFAULT_DELEGATE_PORT = 11234 DEFAULT_HOST = "127.0.0.1" diff --git a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py index 308f2b6bd2..86339c406e 100644 --- a/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py +++ b/tests/test_packages/test_connections/test_p2p_libp2p_client/test_communication.py @@ -39,6 +39,7 @@ libp2p_log_on_failure_all, ) + DEFAULT_PORT = 10234 DEFAULT_DELEGATE_PORT = 11234 DEFAULT_HOST = "127.0.0.1" diff --git a/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py b/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py index d5cfccb73d..f5ab36c3c0 100644 --- a/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py +++ b/tests/test_packages/test_connections/test_p2p_stub/test_p2p_stub.py @@ -33,6 +33,7 @@ from packages.fetchai.connections.p2p_stub.connection import P2PStubConnection + SEPARATOR = "," diff --git a/tests/test_packages/test_connections/test_soef/models.py b/tests/test_packages/test_connections/test_soef/models.py index 245a50d19f..0f523d5807 100644 --- a/tests/test_packages/test_connections/test_soef/models.py +++ b/tests/test_packages/test_connections/test_soef/models.py @@ -22,6 +22,7 @@ from packages.fetchai.connections.soef.connection import ModelNames + AGENT_LOCATION_MODEL = DataModel( ModelNames.location_agent, [ diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index 9f0d345ffa..d96b71ae4e 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -49,6 +49,7 @@ from .test_soef import OefSearchDialogues from tests.common.utils import wait_for_condition + logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_connections/test_webhook/test_webhook.py b/tests/test_packages/test_connections/test_webhook/test_webhook.py index d7e09becbe..83b37b13fd 100644 --- a/tests/test_packages/test_connections/test_webhook/test_webhook.py +++ b/tests/test_packages/test_connections/test_webhook/test_webhook.py @@ -44,6 +44,7 @@ from tests.common.mocks import RegexComparator from tests.conftest import get_host, get_unused_tcp_port + logger = logging.getLogger(__name__) diff --git a/tests/test_packages/test_contracts/test_erc1155/test_contract.py b/tests/test_packages/test_contracts/test_erc1155/test_contract.py index f2e9d58821..4955433723 100644 --- a/tests/test_packages/test_contracts/test_erc1155/test_contract.py +++ b/tests/test_packages/test_contracts/test_erc1155/test_contract.py @@ -40,6 +40,7 @@ FETCHAI_TESTNET_CONFIG, ) + ledger = [ (ETHEREUM, ETHEREUM_TESTNET_CONFIG), ] diff --git a/tests/test_packages/test_protocols/test_contract_api.py b/tests/test_packages/test_protocols/test_contract_api.py index 397cc26142..30c727b5a9 100644 --- a/tests/test_packages/test_protocols/test_contract_api.py +++ b/tests/test_packages/test_protocols/test_contract_api.py @@ -45,6 +45,7 @@ from tests.conftest import ROOT_DIR + logger = logging.getLogger(__name__) sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_fipa.py b/tests/test_packages/test_protocols/test_fipa.py index abead1272a..8cf6e672cc 100644 --- a/tests/test_packages/test_protocols/test_fipa.py +++ b/tests/test_packages/test_protocols/test_fipa.py @@ -41,6 +41,7 @@ from tests.conftest import ROOT_DIR + logger = logging.getLogger(__name__) sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_gym.py b/tests/test_packages/test_protocols/test_gym.py index 330e9a7833..01536401ad 100644 --- a/tests/test_packages/test_protocols/test_gym.py +++ b/tests/test_packages/test_protocols/test_gym.py @@ -39,6 +39,7 @@ from tests.conftest import ROOT_DIR + sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_http.py b/tests/test_packages/test_protocols/test_http.py index 0d7d8d9833..ea6980397e 100644 --- a/tests/test_packages/test_protocols/test_http.py +++ b/tests/test_packages/test_protocols/test_http.py @@ -39,6 +39,7 @@ from tests.conftest import ROOT_DIR + sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_ledger_api.py b/tests/test_packages/test_protocols/test_ledger_api.py index 01b64fce26..eee0e6955f 100644 --- a/tests/test_packages/test_protocols/test_ledger_api.py +++ b/tests/test_packages/test_protocols/test_ledger_api.py @@ -44,6 +44,7 @@ from tests.conftest import ROOT_DIR + sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_ml_trade.py b/tests/test_packages/test_protocols/test_ml_trade.py index 3377373631..ebb435e104 100644 --- a/tests/test_packages/test_protocols/test_ml_trade.py +++ b/tests/test_packages/test_protocols/test_ml_trade.py @@ -46,6 +46,7 @@ from tests.conftest import ROOT_DIR + logger = logging.getLogger(__name__) sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_oef_search.py b/tests/test_packages/test_protocols/test_oef_search.py index 11fd064554..9bb2c4506c 100644 --- a/tests/test_packages/test_protocols/test_oef_search.py +++ b/tests/test_packages/test_protocols/test_oef_search.py @@ -45,6 +45,7 @@ from tests.conftest import ROOT_DIR + sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_protocols/test_tac.py b/tests/test_packages/test_protocols/test_tac.py index 2ea87db305..fc1f4c2336 100644 --- a/tests/test_packages/test_protocols/test_tac.py +++ b/tests/test_packages/test_protocols/test_tac.py @@ -39,6 +39,7 @@ from tests.conftest import ROOT_DIR + sys.path.append(ROOT_DIR) diff --git a/tests/test_packages/test_skills/test_http_echo.py b/tests/test_packages/test_skills/test_http_echo.py index e476ed7de2..6052165361 100644 --- a/tests/test_packages/test_skills/test_http_echo.py +++ b/tests/test_packages/test_skills/test_http_echo.py @@ -27,6 +27,7 @@ from tests.conftest import ROOT_DIR + API_SPEC_PATH = Path(ROOT_DIR, "examples", "http_ex", "petstore.yaml").absolute() diff --git a/tests/test_protocols/test_generator/common.py b/tests/test_protocols/test_generator/common.py index 38831b9632..6b94904ffd 100644 --- a/tests/test_protocols/test_generator/common.py +++ b/tests/test_protocols/test_generator/common.py @@ -21,6 +21,7 @@ from tests.conftest import ROOT_DIR + T_PROTOCOL_NAME = "t_protocol" PATH_TO_T_PROTOCOL_SPECIFICATION = os.path.join( ROOT_DIR, "tests", "data", "sample_specification.yaml" diff --git a/tests/test_protocols/test_generator/test_common.py b/tests/test_protocols/test_generator/test_common.py index a2d8a12360..bc6fae7f7e 100644 --- a/tests/test_protocols/test_generator/test_common.py +++ b/tests/test_protocols/test_generator/test_common.py @@ -49,6 +49,7 @@ T_PROTOCOL_NAME, ) + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) diff --git a/tests/test_protocols/test_generator/test_end_to_end.py b/tests/test_protocols/test_generator/test_end_to_end.py index bae4a62cad..c91a16a3c7 100644 --- a/tests/test_protocols/test_generator/test_end_to_end.py +++ b/tests/test_protocols/test_generator/test_end_to_end.py @@ -43,6 +43,7 @@ from tests.data.generator.t_protocol.message import TProtocolMessage # type: ignore from tests.test_protocols.test_generator.common import PATH_TO_T_PROTOCOL + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) diff --git a/tests/test_protocols/test_generator/test_extract_specification.py b/tests/test_protocols/test_generator/test_extract_specification.py index 9f1122363b..06b6b78c28 100644 --- a/tests/test_protocols/test_generator/test_extract_specification.py +++ b/tests/test_protocols/test_generator/test_extract_specification.py @@ -39,6 +39,7 @@ from tests.test_protocols.test_generator.common import PATH_TO_T_PROTOCOL_SPECIFICATION + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) diff --git a/tests/test_protocols/test_generator/test_generator.py b/tests/test_protocols/test_generator/test_generator.py index b6038accee..9874792253 100644 --- a/tests/test_protocols/test_generator/test_generator.py +++ b/tests/test_protocols/test_generator/test_generator.py @@ -42,6 +42,7 @@ T_PROTOCOL_NAME, ) + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) diff --git a/tests/test_protocols/test_generator/test_validate.py b/tests/test_protocols/test_generator/test_validate.py index eeeda771f3..f1cb25633d 100644 --- a/tests/test_protocols/test_generator/test_validate.py +++ b/tests/test_protocols/test_generator/test_validate.py @@ -51,6 +51,7 @@ validate, ) + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) diff --git a/tests/test_skills/test_error.py b/tests/test_skills/test_error.py index 813a78e4ca..926951face 100644 --- a/tests/test_skills/test_error.py +++ b/tests/test_skills/test_error.py @@ -41,6 +41,7 @@ from tests.common.utils import wait_for_condition from tests.conftest import CUR_PATH, _make_dummy_connection + logger = logging.getLogger(__file__) diff --git a/tests/test_test_tools/test_testcases.py b/tests/test_test_tools/test_testcases.py index 3a8b77b366..0a4567d923 100644 --- a/tests/test_test_tools/test_testcases.py +++ b/tests/test_test_tools/test_testcases.py @@ -35,6 +35,7 @@ from tests.conftest import FETCHAI from tests.test_cli import test_generate_wealth, test_interact + TestWealthCommandsPositive = test_generate_wealth.TestWealthCommandsPositive TestInteractCommand = test_interact.TestInteractCommand From b74629731120b1d53b650bc1aa3fa028bd11bb99 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 16:59:35 +0200 Subject: [PATCH 033/131] add isort configuration file specific to the protocol generator --- MANIFEST.in | 2 +- aea/protocols/generator/common.py | 13 +++++-------- aea/protocols/generator/isort.cfg | 18 ++++++++++++++++++ setup.cfg | 5 +++-- 4 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 aea/protocols/generator/isort.cfg diff --git a/MANIFEST.in b/MANIFEST.in index 2b10871f8e..7a267950b3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ include README.md LICENSE HISTORY.md AUTHORS.md SECURITY.md CODE_OF_CONDUCT.md Pipfile mkdocs.yml tox.ini pytest.ini strategy.ini -recursive-include aea *.json *.yaml *.proto *.ico *png *.html *.js *.css *.md +recursive-include aea *.json *.yaml *.proto *.ico *png *.html *.js *.css *.md *.cfg recursive-include docs * recursive-include examples * recursive-include packages * diff --git a/aea/protocols/generator/common.py b/aea/protocols/generator/common.py index 2e576ed293..9534ae246b 100644 --- a/aea/protocols/generator/common.py +++ b/aea/protocols/generator/common.py @@ -17,7 +17,7 @@ # # ------------------------------------------------------------------------------ """This module contains utility code for generator modules.""" - +import inspect import os import re import shutil @@ -64,15 +64,12 @@ "str": "string", } +CURRENT_DIR = os.path.dirname(inspect.getfile(inspect.currentframe())) # type: ignore +ISORT_CONFIGURATION_FILE = os.path.join(CURRENT_DIR, "isort.cfg") ISORT_CLI_ARGS = [ - "--multi-line=3", - "--trailing-comma", - "--force-grid-wrap=0", - "--use-parentheses", - "--line-width=88", + "--settings-path", + ISORT_CONFIGURATION_FILE, "--quiet", - "--sg", - "**/*_pb2.py", ] diff --git a/aea/protocols/generator/isort.cfg b/aea/protocols/generator/isort.cfg new file mode 100644 index 0000000000..d15bf5f18d --- /dev/null +++ b/aea/protocols/generator/isort.cfg @@ -0,0 +1,18 @@ +# isort configurations for the protocol generator +[isort] +# for black compatibility +multi_line_output=3 +include_trailing_comma=True +force_grid_wrap=0 +use_parentheses=True +ensure_newline_before_comments = True +line_length=88 +# custom configurations +order_by_type=False +case_sensitive=True +lines_after_imports=2 +skip_glob = **/*_pb2.py +known_first_party=aea +known_packages=packages +known_local_folder=tests +sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PACKAGES,LOCALFOLDER diff --git a/setup.cfg b/setup.cfg index 86f14c6af0..66cc5a801c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,12 +34,13 @@ ensure_newline_before_comments = True line_length=88 # custom configurations order_by_type=False +case_sensitive=True +lines_after_imports=2 skip_glob = **/*_pb2.py +known_first_party=aea known_packages=packages known_local_folder=tests sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PACKAGES,LOCALFOLDER -case_sensitive=True -lines_after_imports=2 [mypy] python_version = 3.7 From 8c36978493b8c1669603a2089e95578288b4e54d Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 18:46:23 +0200 Subject: [PATCH 034/131] fix docs tests according to new isort settings --- docs/agent-vs-aea.md | 1 + docs/build-aea-programmatically.md | 1 + docs/cli-vs-programmatic-aeas.md | 2 ++ docs/decision-maker-transaction.md | 2 ++ docs/generic-skills-step-by-step.md | 14 ++++++++++++++ docs/multiplexer-standalone.md | 2 ++ docs/standalone-transaction.md | 2 ++ 7 files changed, 24 insertions(+) diff --git a/docs/agent-vs-aea.md b/docs/agent-vs-aea.md index 0d31c84ae9..a49868c25d 100644 --- a/docs/agent-vs-aea.md +++ b/docs/agent-vs-aea.md @@ -173,6 +173,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope from aea.protocols.default.message import DefaultMessage + INPUT_FILE = "input_file" OUTPUT_FILE = "output_file" diff --git a/docs/build-aea-programmatically.md b/docs/build-aea-programmatically.md index fb2b593713..84d4b854a0 100644 --- a/docs/build-aea-programmatically.md +++ b/docs/build-aea-programmatically.md @@ -169,6 +169,7 @@ from aea.crypto.fetchai import FetchAICrypto from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA, create_private_key from aea.skills.base import Skill + ROOT_DIR = "./" INPUT_FILE = "input_file" OUTPUT_FILE = "output_file" diff --git a/docs/cli-vs-programmatic-aeas.md b/docs/cli-vs-programmatic-aeas.md index 2bd526eb3a..6fae1bc689 100644 --- a/docs/cli-vs-programmatic-aeas.md +++ b/docs/cli-vs-programmatic-aeas.md @@ -80,11 +80,13 @@ from aea.identity.base import Identity from aea.protocols.base import Protocol from aea.registries.resources import Resources from aea.skills.base import Skill + from packages.fetchai.connections.ledger.connection import LedgerConnection from packages.fetchai.connections.p2p_libp2p.connection import P2PLibp2pConnection from packages.fetchai.connections.soef.connection import SOEFConnection from packages.fetchai.skills.weather_client.strategy import Strategy + API_KEY = "TwiCIriSl0mLahw17pyqoA" SOEF_ADDR = "soef.fetch.ai" SOEF_PORT = 9002 diff --git a/docs/decision-maker-transaction.md b/docs/decision-maker-transaction.md index e6a096007c..0df4924197 100644 --- a/docs/decision-maker-transaction.md +++ b/docs/decision-maker-transaction.md @@ -23,6 +23,7 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialo from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler, Model, Skill, SkillContext + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) @@ -311,6 +312,7 @@ from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialo from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler, Model, Skill, SkillContext + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) diff --git a/docs/generic-skills-step-by-step.md b/docs/generic-skills-step-by-step.md index 37fb56f7e3..c71c402ba4 100644 --- a/docs/generic-skills-step-by-step.md +++ b/docs/generic-skills-step-by-step.md @@ -94,6 +94,7 @@ Open the `behaviours.py` file (`my_generic_seller/skills/generic_seller/behaviou from typing import cast from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.generic_seller.dialogues import ( @@ -102,6 +103,7 @@ from packages.fetchai.skills.generic_seller.dialogues import ( ) from packages.fetchai.skills.generic_seller.strategy import GenericStrategy + DEFAULT_SERVICES_INTERVAL = 60.0 LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" @@ -296,6 +298,7 @@ from aea.helpers.transaction.base import TransactionDigest from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.skills.base import Handler + from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage @@ -310,6 +313,7 @@ from packages.fetchai.skills.generic_seller.dialogues import ( ) from packages.fetchai.skills.generic_seller.strategy import GenericStrategy + LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" @@ -849,6 +853,7 @@ from aea.helpers.search.models import Description, Location, Query from aea.helpers.transaction.base import Terms from aea.skills.base import Model + DEFAULT_LEDGER_ID = DEFAULT_LEDGER DEFAULT_IS_LEDGER_TX = True @@ -1054,6 +1059,7 @@ from aea.protocols.default.dialogues import DefaultDialogues as BaseDefaultDialo from aea.protocols.dialogue.base import Dialogue as BaseDialogue from aea.protocols.dialogue.base import DialogueLabel as BaseDialogueLabel from aea.skills.base import Model + from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage @@ -1071,6 +1077,7 @@ from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogues as BaseOefSearchDialogues, ) + DefaultDialogue = BaseDefaultDialogue @@ -1406,6 +1413,7 @@ Open the `behaviours.py` (`my_generic_buyer/skills/generic_buyer/behaviours.py`) from typing import cast from aea.skills.behaviours import TickerBehaviour + from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage from packages.fetchai.skills.generic_buyer.dialogues import ( @@ -1414,6 +1422,7 @@ from packages.fetchai.skills.generic_buyer.dialogues import ( ) from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy + DEFAULT_SEARCH_INTERVAL = 5.0 LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" @@ -1490,6 +1499,7 @@ from aea.protocols.base import Message from aea.protocols.default.message import DefaultMessage from aea.protocols.signing.message import SigningMessage from aea.skills.base import Handler + from packages.fetchai.protocols.fipa.message import FipaMessage from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage from packages.fetchai.protocols.oef_search.message import OefSearchMessage @@ -1506,6 +1516,7 @@ from packages.fetchai.skills.generic_buyer.dialogues import ( ) from packages.fetchai.skills.generic_buyer.strategy import GenericStrategy + LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" @@ -2196,6 +2207,7 @@ from aea.helpers.search.models import ( from aea.helpers.transaction.base import Terms from aea.skills.base import Model + DEFAULT_LEDGER_ID = DEFAULT_LEDGER DEFAULT_IS_LEDGER_TX = True @@ -2419,6 +2431,7 @@ from aea.protocols.signing.dialogues import SigningDialogue as BaseSigningDialog from aea.protocols.signing.dialogues import SigningDialogues as BaseSigningDialogues from aea.protocols.signing.message import SigningMessage from aea.skills.base import Model + from packages.fetchai.protocols.fipa.dialogues import FipaDialogue as BaseFipaDialogue from packages.fetchai.protocols.fipa.dialogues import FipaDialogues as BaseFipaDialogues from packages.fetchai.protocols.fipa.message import FipaMessage @@ -2436,6 +2449,7 @@ from packages.fetchai.protocols.oef_search.dialogues import ( OefSearchDialogues as BaseOefSearchDialogues, ) + DefaultDialogue = BaseDefaultDialogue diff --git a/docs/multiplexer-standalone.md b/docs/multiplexer-standalone.md index e27fee3081..b3e21b32ac 100644 --- a/docs/multiplexer-standalone.md +++ b/docs/multiplexer-standalone.md @@ -14,6 +14,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope from aea.multiplexer import Multiplexer + INPUT_FILE = "input.txt" OUTPUT_FILE = "output.txt" ``` @@ -124,6 +125,7 @@ from aea.identity.base import Identity from aea.mail.base import Envelope from aea.multiplexer import Multiplexer + INPUT_FILE = "input.txt" OUTPUT_FILE = "output.txt" diff --git a/docs/standalone-transaction.md b/docs/standalone-transaction.md index 1c43c03f21..bf23bb1275 100644 --- a/docs/standalone-transaction.md +++ b/docs/standalone-transaction.md @@ -10,6 +10,7 @@ from aea.crypto.helpers import create_private_key, try_generate_testnet_wealth from aea.crypto.ledger_apis import LedgerApis from aea.crypto.wallet import Wallet + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) @@ -90,6 +91,7 @@ from aea.crypto.helpers import create_private_key, try_generate_testnet_wealth from aea.crypto.ledger_apis import LedgerApis from aea.crypto.wallet import Wallet + logger = logging.getLogger("aea") logging.basicConfig(level=logging.INFO) From ed4e65c038a0425837825fabf39717b19713e875 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 19:24:20 +0200 Subject: [PATCH 035/131] add more tests to aea.configurations.base --- aea/configurations/base.py | 2 +- tests/test_configurations/test_base.py | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 5cec8c5aa7..d902ca0fa2 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -1569,7 +1569,7 @@ def json(self) -> Dict: if self.skill_exception_policy is not None: config["skill_exception_policy"] = self.skill_exception_policy if self.connection_exception_policy is not None: - config["connection_exception_policy"] = self.skill_exception_policy + config["connection_exception_policy"] = self.connection_exception_policy if self.default_routing != {}: config["default_routing"] = { str(key): str(value) for key, value in self.default_routing.items() diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index 5c4c842131..efd30a1562 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -38,6 +38,7 @@ DEFAULT_SKILL_CONFIG_FILE, PackageId, PackageType, + PackageVersion, ProtocolConfig, ProtocolSpecification, ProtocolSpecificationParseError, @@ -480,6 +481,14 @@ def test_pubic_id_repr(): assert repr(public_id) == "" +def test_pubic_id_to_latest(): + """Test PublicId.to_latest""" + public_id = PublicId("author", "name", "0.1.0") + expected_public_id = PublicId("author", "name", "latest") + actual_public_id = public_id.to_latest() + assert expected_public_id == actual_public_id + + def test_pubic_id_same_prefix(): """Test PublicId.same_prefix""" same_1 = PublicId("author", "name", "0.1.0") @@ -663,6 +672,7 @@ def test_agent_config_to_json_with_optional_configurations(): max_reactions=100, decision_maker_handler=dict(dotted_path="", file_path=""), skill_exception_policy="propagate", + connection_exception_policy="propagate", default_routing={"author/name:0.1.0": "author/name:0.1.0"}, loop_mode="sync", runtime_mode="async", @@ -690,3 +700,18 @@ def test_contract_config_component_type(): """Test ContractConfig.component_type""" config = ContractConfig("name", "author", "0.1.0") assert config.component_type == ComponentType.CONTRACT + + +def test_package_version_eq_negative(): + """Test package version __eq__.""" + v1 = PackageVersion("0.1.0") + v2 = PackageVersion("0.2.0") + assert v1 != v2 + + +def test_package_version_lt(): + """Test package version __lt__.""" + v1 = PackageVersion("0.1.0") + v2 = PackageVersion("0.2.0") + v3 = PackageVersion("latest") + assert v1 < v2 < v3 From e7247506df34647775ad03187dadae70603148aa Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 19:31:27 +0200 Subject: [PATCH 036/131] fix typo in api docs for protocol generator --- docs/api/protocols/generator/base.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/protocols/generator/base.md b/docs/api/protocols/generator/base.md index ef1bead8e6..8859ed4742 100644 --- a/docs/api/protocols/generator/base.md +++ b/docs/api/protocols/generator/base.md @@ -58,7 +58,7 @@ a) validates the protocol specification. b) creates the protocol buffer schema file. c) generates python modules. d) applies black formatting -d) applies isort formatting +e) applies isort formatting **Returns**: @@ -76,7 +76,7 @@ a) validates the protocol specification. b) creates the protocol buffer schema file. c) generates python modules. d) applies black formatting -d) applies isort formatting +e) applies isort formatting If in "protobuf only" mode (protobuf_only is True), it only does a) and b). From 7a53b806ab9357841fd5ca06960561f68a8e3b34 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 19:48:15 +0200 Subject: [PATCH 037/131] address PR comments remove relative imports in favour of absolute ones make isort skip some lines between the imports in the examples/gym_ex code --- examples/gym_ex/proxy/agent.py | 10 ++++++---- examples/gym_ex/proxy/env.py | 15 ++++++++------ tests/conftest.py | 2 +- tests/test_aea.py | 20 +++++++++---------- tests/test_agent.py | 2 +- tests/test_cli/test_misc.py | 2 +- tests/test_cli_gui/test_misc.py | 2 +- .../test_programmatic_aea.py | 2 +- .../test_decision_maker_transaction.py | 2 +- .../test_multiplexer_standalone.py | 2 +- .../test_standalone_transaction.py | 5 ++++- tests/test_multiplexer.py | 4 ++-- tests/test_package_loading.py | 2 +- .../test_connections/test_soef/test_soef.py | 2 +- .../test_soef/test_soef_integration.py | 2 +- 15 files changed, 41 insertions(+), 33 deletions(-) diff --git a/examples/gym_ex/proxy/agent.py b/examples/gym_ex/proxy/agent.py index 2c638ba0c7..bd858cdd4a 100644 --- a/examples/gym_ex/proxy/agent.py +++ b/examples/gym_ex/proxy/agent.py @@ -30,15 +30,17 @@ from aea.identity.base import Identity from aea.mail.base import Envelope -from packages.fetchai.connections.gym.connection import ( # noqa: E402 # pylint: disable=wrong-import-position - GymConnection, + +sys.modules["packages.fetchai.connections.gym"] = locate( # isort:skip + "packages.fetchai.connections.gym" ) -sys.modules["packages.fetchai.connections.gym"] = locate( - "packages.fetchai.connections.gym" +from packages.fetchai.connections.gym.connection import ( # noqa: E402 # pylint: disable=wrong-import-position + GymConnection, ) + ADDRESS = "some_address" diff --git a/examples/gym_ex/proxy/env.py b/examples/gym_ex/proxy/env.py index 7066819cf3..79637dd6da 100755 --- a/examples/gym_ex/proxy/env.py +++ b/examples/gym_ex/proxy/env.py @@ -32,6 +32,15 @@ from aea.protocols.base import Message from aea.protocols.dialogue.base import Dialogue as BaseDialogue + +sys.modules["packages.fetchai.connections.gym"] = locate( # isort:skip + "packages.fetchai.connections.gym" +) +sys.modules["packages.fetchai.protocols.gym"] = locate( # isort:skip + "packages.fetchai.protocols.gym" +) + + from packages.fetchai.protocols.gym.dialogues import ( # noqa: E402 # pylint: disable=wrong-import-position GymDialogue as BaseGymDialogue, ) @@ -45,12 +54,6 @@ from .agent import ProxyAgent # noqa: E402 # pylint: disable=wrong-import-position -sys.modules["packages.fetchai.connections.gym"] = locate( - "packages.fetchai.connections.gym" -) -sys.modules["packages.fetchai.protocols.gym"] = locate("packages.fetchai.protocols.gym") - - Action = Any Observation = Any Reward = float diff --git a/tests/conftest.py b/tests/conftest.py index eb3a412978..8e125d7ae3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -81,7 +81,7 @@ from packages.fetchai.connections.tcp.tcp_client import TCPClientConnection from packages.fetchai.connections.tcp.tcp_server import TCPServerConnection -from .data.dummy_connection.connection import DummyConnection # type: ignore +from tests.data.dummy_connection.connection import DummyConnection # type: ignore logger = logging.getLogger(__name__) diff --git a/tests/test_aea.py b/tests/test_aea.py index 46553c275c..57e5dca9aa 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -48,16 +48,6 @@ from packages.fetchai.connections.local.connection import LocalNode from packages.fetchai.protocols.fipa.message import FipaMessage -from .conftest import ( - CUR_PATH, - DUMMY_SKILL_PUBLIC_ID, - FETCHAI_PRIVATE_KEY_PATH, - ROOT_DIR, - UNKNOWN_PROTOCOL_PUBLIC_ID, - _make_local_connection, -) -from .data.dummy_aea.skills.dummy.tasks import DummyTask # type: ignore -from .data.dummy_skill.behaviours import DummyBehaviour # type: ignore from tests.common.utils import ( AeaTool, make_behaviour_cls_from_funcion, @@ -66,6 +56,16 @@ timeit_context, wait_for_condition, ) +from tests.conftest import ( + CUR_PATH, + DUMMY_SKILL_PUBLIC_ID, + FETCHAI_PRIVATE_KEY_PATH, + ROOT_DIR, + UNKNOWN_PROTOCOL_PUBLIC_ID, + _make_local_connection, +) +from tests.data.dummy_aea.skills.dummy.tasks import DummyTask # type: ignore +from tests.data.dummy_skill.behaviours import DummyBehaviour # type: ignore def test_setup_aea(): diff --git a/tests/test_agent.py b/tests/test_agent.py index e16446fc07..b0de015614 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -28,8 +28,8 @@ from packages.fetchai.connections.local.connection import LocalNode -from .conftest import _make_local_connection from tests.common.utils import wait_for_condition +from tests.conftest import _make_local_connection class DummyAgent(Agent): diff --git a/tests/test_cli/test_misc.py b/tests/test_cli/test_misc.py index b43b70870c..48b896286d 100644 --- a/tests/test_cli/test_misc.py +++ b/tests/test_cli/test_misc.py @@ -22,7 +22,7 @@ import aea from aea.cli import cli -from ..conftest import CliRunner +from tests.conftest import CliRunner def test_no_argument(): diff --git a/tests/test_cli_gui/test_misc.py b/tests/test_cli_gui/test_misc.py index 86beb80b0a..eefd7c22f7 100644 --- a/tests/test_cli_gui/test_misc.py +++ b/tests/test_cli_gui/test_misc.py @@ -24,8 +24,8 @@ import aea.cli_gui -from .test_base import create_app from tests.common.mocks import ctx_mock_Popen +from tests.test_cli_gui.test_base import create_app def test_home_page_exits(): diff --git a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py index d58f7ff8e7..290a7a7295 100644 --- a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py @@ -25,9 +25,9 @@ from aea.configurations.constants import DEFAULT_PRIVATE_KEY_FILE from aea.test_tools.test_cases import BaseAEATestCase -from .programmatic_aea import run from tests.conftest import CUR_PATH, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code +from tests.test_docs.test_build_aea_programmatically.programmatic_aea import run MD_FILE = "docs/build-aea-programmatically.md" diff --git a/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py b/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py index 5721c18354..2c1dde598e 100644 --- a/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py +++ b/tests/test_docs/test_decision_maker_transaction/test_decision_maker_transaction.py @@ -25,9 +25,9 @@ from aea.test_tools.test_cases import BaseAEATestCase -from ...conftest import CUR_PATH, ROOT_DIR from ..helper import extract_code_blocks, extract_python_code from .decision_maker_transaction import logger, run +from tests.conftest import CUR_PATH, ROOT_DIR MD_FILE = "docs/decision-maker-transaction.md" diff --git a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py index ef04685096..b67134a50c 100644 --- a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py +++ b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py @@ -24,9 +24,9 @@ from aea.test_tools.test_cases import BaseAEATestCase -from .multiplexer_standalone import run from tests.conftest import CUR_PATH, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code +from tests.test_docs.test_multiplexer_standalone.multiplexer_standalone import run MD_FILE = "docs/multiplexer-standalone.md" 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 f501a2e803..47e99223a9 100644 --- a/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py +++ b/tests/test_docs/test_standalone_transaction/test_standalone_transaction.py @@ -27,9 +27,12 @@ from aea.test_tools.test_cases import BaseAEATestCase -from .standalone_transaction import logger, run from tests.conftest import CUR_PATH, MAX_FLAKY_RERUNS_INTEGRATION, ROOT_DIR from tests.test_docs.helper import extract_code_blocks, extract_python_code +from tests.test_docs.test_standalone_transaction.standalone_transaction import ( + logger, + run, +) MD_FILE = "docs/standalone-transaction.md" diff --git a/tests/test_multiplexer.py b/tests/test_multiplexer.py index 07f507b13f..e6129619a4 100644 --- a/tests/test_multiplexer.py +++ b/tests/test_multiplexer.py @@ -43,7 +43,8 @@ from packages.fetchai.connections.local.connection import LocalNode -from .conftest import ( +from tests.common.utils import wait_for_condition +from tests.conftest import ( UNKNOWN_CONNECTION_PUBLIC_ID, UNKNOWN_PROTOCOL_PUBLIC_ID, _make_dummy_connection, @@ -51,7 +52,6 @@ _make_stub_connection, logger, ) -from tests.common.utils import wait_for_condition @pytest.mark.asyncio diff --git a/tests/test_package_loading.py b/tests/test_package_loading.py index 6b3b5b22c8..c463a07e3b 100644 --- a/tests/test_package_loading.py +++ b/tests/test_package_loading.py @@ -24,7 +24,7 @@ from aea.skills.base import Skill -from .conftest import CUR_PATH +from tests.conftest import CUR_PATH def test_loading(): diff --git a/tests/test_packages/test_connections/test_soef/test_soef.py b/tests/test_packages/test_connections/test_soef/test_soef.py index 1f4517f016..7f887bea0d 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef.py +++ b/tests/test_packages/test_connections/test_soef/test_soef.py @@ -49,8 +49,8 @@ ) from packages.fetchai.protocols.oef_search.message import OefSearchMessage -from . import models from tests.conftest import UNKNOWN_PROTOCOL_PUBLIC_ID +from tests.test_packages.test_connections.test_soef import models def make_async(return_value: Any) -> Callable: diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index d96b71ae4e..0ab0ef729a 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -45,9 +45,9 @@ from packages.fetchai.connections.soef.connection import SOEFConnection from packages.fetchai.protocols.oef_search.message import OefSearchMessage -from . import models from .test_soef import OefSearchDialogues from tests.common.utils import wait_for_condition +from tests.test_packages.test_connections.test_soef import models logging.basicConfig(level=logging.DEBUG) From e5728acd0ce51c3d839eacc6374f0838287609b4 Mon Sep 17 00:00:00 2001 From: Oleg Panasevych Date: Mon, 21 Sep 2020 20:54:16 +0300 Subject: [PATCH 038/131] Echo message fixed. --- aea/cli/reset_password.py | 2 +- tests/test_cli/test_reset_password.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aea/cli/reset_password.py b/aea/cli/reset_password.py index 4313957b9d..cc3a07a6cb 100644 --- a/aea/cli/reset_password.py +++ b/aea/cli/reset_password.py @@ -40,4 +40,4 @@ def _do_password_reset(email: str) -> None: :return: """ registry_reset_password(email) - click.echo("A letter with password reset link was sent to {}".format(email)) + click.echo("An email with a password reset link was sent to {}".format(email)) diff --git a/tests/test_cli/test_reset_password.py b/tests/test_cli/test_reset_password.py index b8b28437c4..dec51b4a28 100644 --- a/tests/test_cli/test_reset_password.py +++ b/tests/test_cli/test_reset_password.py @@ -55,5 +55,5 @@ def test__do_password_reset_positive(self, echo_mock, registry_reset_password_mo _do_password_reset(email) registry_reset_password_mock.assert_called_once_with(email) echo_mock.assert_called_once_with( - "A letter with password reset link was sent to {}".format(email) + "An email with a password reset link was sent to {}".format(email) ) From d5e773f64e7c85b52d53d5df2b97fb568bd4ffcf Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 22:02:38 +0200 Subject: [PATCH 039/131] update version bumper script - shrink the set of ambiguous public ids. The idea is to overcome the "multiple-update", due to versions with consecutive minor numbers, by sorting the package id in descending order. May lead to other unforeseen issues. - update the yamls independently of whether the package id is ambiguous or not, since in that case we always disambiguate thanks to the context; - update protocol's READMEs, and in particular the protocol specifications, separately, by disambiguating from the path (the parent of the parent must be 'protocols'). --- scripts/update_package_versions.py | 120 ++++++++++++++++++++++------- 1 file changed, 91 insertions(+), 29 deletions(-) diff --git a/scripts/update_package_versions.py b/scripts/update_package_versions.py index 58528e34e2..1c3f922911 100644 --- a/scripts/update_package_versions.py +++ b/scripts/update_package_versions.py @@ -35,7 +35,7 @@ import sys from collections import Counter from pathlib import Path -from typing import Dict, Optional, Set, Tuple +from typing import Dict, List, Optional, Set from click.testing import CliRunner @@ -284,11 +284,6 @@ def get_public_ids_to_update() -> Set[PackageId]: return result -def _extract_prefix(public_id: PublicId) -> Tuple[str, str]: - """Extract (author, package_name) from public id.""" - return public_id.author, public_id.name - - def _get_ambiguous_public_ids( all_package_ids_to_update: Set[PackageId], ) -> Set[PublicId]: @@ -298,14 +293,36 @@ def _get_ambiguous_public_ids( operator.itemgetter(0), filter( lambda x: x[1] > 1, - Counter( - _extract_prefix(id_.public_id) for id_ in all_package_ids_to_update - ).items(), + Counter(id_.public_id for id_ in all_package_ids_to_update).items(), ), ) ) +def _sort_in_update_order(package_ids: Set[PackageId]) -> List[PackageId]: + """ + Sort the set of package id in the order of update. + + In particular, they are sorted from the greatest version number to the lowest. + + The reason is to avoid that consecutive package ids (i.e. whose minors difference is 1) + gets updated in ascending order, resulting in all the updates collapsing to the greatest version. + For example, consider two package ids with prefix 'author/package' and with versions + 0.1.0 and 0.2.0, respectively. If we bump first the former and then the latter, + the new replacements associated to the first updated are taken into account in + the second update. + """ + return sorted( + package_ids, + key=lambda x: ( + semver.VersionInfo(x.public_id.version), + x.public_id, + x.package_type, + ), + reverse=True, + ) + + def process_packages(all_package_ids_to_update: Set[PackageId]) -> bool: """Process the package versions.""" is_bumped = False @@ -313,12 +330,13 @@ def process_packages(all_package_ids_to_update: Set[PackageId]) -> bool: print("*" * 100) print("Start processing.") print( - f"Ambiguous public ids: {pprint.pformat(map(lambda x: '/'.join(str(x)), ambiguous_public_ids))}" + f"Ambiguous public ids: {pprint.pformat(list(map(lambda x: '/'.join(str(x)), ambiguous_public_ids)))}" ) - for package_id in all_package_ids_to_update: + sorted_package_ids_list = _sort_in_update_order(all_package_ids_to_update) + for package_id in sorted_package_ids_list: print("#" * 50) print(f"Processing {package_id}") - is_ambiguous = _extract_prefix(package_id.public_id) in ambiguous_public_ids + is_ambiguous = package_id.public_id in ambiguous_public_ids process_package(package_id, is_ambiguous) is_bumped = True return is_bumped @@ -352,11 +370,7 @@ def bump_package_version( for path in Path(rootdir).glob("**/*"): if path.is_file() and str(path).endswith((".py", ".yaml", ".md")): inplace_change( - path, - str(current_public_id), - str(new_public_id), - type_, - is_ambiguous, + path, current_public_id, new_public_id, type_, is_ambiguous, ) bump_version_in_yaml(configuration_file_path, type_, new_public_id.version) @@ -383,7 +397,13 @@ def _can_disambiguate_from_context( if re.search(fr"aea +fetch +{old_string}", line) is not None: return type_ == "agents" match = re.search( - f"(skill|protocol|connection|contract|agent)s?.*{old_string}", line + "(skill|SKILL|" + + "protocol|PROTOCOL|" + + "connection|CONNECTION|" + + "contract|CONTRACT|" + + "agent|AGENT" + + f")s?.*{old_string}", + line, ) if match is not None: return (match.group(1) + "s") == type_ @@ -462,16 +482,18 @@ def replace_type_and_public_id_occurrences(line, old_string, new_string, type_) return line -def replace_in_yamls(content, old_string, new_string, type_) -> str: +def replace_in_yamls( + content, old_public_id: PublicId, new_public_id: PublicId, type_ +) -> str: """ Replace the public id in configuration files (also nested in .md files). - 1) replace in cases like: + 1) replace package dependencies: |protocols: |- author/name:version |... |- old_string - 2) replace in cases like: + 2) replace in configuration headers: |name: package_name |author: package_author |version: package_version -> bump up @@ -479,12 +501,10 @@ def replace_in_yamls(content, old_string, new_string, type_) -> str: """ # case 1: - regex = re.compile(f"({type_}:\n(-.*\n)*)(- *{old_string})", re.MULTILINE) - content = regex.sub(rf"\g<1>- {new_string}", content) + regex = re.compile(f"({type_}:\n(-.*\n)*)(- *{str(old_public_id)})", re.MULTILINE) + content = regex.sub(rf"\g<1>- {str(new_public_id)}", content) - # case 1: - old_public_id = PublicId.from_str(old_string) - new_public_id = PublicId.from_str(new_string) + # case 2: regex = re.compile( rf"(name: {old_public_id.name}\nauthor: {old_public_id.author}\n)version: {old_public_id.version}\n(type: {type_[:-1]})", re.MULTILINE, @@ -493,12 +513,51 @@ def replace_in_yamls(content, old_string, new_string, type_) -> str: return content +def replace_in_protocol_readme( + fp: Path, content: str, old_public_id: PublicId, new_public_id: PublicId, type_: str +) -> str: + """ + Replace the version id in the protocol specification in the protcol's README. + + That is, bump the version in cases like: + + |name: package_name + |author: package_author + |version: package_version -> bump up + ... + + :param fp: path to the file being edited. + :param content: the content of the file. + :param old_public_id: the old public id. + :param new_public_id: the new public id. + :param type_: the type of the package. + :return: the new content. + """ + if ( + type_ == fp.parent.parent == "protocols" + and fp.name == "README.md" + and fp.parent == old_public_id.name + ): + regex = re.compile( + rf"(name: {old_public_id.name}\nauthor: {old_public_id.author}\n)version: {old_public_id.version}\n(description:)", + re.MULTILINE, + ) + content = regex.sub(rf"\g<1>version: {new_public_id.version}\n\g<2>", content) + return content + + def inplace_change( - fp: Path, old_string: str, new_string: str, type_: str, is_ambiguous: bool + fp: Path, + old_public_id: PublicId, + new_public_id: PublicId, + type_: str, + is_ambiguous: bool, ) -> None: """Replace the occurrence of a string with a new one in the provided file.""" content = fp.read_text() + old_string = str(old_public_id) + new_string = str(new_public_id) if old_string not in content: return @@ -506,10 +565,13 @@ def inplace_change( f"Processing file {fp} for replacing {old_string} with {new_string} (is_ambiguous: {is_ambiguous})" ) + content = replace_in_yamls(content, old_public_id, new_public_id, type_) + content = replace_in_protocol_readme( + fp, content, old_public_id, new_public_id, type_ + ) if not is_ambiguous: content = content.replace(old_string, new_string) else: - content = replace_in_yamls(content, old_string, new_string, type_) content = _ask_to_user_and_replace_if_allowed( content, old_string, new_string, type_ ) @@ -534,7 +596,7 @@ def process_package(package_id: PackageId, is_ambiguous: bool) -> None: - check version in registry - make sure, version is exactly one above the one in registry - - change all occurences in packages/tests/aea/examples/benchmark/docs to new reference + - change all occurrences in packages/tests/aea/examples/benchmark/docs to new reference - change yaml version number :param package_id: the id of the package From 14bdbcc85a39d38806473f506c4fe01058791b77 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 21 Sep 2020 22:47:55 +0200 Subject: [PATCH 040/131] fix cli vs programmatic aea test due to isort changes --- .../test_cli_vs_programmatic_aea.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py index e944ab7b5e..daf2c05033 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/test_cli_vs_programmatic_aea.py @@ -173,7 +173,7 @@ def _inject_location(self, location, dst_file_path): """Inject location into the weather client strategy.""" file = Path(dst_file_path) lines = file.read_text().splitlines() - line_insertion_position = 163 # line below: `strategy._is_ledger_tx = False` + line_insertion_position = 165 # line below: `strategy._is_ledger_tx = False` lines.insert( line_insertion_position, " from packages.fetchai.skills.generic_buyer.strategy import Location", From c9710754d116818d6e4b3f37c6cc75a6b9f0d5a2 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Mon, 21 Sep 2020 22:22:32 +0100 Subject: [PATCH 041/131] complete transition to message based for tac control contract --- .../skills/tac_control_contract/behaviours.py | 8 +- .../skills/tac_control_contract/dialogues.py | 16 ++++ .../skills/tac_control_contract/handlers.py | 39 ++++++--- .../skills/tac_control_contract/parameters.py | 87 +------------------ 4 files changed, 49 insertions(+), 101 deletions(-) diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 7b2b87104c..7cc5a46586 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -51,6 +51,8 @@ def setup(self) -> None: super().setup() parameters = cast(Parameters, self.context.parameters) if not parameters.is_contract_deployed: + game = cast(Game, self.context.game) + game.phase = Phase.CONTRACT_DEPLOYMENT_PROPOSAL self._request_contract_deploy_transaction() def _request_contract_deploy_transaction(self) -> None: @@ -68,7 +70,7 @@ def _request_contract_deploy_transaction(self) -> None: performative=ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION, ledger_id=parameters.ledger_id, contract_id="fetchai/erc1155:0.10.0", - callable="get_deploy_transaction", + callable=ContractApiDialogue.Callable.GET_DEPLOY_TRANSACTION, kwargs=ContractApiMessage.Kwargs( {"deployer_address": self.context.agent_address} ), @@ -155,7 +157,7 @@ def _request_create_items_transaction(self, game: Game) -> None: performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, ledger_id=parameters.ledger_id, contract_id="fetchai/erc1155:0.10.0", - callable="get_create_batch_transaction", + callable=ContractApiDialogue.Callable.GET_CREATE_BATCH_TRANSACTION, kwargs=ContractApiMessage.Kwargs( {"deployer_address": self.context.agent_address, "token_ids": token_ids} ), @@ -191,7 +193,7 @@ def _request_mint_items_transaction(self, game: Game) -> None: ledger_id=parameters.ledger_id, contract_id="fetchai/erc1155:0.10.0", contract_address=parameters.contract_address, - callable="get_mint_batch_transaction", + callable=ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION, kwargs=ContractApiMessage.Kwargs( { "deployer_address": self.context.agent_address, diff --git a/packages/fetchai/skills/tac_control_contract/dialogues.py b/packages/fetchai/skills/tac_control_contract/dialogues.py index 77718207a2..be35d63101 100644 --- a/packages/fetchai/skills/tac_control_contract/dialogues.py +++ b/packages/fetchai/skills/tac_control_contract/dialogues.py @@ -28,6 +28,7 @@ - TacDialogues: The dialogues class keeps track of all dialogues of type tac. """ +from enum import Enum from typing import Optional, Type from aea.common import Address @@ -89,6 +90,13 @@ class ContractApiDialogue(BaseContractApiDialogue): """The dialogue class maintains state of a dialogue and manages it.""" + class Callable(Enum): + """Contract callable.""" + + GET_DEPLOY_TRANSACTION = "get_deploy_transaction" + GET_CREATE_BATCH_TRANSACTION = "get_create_batch_transaction" + GET_MINT_BATCH_TRANSACTION = "get_mint_batch_transaction" + def __init__( self, dialogue_label: BaseDialogueLabel, @@ -113,6 +121,14 @@ def __init__( message_class=message_class, ) self._terms = None # type: Optional[Terms] + self._callable = None # type: Optional[ContractApiDialogue.Callable] + + @property + def callable(self) -> Callable: + """Get the callable.""" + if self._callable is None: + raise ValueError("Callable not set!") + return self._callable @property def terms(self) -> Terms: diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index 304445a5e3..6b50a79af5 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -41,6 +41,7 @@ SigningDialogue, SigningDialogues, ) +from packages.fetchai.skills.tac_control_contract.game import Game, Phase from packages.fetchai.skills.tac_control_contract.parameters import Parameters LEDGER_API_ADDRESS = "fetchai/ledger:0.6.0" @@ -329,7 +330,7 @@ def handle(self, message: Message) -> None: ledger_api_msg.performative is LedgerApiMessage.Performative.TRANSACTION_RECEIPT ): - self._handle_transaction_receipt(ledger_api_msg) + self._handle_transaction_receipt(ledger_api_msg, ledger_api_dialogue) elif ledger_api_msg.performative == LedgerApiMessage.Performative.ERROR: self._handle_error(ledger_api_msg, ledger_api_dialogue) else: @@ -389,16 +390,21 @@ def _handle_transaction_digest( self.context.outbox.put_message(message=msg) self.context.logger.info("requesting transaction receipt.") - def _handle_transaction_receipt(self, ledger_api_msg: LedgerApiMessage) -> None: + def _handle_transaction_receipt( + self, ledger_api_msg: LedgerApiMessage, ledger_api_dialogue: LedgerApiDialogue + ) -> None: """ Handle a message of transaction_receipt performative. :param ledger_api_message: the ledger api message + :param ledger_api_dialogue: the ledger api dialogue """ is_transaction_successful = LedgerApis.is_transaction_settled( ledger_api_msg.transaction_receipt.ledger_id, ledger_api_msg.transaction_receipt.receipt, ) + signing_dialogue = ledger_api_dialogue.associated_signing_dialogue + contract_api_dialogue = signing_dialogue.associated_contract_api_dialogue if is_transaction_successful: self.context.logger.info( "transaction was successfully settled. Transaction receipt={}".format( @@ -406,21 +412,30 @@ def _handle_transaction_receipt(self, ledger_api_msg: LedgerApiMessage) -> None: ) ) parameters = cast(Parameters, self.context.parameters) - if not parameters.contract_manager.is_contract_deployed: + game = cast(Game, self.context.game) + if ( + contract_api_dialogue.callable + == ContractApiDialogue.Callable.GET_DEPLOY_TRANSACTION + ): contract_address = ledger_api_msg.transaction_receipt.receipt.get( "contractAddress", None ) parameters.contract_address = contract_address - parameters.contract_manager.is_contract_deployed = is_transaction_successful - elif not parameters.contract_manager.is_tokens_created: - parameters.contract_manager.is_tokens_created = is_transaction_successful - elif not parameters.contract_manager.is_tokens_minted: - parameters.is_tokens_minted = is_transaction_successful - elif parameters.is_tokens_minted: - self.context.is_active = False - self.context.logger.info("demo finished!") + game.phase = Phase.CONTRACT_DEPLOYED + elif ( + contract_api_dialogue.callable + == ContractApiDialogue.Callable.GET_CREATE_BATCH_TRANSACTION + ): + game.phase = Phase.TOKENS_CREATED + elif ( + contract_api_dialogue.callable + == ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION + ): + parameters.nb_completed_minting += 1 + if game.registration.nb_agents == parameters.nb_completed_minting: + game.phase = Phase.TOKENS_MINTED else: - self.context.logger.error("unexpected transaction receipt!") + self.context.logger.error("Unexpected transaction receipt!") else: self.context.logger.error( "transaction failed. Transaction receipt={}".format( diff --git a/packages/fetchai/skills/tac_control_contract/parameters.py b/packages/fetchai/skills/tac_control_contract/parameters.py index f9ea7ee3b0..f7ff49fc51 100644 --- a/packages/fetchai/skills/tac_control_contract/parameters.py +++ b/packages/fetchai/skills/tac_control_contract/parameters.py @@ -19,103 +19,18 @@ """This package contains a class representing the game parameters.""" -from typing import Dict, List, Optional - -from aea.exceptions import AEAEnforceError, enforce from aea.helpers.transaction.base import Terms from packages.fetchai.skills.tac_control.parameters import Parameters as BaseParameters -class ContractManager: - """Class managing the contract.""" - - def __init__(self, is_contract_deployed: bool = False): - """Instantiate the contract manager class.""" - self._deploy_tx_digest = None # type: Optional[str] - self._create_tokens_tx_digest = None # type: Optional[str] - self._mint_tokens_tx_digests = {} # type: Dict[str, str] - self._confirmed_mint_tokens_agents = [] # type: List[str] - self.is_contract_deployed = is_contract_deployed - self.is_tokens_created = False - self.is_tokens_minted = False - - @property - def deploy_tx_digest(self) -> str: - """Get the contract deployment tx digest.""" - if self._deploy_tx_digest is None: - raise AEAEnforceError("Deploy_tx_digest is not set yet!") - return self._deploy_tx_digest - - @deploy_tx_digest.setter - def deploy_tx_digest(self, deploy_tx_digest: str) -> None: - """Set the contract deployment tx digest.""" - enforce(self._deploy_tx_digest is None, "Deploy_tx_digest already set!") - self._deploy_tx_digest = deploy_tx_digest - - @property - def create_tokens_tx_digest(self) -> str: - """Get the contract deployment tx digest.""" - if self._create_tokens_tx_digest is None: - raise AEAEnforceError("Create_tokens_tx_digest is not set yet!") - return self._create_tokens_tx_digest - - @create_tokens_tx_digest.setter - def create_tokens_tx_digest(self, create_tokens_tx_digest: str) -> None: - """Set the contract deployment tx digest.""" - enforce( - self._create_tokens_tx_digest is None, - "Create_tokens_tx_digest already set!", - ) - self._create_tokens_tx_digest = create_tokens_tx_digest - - @property - def mint_tokens_tx_digests(self) -> Dict[str, str]: - """Get the mint tokens tx digests.""" - return self._mint_tokens_tx_digests - - def set_mint_tokens_tx_digest(self, agent_addr: str, tx_digest: str) -> None: - """ - Set a mint token tx digest for an agent. - - :param agent_addr: the agent addresss - :param tx_digest: the transaction digest - """ - enforce( - agent_addr not in self._mint_tokens_tx_digests, "Tx digest already set." - ) - self._mint_tokens_tx_digests[agent_addr] = tx_digest - - @property - def confirmed_mint_tokens_agents(self) -> List[str]: - """Get the agents which are confirmed to have minted tokens on chain.""" - return self._confirmed_mint_tokens_agents - - def add_confirmed_mint_tokens_agents(self, agent_addr: str) -> None: - """ - Set agent addresses whose tokens have been minted. - - :param agent_addr: the agent address - """ - enforce( - agent_addr not in self.confirmed_mint_tokens_agents, - "Agent already in list.", - ) - self._confirmed_mint_tokens_agents.append(agent_addr) - - class Parameters(BaseParameters): """This class contains the parameters of the game.""" def __init__(self, **kwargs): """Instantiate the parameter class.""" super().__init__(**kwargs) - self._contract_manager = ContractManager() - - @property - def contract_manager(self) -> ContractManager: - """Get contract manager.""" - return self._contract_manager + self.nb_completed_minting = 0 def get_deploy_terms(self) -> Terms: """ From 4f176acdf4418449b6bb2a6dca73dd1b1e2e6561 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Mon, 21 Sep 2020 22:24:01 +0100 Subject: [PATCH 042/131] fix hashes --- .../fetchai/protocols/contract_api/protocol.yaml | 2 +- packages/fetchai/protocols/gym/protocol.yaml | 2 +- packages/fetchai/skills/erc1155_deploy/skill.yaml | 2 +- packages/fetchai/skills/tac_control/skill.yaml | 8 ++++---- .../fetchai/skills/tac_control_contract/skill.yaml | 12 ++++++------ packages/hashes.csv | 10 +++++----- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/fetchai/protocols/contract_api/protocol.yaml b/packages/fetchai/protocols/contract_api/protocol.yaml index c41896ef87..3979768e87 100644 --- a/packages/fetchai/protocols/contract_api/protocol.yaml +++ b/packages/fetchai/protocols/contract_api/protocol.yaml @@ -6,7 +6,7 @@ description: A protocol for contract APIs requests and responses. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmVR8NKCTfaoLCiepHWqPGPVRuhmbwaM4v9iheK4FzaWwj + README.md: QmPK5NcjfCiw3wnnaM18hdgHUTyU9YfxVgs9wsBZdrfhhF __init__.py: QmZodYjNqoMgGAGKfkCU4zU9t1Cx9MAownqSy4wyVdwaHF contract_api.proto: QmNwngtcYFSuqL8yeTGVXmrHjfebCybdUa9BnTDKXn8odk contract_api_pb2.py: QmVT6Fv53KyFhshNFEo38seHypd7Y62psBaF8NszV8iRHK diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index f381e6973e..fb853161fa 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -6,7 +6,7 @@ description: A protocol for interacting with a gym connection. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmTCkz4cEUcwuPZVtvrVr8Np5qn1SMwm6foGSY9Y68DhZT + README.md: QmReTgjgH8mszRS1obqdxXDeA6f8sgkmfXHqZ1FSFeeZgX __init__.py: QmWBvruqGuU2BVCq8cuP1S3mgvuC78yrG4TdtSvKhCT8qX custom_types.py: QmT3VKT86xZKR11RR1vQ3myRpmVZNdzY6ELd8HG9U2ngwa dialogues.py: QmdCzcFfyPF43U2SoxwshG5p4hd6dK49m6GYKduDHbnNPo diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index b43dc83ed4..51ddb1f8e0 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -11,7 +11,7 @@ fingerprint: __init__.py: Qmbm3ZtGpfdvvzqykfRqbaReAK9a16mcyK7qweSfeN5pq1 behaviours.py: QmaiK1q2cYeP64YriCw6PHm9Mr1okMRU9esPftQDXXFy1f dialogues.py: QmcCbdxFM4SX3MgXDxxbsC66gp8QK3C4W2czniQ5oDNc7G - handlers.py: QmSp3YuFz5nLy6Bc6qQr27ZUtwNQR6LyKiRHXcYpnmhm9r + handlers.py: QmUP1hkd8pGwFu9xK2GgempWwtQgh1BAfDvQPkJGCcKsoD strategy.py: QmeoDg7UT5MG5khmrZna3v8HYrC6QJjjEV26kcq1mPs6yx fingerprint_ignore_patterns: [] contracts: diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index 4cb9306bc0..e706c33ac8 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -9,12 +9,12 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdWECpRXZXH5JPV6wVHqeUtvjBhieUFTEoT2e7EY16N8M __init__.py: Qme9YfgfPXymvupw1EHMJWGUSMTT6JQZxk2qaeKE76pgyN - behaviours.py: QmTVCXtTpH1A55vWnynz1PjM4VCrQ6EDy5XfcJpT93doEq + behaviours.py: QmcznM3tsmEDNx9Vbhv48o3PNtBEz5W1MVQ7SxJFGkH7di dialogues.py: QmcVYVTZ95UKBnXzmKyGLo5LwSVcGYUTrifosQMSpzNnCX - game.py: QmeAmG3LH1xBFRvUATrWY7spSDmjNeXVD4ZNYrt1BRY3jB + game.py: QmNt16GHaJHtsw3tSS165RLU8pNtvdMbKJqEkMRdjZn3rS handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW - helpers.py: QmdG31YUJakBz8FdNNxU6RxqhWy9iv1BG253PzfxBhzqq2 - parameters.py: QmQB95beEKzyA8Aa7Y9HTPw6BPEVi6BGkpsUqN4QZ4DcVG + helpers.py: QmSh5DfkfsdAHQ7RnR5MHZaeJacVSPQqHMzESZg5mcUbFC + parameters.py: QmQkA45jEp5EK5GoD7TaVrckozGY8uTr9f3j4E6pzg72af fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index ac1f539616..f96d6b1a99 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -7,13 +7,13 @@ description: The tac control skill implements the logic for an AEA to control an license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmV6mToyVnQL9squVJntDPrHvtxFk7sfEYJ61Fyoiy9wsE + README.md: QmUiw6Dt97mXLzSizbnMNTsfLy3edGXKdYTNR5bke6sFsm __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmcLSggJr1XpiDEwefCGGpfwUp282J4i97ziCNFH7X1M9C - game.py: Qmdz91tAYzEFDsvN4hNBawK7D7beTfocps1hpQc3RgavUK - handlers.py: QmWyibFRxcunBLqb7FJEkx9RpS6fNZpAvNDkG6cCfK7mQd - helpers.py: QmQ36tdx5itzz189tUgmyR74Q63vSRUcPTsg9qEwBUYdNU - parameters.py: QmRU9gxsWcxy25g69jbrKve2f8kFxNBjFfRjPZNKsYoYCP + behaviours.py: QmYsRchFNceEuwxkHFopENAR7nMFfZ5JLwtVXceM1jVkk3 + dialogues.py: QmPNoMrAPBQb8ib5uwxxMXd8U8nG81uXt4no6WStS3pNob + game.py: QmQwskD5DBVNv1ouRpqGNLb3zQ5krLUcR6XXHUcJ5EVc8L + handlers.py: QmSXVdtLYeHkabpp8ZqSrqwywhQvT4EwfiYqWyWoF52GNr + parameters.py: QmVMNP52fPxkzEbXPhXtQXspnaj2f4ErZNcNdPAqv4cvwq fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index affbbbc4be..a1d99e1e51 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -34,10 +34,10 @@ fetchai/connections/tcp,QmU93B7yajCHwXsgDXXhv1uSuXi7VmFBhdahcFosbrr6nA fetchai/connections/webhook,QmaJunWQT1ypkqGnzrj5gYjjQBywjTHJmyktCZXZsa8hv8 fetchai/contracts/erc1155,QmUupRwnza2KZBGULZ62xQREtkuQbYUrt1W8NbYZJuqbNt fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 -fetchai/protocols/contract_api,QmaxhJetT4GQ1A2ctbxxWQLvLny6LZykFnXEt2yDVb4sKJ +fetchai/protocols/contract_api,Qmak7HCvxTTY5XD5XkTNnn8g4uqqKwyxka9Aghm7tsRdmJ fetchai/protocols/default,QmXAdTynqPF8kYFsRZzxigVh3LYZJ8FSGEPEmNPDLoyHmM fetchai/protocols/fipa,Qmb3GXxbEQ23sZ1d7HsmrvchLwPfsEcDAbpLLjRTYxdJDm -fetchai/protocols/gym,Qmaj7TByBrHvbecUzWmuy96t7W8iocsD3gKunWZZSLTF5b +fetchai/protocols/gym,Qma7tTmiH5LFWCCUCcGMLP7G4DUhUZKbHSSH6BcB4qm4Vx fetchai/protocols/http,QmZJVqY2cxjky6p3o76TUemSsFDws8Dx33voG9WMdrKcry fetchai/protocols/ledger_api,Qmak3uKpeSfT5f4oqes3oUcNSg7vy7WKE2tUmSu8CZUNJ5 fetchai/protocols/ml_trade,QmNVZvbcgERSypYUopKMHvd6F8B81rQqtLVqUvzMeEEwJN @@ -52,7 +52,7 @@ fetchai/skills/carpark_client,QmV3vHmx4sDaecBq56L6kMD2K6JorNq4fTVC2X2NqqdUFP fetchai/skills/carpark_detection,QmSMoWJggZdTF3p4Y7CRUj94U9fny9tbPqJg5dZSDzUCFp fetchai/skills/echo,QmVRzFQnq22j7tcWK6MiD9q8Vs6mAAJhY3FrRE4CfJQ1D2 fetchai/skills/erc1155_client,Qma5wTx1huj5DAcsBkRwCvZVczRREwyUawVJhyaC4UTrRE -fetchai/skills/erc1155_deploy,QmPPHF6PUzRbeRCwy4m73oykUbTcNb1cGSoco5tSjcpVoB +fetchai/skills/erc1155_deploy,QmRf1zDk9jqibdfV2iZACNCnypCYz74sAPvukprVcHQH4Y fetchai/skills/error,QmanfpyCmvUkqG9xsEyWULvi1ZZzqvggvs9LnQvSjuRhLb fetchai/skills/generic_buyer,QmR2xrE8RJMmtHPRw8sjH1RxY459958MDZNkUur6cvgSsg fetchai/skills/generic_seller,QmQYVjJ1NnTTzLPxf2yXGkwHbCBADDJCUjCjBH2NpvG2pB @@ -62,8 +62,8 @@ fetchai/skills/ml_data_provider,QmdgxfES4XpmREpp9QqPQRMH9TvTF9nZ21zKM5RHLGCLke fetchai/skills/ml_train,QmbRQZz1MPXXuWyNW3BqhcsZKtZPhYakxGkVrBswNTgfk9 fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmeckN8mcKLeqmJoQfdYqPsJ49nbxxwBhYPhjkTS99v1De -fetchai/skills/tac_control,QmYCCU6RsvwqmjTRM3Nx8H99HhJXEFuinJSeG3UcjDubYH -fetchai/skills/tac_control_contract,QmNz5pNPvS7LBUMdjVPrRAFgJbaD2xTL1HJQnCoYK3Va4J +fetchai/skills/tac_control,QmfXLQLFVcdiQdqEHWacQ5bogWxok8B95pbfuCbD1gCwEA +fetchai/skills/tac_control_contract,QmcU4n3kRrtD6eUmMiNiph512NqRhouhbTPLcv6LNzqBAD fetchai/skills/tac_negotiation,QmRCZWxUh6mkaBsa1CYNk3fmNKzSVxfiqwYGbzU1E3672F fetchai/skills/tac_participation,QmWBATSrN9J3XoqMJ89iniMnMDZZpLqoenWTigukaDasQG fetchai/skills/thermometer,QmWSFjntE9MvLpqUTfJrx4FxnG7ZSGQifoTft9mJ9MiPYt From 2a557b9a6a82483c08414d269b0e287cac1d0590 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Tue, 22 Sep 2020 08:29:06 +0100 Subject: [PATCH 043/131] fix tac_controller_contract agent package --- .../agents/tac_controller_contract/aea-config.yaml | 10 +++++++--- packages/hashes.csv | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index caa12bbff0..2e07b3d14e 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -8,19 +8,23 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/oef:0.9.0 +- fetchai/p2p_libp2p:0.10.0 +- fetchai/soef:0.8.0 - fetchai/stub:0.9.0 contracts: - fetchai/erc1155:0.10.0 protocols: +- fetchai/contract_api:0.5.0 - fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 +- fetchai/ledger_api:0.3.0 - fetchai/oef_search:0.6.0 +- fetchai/signing:0.3.0 - fetchai/tac:0.6.0 skills: - fetchai/error:0.5.0 +- fetchai/tac_control:0.7.0 - fetchai/tac_control_contract:0.9.0 -default_connection: fetchai/oef:0.9.0 +default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: ethereum logging_config: disable_existing_loggers: false diff --git a/packages/hashes.csv b/packages/hashes.csv index a1d99e1e51..61607e215f 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -12,7 +12,7 @@ fetchai/agents/ml_model_trainer,Qmbk9YkJ7AX4VPcxS1anFU1sEgcU8oZn5fbSv2KuErBWMW fetchai/agents/my_first_aea,QmdYThnxTmqZizzvJvYH1HmnT5HKn5MsprkkHA8k3dgDPZ fetchai/agents/simple_service_registration,QmWKm97p72CSV9A9i4yrVi5ucWhw2jqAurbBE8xkuwHLSQ fetchai/agents/tac_controller,QmSLFA3m31SB45De8SEYixvAGkPcpv6dqtKKkssTW97HpB -fetchai/agents/tac_controller_contract,QmXY3FHDmK8RYh6Hb4aodxzjuG1d5iggn6UtnoJph8wvVE +fetchai/agents/tac_controller_contract,QmfNud5bgycNQY2qKzVBZ27heZHq2YptWN9kLNYWMX68N3 fetchai/agents/tac_participant,Qme3EP7MYHKre7GK2X5jZ4Pq973DaJPfpPXZX64gtp5iUk fetchai/agents/thermometer_aea,QmZzUqFVaDNGfwPnq5EvfPKNoMSfGzgpBic2z8HHWfu1RE fetchai/agents/thermometer_client,QmfMjh5gCDrdipCDYYrAr7jRDXJ2CpfWFij9t6J4EKdXYT From 15a3e5de8d718b577544c9336c069af4a380d9b2 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Tue, 22 Sep 2020 08:35:41 +0100 Subject: [PATCH 044/131] fix parsing of version info --- scripts/update_package_versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update_package_versions.py b/scripts/update_package_versions.py index 665d92f333..f93aba08c3 100644 --- a/scripts/update_package_versions.py +++ b/scripts/update_package_versions.py @@ -313,7 +313,7 @@ def _sort_in_update_order(package_ids: Set[PackageId]) -> List[PackageId]: return sorted( package_ids, key=lambda x: ( - semver.VersionInfo(x.public_id.version), + semver.VersionInfo.parse(x.public_id.version), x.public_id, x.package_type, ), From 878bad927430f14b915a1b22081c9f6b902f565f Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Tue, 22 Sep 2020 11:33:48 +0300 Subject: [PATCH 045/131] agents manager interface --- aea/manager.py | 151 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 aea/manager.py diff --git a/aea/manager.py b/aea/manager.py new file mode 100644 index 0000000000..bbb289d858 --- /dev/null +++ b/aea/manager.py @@ -0,0 +1,151 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2018-2020 Fetch.AI Limited +# +# 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. +# +# ------------------------------------------------------------------------------ +"""This module contains the implementation of AEA agents manager.""" +from abc import ABC, abstractmethod +from typing import Dict, List + +from aea.aea_builder import PathLike +from aea.configurations.base import PublicId + + +class AbstractManager(ABC): + """Abstract agents manager.""" + + def __init__(self, working_dir: PathLike) -> None: + """ + Initialize manager. + + :param working_dir: directory to store base agents. + """ + self.working_dir = working_dir + + @abstractmethod + def start_manager(self) -> None: + """Start manager.""" + + @abstractmethod + def stop_manager(self, cleanup: bool = False) -> None: + """ + Stop manager. + + Stops all running agents and stop agent. + + :param cleanup: remove agents_dir and purge in memory registry. + + :return: None + """ + + @abstractmethod + def add_project(self, public_id: PublicId) -> None: + """Fetch agent project and all dependencies to working_dir.""" + + @abstractmethod + def remove_project(self, public_id: PublicId) -> None: + """Remove agent project.""" + + @abstractmethod + def list_projects(self) -> List[PublicId]: + """ + List all agents projects added. + + :return: lit of public ids of projects + """ + + @abstractmethod + def add_agent( + self, project_id: PublicId, agent_name: str, config_overrides: Dict + ) -> None: + """ + Create new agent configuration based on project with config overrides applied. + + Alias is stored in memory only! + + :param project_id: base agent public id + :param agent_name: unique name for the agent + :param config_overrides: overrides for component section. + + :return: None + """ + + @abstractmethod + def list_agents(self, running_only: bool = False) -> List[str]: + """ + List all agents. + + :param running_only: returns only running if set to True + + :return: list of agents names + """ + + @abstractmethod + def remove_agent(self, agent_name: str) -> None: + """ + Remove agent alias definition from registry. + + :param agent_name: agent name to remove + + :return: None + """ + + @abstractmethod + def start_agent(self, agent_name: str) -> None: + """ + Start selected agent. + + :param agent_name: agent name to start + + :return: None + """ + + @abstractmethod + def start_all_agents(self) -> None: + """ + Start all not started agents. + + :return: None + """ + + @abstractmethod + def stop_agent(self, agent_name: str) -> None: + """ + Stop running agent. + + :param agent_name: agent name to stop + + :return: None + """ + + @abstractmethod + def stop_all_agents(self) -> None: + """ + Stop all agents running. + + :return: None + """ + + @abstractmethod + def get_agent_details(self, agent_name: str) -> dict: + """ + Return details about agent definition. + + { + "project": str + "overrides": dict + } + """ From 905fe8ced85d2acc7d1ea252fcd15799ead85437 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 22 Sep 2020 12:19:13 +0200 Subject: [PATCH 046/131] add tests for registry.base --- tests/test_registries/test_base.py | 79 ++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/tests/test_registries/test_base.py b/tests/test_registries/test_base.py index d198068de4..09dc54f064 100644 --- a/tests/test_registries/test_base.py +++ b/tests/test_registries/test_base.py @@ -50,6 +50,7 @@ AgentComponentRegistry, ComponentRegistry, HandlerRegistry, + PublicIdRegistry, ) from aea.registries.resources import Resources from aea.skills.base import Skill @@ -545,6 +546,10 @@ def setup_class(self): """Set up the test.""" self.registry = AgentComponentRegistry() + def test_ids(self): + """Test all ids getter.""" + assert self.registry.ids() == set() + def test_register_when_component_is_already_registered(self): """Test AgentComponentRegistry.register when the component is already registered.""" component_id = ComponentId( @@ -609,6 +614,23 @@ def setup_class(self): """Set up the tests.""" self.registry = ComponentRegistry() + def test_ids(self): + """Test the getter of all ids.""" + assert self.registry.ids() == set() + + def test_ids_non_empty(self): + """Test ids, non-empty case.""" + dummy_skill = Skill.from_dir( + Path(CUR_PATH, "data", "dummy_skill"), agent_context=MagicMock(), + ) + behaviour = next(iter(dummy_skill.behaviours.values())) + skill_component_id = (dummy_skill.public_id, behaviour.name) + self.registry.register(skill_component_id, behaviour) + + assert self.registry.ids() == {skill_component_id} + + self.registry.unregister(skill_component_id) + def test_unregister_when_item_not_registered(self): """Test 'unregister' in case the item is not registered.""" with pytest.raises(ValueError): @@ -668,6 +690,23 @@ def setup_class(cls): """Set up the tests.""" cls.registry = HandlerRegistry() + def test_fetch_skill_id_not_present(self): + """Test fetch, negative case for skill id..""" + # register an item + protocol_id = MagicMock() + protocol_id.package_version.is_latest = False + skill_id = MagicMock() + skill_id.package_version.is_latest = False + handler_name = "handler" + handler_mock = MagicMock(name=handler_name, SUPPORTED_PROTOCOL=protocol_id) + self.registry.register((skill_id, handler_name), handler_mock) + + # fetch an item with right protocol but unknown skill id + result = self.registry.fetch_by_protocol_and_skill(protocol_id, MagicMock()) + assert result is None + + self.registry.unregister((skill_id, handler_name)) + def test_register_and_unregister_dynamically(self): """Test register when protocol id is None.""" assert len(self.registry._dynamically_added) == 0 @@ -733,3 +772,43 @@ def test_unregister_by_skill(self): ValueError, match="No component of skill .* present in the registry." ): self.registry.unregister_by_skill(skill_id) + + +class TestPublicIdRegistry: + """Tests for the public id registry class.""" + + @classmethod + def setup_class(cls): + """Set up the class.""" + cls.registry = PublicIdRegistry() + + def test_register_fails_when_version_latest(self): + """Test that version 'latest' are not allowed for registration.""" + public_id = PublicId("author", "package", "latest") + with pytest.raises( + ValueError, + match=f"Cannot register item with public id 'latest': {public_id}", + ): + self.registry.register(public_id, MagicMock()) + + def test_register_fails_when_already_registered(self): + """Test that register fails when the same public id is already registered.""" + public_id = PublicId("author", "package", "0.1.0") + self.registry._public_id_to_item[public_id] = MagicMock() + with pytest.raises( + ValueError, match=f"Item already registered with item id '{public_id}'" + ): + self.registry.register(public_id, MagicMock()) + self.registry._public_id_to_item.pop(public_id) + + def test_unregister_fails_when_item_not_registered(self): + """Test that unregister fails when the item is not registered..""" + public_id = PublicId("author", "package", "0.1.0") + with pytest.raises( + ValueError, match=f"No item registered with item id '{public_id}'" + ): + self.registry.unregister(public_id) + + def test_fetch_none(self): + """Test fetch, negative case.""" + assert self.registry.fetch(MagicMock()) is None From aa955115953d56ee082d6cbb0c9eb5fc77c3b2a6 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 22 Sep 2020 12:37:57 +0200 Subject: [PATCH 047/131] fix import order --- tests/test_cli/test_remove/test_base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_cli/test_remove/test_base.py b/tests/test_cli/test_remove/test_base.py index 7f4f797f8e..036bdc6b0d 100644 --- a/tests/test_cli/test_remove/test_base.py +++ b/tests/test_cli/test_remove/test_base.py @@ -20,9 +20,8 @@ import os from unittest import TestCase, mock -from click import ClickException - import pytest +from click import ClickException from aea.cli.remove import remove_item from aea.configurations.base import PublicId From b3ceb4369df350f6b2f3741aee0b614c76fdd575 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Tue, 22 Sep 2020 12:36:10 +0100 Subject: [PATCH 048/131] fix agents project dependencies tac --- .../tac_controller_contract/aea-config.yaml | 5 +++ .../fetchai/skills/tac_control/helpers.py | 12 +++--- .../fetchai/skills/tac_control/parameters.py | 40 +++++++++++-------- .../fetchai/skills/tac_control/skill.yaml | 11 +++-- .../skills/tac_control_contract/behaviours.py | 6 +-- .../skills/tac_control_contract/skill.yaml | 7 ++-- packages/hashes.csv | 6 +-- 7 files changed, 50 insertions(+), 37 deletions(-) diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index 2e07b3d14e..5e20c223bc 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -8,6 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: +- fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.8.0 - fetchai/stub:0.9.0 @@ -31,3 +32,7 @@ logging_config: version: 1 private_key_paths: {} registry_path: ../packages +default_routing: + fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/ledger_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 diff --git a/packages/fetchai/skills/tac_control/helpers.py b/packages/fetchai/skills/tac_control/helpers.py index 1e830f35ad..585a9edb10 100644 --- a/packages/fetchai/skills/tac_control/helpers.py +++ b/packages/fetchai/skills/tac_control/helpers.py @@ -21,7 +21,7 @@ """This module contains the helpers methods for the controller agent.""" import random -from typing import Dict, List, Optional, Tuple, cast +from typing import Dict, List, Tuple, cast import numpy as np @@ -64,7 +64,7 @@ def generate_currency_ids(nb_currencies: int) -> List[int]: def generate_currency_id_to_name( - nb_currencies: int, currency_ids: Optional[List[int]] = None + nb_currencies: int, currency_ids: List[int] ) -> Dict[str, str]: """ Generate a dictionary mapping good ids to names. @@ -73,7 +73,7 @@ def generate_currency_id_to_name( :param currency_ids: the currency ids :return: a dictionary mapping currency's ids to names. """ - if currency_ids is not None: + if currency_ids != []: enforce( len(currency_ids) == nb_currencies, "Length of currency_ids does not match nb_currencies.", @@ -87,9 +87,7 @@ def generate_currency_id_to_name( return currency_id_to_name -def generate_good_id_to_name( - nb_goods: int, good_ids: Optional[List[int]] = None -) -> Dict[str, str]: +def generate_good_id_to_name(nb_goods: int, good_ids: List[int]) -> Dict[str, str]: """ Generate a dictionary mapping good ids to names. @@ -97,7 +95,7 @@ def generate_good_id_to_name( :param good_ids: a list of good ids :return: a dictionary mapping goods' ids to names. """ - if good_ids is not None: + if good_ids != []: enforce( len(good_ids) == nb_goods, "Length of good_ids does not match nb_goods." ) diff --git a/packages/fetchai/skills/tac_control/parameters.py b/packages/fetchai/skills/tac_control/parameters.py index a5da9ae09a..729c8f1e03 100644 --- a/packages/fetchai/skills/tac_control/parameters.py +++ b/packages/fetchai/skills/tac_control/parameters.py @@ -40,7 +40,7 @@ DEFAULT_BASE_GOOD_ENDOWMENT = 2 DEFAULT_LOWER_BOUND_FACTOR = 1 DEFAULT_UPPER_BOUND_FACTOR = 1 -DEFAULT_START_TIME = "01 01 2020 00:01" +DEFAULT_REGISTRATION_START_TIME = "01 01 2020 00:01" DEFAULT_REGISTRATION_TIMEOUT = 60 DEFAULT_ITEM_SETUP_TIMEOUT = 60 DEFAULT_COMPETITION_TIMEOUT = 300 @@ -58,10 +58,8 @@ def __init__(self, **kwargs): self._contract_address = kwargs.pop( "contract_adress", None ) # type: Optional[str] - self._good_ids = kwargs.pop("good_ids", None) # type: Optional[List[int]] - self._currency_ids = kwargs.pop( - "currency_ids", None - ) # type: Optional[List[int]] + self._good_ids = kwargs.pop("good_ids", []) # type: List[int] + self._currency_ids = kwargs.pop("currency_ids", []) # type: List[int] self._min_nb_agents = kwargs.pop( "min_nb_agents", DEFAULT_MIN_NB_AGENTS ) # type: int @@ -82,9 +80,11 @@ def __init__(self, **kwargs): self._upper_bound_factor = kwargs.pop( "upper_bound_factor", DEFAULT_UPPER_BOUND_FACTOR ) # type: int - start_time = kwargs.pop("start_time", DEFAULT_START_TIME) # type: str - self._start_time = datetime.datetime.strptime( - start_time, "%d %m %Y %H:%M" + registration_start_time = kwargs.pop( + "registration_start_time", DEFAULT_REGISTRATION_START_TIME + ) # type: str + self._registration_start_time = datetime.datetime.strptime( + registration_start_time, "%d %m %Y %H:%M" ) # type: datetime.datetime self._registration_timeout = kwargs.pop( "registration_timeout", DEFAULT_REGISTRATION_TIMEOUT @@ -125,6 +125,16 @@ def __init__(self, **kwargs): self.nb_currencies, self.currency_ids ) self._good_id_to_name = generate_good_id_to_name(self.nb_goods, self.good_ids) + self._registration_end_time = ( + self._registration_start_time + + datetime.timedelta(seconds=self._registration_timeout) + ) + self._start_time = self._registration_end_time + datetime.timedelta( + seconds=self._item_setup_timeout + ) + self._end_time = self._start_time + datetime.timedelta( + seconds=self._competition_timeout + ) now = datetime.datetime.now() if now > self.registration_start_time: self.context.logger.warning( @@ -169,12 +179,12 @@ def is_contract_deployed(self) -> bool: return self._contract_address is not None @property - def good_ids(self) -> Optional[List[int]]: + def good_ids(self) -> List[int]: """The item ids of an already deployed smart-contract.""" return self._good_ids @property - def currency_ids(self) -> Optional[List[int]]: + def currency_ids(self) -> List[int]: """The currency ids of an already deployed smart-contract.""" return self._currency_ids @@ -231,16 +241,12 @@ def upper_bound_factor(self) -> int: @property def registration_start_time(self) -> datetime.datetime: """TAC registration start time.""" - return ( - self._start_time - - datetime.timedelta(seconds=self._item_setup_timeout) - - datetime.timedelta(seconds=self._registration_timeout) - ) + return self._registration_start_time @property def registration_end_time(self) -> datetime.datetime: """TAC registration end time.""" - return self._start_time - datetime.timedelta(seconds=self._item_setup_timeout) + return self._registration_end_time @property def start_time(self) -> datetime.datetime: @@ -250,7 +256,7 @@ def start_time(self) -> datetime.datetime: @property def end_time(self) -> datetime.datetime: """TAC end time.""" - return self._start_time + datetime.timedelta(seconds=self._competition_timeout) + return self._end_time @property def inactivity_timeout(self): diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index e706c33ac8..222032e936 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -13,8 +13,8 @@ fingerprint: dialogues.py: QmcVYVTZ95UKBnXzmKyGLo5LwSVcGYUTrifosQMSpzNnCX game.py: QmNt16GHaJHtsw3tSS165RLU8pNtvdMbKJqEkMRdjZn3rS handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW - helpers.py: QmSh5DfkfsdAHQ7RnR5MHZaeJacVSPQqHMzESZg5mcUbFC - parameters.py: QmQkA45jEp5EK5GoD7TaVrckozGY8uTr9f3j4E6pzg72af + helpers.py: QmZC2qWz5RW7HEHQiUAH48a8awomtzsm6PBZvaGTHEHwxy + parameters.py: QmNsjTrXyXezUrdtwRb9tCiEULSgHeFxmemqxFn5bW3Hqn fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 @@ -47,7 +47,11 @@ models: args: base_good_endowment: 2 competition_timeout: 180 + currency_ids: [] + good_ids: [] inactivity_timeout: 60 + item_setup_timeout: 0 + ledger_id: ethereum location: latitude: 0.127 longitude: 51.5194 @@ -55,11 +59,11 @@ models: min_nb_agents: 2 money_endowment: 2000000 nb_goods: 10 + registration_start_time: 01 01 2020 00:01 registration_timeout: 60 service_data: key: tac value: v1 - start_time: 01 01 2020 00:01 tx_fee: 1 upper_bound_factor: 1 whitelist: [] @@ -69,3 +73,4 @@ models: class_name: TacDialogues dependencies: numpy: {} +is_abstract: true diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 7cc5a46586..ad695feb24 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -70,7 +70,7 @@ def _request_contract_deploy_transaction(self) -> None: performative=ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION, ledger_id=parameters.ledger_id, contract_id="fetchai/erc1155:0.10.0", - callable=ContractApiDialogue.Callable.GET_DEPLOY_TRANSACTION, + callable=ContractApiDialogue.Callable.GET_DEPLOY_TRANSACTION.value, kwargs=ContractApiMessage.Kwargs( {"deployer_address": self.context.agent_address} ), @@ -157,7 +157,7 @@ def _request_create_items_transaction(self, game: Game) -> None: performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, ledger_id=parameters.ledger_id, contract_id="fetchai/erc1155:0.10.0", - callable=ContractApiDialogue.Callable.GET_CREATE_BATCH_TRANSACTION, + callable=ContractApiDialogue.Callable.GET_CREATE_BATCH_TRANSACTION.value, kwargs=ContractApiMessage.Kwargs( {"deployer_address": self.context.agent_address, "token_ids": token_ids} ), @@ -193,7 +193,7 @@ def _request_mint_items_transaction(self, game: Game) -> None: ledger_id=parameters.ledger_id, contract_id="fetchai/erc1155:0.10.0", contract_address=parameters.contract_address, - callable=ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION, + callable=ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION.value, kwargs=ContractApiMessage.Kwargs( { "deployer_address": self.context.agent_address, diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index f96d6b1a99..bfd9c0a987 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,7 +9,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUiw6Dt97mXLzSizbnMNTsfLy3edGXKdYTNR5bke6sFsm __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmYsRchFNceEuwxkHFopENAR7nMFfZ5JLwtVXceM1jVkk3 + behaviours.py: QmbvhAKsmhr1aYdrKtcN3P1PpihSFxpTQXrRyGoFnTFqPa dialogues.py: QmPNoMrAPBQb8ib5uwxxMXd8U8nG81uXt4no6WStS3pNob game.py: QmQwskD5DBVNv1ouRpqGNLb3zQ5krLUcR6XXHUcJ5EVc8L handlers.py: QmSXVdtLYeHkabpp8ZqSrqwywhQvT4EwfiYqWyWoF52GNr @@ -69,7 +69,7 @@ models: good_ids: [] inactivity_timeout: 60 item_setup_timeout: 120 - ledger: ethereum + ledger_id: ethereum location: latitude: 0.127 longitude: 51.5194 @@ -77,14 +77,13 @@ models: min_nb_agents: 2 money_endowment: 2000000 nb_goods: 10 + registration_start_time: 01 01 2020 00:01 registration_timeout: 60 service_data: key: tac value: v1 - start_time: 09 03 2020 15:15 tx_fee: 1 upper_bound_factor: 1 - version_id: v1 whitelist: [] class_name: Parameters signing_dialogues: diff --git a/packages/hashes.csv b/packages/hashes.csv index 61607e215f..90e6d12884 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -12,7 +12,7 @@ fetchai/agents/ml_model_trainer,Qmbk9YkJ7AX4VPcxS1anFU1sEgcU8oZn5fbSv2KuErBWMW fetchai/agents/my_first_aea,QmdYThnxTmqZizzvJvYH1HmnT5HKn5MsprkkHA8k3dgDPZ fetchai/agents/simple_service_registration,QmWKm97p72CSV9A9i4yrVi5ucWhw2jqAurbBE8xkuwHLSQ fetchai/agents/tac_controller,QmSLFA3m31SB45De8SEYixvAGkPcpv6dqtKKkssTW97HpB -fetchai/agents/tac_controller_contract,QmfNud5bgycNQY2qKzVBZ27heZHq2YptWN9kLNYWMX68N3 +fetchai/agents/tac_controller_contract,QmWQRysyhhATUqxRxrAqvEvcdjzCiDGkZDzp7f7yvRTAz4 fetchai/agents/tac_participant,Qme3EP7MYHKre7GK2X5jZ4Pq973DaJPfpPXZX64gtp5iUk fetchai/agents/thermometer_aea,QmZzUqFVaDNGfwPnq5EvfPKNoMSfGzgpBic2z8HHWfu1RE fetchai/agents/thermometer_client,QmfMjh5gCDrdipCDYYrAr7jRDXJ2CpfWFij9t6J4EKdXYT @@ -62,8 +62,8 @@ fetchai/skills/ml_data_provider,QmdgxfES4XpmREpp9QqPQRMH9TvTF9nZ21zKM5RHLGCLke fetchai/skills/ml_train,QmbRQZz1MPXXuWyNW3BqhcsZKtZPhYakxGkVrBswNTgfk9 fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmeckN8mcKLeqmJoQfdYqPsJ49nbxxwBhYPhjkTS99v1De -fetchai/skills/tac_control,QmfXLQLFVcdiQdqEHWacQ5bogWxok8B95pbfuCbD1gCwEA -fetchai/skills/tac_control_contract,QmcU4n3kRrtD6eUmMiNiph512NqRhouhbTPLcv6LNzqBAD +fetchai/skills/tac_control,QmTcQU7qs8toZMB4KgpxbcBiQj8Eucytq48XP4tGGTYPDD +fetchai/skills/tac_control_contract,QmahExwhU8sYaZC7PGD1ShrPNdzAM4AEPZ6eGhsrQk8umk fetchai/skills/tac_negotiation,QmRCZWxUh6mkaBsa1CYNk3fmNKzSVxfiqwYGbzU1E3672F fetchai/skills/tac_participation,QmWBATSrN9J3XoqMJ89iniMnMDZZpLqoenWTigukaDasQG fetchai/skills/thermometer,QmWSFjntE9MvLpqUTfJrx4FxnG7ZSGQifoTft9mJ9MiPYt From 0bdefc23153d2caf304e994e960cc88a11f0e030 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 22 Sep 2020 14:06:36 +0200 Subject: [PATCH 049/131] Update version bumper script. - compute ambiguous public ids from all the package ids, and not only from those being updated; - fix the check of whether a file should be processed or not. Earlier, it was only occurrence of public id; now we also check if the current file is a protocol README and if there is a protocol specification. - improve debugging messages --- scripts/update_package_versions.py | 159 ++++++++++++++++++----------- 1 file changed, 97 insertions(+), 62 deletions(-) diff --git a/scripts/update_package_versions.py b/scripts/update_package_versions.py index f93aba08c3..baadd5a3df 100644 --- a/scripts/update_package_versions.py +++ b/scripts/update_package_versions.py @@ -61,6 +61,17 @@ PUBLIC_ID_REGEX = PublicId.PUBLIC_ID_REGEX[1:-1] +def get_protocol_specification_header_regex(public_id: PublicId) -> re.Pattern: + """Get the regex to match.""" + return re.compile( + rf"(name: {public_id.name}\n" + + rf"author: {public_id.author}\n)" + + rf"version: {public_id.version}\n" + + rf"(description:)", + re.MULTILINE, + ) + + def check_positive(value): """Check value is an int.""" try: @@ -71,29 +82,33 @@ def check_positive(value): return ivalue -parser = argparse.ArgumentParser() -parser.add_argument( - "-n", - "--no-interactive", - action="store_true", - default=False, - help="Don't ask user confirmation for replacement.", -) -parser.add_argument( - "-C", - "--context", - type=check_positive, - default=3, - help="The number of above/below rows to display", -) - -parser.add_argument( - "-r", - "--replace-by-default", - action="store_true", - default=False, - help="If --no-interactive is set, apply the replacement (default: False).", -) +def parse_arguments(): + """Parse command-line arguments.""" + parser = argparse.ArgumentParser() + parser.add_argument( + "-n", + "--no-interactive", + action="store_true", + default=False, + help="Don't ask user confirmation for replacement.", + ) + parser.add_argument( + "-C", + "--context", + type=check_positive, + default=3, + help="The number of above/below rows to display", + ) + + parser.add_argument( + "-r", + "--replace-by-default", + action="store_true", + default=False, + help="If --no-interactive is set, apply the replacement (default: False).", + ) + return parser.parse_args() + arguments: argparse.Namespace = None # type: ignore @@ -219,6 +234,20 @@ def public_id_in_registry(type_: str, name: str) -> PublicId: return highest +def get_all_package_ids() -> Set[PackageId]: + """Get all the package ids in the local repository.""" + result: Set[PackageId] = set() + now = get_hashes_from_current_release() + now_by_type = split_hashes_by_type(now) + for type_, name_to_hashes in now_by_type.items(): + for name, _ in name_to_hashes.items(): + configuration_file_path = get_configuration_file_path(type_, name) + public_id = get_public_id_from_yaml(configuration_file_path) + package_id = PackageId(PackageType(type_[:-1]), public_id) + result.add(package_id) + return result + + def get_public_ids_to_update() -> Set[PackageId]: """ Get all the public ids to be updated. @@ -260,38 +289,29 @@ def get_public_ids_to_update() -> Set[PackageId]: deployed_public_id = public_id_in_registry(type_, name) difference = minor_version_difference(current_public_id, deployed_public_id) # check if the public ids of the local package and the package in the registry are already the same. + package_info = f"Package `{name}` of type `{type_}`" + public_id_info = f"current id `{current_public_id}` and deployed id `{deployed_public_id}`" if difference == 0: - print( - "Package `{}` of type `{}` needs to be bumped!".format(name, type_) - ) + print(f"{package_info} needs to be bumped!") result.add(PackageId(type_[:-1], current_public_id)) elif difference == 1: - print( - "Package `{}` of type `{}` already at correct version!".format( - name, type_ - ) - ) + print(f"{package_info} already at correct version!") continue else: - print( - "Package `{}` of type `{}` has current id `{}` and deployed id `{}`. Error!".format( - name, type_, current_public_id, deployed_public_id - ) - ) + print(f"{package_info} has {public_id_info}. Error!") sys.exit(1) return result -def _get_ambiguous_public_ids( - all_package_ids_to_update: Set[PackageId], -) -> Set[PublicId]: +def _get_ambiguous_public_ids() -> Set[PublicId]: """Get the public ids that are the public ids of more than one package id.""" + all_package_ids = get_all_package_ids() return set( map( operator.itemgetter(0), filter( - lambda x: x[1] > 1, - Counter(id_.public_id for id_ in all_package_ids_to_update).items(), + lambda x: x[0].name != "scaffold" and x[1] > 1, + Counter(id_.public_id for id_ in all_package_ids).items(), ), ) ) @@ -314,30 +334,34 @@ def _sort_in_update_order(package_ids: Set[PackageId]) -> List[PackageId]: package_ids, key=lambda x: ( semver.VersionInfo.parse(x.public_id.version), - x.public_id, + x.public_id.author, + x.public_id.name, x.package_type, ), reverse=True, ) -def process_packages(all_package_ids_to_update: Set[PackageId]) -> bool: +def process_packages( + all_package_ids_to_update: Set[PackageId], ambiguous_public_ids: Set[PublicId] +) -> None: """Process the package versions.""" - is_bumped = False - ambiguous_public_ids = _get_ambiguous_public_ids(all_package_ids_to_update) print("*" * 100) - print("Start processing.") - print( - f"Ambiguous public ids: {pprint.pformat(list(map(lambda x: '/'.join(str(x)), ambiguous_public_ids)))}" + + conflicts = {p.public_id for p in all_package_ids_to_update}.intersection( + ambiguous_public_ids ) + print(f"Ambiguous public ids: {pprint.pformat(ambiguous_public_ids)}") + print(f"Conflicts with public ids to update: {pprint.pformat(conflicts)}",) + + print("*" * 100) + print("Start processing.") sorted_package_ids_list = _sort_in_update_order(all_package_ids_to_update) for package_id in sorted_package_ids_list: print("#" * 50) print(f"Processing {package_id}") is_ambiguous = package_id.public_id in ambiguous_public_ids process_package(package_id, is_ambiguous) - is_bumped = True - return is_bumped def minor_version_difference( @@ -532,18 +556,25 @@ def replace_in_protocol_readme( :return: the new content. """ if ( - type_ == fp.parent.parent == "protocols" + type_ == fp.parent.parent.name == "protocols" and fp.name == "README.md" - and fp.parent == old_public_id.name + and fp.parent.name == old_public_id.name ): - regex = re.compile( - rf"(name: {old_public_id.name}\nauthor: {old_public_id.author}\n)version: {old_public_id.version}\n(description:)", - re.MULTILINE, - ) + regex = get_protocol_specification_header_regex(old_public_id) content = regex.sub(rf"\g<1>version: {new_public_id.version}\n\g<2>", content) return content +def file_should_be_processed(content: str, old_public_id: PublicId): + """Check if the file should be processed.""" + old_string = str(old_public_id) + return ( + old_string in content + or get_protocol_specification_header_regex(old_public_id).search(content) + is not None + ) + + def inplace_change( fp: Path, old_public_id: PublicId, @@ -554,11 +585,11 @@ def inplace_change( """Replace the occurrence of a string with a new one in the provided file.""" content = fp.read_text() - old_string = str(old_public_id) - new_string = str(new_public_id) - if old_string not in content: + if not file_should_be_processed(content, old_public_id): return + old_string = str(old_public_id) + new_string = str(new_public_id) print( f"Processing file {fp} for replacing {old_string} with {new_string} (is_ambiguous: {is_ambiguous})" ) @@ -611,8 +642,12 @@ def process_package(package_id: PackageId, is_ambiguous: bool) -> None: def run_once() -> bool: """Run the upgrade logic once.""" all_package_ids_to_update = get_public_ids_to_update() - is_bumped = process_packages(all_package_ids_to_update) - return is_bumped + if len(all_package_ids_to_update) == 0: + print("No packages to update. Done!") + return False + ambiguous_public_ids = _get_ambiguous_public_ids() + process_packages(all_package_ids_to_update, ambiguous_public_ids) + return True if __name__ == "__main__": @@ -620,7 +655,7 @@ def run_once() -> bool: First, check all hashes are up to date, exit if not. Then, run the bumping algo, re-hashing upon each bump. """ - arguments = parser.parse_args() + arguments = parse_arguments() run_hashing() check_if_running_allowed() while run_once(): From b74c7d2f4b9bda8f4c05972db77291e8174e1029 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 22 Sep 2020 15:07:25 +0200 Subject: [PATCH 050/131] fix lint checks --- scripts/update_package_versions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/update_package_versions.py b/scripts/update_package_versions.py index baadd5a3df..a93f1067f0 100644 --- a/scripts/update_package_versions.py +++ b/scripts/update_package_versions.py @@ -35,7 +35,7 @@ import sys from collections import Counter from pathlib import Path -from typing import Dict, List, Optional, Set +from typing import Dict, List, Optional, Pattern, Set import semver import yaml @@ -61,13 +61,13 @@ PUBLIC_ID_REGEX = PublicId.PUBLIC_ID_REGEX[1:-1] -def get_protocol_specification_header_regex(public_id: PublicId) -> re.Pattern: +def get_protocol_specification_header_regex(public_id: PublicId) -> Pattern: """Get the regex to match.""" return re.compile( rf"(name: {public_id.name}\n" + rf"author: {public_id.author}\n)" + rf"version: {public_id.version}\n" - + rf"(description:)", + + r"(description:)", re.MULTILINE, ) From 12c95528c9320c1e2436e1b7afc23cd05943b148 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Tue, 22 Sep 2020 15:10:44 +0100 Subject: [PATCH 051/131] bump versions --- aea/cli/interact.py | 2 +- aea/configurations/constants.py | 8 +- aea/protocols/default/README.md | 2 +- aea/protocols/default/message.py | 2 +- aea/protocols/default/protocol.yaml | 6 +- aea/protocols/signing/README.md | 2 +- aea/protocols/signing/message.py | 2 +- aea/protocols/signing/protocol.yaml | 6 +- aea/protocols/state_update/README.md | 2 +- aea/protocols/state_update/message.py | 2 +- aea/protocols/state_update/protocol.yaml | 6 +- aea/skills/error/skill.yaml | 4 +- docs/agent-vs-aea.md | 4 +- docs/aries-cloud-agent-demo.md | 16 +-- docs/build-aea-programmatically.md | 10 +- docs/car-park-skills.md | 12 +- docs/cli-vs-programmatic-aeas.md | 6 +- docs/config.md | 4 +- docs/connect-a-frontend.md | 2 +- docs/contract.md | 8 +- docs/core-components-1.md | 2 +- docs/deployment.md | 2 +- docs/erc1155-skills.md | 12 +- docs/generic-skills-step-by-step.md | 32 ++--- docs/generic-skills.md | 12 +- docs/http-connection-and-skill.md | 6 +- docs/language-agnostic-definition.md | 4 +- docs/logging.md | 4 +- docs/ml-skills.md | 12 +- docs/multiplexer-standalone.md | 4 +- docs/oef-ledger.md | 2 +- docs/orm-integration.md | 12 +- docs/protocol.md | 22 ++-- docs/questions-and-answers.md | 2 +- docs/quickstart.md | 10 +- docs/simple-oef-usage.md | 4 +- docs/skill-guide.md | 10 +- docs/skill.md | 4 +- docs/tac-skills-contract.md | 6 +- docs/tac-skills.md | 18 +-- docs/thermometer-skills.md | 12 +- docs/weather-skills.md | 12 +- .../agents/aries_alice/aea-config.yaml | 20 +-- .../agents/aries_faber/aea-config.yaml | 22 ++-- .../agents/car_data_buyer/aea-config.yaml | 16 +-- .../agents/car_detector/aea-config.yaml | 16 +-- .../agents/erc1155_client/aea-config.yaml | 18 +-- .../agents/erc1155_deployer/aea-config.yaml | 18 +-- .../agents/generic_buyer/aea-config.yaml | 16 +-- .../agents/generic_seller/aea-config.yaml | 16 +-- .../fetchai/agents/gym_aea/aea-config.yaml | 4 +- .../agents/ml_data_provider/aea-config.yaml | 16 +-- .../agents/ml_model_trainer/aea-config.yaml | 16 +-- .../agents/my_first_aea/aea-config.yaml | 8 +- .../aea-config.yaml | 12 +- .../agents/tac_controller/aea-config.yaml | 14 +- .../tac_controller_contract/aea-config.yaml | 14 +- .../agents/tac_participant/aea-config.yaml | 16 +-- .../agents/thermometer_aea/aea-config.yaml | 16 +-- .../agents/thermometer_client/aea-config.yaml | 16 +-- .../agents/weather_client/aea-config.yaml | 16 +-- .../agents/weather_station/aea-config.yaml | 16 +-- .../fetchai/connections/http_client/README.md | 2 +- .../connections/http_client/connection.py | 2 +- .../connections/http_client/connection.yaml | 10 +- .../fetchai/connections/http_server/README.md | 2 +- .../connections/http_server/connection.py | 2 +- .../connections/http_server/connection.yaml | 10 +- packages/fetchai/connections/ledger/README.md | 2 +- .../connections/ledger/connection.yaml | 6 +- .../fetchai/connections/local/connection.py | 4 +- .../fetchai/connections/local/connection.yaml | 6 +- packages/fetchai/connections/oef/README.md | 2 +- .../fetchai/connections/oef/connection.py | 4 +- .../fetchai/connections/oef/connection.yaml | 10 +- .../fetchai/connections/p2p_stub/README.md | 2 +- .../connections/p2p_stub/connection.py | 2 +- .../connections/p2p_stub/connection.yaml | 6 +- packages/fetchai/connections/soef/README.md | 4 +- .../fetchai/connections/soef/connection.py | 4 +- .../fetchai/connections/soef/connection.yaml | 10 +- packages/fetchai/connections/tcp/README.md | 2 +- packages/fetchai/connections/tcp/base.py | 2 +- .../fetchai/connections/tcp/connection.yaml | 6 +- .../fetchai/connections/webhook/README.md | 2 +- .../fetchai/connections/webhook/connection.py | 2 +- .../connections/webhook/connection.yaml | 10 +- packages/fetchai/protocols/fipa/README.md | 2 +- packages/fetchai/protocols/fipa/message.py | 2 +- packages/fetchai/protocols/fipa/protocol.yaml | 6 +- packages/fetchai/protocols/http/README.md | 2 +- packages/fetchai/protocols/http/message.py | 2 +- packages/fetchai/protocols/http/protocol.yaml | 6 +- .../fetchai/protocols/ledger_api/README.md | 2 +- .../fetchai/protocols/ledger_api/message.py | 2 +- .../protocols/ledger_api/protocol.yaml | 6 +- packages/fetchai/protocols/ml_trade/README.md | 2 +- .../fetchai/protocols/ml_trade/message.py | 2 +- .../fetchai/protocols/ml_trade/protocol.yaml | 6 +- .../fetchai/protocols/oef_search/README.md | 2 +- .../fetchai/protocols/oef_search/message.py | 2 +- .../protocols/oef_search/protocol.yaml | 6 +- packages/fetchai/protocols/tac/README.md | 2 +- packages/fetchai/protocols/tac/message.py | 2 +- packages/fetchai/protocols/tac/protocol.yaml | 6 +- .../fetchai/skills/aries_alice/skill.yaml | 8 +- .../fetchai/skills/aries_faber/skill.yaml | 8 +- .../fetchai/skills/carpark_client/skill.yaml | 8 +- .../skills/carpark_detection/skill.yaml | 8 +- packages/fetchai/skills/echo/skill.yaml | 4 +- .../fetchai/skills/erc1155_client/skill.yaml | 10 +- .../fetchai/skills/erc1155_deploy/skill.yaml | 10 +- .../fetchai/skills/generic_buyer/skill.yaml | 8 +- .../fetchai/skills/generic_seller/skill.yaml | 8 +- packages/fetchai/skills/http_echo/skill.yaml | 4 +- .../skills/ml_data_provider/skill.yaml | 8 +- packages/fetchai/skills/ml_train/skill.yaml | 8 +- .../simple_service_registration/skill.yaml | 2 +- .../fetchai/skills/tac_control/skill.yaml | 6 +- .../skills/tac_control_contract/skill.yaml | 4 +- .../fetchai/skills/tac_negotiation/skill.yaml | 4 +- .../skills/tac_participation/skill.yaml | 4 +- .../fetchai/skills/thermometer/skill.yaml | 8 +- .../skills/thermometer_client/skill.yaml | 8 +- .../fetchai/skills/weather_client/skill.yaml | 8 +- .../fetchai/skills/weather_station/skill.yaml | 8 +- packages/hashes.csv | 120 +++++++++--------- tests/conftest.py | 2 +- tests/data/aea-config.example.yaml | 14 +- tests/data/aea-config.example_w_keys.yaml | 14 +- tests/data/dependencies_skill/skill.yaml | 2 +- tests/data/dummy_aea/aea-config.yaml | 12 +- tests/data/dummy_connection/connection.yaml | 2 +- tests/data/dummy_skill/skill.yaml | 2 +- tests/data/hashes.csv | 8 +- tests/test_aea.py | 12 +- tests/test_aea_builder.py | 10 +- tests/test_cli/test_add/test_connection.py | 8 +- tests/test_cli/test_add/test_skill.py | 10 +- tests/test_cli/test_interact.py | 14 +- tests/test_cli/test_remove/test_connection.py | 6 +- tests/test_cli/test_run.py | 56 ++++---- tests/test_cli/test_search.py | 8 +- tests/test_cli/test_utils/test_utils.py | 10 +- tests/test_cli_gui/test_run_agent.py | 2 +- tests/test_connections/test_stub.py | 4 +- .../test_agent_vs_aea/agent_code_block.py | 2 +- .../test_agent_vs_aea/test_agent_vs_aea.py | 2 +- .../md_files/bash-aries-cloud-agent-demo.md | 16 +-- .../md_files/bash-car-park-skills.md | 12 +- .../test_bash_yaml/md_files/bash-config.md | 4 +- .../md_files/bash-erc1155-skills.md | 12 +- .../bash-generic-skills-step-by-step.md | 32 ++--- .../md_files/bash-generic-skills.md | 12 +- .../bash-http-connection-and-skill.md | 6 +- .../test_bash_yaml/md_files/bash-logging.md | 4 +- .../test_bash_yaml/md_files/bash-ml-skills.md | 12 +- .../md_files/bash-orm-integration.md | 12 +- .../md_files/bash-p2p-connection.md | 4 +- .../md_files/bash-quickstart.md | 8 +- .../md_files/bash-skill-guide.md | 10 +- .../test_bash_yaml/md_files/bash-skill.md | 2 +- .../md_files/bash-tac-skills-contract.md | 8 +- .../md_files/bash-tac-skills.md | 18 +-- .../md_files/bash-thermometer-skills.md | 12 +- .../md_files/bash-weather-skills.md | 12 +- .../programmatic_aea.py | 2 +- .../test_programmatic_aea.py | 2 +- .../programmatic_aea.py | 6 +- tests/test_docs/test_docs_protocol.py | 4 +- .../multiplexer_standalone.py | 2 +- .../test_multiplexer_standalone.py | 2 +- .../test_orm_integration.py | 8 +- .../test_skill_guide/test_skill_guide.py | 4 +- .../test_http_server/test_http_server.py | 2 +- .../test_http_server_and_client.py | 2 +- .../test_connections/test_soef/test_soef.py | 6 +- .../test_soef/test_soef_integration.py | 2 +- .../test_webhook/test_webhook.py | 2 +- .../test_packages/test_skills/test_carpark.py | 16 +-- tests/test_packages/test_skills/test_echo.py | 2 +- .../test_packages/test_skills/test_erc1155.py | 8 +- .../test_packages/test_skills/test_generic.py | 16 +-- .../test_skills/test_http_echo.py | 6 +- .../test_skills/test_ml_skills.py | 16 +-- tests/test_packages/test_skills/test_tac.py | 12 +- .../test_skills/test_thermometer.py | 16 +-- .../test_packages/test_skills/test_weather.py | 16 +-- .../test_generator/test_end_to_end.py | 12 +- tests/test_registries/test_base.py | 2 +- tests/test_test_tools/test_testcases.py | 16 +-- 191 files changed, 818 insertions(+), 814 deletions(-) diff --git a/aea/cli/interact.py b/aea/cli/interact.py index 19d1976f4d..c9c59b6f31 100644 --- a/aea/cli/interact.py +++ b/aea/cli/interact.py @@ -157,7 +157,7 @@ def _try_construct_envelope( performative_str = "bytes" performative = DefaultMessage.Performative(performative_str) click.echo( - "Provide message of protocol fetchai/default:0.5.0 for performative {}:".format( + "Provide message of protocol fetchai/default:0.6.0 for performative {}:".format( performative_str ) ) diff --git a/aea/configurations/constants.py b/aea/configurations/constants.py index 128ffd8080..5cfb525c7b 100644 --- a/aea/configurations/constants.py +++ b/aea/configurations/constants.py @@ -27,12 +27,12 @@ DEFAULT_CONNECTION = PublicId.from_str("fetchai/stub:0.9.0") -DEFAULT_PROTOCOL = PublicId.from_str("fetchai/default:0.5.0") -DEFAULT_SKILL = PublicId.from_str("fetchai/error:0.5.0") +DEFAULT_PROTOCOL = PublicId.from_str("fetchai/default:0.6.0") +DEFAULT_SKILL = PublicId.from_str("fetchai/error:0.6.0") DEFAULT_LEDGER = FetchAICrypto.identifier DEFAULT_PRIVATE_KEY_FILE = PRIVATE_KEY_PATH_SCHEMA.format(DEFAULT_LEDGER) DEFAULT_REGISTRY_PATH = DRP DEFAULT_LICENSE = DL -SIGNING_PROTOCOL = PublicId.from_str("fetchai/signing:0.3.0") -STATE_UPDATE_PROTOCOL = PublicId.from_str("fetchai/state_update:0.3.0") +SIGNING_PROTOCOL = PublicId.from_str("fetchai/signing:0.4.0") +STATE_UPDATE_PROTOCOL = PublicId.from_str("fetchai/state_update:0.4.0") LOCAL_PROTOCOLS = [DEFAULT_PROTOCOL, SIGNING_PROTOCOL, STATE_UPDATE_PROTOCOL] diff --git a/aea/protocols/default/README.md b/aea/protocols/default/README.md index ef5a05da42..52298fad7d 100644 --- a/aea/protocols/default/README.md +++ b/aea/protocols/default/README.md @@ -10,7 +10,7 @@ This is a protocol for two agents exchanging any bytes messages. --- name: default author: fetchai -version: 0.5.0 +version: 0.6.0 description: A protocol for exchanging any bytes message. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/aea/protocols/default/message.py b/aea/protocols/default/message.py index b6c2b75073..fcda5a2636 100644 --- a/aea/protocols/default/message.py +++ b/aea/protocols/default/message.py @@ -36,7 +36,7 @@ class DefaultMessage(Message): """A protocol for exchanging any bytes message.""" - protocol_id = ProtocolId.from_str("fetchai/default:0.5.0") + protocol_id = ProtocolId.from_str("fetchai/default:0.6.0") ErrorCode = CustomErrorCode diff --git a/aea/protocols/default/protocol.yaml b/aea/protocols/default/protocol.yaml index 14c867de1a..4e9fc8fb9f 100644 --- a/aea/protocols/default/protocol.yaml +++ b/aea/protocols/default/protocol.yaml @@ -1,18 +1,18 @@ name: default author: fetchai -version: 0.5.0 +version: 0.6.0 type: protocol description: A protocol for exchanging any bytes message. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmP3q9463opixzdv17QXkCSQvgR8KJXgLAVkfUPpdHJzPv + README.md: QmVXQi6676YTqbeYTRNyUw7Ln962VnKKF4HN1ren7TeNk9 __init__.py: QmWpWuGcXu2SodVGUZiAdMrF8Tn7MAPDbiGh7vd9nEfEX6 custom_types.py: QmRcgwDdTxkSHyfF9eoMtsb5P5GJDm4oyLq5W6ZBko1MFU default.proto: QmNzMUvXkBm5bbitR5Yi49ADiwNn1FhCvXqSKKoqAPZyXv default_pb2.py: QmSRFi1s3jcqnPuk4yopJeNuC6o58RL7dvEdt85uns3B3N dialogues.py: Qmc991snbS7DwFxo1cKcq1rQ2uj7y8ukp14kfe2zve387C - message.py: QmWzSGcSeRGaHERQg6E8QaYDiCqmeJYdFqE7rrwMBP7mP2 + message.py: QmQBdmhR6GXkcfatPWnfaA87c5GnmEztU3vLEGCMWMH2kV serialization.py: QmRF7XPNEk1emKmFMZaYBCF3gr4CdkMXagoSpjQEmnRGG6 fingerprint_ignore_patterns: [] dependencies: diff --git a/aea/protocols/signing/README.md b/aea/protocols/signing/README.md index 77b43d1b22..72850bf2d7 100644 --- a/aea/protocols/signing/README.md +++ b/aea/protocols/signing/README.md @@ -10,7 +10,7 @@ This is a protocol for communication between a skill and a decision maker. --- name: signing author: fetchai -version: 0.3.0 +version: 0.4.0 description: A protocol for communication between skills and decision maker. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/aea/protocols/signing/message.py b/aea/protocols/signing/message.py index ae0f9224b2..f0edf46a61 100644 --- a/aea/protocols/signing/message.py +++ b/aea/protocols/signing/message.py @@ -43,7 +43,7 @@ class SigningMessage(Message): """A protocol for communication between skills and decision maker.""" - protocol_id = ProtocolId.from_str("fetchai/signing:0.3.0") + protocol_id = ProtocolId.from_str("fetchai/signing:0.4.0") ErrorCode = CustomErrorCode diff --git a/aea/protocols/signing/protocol.yaml b/aea/protocols/signing/protocol.yaml index fc81b885eb..d1043f789c 100644 --- a/aea/protocols/signing/protocol.yaml +++ b/aea/protocols/signing/protocol.yaml @@ -1,16 +1,16 @@ name: signing author: fetchai -version: 0.3.0 +version: 0.4.0 type: protocol description: A protocol for communication between skills and decision maker. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmSoa5dnxz53GWpWT2VvcRG4asVbzA8JzguiVgwqiLtguM + README.md: QmQGHs1QRtbTnqV4X8kzDyofu6U7Gx1WteC2MurAkcTpWG __init__.py: Qmd7JYjcrD95jdYfSZs6j7UX5TPZfPYXuTFrUzS3FHCxhS custom_types.py: Qmc7sAyCQbAaVs5dZf9hFkTrB2BG8VAioWzbyKBAybrQ1J dialogues.py: QmQ1WKs3Dn15oDSwpc4N8hdADLxrn76U4X5SiLAmyGiPPY - message.py: QmRX642Lz3DDWuNmkncP8jdfFaMamuv9wFhwc2fGqss5om + message.py: QmQV6iT67wo4Q9L5XGKbjyf83YB8kD9iGPQ5URxRE9sxyY serialization.py: QmbXSvWYfEmYyGdfuTXVJYaJfzqVLtMaLR8H3UCLZkvbSC signing.proto: QmcxyLzqhTE9xstAEzCVH17osbLxmSdALx9njmuPjhjrvZ signing_pb2.py: QmY3Ak5ih5zGvKjeZ5EnzrGX4tMYn5dWpjPArQwFeJpVKu diff --git a/aea/protocols/state_update/README.md b/aea/protocols/state_update/README.md index 3ba3eedfd7..4f1100612b 100644 --- a/aea/protocols/state_update/README.md +++ b/aea/protocols/state_update/README.md @@ -10,7 +10,7 @@ This is a protocol for updating the state of a decision maker. --- name: state_update author: fetchai -version: 0.3.0 +version: 0.4.0 description: A protocol for state updates to the decision maker state. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/aea/protocols/state_update/message.py b/aea/protocols/state_update/message.py index eee05054c2..e62470fbd9 100644 --- a/aea/protocols/state_update/message.py +++ b/aea/protocols/state_update/message.py @@ -35,7 +35,7 @@ class StateUpdateMessage(Message): """A protocol for state updates to the decision maker state.""" - protocol_id = ProtocolId.from_str("fetchai/state_update:0.3.0") + protocol_id = ProtocolId.from_str("fetchai/state_update:0.4.0") class Performative(Message.Performative): """Performatives for the state_update protocol.""" diff --git a/aea/protocols/state_update/protocol.yaml b/aea/protocols/state_update/protocol.yaml index 66b150339e..6adc5e1b0c 100644 --- a/aea/protocols/state_update/protocol.yaml +++ b/aea/protocols/state_update/protocol.yaml @@ -1,15 +1,15 @@ name: state_update author: fetchai -version: 0.3.0 +version: 0.4.0 type: protocol description: A protocol for state updates to the decision maker state. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: Qmc12hnCshAE3TL9ba4vo6L8ZZhynyfhEUoStJggRrbimc + README.md: QmQ16KZTu6zC7GgAkAYnis5exdeUWLK77nkLTHEENuUNKM __init__.py: QmUrvqDr24Ph1nnUqjTUPh9QoftuTsef3Dj3yzPUMY38fu dialogues.py: Qmd59WgpFccLn1zhpLdwm3zDCmCsjSoQXVn6M7PgFwwkgR - message.py: QmchGWKst8yaXthWYT6prHAXJF4RACuaq81Tnc4Y4PFuXE + message.py: QmWzC79P44rpzdW5p5sdhxW5wv8CCrg4RzCgAnLPuPgyzC serialization.py: QmciaNPHkpyxWLYVtBPnYkKHj6Ur9E3CPJ9QvWbXFD91Yw state_update.proto: QmdmEUSa7PDxJ98ZmGE7bLFPmUJv8refgbkHPejw6uDdwD state_update_pb2.py: QmQr5KXhapRv9AnfQe7Xbr5bBqYWp9DEMLjxX8UWmK75Z4 diff --git a/aea/skills/error/skill.yaml b/aea/skills/error/skill.yaml index 66d180ffd2..c6ecba3c6e 100644 --- a/aea/skills/error/skill.yaml +++ b/aea/skills/error/skill.yaml @@ -1,6 +1,6 @@ name: error author: fetchai -version: 0.5.0 +version: 0.6.0 type: skill description: The error skill implements basic error handling required by all AEAs. license: Apache-2.0 @@ -11,7 +11,7 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: [] behaviours: {} handlers: diff --git a/docs/agent-vs-aea.md b/docs/agent-vs-aea.md index a49868c25d..4921a09331 100644 --- a/docs/agent-vs-aea.md +++ b/docs/agent-vs-aea.md @@ -127,7 +127,7 @@ We use the input and output text files to send an envelope to our agent and rece ``` python # Create a message inside an envelope and get the stub connection to pass it into the agent message_text = ( - b"my_agent,other_agent,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello," + b"my_agent,other_agent,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello," ) with open(INPUT_FILE, "wb") as f: write_with_lock(f, message_text) @@ -254,7 +254,7 @@ def run(): # Create a message inside an envelope and get the stub connection to pass it into the agent message_text = ( - b"my_agent,other_agent,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello," + b"my_agent,other_agent,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello," ) with open(INPUT_FILE, "wb") as f: write_with_lock(f, message_text) diff --git a/docs/aries-cloud-agent-demo.md b/docs/aries-cloud-agent-demo.md index acc6c3e901..74e487d125 100644 --- a/docs/aries-cloud-agent-demo.md +++ b/docs/aries-cloud-agent-demo.md @@ -192,10 +192,10 @@ The following steps create **Alice_AEA** from scratch: aea create aries_alice cd aries_alice aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/http_client:0.8.0 -aea add connection fetchai/webhook:0.6.0 -aea add skill fetchai/aries_alice:0.7.0 +aea add connection fetchai/soef:0.9.0 +aea add connection fetchai/http_client:0.9.0 +aea add connection fetchai/webhook:0.7.0 +aea add skill fetchai/aries_alice:0.8.0 ```

@@ -277,10 +277,10 @@ The following steps create **Faber_AEA** from scratch: aea create aries_faber cd aries_faber aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/http_client:0.8.0 -aea add connection fetchai/webhook:0.6.0 -aea add skill fetchai/aries_faber:0.6.0 +aea add connection fetchai/soef:0.9.0 +aea add connection fetchai/http_client:0.9.0 +aea add connection fetchai/webhook:0.7.0 +aea add skill fetchai/aries_faber:0.7.0 ```

diff --git a/docs/build-aea-programmatically.md b/docs/build-aea-programmatically.md index 84d4b854a0..407925e113 100644 --- a/docs/build-aea-programmatically.md +++ b/docs/build-aea-programmatically.md @@ -48,7 +48,7 @@ We will use the stub connection to pass envelopes in and out of the AEA. Ensure ``` ## Initialise the AEA -We use the
`AEABuilder` to readily build an AEA. By default, the `AEABuilder` adds the `fetchai/default:0.5.0` protocol, the `fetchai/stub:0.9.0` connection and the `fetchai/error:0.5.0` skill. +We use the `AEABuilder` to readily build an AEA. By default, the `AEABuilder` adds the `fetchai/default:0.6.0` protocol, the `fetchai/stub:0.9.0` connection and the `fetchai/error:0.6.0` skill. ``` python # Instantiate the builder and build the AEA # By default, the default protocol, error skill and stub connection are added @@ -121,7 +121,7 @@ We run the AEA from a different thread so that we can still use the main thread We use the input and output text files to send an envelope to our AEA and receive a response (from the echo skill) ``` python # Create a message inside an envelope and get the stub connection to pass it on to the echo skill - message_text = b"my_aea,other_agent,fetchai/default:0.5.0,\x08\x01\x12\x011*\x07\n\x05hello," + message_text = b"my_aea,other_agent,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello," with open(INPUT_FILE, "wb") as f: write_with_lock(f, message_text) print(b"input message: " + message_text) @@ -147,8 +147,8 @@ Finally stop our AEA and wait for it to finish ## Running the AEA If you now run this python script file, you should see this output: - input message: my_aea,other_agent,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello - output message: other_agent,my_aea,fetchai/default:0.5.0,...\x05hello + input message: my_aea,other_agent,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello + output message: other_agent,my_aea,fetchai/default:0.6.0,...\x05hello ## Entire code listing @@ -239,7 +239,7 @@ def run(): time.sleep(4) # Create a message inside an envelope and get the stub connection to pass it on to the echo skill - message_text = b"my_aea,other_agent,fetchai/default:0.5.0,\x08\x01\x12\x011*\x07\n\x05hello," + message_text = b"my_aea,other_agent,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello," with open(INPUT_FILE, "wb") as f: write_with_lock(f, message_text) print(b"input message: " + message_text) diff --git a/docs/car-park-skills.md b/docs/car-park-skills.md index 922097bfc9..b7fed86aa3 100644 --- a/docs/car-park-skills.md +++ b/docs/car-park-skills.md @@ -68,7 +68,7 @@ The following steps create the car detector from scratch: aea create car_detector cd car_detector aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/carpark_detection:0.12.0 aea install @@ -78,8 +78,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `car_detector/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

@@ -102,7 +102,7 @@ The following steps create the car data client from scratch: aea create car_data_buyer cd car_data_buyer aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/carpark_client:0.12.0 aea install @@ -112,8 +112,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `car_data_buyer/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

diff --git a/docs/cli-vs-programmatic-aeas.md b/docs/cli-vs-programmatic-aeas.md index 6fae1bc689..b4a3513300 100644 --- a/docs/cli-vs-programmatic-aeas.md +++ b/docs/cli-vs-programmatic-aeas.md @@ -124,8 +124,8 @@ def run(): # specify the default routing for some protocols default_routing = { - PublicId.from_str("fetchai/ledger_api:0.3.0"): LedgerConnection.connection_id, - PublicId.from_str("fetchai/oef_search:0.6.0"): SOEFConnection.connection_id, + PublicId.from_str("fetchai/ledger_api:0.4.0"): LedgerConnection.connection_id, + PublicId.from_str("fetchai/oef_search:0.7.0"): SOEFConnection.connection_id, } default_connection = P2PLibp2pConnection.connection_id @@ -192,7 +192,7 @@ def run(): api_key=API_KEY, soef_addr=SOEF_ADDR, soef_port=SOEF_PORT, - restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.6.0")}, + restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.7.0")}, connection_id=SOEFConnection.connection_id, ) soef_connection = SOEFConnection(configuration=configuration, identity=identity) diff --git a/docs/config.md b/docs/config.md index e95ddab7d8..9cc4e49ae8 100644 --- a/docs/config.md +++ b/docs/config.md @@ -24,9 +24,9 @@ connections: # The list of connection public - fetchai/stub:0.9.0 contracts: [] # The list of contract public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). protocols: # The list of protocol public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: # The list of skill public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 default_connection: fetchai/p2p_libp2p:0.10.0 # The default connection used for envelopes sent by the AEA (must satisfy PUBLIC_ID_REGEX). default_ledger: fetchai # The default ledger identifier the AEA project uses (must satisfy LEDGER_ID_REGEX) logging_config: # The logging configurations the AEA project uses diff --git a/docs/connect-a-frontend.md b/docs/connect-a-frontend.md index 93d5b1a49b..6c1559b9bc 100644 --- a/docs/connect-a-frontend.md +++ b/docs/connect-a-frontend.md @@ -3,7 +3,7 @@ This demo discusses the options we have to connect a front-end to the AEA. The f How to connect frontend to your AEA ## Case 1 -The first option we have is to create a `Connection` that will handle the incoming requests from the 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.8.0`) which translates these into Envelopes to be consumed by the correct skill. +The first option we have is to create a `Connection` that will handle the incoming requests from the 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.9.0`) which translates these into Envelopes to be consumed by the correct skill. ## Case 2 The other option we have is to create a stand-alone `Multiplexer` with a `P2P` connection (`fetchai/p2p_libp2p:0.10.0`). In this scenario, the front-end needs to incorporate a Multiplexer with an `P2P` Connection. Then the Agent Communication Network can be used to send Envelopes from the AEA to the front-end. \ No newline at end of file diff --git a/docs/contract.md b/docs/contract.md index 48ef8864e9..fdb0297a25 100644 --- a/docs/contract.md +++ b/docs/contract.md @@ -32,7 +32,7 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. To send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.3.0` protocol. +This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. To send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.4.0` protocol. - the `get_raw_transaction` message is used to request any transaction for a specific contract which changes state in the contract. For instance, to request a transaction for the creation of token in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.10.0` package, we send the following message to the `fetchai/ledger:0.6.0`: @@ -52,7 +52,7 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_create_batch_transaction` method with the specified key word arguments. Similarly to above, to send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.3.0` protocol. +This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_transaction` message will be returned with the matching raw transaction. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_create_batch_transaction` method with the specified key word arguments. Similarly to above, to send this transaction to the ledger for processing, we first sign the message with the decision maker and then send the signed transaction to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.4.0` protocol. - the `get_raw_message` message is used to request any contract method call for a specific contract which does not change state in the contract. For instance, to request a call to get a hash from some input data in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.10.0` package, we send the following message to the `fetchai/ledger:0.6.0`: @@ -77,7 +77,7 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_message` message will be returned with the matching raw message. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_hash_single` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.3.0` protocol. In this case, signing is not required. +This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `raw_message` message will be returned with the matching raw message. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_hash_single` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.4.0` protocol. In this case, signing is not required. - the `get_state` message is used to request any contract method call to query state in the deployed contract. For instance, to request a call to get the balances in the deployed `erc1155` smart contract wrapped in the `fetchai/erc1155:0.10.0` package, we send the following message to the `fetchai/ledger:0.6.0`: @@ -95,7 +95,7 @@ contract_api_msg = ContractApiMessage( ), ) ``` -This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `state` message will be returned with the matching state. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_balance` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.3.0` protocol. In this case, signing is not required. +This message will be handled by the `fetchai/ledger:0.6.0` connection and then a `state` message will be returned with the matching state. For this to be executed correctly, the `fetchai/erc1155:0.10.0` contract package needs to implement the `get_balance` method with the specified key word arguments. We can then send the raw message to the `fetchai/ledger:0.6.0` connection using the `fetchai/ledger_api:0.4.0` protocol. In this case, signing is not required. ## Developing your own diff --git a/docs/core-components-1.md b/docs/core-components-1.md index b0aa84b8df..d7500f3322 100644 --- a/docs/core-components-1.md +++ b/docs/core-components-1.md @@ -32,7 +32,7 @@ An `Envelope` is the core object * `Dialogues`, which define rules over `Message` sequences. -The framework provides one default `Protocol`, called `default` (current version `fetchai/default:0.5.0`). This `Protocol` provides a bare-bones implementation for an AEA `Protocol` which includes a `DefaultMessage` class and associated `DefaultSerializer` and `DefaultDialogue` classes. +The framework provides one default `Protocol`, called `default` (current version `fetchai/default:0.6.0`). This `Protocol` provides a bare-bones implementation for an AEA `Protocol` which includes a `DefaultMessage` class and associated `DefaultSerializer` and `DefaultDialogue` classes. Additional `Protocols` - i.e. a new type of interaction - can be added as packages and generated with the protocol generator. For more details on `Protocols` also read the `Protocol` guide here. diff --git a/docs/deployment.md b/docs/deployment.md index 92f8c93ab3..e8fea42914 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -28,7 +28,7 @@ Finally, we run it: docker run -it aea-deploy:latest ``` -This will run the `fetchai/my_first_aea:0.11.0` demo project. You can edit `entrypoint.sh` to run whatever project you would like. +This will run the `fetchai/my_first_aea:0.12.0` demo project. You can edit `entrypoint.sh` to run whatever project you would like. ## Deployment diff --git a/docs/erc1155-skills.md b/docs/erc1155-skills.md index 6b197156c4..1c2cd8fd5a 100644 --- a/docs/erc1155-skills.md +++ b/docs/erc1155-skills.md @@ -40,7 +40,7 @@ Create the AEA that will deploy the contract. aea create erc1155_deployer cd erc1155_deployer aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/erc1155_deploy:0.14.0 aea install @@ -51,8 +51,8 @@ Then update the agent config (`aea-config.yaml`) with the default routing: ``` yaml default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` And change the default ledger: @@ -95,7 +95,7 @@ Create the AEA that will get some tokens from the deployer. aea create erc1155_client cd erc1155_client aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/erc1155_client:0.13.0 aea install @@ -106,8 +106,8 @@ Then update the agent config (`aea-config.yaml`) with the default routing: ``` yaml default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` And change the default ledger: diff --git a/docs/generic-skills-step-by-step.md b/docs/generic-skills-step-by-step.md index c71c402ba4..2e9c7318ab 100644 --- a/docs/generic-skills-step-by-step.md +++ b/docs/generic-skills-step-by-step.md @@ -1314,10 +1314,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: service_registration: @@ -2776,11 +2776,11 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 -- fetchai/signing:0.3.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 +- fetchai/signing:0.4.0 skills: [] behaviours: search: @@ -2881,8 +2881,8 @@ aea add-key fetchai fetchai_private_key.txt --connection Both in `my_generic_seller/aea-config.yaml` and `my_generic_buyer/aea-config.yaml`, and ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ### Fund the buyer AEA @@ -2899,9 +2899,9 @@ Add the remaining packages for the seller AEA, then run it: ``` bash aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 -aea add protocol fetchai/fipa:0.6.0 +aea add protocol fetchai/fipa:0.7.0 aea install aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea run @@ -2915,10 +2915,10 @@ Add the remaining packages for the buyer AEA: ``` bash aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 -aea add protocol fetchai/fipa:0.6.0 -aea add protocol fetchai/signing:0.3.0 +aea add protocol fetchai/fipa:0.7.0 +aea add protocol fetchai/signing:0.4.0 aea install aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` diff --git a/docs/generic-skills.md b/docs/generic-skills.md index b76ce18333..6774d0f47b 100644 --- a/docs/generic-skills.md +++ b/docs/generic-skills.md @@ -72,7 +72,7 @@ The following steps create the seller from scratch: aea create my_seller_aea cd my_seller_aea aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/generic_seller:0.13.0 aea install @@ -82,8 +82,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `my_seller_aea/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

@@ -106,7 +106,7 @@ The following steps create the buyer from scratch: aea create my_buyer_aea cd my_buyer_aea aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/generic_buyer:0.12.0 aea install @@ -116,8 +116,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `my_buyer_aea/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

diff --git a/docs/http-connection-and-skill.md b/docs/http-connection-and-skill.md index 2455fee6d7..dcf01bac81 100644 --- a/docs/http-connection-and-skill.md +++ b/docs/http-connection-and-skill.md @@ -14,13 +14,13 @@ cd my_aea Add the http server connection package ``` bash -aea add connection fetchai/http_server:0.8.0 +aea add connection fetchai/http_server:0.9.0 ``` Update the default connection: ``` bash -aea config set agent.default_connection fetchai/http_server:0.8.0 +aea config set agent.default_connection fetchai/http_server:0.9.0 ``` Modify the `api_spec_path`: @@ -166,7 +166,7 @@ handlers: Finally, we run the fingerprinter: ``` bash -aea fingerprint skill fetchai/http_echo:0.6.0 +aea fingerprint skill fetchai/http_echo:0.7.0 ``` Note, you will have to replace the author name with your author handle. diff --git a/docs/language-agnostic-definition.md b/docs/language-agnostic-definition.md index 3b0d059ef9..7d93b5429d 100644 --- a/docs/language-agnostic-definition.md +++ b/docs/language-agnostic-definition.md @@ -50,7 +50,7 @@ The format for the above fields, except `message`, is specified below. For those

This section is incomplete, and will be updated soon!

-
  • It SHOULD implement the `fetchai/default:0.5.0` protocol which satisfies the following protobuf schema: +
  • It SHOULD implement the `fetchai/default:0.6.0` protocol which satisfies the following protobuf schema: ``` proto syntax = "proto3"; @@ -100,7 +100,7 @@ message DefaultMessage{
  • It MUST have an identity in the form of, at a minimum, an address derived from a public key and its associated private key (where the eliptic curve must be of type SECP256k1).
  • -
  • It SHOULD implement handling of errors using the `fetchai/default:0.5.0` protocol. The protobuf schema is given above. +
  • It SHOULD implement handling of errors using the `fetchai/default:0.6.0` protocol. The protobuf schema is given above.
  • It MUST implement the following principles when handling messages:
      diff --git a/docs/logging.md b/docs/logging.md index a183b4378c..8f0e4c0230 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -25,9 +25,9 @@ connections: - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 default_connection: fetchai/stub:0.9.0 default_ledger: fetchai logging_config: diff --git a/docs/ml-skills.md b/docs/ml-skills.md index 6f34264db6..cf399e6cda 100644 --- a/docs/ml-skills.md +++ b/docs/ml-skills.md @@ -75,7 +75,7 @@ The following steps create the data provider from scratch: aea create ml_data_provider cd ml_data_provider aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/ml_data_provider:0.12.0 aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 @@ -85,8 +85,8 @@ aea install In `ml_data_provider/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      @@ -109,7 +109,7 @@ The following steps create the model trainer from scratch: aea create ml_model_trainer cd ml_model_trainer aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/ml_train:0.12.0 aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 @@ -119,8 +119,8 @@ aea install In `ml_model_trainer/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      diff --git a/docs/multiplexer-standalone.md b/docs/multiplexer-standalone.md index b3e21b32ac..e8b3ed436e 100644 --- a/docs/multiplexer-standalone.md +++ b/docs/multiplexer-standalone.md @@ -61,7 +61,7 @@ We use the input and output text files to send an envelope to our agent and rece ``` python # Create a message inside an envelope and get the stub connection to pass it into the multiplexer message_text = ( - "multiplexer,some_agent,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello," + "multiplexer,some_agent,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello," ) with open(INPUT_FILE, "w") as f: write_with_lock(f, message_text) @@ -159,7 +159,7 @@ def run(): # Create a message inside an envelope and get the stub connection to pass it into the multiplexer message_text = ( - "multiplexer,some_agent,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello," + "multiplexer,some_agent,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello," ) with open(INPUT_FILE, "w") as f: write_with_lock(f, message_text) diff --git a/docs/oef-ledger.md b/docs/oef-ledger.md index a9d27aac1d..7b73b5202d 100644 --- a/docs/oef-ledger.md +++ b/docs/oef-ledger.md @@ -53,7 +53,7 @@ When it is live you will see the sentence 'A thing of beauty is a joy forever... To view the `OEF search and communication node` logs for debugging, navigate to `data/oef-logs`. -To connect to an `OEF search and communication node` an AEA uses the `OEFConnection` connection package (`fetchai/oef:0.9.0`). +To connect to an `OEF search and communication node` an AEA uses the `OEFConnection` connection package (`fetchai/oef:0.10.0`). If you experience any problems launching the `OEF search and communication node` then consult this guide. diff --git a/docs/orm-integration.md b/docs/orm-integration.md index d170c326c4..4a879de4ce 100644 --- a/docs/orm-integration.md +++ b/docs/orm-integration.md @@ -72,7 +72,7 @@ The following steps create the seller from scratch: aea create my_thermometer_aea cd my_thermometer_aea aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/thermometer:0.12.0 aea install @@ -82,8 +82,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `my_thermometer_aea/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      @@ -107,7 +107,7 @@ The following steps create the car data client from scratch: aea create my_thermometer_client cd my_thermometer_client aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/thermometer_client:0.11.0 aea install @@ -117,8 +117,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `my_buyer_aea/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      diff --git a/docs/protocol.md b/docs/protocol.md index 67c23aeba0..8108395dd0 100644 --- a/docs/protocol.md +++ b/docs/protocol.md @@ -66,9 +66,9 @@ The developer can generate custom protocols with the SOEF search node to register and unregister their own services and search for services registered by other agents. +The `fetchai/oef_search:0.7.0` protocol is used by AEAs to interact with an SOEF search node to register and unregister their own services and search for services registered by other agents. -The `fetchai/oef_search:0.6.0` protocol definition includes an `OefSearchMessage` with the following message types: +The `fetchai/oef_search:0.7.0` protocol definition includes an `OefSearchMessage` with the following message types: ``` python class Performative(Enum): @@ -231,7 +231,7 @@ oef_msg = OefSearchMessage( ) ``` -* The SOEF search node will respond with a message, say `msg` of type `OefSearchMessage`, of performative `OefSearchMessage.Performative.SEARCH_RESULT`. To access the tuple of agents which match the query, simply use `msg.agents`. In particular, this will return the agent addresses matching the query. The agent address can then be used to send a message to the agent utilising the P2P agent communication network and any protocol other than `fetchai/oef_search:0.6.0`. +* The SOEF search node will respond with a message, say `msg` of type `OefSearchMessage`, of performative `OefSearchMessage.Performative.SEARCH_RESULT`. To access the tuple of agents which match the query, simply use `msg.agents`. In particular, this will return the agent addresses matching the query. The agent address can then be used to send a message to the agent utilising the P2P agent communication network and any protocol other than `fetchai/oef_search:0.7.0`. * If the SOEF search node encounters any errors with the messages you send, it will return an `OefSearchMessage` of performative `OefSearchMessage.Performative.OEF_ERROR` and indicate the error operation encountered: ``` python @@ -246,11 +246,11 @@ class OefErrorOperation(Enum): OTHER = 10000 ``` -## `fetchai/fipa:0.6.0` protocol +## `fetchai/fipa:0.7.0` protocol This protocol provides classes and functions necessary for communication between AEAs via a variant of the FIPA Agent Communication Language. -The `fetchai/fipa:0.6.0` protocol definition includes a `FipaMessage` with the following performatives: +The `fetchai/fipa:0.7.0` protocol definition includes a `FipaMessage` with the following performatives: ``` python class Performative(Enum): @@ -283,9 +283,9 @@ def __init__( ) ``` -The `fetchai/fipa:0.6.0` protocol also defines a `FipaDialogue` class which specifies the valid reply structure and provides other helper methods to maintain dialogues. +The `fetchai/fipa:0.7.0` protocol also defines a `FipaDialogue` class which specifies the valid reply structure and provides other helper methods to maintain dialogues. -For examples of the usage of the `fetchai/fipa:0.6.0` protocol check out the generic skills step by step guide. +For examples of the usage of the `fetchai/fipa:0.7.0` protocol check out the generic skills step by step guide. ### Fipa dialogue diff --git a/docs/questions-and-answers.md b/docs/questions-and-answers.md index bb76fa60d7..9b0a634e69 100644 --- a/docs/questions-and-answers.md +++ b/docs/questions-and-answers.md @@ -72,7 +72,7 @@ You can find more details about the CLI commands here
      When a new AEA is created, is the `vendor` folder populated with some default packages? -All AEA projects by default hold the `fetchai/stub:0.9.0` connection, the `fetchai/default:0.5.0` protocol and the `fetchai/error:0.5.0` skill. These (as all other packages installed from the registry) are placed in the vendor's folder. +All AEA projects by default hold the `fetchai/stub:0.9.0` connection, the `fetchai/default:0.6.0` protocol and the `fetchai/error:0.6.0` skill. These (as all other packages installed from the registry) are placed in the vendor's folder.

      You can find more details about the file structure
      here
      diff --git a/docs/quickstart.md b/docs/quickstart.md index f6a03ebd07..beae01bce4 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -101,7 +101,7 @@ AEA configurations successfully initialized: {'author': 'fetchai'} The echo skill is a simple demo that introduces you to the main business logic components of an AEA. The fastest way to create your first AEA is to fetch it! ``` bash -aea fetch fetchai/my_first_aea:0.11.0 +aea fetch fetchai/my_first_aea:0.12.0 cd my_first_aea ``` @@ -121,9 +121,9 @@ cd my_first_aea
      Second, add the echo skill to the project. ``` bash -aea add skill fetchai/echo:0.7.0 +aea add skill fetchai/echo:0.8.0 ``` -This copies the `fetchai/echo:0.7.0` skill code containing the "behaviours", and "handlers" into the project, ready to run. The identifier of the skill `fetchai/echo:0.7.0` consists of the name of the author of the skill, followed by the skill name and its version. +This copies the `fetchai/echo:0.8.0` skill code containing the "behaviours", and "handlers" into the project, ready to run. The identifier of the skill `fetchai/echo:0.8.0` consists of the name of the author of the skill, followed by the skill name and its version. ## Communication via envelopes and messages @@ -149,7 +149,7 @@ TO,SENDER,PROTOCOL_ID,ENCODED_MESSAGE, For example: ``` bash -recipient_aea,sender_aea,fetchai/default:0.5.0,\x08\x01\x12\x011*\x07\n\x05hello, +recipient_aea,sender_aea,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello, ``` ## Run the AEA @@ -212,7 +212,7 @@ info: Echo Behaviour: act method called. Optionally, from a different terminal and same directory (i.e. the `my_first_aea` project), we send the AEA a message wrapped in an envelope via the input file. ``` bash -echo 'my_first_aea,sender_aea,fetchai/default:0.5.0,\x08\x01\x12\x011*\x07\n\x05hello,' >> input_file +echo 'my_first_aea,sender_aea,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello,' >> input_file ``` You will see the `Echo Handler` dealing with the envelope and responding with the same message to the `output_file`, and also decoding the Base64 encrypted message in this case. diff --git a/docs/simple-oef-usage.md b/docs/simple-oef-usage.md index 2b52ef796f..450f96d605 100644 --- a/docs/simple-oef-usage.md +++ b/docs/simple-oef-usage.md @@ -1,12 +1,12 @@ You can use the SOEF in the agent framework by using the SOEF connection as a package in your agent project. ## Add the SOEF package -Check out the CLI guide on details how to add a connection. You will want to add the `fetchai/soef:0.8.0` connection package. +Check out the CLI guide on details how to add a connection. You will want to add the `fetchai/soef:0.9.0` connection package. ## Register your agent and its services ### Register agent location -To register your agent's location, you have to send a message in the `fetchai/oef_search:0.6.0` protocol to the SOEF connection. +To register your agent's location, you have to send a message in the `fetchai/oef_search:0.7.0` protocol to the SOEF connection. First, define a data model for location data: ``` python diff --git a/docs/skill-guide.md b/docs/skill-guide.md index 6309c2ff87..28bbc38848 100644 --- a/docs/skill-guide.md +++ b/docs/skill-guide.md @@ -329,7 +329,7 @@ fingerprint: {} fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/oef_search:0.6.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: my_search_behaviour: @@ -373,14 +373,14 @@ Ensure, you use the correct author name to reference your skill (here we use `fe Our AEA does not have the oef protocol yet so let's add it. ``` bash -aea add protocol fetchai/oef_search:0.6.0 +aea add protocol fetchai/oef_search:0.7.0 ``` This adds the protocol to our AEA and makes it available on the path `packages.fetchai.protocols...`. We also need to add the soef and p2p connections and install the AEA's dependencies: ``` bash -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/p2p_libp2p:0.10.0 aea install aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 @@ -389,7 +389,7 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 Finally, in the `aea-config.yaml` add the following lines: ``` yaml default_routing: - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` This will ensure that search requests are processed by the correct connection. @@ -803,7 +803,7 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/oef_search:0.6.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: service: diff --git a/docs/skill.md b/docs/skill.md index 5b8e529d27..debb1d34ee 100644 --- a/docs/skill.md +++ b/docs/skill.md @@ -262,7 +262,7 @@ handlers: models: {} dependencies: {} protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 ``` @@ -275,7 +275,7 @@ All AEAs have a default `error` skill that contains error handling code for a nu * Envelopes with decoding errors * Invalid messages with respect to the registered protocol -The error skill relies on the `fetchai/default:0.5.0` protocol which provides error codes for the above. +The error skill relies on the `fetchai/default:0.6.0` protocol which provides error codes for the above.
      diff --git a/docs/tac-skills-contract.md b/docs/tac-skills-contract.md index 3a7feb913d..0ef6ee0985 100644 --- a/docs/tac-skills-contract.md +++ b/docs/tac-skills-contract.md @@ -114,7 +114,7 @@ The following steps create the controller from scratch: aea create tac_controller_contract cd tac_controller_contract aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_control_contract:0.9.0 aea install @@ -179,7 +179,7 @@ Build participant one: ``` bash cd tac_participant_one aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_participation:0.9.0 aea add skill fetchai/tac_negotiation:0.10.0 @@ -194,7 +194,7 @@ Then, build participant two: ``` bash cd tac_participant_two aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_participation:0.9.0 aea add skill fetchai/tac_negotiation:0.10.0 diff --git a/docs/tac-skills.md b/docs/tac-skills.md index c70415a668..bb9680e042 100644 --- a/docs/tac-skills.md +++ b/docs/tac-skills.md @@ -113,9 +113,9 @@ The following steps create the controller from scratch: aea create tac_controller cd tac_controller aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 -aea add skill fetchai/tac_control:0.7.0 +aea add skill fetchai/tac_control:0.8.0 aea install aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea config set agent.default_ledger fetchai @@ -124,7 +124,7 @@ aea config set agent.default_ledger fetchai In `tac_controller/aea-config.yaml` add ``` yaml default_routing: - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      @@ -153,7 +153,7 @@ Build participant one: ``` bash cd tac_participant_one aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_participation:0.9.0 aea add skill fetchai/tac_negotiation:0.10.0 @@ -165,15 +165,15 @@ aea config set agent.default_ledger fetchai In `tac_participant_one/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` Then, build participant two: ``` bash cd tac_participant_two aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_participation:0.9.0 aea add skill fetchai/tac_negotiation:0.10.0 @@ -185,8 +185,8 @@ aea config set agent.default_ledger fetchai In `tac_participant_two/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      diff --git a/docs/thermometer-skills.md b/docs/thermometer-skills.md index f6d24d01f5..bbaed90239 100644 --- a/docs/thermometer-skills.md +++ b/docs/thermometer-skills.md @@ -75,7 +75,7 @@ The following steps create the thermometer AEA from scratch: aea create my_thermometer_aea cd my_thermometer_aea aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/thermometer:0.12.0 aea install @@ -85,8 +85,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `my_thermometer_aea/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      @@ -109,7 +109,7 @@ The following steps create the thermometer client from scratch: aea create my_thermometer_client cd my_thermometer_client aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/thermometer_client:0.11.0 aea install @@ -119,8 +119,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `my_thermometer_aea/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      diff --git a/docs/weather-skills.md b/docs/weather-skills.md index fc1ce3c493..3b1a2db8b7 100644 --- a/docs/weather-skills.md +++ b/docs/weather-skills.md @@ -74,7 +74,7 @@ The following steps create the weather station from scratch: aea create my_weather_station cd my_weather_station aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/weather_station:0.12.0 aea install @@ -84,8 +84,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `weather_station/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      @@ -109,7 +109,7 @@ The following steps create the weather client from scratch: aea create my_weather_client cd my_weather_client aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/weather_client:0.11.0 aea install @@ -119,8 +119,8 @@ aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 In `my_weather_client/aea-config.yaml` add ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ```

      diff --git a/packages/fetchai/agents/aries_alice/aea-config.yaml b/packages/fetchai/agents/aries_alice/aea-config.yaml index 0ad1aa0a90..7efbe1b67a 100644 --- a/packages/fetchai/agents/aries_alice/aea-config.yaml +++ b/packages/fetchai/agents/aries_alice/aea-config.yaml @@ -7,19 +7,19 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/http_client:0.8.0 +- fetchai/http_client:0.9.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 -- fetchai/webhook:0.6.0 +- fetchai/webhook:0.7.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/http:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/http:0.6.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/aries_alice:0.7.0 -- fetchai/error:0.5.0 +- fetchai/aries_alice:0.8.0 +- fetchai/error:0.6.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: @@ -28,5 +28,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/http:0.5.0: fetchai/http_client:0.8.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/http:0.6.0: fetchai/http_client:0.9.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/aries_faber/aea-config.yaml b/packages/fetchai/agents/aries_faber/aea-config.yaml index 7d043ca849..60858d53c7 100644 --- a/packages/fetchai/agents/aries_faber/aea-config.yaml +++ b/packages/fetchai/agents/aries_faber/aea-config.yaml @@ -7,20 +7,20 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/http_client:0.8.0 +- fetchai/http_client:0.9.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 -- fetchai/webhook:0.6.0 +- fetchai/webhook:0.7.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/http:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/http:0.6.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/aries_faber:0.6.0 -- fetchai/error:0.5.0 -default_connection: fetchai/http_client:0.8.0 +- fetchai/aries_faber:0.7.0 +- fetchai/error:0.6.0 +default_connection: fetchai/http_client:0.9.0 default_ledger: fetchai logging_config: disable_existing_loggers: false @@ -28,5 +28,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/http:0.5.0: fetchai/http_client:0.8.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/http:0.6.0: fetchai/http_client:0.9.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/car_data_buyer/aea-config.yaml b/packages/fetchai/agents/car_data_buyer/aea-config.yaml index 2a40202d91..d4300cd29e 100644 --- a/packages/fetchai/agents/car_data_buyer/aea-config.yaml +++ b/packages/fetchai/agents/car_data_buyer/aea-config.yaml @@ -10,17 +10,17 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/carpark_client:0.12.0 -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_buyer:0.12.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai @@ -30,5 +30,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/car_detector/aea-config.yaml b/packages/fetchai/agents/car_detector/aea-config.yaml index e2bd0d8eb7..b63aafca67 100644 --- a/packages/fetchai/agents/car_detector/aea-config.yaml +++ b/packages/fetchai/agents/car_detector/aea-config.yaml @@ -9,17 +9,17 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/carpark_detection:0.12.0 -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_seller:0.13.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/erc1155_client/aea-config.yaml b/packages/fetchai/agents/erc1155_client/aea-config.yaml index d168178040..19ad7cf3c4 100644 --- a/packages/fetchai/agents/erc1155_client/aea-config.yaml +++ b/packages/fetchai/agents/erc1155_client/aea-config.yaml @@ -9,20 +9,20 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: - fetchai/erc1155:0.10.0 protocols: - fetchai/contract_api:0.5.0 -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 -- fetchai/signing:0.3.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 +- fetchai/signing:0.4.0 skills: - fetchai/erc1155_client:0.13.0 -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: ethereum logging_config: @@ -32,5 +32,5 @@ private_key_paths: {} registry_path: ../packages default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/erc1155_deployer/aea-config.yaml b/packages/fetchai/agents/erc1155_deployer/aea-config.yaml index 6a60e30ba2..abc22baa84 100644 --- a/packages/fetchai/agents/erc1155_deployer/aea-config.yaml +++ b/packages/fetchai/agents/erc1155_deployer/aea-config.yaml @@ -9,20 +9,20 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: - fetchai/erc1155:0.10.0 protocols: - fetchai/contract_api:0.5.0 -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 -- fetchai/signing:0.3.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 +- fetchai/signing:0.4.0 skills: - fetchai/erc1155_deploy:0.14.0 -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: ethereum logging_config: @@ -32,5 +32,5 @@ private_key_paths: {} registry_path: ../packages default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/generic_buyer/aea-config.yaml b/packages/fetchai/agents/generic_buyer/aea-config.yaml index 6e20d189fa..b0482b5822 100644 --- a/packages/fetchai/agents/generic_buyer/aea-config.yaml +++ b/packages/fetchai/agents/generic_buyer/aea-config.yaml @@ -9,16 +9,16 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_buyer:0.12.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai @@ -28,5 +28,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/generic_seller/aea-config.yaml b/packages/fetchai/agents/generic_seller/aea-config.yaml index 2e3394d829..e53783701c 100644 --- a/packages/fetchai/agents/generic_seller/aea-config.yaml +++ b/packages/fetchai/agents/generic_seller/aea-config.yaml @@ -10,16 +10,16 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_seller:0.13.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/gym_aea/aea-config.yaml b/packages/fetchai/agents/gym_aea/aea-config.yaml index 69a7d2fc18..d18a4ad991 100644 --- a/packages/fetchai/agents/gym_aea/aea-config.yaml +++ b/packages/fetchai/agents/gym_aea/aea-config.yaml @@ -12,10 +12,10 @@ connections: - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 - fetchai/gym:0.6.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/gym:0.8.0 default_connection: fetchai/gym:0.8.0 default_ledger: fetchai diff --git a/packages/fetchai/agents/ml_data_provider/aea-config.yaml b/packages/fetchai/agents/ml_data_provider/aea-config.yaml index ffb8c1b082..d6c4f22331 100644 --- a/packages/fetchai/agents/ml_data_provider/aea-config.yaml +++ b/packages/fetchai/agents/ml_data_provider/aea-config.yaml @@ -9,16 +9,16 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/ledger_api:0.3.0 -- fetchai/ml_trade:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/ledger_api:0.4.0 +- fetchai/ml_trade:0.6.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_seller:0.13.0 - fetchai/ml_data_provider:0.12.0 default_connection: fetchai/p2p_libp2p:0.10.0 @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/ml_model_trainer/aea-config.yaml b/packages/fetchai/agents/ml_model_trainer/aea-config.yaml index 262eaa4b24..b6c7e4f8c6 100644 --- a/packages/fetchai/agents/ml_model_trainer/aea-config.yaml +++ b/packages/fetchai/agents/ml_model_trainer/aea-config.yaml @@ -9,16 +9,16 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/ledger_api:0.3.0 -- fetchai/ml_trade:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/ledger_api:0.4.0 +- fetchai/ml_trade:0.6.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_buyer:0.12.0 - fetchai/ml_train:0.12.0 default_connection: fetchai/p2p_libp2p:0.10.0 @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/my_first_aea/aea-config.yaml b/packages/fetchai/agents/my_first_aea/aea-config.yaml index 91e5e4786a..cab085b44c 100644 --- a/packages/fetchai/agents/my_first_aea/aea-config.yaml +++ b/packages/fetchai/agents/my_first_aea/aea-config.yaml @@ -1,6 +1,6 @@ agent_name: my_first_aea author: fetchai -version: 0.11.0 +version: 0.12.0 description: A simple agent to demo the echo skill. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' @@ -10,10 +10,10 @@ connections: - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: -- fetchai/echo:0.7.0 -- fetchai/error:0.5.0 +- fetchai/echo:0.8.0 +- fetchai/error:0.6.0 default_connection: fetchai/stub:0.9.0 default_ledger: fetchai logging_config: diff --git a/packages/fetchai/agents/simple_service_registration/aea-config.yaml b/packages/fetchai/agents/simple_service_registration/aea-config.yaml index 7762008c7a..6e6d8adceb 100644 --- a/packages/fetchai/agents/simple_service_registration/aea-config.yaml +++ b/packages/fetchai/agents/simple_service_registration/aea-config.yaml @@ -8,15 +8,15 @@ fingerprint: '' fingerprint_ignore_patterns: [] connections: - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/simple_service_registration:0.10.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai @@ -26,4 +26,4 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/tac_controller/aea-config.yaml b/packages/fetchai/agents/tac_controller/aea-config.yaml index 3470e8a73f..9ce1d7381f 100644 --- a/packages/fetchai/agents/tac_controller/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller/aea-config.yaml @@ -8,16 +8,16 @@ fingerprint: {} fingerprint_ignore_patterns: [] connections: - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/oef_search:0.6.0 -- fetchai/tac:0.6.0 +- fetchai/default:0.6.0 +- fetchai/oef_search:0.7.0 +- fetchai/tac:0.7.0 skills: -- fetchai/error:0.5.0 -- fetchai/tac_control:0.7.0 +- fetchai/error:0.6.0 +- fetchai/tac_control:0.8.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: fetchai logging_config: @@ -26,4 +26,4 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index caa12bbff0..0a4302ca0b 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -8,19 +8,19 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/oef:0.9.0 +- fetchai/oef:0.10.0 - fetchai/stub:0.9.0 contracts: - fetchai/erc1155:0.10.0 protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/oef_search:0.6.0 -- fetchai/tac:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/oef_search:0.7.0 +- fetchai/tac:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/tac_control_contract:0.9.0 -default_connection: fetchai/oef:0.9.0 +default_connection: fetchai/oef:0.10.0 default_ledger: ethereum logging_config: disable_existing_loggers: false diff --git a/packages/fetchai/agents/tac_participant/aea-config.yaml b/packages/fetchai/agents/tac_participant/aea-config.yaml index e4180ff1a9..0c2333eece 100644 --- a/packages/fetchai/agents/tac_participant/aea-config.yaml +++ b/packages/fetchai/agents/tac_participant/aea-config.yaml @@ -9,17 +9,17 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: - fetchai/erc1155:0.10.0 protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/oef_search:0.6.0 -- fetchai/tac:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/oef_search:0.7.0 +- fetchai/tac:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/tac_negotiation:0.10.0 - fetchai/tac_participation:0.9.0 default_connection: fetchai/p2p_libp2p:0.10.0 @@ -30,5 +30,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/thermometer_aea/aea-config.yaml b/packages/fetchai/agents/thermometer_aea/aea-config.yaml index f212ebdf5c..f3e7d966b4 100644 --- a/packages/fetchai/agents/thermometer_aea/aea-config.yaml +++ b/packages/fetchai/agents/thermometer_aea/aea-config.yaml @@ -9,16 +9,16 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_seller:0.13.0 - fetchai/thermometer:0.12.0 default_connection: fetchai/p2p_libp2p:0.10.0 @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/thermometer_client/aea-config.yaml b/packages/fetchai/agents/thermometer_client/aea-config.yaml index 02f51acf56..64aa7e7bc6 100644 --- a/packages/fetchai/agents/thermometer_client/aea-config.yaml +++ b/packages/fetchai/agents/thermometer_client/aea-config.yaml @@ -9,16 +9,16 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_buyer:0.12.0 - fetchai/thermometer_client:0.11.0 default_connection: fetchai/p2p_libp2p:0.10.0 @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/weather_client/aea-config.yaml b/packages/fetchai/agents/weather_client/aea-config.yaml index 894da78b40..a86fbf5abb 100644 --- a/packages/fetchai/agents/weather_client/aea-config.yaml +++ b/packages/fetchai/agents/weather_client/aea-config.yaml @@ -9,16 +9,16 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_buyer:0.12.0 - fetchai/weather_client:0.11.0 default_connection: fetchai/p2p_libp2p:0.10.0 @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/agents/weather_station/aea-config.yaml b/packages/fetchai/agents/weather_station/aea-config.yaml index ee6630c2f1..0b892a4102 100644 --- a/packages/fetchai/agents/weather_station/aea-config.yaml +++ b/packages/fetchai/agents/weather_station/aea-config.yaml @@ -9,16 +9,16 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 - fetchai/generic_seller:0.13.0 - fetchai/weather_station:0.12.0 default_connection: fetchai/p2p_libp2p:0.10.0 @@ -29,5 +29,5 @@ logging_config: private_key_paths: {} registry_path: ../packages default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 diff --git a/packages/fetchai/connections/http_client/README.md b/packages/fetchai/connections/http_client/README.md index f4080b1cc0..0686f336e5 100644 --- a/packages/fetchai/connections/http_client/README.md +++ b/packages/fetchai/connections/http_client/README.md @@ -4,4 +4,4 @@ This connection wraps an HTTP client. It consumes messages from the AEA, transla ## Usage -First, add the connection to your AEA project (`aea add connection fetchai/http_client:0.8.0`). Then, update the `config` in `connection.yaml` by providing a `host` and `port` of the server. +First, add the connection to your AEA project (`aea add connection fetchai/http_client:0.9.0`). Then, update the `config` in `connection.yaml` by providing a `host` and `port` of the server. diff --git a/packages/fetchai/connections/http_client/connection.py b/packages/fetchai/connections/http_client/connection.py index 72ed44788f..3c86c22d22 100644 --- a/packages/fetchai/connections/http_client/connection.py +++ b/packages/fetchai/connections/http_client/connection.py @@ -47,7 +47,7 @@ NOT_FOUND = 404 REQUEST_TIMEOUT = 408 SERVER_ERROR = 500 -PUBLIC_ID = PublicId.from_str("fetchai/http_client:0.8.0") +PUBLIC_ID = PublicId.from_str("fetchai/http_client:0.9.0") logger = logging.getLogger("aea.packages.fetchai.connections.http_client") diff --git a/packages/fetchai/connections/http_client/connection.yaml b/packages/fetchai/connections/http_client/connection.yaml index 462f0c8937..dd5d64ad4c 100644 --- a/packages/fetchai/connections/http_client/connection.yaml +++ b/packages/fetchai/connections/http_client/connection.yaml @@ -1,25 +1,25 @@ name: http_client author: fetchai -version: 0.8.0 +version: 0.9.0 type: connection description: The HTTP_client connection that wraps a web-based client connecting to a RESTful API specification. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmXfZJPAh4Ujt3xj8xzd6ng6HbrpJQUuvjWe8DNQSwSKWU + README.md: QmV5yDm9hsPKzhW3xA8GgViryhbwGEcRSqxwtrEzFm1fuQ __init__.py: QmPdKAks8A6XKAgZiopJzPZYXJumTeUqChd8UorqmLQQPU - connection.py: QmW9DVSJwTdD8BkjiZc8fYa2ndHVCy6HepFpmnX8H8TVMH + connection.py: QmPWU31DeNecH9Ch62hFZ5a1peEk5p7UXYj2qRgm3TBLFD fingerprint_ignore_patterns: [] protocols: -- fetchai/http:0.5.0 +- fetchai/http:0.6.0 class_name: HTTPClientConnection config: host: 127.0.0.1 port: 8000 excluded_protocols: [] restricted_to_protocols: -- fetchai/http:0.5.0 +- fetchai/http:0.6.0 dependencies: aiohttp: version: '>=3.6.2,<3.7' diff --git a/packages/fetchai/connections/http_server/README.md b/packages/fetchai/connections/http_server/README.md index 80680ce445..20aee30556 100644 --- a/packages/fetchai/connections/http_server/README.md +++ b/packages/fetchai/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.8.0`). Then, update the `config` in `connection.yaml` by providing a `host` and `port` of the server. Optionally, provide a path to an [OpenAPI spec](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 fetchai/http_server:0.9.0`). Then, update the `config` in `connection.yaml` by providing a `host` and `port` of the server. Optionally, provide a path to an [OpenAPI spec](https://swagger.io/docs/specification/about/) for request validation. \ No newline at end of file diff --git a/packages/fetchai/connections/http_server/connection.py b/packages/fetchai/connections/http_server/connection.py index 9655657e13..c906ca6960 100644 --- a/packages/fetchai/connections/http_server/connection.py +++ b/packages/fetchai/connections/http_server/connection.py @@ -66,7 +66,7 @@ _default_logger = logging.getLogger("aea.packages.fetchai.connections.http_server") RequestId = DialogueLabel -PUBLIC_ID = PublicId.from_str("fetchai/http_server:0.8.0") +PUBLIC_ID = PublicId.from_str("fetchai/http_server:0.9.0") class HttpDialogues(BaseHttpDialogues): diff --git a/packages/fetchai/connections/http_server/connection.yaml b/packages/fetchai/connections/http_server/connection.yaml index 9f5b628ccb..d9db65c7dd 100644 --- a/packages/fetchai/connections/http_server/connection.yaml +++ b/packages/fetchai/connections/http_server/connection.yaml @@ -1,18 +1,18 @@ name: http_server author: fetchai -version: 0.8.0 +version: 0.9.0 type: connection description: The HTTP server connection that wraps http server implementing a RESTful API specification. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmTmQcnUPKaDHHJHngBFXnUVPdgBLanP9DbjVHZT55Scfn + README.md: QmUeXiba13kjgsW8EMYvWnMYb6GzSirTPyr3L2dLU4J9gT __init__.py: Qmb6JEAkJeb5JweqrSGiGoQp1vGXqddjGgb9WMkm2phTgA - connection.py: QmNxiS2h8QhqraJTiNdrGtM7BNCxiFfZvgdaWK9T1ghgxj + connection.py: QmPjqaEpWNRM412ZbxCN2dp3qUM1jTEYmhABbYUDejTm6w fingerprint_ignore_patterns: [] protocols: -- fetchai/http:0.5.0 +- fetchai/http:0.6.0 class_name: HTTPServerConnection config: api_spec_path: '' @@ -20,7 +20,7 @@ config: port: 8000 excluded_protocols: [] restricted_to_protocols: -- fetchai/http:0.5.0 +- fetchai/http:0.6.0 dependencies: aiohttp: version: '>=3.6.2,<3.7' diff --git a/packages/fetchai/connections/ledger/README.md b/packages/fetchai/connections/ledger/README.md index 807387e685..0da1b56662 100644 --- a/packages/fetchai/connections/ledger/README.md +++ b/packages/fetchai/connections/ledger/README.md @@ -2,7 +2,7 @@ The ledger connection wraps the APIs needed to interact with multiple ledgers, including smart contracts deployed on those ledgers. -The AEA communicates with the ledger connection via the `fetchai/ledger_api:0.3.0` and `fetchai/contract_api:0.5.0` protocols. +The AEA communicates with the ledger connection via the `fetchai/ledger_api:0.4.0` and `fetchai/contract_api:0.5.0` protocols. The connection uses the ledger apis registered in the ledger api registry. diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index abf2098efc..63641cb273 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -6,7 +6,7 @@ description: A connection to interact with any ledger API and contract API. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmfQN7UK1M4pBUzKVzPannPLVi8iiULKHNtJ7XpoWpjqfc + README.md: QmY6YCoxyUXSwQzFvNPKd3nfHaoMsjCLCZAvTGSGwZnZbP __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj base.py: QmNnSBVmVgdDFwzqDUncwLHeyDfMEfmvujJdKbdGNGH4Be connection.py: Qmdibf99GzdFjFCcoTX7AiiBVWznKvPZWvur8cngSRNdye @@ -15,7 +15,7 @@ fingerprint: fingerprint_ignore_patterns: [] protocols: - fetchai/contract_api:0.5.0 -- fetchai/ledger_api:0.3.0 +- fetchai/ledger_api:0.4.0 class_name: LedgerConnection config: ledger_apis: @@ -27,5 +27,5 @@ config: excluded_protocols: [] restricted_to_protocols: - fetchai/contract_api:0.5.0 -- fetchai/ledger_api:0.3.0 +- fetchai/ledger_api:0.4.0 dependencies: {} diff --git a/packages/fetchai/connections/local/connection.py b/packages/fetchai/connections/local/connection.py index 53c10fe68c..db08d23349 100644 --- a/packages/fetchai/connections/local/connection.py +++ b/packages/fetchai/connections/local/connection.py @@ -47,7 +47,7 @@ RESPONSE_TARGET = MESSAGE_ID RESPONSE_MESSAGE_ID = MESSAGE_ID + 1 STUB_DIALOGUE_ID = 0 -PUBLIC_ID = PublicId.from_str("fetchai/local:0.8.0") +PUBLIC_ID = PublicId.from_str("fetchai/local:0.9.0") class OefSearchDialogues(BaseOefSearchDialogues): @@ -181,7 +181,7 @@ async def _handle_envelope(self, envelope: Envelope) -> None: :param envelope: the envelope :return: None """ - if envelope.protocol_id == ProtocolId.from_str("fetchai/oef_search:0.6.0"): + if envelope.protocol_id == ProtocolId.from_str("fetchai/oef_search:0.7.0"): await self._handle_oef_message(envelope) else: await self._handle_agent_message(envelope) diff --git a/packages/fetchai/connections/local/connection.yaml b/packages/fetchai/connections/local/connection.yaml index 625d62d1ef..4f86525679 100644 --- a/packages/fetchai/connections/local/connection.yaml +++ b/packages/fetchai/connections/local/connection.yaml @@ -1,6 +1,6 @@ name: local author: fetchai -version: 0.8.0 +version: 0.9.0 type: connection description: The local connection provides a stub for an OEF node. license: Apache-2.0 @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmbK7MtyAVqh2LmSh9TY6yBZqfWaAXURP4rQGATyP2hTKC __init__.py: QmeeoX5E38Ecrb1rLdeFyyxReHLrcJoETnBcPbcNWVbiKG - connection.py: QmXtme7q9RZaLb53Gjsv2GcBg1XfrPGZprzxu2eNHyFdFY + connection.py: QmUVta4sBNBna7bmhpa1aV8nfHrUQ6e8GsV5758GJT5BT9 fingerprint_ignore_patterns: [] protocols: -- fetchai/oef_search:0.6.0 +- fetchai/oef_search:0.7.0 class_name: OEFLocalConnection config: {} excluded_protocols: [] diff --git a/packages/fetchai/connections/oef/README.md b/packages/fetchai/connections/oef/README.md index 4e30cbd2ba..3f6b09fce2 100644 --- a/packages/fetchai/connections/oef/README.md +++ b/packages/fetchai/connections/oef/README.md @@ -4,4 +4,4 @@ Connection to interact with an OEF node (https://fetchai.github.io/oef-sdk-pytho ## Usage -Register/unregister services, perform searches using `fetchai/oef_search:0.6.0` protocol and send messages of any protocol to other agents connected to the same node. \ No newline at end of file +Register/unregister services, perform searches using `fetchai/oef_search:0.7.0` protocol and send messages of any protocol to other agents connected to the same node. \ No newline at end of file diff --git a/packages/fetchai/connections/oef/connection.py b/packages/fetchai/connections/oef/connection.py index 124d6ad822..b99a6ff66f 100644 --- a/packages/fetchai/connections/oef/connection.py +++ b/packages/fetchai/connections/oef/connection.py @@ -59,7 +59,7 @@ STUB_MESSAGE_ID = 0 STUB_DIALOGUE_ID = 0 DEFAULT_OEF = "oef" -PUBLIC_ID = PublicId.from_str("fetchai/oef:0.9.0") +PUBLIC_ID = PublicId.from_str("fetchai/oef:0.10.0") class OefSearchDialogue(BaseOefSearchDialogue): @@ -411,7 +411,7 @@ def send(self, envelope: Envelope) -> None: ) raise ValueError("Cannot send message.") - if envelope.protocol_id == PublicId.from_str("fetchai/oef_search:0.6.0"): + if envelope.protocol_id == PublicId.from_str("fetchai/oef_search:0.7.0"): self.send_oef_message(envelope) else: self.send_default_message(envelope) diff --git a/packages/fetchai/connections/oef/connection.yaml b/packages/fetchai/connections/oef/connection.yaml index 807f12d66e..d788e1ffa1 100644 --- a/packages/fetchai/connections/oef/connection.yaml +++ b/packages/fetchai/connections/oef/connection.yaml @@ -1,20 +1,20 @@ name: oef author: fetchai -version: 0.9.0 +version: 0.10.0 type: connection description: The oef connection provides a wrapper around the OEF SDK for connection with the OEF search and communication node. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmVHWxThR1u9a4BEm89oCxUTPGnN6PznvNgo6oZLqDD3n5 + README.md: Qma1rPtWWsKVgrutuRKqtP4uCzhs6ZDRbwLFaH5DF75KZs __init__.py: QmUAen8tmoBHuCerjA3FSGKJRLG6JYyUS3chuWzPxKYzez - connection.py: QmfDKjDageCc4Pxdqokw7s2foEgwrWnoexcdHL9PcVWS45 + connection.py: QmNgAS6quG3NJtrTBQa6d4g4s1oMuFpXUiPb5FY2d85tX9 object_translator.py: QmZbRaJgFC1RKDA8hox6xTpqmrpTbp8SyYQoKarTmS5HwG fingerprint_ignore_patterns: [] protocols: -- fetchai/default:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/oef_search:0.7.0 class_name: OEFConnection config: addr: 127.0.0.1 diff --git a/packages/fetchai/connections/p2p_stub/README.md b/packages/fetchai/connections/p2p_stub/README.md index f72f38a289..5116ec9244 100644 --- a/packages/fetchai/connections/p2p_stub/README.md +++ b/packages/fetchai/connections/p2p_stub/README.md @@ -4,6 +4,6 @@ Simple file based connection to perform interaction between multiple local agent ## Usage -First, add the connection to your AEA project: `aea add connection fetchai/p2p_stub:0.6.0`. +First, add the connection to your AEA project: `aea add connection fetchai/p2p_stub:0.7.0`. Optionally, in the `connection.yaml` file under `config` set the `namespace_dir` to the desired file path. The `p2p_stub` connection reads encoded envelopes from its input file and writes encoded envelopes to its output file. Multiple agents can be pointed to the same `namespace_dir` and are then able to exchange envelopes via the file system. diff --git a/packages/fetchai/connections/p2p_stub/connection.py b/packages/fetchai/connections/p2p_stub/connection.py index 868ef46cb8..b24e1ceebf 100644 --- a/packages/fetchai/connections/p2p_stub/connection.py +++ b/packages/fetchai/connections/p2p_stub/connection.py @@ -29,7 +29,7 @@ from aea.mail.base import Envelope -PUBLIC_ID = PublicId.from_str("fetchai/p2p_stub:0.6.0") +PUBLIC_ID = PublicId.from_str("fetchai/p2p_stub:0.7.0") class P2PStubConnection(StubConnection): diff --git a/packages/fetchai/connections/p2p_stub/connection.yaml b/packages/fetchai/connections/p2p_stub/connection.yaml index cd89b62ea5..94f70002ba 100644 --- a/packages/fetchai/connections/p2p_stub/connection.yaml +++ b/packages/fetchai/connections/p2p_stub/connection.yaml @@ -1,15 +1,15 @@ name: p2p_stub author: fetchai -version: 0.6.0 +version: 0.7.0 type: connection description: The stub p2p connection implements a local p2p connection allowing agents to communicate with each other through files created in the namespace directory. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmbAStnFJj6jMTwqNu7DG9dt2uy5JGrGhKtCbYuAhWLBCk + README.md: QmW9vG1qAt8hjycMMK6LUFNaDp52KnakgjbRrTCMCRTnNW __init__.py: QmW9XFKGsea4u3fupkFMcQutgsjqusCMBMyTcTmLLmQ4tR - connection.py: QmVcCQYuXoXbYUVDi3BBarf6fxeg9GjKYkr814CMGUq3UW + connection.py: QmbeuHyjBW7PjEuZXGr9BsLTmV5WEe6YE9sNYszX7iirek fingerprint_ignore_patterns: [] protocols: [] class_name: P2PStubConnection diff --git a/packages/fetchai/connections/soef/README.md b/packages/fetchai/connections/soef/README.md index 14c6d3d3f1..10cdfc89b8 100644 --- a/packages/fetchai/connections/soef/README.md +++ b/packages/fetchai/connections/soef/README.md @@ -4,6 +4,6 @@ The SOEF connection is used to connect to an SOEF node. The SOEF provides OEF se ## Usage -First, add the connection to your AEA project: `aea add connection fetchai/soef:0.8.0`. Then ensure the `config` in `connection.yaml` matches your need. In particular, make sure `chain_identifier` matches your `default_ledger`. +First, add the connection to your AEA project: `aea add connection fetchai/soef:0.9.0`. Then ensure the `config` in `connection.yaml` matches your need. In particular, make sure `chain_identifier` matches your `default_ledger`. -To register/unregister services and perform searches use the `fetchai/oef_search:0.6.0` protocol \ No newline at end of file +To register/unregister services and perform searches use the `fetchai/oef_search:0.7.0` protocol \ No newline at end of file diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index b6dd3a9a14..61764a7a6a 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -64,7 +64,7 @@ _default_logger = logging.getLogger("aea.packages.fetchai.connections.oef") -PUBLIC_ID = PublicId.from_str("fetchai/soef:0.8.0") +PUBLIC_ID = PublicId.from_str("fetchai/soef:0.9.0") NOT_SPECIFIED = object() @@ -1095,7 +1095,7 @@ def __init__(self, **kwargs): if kwargs.get("configuration") is None: # pragma: nocover kwargs["excluded_protocols"] = kwargs.get("excluded_protocols") or [] kwargs["restricted_to_protocols"] = kwargs.get("excluded_protocols") or [ - PublicId.from_str("fetchai/oef_search:0.6.0") + PublicId.from_str("fetchai/oef_search:0.7.0") ] super().__init__(**kwargs) diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index 5e40dea962..1c74d5b68d 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -1,17 +1,17 @@ name: soef author: fetchai -version: 0.8.0 +version: 0.9.0 type: connection description: The soef connection provides a connection api to the simple OEF. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmWwjETX39APP9RD5oVPeeCiDnUoDvjAcoVe2FK2Jc6anM + README.md: QmS9zorTodmaRyaxocELEwEqHEPowKoG9wgSAak7s59rZD __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmYzSA9zWn4r3kdBxvV1TGeqb1oGKCuvHruoH8Nkexneb7 + connection.py: QmQ1yNBGWB8driD2bFokLYjmKUJ2FWQhPfWxYLGEHCAfC8 fingerprint_ignore_patterns: [] protocols: -- fetchai/oef_search:0.6.0 +- fetchai/oef_search:0.7.0 class_name: SOEFConnection config: api_key: TwiCIriSl0mLahw17pyqoA @@ -20,6 +20,6 @@ config: soef_port: 9002 excluded_protocols: [] restricted_to_protocols: -- fetchai/oef_search:0.6.0 +- fetchai/oef_search:0.7.0 dependencies: defusedxml: {} diff --git a/packages/fetchai/connections/tcp/README.md b/packages/fetchai/connections/tcp/README.md index e2487613c0..1b933ee4af 100644 --- a/packages/fetchai/connections/tcp/README.md +++ b/packages/fetchai/connections/tcp/README.md @@ -4,4 +4,4 @@ A simple TCP client/server connection to use the TCP protocol for sending and re ## Usage -Add the connection to your AEA project: `aea add connection fetchai/tcp:0.7.0`. +Add the connection to your AEA project: `aea add connection fetchai/tcp:0.8.0`. diff --git a/packages/fetchai/connections/tcp/base.py b/packages/fetchai/connections/tcp/base.py index dc5bddd500..48be8f5012 100644 --- a/packages/fetchai/connections/tcp/base.py +++ b/packages/fetchai/connections/tcp/base.py @@ -31,7 +31,7 @@ logger = logging.getLogger("aea.packages.fetchai.connections.tcp") -PUBLIC_ID = PublicId.from_str("fetchai/tcp:0.7.0") +PUBLIC_ID = PublicId.from_str("fetchai/tcp:0.8.0") class TCPConnection(Connection, ABC): diff --git a/packages/fetchai/connections/tcp/connection.yaml b/packages/fetchai/connections/tcp/connection.yaml index 0e740d4432..92863a30ee 100644 --- a/packages/fetchai/connections/tcp/connection.yaml +++ b/packages/fetchai/connections/tcp/connection.yaml @@ -1,14 +1,14 @@ name: tcp author: fetchai -version: 0.7.0 +version: 0.8.0 type: connection description: The tcp connection implements a tcp server and client. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmVtv8cSd49aAYHFjbCdmvJJoD4mPCuG5PR7QKXxcAquJw + README.md: Qmf1JEZWHRcP8jecLrQ4tGxCdmYLEzhnRJqpZqJmpfNDxZ __init__.py: QmTxAtQ9ffraStxxLAkvmWxyGhoV3jE16Sw6SJ9xzTthLb - base.py: Qmf3rJCzi6dmEXa87X1HpZRqWvuirAykeTnNyEt5SKzLJ9 + base.py: QmT8ZwAGWNAibUvnucaM2jiPu6ixPfaG14YKuXSaRp6b2b connection.py: QmcQnyUagAhE7UsSBxiBSqsuF4mTMdU26LZLhUhdq5QygR tcp_client.py: QmfTTuC41Wp8dRBeNJWXKa6ryu98TRT8H3oSCFmvfypCEy tcp_server.py: QmZ8tNfGzqNepjjspMfjWdwsGX2Afj56nSEdyAJfdHcHqS diff --git a/packages/fetchai/connections/webhook/README.md b/packages/fetchai/connections/webhook/README.md index 306c158e06..562a56a87f 100644 --- a/packages/fetchai/connections/webhook/README.md +++ b/packages/fetchai/connections/webhook/README.md @@ -4,4 +4,4 @@ An HTTP webhook connection which registers a webhook and waits for incoming requ ## Usage -First, add the connection to your AEA project: `aea add connection fetchai/webhook:0.6.0`. Then ensure the `config` in `connection.yaml` matches your need. In particular, set `webhook_address`, `webhook_port` and `webhook_url_path` appropriately. +First, add the connection to your AEA project: `aea add connection fetchai/webhook:0.7.0`. Then ensure the `config` in `connection.yaml` matches your need. In particular, set `webhook_address`, `webhook_port` and `webhook_url_path` appropriately. diff --git a/packages/fetchai/connections/webhook/connection.py b/packages/fetchai/connections/webhook/connection.py index 18d65e6d1a..a3b923a14d 100644 --- a/packages/fetchai/connections/webhook/connection.py +++ b/packages/fetchai/connections/webhook/connection.py @@ -42,7 +42,7 @@ NOT_FOUND = 404 REQUEST_TIMEOUT = 408 SERVER_ERROR = 500 -PUBLIC_ID = PublicId.from_str("fetchai/webhook:0.6.0") +PUBLIC_ID = PublicId.from_str("fetchai/webhook:0.7.0") _default_logger = logging.getLogger("aea.packages.fetchai.connections.webhook") diff --git a/packages/fetchai/connections/webhook/connection.yaml b/packages/fetchai/connections/webhook/connection.yaml index ca03a8df41..f89110fe3f 100644 --- a/packages/fetchai/connections/webhook/connection.yaml +++ b/packages/fetchai/connections/webhook/connection.yaml @@ -1,17 +1,17 @@ name: webhook author: fetchai -version: 0.6.0 +version: 0.7.0 type: connection description: The webhook connection that wraps a webhook functionality. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmQDqfKKsksKsUqdqTcYe8P8Fw3MGovVuZBFHPbhupkkxf + README.md: QmX8P6hQej8CDXxbALfad9199k63JQAY7YQ23cDr9fQirG __init__.py: QmWUKSmXaBgGMvKgdmzKmMjCx43BnrfW6og2n3afNoAALq - connection.py: QmVZv722GNjJkXxQSnvVBQgWCTnG2uBfAVAkgvn2E5qWzX + connection.py: QmRxk2Kf7vufXvQA6chasUzAQaqQKoojWd1EHNLxhb8UoJ fingerprint_ignore_patterns: [] protocols: -- fetchai/http:0.5.0 +- fetchai/http:0.6.0 class_name: WebhookConnection config: webhook_address: 127.0.0.1 @@ -19,7 +19,7 @@ config: webhook_url_path: /some/url/path excluded_protocols: [] restricted_to_protocols: -- fetchai/http:0.5.0 +- fetchai/http:0.6.0 dependencies: aiohttp: version: ==3.6.2 diff --git a/packages/fetchai/protocols/fipa/README.md b/packages/fetchai/protocols/fipa/README.md index 186a559a8e..fd4f8577de 100644 --- a/packages/fetchai/protocols/fipa/README.md +++ b/packages/fetchai/protocols/fipa/README.md @@ -10,7 +10,7 @@ This is a protocol for two agents to negotiate over a fixed set of resources. --- name: fipa author: fetchai -version: 0.6.0 +version: 0.7.0 description: A protocol for FIPA ACL. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/packages/fetchai/protocols/fipa/message.py b/packages/fetchai/protocols/fipa/message.py index 57f781e3ac..84fb9195d4 100644 --- a/packages/fetchai/protocols/fipa/message.py +++ b/packages/fetchai/protocols/fipa/message.py @@ -40,7 +40,7 @@ class FipaMessage(Message): """A protocol for FIPA ACL.""" - protocol_id = ProtocolId.from_str("fetchai/fipa:0.6.0") + protocol_id = ProtocolId.from_str("fetchai/fipa:0.7.0") Description = CustomDescription diff --git a/packages/fetchai/protocols/fipa/protocol.yaml b/packages/fetchai/protocols/fipa/protocol.yaml index 93295d63a5..20f15ddbad 100644 --- a/packages/fetchai/protocols/fipa/protocol.yaml +++ b/packages/fetchai/protocols/fipa/protocol.yaml @@ -1,18 +1,18 @@ name: fipa author: fetchai -version: 0.6.0 +version: 0.7.0 type: protocol description: A protocol for FIPA ACL. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmRwxwzxfhotek7WUbyAeufBvoHpWbDwfUVMy3FKitiHKy + README.md: QmZAX3MEPFvQSmDqu1mLoEe3gWxfkH2VDFHN3dB99A4Z5d __init__.py: QmR6pcWX14FsQip4eYJRNeiQdrNMPj6y4m6Tsgd6hd7yU6 custom_types.py: Qmf72KRbkNsxxAHwMtkmJc5TRL23fU7AuzJAdSTftckwJQ dialogues.py: QmWaciW35ZTVeTeLWeyp3hjehKkWB5ZY7Di8N8cDH8Mjwb fipa.proto: QmP7JqnuQSQ9BDcKkscrTydKEX4wFBoyFaY1bkzGkamcit fipa_pb2.py: QmZMkefJLrb3zJKoimb6a9tdpxDBhc8rR2ghimqg7gZ471 - message.py: QmSnzY8G89gUsgo21wF2TxnjZr7czba9a7HEfLpWg9tqQq + message.py: Qmc32ZmhrmT7FX6EVPwR899BkN8HMivtRHpnkQWkRThXYU serialization.py: QmQMb8F8hJm1gkJFSPPCtDAoxSX3bFkshtzRgDWfWB8ynd fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/http/README.md b/packages/fetchai/protocols/http/README.md index fc76580aa9..a0997cc18a 100644 --- a/packages/fetchai/protocols/http/README.md +++ b/packages/fetchai/protocols/http/README.md @@ -10,7 +10,7 @@ This is a protocol for interacting with a client/server via HTTP requests and re --- name: http author: fetchai -version: 0.5.0 +version: 0.6.0 description: A protocol for HTTP requests and responses. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/packages/fetchai/protocols/http/message.py b/packages/fetchai/protocols/http/message.py index e1facfecc5..94ea11e63b 100644 --- a/packages/fetchai/protocols/http/message.py +++ b/packages/fetchai/protocols/http/message.py @@ -35,7 +35,7 @@ class HttpMessage(Message): """A protocol for HTTP requests and responses.""" - protocol_id = ProtocolId.from_str("fetchai/http:0.5.0") + protocol_id = ProtocolId.from_str("fetchai/http:0.6.0") class Performative(Message.Performative): """Performatives for the http protocol.""" diff --git a/packages/fetchai/protocols/http/protocol.yaml b/packages/fetchai/protocols/http/protocol.yaml index 9fd9a926a5..87cb1647ff 100644 --- a/packages/fetchai/protocols/http/protocol.yaml +++ b/packages/fetchai/protocols/http/protocol.yaml @@ -1,17 +1,17 @@ name: http author: fetchai -version: 0.5.0 +version: 0.6.0 type: protocol description: A protocol for HTTP requests and responses. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmY7fxhyNBgwU7uc6LKtCN4aSQ4bym5BwqtwRAfwPokULN + README.md: QmYCacuyAELFigc3AvDAD5vm4iGZjan6QEk3dbksGvtFcM __init__.py: QmWzgWYrnS7PhjYrrx2mykLoaCbb7rDnVRcDqifsRukTy4 dialogues.py: QmdwTehjCppcxyDid8m6zuHY5YwprUhato88R9Zdm9aXaM http.proto: QmdTUTvvxGxMxSTB67AXjMUSDLdsxBYiSuJNVxHuLKB1jS http_pb2.py: QmYYKqdwiueq54EveL9WXn216FXLSQ6XGJJHoiJxwJjzHC - message.py: QmcZaEZbRbcx5U5KVEi2QTr6BVyHGDXcRrSqKhpngXRZ15 + message.py: QmPB7CZ8hzvoN4s1sDLPiWdYfhKPVKQDM2jMPZtbW5TCAJ serialization.py: QmTq34k2PD6Ybhk8x1EboY3UcNp8r3H6Tb3egZsWJN9nFv fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/ledger_api/README.md b/packages/fetchai/protocols/ledger_api/README.md index c7d736e30f..8d45d848d3 100644 --- a/packages/fetchai/protocols/ledger_api/README.md +++ b/packages/fetchai/protocols/ledger_api/README.md @@ -10,7 +10,7 @@ This is a protocol for interacting with ledger APIs. --- name: ledger_api author: fetchai -version: 0.3.0 +version: 0.4.0 description: A protocol for ledger APIs requests and responses. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/packages/fetchai/protocols/ledger_api/message.py b/packages/fetchai/protocols/ledger_api/message.py index ef64a3fcf8..414cde154a 100644 --- a/packages/fetchai/protocols/ledger_api/message.py +++ b/packages/fetchai/protocols/ledger_api/message.py @@ -49,7 +49,7 @@ class LedgerApiMessage(Message): """A protocol for ledger APIs requests and responses.""" - protocol_id = ProtocolId.from_str("fetchai/ledger_api:0.3.0") + protocol_id = ProtocolId.from_str("fetchai/ledger_api:0.4.0") RawTransaction = CustomRawTransaction diff --git a/packages/fetchai/protocols/ledger_api/protocol.yaml b/packages/fetchai/protocols/ledger_api/protocol.yaml index b08f57e1c4..30e6f0e21e 100644 --- a/packages/fetchai/protocols/ledger_api/protocol.yaml +++ b/packages/fetchai/protocols/ledger_api/protocol.yaml @@ -1,18 +1,18 @@ name: ledger_api author: fetchai -version: 0.3.0 +version: 0.4.0 type: protocol description: A protocol for ledger APIs requests and responses. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmSoo6ds8mKhtoG8CBbu9rb9yj7sqeeuBfcU7CLj584uRX + README.md: QmRxa7K9cDbKyBMK5yWuoAPc3dKB1jinUv78dkbPJfstjM __init__.py: QmX6ta6j6ust7qhVk1kZygzZK3gTTg7hSCBbSMKUxJgWgG custom_types.py: QmWRrvFStMhVJy8P2WD6qjDgk14ZnxErN7XymxUtof7HQo dialogues.py: QmRtWkAfR9WTvygMJ36R758RzdY2mGQs2fgtHCfjxmeaHy ledger_api.proto: QmfLcv7jJcGJ1gAdCMqsyxJcRud7RaTWteSXHL5NvGuViP ledger_api_pb2.py: QmQhM848REJTDKDoiqxkTniChW8bNNm66EtwMRkvVdbMry - message.py: QmNnb5uwsWZjQizDnuTwCAw1sGmmiARLeesTVDE4nLJi7j + message.py: QmQz3Kf3JqQ8Zv7Y2TM8HQ3vHASn6EPc2zfdF9EfXZERNi serialization.py: QmRuTqH9t9JtsnpWX5wpC438DdRxWKiqAB2u9fvQ2oy1GE fingerprint_ignore_patterns: [] dependencies: diff --git a/packages/fetchai/protocols/ml_trade/README.md b/packages/fetchai/protocols/ml_trade/README.md index 068774302c..0a2dbf8448 100644 --- a/packages/fetchai/protocols/ml_trade/README.md +++ b/packages/fetchai/protocols/ml_trade/README.md @@ -10,7 +10,7 @@ This is a protocol for trading data for training and prediction purposes. --- name: ml_trade author: fetchai -version: 0.5.0 +version: 0.6.0 description: A protocol for trading data for training and prediction purposes. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/packages/fetchai/protocols/ml_trade/message.py b/packages/fetchai/protocols/ml_trade/message.py index 7cf62d08ed..b4cd6b46a3 100644 --- a/packages/fetchai/protocols/ml_trade/message.py +++ b/packages/fetchai/protocols/ml_trade/message.py @@ -40,7 +40,7 @@ class MlTradeMessage(Message): """A protocol for trading data for training and prediction purposes.""" - protocol_id = ProtocolId.from_str("fetchai/ml_trade:0.5.0") + protocol_id = ProtocolId.from_str("fetchai/ml_trade:0.6.0") Description = CustomDescription diff --git a/packages/fetchai/protocols/ml_trade/protocol.yaml b/packages/fetchai/protocols/ml_trade/protocol.yaml index b519b0114f..fc84c1f186 100644 --- a/packages/fetchai/protocols/ml_trade/protocol.yaml +++ b/packages/fetchai/protocols/ml_trade/protocol.yaml @@ -1,16 +1,16 @@ name: ml_trade author: fetchai -version: 0.5.0 +version: 0.6.0 type: protocol description: A protocol for trading data for training and prediction purposes. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmSRtzACMh3x3LSjYqWXWTpYpE4C7G8EHbW4zQQoMFFZ4K + README.md: QmdL1CDvD1fQH112oqefGxiTB4RXRxRYr9vfZMXEZDS1Dj __init__.py: QmcCS9uUQTTS2w85dTNiN5rQ14wyBhmBkr7pPPPcbLphcn custom_types.py: QmPa6mxbN8WShsniQxJACfzAPRjGzYLbUFGoVU4N9DewUw dialogues.py: QmVvP34aKWEtHrKmccNMvEdDnx5B7xpE5aEGzr6GU2u8UK - message.py: QmZ8HzNw27TdxoZBHRf1YJheACo7kU6n1497DYgxjbCwZu + message.py: Qmb1Z2wXMR1SVGFVezRaPogyhnmvrGmdY9ZEU4pr2vRKiq ml_trade.proto: QmeB21MQduEGQCrtiYZQzPpRqHL4CWEkvvcaKZ9GsfE8f6 ml_trade_pb2.py: QmZVvugPysR1og6kWCJkvo3af2s9pQRHfuj4BptE7gU1EU serialization.py: QmTamQzo8ZNM6T7QnsA7qNzs2uJ7CHTUczzCsHwU9Q6Z5K diff --git a/packages/fetchai/protocols/oef_search/README.md b/packages/fetchai/protocols/oef_search/README.md index 9ab8c67a1f..4972b642e2 100644 --- a/packages/fetchai/protocols/oef_search/README.md +++ b/packages/fetchai/protocols/oef_search/README.md @@ -11,7 +11,7 @@ It allows for registering of agents and services, and searching of agents and se --- name: oef_search author: fetchai -version: 0.6.0 +version: 0.7.0 description: A protocol for interacting with an OEF search service. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' diff --git a/packages/fetchai/protocols/oef_search/message.py b/packages/fetchai/protocols/oef_search/message.py index 824e80d505..75bb56b7a7 100644 --- a/packages/fetchai/protocols/oef_search/message.py +++ b/packages/fetchai/protocols/oef_search/message.py @@ -46,7 +46,7 @@ class OefSearchMessage(Message): """A protocol for interacting with an OEF search service.""" - protocol_id = ProtocolId.from_str("fetchai/oef_search:0.6.0") + protocol_id = ProtocolId.from_str("fetchai/oef_search:0.7.0") AgentsInfo = CustomAgentsInfo diff --git a/packages/fetchai/protocols/oef_search/protocol.yaml b/packages/fetchai/protocols/oef_search/protocol.yaml index 4ab18b4d2f..ebf61fc6c5 100644 --- a/packages/fetchai/protocols/oef_search/protocol.yaml +++ b/packages/fetchai/protocols/oef_search/protocol.yaml @@ -1,16 +1,16 @@ name: oef_search author: fetchai -version: 0.6.0 +version: 0.7.0 type: protocol description: A protocol for interacting with an OEF search service. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmaGSTqxvQFKccBnLovhBbfSH3C3Sorrj7kFyZqW9qptLa + README.md: QmUYKYTTvPQWDHgB2N8LLKquwgGEA8vEoDYroCEEcGSugy __init__.py: Qmdr5ks5X4YtnpH6yKUcNu9uouyv3EGmrKFhyvNH7ZBjvT custom_types.py: QmYAkKYj9gGHaij7uTejoJe9KRhNcsU4sJC1utMfhUYhg3 dialogues.py: QmQPLnW3jAs6tLLmhkX4C7texGRHM9bfdjs83dUH5TkJ4v - message.py: QmWFvjX7spNHQx6QQevBRXmFyJBuenyAPYAjxVLYvKdC7B + message.py: QmRTyiB6yaN1rwvZ412dMNdTwRGy3U3HSC4xN8k5La3Nr1 oef_search.proto: QmNU8WsxT6XNFFneKKeDaZkNn3CEFDfZQkmKv9TyhyxzDB oef_search_pb2.py: QmSAFT1xxYRzJU6h1aFVDuYcx672sZ2vzV6c2ico7f4BLK serialization.py: QmU3ipyvogbpkFuQki6xqscdiPahDVYw4sBaPHaH3LVvwJ diff --git a/packages/fetchai/protocols/tac/README.md b/packages/fetchai/protocols/tac/README.md index 7f10c50f17..286ad842ef 100644 --- a/packages/fetchai/protocols/tac/README.md +++ b/packages/fetchai/protocols/tac/README.md @@ -10,7 +10,7 @@ This is a protocol for participating in a Trading Agent Competition (TAC). --- name: tac author: fetchai -version: 0.6.0 +version: 0.7.0 description: The tac protocol implements the messages an AEA needs to participate in the TAC. license: Apache-2.0 diff --git a/packages/fetchai/protocols/tac/message.py b/packages/fetchai/protocols/tac/message.py index 29a6c32f5c..c06c9e6a50 100644 --- a/packages/fetchai/protocols/tac/message.py +++ b/packages/fetchai/protocols/tac/message.py @@ -37,7 +37,7 @@ class TacMessage(Message): """The tac protocol implements the messages an AEA needs to participate in the TAC.""" - protocol_id = ProtocolId.from_str("fetchai/tac:0.6.0") + protocol_id = ProtocolId.from_str("fetchai/tac:0.7.0") ErrorCode = CustomErrorCode diff --git a/packages/fetchai/protocols/tac/protocol.yaml b/packages/fetchai/protocols/tac/protocol.yaml index d33f7cc5c9..cc916bf083 100644 --- a/packages/fetchai/protocols/tac/protocol.yaml +++ b/packages/fetchai/protocols/tac/protocol.yaml @@ -1,17 +1,17 @@ name: tac author: fetchai -version: 0.6.0 +version: 0.7.0 type: protocol description: The tac protocol implements the messages an AEA needs to participate in the TAC. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmVhm6VBbggxjTe3PEhCBfTomWekNa5buYy3sY7YYN6Er6 + README.md: QmcUpwxG2ZzdwMeMGGTVyJgsRVbrCUKtYB2qqLy4YsuBez __init__.py: QmSAC7PGra9fig8RhhF1j3XEVpgie9UZNNYPc2AB9Kx9xJ custom_types.py: QmXQATfnvuCpt4FicF4QcqCcLj9PQNsSHjCBvVQknWpyaN dialogues.py: QmTxHrcGujP1RUYvfJygZyQoUwmDg2GBWfmbR3tWUSbyop - message.py: QmfNRtqEpLyAf4knnTecsiNxzehqwWjk8agfg9oe2XvCt3 + message.py: QmWD79nj4kcMPN9xuDkgSDXnwgDnT6XE1WcdfBKsKKPqTP serialization.py: QmTk2Jp19dQ4SJdjSHAr8wbxw4rQSMheSuf1XzXG8CaoB4 tac.proto: QmdpPZNhUW593qVNVoSTWZgd9R69bmBbw6Y9xjzYpvuDvV tac_pb2.py: QmUwW3kixKwD2o1RRdq4NoNoihPb5BXKKRngWXztq32fea diff --git a/packages/fetchai/skills/aries_alice/skill.yaml b/packages/fetchai/skills/aries_alice/skill.yaml index 10baa733fa..ac08ddc5a1 100644 --- a/packages/fetchai/skills/aries_alice/skill.yaml +++ b/packages/fetchai/skills/aries_alice/skill.yaml @@ -1,6 +1,6 @@ name: aries_alice author: fetchai -version: 0.7.0 +version: 0.8.0 type: skill description: The aries_alice skill implements the alice player in the aries cloud agent demo @@ -16,9 +16,9 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/http:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/http:0.6.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: alice: diff --git a/packages/fetchai/skills/aries_faber/skill.yaml b/packages/fetchai/skills/aries_faber/skill.yaml index 1841b6823a..97410686ed 100644 --- a/packages/fetchai/skills/aries_faber/skill.yaml +++ b/packages/fetchai/skills/aries_faber/skill.yaml @@ -1,6 +1,6 @@ name: aries_faber author: fetchai -version: 0.6.0 +version: 0.7.0 type: skill description: The aries_faber skill implements the faber player in the aries cloud agent demo @@ -16,9 +16,9 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/http:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/http:0.6.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: faber: diff --git a/packages/fetchai/skills/carpark_client/skill.yaml b/packages/fetchai/skills/carpark_client/skill.yaml index 9b81cf6b92..97a1234d50 100644 --- a/packages/fetchai/skills/carpark_client/skill.yaml +++ b/packages/fetchai/skills/carpark_client/skill.yaml @@ -16,10 +16,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/generic_buyer:0.12.0 behaviours: diff --git a/packages/fetchai/skills/carpark_detection/skill.yaml b/packages/fetchai/skills/carpark_detection/skill.yaml index 57a671e830..1aaadad48e 100644 --- a/packages/fetchai/skills/carpark_detection/skill.yaml +++ b/packages/fetchai/skills/carpark_detection/skill.yaml @@ -18,10 +18,10 @@ fingerprint_ignore_patterns: - temp_files_placeholder/* contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/generic_seller:0.13.0 behaviours: diff --git a/packages/fetchai/skills/echo/skill.yaml b/packages/fetchai/skills/echo/skill.yaml index e83fba6fd6..977f02e359 100644 --- a/packages/fetchai/skills/echo/skill.yaml +++ b/packages/fetchai/skills/echo/skill.yaml @@ -1,6 +1,6 @@ name: echo author: fetchai -version: 0.7.0 +version: 0.8.0 type: skill description: The echo skill implements simple echo functionality. license: Apache-2.0 @@ -14,7 +14,7 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: [] behaviours: echo: diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index 8f419f4185..8825d73db8 100644 --- a/packages/fetchai/skills/erc1155_client/skill.yaml +++ b/packages/fetchai/skills/erc1155_client/skill.yaml @@ -18,11 +18,11 @@ contracts: - fetchai/erc1155:0.10.0 protocols: - fetchai/contract_api:0.5.0 -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 -- fetchai/signing:0.3.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 +- fetchai/signing:0.4.0 skills: [] behaviours: search: diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index a69c4d2d60..3023314d4a 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -18,11 +18,11 @@ contracts: - fetchai/erc1155:0.10.0 protocols: - fetchai/contract_api:0.5.0 -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 -- fetchai/signing:0.3.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 +- fetchai/signing:0.4.0 skills: [] behaviours: service_registration: diff --git a/packages/fetchai/skills/generic_buyer/skill.yaml b/packages/fetchai/skills/generic_buyer/skill.yaml index 3d6c91eef6..786d8ef236 100644 --- a/packages/fetchai/skills/generic_buyer/skill.yaml +++ b/packages/fetchai/skills/generic_buyer/skill.yaml @@ -15,10 +15,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: search: diff --git a/packages/fetchai/skills/generic_seller/skill.yaml b/packages/fetchai/skills/generic_seller/skill.yaml index 942e3dfa32..2a435a6efc 100644 --- a/packages/fetchai/skills/generic_seller/skill.yaml +++ b/packages/fetchai/skills/generic_seller/skill.yaml @@ -16,10 +16,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: service_registration: diff --git a/packages/fetchai/skills/http_echo/skill.yaml b/packages/fetchai/skills/http_echo/skill.yaml index 1866ee9702..d9ee0961c5 100644 --- a/packages/fetchai/skills/http_echo/skill.yaml +++ b/packages/fetchai/skills/http_echo/skill.yaml @@ -1,6 +1,6 @@ name: http_echo author: fetchai -version: 0.6.0 +version: 0.7.0 type: skill description: The http echo skill prints out the content of received http messages and responds with success. @@ -14,7 +14,7 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/http:0.5.0 +- fetchai/http:0.6.0 skills: [] behaviours: {} handlers: diff --git a/packages/fetchai/skills/ml_data_provider/skill.yaml b/packages/fetchai/skills/ml_data_provider/skill.yaml index a4cdf26aed..ae4d9a6241 100644 --- a/packages/fetchai/skills/ml_data_provider/skill.yaml +++ b/packages/fetchai/skills/ml_data_provider/skill.yaml @@ -16,10 +16,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/ledger_api:0.3.0 -- fetchai/ml_trade:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/ledger_api:0.4.0 +- fetchai/ml_trade:0.6.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/generic_seller:0.13.0 behaviours: diff --git a/packages/fetchai/skills/ml_train/skill.yaml b/packages/fetchai/skills/ml_train/skill.yaml index 5f20f79b17..1d84f5e241 100644 --- a/packages/fetchai/skills/ml_train/skill.yaml +++ b/packages/fetchai/skills/ml_train/skill.yaml @@ -19,10 +19,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/ledger_api:0.3.0 -- fetchai/ml_trade:0.5.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/ledger_api:0.4.0 +- fetchai/ml_trade:0.6.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/generic_buyer:0.12.0 behaviours: diff --git a/packages/fetchai/skills/simple_service_registration/skill.yaml b/packages/fetchai/skills/simple_service_registration/skill.yaml index ebd93696c0..83bb6ec2e4 100644 --- a/packages/fetchai/skills/simple_service_registration/skill.yaml +++ b/packages/fetchai/skills/simple_service_registration/skill.yaml @@ -15,7 +15,7 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/oef_search:0.6.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: service: diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index 8c6978739b..d79d945a4f 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -1,6 +1,6 @@ name: tac_control author: fetchai -version: 0.7.0 +version: 0.8.0 type: skill description: The tac control skill implements the logic for an AEA to control an instance of the TAC. @@ -18,8 +18,8 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/oef_search:0.6.0 -- fetchai/tac:0.6.0 +- fetchai/oef_search:0.7.0 +- fetchai/tac:0.7.0 skills: [] behaviours: tac: diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 360abaaf9b..3c667d87a6 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -18,8 +18,8 @@ fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 protocols: -- fetchai/oef_search:0.6.0 -- fetchai/tac:0.6.0 +- fetchai/oef_search:0.7.0 +- fetchai/tac:0.7.0 skills: [] behaviours: contract: diff --git a/packages/fetchai/skills/tac_negotiation/skill.yaml b/packages/fetchai/skills/tac_negotiation/skill.yaml index 267b3e3a04..ff609eb1bd 100644 --- a/packages/fetchai/skills/tac_negotiation/skill.yaml +++ b/packages/fetchai/skills/tac_negotiation/skill.yaml @@ -19,8 +19,8 @@ fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 protocols: -- fetchai/fipa:0.6.0 -- fetchai/oef_search:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/tac_participation:0.9.0 behaviours: diff --git a/packages/fetchai/skills/tac_participation/skill.yaml b/packages/fetchai/skills/tac_participation/skill.yaml index 74cd860e52..018167aae6 100644 --- a/packages/fetchai/skills/tac_participation/skill.yaml +++ b/packages/fetchai/skills/tac_participation/skill.yaml @@ -17,8 +17,8 @@ fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 protocols: -- fetchai/oef_search:0.6.0 -- fetchai/tac:0.6.0 +- fetchai/oef_search:0.7.0 +- fetchai/tac:0.7.0 skills: [] behaviours: tac_search: diff --git a/packages/fetchai/skills/thermometer/skill.yaml b/packages/fetchai/skills/thermometer/skill.yaml index 1e1194ec55..cfd58afabc 100644 --- a/packages/fetchai/skills/thermometer/skill.yaml +++ b/packages/fetchai/skills/thermometer/skill.yaml @@ -15,10 +15,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/generic_seller:0.13.0 behaviours: diff --git a/packages/fetchai/skills/thermometer_client/skill.yaml b/packages/fetchai/skills/thermometer_client/skill.yaml index 8f53b3b101..cdcb6fe238 100644 --- a/packages/fetchai/skills/thermometer_client/skill.yaml +++ b/packages/fetchai/skills/thermometer_client/skill.yaml @@ -16,10 +16,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/generic_buyer:0.12.0 behaviours: diff --git a/packages/fetchai/skills/weather_client/skill.yaml b/packages/fetchai/skills/weather_client/skill.yaml index c0f0253f86..074dc33692 100644 --- a/packages/fetchai/skills/weather_client/skill.yaml +++ b/packages/fetchai/skills/weather_client/skill.yaml @@ -15,10 +15,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/generic_buyer:0.12.0 behaviours: diff --git a/packages/fetchai/skills/weather_station/skill.yaml b/packages/fetchai/skills/weather_station/skill.yaml index 4dc6ece6a5..fde55e17ea 100644 --- a/packages/fetchai/skills/weather_station/skill.yaml +++ b/packages/fetchai/skills/weather_station/skill.yaml @@ -19,10 +19,10 @@ fingerprint_ignore_patterns: - '*.db' contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: - fetchai/generic_seller:0.13.0 behaviours: diff --git a/packages/hashes.csv b/packages/hashes.csv index 06d740acae..24e36d42a3 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -1,72 +1,72 @@ -fetchai/agents/aries_alice,QmSzfcX1hnJ4raTS4yREwSEKQastCHM4Z9a6irY5Es3Toc -fetchai/agents/aries_faber,QmaJEpXeh1rKsYyggoj5L2S3N37AAJdMuZxVQExyyKUDqx -fetchai/agents/car_data_buyer,QmYNak5SGrrfkfp28Zm2osp5xKeFTBJPTPXruh2zTpcYH4 -fetchai/agents/car_detector,QmPDuvJLVi1kfobAEnHMouobZCBniwrxRnZiGRQt5KJHYi -fetchai/agents/erc1155_client,QmQQmTrnLuVAqeez4vuL1pFLT8sNtHJWZCp9NTXcJvcupS -fetchai/agents/erc1155_deployer,QmVa7cpE6dzhRA9RRnLvcXjftUs4ELDxh5MsvsZBVsK9BL -fetchai/agents/generic_buyer,QmSsZKZos8qgQFBkqLdPb12dBXKGsfrkVMs6nuqJswJvx2 -fetchai/agents/generic_seller,QmdRy5T4qCF6njPBk7ZhWmKJrLJAte2aXCHsAURNXpb4R2 -fetchai/agents/gym_aea,QmUtKrUwVt63iKZxjncrBSz6eZ9g4RGWFM49qtA4JtFMCm -fetchai/agents/ml_data_provider,QmQtHQkYgNivnP1WuBbpnRLFKtjZbhRyeZFBW64GXXqhEy -fetchai/agents/ml_model_trainer,Qmbk9YkJ7AX4VPcxS1anFU1sEgcU8oZn5fbSv2KuErBWMW -fetchai/agents/my_first_aea,QmdYThnxTmqZizzvJvYH1HmnT5HKn5MsprkkHA8k3dgDPZ -fetchai/agents/simple_service_registration,QmWKm97p72CSV9A9i4yrVi5ucWhw2jqAurbBE8xkuwHLSQ -fetchai/agents/tac_controller,QmSLFA3m31SB45De8SEYixvAGkPcpv6dqtKKkssTW97HpB -fetchai/agents/tac_controller_contract,QmXY3FHDmK8RYh6Hb4aodxzjuG1d5iggn6UtnoJph8wvVE -fetchai/agents/tac_participant,Qme3EP7MYHKre7GK2X5jZ4Pq973DaJPfpPXZX64gtp5iUk -fetchai/agents/thermometer_aea,QmZzUqFVaDNGfwPnq5EvfPKNoMSfGzgpBic2z8HHWfu1RE -fetchai/agents/thermometer_client,QmfMjh5gCDrdipCDYYrAr7jRDXJ2CpfWFij9t6J4EKdXYT -fetchai/agents/weather_client,QmXyXQHxeJyBFSXLU2GZnV49t17iwnNLWWpUEFqMTAb8AE -fetchai/agents/weather_station,QmW4kSbF5eKuh4itMJ8xKonaPejutaMp2GyobcN7V4zJR8 +fetchai/agents/aries_alice,Qme8sHgd9CZbBEbnS9zwDs53mYZM4EDpJf5RzQnE2QMy35 +fetchai/agents/aries_faber,QmVQXALXYg5M1Qbqznc4PqM5i4jDt8rFeHvDrq7DcoJx3B +fetchai/agents/car_data_buyer,QmWk7So9UabsjTEKCkecYN9xwkwJxm4m78GA5VRYcWsQwe +fetchai/agents/car_detector,QmbUnQ95vMmrL7ootzabP5hKr1iR2srJy3QWg6H2wr9Qib +fetchai/agents/erc1155_client,QmYUsNAEr2dmx6CP9Jkd33eJMuSQL1uiBADivuUzM8tgiE +fetchai/agents/erc1155_deployer,QmcbNaXp8vN2Vzbqy4vSKXj27WJK1sBcRf2HtL4eacTnac +fetchai/agents/generic_buyer,Qme5rHfbeEhmia2RM4vjbiwk1h1o2JiiyyfYZze9jG3mUD +fetchai/agents/generic_seller,QmPVuku1Cefn76S8rN6GsqdVz12AhbcK6hFMdDMYxsjiAM +fetchai/agents/gym_aea,QmPP3rtaUY3jdzn1HXjV4dPyY2wYetbbNCqFCQbzbH1GRS +fetchai/agents/ml_data_provider,QmZFTtD54jcwY8ozmhsdHHZqc2RNX9FZ8dfV8SgYJE9QYM +fetchai/agents/ml_model_trainer,QmeZmVsNLUw7TP73s5cSomPnwggcrimXHh1RhrPRUDkoQ3 +fetchai/agents/my_first_aea,QmcHnFYQCyXnAM2pN2M4HqLNGJpWApUP7PuiKaPcLkxbas +fetchai/agents/simple_service_registration,QmWtA9eDYnGKkg5hov887LRJSXTXovb9pp4NJzU7JMq5Lg +fetchai/agents/tac_controller,QmaG56sZaJRm8DwJXXt9Ci18Va8NfXx6v8vEGKPJngKL4q +fetchai/agents/tac_controller_contract,QmdaEL2THaQNNvvDqEhB3iN2mZva1g7RdyhhWV5mTDrbus +fetchai/agents/tac_participant,QmQxN75ZFVEgizNHa3sqd2zHSnmPvRwS8PCv5FAsJBDnZw +fetchai/agents/thermometer_aea,QmQ8KgTrt5fH8ZRDpioKGmeyUyc2EUkan4D5KzoFnCwxcG +fetchai/agents/thermometer_client,QmUY6rmZnufWWmwfSi1m5gR6vD1ZowXpchpUJXgAH6xdNP +fetchai/agents/weather_client,QmeMHc9hqpciJiRWrAJJszvyjTCs9rgsKC5S1nJRKV9sxQ +fetchai/agents/weather_station,QmdJcUYuaTbb2J5k9jPcG215bJhKFQUQqJPhiaNoirijJ1 fetchai/connections/gym,Qmack3EaCW6ARrHrtCnJmL3kR2xrHutJmgD8uoRVGFz6kH -fetchai/connections/http_client,QmfSuWhrseBCVcmzwKmqFDC6qX3ryFzfx2uuUTb8HPGuEd -fetchai/connections/http_server,QmcqvHZbzGX1zdfwVTpqq5j6ugJhpuKEcrWkCW6JJrLJSC -fetchai/connections/ledger,Qmb7dP2cQcYdYMthh5P7EwipNops9CKn2N3TBGNgwNnA2u -fetchai/connections/local,Qmconur9cKrzYY1113AukHUPhgxUjzFrHExWnVpPBV8cRx -fetchai/connections/oef,QmNpYX8XX6uXbFmBDi3s3W9qA48bRcrJatqSHAXDjhLwax +fetchai/connections/http_client,QmaCa98anLuMAduNWtnApEwLWBcqdVkNBREBZ9T5VPSaUm +fetchai/connections/http_server,QmT6JV2sB1rv7XZgx1bEpMjfQJAtpq775D2n8yvzKzSXYK +fetchai/connections/ledger,QmYzBWDgAETzBr8PGPyKvdDMJMGPSo3KFiKVP9MmkVGfd9 +fetchai/connections/local,QmNXMDuB7vfGrhv2Q4R8REDicSUgXfVPd7x1tAP3847jsr +fetchai/connections/oef,QmT6nbEYgjHPTwoXqV5FNeg7SUaraXGQGUhGeVGEhqXVDg fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4Jb27b -fetchai/connections/p2p_stub,QmaP81r3ZCqKdL925fbRB8YKxHYaVBR1yW3iwzaErUYDSC +fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmNLzoPJXUrFLoTKSy8WgF1ivedTyXrKXwd4tmA8mxn7As +fetchai/connections/soef,QmRTHKvUhxiGjs3wWZKadWCD5fq6zG2m4sdhmyEbvADEaR fetchai/connections/stub,QmSuUAA2k1E1M9dpeAgkWpfKdssjqghSDfFfrQzC9ZLKbD -fetchai/connections/tcp,QmQZBeN6EqH61GMLwuHqAw3LzdyKi7uj7zJtJ5ekYDpY4n -fetchai/connections/webhook,QmXLbSSUSbsgqk3Zwo7sfBob5nKL6MLA4MCTQ3BXA2Bex3 +fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E +fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd fetchai/contracts/erc1155,QmWu22zW9AVMBVySwF413JMiT5dcWsLsU2gk1KvFYWAwPq fetchai/contracts/scaffold,QmTKkXifQKq5sTVdVKeD9UGnDwdJoEAoJDjY6qUPt9Bsv2 fetchai/protocols/contract_api,QmZbbYPdpewfBfLWBQNGzjYr45ZDYJ5PqL5TMrMxa7PrjZ -fetchai/protocols/default,QmaU6VsHxLfrFxcnBAzXNmYA7yQ23kRY1Ddq5pq4NsVhyu -fetchai/protocols/fipa,QmYtTLb4Gk7eHo2Q8VwYZomTdUoa5N37a22Dnh4bjpTvxt +fetchai/protocols/default,QmNjse6y7aBhtT2WZh3t7JYuGb4dYd2BmJzcYK3BeX641t +fetchai/protocols/fipa,QmXdUfENAXFUntcybMjWvo816ccxG1Rf4DEv41TQVC85XM fetchai/protocols/gym,QmWv9Hi8cDypDYPLJTbbgXGmw6jvzZLUB2idbMTFdbDDqM -fetchai/protocols/http,QmWDjfvkAGGt6eA1Ja6sXeBeGqE3vtNbGBwnVhGPJrEq4g -fetchai/protocols/ledger_api,QmQERKQhT9JQNvy6vvT2xsQpv4GnEdvwGdFx7J6AY1j3hw -fetchai/protocols/ml_trade,QmVrv8SnxKoRM5pZLWNB3tZP9VggvDK4ygDqy6DmweFKQH -fetchai/protocols/oef_search,QmYPsjL1m3KUbT9UFSUickf19ydK6DLTNXT1sqtftJA1py +fetchai/protocols/http,QmePja5ZBEv6nN7FfnURzgPa445vK9GQ2rdBPugZMVbkWR +fetchai/protocols/ledger_api,QmS1zebL2Q6qPL8B6tD9iCLmXSCgAXSnCFmfeHAqGDdWa3 +fetchai/protocols/ml_trade,QmZoHGtvrAr5z4FrL7BTyKew2eQBudCJXwTpPciwrmcpuP +fetchai/protocols/oef_search,QmWiRygk9JHtCJ6FbSK49uwkCzsSu6wJVqc27iQEwGphFR fetchai/protocols/scaffold,QmaQJxMae5XaHKDc838pcGEKhhYSUyKHGWiMfU6zEcVHsy -fetchai/protocols/signing,QmaaX5WnjhFE4BKR99B2KN3yY9DmnHnavbUpzb8EQ612T3 -fetchai/protocols/state_update,QmeczT1eBFtY2Kr9ZcpzATJRmjDgqKSGhi3x1arCbhXTb6 -fetchai/protocols/tac,QmYryedEw85W99BYM8exZSERbkzHXPag6hp6HQtmmJppJ7 -fetchai/skills/aries_alice,QmXFSjt8FSHMnw4yjsmw4SVxKRj9N1i5aPcnmPpyoh3Bu1 -fetchai/skills/aries_faber,QmX3k9N3VmUE8bYaZ4KCq1Ny3ANTVw7sN8nuCRLDZcTTZK -fetchai/skills/carpark_client,QmdfgS34Q7mo7yZ4uThZePudEoPgsmybC66YdVZAXYEybv -fetchai/skills/carpark_detection,QmXwpLqW72SNbfEXrkHXCq6wucmsx6eTUTn9aZzXJaB8Gw -fetchai/skills/echo,QmPu8BeKw5DRYdjHqVWqQnXjW1ZgRBjVthGmVerHLBmJPA -fetchai/skills/erc1155_client,QmPceeYCnt1PC9dDv9EN9dHfzfFUESSZdEsKGTcesEVpsR -fetchai/skills/erc1155_deploy,QmYyerCPVQg7zUagT6FxZEthdSFrLXKMG5LtJbCYnRPALN -fetchai/skills/error,QmanfpyCmvUkqG9xsEyWULvi1ZZzqvggvs9LnQvSjuRhLb -fetchai/skills/generic_buyer,Qmdx6M3y9gRCPJv5Lp8YnJP9nqJCgYAyp4gggqw9V85rY3 -fetchai/skills/generic_seller,Qmf1SYiBVfF6NYSir7ES9reSBpAGqtN9GkULH3fpBjatNZ +fetchai/protocols/signing,Qmazm8bkwpPVV7BiJZx2Aha96AcmAxwiYbjgYGwvcgXGYi +fetchai/protocols/state_update,QmS1xuSYYgHkQq8Ww2btsS88rTXXjhchyStzUfcWYQKNda +fetchai/protocols/tac,QmY6N5spfcwikq3pb99mdYAEieECqmtawbcitGJRicDh7H +fetchai/skills/aries_alice,QmefZJ27H36RZYgA6eEcnbv8yNPyf3YYXnBm5E88C8xBLQ +fetchai/skills/aries_faber,QmYAQ8gVsokPsXHd7RDXb8KCkmH7XpB8JC7VMx3QrJX3Uh +fetchai/skills/carpark_client,QmYjZXvq2h2DCXZF2ba9W5cvJAvsRFvBrw7h7EwcvWThfW +fetchai/skills/carpark_detection,QmRLr3ALHF1iLFFpUmXHKZmMwbFz5vfph8qCv7rKQpte2r +fetchai/skills/echo,QmYKGMNs5NU7ycWXRBQnKrfBcg5HPnUnH13K1YFnPLQgW6 +fetchai/skills/erc1155_client,Qmd6KJbis7Me39teeHA8y3JZHQrS1hjovMxhqiwViRZhgc +fetchai/skills/erc1155_deploy,QmYbL8hgHTsEh7PkUJhK6pfENPai5XDtq6eH2RWQsARMKS +fetchai/skills/error,QmTFECCHQHaSN3wP16EYgKeqgSgxBvfCRwX7F5uvxfkN3a +fetchai/skills/generic_buyer,QmXFFS6V4ZaNWNqVdx5TnaqU5DizQDd9aWjbE9ACqCZsEU +fetchai/skills/generic_seller,QmQivEfxdFGkWmaw9iMHJmEmgVv1TAAqihNT9CM8x3XzV2 fetchai/skills/gym,QmUqB5EJafEGWX5xkTngAgXW2857RnCEk6St2HE5x9hgtZ -fetchai/skills/http_echo,QmQk7NbMpMRT3GEKtPVkWFv2UzwJHajU27qQV9UHKV1xPz -fetchai/skills/ml_data_provider,QmZS1fm9ZCmZ1quW1LH2K9tdBPWL2woHBdJ1N912vL7BsV -fetchai/skills/ml_train,QmRgu8MwTF8CWfGTudkRPc6bGkQy3P8tLNmWYXCLcJiehg +fetchai/skills/http_echo,QmQDMH3L5F5AzTDurwZkSd8S4LCyPVJhtrqrXe1KCa9NGk +fetchai/skills/ml_data_provider,QmaKyLjyvcj35bCHaKKo15MeF7k48hKPCfFbrtvXCogYwV +fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux -fetchai/skills/simple_service_registration,QmR3SLTfRxyqUQGpBkq3nGbB6Cfm9fXzXgaknJDGNe1Mkr -fetchai/skills/tac_control,QmWtrSiEfdPocyDFHwADj2xmPCeP29iFhdcbfgWrRfT68b -fetchai/skills/tac_control_contract,QmbhmoLPCWY7sKBDnN3qVxtnzsE8tXCJFEZsXyJBKwnfYL -fetchai/skills/tac_negotiation,QmYHjhKPCNQ83gsthbW7qYygrLzuFUy3tiqwhwtieHdXEu -fetchai/skills/tac_participation,Qmdh6sM8GPf53Kbr9HGPBvUD5goz4fYnFLwLLcdqo5pedn -fetchai/skills/thermometer,Qmf2ntUbVmfawJw8AU2nfUf2m9Nrn8Qg6CQZNg1ECrcitc -fetchai/skills/thermometer_client,QmP5vL38Nw4pkJ6y1UVvMwmBWazenMzSs2afHEfTzNqLEb -fetchai/skills/weather_client,QmYDzApib8cgGnaQVfsibV7sfKNQzrDTeTFiYAakfUyoSb -fetchai/skills/weather_station,QmXF23jHpe56wXr8HfBUgYBR63zRaHFsLkCWaWfXvb2mHi +fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr +fetchai/skills/tac_control,QmP1T3wDa1e7Q692KkBuqtws9M2da3kdn5dNkB1WNPemuq +fetchai/skills/tac_control_contract,QmSn9k1rLmfoq2wtKpQqfnSiKpka6pJ23pATsG4bw63Eh9 +fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo +fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt +fetchai/skills/thermometer,QmTud9hXxRq8wRzcf7hVeszou3crmAEZBaw5MjV8x4XtH1 +fetchai/skills/thermometer_client,QmXBkiJU23UVygpX5Zz34DaCNiKKGxkgJMs3RfLEPLSdTH +fetchai/skills/weather_client,QmWohsaia5um76sce6gXN9jMeuHve26v6dm4xWHdwRaGA3 +fetchai/skills/weather_station,QmdcFK1rBSMbNVLXLwFyNizCfa77xUCUkEeBpvJChQurDV diff --git a/tests/conftest.py b/tests/conftest.py index 8e125d7ae3..6eda95ebaa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -198,7 +198,7 @@ UNKNOWN_SKILL_PUBLIC_ID = PublicId("unknown_author", "unknown_skill", "0.1.0") LOCAL_CONNECTION_PUBLIC_ID = PublicId("fetchai", "local", "0.1.0") P2P_CLIENT_CONNECTION_PUBLIC_ID = PublicId("fetchai", "p2p_client", "0.1.0") -HTTP_CLIENT_CONNECTION_PUBLIC_ID = PublicId.from_str("fetchai/http_client:0.8.0") +HTTP_CLIENT_CONNECTION_PUBLIC_ID = PublicId.from_str("fetchai/http_client:0.9.0") HTTP_PROTOCOL_PUBLIC_ID = PublicId("fetchai", "http", "0.1.0") STUB_CONNECTION_PUBLIC_ID = DEFAULT_CONNECTION DUMMY_PROTOCOL_PUBLIC_ID = PublicId("dummy_author", "dummy", "0.1.0") diff --git a/tests/data/aea-config.example.yaml b/tests/data/aea-config.example.yaml index 9ac1a74f99..7c690e3e7e 100644 --- a/tests/data/aea-config.example.yaml +++ b/tests/data/aea-config.example.yaml @@ -7,16 +7,16 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/oef:0.9.0 +- fetchai/oef:0.10.0 contracts: [] protocols: -- fetchai/oef_search:0.6.0 -- fetchai/default:0.5.0 -- fetchai/tac:0.6.0 -- fetchai/fipa:0.6.0 +- fetchai/oef_search:0.7.0 +- fetchai/default:0.6.0 +- fetchai/tac:0.7.0 +- fetchai/fipa:0.7.0 skills: -- fetchai/echo:0.7.0 -default_connection: fetchai/oef:0.9.0 +- fetchai/echo:0.8.0 +default_connection: fetchai/oef:0.10.0 default_ledger: cosmos logging_config: disable_existing_loggers: false diff --git a/tests/data/aea-config.example_w_keys.yaml b/tests/data/aea-config.example_w_keys.yaml index dd6aed732d..bb2da28530 100644 --- a/tests/data/aea-config.example_w_keys.yaml +++ b/tests/data/aea-config.example_w_keys.yaml @@ -7,16 +7,16 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/oef:0.9.0 +- fetchai/oef:0.10.0 contracts: [] protocols: -- fetchai/oef_search:0.6.0 -- fetchai/default:0.5.0 -- fetchai/tac:0.6.0 -- fetchai/fipa:0.6.0 +- fetchai/oef_search:0.7.0 +- fetchai/default:0.6.0 +- fetchai/tac:0.7.0 +- fetchai/fipa:0.7.0 skills: -- fetchai/echo:0.7.0 -default_connection: fetchai/oef:0.9.0 +- fetchai/echo:0.8.0 +default_connection: fetchai/oef:0.10.0 default_ledger: cosmos logging_config: disable_existing_loggers: false diff --git a/tests/data/dependencies_skill/skill.yaml b/tests/data/dependencies_skill/skill.yaml index ecafdddd87..b8005667c3 100644 --- a/tests/data/dependencies_skill/skill.yaml +++ b/tests/data/dependencies_skill/skill.yaml @@ -10,7 +10,7 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: [] behaviours: {} handlers: {} diff --git a/tests/data/dummy_aea/aea-config.yaml b/tests/data/dummy_aea/aea-config.yaml index 3dc734de13..5c038adebf 100644 --- a/tests/data/dummy_aea/aea-config.yaml +++ b/tests/data/dummy_aea/aea-config.yaml @@ -7,17 +7,17 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/local:0.8.0 +- fetchai/local:0.9.0 contracts: - fetchai/erc1155:0.10.0 protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/oef_search:0.7.0 skills: - dummy_author/dummy:0.1.0 -- fetchai/error:0.5.0 -default_connection: fetchai/local:0.8.0 +- fetchai/error:0.6.0 +default_connection: fetchai/local:0.9.0 default_ledger: cosmos logging_config: disable_existing_loggers: false diff --git a/tests/data/dummy_connection/connection.yaml b/tests/data/dummy_connection/connection.yaml index c403c1a98c..606cb1eb8c 100644 --- a/tests/data/dummy_connection/connection.yaml +++ b/tests/data/dummy_connection/connection.yaml @@ -14,7 +14,7 @@ class_name: DummyConnection config: {} excluded_protocols: [] restricted_to_protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 dependencies: dep1: version: ==1.0.0 diff --git a/tests/data/dummy_skill/skill.yaml b/tests/data/dummy_skill/skill.yaml index a90fe3a4b6..4e8dd1ef71 100644 --- a/tests/data/dummy_skill/skill.yaml +++ b/tests/data/dummy_skill/skill.yaml @@ -16,7 +16,7 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: [] behaviours: dummy: diff --git a/tests/data/hashes.csv b/tests/data/hashes.csv index 8e4ba4b05d..f068b6b33c 100644 --- a/tests/data/hashes.csv +++ b/tests/data/hashes.csv @@ -1,6 +1,6 @@ -dummy_author/agents/dummy_aea,QmeFNeXh5vk81YwPnPY9qmBA5wrHeH8VsHkDcv6TqHvmFn -dummy_author/skills/dummy_skill,QmQpimGAQ56nihemchgE29Mfan57YdGixj3kat69FGkrjK -fetchai/connections/dummy_connection,QmT7zw62fDK1mmwYqTvw4pWqFg8Fc1DYQHUxcxd7sqZiLu +dummy_author/agents/dummy_aea,QmaFcsXAx9mCjPnYEzATwGJyBFJRgCHftfYmKCfZtSGSLw +dummy_author/skills/dummy_skill,QmTBZg36AhCipACz8x7eJsA5CHKqUQN1SwT3n8zX6n9XNF +fetchai/connections/dummy_connection,QmWegP8qsY6Ngdh9xorMDCSA1UBjt4CrrPeVWQqyVfHvob fetchai/contracts/dummy_contract,QmPMs9VDGZGF8xJ8XBYLVb1xK5XAgiaJr5Gwcq7Vr3TUyu -fetchai/skills/dependencies_skill,QmaLBgnwTXdTzue7H3UbVuKmPxaqoK4Azpj85tKTdQi29j +fetchai/skills/dependencies_skill,Qmdn8AArsVSXPut57BXBjkctMYsFYeNnwUuRNe6cuTpbMu fetchai/skills/exception_skill,QmT2RiM95EVbXTD31zU6pKKoERkrCLuyxpAJfkm3dTsTp2 diff --git a/tests/test_aea.py b/tests/test_aea.py index 57e5dca9aa..943b7e5be4 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -160,10 +160,10 @@ def test_react(): builder.add_connection( Path(ROOT_DIR, "packages", "fetchai", "connections", "local") ) - local_connection_id = PublicId.from_str("fetchai/local:0.8.0") + local_connection_id = PublicId.from_str("fetchai/local:0.9.0") builder.set_default_connection(local_connection_id) builder.add_skill(Path(CUR_PATH, "data", "dummy_skill")) - agent = builder.build(connection_ids=[PublicId.from_str("fetchai/local:0.8.0")]) + agent = builder.build(connection_ids=[PublicId.from_str("fetchai/local:0.9.0")]) # This is a temporary workaround to feed the local node to the OEF Local connection # TODO remove it. local_connection = agent.resources.get_connection(local_connection_id) @@ -212,10 +212,10 @@ def test_handle(): builder.add_connection( Path(ROOT_DIR, "packages", "fetchai", "connections", "local") ) - local_connection_id = PublicId.from_str("fetchai/local:0.8.0") + local_connection_id = PublicId.from_str("fetchai/local:0.9.0") builder.set_default_connection(local_connection_id) builder.add_skill(Path(CUR_PATH, "data", "dummy_skill")) - aea = builder.build(connection_ids=[PublicId.from_str("fetchai/local:0.8.0")]) + aea = builder.build(connection_ids=[PublicId.from_str("fetchai/local:0.9.0")]) # This is a temporary workaround to feed the local node to the OEF Local connection # TODO remove it. local_connection = aea.resources.get_connection(local_connection_id) @@ -310,10 +310,10 @@ def test_initialize_aea_programmatically(): builder.add_connection( Path(ROOT_DIR, "packages", "fetchai", "connections", "local") ) - local_connection_id = PublicId.from_str("fetchai/local:0.8.0") + local_connection_id = PublicId.from_str("fetchai/local:0.9.0") builder.set_default_connection(local_connection_id) builder.add_skill(Path(CUR_PATH, "data", "dummy_skill")) - aea = builder.build(connection_ids=[PublicId.from_str("fetchai/local:0.8.0")]) + aea = builder.build(connection_ids=[PublicId.from_str("fetchai/local:0.9.0")]) local_connection = aea.resources.get_connection(local_connection_id) local_connection._local_node = node diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index c7f15be116..60c1c3858b 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -96,7 +96,7 @@ def test_add_package_already_existing(): builder.add_component(ComponentType.PROTOCOL, fipa_package_path) expected_message = re.escape( - "Component 'fetchai/fipa:0.6.0' of type 'protocol' already added." + "Component 'fetchai/fipa:0.7.0' of type 'protocol' already added." ) with pytest.raises(AEAException, match=expected_message): builder.add_component(ComponentType.PROTOCOL, fipa_package_path) @@ -106,12 +106,12 @@ def test_when_package_has_missing_dependency(): """Test the case when the builder tries to load the packages, but fails because of a missing dependency.""" builder = AEABuilder() expected_message = re.escape( - "Package 'fetchai/oef:0.9.0' of type 'connection' cannot be added. " - "Missing dependencies: ['(protocol, fetchai/oef_search:0.6.0)']" + "Package 'fetchai/oef:0.10.0' of type 'connection' cannot be added. " + "Missing dependencies: ['(protocol, fetchai/oef_search:0.7.0)']" ) with pytest.raises(AEAException, match=expected_message): - # connection "fetchai/oef:0.9.0" requires - # "fetchai/oef_search:0.6.0" and "fetchai/fipa:0.6.0" protocols. + # connection "fetchai/oef:0.10.0" requires + # "fetchai/oef_search:0.7.0" and "fetchai/fipa:0.7.0" protocols. builder.add_component( ComponentType.CONNECTION, Path(ROOT_DIR) / "packages" / "fetchai" / "connections" / "oef", diff --git a/tests/test_cli/test_add/test_connection.py b/tests/test_cli/test_add/test_connection.py index 47cbef9433..97a6118774 100644 --- a/tests/test_cli/test_add/test_connection.py +++ b/tests/test_cli/test_add/test_connection.py @@ -57,7 +57,7 @@ def setup_class(cls): cls.connection_name = "http_client" cls.connection_author = "fetchai" cls.connection_version = "0.3.0" - cls.connection_id = "fetchai/http_client:0.8.0" + cls.connection_id = "fetchai/http_client:0.9.0" # copy the 'packages' directory in the parent of the agent folder. shutil.copytree(Path(CUR_PATH, "..", "packages"), Path(cls.t, "packages")) @@ -148,7 +148,7 @@ def setup_class(cls): cls.connection_name = "http_client" cls.connection_author = "fetchai" cls.connection_version = "0.3.0" - cls.connection_id = "fetchai/http_client:0.8.0" + cls.connection_id = "fetchai/http_client:0.9.0" # copy the 'packages' directory in the parent of the agent folder. shutil.copytree(Path(CUR_PATH, "..", "packages"), Path(cls.t, "packages")) @@ -345,7 +345,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.connection_id = "fetchai/http_client:0.8.0" + cls.connection_id = "fetchai/http_client:0.9.0" cls.connection_name = "http_client" # copy the 'packages' directory in the parent of the agent folder. @@ -413,7 +413,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.connection_id = "fetchai/http_client:0.8.0" + cls.connection_id = "fetchai/http_client:0.9.0" cls.connection_name = "http_client" # copy the 'packages' directory in the parent of the agent folder. diff --git a/tests/test_cli/test_add/test_skill.py b/tests/test_cli/test_add/test_skill.py index 01d3a980ed..a2355f93e0 100644 --- a/tests/test_cli/test_add/test_skill.py +++ b/tests/test_cli/test_add/test_skill.py @@ -60,7 +60,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.skill_id = PublicId.from_str("fetchai/error:0.5.0") + cls.skill_id = PublicId.from_str("fetchai/error:0.6.0") cls.skill_name = cls.skill_id.name cls.skill_author = cls.skill_id.author cls.skill_version = cls.skill_id.version @@ -142,7 +142,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.skill_id = PublicId.from_str("fetchai/echo:0.7.0") + cls.skill_id = PublicId.from_str("fetchai/echo:0.8.0") cls.skill_name = cls.skill_id.name cls.skill_author = cls.skill_id.author cls.skill_version = cls.skill_id.version @@ -337,7 +337,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.skill_id = "fetchai/echo:0.7.0" + cls.skill_id = "fetchai/echo:0.8.0" cls.skill_name = "echo" # copy the 'packages' directory in the parent of the agent folder. @@ -409,7 +409,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.skill_id = "fetchai/echo:0.7.0" + cls.skill_id = "fetchai/echo:0.8.0" cls.skill_name = "echo" # copy the 'packages' directory in the parent of the agent folder. @@ -487,7 +487,7 @@ class TestAddSkillFromRemoteRegistry(AEATestCaseEmpty): def test_add_skill_from_remote_registry_positive(self): """Test add skill from Registry positive result.""" self.run_cli_command( - *["remove", "protocol", "fetchai/default:0.5.0"], cwd=self._get_cwd() + *["remove", "protocol", "fetchai/default:0.6.0"], cwd=self._get_cwd() ) self.add_item("skill", "fetchai/echo:0.3.0", local=False) diff --git a/tests/test_cli/test_interact.py b/tests/test_cli/test_interact.py index 9d8adb5697..abd4b995da 100644 --- a/tests/test_cli/test_interact.py +++ b/tests/test_cli/test_interact.py @@ -201,7 +201,7 @@ class TestInteractEcho(AEATestCaseEmpty): @pytest.mark.integration def test_interact(self): """Test the 'aea interact' command with the echo skill.""" - self.add_item("skill", "fetchai/echo:0.7.0") + self.add_item("skill", "fetchai/echo:0.8.0") self.run_agent() process = self.run_interaction() @@ -209,7 +209,7 @@ def test_interact(self): process, [ "Starting AEA interaction channel...", - "Provide message of protocol fetchai/default:0.5.0 for performative bytes", + "Provide message of protocol fetchai/default:0.6.0 for performative bytes", ], timeout=10, is_terminating=False, @@ -225,9 +225,9 @@ def test_interact(self): "Sending envelope:", f"to: {self.agent_name}", f"sender: {self.agent_name}_interact", - "protocol_id: fetchai/default:0.5.0", + "protocol_id: fetchai/default:0.6.0", "message_id=1,target=0,performative=bytes,content=b'hello')", - "Provide message of protocol fetchai/default:0.5.0 for performative bytes:", + "Provide message of protocol fetchai/default:0.6.0 for performative bytes:", ], timeout=10, is_terminating=False, @@ -243,9 +243,9 @@ def test_interact(self): "Received envelope:", f"to: {self.agent_name}_interact", f"sender: {self.agent_name}", - "protocol_id: fetchai/default:0.5.0", + "protocol_id: fetchai/default:0.6.0", "message_id=2,target=1,performative=bytes,content=b'hello')", - "Provide message of protocol fetchai/default:0.5.0 for performative bytes:", + "Provide message of protocol fetchai/default:0.6.0 for performative bytes:", ], timeout=10, is_terminating=False, @@ -259,7 +259,7 @@ def test_interact(self): [ "Interrupting input, checking inbox ...", "Received no new envelope!", - "Provide message of protocol fetchai/default:0.5.0 for performative bytes:", + "Provide message of protocol fetchai/default:0.6.0 for performative bytes:", ], timeout=10, is_terminating=False, diff --git a/tests/test_cli/test_remove/test_connection.py b/tests/test_cli/test_remove/test_connection.py index 3e4b5f69b0..2ed0523fbd 100644 --- a/tests/test_cli/test_remove/test_connection.py +++ b/tests/test_cli/test_remove/test_connection.py @@ -47,7 +47,7 @@ def setup_class(cls): cls.t = tempfile.mkdtemp() # copy the 'packages' directory in the parent of the agent folder. shutil.copytree(Path(CUR_PATH, "..", "packages"), Path(cls.t, "packages")) - cls.connection_id = "fetchai/http_client:0.8.0" + cls.connection_id = "fetchai/http_client:0.9.0" cls.connection_name = "http_client" os.chdir(cls.t) @@ -109,7 +109,7 @@ def setup_class(cls): cls.agent_name = "myagent" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() - cls.connection_id = "fetchai/local:0.8.0" + cls.connection_id = "fetchai/local:0.9.0" os.chdir(cls.t) result = cls.runner.invoke( @@ -164,7 +164,7 @@ def setup_class(cls): cls.t = tempfile.mkdtemp() # copy the 'packages' directory in the parent of the agent folder. shutil.copytree(Path(CUR_PATH, "..", "packages"), Path(cls.t, "packages")) - cls.connection_id = "fetchai/http_client:0.8.0" + cls.connection_id = "fetchai/http_client:0.9.0" cls.connection_name = "http_client" os.chdir(cls.t) diff --git a/tests/test_cli/test_run.py b/tests/test_cli/test_run.py index b263fe0677..d4f258cce7 100644 --- a/tests/test_cli/test_run.py +++ b/tests/test_cli/test_run.py @@ -76,7 +76,7 @@ def test_run(): result = runner.invoke( cli, - [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.8.0"], + [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.9.0"], ) assert result.exit_code == 0 @@ -87,7 +87,7 @@ def test_run(): "config", "set", "agent.default_connection", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], ) assert result.exit_code == 0 @@ -168,9 +168,9 @@ def test_run_with_default_connection(): @pytest.mark.parametrize( argnames=["connection_ids"], argvalues=[ - ["fetchai/http_client:0.8.0,{}".format(str(DEFAULT_CONNECTION))], - ["'fetchai/http_client:0.8.0, {}'".format(str(DEFAULT_CONNECTION))], - ["fetchai/http_client:0.8.0,,{},".format(str(DEFAULT_CONNECTION))], + ["fetchai/http_client:0.9.0,{}".format(str(DEFAULT_CONNECTION))], + ["'fetchai/http_client:0.9.0, {}'".format(str(DEFAULT_CONNECTION))], + ["fetchai/http_client:0.9.0,,{},".format(str(DEFAULT_CONNECTION))], ], ) def test_run_multiple_connections(connection_ids): @@ -195,7 +195,7 @@ def test_run_multiple_connections(connection_ids): result = runner.invoke( cli, - [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.8.0"], + [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.9.0"], ) assert result.exit_code == 0 @@ -251,7 +251,7 @@ def test_run_unknown_private_key(): result = runner.invoke( cli, - [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.8.0"], + [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.9.0"], ) assert result.exit_code == 0 result = runner.invoke( @@ -261,7 +261,7 @@ def test_run_unknown_private_key(): "config", "set", "agent.default_connection", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], ) assert result.exit_code == 0 @@ -290,7 +290,7 @@ def test_run_unknown_private_key(): result = runner.invoke( cli, - [*CLI_LOG_OPTION, "run", "--connections", "fetchai/http_client:0.8.0"], + [*CLI_LOG_OPTION, "run", "--connections", "fetchai/http_client:0.9.0"], standalone_mode=False, ) @@ -326,7 +326,7 @@ def test_run_fet_private_key_config(): result = runner.invoke( cli, - [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.8.0"], + [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.9.0"], ) assert result.exit_code == 0 @@ -350,7 +350,7 @@ def test_run_fet_private_key_config(): error_msg = "" try: - cli.main([*CLI_LOG_OPTION, "run", "--connections", "fetchai/http_client:0.8.0"]) + cli.main([*CLI_LOG_OPTION, "run", "--connections", "fetchai/http_client:0.9.0"]) except SystemExit as e: error_msg = str(e) @@ -385,7 +385,7 @@ def test_run_ethereum_private_key_config(): result = runner.invoke( cli, - [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.8.0"], + [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.9.0"], ) assert result.exit_code == 0 @@ -409,7 +409,7 @@ def test_run_ethereum_private_key_config(): error_msg = "" try: - cli.main([*CLI_LOG_OPTION, "run", "--connections", "fetchai/http_client:0.8.0"]) + cli.main([*CLI_LOG_OPTION, "run", "--connections", "fetchai/http_client:0.9.0"]) except SystemExit as e: error_msg = str(e) @@ -447,7 +447,7 @@ def test_run_with_install_deps(): result = runner.invoke( cli, - [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.8.0"], + [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.9.0"], ) assert result.exit_code == 0 result = runner.invoke( @@ -457,7 +457,7 @@ def test_run_with_install_deps(): "config", "set", "agent.default_connection", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], ) assert result.exit_code == 0 @@ -473,7 +473,7 @@ def test_run_with_install_deps(): "run", "--install-deps", "--connections", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], env=os.environ, maxread=10000, @@ -519,7 +519,7 @@ def test_run_with_install_deps_and_requirement_file(): result = runner.invoke( cli, - [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.8.0"], + [*CLI_LOG_OPTION, "add", "--local", "connection", "fetchai/http_client:0.9.0"], ) assert result.exit_code == 0 result = runner.invoke( @@ -529,7 +529,7 @@ def test_run_with_install_deps_and_requirement_file(): "config", "set", "agent.default_connection", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], ) assert result.exit_code == 0 @@ -549,7 +549,7 @@ def test_run_with_install_deps_and_requirement_file(): "run", "--install-deps", "--connections", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], env=os.environ, maxread=10000, @@ -607,7 +607,7 @@ def setup_class(cls): "add", "--local", "connection", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], standalone_mode=False, ) @@ -624,7 +624,7 @@ def setup_class(cls): try: cli.main( - [*CLI_LOG_OPTION, "run", "--connections", "fetchai/http_client:0.8.0"] + [*CLI_LOG_OPTION, "run", "--connections", "fetchai/http_client:0.9.0"] ) except SystemExit as e: cls.exit_code = e.code @@ -874,7 +874,7 @@ def setup_class(cls): """Set the test up.""" cls.runner = CliRunner() cls.agent_name = "myagent" - cls.connection_id = PublicId.from_str("fetchai/http_client:0.8.0") + cls.connection_id = PublicId.from_str("fetchai/http_client:0.9.0") cls.connection_name = cls.connection_id.name cls.connection_author = cls.connection_id.author cls.cwd = os.getcwd() @@ -908,7 +908,7 @@ def setup_class(cls): "config", "set", "agent.default_connection", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], ) assert result.exit_code == 0 @@ -967,7 +967,7 @@ def setup_class(cls): """Set the test up.""" cls.runner = CliRunner() cls.agent_name = "myagent" - cls.connection_id = PublicId.from_str("fetchai/http_client:0.8.0") + cls.connection_id = PublicId.from_str("fetchai/http_client:0.9.0") cls.connection_author = cls.connection_id.author cls.connection_name = cls.connection_id.name cls.cwd = os.getcwd() @@ -1001,7 +1001,7 @@ def setup_class(cls): "config", "set", "agent.default_connection", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], ) assert result.exit_code == 0 @@ -1059,7 +1059,7 @@ def setup_class(cls): """Set the test up.""" cls.runner = CliRunner() cls.agent_name = "myagent" - cls.connection_id = "fetchai/http_client:0.8.0" + cls.connection_id = "fetchai/http_client:0.9.0" cls.connection_name = "http_client" cls.cwd = os.getcwd() cls.t = tempfile.mkdtemp() @@ -1092,7 +1092,7 @@ def setup_class(cls): "config", "set", "agent.default_connection", - "fetchai/http_client:0.8.0", + "fetchai/http_client:0.9.0", ], ) assert result.exit_code == 0 @@ -1246,7 +1246,7 @@ def setup_class(cls): result = cls.runner.invoke( cli, - [*CLI_LOG_OPTION, "add", "--local", "protocol", "fetchai/fipa:0.6.0"], + [*CLI_LOG_OPTION, "add", "--local", "protocol", "fetchai/fipa:0.7.0"], standalone_mode=False, ) assert result.exit_code == 0 diff --git a/tests/test_cli/test_search.py b/tests/test_cli/test_search.py index ebcad61cad..606f70e860 100644 --- a/tests/test_cli/test_search.py +++ b/tests/test_cli/test_search.py @@ -363,8 +363,8 @@ def test_exit_code_equal_to_zero(self): def test_correct_output(self,): """Test that the command has printed the correct output..""" - public_id_echo = PublicId.from_str("fetchai/echo:0.7.0") - public_id_error = PublicId.from_str("fetchai/error:0.5.0") + public_id_echo = PublicId.from_str("fetchai/echo:0.8.0") + public_id_error = PublicId.from_str("fetchai/error:0.6.0") expected = ( 'Searching for ""...\n' "Skills found:\n\n" @@ -445,8 +445,8 @@ def test_exit_code_equal_to_zero(self): def test_correct_output(self,): """Test that the command has printed the correct output..""" - public_id_echo = PublicId.from_str("fetchai/echo:0.7.0") - public_id_error = PublicId.from_str("fetchai/error:0.5.0") + public_id_echo = PublicId.from_str("fetchai/echo:0.8.0") + public_id_error = PublicId.from_str("fetchai/error:0.6.0") expected = ( 'Searching for ""...\n' "Skills found:\n\n" diff --git a/tests/test_cli/test_utils/test_utils.py b/tests/test_cli/test_utils/test_utils.py index 341dc18c3f..90b33bee2e 100644 --- a/tests/test_cli/test_utils/test_utils.py +++ b/tests/test_cli/test_utils/test_utils.py @@ -280,7 +280,7 @@ class FindItemLocallyTestCase(TestCase): ) def test_find_item_locally_bad_config(self, *mocks): """Test find_item_locally for bad config result.""" - public_id = PublicIdMock.from_str("fetchai/echo:0.7.0") + public_id = PublicIdMock.from_str("fetchai/echo:0.8.0") with self.assertRaises(ClickException) as cm: find_item_locally(ContextMock(), "skill", public_id) @@ -294,7 +294,7 @@ def test_find_item_locally_bad_config(self, *mocks): ) def test_find_item_locally_cant_find(self, from_conftype_mock, *mocks): """Test find_item_locally for can't find result.""" - public_id = PublicIdMock.from_str("fetchai/echo:0.7.0") + public_id = PublicIdMock.from_str("fetchai/echo:0.8.0") with self.assertRaises(ClickException) as cm: find_item_locally(ContextMock(), "skill", public_id) @@ -313,7 +313,7 @@ class FindItemInDistributionTestCase(TestCase): ) def testfind_item_in_distribution_bad_config(self, *mocks): """Test find_item_in_distribution for bad config result.""" - public_id = PublicIdMock.from_str("fetchai/echo:0.7.0") + public_id = PublicIdMock.from_str("fetchai/echo:0.8.0") with self.assertRaises(ClickException) as cm: find_item_in_distribution(ContextMock(), "skill", public_id) @@ -322,7 +322,7 @@ def testfind_item_in_distribution_bad_config(self, *mocks): @mock.patch("aea.cli.utils.package_utils.Path.exists", return_value=False) def testfind_item_in_distribution_not_found(self, *mocks): """Test find_item_in_distribution for not found result.""" - public_id = PublicIdMock.from_str("fetchai/echo:0.7.0") + public_id = PublicIdMock.from_str("fetchai/echo:0.8.0") with self.assertRaises(ClickException) as cm: find_item_in_distribution(ContextMock(), "skill", public_id) @@ -336,7 +336,7 @@ def testfind_item_in_distribution_not_found(self, *mocks): ) def testfind_item_in_distribution_cant_find(self, from_conftype_mock, *mocks): """Test find_item_locally for can't find result.""" - public_id = PublicIdMock.from_str("fetchai/echo:0.7.0") + public_id = PublicIdMock.from_str("fetchai/echo:0.8.0") with self.assertRaises(ClickException) as cm: find_item_in_distribution(ContextMock(), "skill", public_id) diff --git a/tests/test_cli_gui/test_run_agent.py b/tests/test_cli_gui/test_run_agent.py index cdf4611e31..1912b998f1 100644 --- a/tests/test_cli_gui/test_run_agent.py +++ b/tests/test_cli_gui/test_run_agent.py @@ -63,7 +63,7 @@ def test_create_and_run_agent(): response_add = app.post( "api/agent/" + agent_id + "/connection", content_type="application/json", - data=json.dumps("fetchai/local:0.8.0"), + data=json.dumps("fetchai/local:0.9.0"), ) assert response_add.status_code == 201 diff --git a/tests/test_connections/test_stub.py b/tests/test_connections/test_stub.py index 113b9936d6..d6c9346796 100644 --- a/tests/test_connections/test_stub.py +++ b/tests/test_connections/test_stub.py @@ -140,11 +140,11 @@ def test_reception_b(self): def test_reception_c(self): """Test that the connection receives what has been enqueued in the input file.""" - encoded_envelope = b"0x5E22777dD831A459535AA4306AceC9cb22eC4cB5,default_oef,fetchai/oef_search:0.6.0,\x08\x02\x12\x011\x1a\x011 \x01:,\n*0x32468dB8Ab79549B49C88DC991990E7910891dbd," + encoded_envelope = b"0x5E22777dD831A459535AA4306AceC9cb22eC4cB5,default_oef,fetchai/oef_search:0.7.0,\x08\x02\x12\x011\x1a\x011 \x01:,\n*0x32468dB8Ab79549B49C88DC991990E7910891dbd," expected_envelope = Envelope( to="0x5E22777dD831A459535AA4306AceC9cb22eC4cB5", sender="default_oef", - protocol_id=PublicId.from_str("fetchai/oef_search:0.6.0"), + protocol_id=PublicId.from_str("fetchai/oef_search:0.7.0"), message=b"\x08\x02\x12\x011\x1a\x011 \x01:,\n*0x32468dB8Ab79549B49C88DC991990E7910891dbd", ) with open(self.input_file_path, "ab+") as f: diff --git a/tests/test_docs/test_agent_vs_aea/agent_code_block.py b/tests/test_docs/test_agent_vs_aea/agent_code_block.py index e219fd1420..0a7f29ac47 100644 --- a/tests/test_docs/test_agent_vs_aea/agent_code_block.py +++ b/tests/test_docs/test_agent_vs_aea/agent_code_block.py @@ -113,7 +113,7 @@ def run(): # Create a message inside an envelope and get the stub connection to pass it into the agent message_text = ( - b"my_agent,other_agent,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello," + b"my_agent,other_agent,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello," ) with open(INPUT_FILE, "wb") as f: write_with_lock(f, message_text) diff --git a/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py b/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py index 154f9bf84d..65ff225dc2 100644 --- a/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py +++ b/tests/test_docs/test_agent_vs_aea/test_agent_vs_aea.py @@ -61,7 +61,7 @@ def test_run_agent(self): assert os.path.exists(Path(self.t, "input_file")) message_text = ( - b"other_agent,my_agent,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello," + b"other_agent,my_agent,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello," ) path = os.path.join(self.t, "output_file") with open(path, "rb") as file: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-aries-cloud-agent-demo.md b/tests/test_docs/test_bash_yaml/md_files/bash-aries-cloud-agent-demo.md index 0c2e6b7738..17edd0104d 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-aries-cloud-agent-demo.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-aries-cloud-agent-demo.md @@ -22,10 +22,10 @@ cd aries_alice aea create aries_alice cd aries_alice aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/http_client:0.8.0 -aea add connection fetchai/webhook:0.6.0 -aea add skill fetchai/aries_alice:0.7.0 +aea add connection fetchai/soef:0.9.0 +aea add connection fetchai/http_client:0.9.0 +aea add connection fetchai/webhook:0.7.0 +aea add skill fetchai/aries_alice:0.8.0 ``` ``` bash aea config set vendor.fetchai.skills.aries_alice.models.strategy.args.admin_host 127.0.0.1 @@ -61,10 +61,10 @@ cd aries_faber aea create aries_faber cd aries_faber aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 -aea add connection fetchai/http_client:0.8.0 -aea add connection fetchai/webhook:0.6.0 -aea add skill fetchai/aries_faber:0.6.0 +aea add connection fetchai/soef:0.9.0 +aea add connection fetchai/http_client:0.9.0 +aea add connection fetchai/webhook:0.7.0 +aea add skill fetchai/aries_faber:0.7.0 ``` ``` bash aea config set vendor.fetchai.skills.aries_faber.models.strategy.args.admin_host 127.0.0.1 diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-car-park-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-car-park-skills.md index de141063dc..526aada233 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-car-park-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-car-park-skills.md @@ -7,7 +7,7 @@ aea install aea create car_detector cd car_detector aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/carpark_detection:0.12.0 aea install @@ -22,7 +22,7 @@ aea install aea create car_data_buyer cd car_data_buyer aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/carpark_client:0.12.0 aea install @@ -54,13 +54,13 @@ aea delete car_data_buyer ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml config: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-config.md b/tests/test_docs/test_bash_yaml/md_files/bash-config.md index 0041a7c21b..0032df43c0 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-config.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-config.md @@ -17,9 +17,9 @@ connections: # The list of connection public - fetchai/stub:0.9.0 contracts: [] # The list of contract public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). protocols: # The list of protocol public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: # The list of skill public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 default_connection: fetchai/p2p_libp2p:0.10.0 # The default connection used for envelopes sent by the AEA (must satisfy PUBLIC_ID_REGEX). default_ledger: fetchai # The default ledger identifier the AEA project uses (must satisfy LEDGER_ID_REGEX) logging_config: # The logging configurations the AEA project uses diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-erc1155-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-erc1155-skills.md index d44f8d086b..5dba54b5a9 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-erc1155-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-erc1155-skills.md @@ -7,7 +7,7 @@ aea install aea create erc1155_deployer cd erc1155_deployer aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/erc1155_deploy:0.14.0 aea install @@ -33,7 +33,7 @@ aea install aea create erc1155_client cd erc1155_client aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/erc1155_client:0.13.0 aea install @@ -76,14 +76,14 @@ aea delete erc1155_client ``` yaml default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml config: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills-step-by-step.md b/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills-step-by-step.md index 760425d948..d0349421f3 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills-step-by-step.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills-step-by-step.md @@ -49,19 +49,19 @@ aea generate-wealth fetchai --sync ``` ``` bash aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 -aea add protocol fetchai/fipa:0.6.0 +aea add protocol fetchai/fipa:0.7.0 aea install aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea run ``` ``` bash aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 -aea add protocol fetchai/fipa:0.6.0 -aea add protocol fetchai/signing:0.3.0 +aea add protocol fetchai/fipa:0.7.0 +aea add protocol fetchai/signing:0.4.0 aea install aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 ``` @@ -91,10 +91,10 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: service_registration: @@ -160,11 +160,11 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/default:0.5.0 -- fetchai/fipa:0.6.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 -- fetchai/signing:0.3.0 +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 +- fetchai/signing:0.4.0 skills: [] behaviours: search: @@ -225,8 +225,8 @@ addr: ${OEF_ADDR: 127.0.0.1} ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml config: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills.md index 6f01f1085c..f4454ad427 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-generic-skills.md @@ -7,7 +7,7 @@ aea install aea create my_seller_aea cd my_seller_aea aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/generic_seller:0.13.0 aea install @@ -22,7 +22,7 @@ aea install aea create my_buyer_aea cd my_buyer_aea aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/generic_buyer:0.12.0 aea install @@ -62,13 +62,13 @@ aea delete my_buyer_aea ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml models: 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 c456c45c1e..2c64e18ca6 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.8.0 +aea add connection fetchai/http_server:0.9.0 ``` ``` bash -aea config set agent.default_connection fetchai/http_server:0.8.0 +aea config set agent.default_connection fetchai/http_server:0.9.0 ``` ``` bash aea config set vendor.fetchai.connections.http_server.config.api_spec_path "../examples/http_ex/petstore.yaml" @@ -18,7 +18,7 @@ aea install aea scaffold skill http_echo ``` ``` bash -aea fingerprint skill fetchai/http_echo:0.6.0 +aea fingerprint skill fetchai/http_echo:0.7.0 ``` ``` bash aea run diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-logging.md b/tests/test_docs/test_bash_yaml/md_files/bash-logging.md index 569ad3f700..2482123a70 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-logging.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-logging.md @@ -15,9 +15,9 @@ connections: - fetchai/stub:0.9.0 contracts: [] protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 skills: -- fetchai/error:0.5.0 +- fetchai/error:0.6.0 default_connection: fetchai/stub:0.9.0 default_ledger: fetchai logging_config: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-ml-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-ml-skills.md index 901ad6cab9..8d369d30e1 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-ml-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-ml-skills.md @@ -7,7 +7,7 @@ aea install aea create ml_data_provider cd ml_data_provider aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/ml_data_provider:0.12.0 aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 @@ -22,7 +22,7 @@ aea install aea create ml_model_trainer cd ml_model_trainer aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/ml_train:0.12.0 aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 @@ -54,13 +54,13 @@ aea delete ml_model_trainer ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml config: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-orm-integration.md b/tests/test_docs/test_bash_yaml/md_files/bash-orm-integration.md index 9984fab6fd..d62b6c9dcb 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-orm-integration.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-orm-integration.md @@ -7,7 +7,7 @@ aea install aea create my_thermometer_aea cd my_thermometer_aea aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/thermometer:0.12.0 aea install @@ -22,7 +22,7 @@ aea install aea create my_thermometer_client cd my_thermometer_client aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/thermometer_client:0.11.0 aea install @@ -63,13 +63,13 @@ aea delete my_thermometer_client ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml models: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-p2p-connection.md b/tests/test_docs/test_bash_yaml/md_files/bash-p2p-connection.md index e316c52cb9..422262bf4b 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-p2p-connection.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-p2p-connection.md @@ -54,8 +54,8 @@ config: ``` ``` yaml default_routing: - ? "fetchai/oef_search:0.6.0" - : "fetchai/oef:0.9.0" + ? "fetchai/oef_search:0.7.0" + : "fetchai/oef:0.10.0" ``` ``` yaml config: 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 bb68980c7a..fd9adbf3d6 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 @@ -41,7 +41,7 @@ v0.6.1 AEA configurations successfully initialized: {'author': 'fetchai'} ``` ``` bash -aea fetch fetchai/my_first_aea:0.11.0 +aea fetch fetchai/my_first_aea:0.12.0 cd my_first_aea ``` ``` bash @@ -49,13 +49,13 @@ aea create my_first_aea cd my_first_aea ``` ``` bash -aea add skill fetchai/echo:0.7.0 +aea add skill fetchai/echo:0.8.0 ``` ``` bash TO,SENDER,PROTOCOL_ID,ENCODED_MESSAGE, ``` ``` bash -recipient_aea,sender_aea,fetchai/default:0.5.0,\x08\x01\x12\x011*\x07\n\x05hello, +recipient_aea,sender_aea,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello, ``` ``` bash aea run @@ -92,7 +92,7 @@ info: Echo Behaviour: act method called. info: Echo Behaviour: act method called. ``` ``` bash -echo 'my_first_aea,sender_aea,fetchai/default:0.5.0,\x08\x01\x12\x011*\x07\n\x05hello,' >> input_file +echo 'my_first_aea,sender_aea,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello,' >> input_file ``` ``` bash info: Echo Behaviour: act method called. diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-skill-guide.md b/tests/test_docs/test_bash_yaml/md_files/bash-skill-guide.md index d132e978f1..2cf8e232b9 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-skill-guide.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-skill-guide.md @@ -6,10 +6,10 @@ aea scaffold skill my_search aea fingerprint skill fetchai/my_search:0.1.0 ``` ``` bash -aea add protocol fetchai/oef_search:0.6.0 +aea add protocol fetchai/oef_search:0.7.0 ``` ``` bash -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/p2p_libp2p:0.10.0 aea install aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 @@ -45,7 +45,7 @@ fingerprint: {} fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/oef_search:0.6.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: my_search_behaviour: @@ -72,7 +72,7 @@ dependencies: {} ``` ``` yaml default_routing: - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml name: simple_service_registration @@ -91,7 +91,7 @@ fingerprint: fingerprint_ignore_patterns: [] contracts: [] protocols: -- fetchai/oef_search:0.6.0 +- fetchai/oef_search:0.7.0 skills: [] behaviours: service: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-skill.md b/tests/test_docs/test_bash_yaml/md_files/bash-skill.md index 16c892b336..ef0ab5fad6 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-skill.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-skill.md @@ -16,5 +16,5 @@ handlers: models: {} dependencies: {} protocols: -- fetchai/default:0.5.0 +- fetchai/default:0.6.0 ``` diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md index dba8940de7..0003698f96 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md @@ -7,7 +7,7 @@ aea install aea create tac_controller_contract cd tac_controller_contract aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_control_contract:0.9.0 aea install @@ -43,7 +43,7 @@ aea create tac_participant_two ``` bash cd tac_participant_one aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_participation:0.9.0 aea add skill fetchai/tac_negotiation:0.10.0 @@ -56,7 +56,7 @@ aea config set vendor.fetchai.skills.tac_negotiation.models.strategy.args.is_con ``` bash cd tac_participant_two aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_participation:0.9.0 aea add skill fetchai/tac_negotiation:0.10.0 @@ -124,5 +124,5 @@ models: class_name: Transactions args: pending_transaction_timeout: 30 -protocols: ['fetchai/oef_search:0.6.0', 'fetchai/fipa:0.6.0'] +protocols: ['fetchai/oef_search:0.7.0', 'fetchai/fipa:0.7.0'] ``` \ No newline at end of file diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md index 1eb1768963..b21b9cf691 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md @@ -7,9 +7,9 @@ aea install aea create tac_controller cd tac_controller aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 -aea add skill fetchai/tac_control:0.7.0 +aea add skill fetchai/tac_control:0.8.0 aea install aea config set agent.default_connection fetchai/p2p_libp2p:0.10.0 aea config set agent.default_ledger fetchai @@ -27,7 +27,7 @@ aea create tac_participant_two ``` bash cd tac_participant_one aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_participation:0.9.0 aea add skill fetchai/tac_negotiation:0.10.0 @@ -38,7 +38,7 @@ aea config set agent.default_ledger fetchai ``` bash cd tac_participant_two aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/tac_participation:0.9.0 aea add skill fetchai/tac_negotiation:0.10.0 @@ -68,17 +68,17 @@ aea delete tac_participant_two ``` ``` yaml default_routing: - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml config: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-thermometer-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-thermometer-skills.md index 61fe285d41..f592063fc2 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-thermometer-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-thermometer-skills.md @@ -7,7 +7,7 @@ aea install aea create my_thermometer_aea cd my_thermometer_aea aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/thermometer:0.12.0 aea install @@ -22,7 +22,7 @@ aea install aea create my_thermometer_client cd my_thermometer_client aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/thermometer_client:0.11.0 aea install @@ -54,13 +54,13 @@ aea delete my_thermometer_client ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml config: diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-weather-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-weather-skills.md index c138469064..f1057e4bd7 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-weather-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-weather-skills.md @@ -7,7 +7,7 @@ aea install aea create my_weather_station cd my_weather_station aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/weather_station:0.12.0 aea install @@ -22,7 +22,7 @@ aea install aea create my_weather_client cd my_weather_client aea add connection fetchai/p2p_libp2p:0.10.0 -aea add connection fetchai/soef:0.8.0 +aea add connection fetchai/soef:0.9.0 aea add connection fetchai/ledger:0.6.0 aea add skill fetchai/weather_client:0.11.0 aea install @@ -54,13 +54,13 @@ aea delete my_weather_client ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml default_routing: - fetchai/ledger_api:0.3.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 ``` ``` yaml config: diff --git a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py index bdbac810af..656673d69d 100644 --- a/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/programmatic_aea.py @@ -100,7 +100,7 @@ def handle(self, message: Message) -> None: time.sleep(4) # Create a message inside an envelope and get the stub connection to pass it on to the echo skill - message_text = b"my_aea,other_agent,fetchai/default:0.5.0,\x08\x01\x12\x011*\x07\n\x05hello," + message_text = b"my_aea,other_agent,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello," with open(INPUT_FILE, "wb") as f: write_with_lock(f, message_text) print(b"input message: " + message_text) diff --git a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py index 290a7a7295..bdb7052a06 100644 --- a/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py +++ b/tests/test_docs/test_build_aea_programmatically/test_programmatic_aea.py @@ -59,7 +59,7 @@ def test_run_agent(self): assert os.path.exists(Path(self.t, "output_file")) assert os.path.exists(Path(self.t, DEFAULT_PRIVATE_KEY_FILE)) - message_text_1 = b"other_agent,my_aea,fetchai/default:0.5.0," + message_text_1 = b"other_agent,my_aea,fetchai/default:0.6.0," message_text_2 = b"\x01*\x07\n\x05hello," path = os.path.join(self.t, "output_file") with open(path, "rb") as file: diff --git a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py index 79428e901d..4785ffb54d 100644 --- a/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py +++ b/tests/test_docs/test_cli_vs_programmatic_aeas/programmatic_aea.py @@ -78,8 +78,8 @@ def run(): # specify the default routing for some protocols default_routing = { - PublicId.from_str("fetchai/ledger_api:0.3.0"): LedgerConnection.connection_id, - PublicId.from_str("fetchai/oef_search:0.6.0"): SOEFConnection.connection_id, + PublicId.from_str("fetchai/ledger_api:0.4.0"): LedgerConnection.connection_id, + PublicId.from_str("fetchai/oef_search:0.7.0"): SOEFConnection.connection_id, } default_connection = P2PLibp2pConnection.connection_id @@ -146,7 +146,7 @@ def run(): api_key=API_KEY, soef_addr=SOEF_ADDR, soef_port=SOEF_PORT, - restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.6.0")}, + restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.7.0")}, connection_id=SOEFConnection.connection_id, ) soef_connection = SOEFConnection(configuration=configuration, identity=identity) diff --git a/tests/test_docs/test_docs_protocol.py b/tests/test_docs/test_docs_protocol.py index 1bec995f56..00a6ce763f 100644 --- a/tests/test_docs/test_docs_protocol.py +++ b/tests/test_docs/test_docs_protocol.py @@ -69,7 +69,7 @@ def test_custom_protocol(self): ) def test_oef_search_protocol(self): - """Test the fetchai/oef_search:0.6.0 protocol documentation.""" + """Test the fetchai/oef_search:0.7.0 protocol documentation.""" # this is the offset of code blocks for the section under testing offset = 4 @@ -106,7 +106,7 @@ def test_oef_search_protocol(self): compare_enum_classes(ExpectedOefErrorOperation, ActualOefErrorOperation) def test_fipa_protocol(self): - """Test the fetchai/fipa:0.6.0 documentation.""" + """Test the fetchai/fipa:0.7.0 documentation.""" offset = 15 locals_dict = {"Enum": Enum} compile_and_exec(self.code_blocks[offset]["text"], locals_dict=locals_dict) diff --git a/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py b/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py index 53c69f4f8b..69d4cfaebc 100644 --- a/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py +++ b/tests/test_docs/test_multiplexer_standalone/multiplexer_standalone.py @@ -65,7 +65,7 @@ def run(): # Create a message inside an envelope and get the stub connection to pass it into the multiplexer message_text = ( - "multiplexer,some_agent,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello," + "multiplexer,some_agent,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello," ) with open(INPUT_FILE, "w") as f: write_with_lock(f, message_text) diff --git a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py index b67134a50c..62dfe2ab8a 100644 --- a/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py +++ b/tests/test_docs/test_multiplexer_standalone/test_multiplexer_standalone.py @@ -58,7 +58,7 @@ def test_run_agent(self): assert os.path.exists(Path(self.t, "output.txt")) message_text = ( - "some_agent,multiplexer,fetchai/default:0.5.0,\x08\x01*\x07\n\x05hello," + "some_agent,multiplexer,fetchai/default:0.6.0,\x08\x01*\x07\n\x05hello," ) path = os.path.join(str(self.t), "output.txt") with open(path, "r", encoding="utf-8") as file: diff --git a/tests/test_docs/test_orm_integration/test_orm_integration.py b/tests/test_docs/test_orm_integration/test_orm_integration.py index 5b3448a617..c82b6eb22a 100644 --- a/tests/test_docs/test_orm_integration/test_orm_integration.py +++ b/tests/test_docs/test_orm_integration/test_orm_integration.py @@ -126,8 +126,8 @@ def test_orm_integration_docs_example(self): self.create_agents(seller_aea_name, buyer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -139,7 +139,7 @@ def test_orm_integration_docs_example(self): # Setup seller self.set_agent_context(seller_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/thermometer:0.12.0") @@ -185,7 +185,7 @@ def test_orm_integration_docs_example(self): # Setup Buyer self.set_agent_context(buyer_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/thermometer_client:0.11.0") diff --git a/tests/test_docs/test_skill_guide/test_skill_guide.py b/tests/test_docs/test_skill_guide/test_skill_guide.py index 87fcc76cad..c48519f435 100644 --- a/tests/test_docs/test_skill_guide/test_skill_guide.py +++ b/tests/test_docs/test_skill_guide/test_skill_guide.py @@ -94,7 +94,7 @@ def test_update_skill_and_run(self): self.force_set_config(setting_path, COSMOS) default_routing = { - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # replace location @@ -108,7 +108,7 @@ def test_update_skill_and_run(self): skill_id = AUTHOR + "/" + skill_name + ":" + DEFAULT_VERSION self.scaffold_item("skill", skill_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) diff --git a/tests/test_packages/test_connections/test_http_server/test_http_server.py b/tests/test_packages/test_connections/test_http_server/test_http_server.py index a3db1f3fe9..7f8ce4bc3d 100644 --- a/tests/test_packages/test_connections/test_http_server/test_http_server.py +++ b/tests/test_packages/test_connections/test_http_server/test_http_server.py @@ -119,7 +119,7 @@ def setup(self): ROOT_DIR, "tests", "data", "petstore_sim.yaml" ) self.connection_id = HTTPServerConnection.connection_id - self.protocol_id = PublicId.from_str("fetchai/http:0.5.0") + self.protocol_id = PublicId.from_str("fetchai/http:0.6.0") self.configuration = ConnectionConfig( host=self.host, 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 7998701578..6dc25ac3c2 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 @@ -53,7 +53,7 @@ def setup_server(self): self.host = get_host() self.port = get_unused_tcp_port() self.connection_id = HTTPServerConnection.connection_id - self.protocol_id = PublicId.from_str("fetchai/http:0.5.0") + self.protocol_id = PublicId.from_str("fetchai/http:0.6.0") self.configuration = ConnectionConfig( host=self.host, diff --git a/tests/test_packages/test_connections/test_soef/test_soef.py b/tests/test_packages/test_connections/test_soef/test_soef.py index 7f887bea0d..4666c67b9b 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef.py +++ b/tests/test_packages/test_connections/test_soef/test_soef.py @@ -120,7 +120,7 @@ def setup(self): api_key="TwiCIriSl0mLahw17pyqoA", soef_addr="soef.fetch.ai", soef_port=9002, - restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.6.0")}, + restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.7.0")}, connection_id=SOEFConnection.connection_id, ) self.connection = SOEFConnection( @@ -661,7 +661,7 @@ def test_chain_identifier_fail(self): api_key="TwiCIriSl0mLahw17pyqoA", soef_addr="soef.fetch.ai", soef_port=9002, - restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.6.0")}, + restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.7.0")}, connection_id=SOEFConnection.connection_id, chain_identifier=chain_identifier, ) @@ -679,7 +679,7 @@ def test_chain_identifier_ok(self): api_key="TwiCIriSl0mLahw17pyqoA", soef_addr="soef.fetch.ai", soef_port=9002, - restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.6.0")}, + restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.7.0")}, connection_id=SOEFConnection.connection_id, chain_identifier=chain_identifier, ) diff --git a/tests/test_packages/test_connections/test_soef/test_soef_integration.py b/tests/test_packages/test_connections/test_soef/test_soef_integration.py index 0ab0ef729a..d3680d26f2 100644 --- a/tests/test_packages/test_connections/test_soef/test_soef_integration.py +++ b/tests/test_packages/test_connections/test_soef/test_soef_integration.py @@ -66,7 +66,7 @@ def make_multiplexer_and_dialogues() -> Tuple[Multiplexer, OefSearchDialogues, C api_key="TwiCIriSl0mLahw17pyqoA", soef_addr="soef.fetch.ai", soef_port=9002, - restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.6.0")}, + restricted_to_protocols={PublicId.from_str("fetchai/oef_search:0.7.0")}, connection_id=SOEFConnection.connection_id, ) soef_connection = SOEFConnection(configuration=configuration, identity=identity,) diff --git a/tests/test_packages/test_connections/test_webhook/test_webhook.py b/tests/test_packages/test_connections/test_webhook/test_webhook.py index 83b37b13fd..1c40eabdc6 100644 --- a/tests/test_packages/test_connections/test_webhook/test_webhook.py +++ b/tests/test_packages/test_connections/test_webhook/test_webhook.py @@ -164,7 +164,7 @@ async def test_send(self): envelope = Envelope( to="addr", sender="my_id", - protocol_id=PublicId.from_str("fetchai/http:0.5.0"), + protocol_id=PublicId.from_str("fetchai/http:0.6.0"), message=http_message, ) with patch.object(self.webhook_connection.logger, "warning") as mock_logger: diff --git a/tests/test_packages/test_skills/test_carpark.py b/tests/test_packages/test_skills/test_carpark.py index a95f7128b1..28d3996b69 100644 --- a/tests/test_packages/test_skills/test_carpark.py +++ b/tests/test_packages/test_skills/test_carpark.py @@ -51,8 +51,8 @@ def test_carpark(self): self.create_agents(carpark_aea_name, carpark_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -64,7 +64,7 @@ def test_carpark(self): # Setup agent one self.set_agent_context(carpark_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/carpark_detection:0.12.0") @@ -99,7 +99,7 @@ def test_carpark(self): # Setup agent two self.set_agent_context(carpark_client_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/carpark_client:0.12.0") @@ -226,8 +226,8 @@ def test_carpark(self): self.create_agents(carpark_aea_name, carpark_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -239,7 +239,7 @@ def test_carpark(self): # Setup agent one self.set_agent_context(carpark_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/carpark_detection:0.12.0") @@ -277,7 +277,7 @@ def test_carpark(self): # Setup agent two self.set_agent_context(carpark_client_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/carpark_client:0.12.0") diff --git a/tests/test_packages/test_skills/test_echo.py b/tests/test_packages/test_skills/test_echo.py index 5a8826f941..9a59110501 100644 --- a/tests/test_packages/test_skills/test_echo.py +++ b/tests/test_packages/test_skills/test_echo.py @@ -65,7 +65,7 @@ class TestEchoSkill(AEATestCaseEmpty): def test_echo(self): """Run the echo skill sequence.""" - self.add_item("skill", "fetchai/echo:0.7.0") + self.add_item("skill", "fetchai/echo:0.8.0") process = self.run_agent() is_running = self.is_running(process) diff --git a/tests/test_packages/test_skills/test_erc1155.py b/tests/test_packages/test_skills/test_erc1155.py index f785a87681..30b13cded6 100644 --- a/tests/test_packages/test_skills/test_erc1155.py +++ b/tests/test_packages/test_skills/test_erc1155.py @@ -56,9 +56,9 @@ def test_generic(self): # add ethereum ledger in both configuration files default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", "fetchai/contract_api:0.5.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -71,7 +71,7 @@ def test_generic(self): self.set_agent_context(deploy_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.set_config("agent.default_ledger", ETHEREUM) setting_path = "agent.default_routing" @@ -115,7 +115,7 @@ def test_generic(self): self.set_agent_context(client_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.set_config("agent.default_ledger", ETHEREUM) setting_path = "agent.default_routing" diff --git a/tests/test_packages/test_skills/test_generic.py b/tests/test_packages/test_skills/test_generic.py index d320798742..77c13b6cb9 100644 --- a/tests/test_packages/test_skills/test_generic.py +++ b/tests/test_packages/test_skills/test_generic.py @@ -50,8 +50,8 @@ def test_generic(self, pytestconfig): self.create_agents(seller_aea_name, buyer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -63,7 +63,7 @@ def test_generic(self, pytestconfig): # prepare seller agent self.set_agent_context(seller_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/generic_seller:0.13.0") @@ -102,7 +102,7 @@ def test_generic(self, pytestconfig): # prepare buyer agent self.set_agent_context(buyer_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/generic_buyer:0.12.0") @@ -231,8 +231,8 @@ def test_generic(self, pytestconfig): self.create_agents(seller_aea_name, buyer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -244,7 +244,7 @@ def test_generic(self, pytestconfig): # prepare seller agent self.set_agent_context(seller_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/generic_seller:0.13.0") @@ -286,7 +286,7 @@ def test_generic(self, pytestconfig): # prepare buyer agent self.set_agent_context(buyer_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/generic_buyer:0.12.0") diff --git a/tests/test_packages/test_skills/test_http_echo.py b/tests/test_packages/test_skills/test_http_echo.py index 6052165361..1385db73cb 100644 --- a/tests/test_packages/test_skills/test_http_echo.py +++ b/tests/test_packages/test_skills/test_http_echo.py @@ -36,9 +36,9 @@ class TestHttpEchoSkill(AEATestCaseEmpty): def test_echo(self): """Run the echo skill sequence.""" - self.add_item("connection", "fetchai/http_server:0.8.0") - self.add_item("skill", "fetchai/http_echo:0.6.0") - self.set_config("agent.default_connection", "fetchai/http_server:0.8.0") + self.add_item("connection", "fetchai/http_server:0.9.0") + self.add_item("skill", "fetchai/http_echo:0.7.0") + self.set_config("agent.default_connection", "fetchai/http_server:0.9.0") self.set_config( "vendor.fetchai.connections.http_server.config.api_spec_path", API_SPEC_PATH ) diff --git a/tests/test_packages/test_skills/test_ml_skills.py b/tests/test_packages/test_skills/test_ml_skills.py index 3ed1c80747..9d7aaa4e37 100644 --- a/tests/test_packages/test_skills/test_ml_skills.py +++ b/tests/test_packages/test_skills/test_ml_skills.py @@ -64,8 +64,8 @@ def test_ml_skills(self, pytestconfig): self.create_agents(data_provider_aea_name, model_trainer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -77,7 +77,7 @@ def test_ml_skills(self, pytestconfig): # prepare data provider agent self.set_agent_context(data_provider_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/ml_data_provider:0.12.0") @@ -112,7 +112,7 @@ def test_ml_skills(self, pytestconfig): # prepare model trainer agent self.set_agent_context(model_trainer_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/ml_train:0.12.0") @@ -241,8 +241,8 @@ def test_ml_skills(self, pytestconfig): self.create_agents(data_provider_aea_name, model_trainer_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -254,7 +254,7 @@ def test_ml_skills(self, pytestconfig): # prepare data provider agent self.set_agent_context(data_provider_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/ml_data_provider:0.12.0") @@ -292,7 +292,7 @@ def test_ml_skills(self, pytestconfig): # prepare model trainer agent self.set_agent_context(model_trainer_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/ml_train:0.12.0") diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index a2397ffcbc..1ff948a692 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -61,15 +61,15 @@ def test_tac(self): ) default_routing = { - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # prepare tac controller for test self.set_agent_context(tac_controller_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") - self.add_item("skill", "fetchai/tac_control:0.7.0") + self.add_item("connection", "fetchai/soef:0.9.0") + self.add_item("skill", "fetchai/tac_control:0.8.0") self.set_config("agent.default_ledger", FETCHAI) setting_path = "agent.default_routing" self.force_set_config(setting_path, default_routing) @@ -96,8 +96,8 @@ def test_tac(self): self.force_set_config(setting_path, COSMOS) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # prepare agents for test @@ -108,7 +108,7 @@ def test_tac(self): self.set_agent_context(agent_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/tac_participation:0.9.0") self.add_item("skill", "fetchai/tac_negotiation:0.10.0") diff --git a/tests/test_packages/test_skills/test_thermometer.py b/tests/test_packages/test_skills/test_thermometer.py index 0d87abf663..d78f337397 100644 --- a/tests/test_packages/test_skills/test_thermometer.py +++ b/tests/test_packages/test_skills/test_thermometer.py @@ -51,8 +51,8 @@ def test_thermometer(self): self.create_agents(thermometer_aea_name, thermometer_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -64,7 +64,7 @@ def test_thermometer(self): # add packages for agent one and run it self.set_agent_context(thermometer_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/thermometer:0.12.0") @@ -96,7 +96,7 @@ def test_thermometer(self): # add packages for agent two and run it self.set_agent_context(thermometer_client_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/thermometer_client:0.11.0") @@ -227,8 +227,8 @@ def test_thermometer(self): self.create_agents(thermometer_aea_name, thermometer_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -240,7 +240,7 @@ def test_thermometer(self): # add packages for agent one and run it self.set_agent_context(thermometer_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/thermometer:0.12.0") @@ -275,7 +275,7 @@ def test_thermometer(self): # add packages for agent two and run it self.set_agent_context(thermometer_client_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/thermometer_client:0.11.0") diff --git a/tests/test_packages/test_skills/test_weather.py b/tests/test_packages/test_skills/test_weather.py index 76f159df7a..7b6b15d03a 100644 --- a/tests/test_packages/test_skills/test_weather.py +++ b/tests/test_packages/test_skills/test_weather.py @@ -50,8 +50,8 @@ def test_weather(self): self.create_agents(weather_station_aea_name, weather_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -63,7 +63,7 @@ def test_weather(self): # prepare agent one (weather station) self.set_agent_context(weather_station_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/weather_station:0.12.0") @@ -98,7 +98,7 @@ def test_weather(self): # prepare agent two (weather client) self.set_agent_context(weather_client_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/weather_client:0.11.0") @@ -222,8 +222,8 @@ def test_weather(self): self.create_agents(weather_station_aea_name, weather_client_aea_name) default_routing = { - "fetchai/ledger_api:0.3.0": "fetchai/ledger:0.6.0", - "fetchai/oef_search:0.6.0": "fetchai/soef:0.8.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", } # generate random location @@ -235,7 +235,7 @@ def test_weather(self): # add packages for agent one self.set_agent_context(weather_station_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/weather_station:0.12.0") @@ -272,7 +272,7 @@ def test_weather(self): # add packages for agent two self.set_agent_context(weather_client_aea_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") - self.add_item("connection", "fetchai/soef:0.8.0") + self.add_item("connection", "fetchai/soef:0.9.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/weather_client:0.11.0") diff --git a/tests/test_protocols/test_generator/test_end_to_end.py b/tests/test_protocols/test_generator/test_end_to_end.py index c91a16a3c7..1fc3d6d87c 100644 --- a/tests/test_protocols/test_generator/test_end_to_end.py +++ b/tests/test_protocols/test_generator/test_end_to_end.py @@ -75,7 +75,7 @@ def test_generated_protocol_end_to_end(self): builder_1.set_name(agent_name_1) builder_1.add_private_key(DEFAULT_LEDGER, self.private_key_path_1) builder_1.set_default_ledger(DEFAULT_LEDGER) - builder_1.set_default_connection(PublicId.from_str("fetchai/oef:0.9.0")) + builder_1.set_default_connection(PublicId.from_str("fetchai/oef:0.10.0")) builder_1.add_protocol( Path(ROOT_DIR, "packages", "fetchai", "protocols", "fipa") ) @@ -101,7 +101,7 @@ def test_generated_protocol_end_to_end(self): builder_2.add_protocol( Path(ROOT_DIR, "packages", "fetchai", "protocols", "oef_search") ) - builder_2.set_default_connection(PublicId.from_str("fetchai/oef:0.9.0")) + builder_2.set_default_connection(PublicId.from_str("fetchai/oef:0.10.0")) builder_2.add_component( ComponentType.PROTOCOL, Path(PATH_TO_T_PROTOCOL), @@ -112,8 +112,12 @@ def test_generated_protocol_end_to_end(self): ) # create AEAs - aea_1 = builder_1.build(connection_ids=[PublicId.from_str("fetchai/oef:0.9.0")]) - aea_2 = builder_2.build(connection_ids=[PublicId.from_str("fetchai/oef:0.9.0")]) + aea_1 = builder_1.build( + connection_ids=[PublicId.from_str("fetchai/oef:0.10.0")] + ) + aea_2 = builder_2.build( + connection_ids=[PublicId.from_str("fetchai/oef:0.10.0")] + ) # dialogues def role_from_first_message_1( diff --git a/tests/test_registries/test_base.py b/tests/test_registries/test_base.py index 35c145764a..693b2f2875 100644 --- a/tests/test_registries/test_base.py +++ b/tests/test_registries/test_base.py @@ -153,7 +153,7 @@ def setup_class(cls): cls.expected_protocol_ids = { DEFAULT_PROTOCOL, - PublicId.from_str("fetchai/fipa:0.6.0"), + PublicId.from_str("fetchai/fipa:0.7.0"), } def test_fetch_all(self): diff --git a/tests/test_test_tools/test_testcases.py b/tests/test_test_tools/test_testcases.py index 0a4567d923..eee7a70b28 100644 --- a/tests/test_test_tools/test_testcases.py +++ b/tests/test_test_tools/test_testcases.py @@ -102,7 +102,7 @@ def fn(): def test_fetch_and_delete(self): """Fetch and delete agent from repo.""" agent_name = "some_agent_for_tests" - self.fetch_agent("fetchai/my_first_aea:0.11.0", agent_name) + self.fetch_agent("fetchai/my_first_aea:0.12.0", agent_name) assert os.path.exists(agent_name) self.delete_agents(agent_name) assert not os.path.exists(agent_name) @@ -110,7 +110,7 @@ def test_fetch_and_delete(self): def test_diff(self): """Test difference_to_fetched_agent.""" agent_name = "some_agent_for_tests2" - self.fetch_agent("fetchai/my_first_aea:0.11.0", agent_name) + self.fetch_agent("fetchai/my_first_aea:0.12.0", agent_name) self.run_cli_command( "config", "set", "agent.default_ledger", "test_ledger", cwd=agent_name ) @@ -119,7 +119,7 @@ def test_diff(self): ) assert b"test_ledger" in result.stdout_bytes diff = self.difference_to_fetched_agent( - "fetchai/my_first_aea:0.11.0", agent_name + "fetchai/my_first_aea:0.12.0", agent_name ) assert diff assert "test_ledger" in diff[1] @@ -127,9 +127,9 @@ def test_diff(self): def test_no_diff(self): """Test no difference for two aea configs.""" agent_name = "some_agent_for_tests3" - self.fetch_agent("fetchai/my_first_aea:0.11.0", agent_name) + self.fetch_agent("fetchai/my_first_aea:0.12.0", agent_name) diff = self.difference_to_fetched_agent( - "fetchai/my_first_aea:0.11.0", agent_name + "fetchai/my_first_aea:0.12.0", agent_name ) assert not diff @@ -168,10 +168,10 @@ class TestAddAndRejectComponent(AEATestCaseEmpty): def test_add_and_eject(self): """Test add/reject components.""" - result = self.add_item("skill", "fetchai/echo:0.7.0", local=True) + result = self.add_item("skill", "fetchai/echo:0.8.0", local=True) assert result.exit_code == 0 - result = self.eject_item("skill", "fetchai/echo:0.7.0") + result = self.eject_item("skill", "fetchai/echo:0.8.0") assert result.exit_code == 0 @@ -218,7 +218,7 @@ class TestSendReceiveEnvelopesSkill(AEATestCaseEmpty): def test_send_receive_envelope(self): """Run the echo skill sequence.""" - self.add_item("skill", "fetchai/echo:0.7.0") + self.add_item("skill", "fetchai/echo:0.8.0") process = self.run_agent() is_running = self.is_running(process) From ea6e546349038cf07e3592ddb79cdafdf975dd0c Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 22 Sep 2020 16:31:59 +0200 Subject: [PATCH 052/131] Avoid public ids with 'latest' version are stored in configuration files. --- aea/cli/add.py | 2 +- aea/configurations/schemas/definitions.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aea/cli/add.py b/aea/cli/add.py index 093a881751..ae3c86133c 100644 --- a/aea/cli/add.py +++ b/aea/cli/add.py @@ -128,7 +128,7 @@ def add_item(ctx: Context, item_type: str, item_public_id: PublicId) -> None: raise click.ClickException("Failed to add an item with incorrect fingerprint.") _add_item_deps(ctx, item_type, item_config) - register_item(ctx, item_type, item_public_id) + register_item(ctx, item_type, item_config.public_id) def _add_item_deps(ctx: Context, item_type: str, item_config) -> None: diff --git a/aea/configurations/schemas/definitions.json b/aea/configurations/schemas/definitions.json index 6f956b5d10..c723ad8584 100644 --- a/aea/configurations/schemas/definitions.json +++ b/aea/configurations/schemas/definitions.json @@ -79,7 +79,7 @@ }, "public_id": { "type": "string", - "pattern": "^[a-zA-Z0-9_]*/[a-zA-Z_][a-zA-Z0-9_]*:(latest|(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$" + "pattern": "^[a-zA-Z0-9_]*/[a-zA-Z_][a-zA-Z0-9_]*:(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" }, "version_specifiers": { "type": "string", From ad675454b3a03e8a36916d4ad0cd472e67faa946 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 22 Sep 2020 16:43:53 +0200 Subject: [PATCH 053/131] make isort to skip recursive links --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index 66cc5a801c..37bfb84bfa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,6 +36,9 @@ line_length=88 order_by_type=False case_sensitive=True lines_after_imports=2 +skip = + tests/data/dummy_aea/vendor/ + tests/data/dummy_aea/skills/dummy skip_glob = **/*_pb2.py known_first_party=aea known_packages=packages From 5e9f1d6b66ed12edb4b067a83ad3e924a832df45 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Tue, 22 Sep 2020 21:08:41 +0100 Subject: [PATCH 054/131] add docs for generic command usage --- aea/registries/base.py | 8 ++++++-- docs/simple-oef-usage.md | 31 ++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/aea/registries/base.py b/aea/registries/base.py index 6daffeea9b..2d32db2864 100644 --- a/aea/registries/base.py +++ b/aea/registries/base.py @@ -142,13 +142,17 @@ def register( # pylint: disable=arguments-differ,unused-argument raise ValueError(f"Item already registered with item id '{public_id}'") self._public_id_to_item[public_id] = item - def unregister(self, public_id: PublicId) -> None: + def unregister( # pylint: disable=arguments-differ + self, public_id: PublicId + ) -> None: """Unregister an item.""" if public_id not in self._public_id_to_item: raise ValueError(f"No item registered with item id '{public_id}'") self._public_id_to_item.pop(public_id) - def fetch(self, public_id: PublicId) -> Optional[Item]: + def fetch( # pylint: disable=arguments-differ + self, public_id: PublicId + ) -> Optional[Item]: """ Fetch an item associated with a public id. diff --git a/docs/simple-oef-usage.md b/docs/simple-oef-usage.md index 450f96d605..db1a22de30 100644 --- a/docs/simple-oef-usage.md +++ b/docs/simple-oef-usage.md @@ -154,4 +154,33 @@ message = OefSearchMessage( ) ``` -In case of error you will received a message with `OefSearchMessage.Performative.OEF_ERROR`. In case of successful search you will receive a message with performative `OefSearchMessage.Performative.SEARCH_RESULT` and the list of matched agents addresses. \ No newline at end of file +In case of error you will received a message with `OefSearchMessage.Performative.OEF_ERROR`. In case of successful search you will receive a message with performative `OefSearchMessage.Performative.SEARCH_RESULT` and the list of matched agents addresses. + +## Generic command + +To send a generic command request to the SOEF use the following (here on the example of setting a declared name): +``` python +import urllib + +AGENT_GENERIC_COMMAND_MODEL = DataModel( + "generic_command", + [ + Attribute("command", str, True, "Command name to execute."), + Attribute("parameters", str, False, "Url encoded parameters string."), + ], + "A data model to describe the generic soef command.", +) + +declared_name = "new_declared_name" +service_description = Description( + { + "command": "set_declared_name", + "parameters": urllib.parse.urlencode({"name": declared_name}), + }, + data_model=AGENT_GENERIC_COMMAND_MODEL, +) +message = OefSearchMessage( + performative=OefSearchMessage.Performative.REGISTER_SERVICE, + service_description=service_description, +) +``` \ No newline at end of file From eab7b9f552876d6d96fbf60e269497beae69f347 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Tue, 22 Sep 2020 22:46:23 +0100 Subject: [PATCH 055/131] small fixes to configs and soef --- aea/cli/utils/config.py | 4 +++- aea/configurations/base.py | 2 +- docs/tac-skills.md | 5 +++-- .../tac_controller_contract/aea-config.yaml | 20 +++++++++++++++++++ .../fetchai/connections/soef/connection.py | 2 +- .../fetchai/connections/soef/connection.yaml | 2 +- .../fetchai/skills/tac_control/skill.yaml | 1 - packages/hashes.csv | 4 ++-- 8 files changed, 31 insertions(+), 9 deletions(-) diff --git a/aea/cli/utils/config.py b/aea/cli/utils/config.py index 71bc9b50ff..cddfa28a32 100644 --- a/aea/cli/utils/config.py +++ b/aea/cli/utils/config.py @@ -46,7 +46,7 @@ _get_default_configuration_file_name_from_type, ) from aea.configurations.loader import ConfigLoader, ConfigLoaders -from aea.exceptions import AEAException +from aea.exceptions import AEAException, AEAEnforceError def try_to_load_agent_config( @@ -83,6 +83,8 @@ def try_to_load_agent_config( DEFAULT_AEA_CONFIG_FILE ) ) + except AEAEnforceError as e: + raise click.ClickException(str(e)) def _init_cli_config() -> None: diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 1a68f8de41..0d664ada0b 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -1105,7 +1105,7 @@ class SkillConfig(ComponentConfiguration): default_configuration_filename = DEFAULT_SKILL_CONFIG_FILE package_type = PackageType.SKILL - configurable_fields = {"handlers", "behaviours", "models"} + configurable_fields = {"handlers", "behaviours", "models", "is_abstract"} def __init__( self, diff --git a/docs/tac-skills.md b/docs/tac-skills.md index c70415a668..7813d82cb9 100644 --- a/docs/tac-skills.md +++ b/docs/tac-skills.md @@ -206,8 +206,9 @@ aea add-key fetchai fetchai_private_key.txt --connection Navigate to the tac controller project, then use the command line to get and set the start time (set it to at least two minutes in the future): ``` bash -aea config get vendor.fetchai.skills.tac_control.models.parameters.args.start_time -aea config set vendor.fetchai.skills.tac_control.models.parameters.args.start_time '01 01 2020 00:01' +aea config get vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time +aea config set vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time '01 01 2020 00:01' +aea config set vendor.fetchai.skills.tac_control.is_abstract false --type bool ``` ### Update the connection params diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index 5e20c223bc..78c49b9a9a 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -36,3 +36,23 @@ default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 fetchai/ledger_api:0.5.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 +... +--- +author: fetchai +name: soef +version: 0.8.0 +type: connection +config: + api_key: TwiCIriSl0mLahw17pyqoA + chain_identifier: ethereum + soef_addr: soef.fetch.ai + soef_port: 9002 +... +--- +author: fetchai +name: tac_control +version: 0.7.0 +type: skill +is_abstract: true +... + \ No newline at end of file diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 622543e773..4d35f8bf9f 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -820,7 +820,7 @@ async def _register_agent(self) -> None: unique_token = child.text if not (len(unique_page_address) > 0 and len(unique_token) > 0): raise SOEFException.error( - "Agent registration error - page address or token not received" + f"Agent registration error - page address or token not received. Response text: {response_text}" ) self.logger.debug("Registering agent") params = {"token": unique_token} diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index f11cd94684..f9a8051241 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmWwjETX39APP9RD5oVPeeCiDnUoDvjAcoVe2FK2Jc6anM __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmfK5khjQuqewKVuqyedgmToQvRbh69oT8f5WcSvzvvjJL + connection.py: QmTcFbNone1bWPiAAAbVNfB1LEdTGMHv2s4iJBTAbuFJFv fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.6.0 diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index 222032e936..db890e4335 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -73,4 +73,3 @@ models: class_name: TacDialogues dependencies: numpy: {} -is_abstract: true diff --git a/packages/hashes.csv b/packages/hashes.csv index 90e6d12884..18edf9fbda 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -28,7 +28,7 @@ fetchai/connections/p2p_libp2p,QmVXSnhCn37mgacK7iG1HENbEkSvSZMMaf9RTFCUUDa2C9 fetchai/connections/p2p_libp2p_client,QmVEwABjAPTZcA4BaAgn8BnzUCpHQbSzc4pJ6mdR4bW222 fetchai/connections/p2p_stub,QmX8EWvFok3UAdqXGgir4TrhfDj2kLhfjuXRg82b6G6XtW fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmQWyjmHg6HWsLEuighe2vrWQSKBZAXvoXSXF33XhaVyE8 +fetchai/connections/soef,QmQ9EoLHBwmhnfbsaTBWYaf6NHKx2uCC9q7F95zwySmtYU fetchai/connections/stub,QmSuUAA2k1E1M9dpeAgkWpfKdssjqghSDfFfrQzC9ZLKbD fetchai/connections/tcp,QmU93B7yajCHwXsgDXXhv1uSuXi7VmFBhdahcFosbrr6nA fetchai/connections/webhook,QmaJunWQT1ypkqGnzrj5gYjjQBywjTHJmyktCZXZsa8hv8 @@ -62,7 +62,7 @@ fetchai/skills/ml_data_provider,QmdgxfES4XpmREpp9QqPQRMH9TvTF9nZ21zKM5RHLGCLke fetchai/skills/ml_train,QmbRQZz1MPXXuWyNW3BqhcsZKtZPhYakxGkVrBswNTgfk9 fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmeckN8mcKLeqmJoQfdYqPsJ49nbxxwBhYPhjkTS99v1De -fetchai/skills/tac_control,QmTcQU7qs8toZMB4KgpxbcBiQj8Eucytq48XP4tGGTYPDD +fetchai/skills/tac_control,QmebwggsT7Shux6S2qw9Rg7WC1MF2rdbWUYmDz8ChrGf21 fetchai/skills/tac_control_contract,QmahExwhU8sYaZC7PGD1ShrPNdzAM4AEPZ6eGhsrQk8umk fetchai/skills/tac_negotiation,QmRCZWxUh6mkaBsa1CYNk3fmNKzSVxfiqwYGbzU1E3672F fetchai/skills/tac_participation,QmWBATSrN9J3XoqMJ89iniMnMDZZpLqoenWTigukaDasQG From 2d71d1772a287c5b3bbb19cc14117ae99fb9feee Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 23 Sep 2020 12:53:44 +0200 Subject: [PATCH 056/131] update generate_ipfs_hashes script to support multipaged yamls --- .../agents/tac_controller_contract/aea-config.yaml | 8 ++------ packages/hashes.csv | 2 +- scripts/generate_ipfs_hashes.py | 10 +++++----- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index 78c49b9a9a..e4e41fa851 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -36,10 +36,9 @@ default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 fetchai/ledger_api:0.5.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 -... --- -author: fetchai name: soef +author: fetchai version: 0.8.0 type: connection config: @@ -47,12 +46,9 @@ config: chain_identifier: ethereum soef_addr: soef.fetch.ai soef_port: 9002 -... --- -author: fetchai name: tac_control +author: fetchai version: 0.7.0 type: skill is_abstract: true -... - \ No newline at end of file diff --git a/packages/hashes.csv b/packages/hashes.csv index 0b9c68e00b..ea255ffa61 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -12,7 +12,7 @@ fetchai/agents/ml_model_trainer,QmeZmVsNLUw7TP73s5cSomPnwggcrimXHh1RhrPRUDkoQ3 fetchai/agents/my_first_aea,QmcHnFYQCyXnAM2pN2M4HqLNGJpWApUP7PuiKaPcLkxbas fetchai/agents/simple_service_registration,QmWtA9eDYnGKkg5hov887LRJSXTXovb9pp4NJzU7JMq5Lg fetchai/agents/tac_controller,QmaG56sZaJRm8DwJXXt9Ci18Va8NfXx6v8vEGKPJngKL4q -fetchai/agents/tac_controller_contract,QmWQRysyhhATUqxRxrAqvEvcdjzCiDGkZDzp7f7yvRTAz4 +fetchai/agents/tac_controller_contract,QmebUjsztRPpidkaDLdxDqM3JGbQG3Rb5Li8CSwyrnLMWp fetchai/agents/tac_participant,QmQxN75ZFVEgizNHa3sqd2zHSnmPvRwS8PCv5FAsJBDnZw fetchai/agents/thermometer_aea,QmQ8KgTrt5fH8ZRDpioKGmeyUyc2EUkan4D5KzoFnCwxcG fetchai/agents/thermometer_client,QmUY6rmZnufWWmwfSi1m5gR6vD1ZowXpchpUJXgAH6xdNP diff --git a/scripts/generate_ipfs_hashes.py b/scripts/generate_ipfs_hashes.py index 017b7deb42..4813357fe5 100755 --- a/scripts/generate_ipfs_hashes.py +++ b/scripts/generate_ipfs_hashes.py @@ -41,7 +41,6 @@ from typing import Collection, Dict, List, Optional, Tuple, Type, cast import ipfshttpclient -import yaml from aea.configurations.base import ( AgentConfig, @@ -53,6 +52,7 @@ SkillConfig, _compute_fingerprint, ) +from aea.configurations.loader import ConfigLoaders from aea.helpers.base import yaml_dump, yaml_dump_all @@ -254,10 +254,10 @@ def load_configuration( configuration_filepath = ( package_path / configuration_class.default_configuration_filename ) - configuration_obj = cast( - PackageConfiguration, - configuration_class.from_json(yaml.safe_load(configuration_filepath.open())), - ) + + loader = ConfigLoaders.from_package_type(package_type) + with configuration_filepath.open() as fp: + configuration_obj = loader.load(fp) configuration_obj._directory = package_path # pylint: disable=protected-access return cast(PackageConfiguration, configuration_obj) From 07bea7bbdf09c920a6a0eb90c67d34e0b6974f0a Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 23 Sep 2020 14:02:50 +0200 Subject: [PATCH 057/131] update check_package_dependencies script to accomodate multi-paged yamls --- .../tac_controller_contract/aea-config.yaml | 16 ++++++------- .../skills/tac_control_contract/skill.yaml | 10 ++++---- scripts/check_package_dependencies.py | 24 ++++++++++++++++--- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index e4e41fa851..07f496c969 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -10,20 +10,20 @@ fingerprint_ignore_patterns: [] connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 -- fetchai/soef:0.8.0 +- fetchai/soef:0.9.0 - fetchai/stub:0.9.0 contracts: - fetchai/erc1155:0.10.0 protocols: - fetchai/contract_api:0.5.0 -- fetchai/default:0.5.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 -- fetchai/signing:0.3.0 -- fetchai/tac:0.6.0 +- fetchai/default:0.6.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 +- fetchai/signing:0.4.0 +- fetchai/tac:0.7.0 skills: -- fetchai/error:0.5.0 -- fetchai/tac_control:0.7.0 +- fetchai/error:0.6.0 +- fetchai/tac_control:0.8.0 - fetchai/tac_control_contract:0.9.0 default_connection: fetchai/p2p_libp2p:0.10.0 default_ledger: ethereum diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 24ade8c708..7f0c33ec9e 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -20,12 +20,12 @@ contracts: - fetchai/erc1155:0.10.0 protocols: - fetchai/contract_api:0.5.0 -- fetchai/ledger_api:0.3.0 -- fetchai/oef_search:0.6.0 -- fetchai/signing:0.3.0 -- fetchai/tac:0.6.0 +- fetchai/ledger_api:0.4.0 +- fetchai/oef_search:0.7.0 +- fetchai/signing:0.4.0 +- fetchai/tac:0.7.0 skills: -- fetchai/tac_control:0.7.0 +- fetchai/tac_control:0.8.0 behaviours: tac: args: {} diff --git a/scripts/check_package_dependencies.py b/scripts/check_package_dependencies.py index 882030b6e8..8904b9675b 100755 --- a/scripts/check_package_dependencies.py +++ b/scripts/check_package_dependencies.py @@ -30,7 +30,7 @@ from functools import partial from itertools import chain from pathlib import Path -from typing import Set +from typing import Dict, Set import yaml @@ -88,7 +88,7 @@ def get_public_id_from_yaml(configuration_file: Path): :param configuration_file: the path to the config yaml """ - data = yaml.safe_load(configuration_file.open()) + data = unified_yaml_load(configuration_file) author = data["author"] # handle the case when it's a package or agent config file. name = data["name"] if "name" in data else data["agent_name"] @@ -118,6 +118,24 @@ def handle_dependency_not_found(e: DependencyNotFound): print(f"Missing: {pprint.pformat(sorted_missing)}") +def unified_yaml_load(configuration_file: Path) -> Dict: + """ + Load YAML file, unified (both single- and multi-paged). + + :param configuration_file: the configuration file path. + :return: the data. + """ + package_type = configuration_file.parent.parent.name + with configuration_file.open() as fp: + if package_type != "agents": + return yaml.safe_load(fp) + # when it is an agent configuration file, + # we are interested only in the first page of the YAML, + # because the dependencies are contained only there. + data = yaml.safe_load_all(fp) + return list(data)[0] + + def check_dependencies(configuration_file: Path, all_packages_ids: Set[PackageId]): """ Check dependencies of configuration file. @@ -126,7 +144,7 @@ def check_dependencies(configuration_file: Path, all_packages_ids: Set[PackageId :param all_packages_ids: all the package ids. :return: None """ - data = yaml.safe_load(configuration_file.open()) + data = unified_yaml_load(configuration_file) def _add_package_type(package_type, public_id_str): return PackageId(package_type, PublicId.from_str(public_id_str)) From f87d67c4b2a10d1eebbf4520fff9bc35373f71f8 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 23 Sep 2020 14:07:09 +0200 Subject: [PATCH 058/131] update 'check_package_versions_in_docs' --- scripts/check_package_versions_in_docs.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/check_package_versions_in_docs.py b/scripts/check_package_versions_in_docs.py index 33ddb38144..e89d59d6fa 100755 --- a/scripts/check_package_versions_in_docs.py +++ b/scripts/check_package_versions_in_docs.py @@ -29,7 +29,7 @@ import sys from itertools import chain from pathlib import Path -from typing import Callable, Set +from typing import Callable, Dict, Set import yaml @@ -92,13 +92,31 @@ def default_config_file_paths(): yield item +def unified_yaml_load(configuration_file: Path) -> Dict: + """ + Load YAML file, unified (both single- and multi-paged). + + :param configuration_file: the configuration file path. + :return: the data. + """ + package_type = configuration_file.parent.parent.name + with configuration_file.open() as fp: + if package_type != "agents": + return yaml.safe_load(fp) + # when it is an agent configuration file, + # we are interested only in the first page of the YAML, + # because the dependencies are contained only there. + data = yaml.safe_load_all(fp) + return list(data)[0] + + def get_public_id_from_yaml(configuration_file: Path): """ Get the public id from yaml. :param configuration_file: the path to the config yaml """ - data = yaml.safe_load(configuration_file.open()) + data = unified_yaml_load(configuration_file) author = data["author"] # handle the case when it's a package or agent config file. name = data["name"] if "name" in data else data["agent_name"] From 087a3dce49d7d5d4dae647d405c4c8296f0a95d5 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 23 Sep 2020 14:13:36 +0200 Subject: [PATCH 059/131] fix versions in tac_controller_contract agent --- .../fetchai/agents/tac_controller_contract/aea-config.yaml | 4 ++-- packages/hashes.csv | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index 07f496c969..efbe561f76 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -39,7 +39,7 @@ default_routing: --- name: soef author: fetchai -version: 0.8.0 +version: 0.9.0 type: connection config: api_key: TwiCIriSl0mLahw17pyqoA @@ -49,6 +49,6 @@ config: --- name: tac_control author: fetchai -version: 0.7.0 +version: 0.8.0 type: skill is_abstract: true diff --git a/packages/hashes.csv b/packages/hashes.csv index ea255ffa61..37510f2a00 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -12,7 +12,7 @@ fetchai/agents/ml_model_trainer,QmeZmVsNLUw7TP73s5cSomPnwggcrimXHh1RhrPRUDkoQ3 fetchai/agents/my_first_aea,QmcHnFYQCyXnAM2pN2M4HqLNGJpWApUP7PuiKaPcLkxbas fetchai/agents/simple_service_registration,QmWtA9eDYnGKkg5hov887LRJSXTXovb9pp4NJzU7JMq5Lg fetchai/agents/tac_controller,QmaG56sZaJRm8DwJXXt9Ci18Va8NfXx6v8vEGKPJngKL4q -fetchai/agents/tac_controller_contract,QmebUjsztRPpidkaDLdxDqM3JGbQG3Rb5Li8CSwyrnLMWp +fetchai/agents/tac_controller_contract,QmXhKdptR5aW4TAx9J4auFGqwR3TpiTzdpsKp8KRHL7w7B fetchai/agents/tac_participant,QmQxN75ZFVEgizNHa3sqd2zHSnmPvRwS8PCv5FAsJBDnZw fetchai/agents/thermometer_aea,QmQ8KgTrt5fH8ZRDpioKGmeyUyc2EUkan4D5KzoFnCwxcG fetchai/agents/thermometer_client,QmUY6rmZnufWWmwfSi1m5gR6vD1ZowXpchpUJXgAH6xdNP @@ -63,7 +63,7 @@ fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr fetchai/skills/tac_control,QmTgw37facaPnt9RQcHNPzFasDmgG1PktEo2ZHfNqPjXet -fetchai/skills/tac_control_contract,QmbQgPstHthGrNE4tFyreFhp4K1HzGzEdtEcxPtGpeJT1N +fetchai/skills/tac_control_contract,QmTLPBLPZKdQRreeMbeuppRNJnGUr7YSqh7RULnEKkrKFy fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt fetchai/skills/thermometer,QmTud9hXxRq8wRzcf7hVeszou3crmAEZBaw5MjV8x4XtH1 From 1b93527b99c4348435e442310581c41a25786c56 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 23 Sep 2020 14:42:29 +0200 Subject: [PATCH 060/131] make 'is_abstract' a configurable field for skills --- aea/aea_builder.py | 12 ++++++------ aea/configurations/base.py | 2 ++ tests/test_aea_builder.py | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/aea/aea_builder.py b/aea/aea_builder.py index a3570bbdef..3eb5421f15 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -1365,6 +1365,12 @@ def _load_and_add_components( for configuration in self._package_dependency_manager.get_components_by_type( component_type ).values(): + configuration = deepcopy(configuration) + configuration.update( + self._custom_component_configurations.get( + configuration.component_id, {} + ) + ) if configuration.is_abstract_component: load_aea_package(configuration) continue @@ -1376,12 +1382,6 @@ def _load_and_add_components( logging.Logger, make_logger(configuration, agent_name) ) else: - configuration = deepcopy(configuration) - configuration.update( - self._custom_component_configurations.get( - configuration.component_id, {} - ) - ) _logger = make_logger(configuration, agent_name) component = load_component_from_config( configuration, logger=_logger, **kwargs diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 09671d7c89..d59c28b5bd 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -1333,6 +1333,8 @@ def update(self, data: Dict) -> None: model_config = SkillComponentConfiguration.from_json(model_data) self.models.update(model_id, model_config) + self.is_abstract = data.get("is_abstract", self.is_abstract) + class AgentConfig(PackageConfiguration): """Class to represent the agent configuration file.""" diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index 60c1c3858b..0bffd7927a 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -654,6 +654,43 @@ def test_from_project(self): assert dummy_model.config == self.expected_model_args +class TestFromAEAProjectMakeSkillAbstract(AEATestCase): + """Test builder set from project dir, to make a skill 'abstract'.""" + + path_to_aea = Path(CUR_PATH) / "data" / "dummy_aea" + + def _add_dummy_skill_config(self): + """Add custom stub connection config.""" + cwd = self._get_cwd() + aea_config_file = Path(cwd, DEFAULT_AEA_CONFIG_FILE) + configuration = aea_config_file.read_text() + # here we change all the dummy skill configurations + configuration += dedent( + f""" + --- + name: dummy + author: dummy_author + version: 0.1.0 + type: skill + is_abstract: true + ... + """ + ) + aea_config_file.write_text(configuration) + + def test_from_project(self): + """Test builder set from project dir.""" + self._add_dummy_skill_config() + builder = AEABuilder.from_aea_project(Path(self._get_cwd())) + with cd(self._get_cwd()): + aea = builder.build() + + dummy_skill = aea.resources.get_skill( + PublicId("dummy_author", "dummy", "0.1.0") + ) + assert dummy_skill is None, "Shouldn't have found the skill in Resources." + + class TestFromAEAProjectCustomConfigFailsWhenComponentNotDeclared(AEATestCaseEmpty): """Test builder set from project dir with custom component config fails when the component is not declared in the agent configuration.""" From 63d0d7b70127dbd73c44175a9bf8e0fea3629ab9 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 23 Sep 2020 14:51:30 +0200 Subject: [PATCH 061/131] update custom component config only for non-instance components in builder --- aea/aea_builder.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/aea/aea_builder.py b/aea/aea_builder.py index 3eb5421f15..ee5b77abe8 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -1365,16 +1365,6 @@ def _load_and_add_components( for configuration in self._package_dependency_manager.get_components_by_type( component_type ).values(): - configuration = deepcopy(configuration) - configuration.update( - self._custom_component_configurations.get( - configuration.component_id, {} - ) - ) - if configuration.is_abstract_component: - load_aea_package(configuration) - continue - if configuration in self._component_instances[component_type].keys(): component = self._component_instances[component_type][configuration] if configuration.component_type != ComponentType.SKILL: @@ -1382,6 +1372,15 @@ def _load_and_add_components( logging.Logger, make_logger(configuration, agent_name) ) else: + configuration = deepcopy(configuration) + configuration.update( + self._custom_component_configurations.get( + configuration.component_id, {} + ) + ) + if configuration.is_abstract_component: + load_aea_package(configuration) + continue _logger = make_logger(configuration, agent_name) component = load_component_from_config( configuration, logger=_logger, **kwargs From f5ee060be0b882f12feceeccefa371b6959745ef Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 15:14:14 +0100 Subject: [PATCH 062/131] fix tests --- docs/tac-skills-contract.md | 4 ++-- docs/tac-skills.md | 1 - packages/fetchai/skills/tac_control_contract/dialogues.py | 2 +- packages/fetchai/skills/tac_control_contract/skill.yaml | 2 +- packages/hashes.csv | 2 +- tests/test_aea_builder.py | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/tac-skills-contract.md b/docs/tac-skills-contract.md index 0ef6ee0985..75f3f7e628 100644 --- a/docs/tac-skills-contract.md +++ b/docs/tac-skills-contract.md @@ -217,8 +217,8 @@ Similar to how you funded the controller, fund both tac participants. Navigate to the tac controller project, then use the command line to get and set the start time (set it to at least five minutes - better 10 - in the future): ``` bash -aea config get vendor.fetchai.skills.tac_control_contract.models.parameters.args.start_time -aea config set vendor.fetchai.skills.tac_control_contract.models.parameters.args.start_time '01 01 2020 00:01' +aea config get vendor.fetchai.skills.tac_control_contract.models.parameters.args.registration_start_time +aea config set vendor.fetchai.skills.tac_control_contract.models.parameters.args.registration_start_time '01 01 2020 00:01' ``` ### Run the AEAs diff --git a/docs/tac-skills.md b/docs/tac-skills.md index 75aa76e58e..873c72ddf8 100644 --- a/docs/tac-skills.md +++ b/docs/tac-skills.md @@ -208,7 +208,6 @@ Navigate to the tac controller project, then use the command line to get and set ``` bash aea config get vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time aea config set vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time '01 01 2020 00:01' -aea config set vendor.fetchai.skills.tac_control.is_abstract false --type bool ``` ### Update the connection params diff --git a/packages/fetchai/skills/tac_control_contract/dialogues.py b/packages/fetchai/skills/tac_control_contract/dialogues.py index be35d63101..9e2b5c2588 100644 --- a/packages/fetchai/skills/tac_control_contract/dialogues.py +++ b/packages/fetchai/skills/tac_control_contract/dialogues.py @@ -124,7 +124,7 @@ def __init__( self._callable = None # type: Optional[ContractApiDialogue.Callable] @property - def callable(self) -> Callable: + def callable(self) -> "Callable": """Get the callable.""" if self._callable is None: raise ValueError("Callable not set!") diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 7f0c33ec9e..73c3ff5b53 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -10,7 +10,7 @@ fingerprint: README.md: QmUiw6Dt97mXLzSizbnMNTsfLy3edGXKdYTNR5bke6sFsm __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 behaviours.py: QmYcW84nnvCuv2HeDntixfWnFuJA2k9xqrhCWdmVFerLPv - dialogues.py: QmPNoMrAPBQb8ib5uwxxMXd8U8nG81uXt4no6WStS3pNob + dialogues.py: QmPJyBPETi7MggXLMKHWeYsAZbckxK2UFpci19dw3xwHDn game.py: QmQwskD5DBVNv1ouRpqGNLb3zQ5krLUcR6XXHUcJ5EVc8L handlers.py: QmSzNcZ3s3RjVm7mCXBhGjA379nwv3Tm9viEmw193WcNTd helpers.py: QmX3iv37Z5CmGupCtikc4muTpJyQ9zvjeLbNKDLF7iPhSZ diff --git a/packages/hashes.csv b/packages/hashes.csv index 37510f2a00..f2278b6f3a 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -63,7 +63,7 @@ fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr fetchai/skills/tac_control,QmTgw37facaPnt9RQcHNPzFasDmgG1PktEo2ZHfNqPjXet -fetchai/skills/tac_control_contract,QmTLPBLPZKdQRreeMbeuppRNJnGUr7YSqh7RULnEKkrKFy +fetchai/skills/tac_control_contract,QmYX4gNaGbx1EAuASwhpSgTdLYwUzuzajtKTuqvNFR9f2Q fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt fetchai/skills/thermometer,QmTud9hXxRq8wRzcf7hVeszou3crmAEZBaw5MjV8x4XtH1 diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index 0bffd7927a..ff6a6b85e7 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -666,7 +666,7 @@ def _add_dummy_skill_config(self): configuration = aea_config_file.read_text() # here we change all the dummy skill configurations configuration += dedent( - f""" + """ --- name: dummy author: dummy_author From b3b65bb3f88601985dd84a16e71c4a2f79a61feb Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 16:20:54 +0100 Subject: [PATCH 063/131] add additional pylint options --- .pylintrc | 7 +++-- aea/aea.py | 2 +- aea/cli_gui/__init__.py | 2 +- aea/crypto/cosmos.py | 4 --- aea/helpers/async_utils.py | 2 +- aea/helpers/exec_timeout.py | 2 +- aea/helpers/search/generic.py | 2 +- .../generator/extract_specification.py | 2 +- aea/test_tools/test_cases.py | 2 +- .../fetchai/connections/soef/connection.py | 29 ++++++++++--------- scripts/whitelist.py | 1 - .../test_connections/test_soef/models.py | 12 ++++---- 12 files changed, 32 insertions(+), 35 deletions(-) diff --git a/.pylintrc b/.pylintrc index 9b2784db56..eebe04c217 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,7 +2,7 @@ ignore-patterns=serialization.py,message.py,__main__.py,.*_pb2.py [MESSAGES CONTROL] -disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0902,R0913,R0914,R0801,R0904,R0903,R0911,R0912,R0901,R0916,R1702,R0915,R1725 +disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0902,R0913,R0914,R0801,R0904,R0911,R0912,R0901,R0916,R1702,R0915 ## Eventually resolve these: # W0707: raise-missing-from @@ -10,14 +10,12 @@ disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0902,R0913, # R0913: too-many-arguments # R0914: too-many-locals # R0904: too-many-public-methods -# R0903: too-few-public-methods # R0911: too-many-return-statements # R0912: too-many-branches # R0901: too-many-ancestors # R0916: too-many-boolean-expressions # R1702: too-many-nested-blocks # R0915: too-many-statements -# R1725: super-with-arguments # decide on a logging policy: # W1202: logging-format-interpolation # W1203: logging-fstring-interpolation @@ -34,3 +32,6 @@ disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0902,R0913, [IMPORTS] ignored-modules=aiohttp,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,vyper,web3 + +[DESIGN] +min-public-methods=1 \ No newline at end of file diff --git a/aea/aea.py b/aea/aea.py index bb3ff4c5e2..89a5022189 100644 --- a/aea/aea.py +++ b/aea/aea.py @@ -341,7 +341,7 @@ def get_message_handlers(self) -> List[Tuple[Callable[[Any], None], Callable]]: :return: List of tuples of callables: handler and coroutine to get a message """ - return super(AEA, self).get_message_handlers() + [ + return super().get_message_handlers() + [ (self.filter.handle_internal_message, self.filter.get_internal_message,), ] diff --git a/aea/cli_gui/__init__.py b/aea/cli_gui/__init__.py index e9a490bbf9..2690348e64 100644 --- a/aea/cli_gui/__init__.py +++ b/aea/cli_gui/__init__.py @@ -70,7 +70,7 @@ max_log_lines = 100 -class AppContext: +class AppContext: # pylint: disable=too-few-public-methods """Store useful global information about the app. Can't add it into the app object itself because mypy complains. diff --git a/aea/crypto/cosmos.py b/aea/crypto/cosmos.py index d0a94db085..59533cd3d9 100644 --- a/aea/crypto/cosmos.py +++ b/aea/crypto/cosmos.py @@ -864,10 +864,6 @@ class CosmosApi(_CosmosApi, CosmosHelper): """Class to interact with the Cosmos SDK via a HTTP APIs.""" -class CosmWasmCLIWrapper: - """Wrapper of the CosmWasm CLI.""" - - """ Equivalent to: @dataclass diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 3adb111db1..0723a00b58 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -474,6 +474,6 @@ def __init__(self, getters: List[Tuple[Callable[[Any], None], Callable]]): :param getters: List of tuples of handler and couroutine to be awaiteed for an item. """ - super(HandlerItemGetter, self).__init__( + super().__init__( [self._make_getter(handler, getter) for handler, getter in getters] ) diff --git a/aea/helpers/exec_timeout.py b/aea/helpers/exec_timeout.py index 674e80e79b..b6b605cb18 100644 --- a/aea/helpers/exec_timeout.py +++ b/aea/helpers/exec_timeout.py @@ -136,7 +136,7 @@ def _remove_timeout_watch(self) -> None: raise NotImplementedError # pragma: nocover -class ExecTimeoutSigAlarm(BaseExecTimeout): +class ExecTimeoutSigAlarm(BaseExecTimeout): # pylint: disable=too-few-public-methods """ ExecTimeout context manager implementation using signals and SIGALARM. diff --git a/aea/helpers/search/generic.py b/aea/helpers/search/generic.py index 5891d71a3a..ec9abd8c3d 100644 --- a/aea/helpers/search/generic.py +++ b/aea/helpers/search/generic.py @@ -28,7 +28,7 @@ SUPPORTED_TYPES = {"str": str, "int": int, "float": float, "bool": bool} -class GenericDataModel(DataModel): +class GenericDataModel(DataModel): # pylint: disable=too-few-public-methods """Generic data model.""" def __init__(self, data_model_name: str, data_model_attributes: Dict[str, Any]): diff --git a/aea/protocols/generator/extract_specification.py b/aea/protocols/generator/extract_specification.py index e3f42cf45c..550c3d5dc1 100644 --- a/aea/protocols/generator/extract_specification.py +++ b/aea/protocols/generator/extract_specification.py @@ -143,7 +143,7 @@ def _specification_type_to_python_type(specification_type: str) -> str: return python_type -class PythonicProtocolSpecification: +class PythonicProtocolSpecification: # pylint: disable=too-few-public-methods """This class represents a protocol specification in python.""" def __init__(self) -> None: diff --git a/aea/test_tools/test_cases.py b/aea/test_tools/test_cases.py index 55e1b9d2bc..d058f4d1f9 100644 --- a/aea/test_tools/test_cases.py +++ b/aea/test_tools/test_cases.py @@ -798,7 +798,7 @@ def teardown_class(cls): @pytest.mark.integration -class UseOef: +class UseOef: # pylint: disable=too-few-public-methods """Inherit from this class to launch an OEF node.""" @pytest.fixture(autouse=True) diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 0a0f6c4a28..66a39a80b3 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -26,6 +26,7 @@ from concurrent.futures._base import CancelledError as ConcurrentCancelledError from concurrent.futures.thread import ThreadPoolExecutor from contextlib import suppress +from enum import Enum from typing import Callable, Dict, List, Optional, Set, Type, Union, cast from urllib import parse from uuid import uuid4 @@ -80,16 +81,16 @@ ] -class ModelNames: +class ModelNames(Enum): """Enum of supported data models.""" - location_agent = "location_agent" - set_service_key = "set_service_key" - remove_service_key = "remove_service_key" - personality_agent = "personality_agent" - search_model = "search_model" - ping = "ping" - generic_command = "generic_command" + LOCATION_AGENT = "location_agent" + SET_SERVICE_KEY = "set_service_key" + REMOVE_SERVICE_KEY = "remove_service_key" + PERSONALITY_AGENT = "personality_agent" + SEARCH_MODEL = "search_model" + PING = "ping" + GENERIC_COMMAND = "generic_command" class SOEFException(Exception): @@ -511,7 +512,7 @@ async def _ping_handler( :return None """ - self._check_data_model(service_description, ModelNames.ping) + self._check_data_model(service_description, ModelNames.PING.value) await self._ping_command() async def _generic_command_handler( @@ -531,7 +532,7 @@ async def _generic_command_handler( """not connected.""" return - self._check_data_model(service_description, ModelNames.generic_command) + self._check_data_model(service_description, ModelNames.GENERIC_COMMAND.value) command = service_description.values.get("command", None) params = service_description.values.get("parameters", {}) @@ -593,7 +594,7 @@ async def _set_service_key_handler( :param service_description: Service description :return None """ - self._check_data_model(service_description, ModelNames.set_service_key) + self._check_data_model(service_description, ModelNames.SET_SERVICE_KEY.value) key = service_description.values.get("key", None) value = service_description.values.get("value", NOT_SPECIFIED) @@ -654,7 +655,7 @@ async def _remove_service_key_handler( :param service_description: Service description :return None """ - self._check_data_model(service_description, ModelNames.remove_service_key) + self._check_data_model(service_description, ModelNames.REMOVE_SERVICE_KEY.value) key = service_description.values.get("key", None) if key is None: # pragma: nocover @@ -683,7 +684,7 @@ async def _register_location_handler( :param service_description: Service description :return None """ - self._check_data_model(service_description, ModelNames.location_agent) + self._check_data_model(service_description, ModelNames.LOCATION_AGENT.value) agent_location = service_description.values.get("location", None) @@ -761,7 +762,7 @@ async def _set_personality_piece_handler( :param piece: the piece to be set :param value: the value to be set """ - self._check_data_model(service_description, ModelNames.personality_agent) + self._check_data_model(service_description, ModelNames.PERSONALITY_AGENT.value) piece = service_description.values.get("piece", None) value = service_description.values.get("value", None) diff --git a/scripts/whitelist.py b/scripts/whitelist.py index 296f020813..9547a8a7fa 100644 --- a/scripts/whitelist.py +++ b/scripts/whitelist.py @@ -78,7 +78,6 @@ _.try_execute_wasm_query # unused method (aea/crypto/cosmos.py:571) _.get_last_code_id # unused method (aea/crypto/cosmos.py:837) _.get_contract_address # unused method (aea/crypto/cosmos.py:849) -CosmWasmCLIWrapper # unused class (aea/crypto/cosmos.py:863) CosmosFaucetApi # unused class (aea/crypto/cosmos.py:867) testnet_name # unused variable (aea/crypto/cosmos.py:871) EthereumFaucetApi # unused class (aea/crypto/ethereum.py:507) diff --git a/tests/test_packages/test_connections/test_soef/models.py b/tests/test_packages/test_connections/test_soef/models.py index 0f523d5807..aab233f1b1 100644 --- a/tests/test_packages/test_connections/test_soef/models.py +++ b/tests/test_packages/test_connections/test_soef/models.py @@ -24,7 +24,7 @@ AGENT_LOCATION_MODEL = DataModel( - ModelNames.location_agent, + ModelNames.LOCATION_AGENT.value, [ Attribute("location", Location, True, "The location where the agent is."), Attribute("disclosure_accuracy", str, False, "Optional disclosure accuracy."), @@ -34,7 +34,7 @@ AGENT_PERSONALITY_MODEL = DataModel( - ModelNames.personality_agent, + ModelNames.PERSONALITY_AGENT.value, [ Attribute("piece", str, True, "The personality piece key."), Attribute("value", str, True, "The personality piece value."), @@ -44,7 +44,7 @@ SET_SERVICE_KEY_MODEL = DataModel( - ModelNames.set_service_key, + ModelNames.SET_SERVICE_KEY.value, [ Attribute("key", str, True, "Service key name."), Attribute("value", str, True, "Service key value."), @@ -54,12 +54,12 @@ REMOVE_SERVICE_KEY_MODEL = DataModel( - ModelNames.remove_service_key, + ModelNames.REMOVE_SERVICE_KEY.value, [Attribute("key", str, True, "Service key name.")], "A data model to remove service key.", ) -PING_MODEL = DataModel(ModelNames.ping, [], "A data model for ping command.",) +PING_MODEL = DataModel(ModelNames.PING.value, [], "A data model for ping command.",) SEARCH_MODEL = DataModel( @@ -70,7 +70,7 @@ AGENT_GENERIC_COMMAND_MODEL = DataModel( - ModelNames.generic_command, + ModelNames.GENERIC_COMMAND.value, [ Attribute("command", str, True, "Command name to execute."), Attribute("parameters", str, False, "Url encoded parameters string."), From 5c674907cfc5769636a4a78996e235151429ff10 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 19:57:37 +0100 Subject: [PATCH 064/131] fix docs tests --- aea/cli/utils/config.py | 2 +- packages/fetchai/connections/soef/connection.yaml | 2 +- packages/hashes.csv | 2 +- .../test_bash_yaml/md_files/bash-tac-skills-contract.md | 5 +++-- tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md | 4 ++-- tests/test_packages/test_connections/test_soef/models.py | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/aea/cli/utils/config.py b/aea/cli/utils/config.py index 4850c71eba..9ca1237d60 100644 --- a/aea/cli/utils/config.py +++ b/aea/cli/utils/config.py @@ -82,7 +82,7 @@ def try_to_load_agent_config( ) ) except AEAEnforceError as e: - raise click.ClickException(str(e)) + raise click.ClickException(str(e)) # pragma: nocover def _init_cli_config() -> None: diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index 82f6d15805..da4a8d5dc4 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmS9zorTodmaRyaxocELEwEqHEPowKoG9wgSAak7s59rZD __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmToZaADzMNpPZr6SMhM4ACwCP3iLi3XfmXxx4F89NxZe5 + connection.py: QmRTPeJ8aTDuWs28EM7vbBEDbZ75XqqzCo8zhSNXEGmeK3 fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.7.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index f2278b6f3a..0dbe4d6617 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -28,7 +28,7 @@ fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4Jb27b fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmWgtvW6vvXKhmmAS1n61LZ4rhFnuLcUM61XLW47WiuBfd +fetchai/connections/soef,Qme2vP55mGemMKMWdHKGUaC1nW88ZEdD55qgdY9a984T7i fetchai/connections/stub,QmSuUAA2k1E1M9dpeAgkWpfKdssjqghSDfFfrQzC9ZLKbD fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md index 0003698f96..e7d2030463 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills-contract.md @@ -67,8 +67,9 @@ aea config set vendor.fetchai.skills.tac_participation.models.game.args.is_using aea config set vendor.fetchai.skills.tac_negotiation.models.strategy.args.is_contract_tx 'True' --type bool ``` ``` bash -aea config get vendor.fetchai.skills.tac_control_contract.models.parameters.args.start_time -aea config set vendor.fetchai.skills.tac_control_contract.models.parameters.args.start_time '01 01 2020 00:01' +aea config get vendor.fetchai.skills.tac_control_contract.models.parameters.args.registration_start_time +aea config set vendor.fetchai.skills.tac_control_contract.models.parameters.args.registration_start_time '01 01 2020 00:01' +``` ``` ``` bash aea launch tac_controller_contract tac_participant_one tac_participant_two diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md index b21b9cf691..f2ef4b05a6 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-tac-skills.md @@ -52,8 +52,8 @@ aea add-key fetchai fetchai_private_key.txt aea add-key fetchai fetchai_private_key.txt --connection ``` ``` bash -aea config get vendor.fetchai.skills.tac_control.models.parameters.args.start_time -aea config set vendor.fetchai.skills.tac_control.models.parameters.args.start_time '01 01 2020 00:01' +aea config get vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time +aea config set vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time '01 01 2020 00:01' ``` ``` bash aea run diff --git a/tests/test_packages/test_connections/test_soef/models.py b/tests/test_packages/test_connections/test_soef/models.py index aab233f1b1..29beaae8fa 100644 --- a/tests/test_packages/test_connections/test_soef/models.py +++ b/tests/test_packages/test_connections/test_soef/models.py @@ -63,7 +63,7 @@ SEARCH_MODEL = DataModel( - ModelNames.search_model, + ModelNames.SEARCH_MODEL.value, [Attribute("location", Location, True, "The location where the agent is.")], "A data model to perform search.", ) From 1e7828248a554eb9ac01f7a3e4ba2bc91199163b Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 20:04:46 +0100 Subject: [PATCH 065/131] enable max-public-methods check and resolve issues --- .pylintrc | 6 +++--- packages/fetchai/skills/carpark_detection/database.py | 2 +- packages/fetchai/skills/carpark_detection/skill.yaml | 2 +- packages/hashes.csv | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pylintrc b/.pylintrc index eebe04c217..83401493fb 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,14 +2,13 @@ ignore-patterns=serialization.py,message.py,__main__.py,.*_pb2.py [MESSAGES CONTROL] -disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0902,R0913,R0914,R0801,R0904,R0911,R0912,R0901,R0916,R1702,R0915 +disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0902,R0913,R0914,R0801,R0911,R0912,R0901,R0916,R1702,R0915 ## Eventually resolve these: # W0707: raise-missing-from # R0902: too-many-instance-attributes # R0913: too-many-arguments # R0914: too-many-locals -# R0904: too-many-public-methods # R0911: too-many-return-statements # R0912: too-many-branches # R0901: too-many-ancestors @@ -34,4 +33,5 @@ disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0902,R0913, ignored-modules=aiohttp,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,vyper,web3 [DESIGN] -min-public-methods=1 \ No newline at end of file +min-public-methods=1 +max-public-methods=35 diff --git a/packages/fetchai/skills/carpark_detection/database.py b/packages/fetchai/skills/carpark_detection/database.py index 31dd90e8f9..245d4c0155 100644 --- a/packages/fetchai/skills/carpark_detection/database.py +++ b/packages/fetchai/skills/carpark_detection/database.py @@ -33,7 +33,7 @@ ) -class DetectionDatabase: +class DetectionDatabase: # pylint: disable=too-many-public-methods """Communicate between the database and the python objects.""" def __init__( diff --git a/packages/fetchai/skills/carpark_detection/skill.yaml b/packages/fetchai/skills/carpark_detection/skill.yaml index 1aaadad48e..4d5e40c87a 100644 --- a/packages/fetchai/skills/carpark_detection/skill.yaml +++ b/packages/fetchai/skills/carpark_detection/skill.yaml @@ -10,7 +10,7 @@ fingerprint: README.md: QmcwNhv5N8m4ZtWvXY5eMDeL5ciivryDZPtGWXMFfTbYR7 __init__.py: QmQoECB7dpCDCG3xCnBsoMy6oqgSdu69CzRcAcuZuyapnQ behaviours.py: QmTNboU3YH8DehWnpZmoiDUCncpNmqoSVt1Yp4j7NsgY2S - database.py: QmcZ7zomRfpVakRQBaDFzkuAN8noEWkHo2LLxUMNpF1xUp + database.py: QmPQqzgsmFKBSMoYbuEpEMnikmkEadaT9VrD8ics5Het2b dialogues.py: QmPXfUWDxnHDaHQqsgtVhJ2v9dEgGWLtvEHKFvvFcDXGms handlers.py: QmbkmEP9K4Qu2MsRtnkdx3PGNbSW46qi48bCHVCUJHpcQF strategy.py: QmUCmsvvKqRsM4nFuhsUUTfCnZ6zPffXytD3PjMjFdqHdU diff --git a/packages/hashes.csv b/packages/hashes.csv index 0dbe4d6617..76ae3305fb 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -49,7 +49,7 @@ fetchai/protocols/tac,QmY6N5spfcwikq3pb99mdYAEieECqmtawbcitGJRicDh7H fetchai/skills/aries_alice,QmefZJ27H36RZYgA6eEcnbv8yNPyf3YYXnBm5E88C8xBLQ fetchai/skills/aries_faber,QmYAQ8gVsokPsXHd7RDXb8KCkmH7XpB8JC7VMx3QrJX3Uh fetchai/skills/carpark_client,QmYjZXvq2h2DCXZF2ba9W5cvJAvsRFvBrw7h7EwcvWThfW -fetchai/skills/carpark_detection,QmRLr3ALHF1iLFFpUmXHKZmMwbFz5vfph8qCv7rKQpte2r +fetchai/skills/carpark_detection,QmV5qPay1FMk3tsygygRL4ThsBRxFL5nZe7x5NrXFXpSJN fetchai/skills/echo,QmYKGMNs5NU7ycWXRBQnKrfBcg5HPnUnH13K1YFnPLQgW6 fetchai/skills/erc1155_client,Qmd6KJbis7Me39teeHA8y3JZHQrS1hjovMxhqiwViRZhgc fetchai/skills/erc1155_deploy,QmZHDmFaxJmieLaCUJKBwp1EsTEAAxbFvFkfLjL4fVyhfK From a42c51d0a59e09468c723c2702693edf2fd9bed6 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 21:35:23 +0100 Subject: [PATCH 066/131] attempt to fix tac control skill --- packages/fetchai/skills/tac_control/parameters.py | 2 +- packages/fetchai/skills/tac_control/skill.yaml | 5 +++-- packages/hashes.csv | 2 +- tests/test_packages/test_skills/test_tac.py | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/fetchai/skills/tac_control/parameters.py b/packages/fetchai/skills/tac_control/parameters.py index f4bfe793b9..a490fa92c9 100644 --- a/packages/fetchai/skills/tac_control/parameters.py +++ b/packages/fetchai/skills/tac_control/parameters.py @@ -207,7 +207,7 @@ def nb_goods(self) -> int: @property def nb_currencies(self) -> int: """Currency number for a TAC instance.""" - return self._nb_goods + return self._nb_currencies @property def currency_id_to_name(self) -> Dict[str, str]: diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index e62dd6ce2d..85cb506acc 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -14,7 +14,7 @@ fingerprint: game.py: QmTovmW5vuhUcnvW4wQQcbPpiUFLLvMH7LaeTZYVvjqLcF handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW helpers.py: QmQXrtqV3h4oU5cDwWKhtNiTTAGLNZGhjoVnDvGj7mGwpe - parameters.py: QmbdCERZFXWjP4ov7uLvmFGxvrTep3RwiQauXevLcJNLbY + parameters.py: QmeviKY6o3H2FYNFaB9PibZGZc1CwMgLbrCbPoSmZDsikv fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 @@ -58,7 +58,8 @@ models: lower_bound_factor: 1 min_nb_agents: 2 money_endowment: 2000000 - nb_goods: 10 + nb_currencies: 1 + nb_goods: 9 registration_start_time: 01 01 2020 00:01 registration_timeout: 60 service_data: diff --git a/packages/hashes.csv b/packages/hashes.csv index 76ae3305fb..7800832144 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -62,7 +62,7 @@ fetchai/skills/ml_data_provider,QmaKyLjyvcj35bCHaKKo15MeF7k48hKPCfFbrtvXCogYwV fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr -fetchai/skills/tac_control,QmTgw37facaPnt9RQcHNPzFasDmgG1PktEo2ZHfNqPjXet +fetchai/skills/tac_control,QmPFxFsYqRZvz7BRStWLV9Fo4Wd77iTNBWuBSU2VZeqrwL fetchai/skills/tac_control_contract,QmYX4gNaGbx1EAuASwhpSgTdLYwUzuzajtKTuqvNFR9f2Q fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index 1ff948a692..f9e319525c 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -47,7 +47,7 @@ class TestTacSkills(AEATestCaseMany): @pytest.mark.integration @pytest.mark.flaky( - reruns=MAX_FLAKY_RERUNS_INTEGRATION + reruns=0 ) # cause possible network issues def test_tac(self): """Run the tac skills sequence.""" @@ -143,10 +143,10 @@ def test_tac(self): self.set_agent_context(tac_controller_name) now = datetime.datetime.now().strftime("%d %m %Y %H:%M") now_min = datetime.datetime.strptime(now, "%d %m %Y %H:%M") - fut = now_min + datetime.timedelta(0, 120) + fut = now_min # + datetime.timedelta(0, 120) start_time = fut.strftime("%d %m %Y %H:%M") setting_path = ( - "vendor.fetchai.skills.tac_control.models.parameters.args.start_time" + "vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time" ) self.set_config(setting_path, start_time) tac_controller_process = self.run_agent() From 84785415cd80bb2ce3cc7ced06566ad747ee5c2b Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 22:08:06 +0100 Subject: [PATCH 067/131] update tac protocol --- packages/fetchai/protocols/tac/README.md | 2 +- packages/fetchai/protocols/tac/dialogues.py | 1 + packages/fetchai/protocols/tac/protocol.yaml | 4 ++-- packages/hashes.csv | 2 +- tests/test_packages/test_skills/test_tac.py | 6 ++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/fetchai/protocols/tac/README.md b/packages/fetchai/protocols/tac/README.md index 286ad842ef..4a7397b04e 100644 --- a/packages/fetchai/protocols/tac/README.md +++ b/packages/fetchai/protocols/tac/README.md @@ -71,7 +71,7 @@ initiation: [register] reply: register: [tac_error, game_data, cancelled] unregister: [tac_error] - transaction: [transaction_confirmation, tac_error, cancelled] + transaction: [transaction, transaction_confirmation, tac_error, cancelled] cancelled: [] game_data: [transaction, transaction_confirmation, cancelled] transaction_confirmation: [transaction, transaction_confirmation, cancelled] diff --git a/packages/fetchai/protocols/tac/dialogues.py b/packages/fetchai/protocols/tac/dialogues.py index 250ae33e75..fb09acd3fa 100644 --- a/packages/fetchai/protocols/tac/dialogues.py +++ b/packages/fetchai/protocols/tac/dialogues.py @@ -66,6 +66,7 @@ class TacDialogue(Dialogue): ), TacMessage.Performative.TRANSACTION: frozenset( { + TacMessage.Performative.TRANSACTION, TacMessage.Performative.TRANSACTION_CONFIRMATION, TacMessage.Performative.TAC_ERROR, TacMessage.Performative.CANCELLED, diff --git a/packages/fetchai/protocols/tac/protocol.yaml b/packages/fetchai/protocols/tac/protocol.yaml index cc916bf083..7b320ff557 100644 --- a/packages/fetchai/protocols/tac/protocol.yaml +++ b/packages/fetchai/protocols/tac/protocol.yaml @@ -7,10 +7,10 @@ description: The tac protocol implements the messages an AEA needs to participat license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: - README.md: QmcUpwxG2ZzdwMeMGGTVyJgsRVbrCUKtYB2qqLy4YsuBez + README.md: QmSZJ6wsgqjYN6cqWQKShj2xpruYMCxbK1m6TKk4V4Aopn __init__.py: QmSAC7PGra9fig8RhhF1j3XEVpgie9UZNNYPc2AB9Kx9xJ custom_types.py: QmXQATfnvuCpt4FicF4QcqCcLj9PQNsSHjCBvVQknWpyaN - dialogues.py: QmTxHrcGujP1RUYvfJygZyQoUwmDg2GBWfmbR3tWUSbyop + dialogues.py: QmQvuivrjhVFu7pjSFfv6FrWwVeBC7p8Hm3P4gjCnVx5Ym message.py: QmWD79nj4kcMPN9xuDkgSDXnwgDnT6XE1WcdfBKsKKPqTP serialization.py: QmTk2Jp19dQ4SJdjSHAr8wbxw4rQSMheSuf1XzXG8CaoB4 tac.proto: QmdpPZNhUW593qVNVoSTWZgd9R69bmBbw6Y9xjzYpvuDvV diff --git a/packages/hashes.csv b/packages/hashes.csv index 7800832144..382daea0fa 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -45,7 +45,7 @@ fetchai/protocols/oef_search,QmWiRygk9JHtCJ6FbSK49uwkCzsSu6wJVqc27iQEwGphFR fetchai/protocols/scaffold,QmaQJxMae5XaHKDc838pcGEKhhYSUyKHGWiMfU6zEcVHsy fetchai/protocols/signing,Qmazm8bkwpPVV7BiJZx2Aha96AcmAxwiYbjgYGwvcgXGYi fetchai/protocols/state_update,QmS1xuSYYgHkQq8Ww2btsS88rTXXjhchyStzUfcWYQKNda -fetchai/protocols/tac,QmY6N5spfcwikq3pb99mdYAEieECqmtawbcitGJRicDh7H +fetchai/protocols/tac,QmYuMW1tNE5eLdKEo5T6uyTYmVmGuavQLT4xx3hDaGNLJJ fetchai/skills/aries_alice,QmefZJ27H36RZYgA6eEcnbv8yNPyf3YYXnBm5E88C8xBLQ fetchai/skills/aries_faber,QmYAQ8gVsokPsXHd7RDXb8KCkmH7XpB8JC7VMx3QrJX3Uh fetchai/skills/carpark_client,QmYjZXvq2h2DCXZF2ba9W5cvJAvsRFvBrw7h7EwcvWThfW diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index f9e319525c..b74dbb2f4a 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -47,7 +47,7 @@ class TestTacSkills(AEATestCaseMany): @pytest.mark.integration @pytest.mark.flaky( - reruns=0 + reruns=MAX_FLAKY_RERUNS_INTEGRATION ) # cause possible network issues def test_tac(self): """Run the tac skills sequence.""" @@ -145,9 +145,7 @@ def test_tac(self): now_min = datetime.datetime.strptime(now, "%d %m %Y %H:%M") fut = now_min # + datetime.timedelta(0, 120) start_time = fut.strftime("%d %m %Y %H:%M") - setting_path = ( - "vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time" - ) + setting_path = "vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time" self.set_config(setting_path, start_time) tac_controller_process = self.run_agent() From 3c79fc24e729da18e90c7dc72e078f5aca713fac Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 22:38:21 +0100 Subject: [PATCH 068/131] mute cancel error in stub connection --- aea/connections/stub/connection.py | 3 +++ aea/connections/stub/connection.yaml | 2 +- packages/hashes.csv | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/aea/connections/stub/connection.py b/aea/connections/stub/connection.py index a80267f0c9..9797a9094d 100644 --- a/aea/connections/stub/connection.py +++ b/aea/connections/stub/connection.py @@ -251,6 +251,9 @@ async def receive(self, *args, **kwargs) -> Optional["Envelope"]: try: return await self.in_queue.get() + except CancelledError: # pragma: no cover + self.logger.debug("Receive cancelled.") + return None except Exception: # pylint: disable=broad-except logger.exception("Stub connection receive error:") return None diff --git a/aea/connections/stub/connection.yaml b/aea/connections/stub/connection.yaml index 743ee3598a..d9bb0817dd 100644 --- a/aea/connections/stub/connection.yaml +++ b/aea/connections/stub/connection.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: __init__.py: QmWwepN9Fy9gHAp39vUGFSLdnB9JZjdyE3STnbowSUhJkC - connection.py: QmTSESVFvsDc9iq2QM3YdZju3yHqTA3wHbLkAzHXEFY17Z + connection.py: QmVjZwuNd6JLRDp2DzZxbLwF5feSrGiULWowZSan9Caogk readme.md: QmXSAtxSY7C2YkvUxeVnpqCJY9uJYZxZBmuUcE4zjFXcXz fingerprint_ignore_patterns: [] protocols: [] diff --git a/packages/hashes.csv b/packages/hashes.csv index 382daea0fa..29718482ad 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -29,7 +29,7 @@ fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4J fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS fetchai/connections/soef,Qme2vP55mGemMKMWdHKGUaC1nW88ZEdD55qgdY9a984T7i -fetchai/connections/stub,QmSuUAA2k1E1M9dpeAgkWpfKdssjqghSDfFfrQzC9ZLKbD +fetchai/connections/stub,QmWarW8MTJ3CHRgXdkbwKK7DyDKzvQKdZeb95uy8kSnxrT fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd fetchai/contracts/erc1155,QmWu22zW9AVMBVySwF413JMiT5dcWsLsU2gk1KvFYWAwPq From 70ee5aa4bd79ddbf3a4f7c9fac15e9de5f27be88 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 22:47:45 +0100 Subject: [PATCH 069/131] fix yaml loading in scripts and fix tac test --- scripts/deploy_to_registry.py | 22 +++++++++++++++++++-- scripts/update_package_versions.py | 20 ++++++++++++++++++- tests/test_packages/test_skills/test_tac.py | 2 +- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/scripts/deploy_to_registry.py b/scripts/deploy_to_registry.py index 97729d068a..769139bd04 100644 --- a/scripts/deploy_to_registry.py +++ b/scripts/deploy_to_registry.py @@ -25,7 +25,7 @@ import sys from itertools import chain from pathlib import Path -from typing import Set +from typing import Dict, Set import yaml from click.testing import CliRunner @@ -51,13 +51,31 @@ def default_config_file_paths(): yield item +def unified_yaml_load(configuration_file: Path) -> Dict: + """ + Load YAML file, unified (both single- and multi-paged). + + :param configuration_file: the configuration file path. + :return: the data. + """ + package_type = configuration_file.parent.parent.name + with configuration_file.open() as fp: + if package_type != "agents": + return yaml.safe_load(fp) + # when it is an agent configuration file, + # we are interested only in the first page of the YAML, + # because the dependencies are contained only there. + data = yaml.safe_load_all(fp) + return list(data)[0] + + def get_public_id_from_yaml(configuration_file: Path): """ Get the public id from yaml. :param configuration_file: the path to the config yaml """ - data = yaml.safe_load(configuration_file.open()) + data = unified_yaml_load(configuration_file) author = data["author"] # handle the case when it's a package or agent config file. name = data["name"] if "name" in data else data["agent_name"] diff --git a/scripts/update_package_versions.py b/scripts/update_package_versions.py index a93f1067f0..e0ef1d5010 100644 --- a/scripts/update_package_versions.py +++ b/scripts/update_package_versions.py @@ -196,13 +196,31 @@ def get_configuration_file_path(type_: str, name: str) -> Path: sys.exit(1) +def unified_yaml_load(configuration_file: Path) -> Dict: + """ + Load YAML file, unified (both single- and multi-paged). + + :param configuration_file: the configuration file path. + :return: the data. + """ + package_type = configuration_file.parent.parent.name + with configuration_file.open() as fp: + if package_type != "agents": + return yaml.safe_load(fp) + # when it is an agent configuration file, + # we are interested only in the first page of the YAML, + # because the dependencies are contained only there. + data = yaml.safe_load_all(fp) + return list(data)[0] + + def get_public_id_from_yaml(configuration_file_path: Path) -> PublicId: """ Get the public id from yaml. :param configuration_file_path: the path to the config yaml """ - data = yaml.safe_load(configuration_file_path.open()) + data = unified_yaml_load(configuration_file_path) author = data["author"] # handle the case when it's a package or agent config file. name = data["name"] if "name" in data else data["agent_name"] diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index b74dbb2f4a..88a8c90156 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -143,7 +143,7 @@ def test_tac(self): self.set_agent_context(tac_controller_name) now = datetime.datetime.now().strftime("%d %m %Y %H:%M") now_min = datetime.datetime.strptime(now, "%d %m %Y %H:%M") - fut = now_min # + datetime.timedelta(0, 120) + fut = now_min + datetime.timedelta(0, 60) start_time = fut.strftime("%d %m %Y %H:%M") setting_path = "vendor.fetchai.skills.tac_control.models.parameters.args.registration_start_time" self.set_config(setting_path, start_time) From 2cd1b88039efc9f5f9851717fc2160629764cf07 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 22:50:51 +0100 Subject: [PATCH 070/131] bump stub connection --- aea/configurations/constants.py | 2 +- aea/connections/stub/connection.py | 2 +- aea/connections/stub/connection.yaml | 6 +-- aea/connections/stub/readme.md | 2 +- docs/build-aea-programmatically.md | 2 +- docs/config.md | 2 +- docs/core-components-1.md | 2 +- docs/logging.md | 4 +- docs/package-imports.md | 2 +- docs/questions-and-answers.md | 2 +- docs/quickstart.md | 4 +- .../agents/aries_alice/aea-config.yaml | 2 +- .../agents/aries_faber/aea-config.yaml | 2 +- .../agents/car_data_buyer/aea-config.yaml | 2 +- .../agents/car_detector/aea-config.yaml | 2 +- .../agents/erc1155_client/aea-config.yaml | 2 +- .../agents/erc1155_deployer/aea-config.yaml | 2 +- .../agents/generic_buyer/aea-config.yaml | 2 +- .../agents/generic_seller/aea-config.yaml | 2 +- .../fetchai/agents/gym_aea/aea-config.yaml | 2 +- .../agents/ml_data_provider/aea-config.yaml | 2 +- .../agents/ml_model_trainer/aea-config.yaml | 2 +- .../agents/my_first_aea/aea-config.yaml | 4 +- .../aea-config.yaml | 2 +- .../agents/tac_controller/aea-config.yaml | 2 +- .../tac_controller_contract/aea-config.yaml | 2 +- .../agents/tac_participant/aea-config.yaml | 2 +- .../agents/thermometer_aea/aea-config.yaml | 2 +- .../agents/thermometer_client/aea-config.yaml | 2 +- .../agents/weather_client/aea-config.yaml | 2 +- .../agents/weather_station/aea-config.yaml | 2 +- packages/hashes.csv | 42 +++++++++---------- tests/test_aea_builder.py | 2 +- tests/test_cli/test_get_multiaddress.py | 22 +++++----- tests/test_configurations/test_aea_config.py | 2 +- .../test_bash_yaml/md_files/bash-config.md | 2 +- .../test_bash_yaml/md_files/bash-logging.md | 4 +- .../md_files/bash-package-imports.md | 2 +- .../md_files/bash-quickstart.md | 2 +- 39 files changed, 75 insertions(+), 75 deletions(-) diff --git a/aea/configurations/constants.py b/aea/configurations/constants.py index 5cfb525c7b..169bb58945 100644 --- a/aea/configurations/constants.py +++ b/aea/configurations/constants.py @@ -26,7 +26,7 @@ from aea.crypto.helpers import PRIVATE_KEY_PATH_SCHEMA -DEFAULT_CONNECTION = PublicId.from_str("fetchai/stub:0.9.0") +DEFAULT_CONNECTION = PublicId.from_str("fetchai/stub:0.10.0") DEFAULT_PROTOCOL = PublicId.from_str("fetchai/default:0.6.0") DEFAULT_SKILL = PublicId.from_str("fetchai/error:0.6.0") DEFAULT_LEDGER = FetchAICrypto.identifier diff --git a/aea/connections/stub/connection.py b/aea/connections/stub/connection.py index 9797a9094d..63f718e25b 100644 --- a/aea/connections/stub/connection.py +++ b/aea/connections/stub/connection.py @@ -44,7 +44,7 @@ DEFAULT_OUTPUT_FILE_NAME = "./output_file" SEPARATOR = b"," -PUBLIC_ID = PublicId.from_str("fetchai/stub:0.9.0") +PUBLIC_ID = PublicId.from_str("fetchai/stub:0.10.0") def _encode(e: Envelope, separator: bytes = SEPARATOR): diff --git a/aea/connections/stub/connection.yaml b/aea/connections/stub/connection.yaml index d9bb0817dd..4f7c8c820c 100644 --- a/aea/connections/stub/connection.yaml +++ b/aea/connections/stub/connection.yaml @@ -1,6 +1,6 @@ name: stub author: fetchai -version: 0.9.0 +version: 0.10.0 type: connection description: The stub connection implements a connection stub which reads/writes messages from/to file. @@ -8,8 +8,8 @@ license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: __init__.py: QmWwepN9Fy9gHAp39vUGFSLdnB9JZjdyE3STnbowSUhJkC - connection.py: QmVjZwuNd6JLRDp2DzZxbLwF5feSrGiULWowZSan9Caogk - readme.md: QmXSAtxSY7C2YkvUxeVnpqCJY9uJYZxZBmuUcE4zjFXcXz + connection.py: QmRSc6Edy9u9yQMRtvs7MZeq1NRDT57gRy6T19QVLdCkus + readme.md: QmQ2Y2sk2xnH45KzxdMna1pUXDGQ5S32fJk1qwdTSfAGc2 fingerprint_ignore_patterns: [] protocols: [] class_name: StubConnection diff --git a/aea/connections/stub/readme.md b/aea/connections/stub/readme.md index 839993ec33..177d94c9ef 100644 --- a/aea/connections/stub/readme.md +++ b/aea/connections/stub/readme.md @@ -2,6 +2,6 @@ A simple connection for communication with an AEA, using the file system as a point of data exchange. ## Usage -First, add the connection to your AEA project: `aea add connection fetchai/stub:0.9.0`. (If you have created your AEA project with `aea create` then the connection will already be available by default.) +First, add the connection to your AEA project: `aea add connection fetchai/stub:0.10.0`. (If you have created your AEA project with `aea create` then the connection will already be available by default.) Optionally, in the `connection.yaml` file under `config` set the `input_file` and `output_file` to the desired file path. The `stub` connection reads encoded envelopes from the `input_file` and writes encoded envelopes to the `output_file`. diff --git a/docs/build-aea-programmatically.md b/docs/build-aea-programmatically.md index 407925e113..5c162b7651 100644 --- a/docs/build-aea-programmatically.md +++ b/docs/build-aea-programmatically.md @@ -48,7 +48,7 @@ We will use the stub connection to pass envelopes in and out of the AEA. Ensure ``` ## Initialise the AEA -We use the `AEABuilder` to readily build an AEA. By default, the `AEABuilder` adds the `fetchai/default:0.6.0` protocol, the `fetchai/stub:0.9.0` connection and the `fetchai/error:0.6.0` skill. +We use the `AEABuilder` to readily build an AEA. By default, the `AEABuilder` adds the `fetchai/default:0.6.0` protocol, the `fetchai/stub:0.10.0` connection and the `fetchai/error:0.6.0` skill. ``` python # Instantiate the builder and build the AEA # By default, the default protocol, error skill and stub connection are added diff --git a/docs/config.md b/docs/config.md index 9cc4e49ae8..6e4435706e 100644 --- a/docs/config.md +++ b/docs/config.md @@ -21,7 +21,7 @@ aea_version: '>=0.6.0, <0.7.0' # AEA framework version(s) compa fingerprint: {} # Fingerprint of AEA project components. fingerprint_ignore_patterns: [] # Ignore pattern for the fingerprinting tool. connections: # The list of connection public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX) -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] # The list of contract public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). protocols: # The list of protocol public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). - fetchai/default:0.6.0 diff --git a/docs/core-components-1.md b/docs/core-components-1.md index d7500f3322..e549fc63b4 100644 --- a/docs/core-components-1.md +++ b/docs/core-components-1.md @@ -42,7 +42,7 @@ Protocol specific `Messages`, wrapped in `Envelopes`, are sent and received to o A `Connection` wraps an SDK or API and provides an interface to network, ledgers and other services. Where necessary, a `Connection` is responsible for translating between the framework specific `Envelope` with its contained `Message` and the external service or third-party protocol (e.g. `HTTP`). -The framework provides one default `Connection`, called `stub` (current version `fetchai/stub:0.9.0`). It implements an I/O reader and writer to send `Messages` to the agent from a local file. +The framework provides one default `Connection`, called `stub` (current version `fetchai/stub:0.10.0`). It implements an I/O reader and writer to send `Messages` to the agent from a local file. Additional `Connections` can be added as packages. For more details on `Connections` also read the `Connection` guide here. diff --git a/docs/logging.md b/docs/logging.md index 8f0e4c0230..db47eac014 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -22,13 +22,13 @@ aea_version: 0.6.0 fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 skills: - fetchai/error:0.6.0 -default_connection: fetchai/stub:0.9.0 +default_connection: fetchai/stub:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false diff --git a/docs/package-imports.md b/docs/package-imports.md index b6202ee219..b30e656e0d 100644 --- a/docs/package-imports.md +++ b/docs/package-imports.md @@ -47,7 +47,7 @@ The `aea-config.yaml` is the top level configuration file of an AEA. It defines For the AEA to use a package, the `public_id` for the package must be listed in the `aea-config.yaml` file, e.g. ``` yaml connections: -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 ``` The above shows a part of the `aea-config.yaml`. If you see the connections, you will see that we follow a pattern of `author/name_package:version` to identify each package, also referred to as `public_id`. Here the `author` is the author of the package. diff --git a/docs/questions-and-answers.md b/docs/questions-and-answers.md index 9b0a634e69..8a99afb531 100644 --- a/docs/questions-and-answers.md +++ b/docs/questions-and-answers.md @@ -72,7 +72,7 @@ You can find more details about the CLI commands here
      When a new AEA is created, is the `vendor` folder populated with some default packages? -All AEA projects by default hold the `fetchai/stub:0.9.0` connection, the `fetchai/default:0.6.0` protocol and the `fetchai/error:0.6.0` skill. These (as all other packages installed from the registry) are placed in the vendor's folder. +All AEA projects by default hold the `fetchai/stub:0.10.0` connection, the `fetchai/default:0.6.0` protocol and the `fetchai/error:0.6.0` skill. These (as all other packages installed from the registry) are placed in the vendor's folder.

      You can find more details about the file structure
      here
      diff --git a/docs/quickstart.md b/docs/quickstart.md index beae01bce4..42f57ff4ad 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -154,7 +154,7 @@ recipient_aea,sender_aea,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello ## Run the AEA -Run the AEA with the default `fetchai/stub:0.9.0` connection. +Run the AEA with the default `fetchai/stub:0.10.0` connection. ``` bash aea run @@ -163,7 +163,7 @@ aea run or ``` bash -aea run --connections fetchai/stub:0.9.0 +aea run --connections fetchai/stub:0.10.0 ``` You will see the echo skill running in the terminal window. diff --git a/packages/fetchai/agents/aries_alice/aea-config.yaml b/packages/fetchai/agents/aries_alice/aea-config.yaml index 7efbe1b67a..9be95df03d 100644 --- a/packages/fetchai/agents/aries_alice/aea-config.yaml +++ b/packages/fetchai/agents/aries_alice/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/http_client:0.9.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 - fetchai/webhook:0.7.0 contracts: [] protocols: diff --git a/packages/fetchai/agents/aries_faber/aea-config.yaml b/packages/fetchai/agents/aries_faber/aea-config.yaml index 60858d53c7..ab87ebe399 100644 --- a/packages/fetchai/agents/aries_faber/aea-config.yaml +++ b/packages/fetchai/agents/aries_faber/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/http_client:0.9.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 - fetchai/webhook:0.7.0 contracts: [] protocols: diff --git a/packages/fetchai/agents/car_data_buyer/aea-config.yaml b/packages/fetchai/agents/car_data_buyer/aea-config.yaml index d4300cd29e..10463565e5 100644 --- a/packages/fetchai/agents/car_data_buyer/aea-config.yaml +++ b/packages/fetchai/agents/car_data_buyer/aea-config.yaml @@ -11,7 +11,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/car_detector/aea-config.yaml b/packages/fetchai/agents/car_detector/aea-config.yaml index b63aafca67..6351d2f41c 100644 --- a/packages/fetchai/agents/car_detector/aea-config.yaml +++ b/packages/fetchai/agents/car_detector/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/erc1155_client/aea-config.yaml b/packages/fetchai/agents/erc1155_client/aea-config.yaml index 19ad7cf3c4..a38ca8c0ae 100644 --- a/packages/fetchai/agents/erc1155_client/aea-config.yaml +++ b/packages/fetchai/agents/erc1155_client/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: - fetchai/erc1155:0.10.0 protocols: diff --git a/packages/fetchai/agents/erc1155_deployer/aea-config.yaml b/packages/fetchai/agents/erc1155_deployer/aea-config.yaml index abc22baa84..0e8764b869 100644 --- a/packages/fetchai/agents/erc1155_deployer/aea-config.yaml +++ b/packages/fetchai/agents/erc1155_deployer/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: - fetchai/erc1155:0.10.0 protocols: diff --git a/packages/fetchai/agents/generic_buyer/aea-config.yaml b/packages/fetchai/agents/generic_buyer/aea-config.yaml index b0482b5822..2be2666c1f 100644 --- a/packages/fetchai/agents/generic_buyer/aea-config.yaml +++ b/packages/fetchai/agents/generic_buyer/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/generic_seller/aea-config.yaml b/packages/fetchai/agents/generic_seller/aea-config.yaml index e53783701c..4c9a7ad097 100644 --- a/packages/fetchai/agents/generic_seller/aea-config.yaml +++ b/packages/fetchai/agents/generic_seller/aea-config.yaml @@ -11,7 +11,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/gym_aea/aea-config.yaml b/packages/fetchai/agents/gym_aea/aea-config.yaml index d18a4ad991..357713694e 100644 --- a/packages/fetchai/agents/gym_aea/aea-config.yaml +++ b/packages/fetchai/agents/gym_aea/aea-config.yaml @@ -9,7 +9,7 @@ fingerprint: {} fingerprint_ignore_patterns: [] connections: - fetchai/gym:0.8.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/ml_data_provider/aea-config.yaml b/packages/fetchai/agents/ml_data_provider/aea-config.yaml index d6c4f22331..6edfe08859 100644 --- a/packages/fetchai/agents/ml_data_provider/aea-config.yaml +++ b/packages/fetchai/agents/ml_data_provider/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/ml_model_trainer/aea-config.yaml b/packages/fetchai/agents/ml_model_trainer/aea-config.yaml index b6c7e4f8c6..70796a0f06 100644 --- a/packages/fetchai/agents/ml_model_trainer/aea-config.yaml +++ b/packages/fetchai/agents/ml_model_trainer/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/my_first_aea/aea-config.yaml b/packages/fetchai/agents/my_first_aea/aea-config.yaml index cab085b44c..a855b3aa89 100644 --- a/packages/fetchai/agents/my_first_aea/aea-config.yaml +++ b/packages/fetchai/agents/my_first_aea/aea-config.yaml @@ -7,14 +7,14 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 skills: - fetchai/echo:0.8.0 - fetchai/error:0.6.0 -default_connection: fetchai/stub:0.9.0 +default_connection: fetchai/stub:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false diff --git a/packages/fetchai/agents/simple_service_registration/aea-config.yaml b/packages/fetchai/agents/simple_service_registration/aea-config.yaml index 6e6d8adceb..e58f388a4b 100644 --- a/packages/fetchai/agents/simple_service_registration/aea-config.yaml +++ b/packages/fetchai/agents/simple_service_registration/aea-config.yaml @@ -9,7 +9,7 @@ fingerprint_ignore_patterns: [] connections: - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/tac_controller/aea-config.yaml b/packages/fetchai/agents/tac_controller/aea-config.yaml index 9ce1d7381f..442993e0b4 100644 --- a/packages/fetchai/agents/tac_controller/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller/aea-config.yaml @@ -9,7 +9,7 @@ fingerprint_ignore_patterns: [] connections: - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index efbe561f76..8b7256a5ed 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -11,7 +11,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: - fetchai/erc1155:0.10.0 protocols: diff --git a/packages/fetchai/agents/tac_participant/aea-config.yaml b/packages/fetchai/agents/tac_participant/aea-config.yaml index 0c2333eece..c5e96b4791 100644 --- a/packages/fetchai/agents/tac_participant/aea-config.yaml +++ b/packages/fetchai/agents/tac_participant/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: - fetchai/erc1155:0.10.0 protocols: diff --git a/packages/fetchai/agents/thermometer_aea/aea-config.yaml b/packages/fetchai/agents/thermometer_aea/aea-config.yaml index f3e7d966b4..a3ed35fd38 100644 --- a/packages/fetchai/agents/thermometer_aea/aea-config.yaml +++ b/packages/fetchai/agents/thermometer_aea/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/thermometer_client/aea-config.yaml b/packages/fetchai/agents/thermometer_client/aea-config.yaml index 64aa7e7bc6..22a8eacc24 100644 --- a/packages/fetchai/agents/thermometer_client/aea-config.yaml +++ b/packages/fetchai/agents/thermometer_client/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/weather_client/aea-config.yaml b/packages/fetchai/agents/weather_client/aea-config.yaml index a86fbf5abb..44841b8f5f 100644 --- a/packages/fetchai/agents/weather_client/aea-config.yaml +++ b/packages/fetchai/agents/weather_client/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/fetchai/agents/weather_station/aea-config.yaml b/packages/fetchai/agents/weather_station/aea-config.yaml index 0b892a4102..aab1c30c5c 100644 --- a/packages/fetchai/agents/weather_station/aea-config.yaml +++ b/packages/fetchai/agents/weather_station/aea-config.yaml @@ -10,7 +10,7 @@ connections: - fetchai/ledger:0.6.0 - fetchai/p2p_libp2p:0.10.0 - fetchai/soef:0.9.0 -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index 29718482ad..56e70841c7 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -1,23 +1,23 @@ -fetchai/agents/aries_alice,Qme8sHgd9CZbBEbnS9zwDs53mYZM4EDpJf5RzQnE2QMy35 -fetchai/agents/aries_faber,QmVQXALXYg5M1Qbqznc4PqM5i4jDt8rFeHvDrq7DcoJx3B -fetchai/agents/car_data_buyer,QmWk7So9UabsjTEKCkecYN9xwkwJxm4m78GA5VRYcWsQwe -fetchai/agents/car_detector,QmbUnQ95vMmrL7ootzabP5hKr1iR2srJy3QWg6H2wr9Qib -fetchai/agents/erc1155_client,QmYUsNAEr2dmx6CP9Jkd33eJMuSQL1uiBADivuUzM8tgiE -fetchai/agents/erc1155_deployer,QmcbNaXp8vN2Vzbqy4vSKXj27WJK1sBcRf2HtL4eacTnac -fetchai/agents/generic_buyer,Qme5rHfbeEhmia2RM4vjbiwk1h1o2JiiyyfYZze9jG3mUD -fetchai/agents/generic_seller,QmPVuku1Cefn76S8rN6GsqdVz12AhbcK6hFMdDMYxsjiAM -fetchai/agents/gym_aea,QmPP3rtaUY3jdzn1HXjV4dPyY2wYetbbNCqFCQbzbH1GRS -fetchai/agents/ml_data_provider,QmZFTtD54jcwY8ozmhsdHHZqc2RNX9FZ8dfV8SgYJE9QYM -fetchai/agents/ml_model_trainer,QmeZmVsNLUw7TP73s5cSomPnwggcrimXHh1RhrPRUDkoQ3 -fetchai/agents/my_first_aea,QmcHnFYQCyXnAM2pN2M4HqLNGJpWApUP7PuiKaPcLkxbas -fetchai/agents/simple_service_registration,QmWtA9eDYnGKkg5hov887LRJSXTXovb9pp4NJzU7JMq5Lg -fetchai/agents/tac_controller,QmaG56sZaJRm8DwJXXt9Ci18Va8NfXx6v8vEGKPJngKL4q -fetchai/agents/tac_controller_contract,QmXhKdptR5aW4TAx9J4auFGqwR3TpiTzdpsKp8KRHL7w7B -fetchai/agents/tac_participant,QmQxN75ZFVEgizNHa3sqd2zHSnmPvRwS8PCv5FAsJBDnZw -fetchai/agents/thermometer_aea,QmQ8KgTrt5fH8ZRDpioKGmeyUyc2EUkan4D5KzoFnCwxcG -fetchai/agents/thermometer_client,QmUY6rmZnufWWmwfSi1m5gR6vD1ZowXpchpUJXgAH6xdNP -fetchai/agents/weather_client,QmeMHc9hqpciJiRWrAJJszvyjTCs9rgsKC5S1nJRKV9sxQ -fetchai/agents/weather_station,QmdJcUYuaTbb2J5k9jPcG215bJhKFQUQqJPhiaNoirijJ1 +fetchai/agents/aries_alice,QmYHiYqWNEhmzhBNQCE6cUzRBtnmPbbC5yT47rSZLnoGgk +fetchai/agents/aries_faber,QmTSTfkJW1UtKtsRjboCQa7BGXrBPJsaKmAwZ5B1vgMwPp +fetchai/agents/car_data_buyer,QmNuEJZWSZrS4JSbuRHaRg82kQGjMJxYTrWFwHTBQFmE46 +fetchai/agents/car_detector,QmebrWVrc9DiQW5SMqz7M2MU7wjRb5qMK1VqhemUoErjVk +fetchai/agents/erc1155_client,QmbeW3bPTgxRtromSt8EArKZU1Mmx2pSP497Kyx2WYTCsy +fetchai/agents/erc1155_deployer,QmWGF4m36HZvWpa49AE6cQmWpxrWvrCu7PL5wKkGUQYKsK +fetchai/agents/generic_buyer,QmfMAT5Vk7vengDfMiH5D2iajAhmtWMUWM2CaVKz5ucxRG +fetchai/agents/generic_seller,Qmb9PnhRUkc2jBMpDhEeeuqhxHYu8v3ANxXXrat2z9gCU5 +fetchai/agents/gym_aea,QmU4dvEtznNgVpGjo9ptMf46tcuhVAu5tv8dgNGgzEak8p +fetchai/agents/ml_data_provider,QmeqfbEW6J11SKjrqnCRxjZCMr4VWvr9K1gJRd7ZCWP3uF +fetchai/agents/ml_model_trainer,QmWnBK6TGFro2VrtcwwBq1eztiT5y4DV92DdeyHPQqGzcY +fetchai/agents/my_first_aea,QmYqeuaG7mkxqPZTM2qUHP2bMm1A7VsSDLi6BfW6SaFbuZ +fetchai/agents/simple_service_registration,QmY4oz8n2zjJnAa3vHRRDuzpZi8Taf8qsScX7NJoXrTk3u +fetchai/agents/tac_controller,QmWVvJemSdE5N5iyMuDt5ZHh1FA32oijHxBqq91zaNkdY3 +fetchai/agents/tac_controller_contract,QmNYxVrNhHy4tfnr48ekReEVHvH1PBzciNQbj8jbJgn2Aj +fetchai/agents/tac_participant,QmRmswKxJ9mdQe6zFRqxr9U1ZpYTybQf3DKsrAySt39aVc +fetchai/agents/thermometer_aea,QmT1GNUCcB6xqnmB1vv3jTs4HqeYM6tLnnL4TSjv5raHpk +fetchai/agents/thermometer_client,QmdWMJCb7Pkz8F3emJ8wKhNWpnEUXHpBFQTGcmJyziu6kH +fetchai/agents/weather_client,Qmd5iiwyqEuw7Fg8NkdLsNjkuZQRatNRADpXVXwG13BvtP +fetchai/agents/weather_station,QmRAs7AY2R9RNi5M4gnSDiQzLb58z4nuCYAnG2UAnv3XC2 fetchai/connections/gym,Qmack3EaCW6ARrHrtCnJmL3kR2xrHutJmgD8uoRVGFz6kH fetchai/connections/http_client,QmaCa98anLuMAduNWtnApEwLWBcqdVkNBREBZ9T5VPSaUm fetchai/connections/http_server,QmT6JV2sB1rv7XZgx1bEpMjfQJAtpq775D2n8yvzKzSXYK @@ -29,7 +29,7 @@ fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4J fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS fetchai/connections/soef,Qme2vP55mGemMKMWdHKGUaC1nW88ZEdD55qgdY9a984T7i -fetchai/connections/stub,QmWarW8MTJ3CHRgXdkbwKK7DyDKzvQKdZeb95uy8kSnxrT +fetchai/connections/stub,QmQxzFLTBjPUMkpE1uBdkoyhb7iXY4k8VPzyykpjhuUcK1 fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd fetchai/contracts/erc1155,QmWu22zW9AVMBVySwF413JMiT5dcWsLsU2gk1KvFYWAwPq diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index ff6a6b85e7..578a857d65 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -588,7 +588,7 @@ def test_from_project(self): aea = builder.build() assert aea.name == self.agent_name stub_connection = aea.resources.get_connection( - PublicId.from_str("fetchai/stub:0.9.0") + PublicId.from_str("fetchai/stub:0.10.0") ) assert stub_connection.configuration.config == dict( input_file=self.expected_input_file, output_file=self.expected_output_file diff --git a/tests/test_cli/test_get_multiaddress.py b/tests/test_cli/test_get_multiaddress.py index 6f2c13e138..0f7643724c 100644 --- a/tests/test_cli/test_get_multiaddress.py +++ b/tests/test_cli/test_get_multiaddress.py @@ -79,7 +79,7 @@ def test_run(self, *mocks): FETCHAI, "--connection", "--connection-id", - "fetchai/stub:0.9.0", + "fetchai/stub:0.10.0", "--host-field", "host", "--port-field", @@ -112,7 +112,7 @@ def test_run(self, *mocks): FETCHAI, "--connection", "--connection-id", - "fetchai/stub:0.9.0", + "fetchai/stub:0.10.0", "--uri-field", "public_uri", cwd=self.current_agent_context, @@ -188,14 +188,14 @@ def test_run(self, *mocks): # this will cause exception because no host configuration is in stub connection by default. with pytest.raises( Exception, - match="Host field 'some_host' not present in connection configuration fetchai/stub:0.9.0", + match="Host field 'some_host' not present in connection configuration fetchai/stub:0.10.0", ): self.run_cli_command( "get-multiaddress", FETCHAI, "--connection", "--connection-id", - "fetchai/stub:0.9.0", + "fetchai/stub:0.10.0", "--host-field", "some_host", "--port-field", @@ -219,14 +219,14 @@ def test_run(self, *mocks): # this will cause exception because no port configuration is in stub connection by default. with pytest.raises( Exception, - match="Port field 'some_port' not present in connection configuration fetchai/stub:0.9.0", + match="Port field 'some_port' not present in connection configuration fetchai/stub:0.10.0", ): self.run_cli_command( "get-multiaddress", FETCHAI, "--connection", "--connection-id", - "fetchai/stub:0.9.0", + "fetchai/stub:0.10.0", "--host-field", "host", "--port-field", @@ -286,7 +286,7 @@ def test_run(self, *mocks): FETCHAI, "--connection", "--connection-id", - "fetchai/stub:0.9.0", + "fetchai/stub:0.10.0", "--host-field", "host", "--port-field", @@ -313,7 +313,7 @@ def test_run(self, *mocks): FETCHAI, "--connection", "--connection-id", - "fetchai/stub:0.9.0", + "fetchai/stub:0.10.0", "--host-field", "some_host", cwd=self.current_agent_context, @@ -331,14 +331,14 @@ def test_run(self, *mocks): # this will cause exception because only the host, and not the port, are specified. with pytest.raises( Exception, - match="URI field 'some_uri' not present in connection configuration fetchai/stub:0.9.0", + match="URI field 'some_uri' not present in connection configuration fetchai/stub:0.10.0", ): self.run_cli_command( "get-multiaddress", FETCHAI, "--connection", "--connection-id", - "fetchai/stub:0.9.0", + "fetchai/stub:0.10.0", "--uri-field", "some_uri", cwd=self.current_agent_context, @@ -367,7 +367,7 @@ def test_run(self, *mocks): FETCHAI, "--connection", "--connection-id", - "fetchai/stub:0.9.0", + "fetchai/stub:0.10.0", "--uri-field", "some_uri", cwd=self.current_agent_context, diff --git a/tests/test_configurations/test_aea_config.py b/tests/test_configurations/test_aea_config.py index e7616166e4..54ae447d41 100644 --- a/tests/test_configurations/test_aea_config.py +++ b/tests/test_configurations/test_aea_config.py @@ -59,7 +59,7 @@ class NotSet(type): contracts: [] protocols: [] skills: [] -default_connection: fetchai/stub:0.9.0 +default_connection: fetchai/stub:0.10.0 default_ledger: cosmos private_key_paths: cosmos: tests/data/cosmos_private_key.txt diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-config.md b/tests/test_docs/test_bash_yaml/md_files/bash-config.md index 0032df43c0..e7db01434d 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-config.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-config.md @@ -14,7 +14,7 @@ aea_version: '>=0.6.0, <0.7.0' # AEA framework version(s) compa fingerprint: {} # Fingerprint of AEA project components. fingerprint_ignore_patterns: [] # Ignore pattern for the fingerprinting tool. connections: # The list of connection public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX) -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] # The list of contract public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). protocols: # The list of protocol public ids the AEA project depends on (each public id must satisfy PUBLIC_ID_REGEX). - fetchai/default:0.6.0 diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-logging.md b/tests/test_docs/test_bash_yaml/md_files/bash-logging.md index 2482123a70..2001ac16c8 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-logging.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-logging.md @@ -12,13 +12,13 @@ aea_version: 0.6.0 fingerprint: {} fingerprint_ignore_patterns: [] connections: -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 contracts: [] protocols: - fetchai/default:0.6.0 skills: - fetchai/error:0.6.0 -default_connection: fetchai/stub:0.9.0 +default_connection: fetchai/stub:0.10.0 default_ledger: fetchai logging_config: disable_existing_loggers: false diff --git a/tests/test_docs/test_bash_yaml/md_files/bash-package-imports.md b/tests/test_docs/test_bash_yaml/md_files/bash-package-imports.md index 2141939abe..35404987c2 100644 --- a/tests/test_docs/test_bash_yaml/md_files/bash-package-imports.md +++ b/tests/test_docs/test_bash_yaml/md_files/bash-package-imports.md @@ -29,5 +29,5 @@ aea_name/ ``` ``` yaml connections: -- fetchai/stub:0.9.0 +- fetchai/stub:0.10.0 ``` 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 fd9adbf3d6..e81c856ac9 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 @@ -61,7 +61,7 @@ recipient_aea,sender_aea,fetchai/default:0.6.0,\x08\x01\x12\x011*\x07\n\x05hello aea run ``` ``` bash -aea run --connections fetchai/stub:0.9.0 +aea run --connections fetchai/stub:0.10.0 ``` ``` bash _ _____ _ From 04658164a0495bfad1017096657e60f8cfd96ee6 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 23 Sep 2020 23:16:28 +0100 Subject: [PATCH 071/131] fix aea builder test --- tests/test_aea_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index 578a857d65..667a3b6a96 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -568,7 +568,7 @@ def _add_stub_connection_config(self): --- name: stub author: fetchai - version: 0.9.0 + version: 0.10.0 type: connection config: input_file: "{self.expected_input_file}" From 063653ef4e1f77406f15d19dc2fdf8d48ea6eadc Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Thu, 24 Sep 2020 10:22:20 +0300 Subject: [PATCH 072/131] aea.Manager: projects handling, agent alias creation --- aea/aea_builder.py | 25 +++- aea/cli/registry/fetch.py | 19 ++- aea/configurations/loader.py | 10 +- aea/manager.py | 228 ++++++++++++++++++++++++++++++----- tests/test_manager.py | 107 ++++++++++++++++ 5 files changed, 348 insertions(+), 41 deletions(-) create mode 100644 tests/test_manager.py diff --git a/aea/aea_builder.py b/aea/aea_builder.py index a3570bbdef..2f9fdd22f8 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -292,6 +292,8 @@ class AEABuilder: DEFAULT_RUNTIME_MODE = "threaded" DEFAULT_SEARCH_SERVICE_ADDRESS = "fetchai/soef:*" + loader = ConfigLoader.from_configuration_type(PackageType.AGENT) + # pylint: disable=attribute-defined-outside-init def __init__(self, with_default_packages: bool = True): @@ -1336,16 +1338,33 @@ def from_aea_project( builder = AEABuilder(with_default_packages=False) # load agent configuration file - configuration_file = aea_project_path / DEFAULT_AEA_CONFIG_FILE + configuration_file = cls.get_configuration_file_path(aea_project_path) + agent_configuration = cls.loader.load(configuration_file.open()) - loader = ConfigLoader.from_configuration_type(PackageType.AGENT) - agent_configuration = loader.load(configuration_file.open()) + builder.set_from_configuration( + agent_configuration, aea_project_path, skip_consistency_check + ) + return builder + + @classmethod + def from_config_json( + cls, json_data, aea_project_path: PathLike, skip_consistency_check: bool = False + ): + aea_project_path = Path(aea_project_path) + builder = AEABuilder(with_default_packages=False) + + # load agent configuration file + agent_configuration = cls.loader._load_agent_config_from_json(json_data) builder.set_from_configuration( agent_configuration, aea_project_path, skip_consistency_check ) return builder + @staticmethod + def get_configuration_file_path(aea_project_path): + return Path(aea_project_path) / DEFAULT_AEA_CONFIG_FILE + def _load_and_add_components( self, component_type: ComponentType, diff --git a/aea/cli/registry/fetch.py b/aea/cli/registry/fetch.py index 8efdd4e051..cf0270c391 100644 --- a/aea/cli/registry/fetch.py +++ b/aea/cli/registry/fetch.py @@ -16,6 +16,9 @@ # limitations under the License. # # ------------------------------------------------------------------------------ +from aea.helpers.base import cd +import shutil + """Methods for CLI fetch functionality.""" import os @@ -32,7 +35,12 @@ @clean_after -def fetch_agent(ctx: Context, public_id: PublicId, alias: Optional[str] = None) -> None: +def fetch_agent( + ctx: Context, + public_id: PublicId, + alias: Optional[str] = None, + dir: Optional[str] = None, +) -> None: """ Fetch Agent from Registry. @@ -49,14 +57,17 @@ def fetch_agent(ctx: Context, public_id: PublicId, alias: Optional[str] = None) filepath = download_file(file_url, ctx.cwd) - folder_name = name if alias is None else alias + folder_name = dir or (name if alias is None else alias) aea_folder = os.path.join(ctx.cwd, folder_name) + print(aea_folder) ctx.clean_paths.append(aea_folder) extract(filepath, ctx.cwd) - if alias is not None: - os.rename(name, alias) + if alias or dir: + shutil.move( + os.path.join(ctx.cwd, name), aea_folder, + ) ctx.cwd = aea_folder try_to_load_agent_config(ctx) diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index 8a5c1e84d0..4956406c95 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -229,10 +229,7 @@ def _load_from_json(self, configuration_file_json: Dict) -> T: configuration_obj._key_order = key_order # pylint: disable=protected-access return configuration_obj - def _load_agent_config(self, file_pointer: TextIO) -> AgentConfig: - """Load an agent configuration.""" - configuration_file_jsons = yaml_load_all(file_pointer) - + def _load_agent_config_from_json(self, configuration_file_jsons) -> AgentConfig: if len(configuration_file_jsons) == 0: raise ValueError("Agent configuration file was empty.") agent_config_json = configuration_file_jsons[0] @@ -260,6 +257,11 @@ def _load_agent_config(self, file_pointer: TextIO) -> AgentConfig: agent_configuration_obj.component_configurations = component_configurations return agent_configuration_obj + def _load_agent_config(self, file_pointer: TextIO) -> AgentConfig: + """Load an agent configuration.""" + configuration_file_jsons = yaml_load_all(file_pointer) + return self._load_agent_config_from_json(configuration_file_jsons) + def _dump_agent_config( self, configuration: AgentConfig, file_pointer: TextIO ) -> None: diff --git a/aea/manager.py b/aea/manager.py index bbb289d858..643543597f 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -17,29 +17,82 @@ # # ------------------------------------------------------------------------------ """This module contains the implementation of AEA agents manager.""" -from abc import ABC, abstractmethod -from typing import Dict, List - -from aea.aea_builder import PathLike -from aea.configurations.base import PublicId - - -class AbstractManager(ABC): +import copy +import os +from shutil import rmtree +from typing import Dict, List, Optional, Set + +from aea.aea import AEA +from aea.aea_builder import AEABuilder +from aea.cli.registry.fetch import fetch_agent +from aea.cli.utils.context import Context +from aea.configurations.base import ComponentId, PublicId +from aea.configurations.constants import DEFAULT_LEDGER +from aea.crypto.helpers import create_private_key +from aea.helpers.base import yaml_load_all + + +class Project: + """Agent project representation.""" + + def __init__(self, public_id: PublicId, path: str): + """Init project with public_id and project's path.""" + self.public_id = public_id + self.path = path + self.agents: Set[str] = set() + + @classmethod + def load(cls, working_dir, public_id) -> "Project": + """Load project with given pubblic_id to working_dir.""" + ctx = Context(cwd=working_dir) + path = os.path.join(working_dir, public_id.author, public_id.name) + fetch_agent(ctx, public_id, dir=os.path.join(public_id.author, public_id.name)) + return cls(public_id, path) + + def remove(self): + """Remove project, do cleanup.""" + rmtree(self.path) + + +class AgentAlias: + """Agent alias representation.""" + + def __init__(self, project: Project, name: str, config: List[Dict], agent: AEA): + """Init agent alias with project, config, name, agent.""" + self.project = project + self.config = config + self.name = name + self.agent = agent + self.project.agents.add(self.name) + + def remove(self): + """Remove agent alias from project.""" + self.project.agents.remove(self.name) + + +class Manager: """Abstract agents manager.""" - def __init__(self, working_dir: PathLike) -> None: + AGENT_DO_NOT_OVERRIDE_VALUES = ["skills", "connections", "protocols", "contracts"] + + def __init__(self, working_dir: str) -> None: """ Initialize manager. :param working_dir: directory to store base agents. """ self.working_dir = working_dir + self._was_working_dir_created = False + self.is_started = False + self._projects: Dict[PublicId, Project] = {} + self._keys_dir = os.path.abspath(os.path.join(self.working_dir, "keys")) + self._agents: Dict[str, AgentAlias] = {} - @abstractmethod def start_manager(self) -> None: """Start manager.""" + self._ensure_working_dir() + self.is_started = True - @abstractmethod def stop_manager(self, cleanup: bool = False) -> None: """ Stop manager. @@ -50,40 +103,66 @@ def stop_manager(self, cleanup: bool = False) -> None: :return: None """ + if self._was_working_dir_created: + rmtree(self.working_dir) + + self.is_started = False - @abstractmethod def add_project(self, public_id: PublicId) -> None: """Fetch agent project and all dependencies to working_dir.""" + if public_id in self._projects: + raise ValueError(f"Project {public_id} was already added!") + self._projects[public_id] = Project.load(self.working_dir, public_id) - @abstractmethod def remove_project(self, public_id: PublicId) -> None: """Remove agent project.""" + if public_id not in self._projects: + raise ValueError(f"Project {public_id} was not added!") + + self._projects.pop(public_id).remove() - @abstractmethod def list_projects(self) -> List[PublicId]: """ List all agents projects added. :return: lit of public ids of projects """ + return list(self._projects.keys()) - @abstractmethod def add_agent( - self, project_id: PublicId, agent_name: str, config_overrides: Dict + self, + public_id: PublicId, + agent_name: str, + agent_overrides: Optional[dict] = None, + component_overrides: Optional[List[dict]] = None, ) -> None: """ Create new agent configuration based on project with config overrides applied. Alias is stored in memory only! - :param project_id: base agent public id + :param public_id: base agent project public id :param agent_name: unique name for the agent - :param config_overrides: overrides for component section. + :param agent_overrides: overrides for agent config. + :param component_overrides: overrides for component section. :return: None """ + if agent_name in self._agents: + raise ValueError(f"Agent with name {agent_name} already exists!") + + if public_id not in self._projects: + raise ValueError(f"{public_id} project is not added!") + project = self._projects[public_id] + + agent_alias = self._build_agent_alias( + project=project, + agent_name=agent_name, + agent_overrides=agent_overrides, + component_overrides=component_overrides, + ) + self._agents[agent_name] = agent_alias - @abstractmethod def list_agents(self, running_only: bool = False) -> List[str]: """ List all agents. @@ -92,8 +171,8 @@ def list_agents(self, running_only: bool = False) -> List[str]: :return: list of agents names """ + return list(self._agents.keys()) - @abstractmethod def remove_agent(self, agent_name: str) -> None: """ Remove agent alias definition from registry. @@ -102,8 +181,12 @@ def remove_agent(self, agent_name: str) -> None: :return: None """ + if agent_name not in self._agents: + raise ValueError(f"Agent with name {agent_name} does not exist!") + + agent_alias = self._agents.pop(agent_name) + agent_alias.remove() - @abstractmethod def start_agent(self, agent_name: str) -> None: """ Start selected agent. @@ -113,7 +196,6 @@ def start_agent(self, agent_name: str) -> None: :return: None """ - @abstractmethod def start_all_agents(self) -> None: """ Start all not started agents. @@ -121,7 +203,6 @@ def start_all_agents(self) -> None: :return: None """ - @abstractmethod def stop_agent(self, agent_name: str) -> None: """ Stop running agent. @@ -131,7 +212,6 @@ def stop_agent(self, agent_name: str) -> None: :return: None """ - @abstractmethod def stop_all_agents(self) -> None: """ Stop all agents running. @@ -139,13 +219,101 @@ def stop_all_agents(self) -> None: :return: None """ - @abstractmethod - def get_agent_details(self, agent_name: str) -> dict: + def stop_agents(self, agent_names: List[str]) -> None: + """ + Stop specified agents. + + :return: None + """ + + def start_agents(self, agent_names: List[str]) -> None: + """ + Stop specified agents. + + :return: None + """ + + def get_agent_details(self, agent_name: str) -> AgentAlias: """ Return details about agent definition. - { - "project": str - "overrides": dict - } + :return: AgentAlias """ + if agent_name not in self._agents: + raise ValueError(f"Agent with name {agent_name} does not exist!") + return self._agents[agent_name] + + def _ensure_working_dir(self) -> None: + """Create working dir if needed.""" + if not os.path.exists(self.working_dir): + os.makedirs(self.working_dir) + self._was_working_dir_created = True + + if not os.path.isdir(self.working_dir): + raise ValueError(f"{self.working_dir} is not a directory!") + os.makedirs(self._keys_dir) + + def _build_agent_alias( + self, + project: Project, + agent_name: str, + agent_overrides=None, + component_overrides=None, + ) -> AgentAlias: + """Create agent alias for project, with given name and overrided values.""" + json_config = self._make_config( + project.path, agent_overrides, component_overrides + ) + + builder = AEABuilder.from_config_json(json_config, project.path) + builder.set_name(agent_name) + + if not builder.private_key_paths: + default_ledger = json_config[0].get("default_ledger", DEFAULT_LEDGER) + builder.add_private_key( + default_ledger, self._create_private_key(agent_name, default_ledger) + ) + agent = builder.build() + return AgentAlias(project, agent_name, json_config, agent) + + def _update_dict(self, base: dict, override: dict) -> dict: + """Apply overrides for dict.""" + base = copy.deepcopy(base) + base.update(override) + return base + + def _make_config( + self, + project_path: str, + agent_overrides: Optional[dict] = None, + component_overrides: Optional[List[dict]] = None, + ) -> List[dict]: + """Make new config baseed on proejct's config with overrides applied.""" + agent_overrides = agent_overrides or {} + component_overrides = component_overrides or [] + + if any([key in agent_overrides for key in self.AGENT_DO_NOT_OVERRIDE_VALUES]): + raise ValueError( + 'Do not override any of {" ".join(self.AGENT_DO_NOT_OVERRIDE_VALUES)}' + ) + + json_data = yaml_load_all( + AEABuilder.get_configuration_file_path(project_path).open() + ) + agent_config = self._update_dict(json_data[0], agent_overrides) + + components_configs = {PublicId.from_json(obj): obj for obj in json_data[1:]} + + for obj in component_overrides: + component_id = ComponentId(obj["type"], PublicId.from_json(obj)) + components_configs[component_id] = self._update_dict( + components_configs.get(component_id, {}), obj + ) + + return [agent_config] + list(components_configs.values()) + + def _create_private_key(self, name, ledger) -> str: + """Create new key for agent alias in working dir keys dir.""" + path = os.path.join(self._keys_dir, f"{name}_{ledger}_private.key") + create_private_key(ledger, path) + return path diff --git a/tests/test_manager.py b/tests/test_manager.py new file mode 100644 index 0000000000..e5a4c6af57 --- /dev/null +++ b/tests/test_manager.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2018-2020 Fetch.AI Limited +# +# 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. +# +# ------------------------------------------------------------------------------ +"""This module contains tests for aea manager.""" +import os +from contextlib import suppress +from shutil import rmtree +from typing import Dict, List, Optional, Set + +import pytest + +from aea.configurations.base import PublicId +from aea.manager import Manager + + +def test_manager(): + """Perform some tests.""" + + try: + working_dir = "manager_dir" + project_public_id = PublicId("fetchai", "my_first_aea", "0.11.0") + project_path = os.path.join( + working_dir, project_public_id.author, project_public_id.name + ) + assert not os.path.exists(working_dir) + manager = Manager(working_dir) + manager.start_manager() + assert os.path.exists(working_dir) + assert manager.is_started + + manager.add_project(project_public_id) + + assert project_public_id in manager.list_projects() + assert os.path.exists(project_path) + assert manager._projects[project_public_id].path == project_path + + with pytest.raises(ValueError, match=r".*was already added.*"): + manager.add_project(project_public_id) + + echo_skill_id = PublicId("fetchai", "echo", "0.7.0") + new_tick_interval = 1.1111 + agent_name = "test_what_ever12" + manager.add_agent( + project_public_id, + agent_name, + component_overrides=[ + { + "type": "skill", + **echo_skill_id.json, + "behaviours": { + "echo": { + "args": {"tick_interval": new_tick_interval}, + "class_name": "EchoBehaviour", + } + }, + } + ], + ) + agent_alias = manager.get_agent_details(agent_name) + assert agent_alias.name == agent_name + assert ( + agent_alias.agent.resources.get_behaviour( + echo_skill_id, "echo" + ).tick_interval + == new_tick_interval + ) + with pytest.raises(ValueError, match="already exists"): + manager.add_agent( + project_public_id, agent_name, + ) + assert agent_name in manager.list_agents() + + manager.remove_agent(agent_name) + assert agent_name not in manager.list_agents() + + with pytest.raises(ValueError, match="does not exist!"): + manager.remove_agent(agent_name) + + manager.remove_project(project_public_id) + assert project_public_id not in manager._projects + assert not os.path.exists(project_path) + assert project_public_id not in manager.list_projects() + + with pytest.raises(ValueError, match=r"was not added"): + manager.remove_project(project_public_id) + + manager.stop_manager() + assert not os.path.exists(working_dir) + assert not manager.is_started + finally: + with suppress(FileNotFoundError): + rmtree(working_dir) From 413ddee4cafa6cca52b667799cec2903cfcb1837 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 24 Sep 2020 10:01:54 +0100 Subject: [PATCH 073/131] fix tac contract yaml and dialogues --- .../agents/tac_controller_contract/aea-config.yaml | 2 +- .../fetchai/skills/tac_control_contract/behaviours.py | 9 +++++++++ .../fetchai/skills/tac_control_contract/dialogues.py | 6 ++++++ packages/fetchai/skills/tac_control_contract/skill.yaml | 4 ++-- packages/hashes.csv | 4 ++-- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index 8b7256a5ed..1d9f658154 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -34,7 +34,7 @@ private_key_paths: {} registry_path: ../packages default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 - fetchai/ledger_api:0.5.0: fetchai/ledger:0.6.0 + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 --- name: soef diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index dee52e40e7..bbf02c9ae4 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -75,6 +75,9 @@ def _request_contract_deploy_transaction(self) -> None: ) contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue,) contract_api_dialogue.terms = parameters.get_deploy_terms() + contract_api_dialogue.callable = ( + ContractApiDialogue.Callable.GET_DEPLOY_TRANSACTION + ) self.context.outbox.put_message(message=contract_api_msg) self.context.logger.info("requesting contract deployment transaction...") @@ -162,6 +165,9 @@ def _request_create_items_transaction(self, game: Game) -> None: ) contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue) contract_api_dialogue.terms = parameters.get_create_token_terms() + contract_api_dialogue.callable = ( + ContractApiDialogue.Callable.GET_CREATE_BATCH_TRANSACTION + ) self.context.outbox.put_message(message=contract_api_msg) self.context.logger.info("requesting create items transaction...") @@ -203,4 +209,7 @@ def _request_mint_items_transaction(self, game: Game) -> None: ) contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue) contract_api_dialogue.terms = parameters.get_mint_token_terms() + contract_api_dialogue.callable = ( + ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION + ) self.context.outbox.put_message(message=contract_api_msg) diff --git a/packages/fetchai/skills/tac_control_contract/dialogues.py b/packages/fetchai/skills/tac_control_contract/dialogues.py index 9e2b5c2588..6f7fadfc61 100644 --- a/packages/fetchai/skills/tac_control_contract/dialogues.py +++ b/packages/fetchai/skills/tac_control_contract/dialogues.py @@ -130,6 +130,12 @@ def callable(self) -> "Callable": raise ValueError("Callable not set!") return self._callable + @callable.setter + def callable(self, callable: "Callable") -> None: + """Set the callable.""" + enforce(self._callable is None, "Callable already set!") + self._callable = callable + @property def terms(self) -> Terms: """Get the terms.""" diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 73c3ff5b53..a27a4461f6 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,8 +9,8 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUiw6Dt97mXLzSizbnMNTsfLy3edGXKdYTNR5bke6sFsm __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmYcW84nnvCuv2HeDntixfWnFuJA2k9xqrhCWdmVFerLPv - dialogues.py: QmPJyBPETi7MggXLMKHWeYsAZbckxK2UFpci19dw3xwHDn + behaviours.py: QmaNbF9fuhEzrh56q7tnFF3hKXQtFYGr1tnsgELp3z3jRS + dialogues.py: QmYQ5XiaRoGeLdz7z3d8gcDTzY8EeyHCgB9Nagkuwmfwjy game.py: QmQwskD5DBVNv1ouRpqGNLb3zQ5krLUcR6XXHUcJ5EVc8L handlers.py: QmSzNcZ3s3RjVm7mCXBhGjA379nwv3Tm9viEmw193WcNTd helpers.py: QmX3iv37Z5CmGupCtikc4muTpJyQ9zvjeLbNKDLF7iPhSZ diff --git a/packages/hashes.csv b/packages/hashes.csv index 56e70841c7..9e4075b83d 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -12,7 +12,7 @@ fetchai/agents/ml_model_trainer,QmWnBK6TGFro2VrtcwwBq1eztiT5y4DV92DdeyHPQqGzcY fetchai/agents/my_first_aea,QmYqeuaG7mkxqPZTM2qUHP2bMm1A7VsSDLi6BfW6SaFbuZ fetchai/agents/simple_service_registration,QmY4oz8n2zjJnAa3vHRRDuzpZi8Taf8qsScX7NJoXrTk3u fetchai/agents/tac_controller,QmWVvJemSdE5N5iyMuDt5ZHh1FA32oijHxBqq91zaNkdY3 -fetchai/agents/tac_controller_contract,QmNYxVrNhHy4tfnr48ekReEVHvH1PBzciNQbj8jbJgn2Aj +fetchai/agents/tac_controller_contract,QmXmUu3XQj3E5jcSzi6fRT5ZkWw65HFnvzwqRDS5hcLqSz fetchai/agents/tac_participant,QmRmswKxJ9mdQe6zFRqxr9U1ZpYTybQf3DKsrAySt39aVc fetchai/agents/thermometer_aea,QmT1GNUCcB6xqnmB1vv3jTs4HqeYM6tLnnL4TSjv5raHpk fetchai/agents/thermometer_client,QmdWMJCb7Pkz8F3emJ8wKhNWpnEUXHpBFQTGcmJyziu6kH @@ -63,7 +63,7 @@ fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr fetchai/skills/tac_control,QmPFxFsYqRZvz7BRStWLV9Fo4Wd77iTNBWuBSU2VZeqrwL -fetchai/skills/tac_control_contract,QmYX4gNaGbx1EAuASwhpSgTdLYwUzuzajtKTuqvNFR9f2Q +fetchai/skills/tac_control_contract,QmSFbu21xtJTUqKXW5t1V6fQvVV49eA4FGtR4rgkcs8cBK fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt fetchai/skills/thermometer,QmTud9hXxRq8wRzcf7hVeszou3crmAEZBaw5MjV8x4XtH1 From 712a7b78a77778b66a30cdfa70848131444562f0 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 24 Sep 2020 11:27:35 +0100 Subject: [PATCH 074/131] fix contract deployment in tac skill --- .../tac_participant_contract/aea-config.yaml | 44 +++++++++++++++++++ packages/fetchai/skills/tac_control/game.py | 3 -- .../fetchai/skills/tac_control/parameters.py | 2 +- .../fetchai/skills/tac_control/skill.yaml | 4 +- .../skills/tac_control_contract/behaviours.py | 4 +- .../skills/tac_control_contract/dialogues.py | 4 +- .../skills/tac_control_contract/handlers.py | 5 ++- .../skills/tac_control_contract/skill.yaml | 6 +-- packages/hashes.csv | 5 ++- 9 files changed, 63 insertions(+), 14 deletions(-) create mode 100644 packages/fetchai/agents/tac_participant_contract/aea-config.yaml diff --git a/packages/fetchai/agents/tac_participant_contract/aea-config.yaml b/packages/fetchai/agents/tac_participant_contract/aea-config.yaml new file mode 100644 index 0000000000..cde745ed9b --- /dev/null +++ b/packages/fetchai/agents/tac_participant_contract/aea-config.yaml @@ -0,0 +1,44 @@ +agent_name: tac_participant +author: fetchai +version: 0.11.0 +description: An AEA to participate in the TAC (trading agent competition) +license: Apache-2.0 +aea_version: '>=0.6.0, <0.7.0' +fingerprint: {} +fingerprint_ignore_patterns: [] +connections: +- fetchai/ledger:0.6.0 +- fetchai/p2p_libp2p:0.10.0 +- fetchai/soef:0.9.0 +- fetchai/stub:0.10.0 +contracts: +- fetchai/erc1155:0.10.0 +protocols: +- fetchai/default:0.6.0 +- fetchai/fipa:0.7.0 +- fetchai/oef_search:0.7.0 +- fetchai/tac:0.7.0 +skills: +- fetchai/error:0.6.0 +- fetchai/tac_negotiation:0.10.0 +- fetchai/tac_participation:0.9.0 +default_connection: fetchai/p2p_libp2p:0.10.0 +default_ledger: fetchai +logging_config: + disable_existing_loggers: false + version: 1 +private_key_paths: {} +registry_path: ../packages +default_routing: + fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 +--- +name: tac_participation +author: fetchai +version: 0.9.0 +type: skill +--- +name: tac_negotiation +author: fetchai +version: 0.10.0 +type: skill diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index 84b2469433..94f5277f55 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -72,15 +72,12 @@ class Phase(Enum): PRE_GAME = "pre_game" CONTRACT_DEPLOYMENT_PROPOSAL = "contract_deployment_proposal" - CONTRACT_DEPLOYING = "contract_deploying" CONTRACT_DEPLOYED = "contract_deployed" GAME_REGISTRATION = "game_registration" GAME_SETUP = "game_setup" TOKENS_CREATION_PROPOSAL = "token_creation_proposal" # nosec - TOKENS_CREATING = "tokens_creating" TOKENS_CREATED = "tokens_created" # nosec TOKENS_MINTING_PROPOSAL = "token_minting_proposal" - TOKENS_MINTING = "token_minting" # nosec TOKENS_MINTED = "tokens_minted" # nosec GAME = "game" POST_GAME = "post_game" diff --git a/packages/fetchai/skills/tac_control/parameters.py b/packages/fetchai/skills/tac_control/parameters.py index a490fa92c9..df7a105677 100644 --- a/packages/fetchai/skills/tac_control/parameters.py +++ b/packages/fetchai/skills/tac_control/parameters.py @@ -57,7 +57,7 @@ def __init__(self, **kwargs): """Instantiate the parameter class.""" self._ledger_id = kwargs.pop("ledger_id", DEFAULT_LEDGER_ID) self._contract_address = kwargs.pop( - "contract_adress", None + "contract_address", None ) # type: Optional[str] self._good_ids = kwargs.pop("good_ids", []) # type: List[int] self._currency_ids = kwargs.pop("currency_ids", []) # type: List[int] diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index 85cb506acc..c52139d7eb 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -11,10 +11,10 @@ fingerprint: __init__.py: Qme9YfgfPXymvupw1EHMJWGUSMTT6JQZxk2qaeKE76pgyN behaviours.py: QmcznM3tsmEDNx9Vbhv48o3PNtBEz5W1MVQ7SxJFGkH7di dialogues.py: QmcVYVTZ95UKBnXzmKyGLo5LwSVcGYUTrifosQMSpzNnCX - game.py: QmTovmW5vuhUcnvW4wQQcbPpiUFLLvMH7LaeTZYVvjqLcF + game.py: QmPabHgmR3vmhWLJh4BE1GUHPb7GkBwprpUq8mRcCtXdNN handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW helpers.py: QmQXrtqV3h4oU5cDwWKhtNiTTAGLNZGhjoVnDvGj7mGwpe - parameters.py: QmeviKY6o3H2FYNFaB9PibZGZc1CwMgLbrCbPoSmZDsikv + parameters.py: QmefuFt5DPCBciu4z17UJWcXxtb4vwA879pNwh4DoMKPUm fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.10.0 diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index bbf02c9ae4..46cc65528a 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -99,7 +99,9 @@ def act(self) -> None: game.phase = Phase.GAME_REGISTRATION self._register_tac() self.context.logger.info( - "TAC open for registration until: {}".format(parameters.start_time) + "TAC open for registration until: {}".format( + parameters.registration_end_time + ) ) elif ( game.phase.value == Phase.GAME_REGISTRATION.value diff --git a/packages/fetchai/skills/tac_control_contract/dialogues.py b/packages/fetchai/skills/tac_control_contract/dialogues.py index 6f7fadfc61..af0adf5faa 100644 --- a/packages/fetchai/skills/tac_control_contract/dialogues.py +++ b/packages/fetchai/skills/tac_control_contract/dialogues.py @@ -131,7 +131,9 @@ def callable(self) -> "Callable": return self._callable @callable.setter - def callable(self, callable: "Callable") -> None: + def callable( # pylint: disable=redefined-builtin + self, callable: "Callable" + ) -> None: """Set the callable.""" enforce(self._callable is None, "Callable already set!") self._callable = callable diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index a286adde7c..bf14e68ec6 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -423,11 +423,13 @@ def _handle_transaction_receipt( ) parameters.contract_address = contract_address game.phase = Phase.CONTRACT_DEPLOYED + self.context.logger.info("contract deployed.") elif ( contract_api_dialogue.callable == ContractApiDialogue.Callable.GET_CREATE_BATCH_TRANSACTION ): game.phase = Phase.TOKENS_CREATED + self.context.logger.info("TOKENS_CREATED created.") elif ( contract_api_dialogue.callable == ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION @@ -435,8 +437,9 @@ def _handle_transaction_receipt( parameters.nb_completed_minting += 1 if game.registration.nb_agents == parameters.nb_completed_minting: game.phase = Phase.TOKENS_MINTED + self.context.logger.info("tokens minted.") else: - self.context.logger.error("Unexpected transaction receipt!") + self.context.logger.error("unexpected transaction receipt!") else: self.context.logger.error( "transaction failed. Transaction receipt={}".format( diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index a27a4461f6..3a779d6a0b 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUiw6Dt97mXLzSizbnMNTsfLy3edGXKdYTNR5bke6sFsm __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmaNbF9fuhEzrh56q7tnFF3hKXQtFYGr1tnsgELp3z3jRS - dialogues.py: QmYQ5XiaRoGeLdz7z3d8gcDTzY8EeyHCgB9Nagkuwmfwjy + behaviours.py: QmVwuR8bhRfoSnYDZ7hmSy8o8bvUmdf52Vp3Tt8EHhEmyL + dialogues.py: QmWvhTeUnDimhQQTzuSfJJ6d2ViqgBNooCMfRiVzvzApw3 game.py: QmQwskD5DBVNv1ouRpqGNLb3zQ5krLUcR6XXHUcJ5EVc8L - handlers.py: QmSzNcZ3s3RjVm7mCXBhGjA379nwv3Tm9viEmw193WcNTd + handlers.py: QmTgbPjKaKQYmTr9SgJkCvTaP96NNbDs6BFfbNXE9tr9bz helpers.py: QmX3iv37Z5CmGupCtikc4muTpJyQ9zvjeLbNKDLF7iPhSZ parameters.py: QmVMNP52fPxkzEbXPhXtQXspnaj2f4ErZNcNdPAqv4cvwq fingerprint_ignore_patterns: [] diff --git a/packages/hashes.csv b/packages/hashes.csv index 9e4075b83d..0fe1906508 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -14,6 +14,7 @@ fetchai/agents/simple_service_registration,QmY4oz8n2zjJnAa3vHRRDuzpZi8Taf8qsScX7 fetchai/agents/tac_controller,QmWVvJemSdE5N5iyMuDt5ZHh1FA32oijHxBqq91zaNkdY3 fetchai/agents/tac_controller_contract,QmXmUu3XQj3E5jcSzi6fRT5ZkWw65HFnvzwqRDS5hcLqSz fetchai/agents/tac_participant,QmRmswKxJ9mdQe6zFRqxr9U1ZpYTybQf3DKsrAySt39aVc +fetchai/agents/tac_participant_contract,QmaZQ17y4Lm8MNVpDP9kUm31z5HpLDrGWW8yy3FWPwcFN4 fetchai/agents/thermometer_aea,QmT1GNUCcB6xqnmB1vv3jTs4HqeYM6tLnnL4TSjv5raHpk fetchai/agents/thermometer_client,QmdWMJCb7Pkz8F3emJ8wKhNWpnEUXHpBFQTGcmJyziu6kH fetchai/agents/weather_client,Qmd5iiwyqEuw7Fg8NkdLsNjkuZQRatNRADpXVXwG13BvtP @@ -62,8 +63,8 @@ fetchai/skills/ml_data_provider,QmaKyLjyvcj35bCHaKKo15MeF7k48hKPCfFbrtvXCogYwV fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr -fetchai/skills/tac_control,QmPFxFsYqRZvz7BRStWLV9Fo4Wd77iTNBWuBSU2VZeqrwL -fetchai/skills/tac_control_contract,QmSFbu21xtJTUqKXW5t1V6fQvVV49eA4FGtR4rgkcs8cBK +fetchai/skills/tac_control,QmSjh4JAzWG3oPUzazXvnTvKRBJ4nqRGLr9hCQeUP5x4eR +fetchai/skills/tac_control_contract,QmQpFb1rWiR1TLfyDx3fJcCQNcAEZSh669iZhgAvgK98Us fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt fetchai/skills/thermometer,QmTud9hXxRq8wRzcf7hVeszou3crmAEZBaw5MjV8x4XtH1 From 89eff75542df6dbd382b45b23927f53c44c16be8 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 24 Sep 2020 11:31:09 +0100 Subject: [PATCH 075/131] fix log statement in tac control contract --- packages/fetchai/skills/tac_control_contract/handlers.py | 2 +- packages/fetchai/skills/tac_control_contract/skill.yaml | 2 +- packages/hashes.csv | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index bf14e68ec6..0c93082691 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -429,7 +429,7 @@ def _handle_transaction_receipt( == ContractApiDialogue.Callable.GET_CREATE_BATCH_TRANSACTION ): game.phase = Phase.TOKENS_CREATED - self.context.logger.info("TOKENS_CREATED created.") + self.context.logger.info("tokens created.") elif ( contract_api_dialogue.callable == ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 3a779d6a0b..d01fa264a8 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -12,7 +12,7 @@ fingerprint: behaviours.py: QmVwuR8bhRfoSnYDZ7hmSy8o8bvUmdf52Vp3Tt8EHhEmyL dialogues.py: QmWvhTeUnDimhQQTzuSfJJ6d2ViqgBNooCMfRiVzvzApw3 game.py: QmQwskD5DBVNv1ouRpqGNLb3zQ5krLUcR6XXHUcJ5EVc8L - handlers.py: QmTgbPjKaKQYmTr9SgJkCvTaP96NNbDs6BFfbNXE9tr9bz + handlers.py: QmT1TaYDstQewEVptuRuUCgcEcyX1R47ZRzB2MGQWg2NxC helpers.py: QmX3iv37Z5CmGupCtikc4muTpJyQ9zvjeLbNKDLF7iPhSZ parameters.py: QmVMNP52fPxkzEbXPhXtQXspnaj2f4ErZNcNdPAqv4cvwq fingerprint_ignore_patterns: [] diff --git a/packages/hashes.csv b/packages/hashes.csv index 0fe1906508..0d51597d5a 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -64,7 +64,7 @@ fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr fetchai/skills/tac_control,QmSjh4JAzWG3oPUzazXvnTvKRBJ4nqRGLr9hCQeUP5x4eR -fetchai/skills/tac_control_contract,QmQpFb1rWiR1TLfyDx3fJcCQNcAEZSh669iZhgAvgK98Us +fetchai/skills/tac_control_contract,QmUNSvgheuMrerJ5aX2PhGLX2xVwdMXdepYsBoKYJ649VX fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt fetchai/skills/thermometer,QmTud9hXxRq8wRzcf7hVeszou3crmAEZBaw5MjV8x4XtH1 From 51da3a65d3ef3cdea5c13fdb4aa926730ee7b012 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 24 Sep 2020 19:20:42 +0100 Subject: [PATCH 076/131] fix contract deployment, minting and creating --- .../tac_controller_contract/aea-config.yaml | 2 +- packages/fetchai/skills/tac_control/game.py | 12 +++ .../fetchai/skills/tac_control/skill.yaml | 2 +- .../skills/tac_control_contract/behaviours.py | 80 ++++++++++--------- .../skills/tac_control_contract/handlers.py | 3 +- .../skills/tac_control_contract/skill.yaml | 7 +- packages/hashes.csv | 6 +- 7 files changed, 67 insertions(+), 45 deletions(-) diff --git a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml index 1d9f658154..9846c1d80b 100644 --- a/packages/fetchai/agents/tac_controller_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_controller_contract/aea-config.yaml @@ -35,7 +35,7 @@ registry_path: ../packages default_routing: fetchai/contract_api:0.5.0: fetchai/ledger:0.6.0 fetchai/ledger_api:0.4.0: fetchai/ledger:0.6.0 - fetchai/oef_search:0.6.0: fetchai/soef:0.8.0 + fetchai/oef_search:0.7.0: fetchai/soef:0.9.0 --- name: soef author: fetchai diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index 94f5277f55..795d56349b 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -742,6 +742,7 @@ def __init__(self, **kwargs): self._initial_agent_states = None # type: Optional[Dict[str, AgentState]] self._current_agent_states = None # type: Optional[Dict[str, AgentState]] self._transactions = Transactions() + self._already_minted_agents = [] # type: List[str] @property def phase(self) -> Phase: @@ -798,6 +799,17 @@ def create(self): self._phase = Phase.GAME_SETUP self._generate() + def get_next_agent_state_for_minting(self) -> Optional[AgentState]: + """Get next agent state for token minting.""" + result = None + for agent_addr, agent_state in self.initial_agent_states.items(): + if agent_addr in self._already_minted_agents: + continue + self._already_minted_agents.append(agent_addr) + result = agent_state + break + return result + def _generate(self): """Generate a TAC game.""" parameters = cast(Parameters, self.context.parameters) diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index c52139d7eb..365cd3f603 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -11,7 +11,7 @@ fingerprint: __init__.py: Qme9YfgfPXymvupw1EHMJWGUSMTT6JQZxk2qaeKE76pgyN behaviours.py: QmcznM3tsmEDNx9Vbhv48o3PNtBEz5W1MVQ7SxJFGkH7di dialogues.py: QmcVYVTZ95UKBnXzmKyGLo5LwSVcGYUTrifosQMSpzNnCX - game.py: QmPabHgmR3vmhWLJh4BE1GUHPb7GkBwprpUq8mRcCtXdNN + game.py: QmaDGFufEofsvo62E8KGUfaAeyDrPc5Mxih3JjDFSEpkqU handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW helpers.py: QmQXrtqV3h4oU5cDwWKhtNiTTAGLNZGhjoVnDvGj7mGwpe parameters.py: QmefuFt5DPCBciu4z17UJWcXxtb4vwA879pNwh4DoMKPUm diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 46cc65528a..50671a53ad 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -131,6 +131,8 @@ def act(self) -> None: elif game.phase.value == Phase.TOKENS_CREATED.value: game.phase = Phase.TOKENS_MINTING_PROPOSAL self._request_mint_items_transaction(game) + elif game.phase.value == Phase.TOKENS_MINTING_PROPOSAL.value: + self._request_mint_items_transaction(game) elif ( game.phase.value == Phase.TOKENS_MINTED.value and parameters.start_time < now < parameters.end_time @@ -160,6 +162,7 @@ def _request_create_items_transaction(self, game: Game) -> None: performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, ledger_id=parameters.ledger_id, contract_id="fetchai/erc1155:0.10.0", + contract_address=parameters.contract_address, callable=ContractApiDialogue.Callable.GET_CREATE_BATCH_TRANSACTION.value, kwargs=ContractApiMessage.Kwargs( {"deployer_address": self.context.agent_address, "token_ids": token_ids} @@ -179,39 +182,44 @@ def _request_mint_items_transaction(self, game: Game) -> None: :return: None """ - self.context.logger.info("requesting mint_items transactions.") - for agent_state in game.initial_agent_states.values(): - parameters = cast(Parameters, self.context.parameters) - token_ids = [] # type: List[int] - mint_quantities = [] # type: List[int] - for good_id, quantity in agent_state.quantities_by_good_id.items(): - token_ids.append(int(good_id)) - mint_quantities.append(quantity) - for currency_id, amount in agent_state.amount_by_currency_id.items(): - token_ids.append(int(currency_id)) - mint_quantities.append(amount) - contract_api_dialogues = cast( - ContractApiDialogues, self.context.contract_api_dialogues - ) - contract_api_msg, contract_api_dialogue = contract_api_dialogues.create( - counterparty=LEDGER_API_ADDRESS, - performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, - ledger_id=parameters.ledger_id, - contract_id="fetchai/erc1155:0.10.0", - contract_address=parameters.contract_address, - callable=ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION.value, - kwargs=ContractApiMessage.Kwargs( - { - "deployer_address": self.context.agent_address, - "recipient_address": self.context.agent_address, - "token_ids": token_ids, - "mint_quantities": mint_quantities, - } - ), - ) - contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue) - contract_api_dialogue.terms = parameters.get_mint_token_terms() - contract_api_dialogue.callable = ( - ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION - ) - self.context.outbox.put_message(message=contract_api_msg) + agent_state = game.get_next_agent_state_for_minting() + if agent_state is None: + return + name = game.registration.agent_addr_to_name[agent_state.agent_address] + self.context.logger.info( + f"requesting mint_items transactions for agent={name}." + ) + parameters = cast(Parameters, self.context.parameters) + token_ids = [] # type: List[int] + mint_quantities = [] # type: List[int] + for good_id, quantity in agent_state.quantities_by_good_id.items(): + token_ids.append(int(good_id)) + mint_quantities.append(quantity) + for currency_id, amount in agent_state.amount_by_currency_id.items(): + token_ids.append(int(currency_id)) + mint_quantities.append(amount) + contract_api_dialogues = cast( + ContractApiDialogues, self.context.contract_api_dialogues + ) + contract_api_msg, contract_api_dialogue = contract_api_dialogues.create( + counterparty=LEDGER_API_ADDRESS, + performative=ContractApiMessage.Performative.GET_RAW_TRANSACTION, + ledger_id=parameters.ledger_id, + contract_id="fetchai/erc1155:0.10.0", + contract_address=parameters.contract_address, + callable=ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION.value, + kwargs=ContractApiMessage.Kwargs( + { + "deployer_address": self.context.agent_address, + "recipient_address": self.context.agent_address, + "token_ids": token_ids, + "mint_quantities": mint_quantities, + } + ), + ) + contract_api_dialogue = cast(ContractApiDialogue, contract_api_dialogue) + contract_api_dialogue.terms = parameters.get_mint_token_terms() + contract_api_dialogue.callable = ( + ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION + ) + self.context.outbox.put_message(message=contract_api_msg) diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index 0c93082691..87079deb32 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -434,10 +434,11 @@ def _handle_transaction_receipt( contract_api_dialogue.callable == ContractApiDialogue.Callable.GET_MINT_BATCH_TRANSACTION ): + self.context.logger.info("tokens minted.") parameters.nb_completed_minting += 1 if game.registration.nb_agents == parameters.nb_completed_minting: game.phase = Phase.TOKENS_MINTED - self.context.logger.info("tokens minted.") + self.context.logger.info("all tokens minted.") else: self.context.logger.error("unexpected transaction receipt!") else: diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index d01fa264a8..7dc2f629f5 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUiw6Dt97mXLzSizbnMNTsfLy3edGXKdYTNR5bke6sFsm __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmVwuR8bhRfoSnYDZ7hmSy8o8bvUmdf52Vp3Tt8EHhEmyL + behaviours.py: QmUKPVxyvj3XbEX5CSJh3PBCX6HUvvkgzQ3TqHnLa1r3xh dialogues.py: QmWvhTeUnDimhQQTzuSfJJ6d2ViqgBNooCMfRiVzvzApw3 game.py: QmQwskD5DBVNv1ouRpqGNLb3zQ5krLUcR6XXHUcJ5EVc8L - handlers.py: QmT1TaYDstQewEVptuRuUCgcEcyX1R47ZRzB2MGQWg2NxC + handlers.py: QmZse9uaY8XFzwLtiGM55if93Zx9PRCuZdSQSCYTRLyjq1 helpers.py: QmX3iv37Z5CmGupCtikc4muTpJyQ9zvjeLbNKDLF7iPhSZ parameters.py: QmVMNP52fPxkzEbXPhXtQXspnaj2f4ErZNcNdPAqv4cvwq fingerprint_ignore_patterns: [] @@ -77,7 +77,8 @@ models: lower_bound_factor: 1 min_nb_agents: 2 money_endowment: 2000000 - nb_goods: 10 + nb_currencies: 1 + nb_goods: 9 registration_start_time: 01 01 2020 00:01 registration_timeout: 60 service_data: diff --git a/packages/hashes.csv b/packages/hashes.csv index 0d51597d5a..0cbad7258c 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -12,7 +12,7 @@ fetchai/agents/ml_model_trainer,QmWnBK6TGFro2VrtcwwBq1eztiT5y4DV92DdeyHPQqGzcY fetchai/agents/my_first_aea,QmYqeuaG7mkxqPZTM2qUHP2bMm1A7VsSDLi6BfW6SaFbuZ fetchai/agents/simple_service_registration,QmY4oz8n2zjJnAa3vHRRDuzpZi8Taf8qsScX7NJoXrTk3u fetchai/agents/tac_controller,QmWVvJemSdE5N5iyMuDt5ZHh1FA32oijHxBqq91zaNkdY3 -fetchai/agents/tac_controller_contract,QmXmUu3XQj3E5jcSzi6fRT5ZkWw65HFnvzwqRDS5hcLqSz +fetchai/agents/tac_controller_contract,QmSZRM9QqFpZDosBuY1gCgX4Ho8icAMAnyh6VMti6UdwVE fetchai/agents/tac_participant,QmRmswKxJ9mdQe6zFRqxr9U1ZpYTybQf3DKsrAySt39aVc fetchai/agents/tac_participant_contract,QmaZQ17y4Lm8MNVpDP9kUm31z5HpLDrGWW8yy3FWPwcFN4 fetchai/agents/thermometer_aea,QmT1GNUCcB6xqnmB1vv3jTs4HqeYM6tLnnL4TSjv5raHpk @@ -63,8 +63,8 @@ fetchai/skills/ml_data_provider,QmaKyLjyvcj35bCHaKKo15MeF7k48hKPCfFbrtvXCogYwV fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr -fetchai/skills/tac_control,QmSjh4JAzWG3oPUzazXvnTvKRBJ4nqRGLr9hCQeUP5x4eR -fetchai/skills/tac_control_contract,QmUNSvgheuMrerJ5aX2PhGLX2xVwdMXdepYsBoKYJ649VX +fetchai/skills/tac_control,QmVHPpD3mHoBq523jkkDyZcmwWwWYUJsPp11yCdweKEADy +fetchai/skills/tac_control_contract,QmPC8HhVYcSJW8TubwqxT1RLK4rV4AVrLAEFuJe4gNkHVR fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt fetchai/skills/thermometer,QmTud9hXxRq8wRzcf7hVeszou3crmAEZBaw5MjV8x4XtH1 From e7add9b6acc663818c9012cf2db61aa1f86db31b Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 24 Sep 2020 20:43:57 +0100 Subject: [PATCH 077/131] fix contract address forwarding --- packages/fetchai/skills/tac_control/behaviours.py | 2 +- packages/fetchai/skills/tac_control/game.py | 11 +++++++++++ packages/fetchai/skills/tac_control/skill.yaml | 4 ++-- .../fetchai/skills/tac_control_contract/behaviours.py | 4 ++++ .../fetchai/skills/tac_control_contract/handlers.py | 1 + .../fetchai/skills/tac_control_contract/skill.yaml | 4 ++-- packages/hashes.csv | 4 ++-- 7 files changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/fetchai/skills/tac_control/behaviours.py b/packages/fetchai/skills/tac_control/behaviours.py index 6b79c0f094..72fcf955d7 100644 --- a/packages/fetchai/skills/tac_control/behaviours.py +++ b/packages/fetchai/skills/tac_control/behaviours.py @@ -79,6 +79,7 @@ def act(self) -> None: self._unregister_tac() else: game.phase = Phase.GAME_SETUP + game.create() self._start_tac(game) self._unregister_tac() game.phase = Phase.GAME @@ -174,7 +175,6 @@ def _unregister_agent(self) -> None: def _start_tac(self, game: Game): """Create a game and send the game configuration to every registered agent.""" - game.create() self.context.logger.info( "started competition:\n{}".format(game.holdings_summary) ) diff --git a/packages/fetchai/skills/tac_control/game.py b/packages/fetchai/skills/tac_control/game.py index 795d56349b..e211937816 100644 --- a/packages/fetchai/skills/tac_control/game.py +++ b/packages/fetchai/skills/tac_control/game.py @@ -743,6 +743,7 @@ def __init__(self, **kwargs): self._current_agent_states = None # type: Optional[Dict[str, AgentState]] self._transactions = Transactions() self._already_minted_agents = [] # type: List[str] + self._is_allowed_to_mint = True @property def phase(self) -> Phase: @@ -799,6 +800,16 @@ def create(self): self._phase = Phase.GAME_SETUP self._generate() + @property + def is_allowed_to_mint(self): + """Get is allowed to mint.""" + return self._is_allowed_to_mint + + @is_allowed_to_mint.setter + def is_allowed_to_mint(self, is_allowed_to_mint: bool): + """Get is allowed to mint.""" + self._is_allowed_to_mint = is_allowed_to_mint + def get_next_agent_state_for_minting(self) -> Optional[AgentState]: """Get next agent state for token minting.""" result = None diff --git a/packages/fetchai/skills/tac_control/skill.yaml b/packages/fetchai/skills/tac_control/skill.yaml index 365cd3f603..45fe2a38f5 100644 --- a/packages/fetchai/skills/tac_control/skill.yaml +++ b/packages/fetchai/skills/tac_control/skill.yaml @@ -9,9 +9,9 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmdWECpRXZXH5JPV6wVHqeUtvjBhieUFTEoT2e7EY16N8M __init__.py: Qme9YfgfPXymvupw1EHMJWGUSMTT6JQZxk2qaeKE76pgyN - behaviours.py: QmcznM3tsmEDNx9Vbhv48o3PNtBEz5W1MVQ7SxJFGkH7di + behaviours.py: QmPtGBEFGEdQCzeXC3ZkJuNTrSe217JupP1wtP8DMnm6cK dialogues.py: QmcVYVTZ95UKBnXzmKyGLo5LwSVcGYUTrifosQMSpzNnCX - game.py: QmaDGFufEofsvo62E8KGUfaAeyDrPc5Mxih3JjDFSEpkqU + game.py: QmU3jm1yqhtnW1XK9EGZAMx9iWeCiX8Cdvb55kQQKDXav1 handlers.py: QmSjwPKEN83C2gQS4WVH8uaHMv5ze7EJ9S8ugmRcKnSwnW helpers.py: QmQXrtqV3h4oU5cDwWKhtNiTTAGLNZGhjoVnDvGj7mGwpe parameters.py: QmefuFt5DPCBciu4z17UJWcXxtb4vwA879pNwh4DoMKPUm diff --git a/packages/fetchai/skills/tac_control_contract/behaviours.py b/packages/fetchai/skills/tac_control_contract/behaviours.py index 50671a53ad..5bf5178685 100644 --- a/packages/fetchai/skills/tac_control_contract/behaviours.py +++ b/packages/fetchai/skills/tac_control_contract/behaviours.py @@ -121,6 +121,7 @@ def act(self) -> None: else: game.phase = Phase.GAME_SETUP game.create() + game.conf.contract_address = parameters.contract_address self._unregister_tac() elif ( game.phase.value == Phase.GAME_SETUP.value @@ -182,6 +183,9 @@ def _request_mint_items_transaction(self, game: Game) -> None: :return: None """ + if not game.is_allowed_to_mint: + return + game.is_allowed_to_mint = False agent_state = game.get_next_agent_state_for_minting() if agent_state is None: return diff --git a/packages/fetchai/skills/tac_control_contract/handlers.py b/packages/fetchai/skills/tac_control_contract/handlers.py index 87079deb32..2794aa4dec 100644 --- a/packages/fetchai/skills/tac_control_contract/handlers.py +++ b/packages/fetchai/skills/tac_control_contract/handlers.py @@ -436,6 +436,7 @@ def _handle_transaction_receipt( ): self.context.logger.info("tokens minted.") parameters.nb_completed_minting += 1 + game.is_allowed_to_mint = True if game.registration.nb_agents == parameters.nb_completed_minting: game.phase = Phase.TOKENS_MINTED self.context.logger.info("all tokens minted.") diff --git a/packages/fetchai/skills/tac_control_contract/skill.yaml b/packages/fetchai/skills/tac_control_contract/skill.yaml index 7dc2f629f5..7057bc6e20 100644 --- a/packages/fetchai/skills/tac_control_contract/skill.yaml +++ b/packages/fetchai/skills/tac_control_contract/skill.yaml @@ -9,10 +9,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmUiw6Dt97mXLzSizbnMNTsfLy3edGXKdYTNR5bke6sFsm __init__.py: QmW9WBy1sNYVKpymGnpJY2pW5MEqGgVga2kBFUT9S34Yt5 - behaviours.py: QmUKPVxyvj3XbEX5CSJh3PBCX6HUvvkgzQ3TqHnLa1r3xh + behaviours.py: QmSfxtgDawQai52wzoYp58KHEVjXPsFiHQpyv4cYCcBo28 dialogues.py: QmWvhTeUnDimhQQTzuSfJJ6d2ViqgBNooCMfRiVzvzApw3 game.py: QmQwskD5DBVNv1ouRpqGNLb3zQ5krLUcR6XXHUcJ5EVc8L - handlers.py: QmZse9uaY8XFzwLtiGM55if93Zx9PRCuZdSQSCYTRLyjq1 + handlers.py: QmUevEFLkj94XQDPKqkWxRRRZJnY3XQBZFKXDK69xpwabB helpers.py: QmX3iv37Z5CmGupCtikc4muTpJyQ9zvjeLbNKDLF7iPhSZ parameters.py: QmVMNP52fPxkzEbXPhXtQXspnaj2f4ErZNcNdPAqv4cvwq fingerprint_ignore_patterns: [] diff --git a/packages/hashes.csv b/packages/hashes.csv index 0cbad7258c..e11657a607 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -63,8 +63,8 @@ fetchai/skills/ml_data_provider,QmaKyLjyvcj35bCHaKKo15MeF7k48hKPCfFbrtvXCogYwV fetchai/skills/ml_train,QmNoV8PRFQj7WEj9We6sEtX9G1Qb8qESoZ2QRK4MybVNoG fetchai/skills/scaffold,QmRVUvLnRRPjgNDYw2gNZFY8MFBhGez1CfvY7z3N8yFMux fetchai/skills/simple_service_registration,QmVTVvRoxKsP9N97TRGrj92bgPcEYhKYfYtohVuQ8BNzbr -fetchai/skills/tac_control,QmVHPpD3mHoBq523jkkDyZcmwWwWYUJsPp11yCdweKEADy -fetchai/skills/tac_control_contract,QmPC8HhVYcSJW8TubwqxT1RLK4rV4AVrLAEFuJe4gNkHVR +fetchai/skills/tac_control,QmQqF4n4M1kYBHUFAUXsWoEdGZBDwvjwBDmtot5bzWtRMF +fetchai/skills/tac_control_contract,QmQaYhgXfyZ3xP6USHWsVQ76hTQnuLxHUt2YGGXHEpUHqx fetchai/skills/tac_negotiation,QmU6rghC95ESWaxM8gENDuRxuCXDgXQR3xkhrqFurQSEEo fetchai/skills/tac_participation,QmdiCxur8qx2beRKz2HxGTF4GLzM6k7GEiecy67NvQ4iKt fetchai/skills/thermometer,QmTud9hXxRq8wRzcf7hVeszou3crmAEZBaw5MjV8x4XtH1 From 3eb7cd9811e0d0d43e7d7261537d5bf805d81f89 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Fri, 25 Sep 2020 12:47:32 +0300 Subject: [PATCH 078/131] anget manager. start stop agents --- aea/manager.py | 225 +++++++++++++++++++++++++++++++++++++++++- tests/test_manager.py | 22 +++-- 2 files changed, 236 insertions(+), 11 deletions(-) diff --git a/aea/manager.py b/aea/manager.py index 643543597f..de92bf7edb 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -17,10 +17,14 @@ # # ------------------------------------------------------------------------------ """This module contains the implementation of AEA agents manager.""" +import asyncio import copy import os +import threading +from asyncio.tasks import FIRST_COMPLETED from shutil import rmtree -from typing import Dict, List, Optional, Set +from threading import Thread +from typing import Callable, Dict, List, Optional, Set from aea.aea import AEA from aea.aea_builder import AEABuilder @@ -70,12 +74,96 @@ def remove(self): self.project.agents.remove(self.name) +class AsyncTask: + """Async task wrapper for agent.""" + + def __init__(self, agent: AEA, loop: asyncio.AbstractEventLoop) -> None: + """Init task with agent and loop.""" + self.run_loop: asyncio.AbstractEventLoop = loop + self.caller_loop: asyncio.AbstractEventLoop = loop + self._done_future: Optional[asyncio.Future] = None + self.task: Optional[asyncio.Task] = None + self.agent = agent + + def create_run_loop(self) -> None: + """Create run loop.""" + pass + + def start(self) -> None: + """Start task.""" + self.create_run_loop() + self.task = self.run_loop.create_task(self._run_wrapper()) + self._done_future = asyncio.Future(loop=self.caller_loop) + + def wait(self) -> asyncio.Future: + """Return future to wait task completed.""" + if not self._done_future: + raise ValueError("Task not started!") + return self._done_future + + def stop(self) -> None: + """Stop task.""" + if not self.run_loop or not self.task: + raise ValueError("Task was not started!") + self.run_loop.call_soon_threadsafe(self.task.cancel) + + async def _run_wrapper(self) -> None: + """Run task internals.""" + if not self._done_future: + raise ValueError("Task was not started! please use start method") + try: + await self.run() + self.caller_loop.call_soon_threadsafe(self._done_future.set_result, None) + except asyncio.CancelledError: + self.caller_loop.call_soon_threadsafe(self._done_future.set_result, None) + except Exception as e: + self.caller_loop.call_soon_threadsafe(self._done_future.set_exception, e) + + async def run(self) -> None: + """Run task body.""" + self.agent.runtime.set_loop(self.run_loop) + try: + self.agent.runtime.start() + while True: + await asyncio.sleep(1) + finally: + self.agent.runtime.stop() + + @property + def is_running(self) -> bool: + """Return is task running.""" + return not self.wait().done() + + +class ThreadedTask(AsyncTask): + """Threaded task.""" + + def __init__(self, agent: AEA, loop: asyncio.AbstractEventLoop) -> None: + """Init task with agent and loop.""" + AsyncTask.__init__(self, agent, loop) + self._thread: Optional[Thread] = None + + def create_run_loop(self) -> None: + """Create run loop.""" + self.run_loop = asyncio.new_event_loop() + + def start(self) -> None: + """Run task in a dedicated thread.""" + super().start() + self._thread = threading.Thread( + target=self.run_loop.run_until_complete, args=[self.task], daemon=True + ) + self._thread.start() + + class Manager: """Abstract agents manager.""" AGENT_DO_NOT_OVERRIDE_VALUES = ["skills", "connections", "protocols", "contracts"] + MODES = ["async", "threaded"] + DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS = 60 - def __init__(self, working_dir: str) -> None: + def __init__(self, working_dir: str, mode: str = "async") -> None: """ Initialize manager. @@ -83,15 +171,74 @@ def __init__(self, working_dir: str) -> None: """ self.working_dir = working_dir self._was_working_dir_created = False - self.is_started = False + self._is_running = False self._projects: Dict[PublicId, Project] = {} self._keys_dir = os.path.abspath(os.path.join(self.working_dir, "keys")) self._agents: Dict[str, AgentAlias] = {} + self._agents_tasks: Dict[str, AsyncTask] = {} + + self._thread = Thread(target=self._run_thread, daemon=True) + self._loop: Optional[asyncio.AbstractEventLoop] = None + self._event: Optional[asyncio.Event] = None + + self._error_callbacks: List[Callable[[str, BaseException], None]] = [] + + if mode not in self.MODES: + raise ValueError( + f'Invalid mode {mode}. Valid modes are {", ".join(self.MODES)}' + ) + self._started_event = threading.Event() + self._mode = mode + + @property + def is_running(self) -> bool: + """Is manager running.""" + return self._is_running + + def _run_thread(self) -> None: + """Run internal thread with own event loop.""" + self._loop = asyncio.new_event_loop() + self._event = asyncio.Event(loop=self._loop) + self._loop.run_until_complete(self._manager_loop()) + + async def _manager_loop(self) -> None: + """Perform manager stop.""" + if not self._event: + raise ValueError("Do not use this method directly, use start_manager.") + + self._started_event.set() + + while self._is_running: + tasks_for_agents = { + task.wait(): agent_name + for agent_name, task in self._agents_tasks.items() + } + wait_tasks = list(tasks_for_agents.keys()) + [self._event.wait()] # type: ignore + done, _ = await asyncio.wait(wait_tasks, return_when=FIRST_COMPLETED) + + if self._event.is_set(): + self._event.clear() + + for task in done: + if task not in tasks_for_agents: + await task + continue + agent_name = tasks_for_agents[task] + self._agents_tasks.pop(agent_name) + if task.exception(): + print(agent_name, "exceptioned", task.exception()) + for callback in self._error_callbacks: + callback(agent_name, task.exception()) + else: + await task def start_manager(self) -> None: """Start manager.""" self._ensure_working_dir() - self.is_started = True + self._started_event.clear() + self._is_running = True + self._thread.start() + self._started_event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) def stop_manager(self, cleanup: bool = False) -> None: """ @@ -103,10 +250,16 @@ def stop_manager(self, cleanup: bool = False) -> None: :return: None """ + if not self._loop or not self._event: + raise ValueError("Manager was not started!") if self._was_working_dir_created: rmtree(self.working_dir) - self.is_started = False + if self._thread.is_alive(): + self.stop_all_agents() + self._is_running = False + self._loop.call_soon_threadsafe(self._event.set) + self._thread.join(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) def add_project(self, public_id: PublicId) -> None: """Fetch agent project and all dependencies to working_dir.""" @@ -119,6 +272,11 @@ def remove_project(self, public_id: PublicId) -> None: if public_id not in self._projects: raise ValueError(f"Project {public_id} was not added!") + if self._projects[public_id].agents: + raise ValueError( + f"Can not remove projects with aliases exists: {self._projects[public_id].agents}" + ) + self._projects.pop(public_id).remove() def list_projects(self) -> List[PublicId]: @@ -171,6 +329,8 @@ def list_agents(self, running_only: bool = False) -> List[str]: :return: list of agents names """ + if running_only: + return list(self._agents_tasks.keys()) return list(self._agents.keys()) def remove_agent(self, agent_name: str) -> None: @@ -184,6 +344,9 @@ def remove_agent(self, agent_name: str) -> None: if agent_name not in self._agents: raise ValueError(f"Agent with name {agent_name} does not exist!") + if self._is_agent_running(agent_name): + raise ValueError("Agent is running. stop it first!") + agent_alias = self._agents.pop(agent_name) agent_alias.remove() @@ -195,6 +358,33 @@ def start_agent(self, agent_name: str) -> None: :return: None """ + if not self._loop or not self._event: + raise ValueError("agent is not started!") + + agent_alias = self._agents.get(agent_name) + if not agent_alias: + raise ValueError(f"{agent_name} is not registered!") + if self._is_agent_running(agent_name): + raise ValueError(f"{agent_name} is already started!") + + if self._mode == "async": + task = AsyncTask(agent_alias.agent, self._loop) + elif self._mode == "threaded": + task = ThreadedTask(agent_alias.agent, self._loop) + + task.start() + self._agents_tasks[agent_name] = task + self._loop.call_soon_threadsafe(self._event.set) + + def _is_agent_running(self, agent_name): + if agent_name not in self._agents_tasks: + return False + + task = self._agents_tasks[agent_name] + if task.is_running: + return True + del self._agents_tasks[agent_name] + return False def start_all_agents(self) -> None: """ @@ -202,6 +392,10 @@ def start_all_agents(self) -> None: :return: None """ + for agent_name in self.list_agents(): + if self._is_agent_running(agent_name): + continue + self.start_agent(agent_name) def stop_agent(self, agent_name: str) -> None: """ @@ -211,6 +405,16 @@ def stop_agent(self, agent_name: str) -> None: :return: None """ + if not self._is_agent_running(agent_name): + raise ValueError(f"{agent_name} is not running!") + if self._thread.ident == threading.get_ident(): + # In same thread do not perform blocking operations! + self._agents_tasks[agent_name].stop() + return + event = threading.Event() + self._agents_tasks[agent_name].wait().add_done_callback(lambda x: event.set()) + self._agents_tasks[agent_name].stop() + event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) def stop_all_agents(self) -> None: """ @@ -218,6 +422,8 @@ def stop_all_agents(self) -> None: :return: None """ + for agent_name in self.list_agents(running_only=True): + self.stop_agent(agent_name) def stop_agents(self, agent_names: List[str]) -> None: """ @@ -225,6 +431,12 @@ def stop_agents(self, agent_names: List[str]) -> None: :return: None """ + for agent_name in agent_names: + if not self._is_agent_running(agent_name): + raise ValueError(f"{agent_name} is not running!") + + for agent_name in agent_names: + self.stop_agent(agent_name) def start_agents(self, agent_names: List[str]) -> None: """ @@ -232,6 +444,8 @@ def start_agents(self, agent_names: List[str]) -> None: :return: None """ + for agent_name in agent_names: + self.start_agent(agent_name) def get_agent_details(self, agent_name: str) -> AgentAlias: """ @@ -267,6 +481,7 @@ def _build_agent_alias( builder = AEABuilder.from_config_json(json_config, project.path) builder.set_name(agent_name) + # builder.set_runtime_mode("async") if not builder.private_key_paths: default_ledger = json_config[0].get("default_ledger", DEFAULT_LEDGER) diff --git a/tests/test_manager.py b/tests/test_manager.py index e5a4c6af57..170ea6b96e 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -18,9 +18,9 @@ # ------------------------------------------------------------------------------ """This module contains tests for aea manager.""" import os +import time from contextlib import suppress from shutil import rmtree -from typing import Dict, List, Optional, Set import pytest @@ -30,7 +30,7 @@ def test_manager(): """Perform some tests.""" - + # pydocsyle try: working_dir = "manager_dir" project_public_id = PublicId("fetchai", "my_first_aea", "0.11.0") @@ -41,7 +41,7 @@ def test_manager(): manager = Manager(working_dir) manager.start_manager() assert os.path.exists(working_dir) - assert manager.is_started + assert manager.is_running manager.add_project(project_public_id) @@ -84,13 +84,24 @@ def test_manager(): project_public_id, agent_name, ) assert agent_name in manager.list_agents() + manager.start_all_agents() + assert agent_name in manager.list_agents(running_only=True) + manager.start_all_agents() + + with pytest.raises(ValueError, match="is already started!"): + manager.start_agents(manager.list_agents()) + + with pytest.raises(ValueError, match="Agent is running. stop it first!"): + manager.remove_agent(agent_name) + + time.sleep(2) + manager.stop_all_agents() manager.remove_agent(agent_name) assert agent_name not in manager.list_agents() with pytest.raises(ValueError, match="does not exist!"): manager.remove_agent(agent_name) - manager.remove_project(project_public_id) assert project_public_id not in manager._projects assert not os.path.exists(project_path) @@ -98,10 +109,9 @@ def test_manager(): with pytest.raises(ValueError, match=r"was not added"): manager.remove_project(project_public_id) - manager.stop_manager() assert not os.path.exists(working_dir) - assert not manager.is_started + assert not manager.is_running finally: with suppress(FileNotFoundError): rmtree(working_dir) From 90ac861f61d2fb600e54e8c59088de42fe123d38 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Fri, 25 Sep 2020 11:59:48 +0100 Subject: [PATCH 079/131] add test for tac_control_contract --- aea/test_tools/test_cases.py | 4 +- .../tac_participant_contract/aea-config.yaml | 9 +- packages/hashes.csv | 2 +- tests/test_packages/test_skills/test_tac.py | 203 +++++++++++++----- 4 files changed, 159 insertions(+), 59 deletions(-) diff --git a/aea/test_tools/test_cases.py b/aea/test_tools/test_cases.py index d058f4d1f9..ac19fa1dee 100644 --- a/aea/test_tools/test_cases.py +++ b/aea/test_tools/test_cases.py @@ -269,11 +269,11 @@ def is_allowed_diff_in_agent_config( with open( os.path.join(path_to_fetched_aea, "aea-config.yaml"), "r" ) as file: - content1 = yaml.full_load(file) + content1 = list(yaml.safe_load_all(file))[0] # only load first page with open( os.path.join(path_to_manually_created_aea, "aea-config.yaml"), "r" ) as file: - content2 = yaml.full_load(file) + content2 = list(yaml.safe_load_all(file))[0] content1c = copy.deepcopy(content1) for key, value in content1c.items(): if content2[key] == value: diff --git a/packages/fetchai/agents/tac_participant_contract/aea-config.yaml b/packages/fetchai/agents/tac_participant_contract/aea-config.yaml index cde745ed9b..32726f5f0d 100644 --- a/packages/fetchai/agents/tac_participant_contract/aea-config.yaml +++ b/packages/fetchai/agents/tac_participant_contract/aea-config.yaml @@ -1,7 +1,8 @@ -agent_name: tac_participant +agent_name: tac_participant_contract author: fetchai -version: 0.11.0 -description: An AEA to participate in the TAC (trading agent competition) +version: 0.1.0 +description: An AEA to participate in the TAC (trading agent competition) using an + ERC1155 smart contract. license: Apache-2.0 aea_version: '>=0.6.0, <0.7.0' fingerprint: {} @@ -23,7 +24,7 @@ skills: - fetchai/tac_negotiation:0.10.0 - fetchai/tac_participation:0.9.0 default_connection: fetchai/p2p_libp2p:0.10.0 -default_ledger: fetchai +default_ledger: ethereum logging_config: disable_existing_loggers: false version: 1 diff --git a/packages/hashes.csv b/packages/hashes.csv index e11657a607..8826c1bb2b 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -14,7 +14,7 @@ fetchai/agents/simple_service_registration,QmY4oz8n2zjJnAa3vHRRDuzpZi8Taf8qsScX7 fetchai/agents/tac_controller,QmWVvJemSdE5N5iyMuDt5ZHh1FA32oijHxBqq91zaNkdY3 fetchai/agents/tac_controller_contract,QmSZRM9QqFpZDosBuY1gCgX4Ho8icAMAnyh6VMti6UdwVE fetchai/agents/tac_participant,QmRmswKxJ9mdQe6zFRqxr9U1ZpYTybQf3DKsrAySt39aVc -fetchai/agents/tac_participant_contract,QmaZQ17y4Lm8MNVpDP9kUm31z5HpLDrGWW8yy3FWPwcFN4 +fetchai/agents/tac_participant_contract,QmVuA9fJAM2jrJH6PCfcq12mgp6999LFCktwkLNjhHhsLz fetchai/agents/thermometer_aea,QmT1GNUCcB6xqnmB1vv3jTs4HqeYM6tLnnL4TSjv5raHpk fetchai/agents/thermometer_client,QmdWMJCb7Pkz8F3emJ8wKhNWpnEUXHpBFQTGcmJyziu6kH fetchai/agents/weather_client,Qmd5iiwyqEuw7Fg8NkdLsNjkuZQRatNRADpXVXwG13BvtP diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index 88a8c90156..c5c4f3bcfd 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -260,25 +260,34 @@ def test_tac(self): class TestTacSkillsContract(AEATestCaseMany): """Test that tac skills work.""" - @pytest.mark.unstable @pytest.mark.flaky(reruns=MAX_FLAKY_RERUNS_ETH) # cause possible network issues def test_tac(self): """Run the tac skills sequence.""" tac_aea_one = "tac_participant_one" tac_aea_two = "tac_participant_two" - tac_controller_name = "tac_controller" + tac_controller_name = "tac_controller_contract" # create tac controller, agent one and agent two self.create_agents( tac_aea_one, tac_aea_two, tac_controller_name, ) + default_routing = { + "fetchai/contract_api:0.5.0": "fetchai/ledger:0.6.0", + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", + } + # prepare tac controller for test self.set_agent_context(tac_controller_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/soef:0.9.0") + self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/tac_control_contract:0.9.0") self.set_config("agent.default_ledger", ETHEREUM) + setting_path = "agent.default_routing" + self.force_set_config(setting_path, default_routing) self.run_install() diff = self.difference_to_fetched_agent( @@ -288,23 +297,46 @@ def test_tac(self): diff == [] ), "Difference between created and fetched project for files={}".format(diff) + # add keys self.generate_private_key(ETHEREUM) + self.generate_private_key(COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION) self.add_private_key(ETHEREUM, ETHEREUM_PRIVATE_KEY_FILE) + self.add_private_key( + COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, connection=True + ) self.replace_private_key_in_file( FUNDED_ETH_PRIVATE_KEY_1, ETHEREUM_PRIVATE_KEY_FILE ) + self.replace_private_key_in_file( + NON_FUNDED_COSMOS_PRIVATE_KEY_1, COSMOS_PRIVATE_KEY_FILE_CONNECTION + ) + setting_path = "vendor.fetchai.connections.p2p_libp2p.config.ledger_id" + self.force_set_config(setting_path, COSMOS) + setting_path = "vendor.fetchai.connections.soef.config.chain_identifier" + self.force_set_config(setting_path, ETHEREUM) + setting_path = "vendor.fetchai.skills.tac_control.is_abstract" + self.force_set_config(setting_path, True) + + default_routing = { + "fetchai/ledger_api:0.4.0": "fetchai/ledger:0.6.0", + "fetchai/oef_search:0.7.0": "fetchai/soef:0.9.0", + } # prepare agents for test - for agent_name, eth_private_key in zip( - (tac_aea_one, tac_aea_two), - (FUNDED_ETH_PRIVATE_KEY_2, FUNDED_ETH_PRIVATE_KEY_3), + for agent_name, config, private_key in ( + (tac_aea_one, NON_GENESIS_CONFIG, FUNDED_ETH_PRIVATE_KEY_2), + (tac_aea_two, NON_GENESIS_CONFIG_TWO, FUNDED_ETH_PRIVATE_KEY_3), ): self.set_agent_context(agent_name) self.add_item("connection", "fetchai/p2p_libp2p:0.10.0") self.set_config("agent.default_connection", "fetchai/p2p_libp2p:0.10.0") + self.add_item("connection", "fetchai/soef:0.9.0") + self.add_item("connection", "fetchai/ledger:0.6.0") self.add_item("skill", "fetchai/tac_participation:0.9.0") self.add_item("skill", "fetchai/tac_negotiation:0.10.0") self.set_config("agent.default_ledger", ETHEREUM) + setting_path = "agent.default_routing" + self.force_set_config(setting_path, default_routing) self.set_config( "vendor.fetchai.skills.tac_participation.models.game.args.is_using_contract", True, @@ -317,34 +349,59 @@ def test_tac(self): ) self.run_install() diff = self.difference_to_fetched_agent( - "fetchai/tac_participant:0.11.0", agent_name + "fetchai/tac_participant_contract:0.1.0", agent_name ) assert ( diff == [] ), "Difference between created and fetched project for files={}".format( diff ) + + # add keys self.generate_private_key(ETHEREUM) + self.generate_private_key(COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION) self.add_private_key(ETHEREUM, ETHEREUM_PRIVATE_KEY_FILE) - self.replace_private_key_in_file(eth_private_key, ETHEREUM_PRIVATE_KEY_FILE) + self.add_private_key( + COSMOS, COSMOS_PRIVATE_KEY_FILE_CONNECTION, connection=True + ) + self.replace_private_key_in_file(private_key, ETHEREUM_PRIVATE_KEY_FILE) + + # set p2p configs + setting_path = "vendor.fetchai.connections.p2p_libp2p.config" + self.force_set_config(setting_path, config) + setting_path = "vendor.fetchai.connections.p2p_libp2p.config.ledger_id" + self.force_set_config(setting_path, COSMOS) # run tac controller self.set_agent_context(tac_controller_name) now = datetime.datetime.now().strftime("%d %m %Y %H:%M") now_min = datetime.datetime.strptime(now, "%d %m %Y %H:%M") - fut = now_min + datetime.timedelta(0, 360) + fut = now_min + datetime.timedelta( + 0, 180 + ) # we provide 3 minutes time for contract deployment start_time = fut.strftime("%d %m %Y %H:%M") - setting_path = "vendor.fetchai.skills.tac_control_contract.models.parameters.args.start_time" + setting_path = "vendor.fetchai.skills.tac_control_contract.models.parameters.args.registration_start_time" self.set_config(setting_path, start_time) - tac_controller_process = self.run_agent( - "--connections", "fetchai/p2p_libp2p:0.10.0" - ) + tac_controller_process = self.run_agent() check_strings = ( - "Sending deploy transaction to decision maker.", - "Sending deployment transaction to the ledger...", - "The contract was successfully deployed. Contract address:", - "Registering TAC data model", + "Downloading golang dependencies. This may take a while...", + "Finished downloading golang dependencies.", + "Starting libp2p node...", + "Connecting to libp2p node...", + "Successfully connected to libp2p node!", + "My libp2p addresses:", + "registering agent on SOEF.", + "requesting contract deployment transaction...", + "Start processing messages...", + "received raw transaction=", + "transaction signing was successful.", + "sending transaction to ledger.", + "transaction was successfully submitted. Transaction digest=", + "requesting transaction receipt.", + "transaction was successfully settled. Transaction receipt=", + "contract deployed.", + "registering TAC data model on SOEF.", "TAC open for registration until:", ) missing_strings = self.missing_from_output( @@ -354,65 +411,107 @@ def test_tac(self): missing_strings == [] ), "Strings {} didn't appear in tac_controller output.".format(missing_strings) - # run two participants as well + # run two agents (participants) self.set_agent_context(tac_aea_one) - tac_aea_one_process = self.run_agent( - "--connections", "fetchai/p2p_libp2p:0.10.0" - ) + tac_aea_one_process = self.run_agent() self.set_agent_context(tac_aea_two) - tac_aea_two_process = self.run_agent( - "--connections", "fetchai/p2p_libp2p:0.10.0" + tac_aea_two_process = self.run_agent() + + check_strings = ( + "Downloading golang dependencies. This may take a while...", + "Finished downloading golang dependencies.", + "Starting libp2p node...", + "Connecting to libp2p node...", + "Successfully connected to libp2p node!", + "My libp2p addresses:", + "Start processing messages...", + "searching for TAC, search_id=", + "found the TAC controller. Registering...", ) + missing_strings = self.missing_from_output( + tac_aea_one_process, check_strings, timeout=240, is_terminating=False + ) + assert ( + missing_strings == [] + ), "Strings {} didn't appear in tac_aea_one output.".format(missing_strings) check_strings = ( - "Agent registered:", - "Closing registration!", - "Setting Up the TAC game.", - "Unregistering TAC data model", - "Registering TAC data model", - "Sending create_items transaction to decision maker.", - "Sending creation transaction to the ledger..", - "Successfully created the tokens. Transaction hash:", - "Sending mint_items transactions to decision maker.", - "Sending minting transaction to the ledger...", - "Successfully minted the tokens for agent_addr=", - "All tokens minted!", - "Starting competition with configuration:", - "Current good & money allocation & score:", + "Downloading golang dependencies. This may take a while...", + "Finished downloading golang dependencies.", + "Starting libp2p node...", + "Connecting to libp2p node...", + "Successfully connected to libp2p node!", + "My libp2p addresses:", + "Start processing messages...", + "searching for TAC, search_id=", + "found the TAC controller. Registering...", ) missing_strings = self.missing_from_output( - tac_controller_process, check_strings, timeout=300, is_terminating=False + tac_aea_two_process, check_strings, timeout=240, is_terminating=False + ) + assert ( + missing_strings == [] + ), "Strings {} didn't appear in tac_aea_two output.".format(missing_strings) + + check_strings = ( + "agent registered:", + "closing registration!", + "unregistering TAC data model from SOEF.", + "requesting create items transaction...", + "received raw transaction=", + "proposing the transaction to the decision maker. Waiting for confirmation ...", + "transaction signing was successful.", + "transaction was successfully submitted. Transaction digest=", + "requesting transaction receipt.", + "transaction was successfully settled. Transaction receipt=", + "tokens created.", + "requesting mint_items transactions for agent=", + "tokens minted.", + "requesting mint_items transactions for agent=", + "tokens minted.", + "all tokens minted.", + "started competition:", + ) + missing_strings = self.missing_from_output( + tac_controller_process, check_strings, timeout=240, is_terminating=False ) assert ( missing_strings == [] ), "Strings {} didn't appear in tac_controller output.".format(missing_strings) check_strings = ( - "Searching for TAC, search_id=", - "Found the TAC controller. Registering...", - "Received start event from the controller. Starting to compete...", - "Searching for sellers which match the demand of the agent, search_id=", - "Searching for buyers which match the supply of the agent, search_id=", + "received start event from the controller. Starting to compete..." + "received a contract address:", + "registering agent on SOEF.", + "searching for sellers, search_id=", + "searching for buyers, search_id=", "found potential sellers agents=", "sending CFP to agent=", - "Accepting propose", - "sending match accept to", - "sending atomic swap tx to ledger.", - "tx_digest=", - "waiting for tx to confirm. Sleeping for 3 seconds ...", - "Successfully conducted atomic swap. Transaction digest:", - "found potential buyers agents=", - "sending CFP to agent=", - "Declining propose", ) missing_strings = self.missing_from_output( - tac_aea_one_process, check_strings, timeout=360, is_terminating=False + tac_aea_one_process, check_strings, timeout=300, is_terminating=False ) assert ( missing_strings == [] ), "Strings {} didn't appear in tac_aea_one output.".format(missing_strings) + check_strings = ( + "received start event from the controller. Starting to compete..." + "received a contract address:", + "registering agent on SOEF.", + "searching for sellers, search_id=", + "searching for buyers, search_id=", + "found potential sellers agents=", + "sending CFP to agent=", + ) + missing_strings = self.missing_from_output( + tac_aea_two_process, check_strings, timeout=360, is_terminating=False + ) + assert ( + missing_strings == [] + ), "Strings {} didn't appear in tac_aea_two output.".format(missing_strings) + # Note, we do not need to check std output of the other participant as it is implied self.terminate_agents( From 50c581b0e81aa4a0aa01c920c88794b82f35b201 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Fri, 25 Sep 2020 13:20:04 +0100 Subject: [PATCH 080/131] fix tac test marks --- tests/test_packages/test_skills/test_tac.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_packages/test_skills/test_tac.py b/tests/test_packages/test_skills/test_tac.py index c5c4f3bcfd..251bf42dca 100644 --- a/tests/test_packages/test_skills/test_tac.py +++ b/tests/test_packages/test_skills/test_tac.py @@ -256,10 +256,11 @@ def test_tac(self): ), "Agents weren't successfully terminated." -@pytest.mark.ledger class TestTacSkillsContract(AEATestCaseMany): """Test that tac skills work.""" + @pytest.mark.integration + @pytest.mark.ledger @pytest.mark.flaky(reruns=MAX_FLAKY_RERUNS_ETH) # cause possible network issues def test_tac(self): """Run the tac skills sequence.""" @@ -371,6 +372,8 @@ def test_tac(self): self.force_set_config(setting_path, config) setting_path = "vendor.fetchai.connections.p2p_libp2p.config.ledger_id" self.force_set_config(setting_path, COSMOS) + setting_path = "vendor.fetchai.connections.soef.config.chain_identifier" + self.force_set_config(setting_path, ETHEREUM) # run tac controller self.set_agent_context(tac_controller_name) From f2e7a4e9acd90f84419e093d7309b57d4a8fe253 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Fri, 25 Sep 2020 18:10:37 +0100 Subject: [PATCH 081/131] add video from cvc to docs --- docs/oef-ledger.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/oef-ledger.md b/docs/oef-ledger.md index 7b73b5202d..9575ac8e42 100644 --- a/docs/oef-ledger.md +++ b/docs/oef-ledger.md @@ -96,4 +96,10 @@ The Python version of the AEA Framework currently integrates with three ledgers: - Ethereum ledger - Cosmos ledger -However, the framework makes it straightforward for further ledgers to be added by any developer. \ No newline at end of file +However, the framework makes it straightforward for further ledgers to be added by any developer. + +### AEAs as second layer technology + +The following presentation discusses how AEAs can be seen as second layer technology to ledgers. + + From 42b89a029c974017e971f240deca315fcacb1be9 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Fri, 28 Aug 2020 11:52:48 +0300 Subject: [PATCH 082/131] runtime and agent loop async interface --- aea/aea.py | 12 +- aea/agent.py | 4 +- aea/agent_loop.py | 95 +++++---- aea/helpers/async_utils.py | 190 ++++++++++++++++-- aea/helpers/multiple_executor.py | 3 - aea/launcher.py | 2 +- aea/multiplexer.py | 73 ++++--- aea/runner.py | 4 +- aea/runtime.py | 254 ++++++++----------------- tests/test_aea.py | 28 +-- tests/test_agent.py | 8 +- tests/test_agent_loop.py | 102 +++++----- tests/test_helpers/test_async_utils.py | 153 +++++++++++++-- tests/test_launcher.py | 1 - tests/test_runtime.py | 50 ++--- tests/test_skills/test_error.py | 1 + 16 files changed, 590 insertions(+), 390 deletions(-) diff --git a/aea/aea.py b/aea/aea.py index 89a5022189..63086fdd02 100644 --- a/aea/aea.py +++ b/aea/aea.py @@ -55,6 +55,7 @@ from aea.protocols.default.message import DefaultMessage from aea.registries.filter import Filter from aea.registries.resources import Resources +from aea.runtime import StopRuntime from aea.skills.base import Behaviour, Handler from aea.skills.error.handlers import ErrorHandler @@ -241,8 +242,8 @@ def _get_msg_and_handlers_for_envelope( if error_handler is None: self.logger.warning("ErrorHandler not initialized. Stopping AEA!") - self.stop() - return None, [] + raise StopRuntime() + error_handler = cast(ErrorHandler, error_handler) if protocol is None: @@ -363,9 +364,10 @@ def log_exception(e, fn): if self._skills_exception_policy == ExceptionPolicyEnum.stop_and_exit: log_exception(exception, function) - self.stop() - raise AEAException( - f"AEA was terminated cause exception `{exception}` in skills {function}! Please check logs." + raise StopRuntime( + AEAException( + f"AEA was terminated cause exception `{exception}` in skills {function}! Please check logs." + ) ) if self._skills_exception_policy == ExceptionPolicyEnum.just_log: diff --git a/aea/agent.py b/aea/agent.py index b62acaadf6..70cd8fdc47 100644 --- a/aea/agent.py +++ b/aea/agent.py @@ -191,7 +191,8 @@ def start(self) -> None: :return: None """ - self.runtime.start() + if self.runtime.start(): + self.runtime.wait(sync=True) def stop(self) -> None: """ @@ -206,6 +207,7 @@ def stop(self) -> None: :return: None """ self.runtime.stop() + self.runtime.wait(sync=True) @property def state(self) -> RuntimeStates: diff --git a/aea/agent_loop.py b/aea/agent_loop.py index 59fff7c62d..40196f37a6 100644 --- a/aea/agent_loop.py +++ b/aea/agent_loop.py @@ -16,6 +16,8 @@ # limitations under the License. # # ------------------------------------------------------------------------------ + + """This module contains the implementation of an agent loop using asyncio.""" import asyncio import datetime @@ -24,6 +26,7 @@ from asyncio import CancelledError from asyncio.events import AbstractEventLoop from asyncio.tasks import Task +from contextlib import suppress from enum import Enum from functools import partial from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple @@ -34,7 +37,7 @@ AsyncState, HandlerItemGetter, PeriodicCaller, - ensure_loop, + Runnable, ) from aea.helpers.exec_timeout import ExecTimeoutThreadGuard, TimeoutException from aea.helpers.logging import WithLogger @@ -43,11 +46,28 @@ logger = logging.getLogger(__name__) -class BaseAgentLoop(WithLogger, ABC): +class AgentLoopException(AEAException): + """Exception for agent loop runtime errors.""" + + +class AgentLoopStates(Enum): + """Internal agent loop states.""" + + initial = None + started = "started" + stopped = "stopped" + stopping = "stopping" + error = "error" + + +class BaseAgentLoop(Runnable, WithLogger, ABC): """Base abstract agent loop class.""" def __init__( - self, agent: AbstractAgent, loop: Optional[AbstractEventLoop] = None + self, + agent: AbstractAgent, + loop: Optional[AbstractEventLoop] = None, + threaded=False, ) -> None: """Init loop. @@ -55,8 +75,9 @@ def __init__( :params loop: optional asyncio event loop. if not specified a new loop will be created. """ WithLogger.__init__(self, logger) + Runnable.__init__(self, loop=loop, threaded=threaded) + self._agent: AbstractAgent = agent - self.set_loop(ensure_loop(loop)) self._tasks: List[asyncio.Task] = [] self._state: AsyncState = AsyncState() self._exceptions: List[Exception] = [] @@ -70,11 +91,6 @@ def set_loop(self, loop: AbstractEventLoop) -> None: """Set event loop and all event loopp related objects.""" self._loop: AbstractEventLoop = loop - def start(self) -> None: - """Start agent loop synchronously in own asyncio loop.""" - self.setup() - self._loop.run_until_complete(self.run_loop()) - def setup(self) -> None: # pylint: disable=no-self-use """Set up loop before started.""" # start and stop methods are classmethods cause one instance shared across muiltiple threads @@ -85,16 +101,23 @@ def teardown(self): # pylint: disable=no-self-use # start and stop methods are classmethods cause one instance shared across muiltiple threads ExecTimeoutThreadGuard.stop() - async def run_loop(self) -> None: + async def run(self) -> None: """Run agent loop.""" self.logger.debug("agent loop started") + self.setup() self._set_tasks() try: await self._gather_tasks() except (CancelledError, KeyboardInterrupt): - await self.wait_run_loop_stopped() - logger.debug("agent loop stopped") - self._state.set(AgentLoopStates.stopped) + pass + finally: + self.teardown() + self._stop_tasks() + for t in self._tasks: + with suppress(BaseException): + await t + self._state.set(AgentLoopStates.stopped) + logger.debug("agent loop stopped") async def _gather_tasks(self) -> None: """Wait till first task exception.""" @@ -105,27 +128,6 @@ def _set_tasks(self) -> None: # pragma: nocover """Set run loop tasks.""" raise NotImplementedError - async def wait_run_loop_stopped(self) -> None: - """Wait all tasks stopped.""" - return await asyncio.gather( - *self._tasks, loop=self._loop, return_exceptions=True - ) - - def stop(self) -> None: - """Stop agent loop.""" - self.teardown() - self._state.set(AgentLoopStates.stopping) - logger.debug("agent loop stopping!") - if self._loop.is_running(): - self._loop.call_soon_threadsafe(self._stop_tasks) - else: - - async def stop(): - self._stop_tasks() - await self.wait_run_loop_stopped() - - self._loop.run_until_complete(stop()) - def _stop_tasks(self) -> None: """Cancel all tasks.""" for task in self._tasks: @@ -133,39 +135,32 @@ def _stop_tasks(self) -> None: continue #  pragma: nocover task.cancel() + @property + def state(self) -> AgentLoopStates: + """Get current main loop state.""" + return self._state.get() + @property def is_running(self) -> bool: """Get running state of the loop.""" return self._state.get() == AgentLoopStates.started -class AgentLoopException(AEAException): - """Exception for agent loop runtime errors.""" - - -class AgentLoopStates(Enum): - """Internal agent loop states.""" - - initial = None - started = "started" - stopped = "stopped" - stopping = "stopping" - error = "error" - - class AsyncAgentLoop(BaseAgentLoop): """Asyncio based agent loop suitable only for AEA.""" NEW_BEHAVIOURS_PROCESS_SLEEP = 1 # check new behaviours registered every second. - def __init__(self, agent: AbstractAgent, loop: AbstractEventLoop = None): + def __init__( + self, agent: AbstractAgent, loop: AbstractEventLoop = None, threaded=False + ): """ Init agent loop. :param agent: AEA instance :param loop: asyncio loop to use. optional """ - super().__init__(agent=agent, loop=loop) + super().__init__(agent=agent, loop=loop, threaded=threaded) self._agent: AbstractAgent = self._agent self._periodic_tasks: Dict[Callable, PeriodicCaller] = {} diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 0723a00b58..64155f510b 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -23,6 +23,7 @@ import logging import subprocess # nosec import time +from abc import ABC, abstractmethod from asyncio import CancelledError from asyncio.events import AbstractEventLoop, TimerHandle from asyncio.futures import Future @@ -259,27 +260,6 @@ def stop(self) -> None: self._timerhandle = None -def ensure_loop(loop: Optional[AbstractEventLoop] = None) -> AbstractEventLoop: - """ - Use loop provided or create new if not provided or closed. - - Return loop passed if its provided,not closed and not running, otherwise returns new event loop. - - :param loop: optional event loop - :return: asyncio event loop - """ - try: - loop = loop or asyncio.new_event_loop() - if loop.is_closed(): - raise ValueError("Event loop closed.") # pragma: nocover - if loop.is_running(): - raise ValueError("Event loop running.") - except (RuntimeError, ValueError): - loop = asyncio.new_event_loop() - - return loop - - class AnotherThreadTask: """ Schedule a task to run on the loop in another thread. @@ -477,3 +457,171 @@ def __init__(self, getters: List[Tuple[Callable[[Any], None], Callable]]): super().__init__( [self._make_getter(handler, getter) for handler, getter in getters] ) + + +ready_future: Future = Future() +ready_future.set_result(None) + + +class Runnable(ABC): + """Abstract Runnable class.""" + + def __init__(self, loop=None, threaded=False) -> None: + """ + Init runnable. + + :param loop: asyncio event loop to use. + :param threaded: bool. start in thread if True. + + :return: None + """ + if loop and threaded: + raise ValueError( + "You can not set a loop in threaded mode, cause own loop will be created" + ) + self._loop = loop + self._threaded = threaded + self._task: Optional[asyncio.Task] = None + self._thread: Optional[Thread] = None + self._completed_event: Optional[asyncio.Event] = None + self._got_result = False + + def start(self) -> bool: + """ + Start runnable. + + :return: bool started or not. + """ + if self._task and not self._task.done(): + logger.debug("already running") + return False + + self._got_result = False + self._set_loop() + self._completed_event = asyncio.Event(loop=self._loop) + self._set_task() + + if self._threaded: + self._thread = Thread( + target=self._loop.run_until_complete, args=[self._task] + ) + self._thread.start() + + return True + + def _set_loop(self) -> None: + """Select and set loop.""" + if self._threaded: + self._loop = asyncio.new_event_loop() + else: + try: + self._loop = self._loop or asyncio.get_event_loop() + except RuntimeError: + self._loop = asyncio.new_event_loop() + asyncio.set_event_loop(self._loop) + + def _set_task(self) -> None: + """Create task.""" + self._task = self._loop.create_task(self._run_wrapper()) + + async def _run_wrapper(self) -> None: + """Wrap run() method.""" + if not self._completed_event: + raise ValueError("Start was not called!") + try: + with suppress(asyncio.CancelledError): + return await self.run() + finally: + self._loop.call_soon_threadsafe(self._completed_event.set) + + @abstractmethod + async def run(self) -> Any: + """Implement run logic respectfull to CancelError on termination.""" + + def wait( + self, sync: bool = False, timeout: float = None, force_result: bool = False + ) -> Awaitable: + """ + Wait task to complete. + + :param sync: bool. blocking wait + :param timeout: float seconds + :param force_result: check result even it was waited. + + :return: awaitable if sync is False, otherise None + """ + if not self._task: + logger.warning("Runnable is not no started") + return ready_future + + if self._got_result and not force_result: + logger.warning("Already got result, skip") + return ready_future + + if self._task.done(): + return ready_future + + coro = self._wait() + if timeout is not None: + coro = asyncio.wait_for(self._wait(), timeout=timeout) # type: ignore + + if sync: + if self._loop.is_running(): + start_time = time.time() + while not self._task.done(): + time.sleep(0.01) + if timeout is not None and time.time() - start_time > timeout: + raise asyncio.TimeoutError() + self._got_result = True + if self._task.exception(): + raise self._task.exception() + else: + self._loop.run_until_complete(coro) + return ready_future + + if self._threaded: + loop = asyncio.get_event_loop() + fut = loop.create_future() + + def done(task): + if fut.done(): # pragma: nocover + return + if task.exception(): + fut.set_exception(task.exception()) + else: # pragma: nocover + fut.set_result(None) + + self._task.add_done_callback( + lambda task: loop.call_soon_threadsafe(lambda: done(task)) + ) + return fut + + return coro + + async def _wait(self) -> None: + """Wait internal method.""" + if not self._task or not self._completed_event: # pragma: nocover + raise ValueError("Not started") + + await self._completed_event.wait() + + try: + await self._task + finally: + self._got_result = True + + def stop(self) -> None: + """Stop runnable.""" + logger.debug(f"{self} is going to be stopped {self._task}") + if not self._task: + logger.debug("not running!") + return + if self._task.done(): + logger.debug("already completed") + return + self._loop.call_soon_threadsafe(self._task.cancel) + + def start_and_wait(self, sync=False): + """Alias for start and wait methods.""" + self.start() + return self.wait(sync=sync) diff --git a/aea/helpers/multiple_executor.py b/aea/helpers/multiple_executor.py index a4d0772c12..3fa00c859e 100644 --- a/aea/helpers/multiple_executor.py +++ b/aea/helpers/multiple_executor.py @@ -186,8 +186,6 @@ def stop(self) -> None: self._loop.run_until_complete( self._wait_tasks_complete(skip_exceptions=True) ) - if self._executor_pool: - self._executor_pool.shutdown(wait=True) if self._executor_pool: self._executor_pool.shutdown(wait=True) @@ -393,7 +391,6 @@ def stop(self, timeout: float = 0) -> None: :return: None """ self._executor.stop() - if self._thread is not None: self._thread.join(timeout=timeout) diff --git a/aea/launcher.py b/aea/launcher.py index c8af13f718..f093e96d76 100644 --- a/aea/launcher.py +++ b/aea/launcher.py @@ -144,7 +144,7 @@ def create_async_task(self, loop: AbstractEventLoop) -> TaskAwaitable: raise ValueError( "Agent runtime is not async compatible. Please use runtime_mode=async" ) - return loop.create_task(self._agent.runtime.run_runtime()) + return loop.create_task(self._agent.runtime.start_and_wait()) @property def id(self) -> Union[PathLike, str]: diff --git a/aea/multiplexer.py b/aea/multiplexer.py index e58db114a6..bc58fac40a 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -29,7 +29,11 @@ from aea.connections.base import Connection, ConnectionStates from aea.exceptions import enforce from aea.helpers.async_friendly_queue import AsyncFriendlyQueue -from aea.helpers.async_utils import AsyncState, ThreadedAsyncRunner +from aea.helpers.async_utils import ( + AsyncState, + Runnable, + ThreadedAsyncRunner, +) from aea.helpers.exception_policy import ExceptionPolicyEnum from aea.helpers.logging import WithLogger from aea.mail.base import AEAConnectionError, Empty, Envelope, EnvelopeContext @@ -67,7 +71,7 @@ def is_disconnecting(self) -> bool: # pragma: nocover return self.get() == ConnectionStates.disconnecting -class AsyncMultiplexer(WithLogger): +class AsyncMultiplexer(Runnable, WithLogger): """This class can handle multiple connections at once.""" def __init__( @@ -76,6 +80,7 @@ def __init__( default_connection_index: int = 0, loop: Optional[AbstractEventLoop] = None, exception_policy: ExceptionPolicyEnum = ExceptionPolicyEnum.propagate, + threaded: bool = False, ): """ Initialize the connection multiplexer. @@ -89,6 +94,8 @@ def __init__( """ super().__init__(default_logger) self._exception_policy: ExceptionPolicyEnum = exception_policy + WithLogger.__init__(self, default_logger) + Runnable.__init__(self, loop=loop, threaded=threaded) self._connections: List[Connection] = [] self._id_to_connection: Dict[PublicId, Connection] = {} self._default_connection: Optional[Connection] = None @@ -102,8 +109,21 @@ def __init__( self._recv_loop_task = None # type: Optional[asyncio.Task] self._send_loop_task = None # type: Optional[asyncio.Task] self._default_routing = {} # type: Dict[PublicId, PublicId] + self._loop: asyncio.AbstractEventLoop = loop if loop is not None else asyncio.new_event_loop() + self._lock: asyncio.Lock = asyncio.Lock(loop=self._loop) + self.set_loop(self._loop) + + async def run(self) -> None: + """Run multiplexer connect and recv/send tasks.""" + self.set_loop(asyncio.get_event_loop()) + try: + await self.connect() + if not self._recv_loop_task or not self._send_loop_task: + raise ValueError("Multiplexer is not connected properly.") - self.set_loop(loop if loop is not None else asyncio.new_event_loop()) + await asyncio.gather(self._recv_loop_task, self._send_loop_task) + finally: + await self.disconnect() @property def default_connection(self) -> Optional[Connection]: @@ -117,8 +137,8 @@ def set_loop(self, loop: AbstractEventLoop) -> None: :param loop: asyncio event loop. :return: None """ - self._loop: AbstractEventLoop = loop - self._lock: asyncio.Lock = asyncio.Lock(loop=self._loop) + self._loop = loop + self._lock = asyncio.Lock(loop=self._loop) def _initialize_connections_if_any( self, connections: Optional[Sequence[Connection]], default_connection_index: int @@ -226,6 +246,7 @@ def connection_status(self) -> MultiplexerStatus: async def connect(self) -> None: """Connect the multiplexer.""" + self._loop = asyncio.get_event_loop() self.logger.debug("Multiplexer connecting...") self._connection_consistency_checks() self._set_default_connection_if_none() @@ -559,6 +580,25 @@ def put(self, envelope: Envelope) -> None: """ self.out_queue.put_nowait(envelope) + def setup( + self, + connections: Collection[Connection], + default_routing: Optional[Dict[PublicId, PublicId]] = None, + default_connection: Optional[PublicId] = None, + ) -> None: + """ + Set up the multiplexer. + + :param connections: the connections to use. It will replace the other ones. + :param default_routing: the default routing. + :param default_connection: the default connection. + :return: None. + """ + self.default_routing = default_routing or {} + self._connections = [] + for c in connections: + self.add_connection(c, c.public_id == default_connection) + class Multiplexer(AsyncMultiplexer): """Transit sync multiplexer for compatibility.""" @@ -635,30 +675,11 @@ def put(self, envelope: Envelope) -> None: # type: ignore # cause overrides co """ self._thread_runner.call(super()._put(envelope)) # .result(240) - def setup( - self, - connections: Collection[Connection], - default_routing: Optional[Dict[PublicId, PublicId]] = None, - default_connection: Optional[PublicId] = None, - ) -> None: - """ - Set up the multiplexer. - - :param connections: the connections to use. It will replace the other ones. - :param default_routing: the default routing. - :param default_connection: the default connection. - :return: None. - """ - self.default_routing = default_routing or {} - self._connections = [] - for c in connections: - self.add_connection(c, c.public_id == default_connection) - class InBox: """A queue from where you can only consume envelopes.""" - def __init__(self, multiplexer: Multiplexer): + def __init__(self, multiplexer: AsyncMultiplexer): """ Initialize the inbox. @@ -745,7 +766,7 @@ async def async_wait(self) -> None: class OutBox: """A queue from where you can only enqueue envelopes.""" - def __init__(self, multiplexer: Multiplexer): + def __init__(self, multiplexer: AsyncMultiplexer): """ Initialize the outbox. diff --git a/aea/runner.py b/aea/runner.py index 4b00f4e0a4..782df4defc 100644 --- a/aea/runner.py +++ b/aea/runner.py @@ -59,7 +59,7 @@ def start(self) -> None: def stop(self) -> None: """Stop task.""" - self._agent.stop() + self._agent.runtime.stop() def create_async_task(self, loop: AbstractEventLoop) -> TaskAwaitable: """ @@ -73,7 +73,7 @@ def create_async_task(self, loop: AbstractEventLoop) -> TaskAwaitable: raise ValueError( "Agent runtime is not async compatible. Please use runtime_mode=async" ) - return loop.create_task(self._agent.runtime.run_runtime()) + return loop.create_task(self._agent.runtime.start_and_wait()) @property def id(self): diff --git a/aea/runtime.py b/aea/runtime.py index d8c81f139c..766929fb35 100644 --- a/aea/runtime.py +++ b/aea/runtime.py @@ -22,24 +22,40 @@ import asyncio import logging -from abc import ABC, abstractmethod from asyncio.events import AbstractEventLoop +from concurrent.futures._base import CancelledError from contextlib import suppress from enum import Enum from typing import Dict, Optional, Type, cast from aea.abstract_agent import AbstractAgent from aea.agent_loop import AsyncAgentLoop, AsyncState, BaseAgentLoop, SyncAgentLoop +from aea.connections.base import ConnectionStates from aea.decision_maker.base import DecisionMaker, DecisionMakerHandler -from aea.helpers.async_utils import ensure_loop +from aea.helpers.async_utils import Runnable from aea.helpers.exception_policy import ExceptionPolicyEnum -from aea.multiplexer import AsyncMultiplexer, Multiplexer +from aea.multiplexer import AsyncMultiplexer from aea.skills.tasks import TaskManager logger = logging.getLogger(__name__) +class StopRuntime(Exception): + """Exception to stop runtime.""" + + def __init__(self, reraise: Optional[Exception] = None): + """ + Init StopRuntime exception. + + :param reraise: exception to reraise. + + :return: None + """ + self.reraise = reraise + super().__init__("Stop runtime exception.") + + class RuntimeStates(Enum): """Runtime states.""" @@ -50,7 +66,7 @@ class RuntimeStates(Enum): error = "error" -class BaseRuntime(ABC): +class BaseRuntime(Runnable): """Abstract runtime class to create implementations.""" RUN_LOOPS: Dict[str, Type[BaseAgentLoop]] = { @@ -64,6 +80,7 @@ def __init__( agent: AbstractAgent, loop_mode: Optional[str] = None, loop: Optional[AbstractEventLoop] = None, + threaded=False, ) -> None: """ Init runtime. @@ -73,12 +90,12 @@ def __init__( :param loop: optional event loop. if not provided a new one will be created. :return: None """ + Runnable.__init__(self, threaded=threaded, loop=loop if not threaded else None) self._agent: AbstractAgent = agent - self._loop: AbstractEventLoop = ensure_loop(loop) self._state: AsyncState = AsyncState(RuntimeStates.stopped, RuntimeStates) self._state.add_callback(self._log_runtime_state) - self._multiplexer: Multiplexer = self._get_multiplexer_instance() + self._multiplexer: AsyncMultiplexer = self._get_multiplexer_instance() self._task_manager = TaskManager() self._decision_maker: Optional[DecisionMaker] = None @@ -107,16 +124,16 @@ def loop(self) -> AbstractEventLoop: return self._loop @property - def multiplexer(self) -> Multiplexer: + def multiplexer(self) -> AsyncMultiplexer: """Get multiplexer.""" return self._multiplexer - def _get_multiplexer_instance(self) -> Multiplexer: + def _get_multiplexer_instance(self) -> AsyncMultiplexer: """Create multiplexer instance.""" exception_policy = getattr( self._agent, "_connection_exception_policy", ExceptionPolicyEnum.propagate ) - return Multiplexer( + return AsyncMultiplexer( self._agent.connections, loop=self.loop, exception_policy=exception_policy ) @@ -134,6 +151,9 @@ def _get_main_loop_class(self, loop_mode: str) -> Type[BaseAgentLoop]: ) return self.RUN_LOOPS[loop_mode] + def _set_task(self): + self._task = self._loop.create_task(self._run_wrapper(), name=self._agent.name) + @property def decision_maker(self) -> DecisionMaker: """Return decision maker if set.""" @@ -162,29 +182,6 @@ def _log_runtime_state(self, state) -> None: """Log a runtime state changed.""" logger.debug(f"[{self._agent.name}]: Runtime state changed to {state}.") - def start(self) -> None: - """Start agent using runtime.""" - if self._state.get() is not RuntimeStates.stopped: - logger.error( - "[{}]: Runtime is not stopped. Please stop it and start after.".format( - self._agent.name - ) - ) - return - self._start() - - def stop(self) -> None: - """Stop agent and runtime.""" - if self._state.get() in (RuntimeStates.stopped, RuntimeStates.stopping): - logger.error( - "[{}]: Runtime is already stopped or stopping.".format(self._agent.name) - ) - return - - logger.debug("[{}]: Runtime stopping...".format(self._agent.name)) - self._teardown() - self._stop() - def _teardown(self) -> None: """Tear down runtime.""" logger.debug("[{}]: Runtime teardown...".format(self._agent.name)) @@ -194,16 +191,6 @@ def _teardown(self) -> None: self._agent.teardown() logger.debug("[{}]: Runtime teardown completed".format(self._agent.name)) - @abstractmethod - def _start(self) -> None: # pragma: nocover - """Implement runtime start function here.""" - raise NotImplementedError - - @abstractmethod - def _stop(self) -> None: # pragma: nocover - """Implement runtime stop function here.""" - raise NotImplementedError - @property def is_running(self) -> bool: """Get running state of the runtime.""" @@ -241,6 +228,7 @@ def __init__( agent: AbstractAgent, loop_mode: Optional[str] = None, loop: Optional[AbstractEventLoop] = None, + threaded=False, ) -> None: """ Init runtime. @@ -250,9 +238,7 @@ def __init__( :param loop: optional event loop. if not provided a new one will be created. :return: None """ - super().__init__(agent=agent, loop_mode=loop_mode, loop=loop) - self._stopping_task: Optional[asyncio.Task] = None - self._async_stop_lock: Optional[asyncio.Lock] = None + super().__init__(agent=agent, loop_mode=loop_mode, loop=loop, threaded=threaded) self._task: Optional[asyncio.Task] = None def set_loop(self, loop: AbstractEventLoop) -> None: @@ -261,165 +247,75 @@ def set_loop(self, loop: AbstractEventLoop) -> None: :param loop: event loop to use. """ - super().set_loop(loop) - self.multiplexer.set_loop(self.loop) - self.main_loop.set_loop(self.loop) - self._async_stop_lock = asyncio.Lock() - - def _start(self) -> None: - """ - Start runtime synchronously. + BaseRuntime.set_loop(self, loop) - Set event loops for multiplexer and agent run loop. + async def run(self) -> None: + """Start multiplexeor task.""" + terminal_state = RuntimeStates.error + try: + await self.run_runtime() + except StopRuntime as e: + self._state.set(RuntimeStates.stopping) + terminal_state = RuntimeStates.stopped + if e.reraise: + raise e.reraise + except (asyncio.CancelledError, CancelledError, KeyboardInterrupt): + self._state.set(RuntimeStates.stopping) + terminal_state = RuntimeStates.stopped + finally: + await self.stop_runtime() + self._state.set(terminal_state) - Start runtime asynchonously in own event loop. + async def stop_runtime(self) -> None: """ - self.set_loop(self.loop) + Stop runtime coroutine. - logger.debug(f"Start runtime event loop {self.loop}: {id(self.loop)}") - self._task = self.loop.create_task(self.run_runtime()) + Stop main loop. + Agent teardown. + Disconnect multiplexer. + """ + self.main_loop.stop() + with suppress(StopRuntime): + await self.main_loop.wait() + self._teardown() - try: - self.loop.run_until_complete(self._task) - logger.debug("Runtime loop stopped!") - except Exception: - logger.exception("Exception raised during runtime processing") - self._state.set(RuntimeStates.error) - raise - finally: - self._stopping_task = None + self.multiplexer.stop() + await self.multiplexer.wait() + logger.debug("Runtime loop stopped!") async def run_runtime(self) -> None: """Run agent and starts multiplexer.""" self._state.set(RuntimeStates.starting) - try: - await self._start_multiplexer() - await self._start_agent_loop() - except Exception: - logger.exception("AsyncRuntime exception during run:") - raise - finally: - if self._stopping_task and not self._stopping_task.done(): - await self._stopping_task - - async def _multiplexer_disconnect(self) -> None: - """Call multiplexer disconnect asynchronous way.""" - await AsyncMultiplexer.disconnect(self.multiplexer) + await asyncio.gather(self._start_multiplexer(), self._start_agent_loop()) async def _start_multiplexer(self) -> None: """Call multiplexer connect asynchronous way.""" self.setup_multiplexer() - await AsyncMultiplexer.connect(self.multiplexer) + self.multiplexer.set_loop(self._loop) + self.multiplexer.start() + await self.multiplexer.wait() async def _start_agent_loop(self) -> None: """Start agent main loop asynchronous way.""" logger.debug("[{}]: Runtime started".format(self._agent.name)) + + await self.multiplexer.connection_status.wait(ConnectionStates.connected) + self.task_manager.start() if self._decision_maker is not None: # pragma: nocover self.decision_maker.start() logger.debug("[{}]: Calling setup method...".format(self._agent.name)) self._agent.setup() - self._state.set(RuntimeStates.running) logger.debug("[{}]: Run main loop...".format(self._agent.name)) - await self.main_loop.run_loop() - - async def _stop_runtime(self) -> None: - """ - Stop runtime. - - Disconnect multiplexer. - Tear down agent. - Stop agent main loop. - """ + self.main_loop.start() + self._state.set(RuntimeStates.running) try: - if self._async_stop_lock is None: # pragma: nocover - return # even not started - - async with self._async_stop_lock: - - if self._state.get() in ( - RuntimeStates.stopped, - RuntimeStates.stopping, - ): # pragma: nocover - return - - self._state.set(RuntimeStates.stopping) - self.main_loop.stop() - - with suppress(BaseException): - await self.main_loop.wait_run_loop_stopped() - - self._teardown() - - await self._multiplexer_disconnect() - - except BaseException: # pragma: nocover - logger.exception("Runtime exception during stop:") + await self.main_loop.wait() + except asyncio.CancelledError: + self.main_loop.stop() + await self.main_loop.wait() raise - finally: - self._state.set(RuntimeStates.stopped) - logger.debug("[{}]: Runtime stopped".format(self._agent.name)) - - def _stop(self) -> None: - """ - Stop synchronously. - - This one calls async functions and does not guarantee to wait till runtime stopped. - """ - logger.debug("Stop runtime coroutine.") - if not self.loop.is_running(): # pragma: nocover - logger.debug( - "Runtime event loop is not running, start loop with `stop` coroutine" - ) - - with suppress(BaseException): - self.loop.run_until_complete(asyncio.sleep(0.01)) - - self.loop.run_until_complete(self._stop_runtime()) - return - - def set_task(): - self._stopping_task = self.loop.create_task(self._stop_runtime()) - self.loop.call_soon_threadsafe(set_task) - -class ThreadedRuntime(BaseRuntime): +class ThreadedRuntime(AsyncRuntime): """Run agent and multiplexer in different threads with own asyncio loops.""" - - def _start(self) -> None: - """Implement runtime start function here.""" - self._state.set(RuntimeStates.starting) - - self.multiplexer.set_loop(asyncio.new_event_loop()) - - self.setup_multiplexer() - self.multiplexer.connect() - self._agent.setup() - self._start_agent_loop() - - def _start_agent_loop(self) -> None: - """Start aget's main loop.""" - logger.debug("[{}]: Runtime started".format(self._agent.name)) - self.task_manager.start() - if self._decision_maker is not None: # pragma: nocover - self.decision_maker.start() - try: - self._state.set(RuntimeStates.running) - self.main_loop.start() - logger.debug("[{}]: Runtime stopped".format(self._agent.name)) - except KeyboardInterrupt: # pragma: nocover - raise - except BaseException: # pragma: nocover - logger.exception("Runtime exception during stop:") - self._state.set(RuntimeStates.error) - raise - - def _stop(self) -> None: - """Implement runtime stop function here.""" - self._state.set(RuntimeStates.stopping) - self.main_loop.stop() - self._teardown() - self.multiplexer.disconnect() - logger.debug("[{}]: Runtime stopped".format(self._agent.name)) - self._state.set(RuntimeStates.stopped) diff --git a/tests/test_aea.py b/tests/test_aea.py index 943b7e5be4..1f6f9be7dc 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -43,6 +43,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.default.serialization import DefaultSerializer from aea.registries.resources import Resources +from aea.runtime import RuntimeStates, StopRuntime from aea.skills.base import Skill, SkillContext from packages.fetchai.connections.local.connection import LocalNode @@ -137,7 +138,7 @@ def test_double_start(): with run_in_thread(agent.start, timeout=20): try: wait_for_condition(lambda: agent.is_running, timeout=20) - + print(111, "started!") t = Thread(target=agent.start) t.start() time.sleep(1) @@ -530,11 +531,9 @@ def test_error_handler_is_not_set(): message=msg, ) - with patch.object(agent, "stop") as mocked_stop: + with pytest.raises(StopRuntime): agent.handle_envelope(envelope) - mocked_stop.assert_called() - def test_no_handlers_registered(): """Test no handlers are registered for message processing.""" @@ -562,11 +561,15 @@ def test_no_handlers_registered(): protocol_id=DefaultMessage.protocol_id, message=msg, ) - with patch.object(aea.filter, "get_active_handlers", return_value=[]): + with patch.object( + aea.filter, "get_active_handlers", return_value=[] + ), patch.object( + aea.runtime.multiplexer, "put", + ): aea.handle_envelope(envelope) - mock_logger.assert_any_call( - f"Cannot handle envelope: no active handler registered for the protocol_id='{DefaultMessage.protocol_id}'." - ) + mock_logger.assert_any_call( + f"Cannot handle envelope: no active handler registered for the protocol_id='{DefaultMessage.protocol_id}'." + ) class TestContextNamespace: @@ -721,7 +724,6 @@ def test_handle_just_log(self) -> None: with patch.object(self.aea._logger, "exception") as patched: t = Thread(target=self.aea.start) t.start() - self.aea_tool.put_inbox(self.aea_tool.dummy_envelope()) self.aea_tool.put_inbox(self.aea_tool.dummy_envelope()) time.sleep(1) @@ -736,14 +738,17 @@ def test_act_propagate(self) -> None: with pytest.raises(ExpectedExcepton): self.aea.start() - assert not self.aea.is_running + assert self.aea.runtime.state == RuntimeStates.error def test_act_stop_and_exit(self) -> None: """Test stop and exit policy on behaviour act.""" self.aea._skills_exception_policy = ExceptionPolicyEnum.stop_and_exit self.behaviour.act = self.raise_exception # type: ignore # cause error: Cannot assign to a method - self.aea.start() + with pytest.raises( + AEAException, match=r"AEA was terminated cause exception .*" + ): + self.aea.start() assert not self.aea.is_running @@ -772,7 +777,6 @@ def test_act_bad_policy(self) -> None: def teardown(self) -> None: """Stop AEA if not stopped.""" - self.aea.teardown() self.aea.stop() diff --git a/tests/test_agent.py b/tests/test_agent.py index b0de015614..010896682b 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -81,16 +81,14 @@ def test_run_agent(): assert agent.state == RuntimeStates.stopped agent_thread.start() try: - wait_for_condition( - lambda: agent.state == RuntimeStates.starting, - timeout=10, - error_msg="Agent state must be 'starting'", - ) wait_for_condition( lambda: agent.state == RuntimeStates.running, timeout=10, error_msg="Agent state must be 'running'", ) + print(33333) + except Exception as e: + print(111111111111111111111111, e) finally: agent.stop() assert agent.state == RuntimeStates.stopped diff --git a/tests/test_agent_loop.py b/tests/test_agent_loop.py index 77f81453b2..cf3ad24fc6 100644 --- a/tests/test_agent_loop.py +++ b/tests/test_agent_loop.py @@ -26,7 +26,7 @@ import pytest from aea.aea import AEA -from aea.agent_loop import AsyncAgentLoop, BaseAgentLoop, SyncAgentLoop +from aea.agent_loop import AgentLoopStates, AsyncAgentLoop, BaseAgentLoop, SyncAgentLoop from aea.helpers.async_friendly_queue import AsyncFriendlyQueue from aea.helpers.exception_policy import ExceptionPolicyEnum from aea.mail.base import Envelope @@ -36,7 +36,7 @@ from aea.skills.base import Behaviour, Handler, SkillContext from aea.skills.behaviours import TickerBehaviour -from tests.common.utils import run_in_thread, wait_for_condition +from tests.common.utils import wait_for_condition class CountHandler(Handler): @@ -200,23 +200,27 @@ class TestAsyncAgentLoop: def test_loop_start_stop(self): """Test loop start and stopped properly.""" - agent_loop = self.AGENT_LOOP_CLASS(self.FAKE_AGENT_CLASS()) - with run_in_thread(agent_loop.start): - wait_for_condition(lambda: agent_loop.is_running, timeout=10) - agent_loop.stop() + agent_loop = self.AGENT_LOOP_CLASS(self.FAKE_AGENT_CLASS(), threaded=True) + + agent_loop.start() + wait_for_condition(lambda: agent_loop.is_running, timeout=10) + agent_loop.stop() + agent_loop.wait(sync=True) + assert not agent_loop.is_running, agent_loop.state def test_handle_envelope(self): """Test one envelope handling.""" handler = CountHandler.make() agent = self.FAKE_AGENT_CLASS(handlers=[handler]) - agent_loop = self.AGENT_LOOP_CLASS(agent) + agent_loop = self.AGENT_LOOP_CLASS(agent, threaded=True) handler.setup() - with run_in_thread(agent_loop.start, timeout=10): - wait_for_condition(lambda: agent_loop.is_running, timeout=10) - agent.put_inbox("msg") - wait_for_condition(lambda: handler.counter == 1, timeout=2) - agent_loop.stop() + agent_loop.start() + wait_for_condition(lambda: agent_loop.is_running, timeout=10) + agent.put_inbox("msg") + wait_for_condition(lambda: handler.counter == 1, timeout=2) + agent_loop.stop() + agent_loop.wait(sync=True) def test_behaviour_act(self): """Test behaviour act called by schedule.""" @@ -225,44 +229,43 @@ def test_behaviour_act(self): behaviour = CountBehaviour.make(tick_interval=tick_interval) behaviour.setup() agent = self.FAKE_AGENT_CLASS(behaviours=[behaviour]) - agent_loop = self.AGENT_LOOP_CLASS(agent) + agent_loop = self.AGENT_LOOP_CLASS(agent, threaded=True) - with run_in_thread(agent_loop.start, timeout=5): - wait_for_condition(lambda: agent_loop.is_running, timeout=10) + agent_loop.start() + wait_for_condition(lambda: agent_loop.is_running, timeout=10) - # test behaviour called - wait_for_condition( - lambda: behaviour.counter >= 1, timeout=tick_interval * 2 - ) - - agent_loop.stop() + wait_for_condition(lambda: behaviour.counter >= 1, timeout=tick_interval * 2) + agent_loop.stop() + agent_loop.wait(sync=True) def test_internal_messages(self): """Test internal meesages are processed.""" agent = self.FAKE_AGENT_CLASS() - agent_loop = self.AGENT_LOOP_CLASS(agent) + agent_loop = self.AGENT_LOOP_CLASS(agent, threaded=True) - with run_in_thread(agent_loop.start, timeout=5): - wait_for_condition(lambda: agent_loop.is_running, timeout=10) - agent.put_internal_message("msg") - wait_for_condition( - lambda: agent.filter.handle_internal_message.called is True, timeout=5, - ) - agent_loop.stop() + agent_loop.start() + wait_for_condition(lambda: agent_loop.is_running, timeout=10) + agent.put_internal_message("msg") + wait_for_condition( + lambda: agent.filter.handle_internal_message.called is True, timeout=5, + ) + agent_loop.stop() + agent_loop.wait(sync=True) def test_new_behaviours(self): """Test new behaviours are added.""" agent = self.FAKE_AGENT_CLASS() - agent_loop = self.AGENT_LOOP_CLASS(agent) + agent_loop = self.AGENT_LOOP_CLASS(agent, threaded=True) agent_loop.NEW_BEHAVIOURS_PROCESS_SLEEP = 0.5 - with run_in_thread(agent_loop.start, timeout=5): - wait_for_condition(lambda: agent_loop.is_running, timeout=10) - wait_for_condition( - lambda: agent.filter.handle_new_handlers_and_behaviours.call_count >= 2, - timeout=agent_loop.NEW_BEHAVIOURS_PROCESS_SLEEP * 3, - ) - agent_loop.stop() + agent_loop.start() + wait_for_condition(lambda: agent_loop.is_running, timeout=10) + wait_for_condition( + lambda: agent.filter.handle_new_handlers_and_behaviours.call_count >= 2, + timeout=agent_loop.NEW_BEHAVIOURS_PROCESS_SLEEP * 3, + ) + agent_loop.stop() + agent_loop.wait(sync=True) @pytest.mark.asyncio async def test_behaviour_exception(self): @@ -270,25 +273,26 @@ async def test_behaviour_exception(self): tick_interval = 0.1 behaviour = FailBehaviour.make(tick_interval) agent = self.FAKE_AGENT_CLASS(behaviours=[behaviour]) - loop = asyncio.get_event_loop() - agent_loop = self.AGENT_LOOP_CLASS(agent) - agent_loop.set_loop(loop) - loop_task = loop.create_task(agent_loop.run_loop()) - await asyncio.sleep(tick_interval * 2) + agent_loop = self.AGENT_LOOP_CLASS(agent, threaded=True) + agent._skills_exception_policy = ExceptionPolicyEnum.propagate with pytest.raises(ValueError, match="expected!"): - await loop_task + agent_loop.start() + agent_loop.wait(sync=True) - def test_stop(self): + @pytest.mark.asyncio + async def test_stop(self): """Test loop stoped.""" agent = self.FAKE_AGENT_CLASS() - loop = asyncio.get_event_loop() agent_loop = self.AGENT_LOOP_CLASS(agent) - agent_loop.set_loop(loop) - loop_task = loop.create_task(agent_loop.run_loop()) + agent_loop.start() + await asyncio.wait_for( + agent_loop._state.wait(AgentLoopStates.started), timeout=10 + ) agent_loop.stop() - loop.run_until_complete(asyncio.sleep(0.1)) - assert loop_task.done() + await asyncio.wait_for( + agent_loop._state.wait(AgentLoopStates.stopped), timeout=10 + ) class TestSyncAgentLoop: diff --git a/tests/test_helpers/test_async_utils.py b/tests/test_helpers/test_async_utils.py index 6c008a29fd..c106cb595c 100644 --- a/tests/test_helpers/test_async_utils.py +++ b/tests/test_helpers/test_async_utils.py @@ -20,6 +20,7 @@ import asyncio from concurrent.futures._base import CancelledError from contextlib import suppress +from threading import Thread import pytest @@ -28,9 +29,9 @@ AwaitableProc, HandlerItemGetter, PeriodicCaller, + Runnable, ThreadedAsyncRunner, ensure_list, - ensure_loop, ) @@ -167,16 +168,6 @@ def callback(): periodic_caller.stop() -@pytest.mark.asyncio -async def test_ensure_loop(): - """Test ensure_loop.""" - loop = asyncio.new_event_loop() - assert ensure_loop(loop) == loop - - loop = asyncio.get_event_loop() - assert ensure_loop(loop) != loop - - @pytest.mark.asyncio async def test_threaded_async_run(): """Test threaded async runner.""" @@ -254,3 +245,143 @@ def test_libp2pconnection_awaitable_proc_cancelled(): proc = AwaitableProc(["sleep", "100"], shell=False) proc_task = asyncio.ensure_future(proc.start()) proc_task.cancel() + + +class RunAndExit(Runnable): + """Test class.""" + + async def run(self): + """Test method.""" + await asyncio.sleep(0.2) + + +class TestRunnable: + """Tests for Runnable object.""" + + def test_no_loop_and_threded(self): + """Test runnable fails on threaded mode and loop provided..""" + with pytest.raises(ValueError,): + RunAndExit(loop=asyncio.get_event_loop(), threaded=True) + + @pytest.mark.asyncio + async def test_runnable_async(self): + """Test runnable async methods.""" + + class TestRun(Runnable): + async def run(self): + while True: + await asyncio.sleep(1) + + run = TestRun() + run.start() + run.stop() + await run.wait() + + run = TestRun(threaded=True) + run.start() + run.stop() + run.wait(sync=True) + + run = RunAndExit() + await run.start_and_wait() + + def test_runnable_sync(self): + """Test runnable sync methods.""" + run = RunAndExit() + run.start_and_wait(sync=True) + + @pytest.mark.asyncio + async def test_double_start(self): + """Test runnable async methods.""" + + class TestRun(Runnable): + async def run(self): + while True: + await asyncio.sleep(1) + + run = TestRun() + await run.wait() + assert run.start() + assert not run.start() + run.stop() + await run.wait() + await run.wait() + + @pytest.mark.asyncio + async def test_run_in_thread(self): + """Test runnable async methods.""" + + class TestRun(Runnable): + async def run(self): + while True: + await asyncio.sleep(1) + + run = TestRun() + t = Thread(target=run.start) + t.start() + run.stop() + t.join() + + @pytest.mark.asyncio + async def test_timeout(self): + """Test runnable async methods.""" + + class TestRun(Runnable): + async def run(self): + while True: + await asyncio.sleep(1) + + run = TestRun(threaded=True) + run.start() + with pytest.raises(asyncio.TimeoutError): + run.wait(sync=True, timeout=0.1) + + run.stop() + run.wait(sync=True) + + run = TestRun() + run.start() + with pytest.raises(asyncio.TimeoutError): + await run.wait(timeout=0.1) + run.stop() + await run.wait() + + @pytest.mark.asyncio + async def test_exception(self): + """Test runnable async methods.""" + + class TestRun(Runnable): + async def run(self): + raise Exception("awaited") + + run = TestRun(threaded=True) + run.start() + with pytest.raises(Exception, match="awaited"): + run.wait(sync=True, timeout=0.1) + + run.stop() + run.wait(sync=True) + + run = TestRun() + run.start() + with pytest.raises(Exception, match="awaited"): + await run.wait(timeout=0.1) + + run.stop() + await run.wait() + + @pytest.mark.asyncio + async def test_wait_async_threaded(self): + """Test runnable async methods.""" + + class TestRun(Runnable): + async def run(self): + raise Exception("awaited") + + run = TestRun(threaded=True) + run.start() + with pytest.raises(Exception, match="awaited"): + await run.wait(timeout=0.2) + + run.stop() + await run.wait() diff --git a/tests/test_launcher.py b/tests/test_launcher.py index 2ea05053ff..b6ee6083b5 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -132,7 +132,6 @@ def test_one_fails(self) -> None: with pytest.raises(Exception, match="Expected exception!"): runner.start() - time.sleep(1) finally: runner.stop() diff --git a/tests/test_runtime.py b/tests/test_runtime.py index 05cc970e66..1a4608e9a3 100644 --- a/tests/test_runtime.py +++ b/tests/test_runtime.py @@ -28,7 +28,8 @@ from aea.configurations.constants import DEFAULT_LEDGER, DEFAULT_PRIVATE_KEY_FILE from aea.runtime import AsyncRuntime, BaseRuntime, RuntimeStates, ThreadedRuntime -from tests.common.utils import run_in_thread, wait_for_condition +from tests.common.utils import wait_for_condition + from tests.conftest import CUR_PATH @@ -46,33 +47,36 @@ def setup(self): builder.add_private_key(DEFAULT_LEDGER, private_key_path) builder.add_skill(Path(CUR_PATH, "data", "dummy_skill")) self.agent = builder.build() - self.runtime = self.RUNTIME(self.agent) + self.runtime = self.RUNTIME(self.agent, threaded=True) + + def teardown(self): + self.runtime.stop() + self.runtime.wait(sync=True) def test_start_stop(self): """Test runtime tart/stop.""" - with run_in_thread(self.runtime.start, timeout=20): - wait_for_condition(lambda: self.runtime.is_running, timeout=20) - self.runtime.stop() - wait_for_condition(lambda: not self.runtime.is_running, timeout=20) + self.runtime.start() + wait_for_condition(lambda: self.runtime.is_running, timeout=20) + self.runtime.stop() + self.runtime.wait(sync=True) def test_double_start(self): """Test runtime double start do nothing.""" - with patch.object(self.runtime, "_start", side_effect=ValueError("oops")): - with pytest.raises(ValueError, match="oops"): - self.runtime.start() - - self.runtime._state.set(RuntimeStates.running) - self.runtime.start() + assert self.runtime.start() + assert not self.runtime.start() + wait_for_condition(lambda: self.runtime.is_running, timeout=20) def test_double_stop(self): """Test runtime double stop do nothing.""" - with patch.object(self.runtime, "_stop", side_effect=ValueError("oops")): - self.runtime._state.set(RuntimeStates.running) - with pytest.raises(ValueError, match="oops"): - self.runtime.stop() + self.runtime.start() + wait_for_condition(lambda: self.runtime.is_running, timeout=20) + self.runtime.stop() + self.runtime.wait(sync=True) + assert self.runtime.is_stopped - self.runtime._state.set(RuntimeStates.stopped) - self.runtime.stop() + self.runtime.stop() + self.runtime.wait(sync=True) + assert self.runtime.is_stopped def test_error_state(self): """Test runtime fails on start.""" @@ -80,9 +84,9 @@ def test_error_state(self): self.runtime, "_start_agent_loop", side_effect=ValueError("oops") ): with pytest.raises(ValueError, match="oops"): - self.runtime.start() + self.runtime.start_and_wait(sync=True) - assert self.runtime.state == RuntimeStates.error + assert self.runtime.state == RuntimeStates.error, self.runtime.state class TestThreadedRuntime(TestAsyncRuntime): @@ -96,8 +100,6 @@ def test_error_state(self): self.runtime.main_loop, "start", side_effect=ValueError("oops") ): with pytest.raises(ValueError, match="oops"): - self.runtime.start() - - assert self.runtime.state == RuntimeStates.error + self.runtime.start_and_wait(sync=True) - self.runtime._stop() + assert self.runtime.state == RuntimeStates.error, self.runtime.state diff --git a/tests/test_skills/test_error.py b/tests/test_skills/test_error.py index 926951face..70a1e7a358 100644 --- a/tests/test_skills/test_error.py +++ b/tests/test_skills/test_error.py @@ -188,6 +188,7 @@ def test_error_unsupported_skill(self): msg = envelope.message assert msg.performative == DefaultMessage.Performative.ERROR assert msg.error_code == DefaultMessage.ErrorCode.UNSUPPORTED_SKILL + print("\n1111111, STOP in TEST\n", flush=True) def test_error_unsupported_skill_when_skill_id_is_none(self): """Test the 'send_unsupported_skill' when the skill id in the envelope is None.""" From 699561453f001474e68a760f3c9c0e2e4eca2d8a Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Thu, 10 Sep 2020 17:52:44 +0300 Subject: [PATCH 083/131] threaded runtime. fixes. asyncio fix for stub conection --- aea/agent.py | 10 ++- aea/agent_loop.py | 20 ++++-- aea/cli/launch.py | 1 - aea/helpers/async_utils.py | 96 +++++++++++++++++--------- aea/launcher.py | 14 +++- aea/multiplexer.py | 11 ++- aea/runner.py | 2 +- aea/runtime.py | 14 ++-- tests/test_aea.py | 5 +- tests/test_agent.py | 3 - tests/test_agent_loop.py | 12 ++-- tests/test_helpers/test_async_utils.py | 50 ++++++++------ tests/test_runtime.py | 13 ++-- tests/test_skills/test_error.py | 1 - 14 files changed, 156 insertions(+), 96 deletions(-) diff --git a/aea/agent.py b/aea/agent.py index 70cd8fdc47..6246e45451 100644 --- a/aea/agent.py +++ b/aea/agent.py @@ -191,8 +191,12 @@ def start(self) -> None: :return: None """ - if self.runtime.start(): - self.runtime.wait(sync=True) + was_started = self.runtime.start() + + if was_started: + self.runtime.wait_completed(sync=True) + else: + raise ValueError("Failed to start runtime! Ws it already started?") def stop(self) -> None: """ @@ -207,7 +211,7 @@ def stop(self) -> None: :return: None """ self.runtime.stop() - self.runtime.wait(sync=True) + self.runtime.wait_completed(sync=True) @property def state(self) -> RuntimeStates: diff --git a/aea/agent_loop.py b/aea/agent_loop.py index 40196f37a6..dd02d1eca3 100644 --- a/aea/agent_loop.py +++ b/aea/agent_loop.py @@ -55,6 +55,7 @@ class AgentLoopStates(Enum): initial = None started = "started" + starting = "starting" stopped = "stopped" stopping = "stopping" error = "error" @@ -104,6 +105,7 @@ def teardown(self): # pylint: disable=no-self-use async def run(self) -> None: """Run agent loop.""" self.logger.debug("agent loop started") + self._state.set(AgentLoopStates.starting) self.setup() self._set_tasks() try: @@ -111,13 +113,17 @@ async def run(self) -> None: except (CancelledError, KeyboardInterrupt): pass finally: - self.teardown() - self._stop_tasks() - for t in self._tasks: - with suppress(BaseException): - await t - self._state.set(AgentLoopStates.stopped) - logger.debug("agent loop stopped") + await self._stop() + + async def _stop(self) -> None: + """Stop and cleanup.""" + self.teardown() + self._stop_tasks() + for t in self._tasks: + with suppress(BaseException): + await t + self._state.set(AgentLoopStates.stopped) + logger.debug("agent loop stopped") async def _gather_tasks(self) -> None: """Wait till first task exception.""" diff --git a/aea/cli/launch.py b/aea/cli/launch.py index a35458d39b..dba5695ba7 100644 --- a/aea/cli/launch.py +++ b/aea/cli/launch.py @@ -115,7 +115,6 @@ def _launch_threads(agents: List[Path]) -> int: for agent_directory in agents: with cd(agent_directory): aeas.append(AEABuilder.from_aea_project(".").build()) - runner = AEARunner( agents=aeas, mode="threaded", fail_policy=ExecutorExceptionPolicies.log_only ) diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 64155f510b..7ca18a6b7f 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -373,7 +373,7 @@ def __init__(self, *args, **kwargs): self.future = None async def start(self): - """Start the subprocess""" + """Start the subprocess.""" self.proc = subprocess.Popen(*self.args, **self.kwargs) # nosec self.loop = asyncio.get_event_loop() self.future = asyncio.futures.Future() @@ -388,6 +388,7 @@ async def start(self): self._thread.join() def _in_thread(self): + """Run in dedicated thread.""" self.proc.wait() self.loop.call_soon_threadsafe(self.future.set_result, self.proc.returncode) @@ -485,6 +486,8 @@ def __init__(self, loop=None, threaded=False) -> None: self._thread: Optional[Thread] = None self._completed_event: Optional[asyncio.Event] = None self._got_result = False + self._was_cancelled = False + self._is_running: bool = False def start(self) -> bool: """ @@ -495,10 +498,11 @@ def start(self) -> bool: if self._task and not self._task.done(): logger.debug("already running") return False - + self._is_running = False self._got_result = False self._set_loop() self._completed_event = asyncio.Event(loop=self._loop) + self._was_cancelled = False self._set_task() if self._threaded: @@ -528,21 +532,27 @@ async def _run_wrapper(self) -> None: """Wrap run() method.""" if not self._completed_event: raise ValueError("Start was not called!") + try: with suppress(asyncio.CancelledError): return await self.run() finally: self._loop.call_soon_threadsafe(self._completed_event.set) + @property + def is_running(self) -> bool: + """Get running state.""" + return self._is_running + @abstractmethod async def run(self) -> Any: """Implement run logic respectfull to CancelError on termination.""" - def wait( + def wait_completed( self, sync: bool = False, timeout: float = None, force_result: bool = False ) -> Awaitable: """ - Wait task to complete. + Wait runnable execution completed. :param sync: bool. blocking wait :param timeout: float seconds @@ -559,44 +569,53 @@ def wait( return ready_future if self._task.done(): - return ready_future - - coro = self._wait() - if timeout is not None: - coro = asyncio.wait_for(self._wait(), timeout=timeout) # type: ignore + self._got_result = True + return self._task if sync: - if self._loop.is_running(): - start_time = time.time() - while not self._task.done(): - time.sleep(0.01) - if timeout is not None and time.time() - start_time > timeout: - raise asyncio.TimeoutError() - self._got_result = True - if self._task.exception(): - raise self._task.exception() - else: - self._loop.run_until_complete(coro) + self._wait_sync(timeout) return ready_future - if self._threaded: - loop = asyncio.get_event_loop() - fut = loop.create_future() + if not self._threaded: + return asyncio.wait_for(self._wait(), timeout=timeout) + + # for threaded mode create a future and bind it to task + loop = asyncio.get_event_loop() + fut = loop.create_future() - def done(task): + def done(task): + try: if fut.done(): # pragma: nocover return if task.exception(): fut.set_exception(task.exception()) else: # pragma: nocover fut.set_result(None) + finally: + self._got_result = True - self._task.add_done_callback( - lambda task: loop.call_soon_threadsafe(lambda: done(task)) - ) - return fut + self._task.add_done_callback( + lambda task: loop.call_soon_threadsafe(lambda: done(task)) + ) + return fut - return coro + def _wait_sync(self, timeout: Optional[float] = None) -> None: + """Wait task completed in sync manner.""" + if self._task is None: + raise ValueError("task is not set!") + if self._loop.is_running(): + start_time = time.time() + while not self._task.done(): + time.sleep(0.01) + if timeout is not None and time.time() - start_time > timeout: + raise asyncio.TimeoutError() + self._got_result = True + if self._task.exception(): + raise self._task.exception() + else: + self._loop.run_until_complete( + asyncio.wait_for(self._wait(), timeout=timeout) + ) async def _wait(self) -> None: """Wait internal method.""" @@ -610,7 +629,7 @@ async def _wait(self) -> None: finally: self._got_result = True - def stop(self) -> None: + def stop(self, force: bool = False) -> None: """Stop runnable.""" logger.debug(f"{self} is going to be stopped {self._task}") if not self._task: @@ -619,9 +638,20 @@ def stop(self) -> None: if self._task.done(): logger.debug("already completed") return - self._loop.call_soon_threadsafe(self._task.cancel) + self._loop.call_soon_threadsafe(self._task_cancel, force) + + def _task_cancel(self, force: bool = False) -> None: + """Cancel task internal method.""" + if self._task is None: + return + + if self._was_cancelled and not force: + return + + self._was_cancelled = True + self._task.cancel() - def start_and_wait(self, sync=False): + def start_and_wait_completed(self, *args, **kwargs) -> Awaitable: """Alias for start and wait methods.""" self.start() - return self.wait(sync=sync) + return self.wait_completed(*args, **kwargs) diff --git a/aea/launcher.py b/aea/launcher.py index f093e96d76..cc6eaf0903 100644 --- a/aea/launcher.py +++ b/aea/launcher.py @@ -89,8 +89,10 @@ def _run_agent( _set_logger(log_level=log_level) agent = load_agent(agent_dir) + on_stop = False def stop_event_thread(): + nonlocal on_stop try: stop_event.wait() except (KeyboardInterrupt, EOFError, BrokenPipeError) as e: # pragma: nocover @@ -98,7 +100,10 @@ def stop_event_thread(): f"Exception raised in stop_event_thread {e} {type(e)}. Skip it, looks process is closed." ) finally: - agent.stop() + if not on_stop: + logger.debug("_run_agent: stop event raised. call agent.stop") + on_stop = True + agent.stop() Thread(target=stop_event_thread, daemon=True).start() try: @@ -111,7 +116,10 @@ def stop_event_thread(): exc.__traceback__ = e.__traceback__ raise exc finally: - agent.stop() + if not on_stop: + logger.debug("_run_agent: call agent.stop") + on_stop = True + agent.stop() class AEADirTask(AbstractExecutorTask): @@ -144,7 +152,7 @@ def create_async_task(self, loop: AbstractEventLoop) -> TaskAwaitable: raise ValueError( "Agent runtime is not async compatible. Please use runtime_mode=async" ) - return loop.create_task(self._agent.runtime.start_and_wait()) + return loop.create_task(self._agent.runtime.start_and_wait_completed()) @property def id(self) -> Union[PathLike, str]: diff --git a/aea/multiplexer.py b/aea/multiplexer.py index bc58fac40a..ec4896ba0a 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -251,6 +251,7 @@ async def connect(self) -> None: self._connection_consistency_checks() self._set_default_connection_if_none() self._out_queue = asyncio.Queue() + async with self._lock: if self.connection_status.is_connected: self.logger.debug("Multiplexer already connected.") @@ -377,9 +378,9 @@ async def _disconnect_all(self) -> None: self.logger.debug("Tear the multiplexer connections down.") for connection_id, connection in self._id_to_connection.items(): try: - await self._disconnect_one(connection_id) + await asyncio.wait_for(self._disconnect_one(connection_id), timeout=5) except Exception as e: # pylint: disable=broad-except - self.logger.error( + self.logger.exception( "Error while disconnecting {}: {}".format( str(type(connection)), str(e) ) @@ -423,6 +424,7 @@ async def _send_loop(self) -> None: "Received empty envelope. Quitting the sending loop..." ) return None + self.logger.debug("Sending envelope {}".format(str(envelope))) await self._send(envelope) except asyncio.CancelledError: @@ -578,7 +580,10 @@ def put(self, envelope: Envelope) -> None: :param envelope: the envelope to be sent. :return: None """ - self.out_queue.put_nowait(envelope) + if self._threaded: + self._loop.call_soon_threadsafe(self.out_queue.put_nowait, envelope) + else: + self.out_queue.put_nowait(envelope) def setup( self, diff --git a/aea/runner.py b/aea/runner.py index 782df4defc..5c6791925b 100644 --- a/aea/runner.py +++ b/aea/runner.py @@ -73,7 +73,7 @@ def create_async_task(self, loop: AbstractEventLoop) -> TaskAwaitable: raise ValueError( "Agent runtime is not async compatible. Please use runtime_mode=async" ) - return loop.create_task(self._agent.runtime.start_and_wait()) + return loop.create_task(self._agent.runtime.start_and_wait_completed()) @property def id(self): diff --git a/aea/runtime.py b/aea/runtime.py index 766929fb35..ea906653f7 100644 --- a/aea/runtime.py +++ b/aea/runtime.py @@ -276,11 +276,11 @@ async def stop_runtime(self) -> None: """ self.main_loop.stop() with suppress(StopRuntime): - await self.main_loop.wait() + await self.main_loop.wait_completed() self._teardown() self.multiplexer.stop() - await self.multiplexer.wait() + await self.multiplexer.wait_completed() logger.debug("Runtime loop stopped!") async def run_runtime(self) -> None: @@ -293,7 +293,7 @@ async def _start_multiplexer(self) -> None: self.setup_multiplexer() self.multiplexer.set_loop(self._loop) self.multiplexer.start() - await self.multiplexer.wait() + await self.multiplexer.wait_completed() async def _start_agent_loop(self) -> None: """Start agent main loop asynchronous way.""" @@ -310,12 +310,16 @@ async def _start_agent_loop(self) -> None: self.main_loop.start() self._state.set(RuntimeStates.running) try: - await self.main_loop.wait() + await self.main_loop.wait_completed() except asyncio.CancelledError: self.main_loop.stop() - await self.main_loop.wait() + await self.main_loop.wait_completed() raise class ThreadedRuntime(AsyncRuntime): """Run agent and multiplexer in different threads with own asyncio loops.""" + + def _get_multiplexer_instance(self) -> AsyncMultiplexer: + """Create multiplexer instance.""" + return AsyncMultiplexer(self._agent.connections, threaded=True) diff --git a/tests/test_aea.py b/tests/test_aea.py index 1f6f9be7dc..a4108c8c3e 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -138,7 +138,6 @@ def test_double_start(): with run_in_thread(agent.start, timeout=20): try: wait_for_condition(lambda: agent.is_running, timeout=20) - print(111, "started!") t = Thread(target=agent.start) t.start() time.sleep(1) @@ -185,13 +184,17 @@ def test_react(): with run_in_thread(agent.start, timeout=20, on_exit=agent.stop): wait_for_condition(lambda: agent.is_running, timeout=20) + time.sleep(1) agent.outbox.put(envelope) + print("111 msg put", flush=True) default_protocol_public_id = DefaultMessage.protocol_id dummy_skill_public_id = DUMMY_SKILL_PUBLIC_ID handler = agent.resources.get_handler( default_protocol_public_id, dummy_skill_public_id ) + assert handler is not None, "Handler is not set." + wait_for_condition( lambda: len(handler.handled_messages) > 0, timeout=20, diff --git a/tests/test_agent.py b/tests/test_agent.py index 010896682b..93d6bcb58f 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -86,9 +86,6 @@ def test_run_agent(): timeout=10, error_msg="Agent state must be 'running'", ) - print(33333) - except Exception as e: - print(111111111111111111111111, e) finally: agent.stop() assert agent.state == RuntimeStates.stopped diff --git a/tests/test_agent_loop.py b/tests/test_agent_loop.py index cf3ad24fc6..641f6537d4 100644 --- a/tests/test_agent_loop.py +++ b/tests/test_agent_loop.py @@ -205,7 +205,7 @@ def test_loop_start_stop(self): agent_loop.start() wait_for_condition(lambda: agent_loop.is_running, timeout=10) agent_loop.stop() - agent_loop.wait(sync=True) + agent_loop.wait_completed(sync=True) assert not agent_loop.is_running, agent_loop.state def test_handle_envelope(self): @@ -220,7 +220,7 @@ def test_handle_envelope(self): agent.put_inbox("msg") wait_for_condition(lambda: handler.counter == 1, timeout=2) agent_loop.stop() - agent_loop.wait(sync=True) + agent_loop.wait_completed(sync=True) def test_behaviour_act(self): """Test behaviour act called by schedule.""" @@ -236,7 +236,7 @@ def test_behaviour_act(self): wait_for_condition(lambda: behaviour.counter >= 1, timeout=tick_interval * 2) agent_loop.stop() - agent_loop.wait(sync=True) + agent_loop.wait_completed(sync=True) def test_internal_messages(self): """Test internal meesages are processed.""" @@ -250,7 +250,7 @@ def test_internal_messages(self): lambda: agent.filter.handle_internal_message.called is True, timeout=5, ) agent_loop.stop() - agent_loop.wait(sync=True) + agent_loop.wait_completed(sync=True) def test_new_behaviours(self): """Test new behaviours are added.""" @@ -265,7 +265,7 @@ def test_new_behaviours(self): timeout=agent_loop.NEW_BEHAVIOURS_PROCESS_SLEEP * 3, ) agent_loop.stop() - agent_loop.wait(sync=True) + agent_loop.wait_completed(sync=True) @pytest.mark.asyncio async def test_behaviour_exception(self): @@ -278,7 +278,7 @@ async def test_behaviour_exception(self): agent._skills_exception_policy = ExceptionPolicyEnum.propagate with pytest.raises(ValueError, match="expected!"): agent_loop.start() - agent_loop.wait(sync=True) + agent_loop.wait_completed(sync=True) @pytest.mark.asyncio async def test_stop(self): diff --git a/tests/test_helpers/test_async_utils.py b/tests/test_helpers/test_async_utils.py index c106cb595c..aba1ad6361 100644 --- a/tests/test_helpers/test_async_utils.py +++ b/tests/test_helpers/test_async_utils.py @@ -266,7 +266,7 @@ def test_no_loop_and_threded(self): @pytest.mark.asyncio async def test_runnable_async(self): """Test runnable async methods.""" - + # for pydocstyle class TestRun(Runnable): async def run(self): while True: @@ -275,42 +275,42 @@ async def run(self): run = TestRun() run.start() run.stop() - await run.wait() + await run.wait_completed() run = TestRun(threaded=True) run.start() run.stop() - run.wait(sync=True) + run.wait_completed(sync=True) run = RunAndExit() - await run.start_and_wait() + await run.start_and_wait_completed() def test_runnable_sync(self): """Test runnable sync methods.""" run = RunAndExit() - run.start_and_wait(sync=True) + run.start_and_wait_completed(sync=True) @pytest.mark.asyncio async def test_double_start(self): """Test runnable async methods.""" - + # for pydocstyle class TestRun(Runnable): async def run(self): while True: await asyncio.sleep(1) run = TestRun() - await run.wait() + await run.wait_completed() assert run.start() assert not run.start() run.stop() - await run.wait() - await run.wait() + await run.wait_completed() + await run.wait_completed() @pytest.mark.asyncio async def test_run_in_thread(self): """Test runnable async methods.""" - + # for pydocstyle class TestRun(Runnable): async def run(self): while True: @@ -325,7 +325,7 @@ async def run(self): @pytest.mark.asyncio async def test_timeout(self): """Test runnable async methods.""" - + # for pydocstyle class TestRun(Runnable): async def run(self): while True: @@ -333,23 +333,24 @@ async def run(self): run = TestRun(threaded=True) run.start() + await asyncio.sleep(0.5) with pytest.raises(asyncio.TimeoutError): - run.wait(sync=True, timeout=0.1) + run.wait_completed(sync=True, timeout=1) run.stop() - run.wait(sync=True) + run.wait_completed(sync=True) run = TestRun() run.start() with pytest.raises(asyncio.TimeoutError): - await run.wait(timeout=0.1) + await run.wait_completed(timeout=1) run.stop() - await run.wait() + await run.wait_completed() @pytest.mark.asyncio async def test_exception(self): """Test runnable async methods.""" - + # for pydocstyle class TestRun(Runnable): async def run(self): raise Exception("awaited") @@ -357,31 +358,34 @@ async def run(self): run = TestRun(threaded=True) run.start() with pytest.raises(Exception, match="awaited"): - run.wait(sync=True, timeout=0.1) + run.wait_completed(sync=True, timeout=1) run.stop() - run.wait(sync=True) + run.wait_completed(sync=True) run = TestRun() run.start() with pytest.raises(Exception, match="awaited"): - await run.wait(timeout=0.1) + await run.wait_completed(timeout=1) run.stop() - await run.wait() + await run.wait_completed() @pytest.mark.asyncio async def test_wait_async_threaded(self): """Test runnable async methods.""" - + # for pydocstyle class TestRun(Runnable): async def run(self): raise Exception("awaited") run = TestRun(threaded=True) run.start() + await asyncio.sleep(1) + assert run._task + with pytest.raises(Exception, match="awaited"): - await run.wait(timeout=0.2) + await run.wait_completed(timeout=1) run.stop() - await run.wait() + await run.wait_completed() diff --git a/tests/test_runtime.py b/tests/test_runtime.py index 1a4608e9a3..d5481a17b6 100644 --- a/tests/test_runtime.py +++ b/tests/test_runtime.py @@ -50,15 +50,16 @@ def setup(self): self.runtime = self.RUNTIME(self.agent, threaded=True) def teardown(self): + """Tear down.""" self.runtime.stop() - self.runtime.wait(sync=True) + self.runtime.wait_completed(sync=True) def test_start_stop(self): """Test runtime tart/stop.""" self.runtime.start() wait_for_condition(lambda: self.runtime.is_running, timeout=20) self.runtime.stop() - self.runtime.wait(sync=True) + self.runtime.wait_completed(sync=True) def test_double_start(self): """Test runtime double start do nothing.""" @@ -71,11 +72,11 @@ def test_double_stop(self): self.runtime.start() wait_for_condition(lambda: self.runtime.is_running, timeout=20) self.runtime.stop() - self.runtime.wait(sync=True) + self.runtime.wait_completed(sync=True) assert self.runtime.is_stopped self.runtime.stop() - self.runtime.wait(sync=True) + self.runtime.wait_completed(sync=True) assert self.runtime.is_stopped def test_error_state(self): @@ -84,7 +85,7 @@ def test_error_state(self): self.runtime, "_start_agent_loop", side_effect=ValueError("oops") ): with pytest.raises(ValueError, match="oops"): - self.runtime.start_and_wait(sync=True) + self.runtime.start_and_wait_completed(sync=True) assert self.runtime.state == RuntimeStates.error, self.runtime.state @@ -100,6 +101,6 @@ def test_error_state(self): self.runtime.main_loop, "start", side_effect=ValueError("oops") ): with pytest.raises(ValueError, match="oops"): - self.runtime.start_and_wait(sync=True) + self.runtime.start_and_wait_completed(sync=True) assert self.runtime.state == RuntimeStates.error, self.runtime.state diff --git a/tests/test_skills/test_error.py b/tests/test_skills/test_error.py index 70a1e7a358..926951face 100644 --- a/tests/test_skills/test_error.py +++ b/tests/test_skills/test_error.py @@ -188,7 +188,6 @@ def test_error_unsupported_skill(self): msg = envelope.message assert msg.performative == DefaultMessage.Performative.ERROR assert msg.error_code == DefaultMessage.ErrorCode.UNSUPPORTED_SKILL - print("\n1111111, STOP in TEST\n", flush=True) def test_error_unsupported_skill_when_skill_id_is_none(self): """Test the 'send_unsupported_skill' when the skill id in the envelope is None.""" From aecd47ac9a3196a0aeb41c8778143b701645596c Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Mon, 14 Sep 2020 11:50:08 +0300 Subject: [PATCH 084/131] fixes --- aea/agent.py | 2 +- aea/launcher.py | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/aea/agent.py b/aea/agent.py index 6246e45451..920c4804f9 100644 --- a/aea/agent.py +++ b/aea/agent.py @@ -196,7 +196,7 @@ def start(self) -> None: if was_started: self.runtime.wait_completed(sync=True) else: - raise ValueError("Failed to start runtime! Ws it already started?") + raise ValueError("Failed to start runtime! Was it already started?") def stop(self) -> None: """ diff --git a/aea/launcher.py b/aea/launcher.py index cc6eaf0903..0bcbc5faa8 100644 --- a/aea/launcher.py +++ b/aea/launcher.py @@ -89,10 +89,8 @@ def _run_agent( _set_logger(log_level=log_level) agent = load_agent(agent_dir) - on_stop = False def stop_event_thread(): - nonlocal on_stop try: stop_event.wait() except (KeyboardInterrupt, EOFError, BrokenPipeError) as e: # pragma: nocover @@ -100,10 +98,8 @@ def stop_event_thread(): f"Exception raised in stop_event_thread {e} {type(e)}. Skip it, looks process is closed." ) finally: - if not on_stop: - logger.debug("_run_agent: stop event raised. call agent.stop") - on_stop = True - agent.stop() + logger.debug("_run_agent: stop event raised. call agent.stop") + agent.runtime.stop() Thread(target=stop_event_thread, daemon=True).start() try: @@ -116,10 +112,8 @@ def stop_event_thread(): exc.__traceback__ = e.__traceback__ raise exc finally: - if not on_stop: - logger.debug("_run_agent: call agent.stop") - on_stop = True - agent.stop() + logger.debug("_run_agent: call agent.stop") + agent.stop() class AEADirTask(AbstractExecutorTask): From 1f33720f3be96890a40936f5eef88912cf570d9d Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Mon, 14 Sep 2020 19:37:28 +0300 Subject: [PATCH 085/131] fix for Runnable.wait_completed --- aea/helpers/async_utils.py | 54 ++++++++++++++------------ tests/test_helpers/test_async_utils.py | 5 ++- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 7ca18a6b7f..73b393f951 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -568,14 +568,34 @@ def wait_completed( logger.warning("Already got result, skip") return ready_future - if self._task.done(): - self._got_result = True - return self._task - if sync: self._wait_sync(timeout) return ready_future + return self._wait_async(timeout) + + def _wait_sync(self, timeout: Optional[float] = None) -> None: + """Wait task completed in sync manner.""" + if self._task is None: + raise ValueError("task is not set!") + + if self._threaded or self._loop.is_running(): + start_time = time.time() + + while not self._task.done(): + time.sleep(0.01) + if timeout is not None and time.time() - start_time > timeout: + raise asyncio.TimeoutError() + + self._got_result = True + if self._task.exception(): + raise self._task.exception() + else: + self._loop.run_until_complete( + asyncio.wait_for(self._wait(), timeout=timeout) + ) + + def _wait_async(self, timeout): if not self._threaded: return asyncio.wait_for(self._wait(), timeout=timeout) @@ -594,29 +614,15 @@ def done(task): finally: self._got_result = True - self._task.add_done_callback( - lambda task: loop.call_soon_threadsafe(lambda: done(task)) - ) - return fut - - def _wait_sync(self, timeout: Optional[float] = None) -> None: - """Wait task completed in sync manner.""" - if self._task is None: - raise ValueError("task is not set!") - if self._loop.is_running(): - start_time = time.time() - while not self._task.done(): - time.sleep(0.01) - if timeout is not None and time.time() - start_time > timeout: - raise asyncio.TimeoutError() - self._got_result = True - if self._task.exception(): - raise self._task.exception() + if self._task.done(): + done(self._task) else: - self._loop.run_until_complete( - asyncio.wait_for(self._wait(), timeout=timeout) + self._task.add_done_callback( + lambda task: loop.call_soon_threadsafe(lambda: done(task)) ) + return fut + async def _wait(self) -> None: """Wait internal method.""" if not self._task or not self._completed_event: # pragma: nocover diff --git a/tests/test_helpers/test_async_utils.py b/tests/test_helpers/test_async_utils.py index aba1ad6361..0cb3f2b843 100644 --- a/tests/test_helpers/test_async_utils.py +++ b/tests/test_helpers/test_async_utils.py @@ -351,12 +351,15 @@ async def run(self): async def test_exception(self): """Test runnable async methods.""" # for pydocstyle + import time + class TestRun(Runnable): async def run(self): raise Exception("awaited") run = TestRun(threaded=True) run.start() + time.sleep(0.1) with pytest.raises(Exception, match="awaited"): run.wait_completed(sync=True, timeout=1) @@ -381,7 +384,7 @@ async def run(self): run = TestRun(threaded=True) run.start() - await asyncio.sleep(1) + await asyncio.sleep(0.4) assert run._task with pytest.raises(Exception, match="awaited"): From a7539a895bf5798cfdc04a7bd714d5dbc59f18c5 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Thu, 17 Sep 2020 17:55:57 +0300 Subject: [PATCH 086/131] fixes --- aea/runtime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aea/runtime.py b/aea/runtime.py index ea906653f7..d4781fe124 100644 --- a/aea/runtime.py +++ b/aea/runtime.py @@ -152,7 +152,7 @@ def _get_main_loop_class(self, loop_mode: str) -> Type[BaseAgentLoop]: return self.RUN_LOOPS[loop_mode] def _set_task(self): - self._task = self._loop.create_task(self._run_wrapper(), name=self._agent.name) + self._task = self._loop.create_task(self._run_wrapper()) @property def decision_maker(self) -> DecisionMaker: From 6ec838c47ba5d195694514f58498c9babe717008 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Mon, 21 Sep 2020 10:40:18 +0300 Subject: [PATCH 087/131] multplexer fix for exception supression in receive and send loops --- aea/multiplexer.py | 58 +++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/aea/multiplexer.py b/aea/multiplexer.py index ec4896ba0a..252c6fab1a 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -291,19 +291,22 @@ async def disconnect(self) -> None: async def _stop_receive_send_loops(self) -> None: """Stop receive and send loops.""" self.logger.debug("Stopping recv loop...") + if self._recv_loop_task: self._recv_loop_task.cancel() - with suppress(Exception): + with suppress(Exception, asyncio.CancelledError): await self._recv_loop_task + self._recv_loop_task = None self.logger.debug("Recv loop stopped.") self.logger.debug("Stopping send loop...") + if self._send_loop_task: # send a 'stop' token (a None value) to wake up the coroutine waiting for outgoing envelopes. await self.out_queue.put(None) self._send_loop_task.cancel() - with suppress(Exception): + with suppress(Exception, asyncio.CancelledError): await self._send_loop_task self._send_loop_task = None @@ -415,8 +418,8 @@ async def _send_loop(self) -> None: ) return - while self.is_connected: - try: + try: + while self.is_connected: self.logger.debug("Waiting for outgoing envelopes...") envelope = await self.out_queue.get() if envelope is None: # pragma: nocover @@ -424,17 +427,18 @@ async def _send_loop(self) -> None: "Received empty envelope. Quitting the sending loop..." ) return None - self.logger.debug("Sending envelope {}".format(str(envelope))) - await self._send(envelope) - except asyncio.CancelledError: - self.logger.debug("Sending loop cancelled.") - return - except AEAConnectionError as e: - self.logger.error(str(e)) - except Exception as e: # pylint: disable=broad-except # pragma: nocover - self.logger.error("Error in the sending loop: {}".format(str(e))) - raise + try: + await self._send(envelope) + except AEAConnectionError as e: + self.logger.error(str(e)) + + except asyncio.CancelledError: + self.logger.debug("Sending loop cancelled.") + raise + except Exception as e: # pylint: disable=broad-except # pragma: nocover + self.logger.error("Error in the sending loop: {}".format(str(e))) + raise async def _receiving_loop(self) -> None: """Process incoming envelopes.""" @@ -443,8 +447,8 @@ async def _receiving_loop(self) -> None: asyncio.ensure_future(conn.receive()): conn for conn in self.connections } - while self.connection_status.is_connected and len(task_to_connection) > 0: - try: + try: + while self.connection_status.is_connected and len(task_to_connection) > 0: done, _pending = await asyncio.wait( task_to_connection.keys(), return_when=asyncio.FIRST_COMPLETED ) @@ -461,17 +465,17 @@ async def _receiving_loop(self) -> None: new_task = asyncio.ensure_future(connection.receive()) task_to_connection[new_task] = connection - except asyncio.CancelledError: # pragma: nocover - self.logger.debug("Receiving loop cancelled.") - break - except Exception as e: # pylint: disable=broad-except - self.logger.exception("Error in the receiving loop: {}".format(str(e))) - break - - # cancel all the receiving tasks. - for t in task_to_connection.keys(): - t.cancel() - self.logger.debug("Receiving loop terminated.") + except asyncio.CancelledError: # pragma: nocover + self.logger.debug("Receiving loop cancelled.") + raise + except Exception as e: # pylint: disable=broad-except + self.logger.exception("Error in the receiving loop: {}".format(str(e))) + raise + finally: + # cancel all the receiving tasks. + for t in task_to_connection.keys(): + t.cancel() + self.logger.debug("Receiving loop terminated.") async def _send(self, envelope: Envelope) -> None: """ From 57e16a240d2c9159b1977d4f263df5b5ab84384b Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Fri, 25 Sep 2020 13:19:52 +0300 Subject: [PATCH 088/131] mac os fix --- aea/launcher.py | 9 +++++++++ aea/multiplexer.py | 6 +----- tests/test_runtime.py | 1 - 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/aea/launcher.py b/aea/launcher.py index 0bcbc5faa8..a8927e494e 100644 --- a/aea/launcher.py +++ b/aea/launcher.py @@ -86,6 +86,15 @@ def _run_agent( :return: None """ + import asyncio # pylint: disable=import-outside-toplevel + import select # pylint: disable=import-outside-toplevel + import selectors # pylint: disable=import-outside-toplevel + + if hasattr(select, "kqueue"): + selector = selectors.SelectSelector() + loop = asyncio.SelectorEventLoop(selector) # type: ignore + asyncio.set_event_loop(loop) + _set_logger(log_level=log_level) agent = load_agent(agent_dir) diff --git a/aea/multiplexer.py b/aea/multiplexer.py index 252c6fab1a..de24c957d1 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -29,11 +29,7 @@ from aea.connections.base import Connection, ConnectionStates from aea.exceptions import enforce from aea.helpers.async_friendly_queue import AsyncFriendlyQueue -from aea.helpers.async_utils import ( - AsyncState, - Runnable, - ThreadedAsyncRunner, -) +from aea.helpers.async_utils import AsyncState, Runnable, ThreadedAsyncRunner from aea.helpers.exception_policy import ExceptionPolicyEnum from aea.helpers.logging import WithLogger from aea.mail.base import AEAConnectionError, Empty, Envelope, EnvelopeContext diff --git a/tests/test_runtime.py b/tests/test_runtime.py index d5481a17b6..9f754bddf9 100644 --- a/tests/test_runtime.py +++ b/tests/test_runtime.py @@ -29,7 +29,6 @@ from aea.runtime import AsyncRuntime, BaseRuntime, RuntimeStates, ThreadedRuntime from tests.common.utils import wait_for_condition - from tests.conftest import CUR_PATH From 1599dcc4ef1af4f88e9f0b9295542c7a70839204 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Mon, 28 Sep 2020 11:32:04 +0300 Subject: [PATCH 089/131] coverage fixes --- aea/agent_loop.py | 2 +- aea/helpers/async_utils.py | 6 +++--- aea/launcher.py | 2 +- aea/multiplexer.py | 1 + tests/test_agent_loop.py | 14 ++++++++++++++ tests/test_helpers/test_async_utils.py | 11 +++++++++++ tests/test_multiplexer.py | 12 ++++++++++++ 7 files changed, 43 insertions(+), 5 deletions(-) diff --git a/aea/agent_loop.py b/aea/agent_loop.py index dd02d1eca3..8de41f5f86 100644 --- a/aea/agent_loop.py +++ b/aea/agent_loop.py @@ -80,7 +80,7 @@ def __init__( self._agent: AbstractAgent = agent self._tasks: List[asyncio.Task] = [] - self._state: AsyncState = AsyncState() + self._state: AsyncState = AsyncState(AgentLoopStates.initial) self._exceptions: List[Exception] = [] @property diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 73b393f951..58c61314f8 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -530,7 +530,7 @@ def _set_task(self) -> None: async def _run_wrapper(self) -> None: """Wrap run() method.""" - if not self._completed_event: + if not self._completed_event: # pragma: nocover raise ValueError("Start was not called!") try: @@ -540,7 +540,7 @@ async def _run_wrapper(self) -> None: self._loop.call_soon_threadsafe(self._completed_event.set) @property - def is_running(self) -> bool: + def is_running(self) -> bool: # pragma: nocover """Get running state.""" return self._is_running @@ -576,7 +576,7 @@ def wait_completed( def _wait_sync(self, timeout: Optional[float] = None) -> None: """Wait task completed in sync manner.""" - if self._task is None: + if self._task is None: # pragma: nocover raise ValueError("task is not set!") if self._threaded or self._loop.is_running(): diff --git a/aea/launcher.py b/aea/launcher.py index a8927e494e..7f1198b21e 100644 --- a/aea/launcher.py +++ b/aea/launcher.py @@ -90,7 +90,7 @@ def _run_agent( import select # pylint: disable=import-outside-toplevel import selectors # pylint: disable=import-outside-toplevel - if hasattr(select, "kqueue"): + if hasattr(select, "kqueue"): # pragma: nocover # cause platform specific selector = selectors.SelectSelector() loop = asyncio.SelectorEventLoop(selector) # type: ignore asyncio.set_event_loop(loop) diff --git a/aea/multiplexer.py b/aea/multiplexer.py index de24c957d1..e4923995cd 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -114,6 +114,7 @@ async def run(self) -> None: self.set_loop(asyncio.get_event_loop()) try: await self.connect() + if not self._recv_loop_task or not self._send_loop_task: raise ValueError("Multiplexer is not connected properly.") diff --git a/tests/test_agent_loop.py b/tests/test_agent_loop.py index 641f6537d4..aa6bd5482d 100644 --- a/tests/test_agent_loop.py +++ b/tests/test_agent_loop.py @@ -208,6 +208,20 @@ def test_loop_start_stop(self): agent_loop.wait_completed(sync=True) assert not agent_loop.is_running, agent_loop.state + def test_set_loop(self): + """Test set loop.""" + agent_loop = self.AGENT_LOOP_CLASS(self.FAKE_AGENT_CLASS()) + + loop = asyncio.new_event_loop() + agent_loop.set_loop(loop=loop) + assert agent_loop._loop == loop + + def test_state_property(self): + """Test state property.""" + agent_loop = self.AGENT_LOOP_CLASS(self.FAKE_AGENT_CLASS()) + + assert agent_loop.state == AgentLoopStates.initial + def test_handle_envelope(self): """Test one envelope handling.""" handler = CountHandler.make() diff --git a/tests/test_helpers/test_async_utils.py b/tests/test_helpers/test_async_utils.py index 0cb3f2b843..b5ee1e636c 100644 --- a/tests/test_helpers/test_async_utils.py +++ b/tests/test_helpers/test_async_utils.py @@ -263,6 +263,17 @@ def test_no_loop_and_threded(self): with pytest.raises(ValueError,): RunAndExit(loop=asyncio.get_event_loop(), threaded=True) + def test_task_cancel_not_set(self): + """Test task cancel.""" + + class TestRun(Runnable): + async def run(self): + while True: + await asyncio.sleep(1) + + run = TestRun() + run._task_cancel() + @pytest.mark.asyncio async def test_runnable_async(self): """Test runnable async methods.""" diff --git a/tests/test_multiplexer.py b/tests/test_multiplexer.py index e6129619a4..85fbf8c415 100644 --- a/tests/test_multiplexer.py +++ b/tests/test_multiplexer.py @@ -134,6 +134,18 @@ async def test_connect_twice_a_single_connection(): await multiplexer._disconnect_one(connection.connection_id) +@pytest.mark.asyncio +async def test_run_bad_conneect(): + """Test that connecting twice a single connection behaves correctly.""" + connection = _make_dummy_connection() + multiplexer = AsyncMultiplexer([connection]) + f = asyncio.Future() + f.set_result(None) + with unittest.mock.patch.object(multiplexer, "connect", return_value=f): + with pytest.raises(ValueError, match="Multiplexer is not connected properly."): + await multiplexer.run() + + def test_multiplexer_connect_all_raises_error(): """Test the case when the multiplexer raises an exception while connecting.""" multiplexer = Multiplexer([_make_dummy_connection()]) From 58c5a0332759a0fe40673a528d6fae66184a89f9 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Mon, 28 Sep 2020 12:37:18 +0300 Subject: [PATCH 090/131] fixes --- aea/aea.py | 6 ++--- aea/agent.py | 4 +++- aea/agent_loop.py | 8 +++---- aea/helpers/async_utils.py | 32 +++++++++++++++++--------- aea/multiplexer.py | 1 - aea/runtime.py | 27 +++++++++++++++------- tests/test_aea.py | 10 ++++---- tests/test_helpers/test_async_utils.py | 2 +- 8 files changed, 55 insertions(+), 35 deletions(-) diff --git a/aea/aea.py b/aea/aea.py index 63086fdd02..be8265b06e 100644 --- a/aea/aea.py +++ b/aea/aea.py @@ -55,7 +55,7 @@ from aea.protocols.default.message import DefaultMessage from aea.registries.filter import Filter from aea.registries.resources import Resources -from aea.runtime import StopRuntime +from aea.runtime import _StopRuntime from aea.skills.base import Behaviour, Handler from aea.skills.error.handlers import ErrorHandler @@ -242,7 +242,7 @@ def _get_msg_and_handlers_for_envelope( if error_handler is None: self.logger.warning("ErrorHandler not initialized. Stopping AEA!") - raise StopRuntime() + raise _StopRuntime() error_handler = cast(ErrorHandler, error_handler) @@ -364,7 +364,7 @@ def log_exception(e, fn): if self._skills_exception_policy == ExceptionPolicyEnum.stop_and_exit: log_exception(exception, function) - raise StopRuntime( + raise _StopRuntime( AEAException( f"AEA was terminated cause exception `{exception}` in skills {function}! Please check logs." ) diff --git a/aea/agent.py b/aea/agent.py index 920c4804f9..ac15fa6cfb 100644 --- a/aea/agent.py +++ b/aea/agent.py @@ -16,6 +16,7 @@ # limitations under the License. # # ------------------------------------------------------------------------------ + """This module contains the implementation of a generic agent.""" import datetime import logging @@ -24,6 +25,7 @@ from aea.abstract_agent import AbstractAgent from aea.connections.base import Connection +from aea.exceptions import AEAException from aea.identity.base import Identity from aea.mail.base import Envelope from aea.multiplexer import InBox, OutBox @@ -196,7 +198,7 @@ def start(self) -> None: if was_started: self.runtime.wait_completed(sync=True) else: - raise ValueError("Failed to start runtime! Was it already started?") + raise AEAException("Failed to start runtime! Was it already started?") def stop(self) -> None: """ diff --git a/aea/agent_loop.py b/aea/agent_loop.py index 8de41f5f86..2285f02451 100644 --- a/aea/agent_loop.py +++ b/aea/agent_loop.py @@ -92,12 +92,12 @@ def set_loop(self, loop: AbstractEventLoop) -> None: """Set event loop and all event loopp related objects.""" self._loop: AbstractEventLoop = loop - def setup(self) -> None: # pylint: disable=no-self-use + def _setup(self) -> None: # pylint: disable=no-self-use """Set up loop before started.""" # start and stop methods are classmethods cause one instance shared across muiltiple threads ExecTimeoutThreadGuard.start() - def teardown(self): # pylint: disable=no-self-use + def _teardown(self): # pylint: disable=no-self-use """Tear down loop on stop.""" # start and stop methods are classmethods cause one instance shared across muiltiple threads ExecTimeoutThreadGuard.stop() @@ -106,7 +106,7 @@ async def run(self) -> None: """Run agent loop.""" self.logger.debug("agent loop started") self._state.set(AgentLoopStates.starting) - self.setup() + self._setup() self._set_tasks() try: await self._gather_tasks() @@ -117,7 +117,7 @@ async def run(self) -> None: async def _stop(self) -> None: """Stop and cleanup.""" - self.teardown() + self._teardown() self._stop_tasks() for t in self._tasks: with suppress(BaseException): diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 58c61314f8..54022720c1 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -465,9 +465,17 @@ def __init__(self, getters: List[Tuple[Callable[[Any], None], Callable]]): class Runnable(ABC): - """Abstract Runnable class.""" + """ + Abstract Runnable class. + + Use to run async task in same event loop or in dedicated thread. + Provides: start, stop sync methods to start and stop task + Use wait_completed to await task was completed. + """ - def __init__(self, loop=None, threaded=False) -> None: + def __init__( + self, loop: asyncio.AbstractEventLoop = None, threaded: bool = False + ) -> None: """ Init runnable. @@ -496,8 +504,9 @@ def start(self) -> bool: :return: bool started or not. """ if self._task and not self._task.done(): - logger.debug("already running") + logger.debug(f"{self} already running") return False + self._is_running = False self._got_result = False self._set_loop() @@ -507,7 +516,7 @@ def start(self) -> bool: if self._threaded: self._thread = Thread( - target=self._loop.run_until_complete, args=[self._task] + target=self._loop.run_until_complete, args=[self._task] # type: ignore # loop was set in set_loop ) self._thread.start() @@ -526,11 +535,13 @@ def _set_loop(self) -> None: def _set_task(self) -> None: """Create task.""" + if not self._loop: # pragma: nocover + raise ValueError("Loop was not set.") self._task = self._loop.create_task(self._run_wrapper()) async def _run_wrapper(self) -> None: """Wrap run() method.""" - if not self._completed_event: # pragma: nocover + if not self._completed_event or not self._loop: # pragma: nocover raise ValueError("Start was not called!") try: @@ -561,11 +572,10 @@ def wait_completed( :return: awaitable if sync is False, otherise None """ if not self._task: - logger.warning("Runnable is not no started") + logger.warning("Runnable is not started") return ready_future if self._got_result and not force_result: - logger.warning("Already got result, skip") return ready_future if sync: @@ -576,7 +586,7 @@ def wait_completed( def _wait_sync(self, timeout: Optional[float] = None) -> None: """Wait task completed in sync manner.""" - if self._task is None: # pragma: nocover + if self._task is None or not self._loop: # pragma: nocover raise ValueError("task is not set!") if self._threaded or self._loop.is_running(): @@ -638,12 +648,12 @@ async def _wait(self) -> None: def stop(self, force: bool = False) -> None: """Stop runnable.""" logger.debug(f"{self} is going to be stopped {self._task}") - if not self._task: - logger.debug("not running!") + if not self._task or not self._loop: return + if self._task.done(): - logger.debug("already completed") return + self._loop.call_soon_threadsafe(self._task_cancel, force) def _task_cancel(self, force: bool = False) -> None: diff --git a/aea/multiplexer.py b/aea/multiplexer.py index e4923995cd..d604b1e1f0 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -88,7 +88,6 @@ def __init__( :param loop: the event loop to run the multiplexer. If None, a new event loop is created. :param agent_name: the name of the agent that owns the multiplexer, for logging purposes. """ - super().__init__(default_logger) self._exception_policy: ExceptionPolicyEnum = exception_policy WithLogger.__init__(self, default_logger) Runnable.__init__(self, loop=loop, threaded=threaded) diff --git a/aea/runtime.py b/aea/runtime.py index d4781fe124..04e70e1ed9 100644 --- a/aea/runtime.py +++ b/aea/runtime.py @@ -41,12 +41,17 @@ logger = logging.getLogger(__name__) -class StopRuntime(Exception): - """Exception to stop runtime.""" +class _StopRuntime(Exception): + """ + Exception to stop runtime. + + For internal usage only! + Used to perform asyncio call from sync callbacks. + """ def __init__(self, reraise: Optional[Exception] = None): """ - Init StopRuntime exception. + Init _StopRuntime exception. :param reraise: exception to reraise. @@ -119,7 +124,7 @@ def task_manager(self) -> TaskManager: return self._task_manager @property - def loop(self) -> AbstractEventLoop: + def loop(self) -> Optional[AbstractEventLoop]: """Get event loop.""" return self._loop @@ -250,11 +255,15 @@ def set_loop(self, loop: AbstractEventLoop) -> None: BaseRuntime.set_loop(self, loop) async def run(self) -> None: - """Start multiplexeor task.""" + """ + Start runtime task. + + Starts multiplexer and agent loop. + """ terminal_state = RuntimeStates.error try: await self.run_runtime() - except StopRuntime as e: + except _StopRuntime as e: self._state.set(RuntimeStates.stopping) terminal_state = RuntimeStates.stopped if e.reraise: @@ -271,11 +280,11 @@ async def stop_runtime(self) -> None: Stop runtime coroutine. Stop main loop. - Agent teardown. + Tear down the agent.. Disconnect multiplexer. """ self.main_loop.stop() - with suppress(StopRuntime): + with suppress(_StopRuntime): await self.main_loop.wait_completed() self._teardown() @@ -291,6 +300,8 @@ async def run_runtime(self) -> None: async def _start_multiplexer(self) -> None: """Call multiplexer connect asynchronous way.""" self.setup_multiplexer() + if not self._loop: + raise ValueError("no loop is set for runtime.") self.multiplexer.set_loop(self._loop) self.multiplexer.start() await self.multiplexer.wait_completed() diff --git a/tests/test_aea.py b/tests/test_aea.py index a4108c8c3e..afaca49536 100644 --- a/tests/test_aea.py +++ b/tests/test_aea.py @@ -43,7 +43,7 @@ from aea.protocols.default.message import DefaultMessage from aea.protocols.default.serialization import DefaultSerializer from aea.registries.resources import Resources -from aea.runtime import RuntimeStates, StopRuntime +from aea.runtime import RuntimeStates, _StopRuntime from aea.skills.base import Skill, SkillContext from packages.fetchai.connections.local.connection import LocalNode @@ -184,9 +184,7 @@ def test_react(): with run_in_thread(agent.start, timeout=20, on_exit=agent.stop): wait_for_condition(lambda: agent.is_running, timeout=20) - time.sleep(1) agent.outbox.put(envelope) - print("111 msg put", flush=True) default_protocol_public_id = DefaultMessage.protocol_id dummy_skill_public_id = DUMMY_SKILL_PUBLIC_ID handler = agent.resources.get_handler( @@ -534,7 +532,7 @@ def test_error_handler_is_not_set(): message=msg, ) - with pytest.raises(StopRuntime): + with pytest.raises(_StopRuntime): agent.handle_envelope(envelope) @@ -809,7 +807,7 @@ def setUpClass(cls) -> None: def tearDown(self) -> None: """Tear down.""" self.aea_tool.teardown() - self.aea_tool.aea.runtime.main_loop.teardown() + self.aea_tool.aea.runtime.main_loop._teardown() def prepare(self, function: Callable) -> None: """Prepare aea_tool for testing. @@ -848,7 +846,7 @@ def handler_func(*args, **kwargs): aea = builder.build() self.aea_tool = AeaTool(aea) self.envelope = AeaTool.dummy_envelope() - self.aea_tool.aea.runtime.main_loop.setup() + self.aea_tool.aea.runtime.main_loop._setup() def test_long_handler_cancelled_by_timeout(self): """Test long function terminated by timeout.""" diff --git a/tests/test_helpers/test_async_utils.py b/tests/test_helpers/test_async_utils.py index b5ee1e636c..6264b21e13 100644 --- a/tests/test_helpers/test_async_utils.py +++ b/tests/test_helpers/test_async_utils.py @@ -320,7 +320,7 @@ async def run(self): @pytest.mark.asyncio async def test_run_in_thread(self): - """Test runnable async methods.""" + """Test runnable in thread mode.""" # for pydocstyle class TestRun(Runnable): async def run(self): From 7403f5a6f0eb6737f98f2106197c83188d277a13 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Tue, 22 Sep 2020 11:33:48 +0300 Subject: [PATCH 091/131] agents manager interface --- aea/manager.py | 151 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 aea/manager.py diff --git a/aea/manager.py b/aea/manager.py new file mode 100644 index 0000000000..bbb289d858 --- /dev/null +++ b/aea/manager.py @@ -0,0 +1,151 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2018-2020 Fetch.AI Limited +# +# 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. +# +# ------------------------------------------------------------------------------ +"""This module contains the implementation of AEA agents manager.""" +from abc import ABC, abstractmethod +from typing import Dict, List + +from aea.aea_builder import PathLike +from aea.configurations.base import PublicId + + +class AbstractManager(ABC): + """Abstract agents manager.""" + + def __init__(self, working_dir: PathLike) -> None: + """ + Initialize manager. + + :param working_dir: directory to store base agents. + """ + self.working_dir = working_dir + + @abstractmethod + def start_manager(self) -> None: + """Start manager.""" + + @abstractmethod + def stop_manager(self, cleanup: bool = False) -> None: + """ + Stop manager. + + Stops all running agents and stop agent. + + :param cleanup: remove agents_dir and purge in memory registry. + + :return: None + """ + + @abstractmethod + def add_project(self, public_id: PublicId) -> None: + """Fetch agent project and all dependencies to working_dir.""" + + @abstractmethod + def remove_project(self, public_id: PublicId) -> None: + """Remove agent project.""" + + @abstractmethod + def list_projects(self) -> List[PublicId]: + """ + List all agents projects added. + + :return: lit of public ids of projects + """ + + @abstractmethod + def add_agent( + self, project_id: PublicId, agent_name: str, config_overrides: Dict + ) -> None: + """ + Create new agent configuration based on project with config overrides applied. + + Alias is stored in memory only! + + :param project_id: base agent public id + :param agent_name: unique name for the agent + :param config_overrides: overrides for component section. + + :return: None + """ + + @abstractmethod + def list_agents(self, running_only: bool = False) -> List[str]: + """ + List all agents. + + :param running_only: returns only running if set to True + + :return: list of agents names + """ + + @abstractmethod + def remove_agent(self, agent_name: str) -> None: + """ + Remove agent alias definition from registry. + + :param agent_name: agent name to remove + + :return: None + """ + + @abstractmethod + def start_agent(self, agent_name: str) -> None: + """ + Start selected agent. + + :param agent_name: agent name to start + + :return: None + """ + + @abstractmethod + def start_all_agents(self) -> None: + """ + Start all not started agents. + + :return: None + """ + + @abstractmethod + def stop_agent(self, agent_name: str) -> None: + """ + Stop running agent. + + :param agent_name: agent name to stop + + :return: None + """ + + @abstractmethod + def stop_all_agents(self) -> None: + """ + Stop all agents running. + + :return: None + """ + + @abstractmethod + def get_agent_details(self, agent_name: str) -> dict: + """ + Return details about agent definition. + + { + "project": str + "overrides": dict + } + """ From 02bcb67e55bb693d9eb9af941c146a8dba7abd6c Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Thu, 24 Sep 2020 10:22:20 +0300 Subject: [PATCH 092/131] aea.Manager: projects handling, agent alias creation --- aea/aea_builder.py | 25 +++- aea/cli/registry/fetch.py | 19 ++- aea/configurations/loader.py | 10 +- aea/manager.py | 228 ++++++++++++++++++++++++++++++----- tests/test_manager.py | 107 ++++++++++++++++ 5 files changed, 348 insertions(+), 41 deletions(-) create mode 100644 tests/test_manager.py diff --git a/aea/aea_builder.py b/aea/aea_builder.py index ee5b77abe8..54e89d1642 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -292,6 +292,8 @@ class AEABuilder: DEFAULT_RUNTIME_MODE = "threaded" DEFAULT_SEARCH_SERVICE_ADDRESS = "fetchai/soef:*" + loader = ConfigLoader.from_configuration_type(PackageType.AGENT) + # pylint: disable=attribute-defined-outside-init def __init__(self, with_default_packages: bool = True): @@ -1336,16 +1338,33 @@ def from_aea_project( builder = AEABuilder(with_default_packages=False) # load agent configuration file - configuration_file = aea_project_path / DEFAULT_AEA_CONFIG_FILE + configuration_file = cls.get_configuration_file_path(aea_project_path) + agent_configuration = cls.loader.load(configuration_file.open()) - loader = ConfigLoader.from_configuration_type(PackageType.AGENT) - agent_configuration = loader.load(configuration_file.open()) + builder.set_from_configuration( + agent_configuration, aea_project_path, skip_consistency_check + ) + return builder + + @classmethod + def from_config_json( + cls, json_data, aea_project_path: PathLike, skip_consistency_check: bool = False + ): + aea_project_path = Path(aea_project_path) + builder = AEABuilder(with_default_packages=False) + + # load agent configuration file + agent_configuration = cls.loader._load_agent_config_from_json(json_data) builder.set_from_configuration( agent_configuration, aea_project_path, skip_consistency_check ) return builder + @staticmethod + def get_configuration_file_path(aea_project_path): + return Path(aea_project_path) / DEFAULT_AEA_CONFIG_FILE + def _load_and_add_components( self, component_type: ComponentType, diff --git a/aea/cli/registry/fetch.py b/aea/cli/registry/fetch.py index 8efdd4e051..cf0270c391 100644 --- a/aea/cli/registry/fetch.py +++ b/aea/cli/registry/fetch.py @@ -16,6 +16,9 @@ # limitations under the License. # # ------------------------------------------------------------------------------ +from aea.helpers.base import cd +import shutil + """Methods for CLI fetch functionality.""" import os @@ -32,7 +35,12 @@ @clean_after -def fetch_agent(ctx: Context, public_id: PublicId, alias: Optional[str] = None) -> None: +def fetch_agent( + ctx: Context, + public_id: PublicId, + alias: Optional[str] = None, + dir: Optional[str] = None, +) -> None: """ Fetch Agent from Registry. @@ -49,14 +57,17 @@ def fetch_agent(ctx: Context, public_id: PublicId, alias: Optional[str] = None) filepath = download_file(file_url, ctx.cwd) - folder_name = name if alias is None else alias + folder_name = dir or (name if alias is None else alias) aea_folder = os.path.join(ctx.cwd, folder_name) + print(aea_folder) ctx.clean_paths.append(aea_folder) extract(filepath, ctx.cwd) - if alias is not None: - os.rename(name, alias) + if alias or dir: + shutil.move( + os.path.join(ctx.cwd, name), aea_folder, + ) ctx.cwd = aea_folder try_to_load_agent_config(ctx) diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index 8a5c1e84d0..4956406c95 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -229,10 +229,7 @@ def _load_from_json(self, configuration_file_json: Dict) -> T: configuration_obj._key_order = key_order # pylint: disable=protected-access return configuration_obj - def _load_agent_config(self, file_pointer: TextIO) -> AgentConfig: - """Load an agent configuration.""" - configuration_file_jsons = yaml_load_all(file_pointer) - + def _load_agent_config_from_json(self, configuration_file_jsons) -> AgentConfig: if len(configuration_file_jsons) == 0: raise ValueError("Agent configuration file was empty.") agent_config_json = configuration_file_jsons[0] @@ -260,6 +257,11 @@ def _load_agent_config(self, file_pointer: TextIO) -> AgentConfig: agent_configuration_obj.component_configurations = component_configurations return agent_configuration_obj + def _load_agent_config(self, file_pointer: TextIO) -> AgentConfig: + """Load an agent configuration.""" + configuration_file_jsons = yaml_load_all(file_pointer) + return self._load_agent_config_from_json(configuration_file_jsons) + def _dump_agent_config( self, configuration: AgentConfig, file_pointer: TextIO ) -> None: diff --git a/aea/manager.py b/aea/manager.py index bbb289d858..643543597f 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -17,29 +17,82 @@ # # ------------------------------------------------------------------------------ """This module contains the implementation of AEA agents manager.""" -from abc import ABC, abstractmethod -from typing import Dict, List - -from aea.aea_builder import PathLike -from aea.configurations.base import PublicId - - -class AbstractManager(ABC): +import copy +import os +from shutil import rmtree +from typing import Dict, List, Optional, Set + +from aea.aea import AEA +from aea.aea_builder import AEABuilder +from aea.cli.registry.fetch import fetch_agent +from aea.cli.utils.context import Context +from aea.configurations.base import ComponentId, PublicId +from aea.configurations.constants import DEFAULT_LEDGER +from aea.crypto.helpers import create_private_key +from aea.helpers.base import yaml_load_all + + +class Project: + """Agent project representation.""" + + def __init__(self, public_id: PublicId, path: str): + """Init project with public_id and project's path.""" + self.public_id = public_id + self.path = path + self.agents: Set[str] = set() + + @classmethod + def load(cls, working_dir, public_id) -> "Project": + """Load project with given pubblic_id to working_dir.""" + ctx = Context(cwd=working_dir) + path = os.path.join(working_dir, public_id.author, public_id.name) + fetch_agent(ctx, public_id, dir=os.path.join(public_id.author, public_id.name)) + return cls(public_id, path) + + def remove(self): + """Remove project, do cleanup.""" + rmtree(self.path) + + +class AgentAlias: + """Agent alias representation.""" + + def __init__(self, project: Project, name: str, config: List[Dict], agent: AEA): + """Init agent alias with project, config, name, agent.""" + self.project = project + self.config = config + self.name = name + self.agent = agent + self.project.agents.add(self.name) + + def remove(self): + """Remove agent alias from project.""" + self.project.agents.remove(self.name) + + +class Manager: """Abstract agents manager.""" - def __init__(self, working_dir: PathLike) -> None: + AGENT_DO_NOT_OVERRIDE_VALUES = ["skills", "connections", "protocols", "contracts"] + + def __init__(self, working_dir: str) -> None: """ Initialize manager. :param working_dir: directory to store base agents. """ self.working_dir = working_dir + self._was_working_dir_created = False + self.is_started = False + self._projects: Dict[PublicId, Project] = {} + self._keys_dir = os.path.abspath(os.path.join(self.working_dir, "keys")) + self._agents: Dict[str, AgentAlias] = {} - @abstractmethod def start_manager(self) -> None: """Start manager.""" + self._ensure_working_dir() + self.is_started = True - @abstractmethod def stop_manager(self, cleanup: bool = False) -> None: """ Stop manager. @@ -50,40 +103,66 @@ def stop_manager(self, cleanup: bool = False) -> None: :return: None """ + if self._was_working_dir_created: + rmtree(self.working_dir) + + self.is_started = False - @abstractmethod def add_project(self, public_id: PublicId) -> None: """Fetch agent project and all dependencies to working_dir.""" + if public_id in self._projects: + raise ValueError(f"Project {public_id} was already added!") + self._projects[public_id] = Project.load(self.working_dir, public_id) - @abstractmethod def remove_project(self, public_id: PublicId) -> None: """Remove agent project.""" + if public_id not in self._projects: + raise ValueError(f"Project {public_id} was not added!") + + self._projects.pop(public_id).remove() - @abstractmethod def list_projects(self) -> List[PublicId]: """ List all agents projects added. :return: lit of public ids of projects """ + return list(self._projects.keys()) - @abstractmethod def add_agent( - self, project_id: PublicId, agent_name: str, config_overrides: Dict + self, + public_id: PublicId, + agent_name: str, + agent_overrides: Optional[dict] = None, + component_overrides: Optional[List[dict]] = None, ) -> None: """ Create new agent configuration based on project with config overrides applied. Alias is stored in memory only! - :param project_id: base agent public id + :param public_id: base agent project public id :param agent_name: unique name for the agent - :param config_overrides: overrides for component section. + :param agent_overrides: overrides for agent config. + :param component_overrides: overrides for component section. :return: None """ + if agent_name in self._agents: + raise ValueError(f"Agent with name {agent_name} already exists!") + + if public_id not in self._projects: + raise ValueError(f"{public_id} project is not added!") + project = self._projects[public_id] + + agent_alias = self._build_agent_alias( + project=project, + agent_name=agent_name, + agent_overrides=agent_overrides, + component_overrides=component_overrides, + ) + self._agents[agent_name] = agent_alias - @abstractmethod def list_agents(self, running_only: bool = False) -> List[str]: """ List all agents. @@ -92,8 +171,8 @@ def list_agents(self, running_only: bool = False) -> List[str]: :return: list of agents names """ + return list(self._agents.keys()) - @abstractmethod def remove_agent(self, agent_name: str) -> None: """ Remove agent alias definition from registry. @@ -102,8 +181,12 @@ def remove_agent(self, agent_name: str) -> None: :return: None """ + if agent_name not in self._agents: + raise ValueError(f"Agent with name {agent_name} does not exist!") + + agent_alias = self._agents.pop(agent_name) + agent_alias.remove() - @abstractmethod def start_agent(self, agent_name: str) -> None: """ Start selected agent. @@ -113,7 +196,6 @@ def start_agent(self, agent_name: str) -> None: :return: None """ - @abstractmethod def start_all_agents(self) -> None: """ Start all not started agents. @@ -121,7 +203,6 @@ def start_all_agents(self) -> None: :return: None """ - @abstractmethod def stop_agent(self, agent_name: str) -> None: """ Stop running agent. @@ -131,7 +212,6 @@ def stop_agent(self, agent_name: str) -> None: :return: None """ - @abstractmethod def stop_all_agents(self) -> None: """ Stop all agents running. @@ -139,13 +219,101 @@ def stop_all_agents(self) -> None: :return: None """ - @abstractmethod - def get_agent_details(self, agent_name: str) -> dict: + def stop_agents(self, agent_names: List[str]) -> None: + """ + Stop specified agents. + + :return: None + """ + + def start_agents(self, agent_names: List[str]) -> None: + """ + Stop specified agents. + + :return: None + """ + + def get_agent_details(self, agent_name: str) -> AgentAlias: """ Return details about agent definition. - { - "project": str - "overrides": dict - } + :return: AgentAlias """ + if agent_name not in self._agents: + raise ValueError(f"Agent with name {agent_name} does not exist!") + return self._agents[agent_name] + + def _ensure_working_dir(self) -> None: + """Create working dir if needed.""" + if not os.path.exists(self.working_dir): + os.makedirs(self.working_dir) + self._was_working_dir_created = True + + if not os.path.isdir(self.working_dir): + raise ValueError(f"{self.working_dir} is not a directory!") + os.makedirs(self._keys_dir) + + def _build_agent_alias( + self, + project: Project, + agent_name: str, + agent_overrides=None, + component_overrides=None, + ) -> AgentAlias: + """Create agent alias for project, with given name and overrided values.""" + json_config = self._make_config( + project.path, agent_overrides, component_overrides + ) + + builder = AEABuilder.from_config_json(json_config, project.path) + builder.set_name(agent_name) + + if not builder.private_key_paths: + default_ledger = json_config[0].get("default_ledger", DEFAULT_LEDGER) + builder.add_private_key( + default_ledger, self._create_private_key(agent_name, default_ledger) + ) + agent = builder.build() + return AgentAlias(project, agent_name, json_config, agent) + + def _update_dict(self, base: dict, override: dict) -> dict: + """Apply overrides for dict.""" + base = copy.deepcopy(base) + base.update(override) + return base + + def _make_config( + self, + project_path: str, + agent_overrides: Optional[dict] = None, + component_overrides: Optional[List[dict]] = None, + ) -> List[dict]: + """Make new config baseed on proejct's config with overrides applied.""" + agent_overrides = agent_overrides or {} + component_overrides = component_overrides or [] + + if any([key in agent_overrides for key in self.AGENT_DO_NOT_OVERRIDE_VALUES]): + raise ValueError( + 'Do not override any of {" ".join(self.AGENT_DO_NOT_OVERRIDE_VALUES)}' + ) + + json_data = yaml_load_all( + AEABuilder.get_configuration_file_path(project_path).open() + ) + agent_config = self._update_dict(json_data[0], agent_overrides) + + components_configs = {PublicId.from_json(obj): obj for obj in json_data[1:]} + + for obj in component_overrides: + component_id = ComponentId(obj["type"], PublicId.from_json(obj)) + components_configs[component_id] = self._update_dict( + components_configs.get(component_id, {}), obj + ) + + return [agent_config] + list(components_configs.values()) + + def _create_private_key(self, name, ledger) -> str: + """Create new key for agent alias in working dir keys dir.""" + path = os.path.join(self._keys_dir, f"{name}_{ledger}_private.key") + create_private_key(ledger, path) + return path diff --git a/tests/test_manager.py b/tests/test_manager.py new file mode 100644 index 0000000000..e5a4c6af57 --- /dev/null +++ b/tests/test_manager.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2018-2020 Fetch.AI Limited +# +# 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. +# +# ------------------------------------------------------------------------------ +"""This module contains tests for aea manager.""" +import os +from contextlib import suppress +from shutil import rmtree +from typing import Dict, List, Optional, Set + +import pytest + +from aea.configurations.base import PublicId +from aea.manager import Manager + + +def test_manager(): + """Perform some tests.""" + + try: + working_dir = "manager_dir" + project_public_id = PublicId("fetchai", "my_first_aea", "0.11.0") + project_path = os.path.join( + working_dir, project_public_id.author, project_public_id.name + ) + assert not os.path.exists(working_dir) + manager = Manager(working_dir) + manager.start_manager() + assert os.path.exists(working_dir) + assert manager.is_started + + manager.add_project(project_public_id) + + assert project_public_id in manager.list_projects() + assert os.path.exists(project_path) + assert manager._projects[project_public_id].path == project_path + + with pytest.raises(ValueError, match=r".*was already added.*"): + manager.add_project(project_public_id) + + echo_skill_id = PublicId("fetchai", "echo", "0.7.0") + new_tick_interval = 1.1111 + agent_name = "test_what_ever12" + manager.add_agent( + project_public_id, + agent_name, + component_overrides=[ + { + "type": "skill", + **echo_skill_id.json, + "behaviours": { + "echo": { + "args": {"tick_interval": new_tick_interval}, + "class_name": "EchoBehaviour", + } + }, + } + ], + ) + agent_alias = manager.get_agent_details(agent_name) + assert agent_alias.name == agent_name + assert ( + agent_alias.agent.resources.get_behaviour( + echo_skill_id, "echo" + ).tick_interval + == new_tick_interval + ) + with pytest.raises(ValueError, match="already exists"): + manager.add_agent( + project_public_id, agent_name, + ) + assert agent_name in manager.list_agents() + + manager.remove_agent(agent_name) + assert agent_name not in manager.list_agents() + + with pytest.raises(ValueError, match="does not exist!"): + manager.remove_agent(agent_name) + + manager.remove_project(project_public_id) + assert project_public_id not in manager._projects + assert not os.path.exists(project_path) + assert project_public_id not in manager.list_projects() + + with pytest.raises(ValueError, match=r"was not added"): + manager.remove_project(project_public_id) + + manager.stop_manager() + assert not os.path.exists(working_dir) + assert not manager.is_started + finally: + with suppress(FileNotFoundError): + rmtree(working_dir) From 935395e40f8e27b295162092f0a6348efa1ccebf Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Fri, 25 Sep 2020 12:47:32 +0300 Subject: [PATCH 093/131] anget manager. start stop agents --- aea/manager.py | 225 +++++++++++++++++++++++++++++++++++++++++- tests/test_manager.py | 22 +++-- 2 files changed, 236 insertions(+), 11 deletions(-) diff --git a/aea/manager.py b/aea/manager.py index 643543597f..de92bf7edb 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -17,10 +17,14 @@ # # ------------------------------------------------------------------------------ """This module contains the implementation of AEA agents manager.""" +import asyncio import copy import os +import threading +from asyncio.tasks import FIRST_COMPLETED from shutil import rmtree -from typing import Dict, List, Optional, Set +from threading import Thread +from typing import Callable, Dict, List, Optional, Set from aea.aea import AEA from aea.aea_builder import AEABuilder @@ -70,12 +74,96 @@ def remove(self): self.project.agents.remove(self.name) +class AsyncTask: + """Async task wrapper for agent.""" + + def __init__(self, agent: AEA, loop: asyncio.AbstractEventLoop) -> None: + """Init task with agent and loop.""" + self.run_loop: asyncio.AbstractEventLoop = loop + self.caller_loop: asyncio.AbstractEventLoop = loop + self._done_future: Optional[asyncio.Future] = None + self.task: Optional[asyncio.Task] = None + self.agent = agent + + def create_run_loop(self) -> None: + """Create run loop.""" + pass + + def start(self) -> None: + """Start task.""" + self.create_run_loop() + self.task = self.run_loop.create_task(self._run_wrapper()) + self._done_future = asyncio.Future(loop=self.caller_loop) + + def wait(self) -> asyncio.Future: + """Return future to wait task completed.""" + if not self._done_future: + raise ValueError("Task not started!") + return self._done_future + + def stop(self) -> None: + """Stop task.""" + if not self.run_loop or not self.task: + raise ValueError("Task was not started!") + self.run_loop.call_soon_threadsafe(self.task.cancel) + + async def _run_wrapper(self) -> None: + """Run task internals.""" + if not self._done_future: + raise ValueError("Task was not started! please use start method") + try: + await self.run() + self.caller_loop.call_soon_threadsafe(self._done_future.set_result, None) + except asyncio.CancelledError: + self.caller_loop.call_soon_threadsafe(self._done_future.set_result, None) + except Exception as e: + self.caller_loop.call_soon_threadsafe(self._done_future.set_exception, e) + + async def run(self) -> None: + """Run task body.""" + self.agent.runtime.set_loop(self.run_loop) + try: + self.agent.runtime.start() + while True: + await asyncio.sleep(1) + finally: + self.agent.runtime.stop() + + @property + def is_running(self) -> bool: + """Return is task running.""" + return not self.wait().done() + + +class ThreadedTask(AsyncTask): + """Threaded task.""" + + def __init__(self, agent: AEA, loop: asyncio.AbstractEventLoop) -> None: + """Init task with agent and loop.""" + AsyncTask.__init__(self, agent, loop) + self._thread: Optional[Thread] = None + + def create_run_loop(self) -> None: + """Create run loop.""" + self.run_loop = asyncio.new_event_loop() + + def start(self) -> None: + """Run task in a dedicated thread.""" + super().start() + self._thread = threading.Thread( + target=self.run_loop.run_until_complete, args=[self.task], daemon=True + ) + self._thread.start() + + class Manager: """Abstract agents manager.""" AGENT_DO_NOT_OVERRIDE_VALUES = ["skills", "connections", "protocols", "contracts"] + MODES = ["async", "threaded"] + DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS = 60 - def __init__(self, working_dir: str) -> None: + def __init__(self, working_dir: str, mode: str = "async") -> None: """ Initialize manager. @@ -83,15 +171,74 @@ def __init__(self, working_dir: str) -> None: """ self.working_dir = working_dir self._was_working_dir_created = False - self.is_started = False + self._is_running = False self._projects: Dict[PublicId, Project] = {} self._keys_dir = os.path.abspath(os.path.join(self.working_dir, "keys")) self._agents: Dict[str, AgentAlias] = {} + self._agents_tasks: Dict[str, AsyncTask] = {} + + self._thread = Thread(target=self._run_thread, daemon=True) + self._loop: Optional[asyncio.AbstractEventLoop] = None + self._event: Optional[asyncio.Event] = None + + self._error_callbacks: List[Callable[[str, BaseException], None]] = [] + + if mode not in self.MODES: + raise ValueError( + f'Invalid mode {mode}. Valid modes are {", ".join(self.MODES)}' + ) + self._started_event = threading.Event() + self._mode = mode + + @property + def is_running(self) -> bool: + """Is manager running.""" + return self._is_running + + def _run_thread(self) -> None: + """Run internal thread with own event loop.""" + self._loop = asyncio.new_event_loop() + self._event = asyncio.Event(loop=self._loop) + self._loop.run_until_complete(self._manager_loop()) + + async def _manager_loop(self) -> None: + """Perform manager stop.""" + if not self._event: + raise ValueError("Do not use this method directly, use start_manager.") + + self._started_event.set() + + while self._is_running: + tasks_for_agents = { + task.wait(): agent_name + for agent_name, task in self._agents_tasks.items() + } + wait_tasks = list(tasks_for_agents.keys()) + [self._event.wait()] # type: ignore + done, _ = await asyncio.wait(wait_tasks, return_when=FIRST_COMPLETED) + + if self._event.is_set(): + self._event.clear() + + for task in done: + if task not in tasks_for_agents: + await task + continue + agent_name = tasks_for_agents[task] + self._agents_tasks.pop(agent_name) + if task.exception(): + print(agent_name, "exceptioned", task.exception()) + for callback in self._error_callbacks: + callback(agent_name, task.exception()) + else: + await task def start_manager(self) -> None: """Start manager.""" self._ensure_working_dir() - self.is_started = True + self._started_event.clear() + self._is_running = True + self._thread.start() + self._started_event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) def stop_manager(self, cleanup: bool = False) -> None: """ @@ -103,10 +250,16 @@ def stop_manager(self, cleanup: bool = False) -> None: :return: None """ + if not self._loop or not self._event: + raise ValueError("Manager was not started!") if self._was_working_dir_created: rmtree(self.working_dir) - self.is_started = False + if self._thread.is_alive(): + self.stop_all_agents() + self._is_running = False + self._loop.call_soon_threadsafe(self._event.set) + self._thread.join(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) def add_project(self, public_id: PublicId) -> None: """Fetch agent project and all dependencies to working_dir.""" @@ -119,6 +272,11 @@ def remove_project(self, public_id: PublicId) -> None: if public_id not in self._projects: raise ValueError(f"Project {public_id} was not added!") + if self._projects[public_id].agents: + raise ValueError( + f"Can not remove projects with aliases exists: {self._projects[public_id].agents}" + ) + self._projects.pop(public_id).remove() def list_projects(self) -> List[PublicId]: @@ -171,6 +329,8 @@ def list_agents(self, running_only: bool = False) -> List[str]: :return: list of agents names """ + if running_only: + return list(self._agents_tasks.keys()) return list(self._agents.keys()) def remove_agent(self, agent_name: str) -> None: @@ -184,6 +344,9 @@ def remove_agent(self, agent_name: str) -> None: if agent_name not in self._agents: raise ValueError(f"Agent with name {agent_name} does not exist!") + if self._is_agent_running(agent_name): + raise ValueError("Agent is running. stop it first!") + agent_alias = self._agents.pop(agent_name) agent_alias.remove() @@ -195,6 +358,33 @@ def start_agent(self, agent_name: str) -> None: :return: None """ + if not self._loop or not self._event: + raise ValueError("agent is not started!") + + agent_alias = self._agents.get(agent_name) + if not agent_alias: + raise ValueError(f"{agent_name} is not registered!") + if self._is_agent_running(agent_name): + raise ValueError(f"{agent_name} is already started!") + + if self._mode == "async": + task = AsyncTask(agent_alias.agent, self._loop) + elif self._mode == "threaded": + task = ThreadedTask(agent_alias.agent, self._loop) + + task.start() + self._agents_tasks[agent_name] = task + self._loop.call_soon_threadsafe(self._event.set) + + def _is_agent_running(self, agent_name): + if agent_name not in self._agents_tasks: + return False + + task = self._agents_tasks[agent_name] + if task.is_running: + return True + del self._agents_tasks[agent_name] + return False def start_all_agents(self) -> None: """ @@ -202,6 +392,10 @@ def start_all_agents(self) -> None: :return: None """ + for agent_name in self.list_agents(): + if self._is_agent_running(agent_name): + continue + self.start_agent(agent_name) def stop_agent(self, agent_name: str) -> None: """ @@ -211,6 +405,16 @@ def stop_agent(self, agent_name: str) -> None: :return: None """ + if not self._is_agent_running(agent_name): + raise ValueError(f"{agent_name} is not running!") + if self._thread.ident == threading.get_ident(): + # In same thread do not perform blocking operations! + self._agents_tasks[agent_name].stop() + return + event = threading.Event() + self._agents_tasks[agent_name].wait().add_done_callback(lambda x: event.set()) + self._agents_tasks[agent_name].stop() + event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) def stop_all_agents(self) -> None: """ @@ -218,6 +422,8 @@ def stop_all_agents(self) -> None: :return: None """ + for agent_name in self.list_agents(running_only=True): + self.stop_agent(agent_name) def stop_agents(self, agent_names: List[str]) -> None: """ @@ -225,6 +431,12 @@ def stop_agents(self, agent_names: List[str]) -> None: :return: None """ + for agent_name in agent_names: + if not self._is_agent_running(agent_name): + raise ValueError(f"{agent_name} is not running!") + + for agent_name in agent_names: + self.stop_agent(agent_name) def start_agents(self, agent_names: List[str]) -> None: """ @@ -232,6 +444,8 @@ def start_agents(self, agent_names: List[str]) -> None: :return: None """ + for agent_name in agent_names: + self.start_agent(agent_name) def get_agent_details(self, agent_name: str) -> AgentAlias: """ @@ -267,6 +481,7 @@ def _build_agent_alias( builder = AEABuilder.from_config_json(json_config, project.path) builder.set_name(agent_name) + # builder.set_runtime_mode("async") if not builder.private_key_paths: default_ledger = json_config[0].get("default_ledger", DEFAULT_LEDGER) diff --git a/tests/test_manager.py b/tests/test_manager.py index e5a4c6af57..170ea6b96e 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -18,9 +18,9 @@ # ------------------------------------------------------------------------------ """This module contains tests for aea manager.""" import os +import time from contextlib import suppress from shutil import rmtree -from typing import Dict, List, Optional, Set import pytest @@ -30,7 +30,7 @@ def test_manager(): """Perform some tests.""" - + # pydocsyle try: working_dir = "manager_dir" project_public_id = PublicId("fetchai", "my_first_aea", "0.11.0") @@ -41,7 +41,7 @@ def test_manager(): manager = Manager(working_dir) manager.start_manager() assert os.path.exists(working_dir) - assert manager.is_started + assert manager.is_running manager.add_project(project_public_id) @@ -84,13 +84,24 @@ def test_manager(): project_public_id, agent_name, ) assert agent_name in manager.list_agents() + manager.start_all_agents() + assert agent_name in manager.list_agents(running_only=True) + manager.start_all_agents() + + with pytest.raises(ValueError, match="is already started!"): + manager.start_agents(manager.list_agents()) + + with pytest.raises(ValueError, match="Agent is running. stop it first!"): + manager.remove_agent(agent_name) + + time.sleep(2) + manager.stop_all_agents() manager.remove_agent(agent_name) assert agent_name not in manager.list_agents() with pytest.raises(ValueError, match="does not exist!"): manager.remove_agent(agent_name) - manager.remove_project(project_public_id) assert project_public_id not in manager._projects assert not os.path.exists(project_path) @@ -98,10 +109,9 @@ def test_manager(): with pytest.raises(ValueError, match=r"was not added"): manager.remove_project(project_public_id) - manager.stop_manager() assert not os.path.exists(working_dir) - assert not manager.is_started + assert not manager.is_running finally: with suppress(FileNotFoundError): rmtree(working_dir) From 659bb2da99d4fe12b5a2c28fb4c03ed823660882 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 28 Sep 2020 15:52:27 +0200 Subject: [PATCH 094/131] add jsonschema for skill configurable part --- .../skill-custom_config.json | 37 +++++++++++++++++++ .../schemas/skill-config_schema.json | 31 ++++++++++------ 2 files changed, 57 insertions(+), 11 deletions(-) create mode 100644 aea/configurations/schemas/configurable_parts/skill-custom_config.json diff --git a/aea/configurations/schemas/configurable_parts/skill-custom_config.json b/aea/configurations/schemas/configurable_parts/skill-custom_config.json new file mode 100644 index 0000000000..1b2befcd2a --- /dev/null +++ b/aea/configurations/schemas/configurable_parts/skill-custom_config.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Schema for the configurable part of a skill configuration file.", + "additionalProperties": false, + "required": [ + "name", + "author", + "version", + "type" + ], + "properties": { + "name": { + "$ref": "definitions.json#/definitions/resource_name" + }, + "author": { + "$ref": "definitions.json#/definitions/author" + }, + "version": { + "$ref": "definitions.json#/definitions/package_version" + }, + "type": { + "$ref": "definitions.json#/definitions/component_type" + }, + "handlers": { + "$ref": "skill-config_schema.json#/definitions/handlers" + }, + "behaviours": { + "$ref": "skill-config_schema.json#/definitions/behaviours" + }, + "models": { + "$ref": "skill-config_schema.json#/definitions/models" + }, + "is_abstract": { + "$ref": "skill-config_schema.json#/properties/is_abstract" + } + } +} diff --git a/aea/configurations/schemas/skill-config_schema.json b/aea/configurations/schemas/skill-config_schema.json index bfb97e3d9d..69f0532f36 100644 --- a/aea/configurations/schemas/skill-config_schema.json +++ b/aea/configurations/schemas/skill-config_schema.json @@ -62,6 +62,26 @@ "$ref": "definitions.json#/definitions/public_id" } }, + "handlers": { + "$ref": "#/definitions/handlers" + }, + "behaviours": { + "$ref": "#/definitions/behaviours" + }, + "models": { + "$ref": "#/definitions/models" + }, + "dependencies": { + "$ref": "definitions.json#/definitions/dependencies" + }, + "description": { + "$ref": "definitions.json#/definitions/description" + }, + "is_abstract": { + "type": "boolean" + } + }, + "definitions": { "handlers": { "type": "object", "additionalProperties": false, @@ -90,17 +110,6 @@ } } }, - "dependencies": { - "$ref": "definitions.json#/definitions/dependencies" - }, - "description": { - "$ref": "definitions.json#/definitions/description" - }, - "is_abstract": { - "type": "boolean" - } - }, - "definitions": { "behaviour": { "type": "object", "additionalProperties": false, From 843cf906e8f87975485701b928326223f84839ca Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Mon, 28 Sep 2020 15:48:28 +0100 Subject: [PATCH 095/131] Update aea/helpers/async_utils.py --- aea/helpers/async_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aea/helpers/async_utils.py b/aea/helpers/async_utils.py index 54022720c1..80c6218b5b 100644 --- a/aea/helpers/async_utils.py +++ b/aea/helpers/async_utils.py @@ -486,7 +486,7 @@ def __init__( """ if loop and threaded: raise ValueError( - "You can not set a loop in threaded mode, cause own loop will be created" + "You can not set a loop in threaded mode. A separate loop will be created in each thread." ) self._loop = loop self._threaded = threaded From 26feda7686abb174318b408a730b16a4e4c9345f Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Mon, 28 Sep 2020 18:53:32 +0200 Subject: [PATCH 096/131] use jsonschema validators for custom configs --- aea/configurations/base.py | 14 +- aea/configurations/loader.py | 152 +++++++++--------- .../base-custom_config.json | 25 +++ .../connection-custom_config.json | 28 ++++ .../skill-custom_config.json | 2 +- 5 files changed, 135 insertions(+), 86 deletions(-) create mode 100644 aea/configurations/schemas/configurable_parts/base-custom_config.json create mode 100644 aea/configurations/schemas/configurable_parts/connection-custom_config.json diff --git a/aea/configurations/base.py b/aea/configurations/base.py index d59c28b5bd..ff92bf616b 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -753,7 +753,6 @@ class PackageConfiguration(Configuration, ABC): default_configuration_filename: str package_type: PackageType - configurable_fields: Set[str] = set() def __init__( self, @@ -930,7 +929,6 @@ class ConnectionConfig(ComponentConfiguration): default_configuration_filename = DEFAULT_CONNECTION_CONFIG_FILE package_type = PackageType.CONNECTION - configurable_fields = {"config"} def __init__( self, @@ -1166,7 +1164,6 @@ class SkillConfig(ComponentConfiguration): default_configuration_filename = DEFAULT_SKILL_CONFIG_FILE package_type = PackageType.SKILL - configurable_fields = {"handlers", "behaviours", "models", "is_abstract"} def __init__( self, @@ -1518,16 +1515,7 @@ def default_ledger(self, ledger_id: str): def component_configurations_json(self) -> List[OrderedDict]: """Get the component configurations in JSON format.""" - return [ - OrderedDict( - name=component_id.name, - author=component_id.author, - version=component_id.version, - type=component_id.component_type.value, - **obj, - ) - for component_id, obj in self.component_configurations.items() - ] + return list(map(OrderedDict, self.component_configurations.values())) @property def json(self) -> Dict: diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index 8a5c1e84d0..515dcfd615 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -25,7 +25,7 @@ import re from copy import deepcopy from pathlib import Path -from typing import Dict, Generic, List, TextIO, Tuple, Type, TypeVar, Union, cast +from typing import Dict, Generic, List, TextIO, Type, TypeVar, Union, cast import jsonschema import yaml @@ -45,7 +45,6 @@ PublicId, SkillConfig, ) -from aea.exceptions import enforce from aea.helpers.base import yaml_dump, yaml_dump_all, yaml_load, yaml_load_all @@ -77,37 +76,74 @@ def make_jsonschema_base_uri(base_uri_path: Path) -> str: return root_path -class ConfigLoader(Generic[T]): - """This class implement parsing, serialization and validation functionalities for the 'aea' configuration files.""" +def _get_path_to_custom_config_schema_from_type(component_type: ComponentType) -> str: + """ + Get the path to the custom config schema - def __init__(self, schema_filename: str, configuration_class: Type[T]): + :param component_type: a component type. + :return: the path to the JSON schema file. + """ + path_prefix: Path = Path(_SCHEMAS_DIR) / "configurable_parts" + if component_type in {ComponentType.SKILL, ComponentType.CONNECTION}: + filename_prefix = component_type.value + else: + filename_prefix = "base" + full_path = path_prefix / (filename_prefix + "-custom_config.json") + return str(full_path) + + +class BaseConfigLoader: + """Base class for configuration loader classes.""" + + def __init__(self, schema_filename: str): """ - Initialize the parser for configuration files. + Initialize the base configuration loader. - :param schema_filename: the path to the JSON-schema file in 'aea/configurations/schemas'. - :param configuration_class: the configuration class (e.g. AgentConfig, SkillConfig etc.) + :param schema_filename: the path to the schema. """ base_uri = Path(_SCHEMAS_DIR) self._schema = json.load((base_uri / schema_filename).open()) root_path = make_jsonschema_base_uri(base_uri) self._resolver = jsonschema.RefResolver(root_path, self._schema) self._validator = Draft4Validator(self._schema, resolver=self._resolver) - self._configuration_class = configuration_class # type: Type[T] @property def validator(self) -> Draft4Validator: """Get the json schema validator.""" return self._validator + def validate(self, json_data: Dict) -> None: + """ + Validate a JSON object. + + :param json_data: the JSON data. + :return: None. + """ + self.validator.validate(json_data) + @property def required_fields(self) -> List[str]: """ - Get required fields. + Get the required fields. :return: list of required fields. """ return self._schema["required"] + +class ConfigLoader(Generic[T], BaseConfigLoader): + """Parsing, serialization and validation for package configuration files.""" + + def __init__(self, schema_filename: str, configuration_class: Type[T]): + """ + Initialize the parser for configuration files. + + :param schema_filename: the path to the JSON-schema file in 'aea/configurations/schemas'. + :param configuration_class: the configuration class (e.g. AgentConfig, SkillConfig etc.) + """ + super().__init__(schema_filename) + self._configuration_class = configuration_class # type: Type[T] + @property def configuration_class(self) -> Type[T]: """Get the configuration class of the loader.""" @@ -245,20 +281,33 @@ def _load_agent_config(self, file_pointer: TextIO) -> AgentConfig: key_order ) + component_configurations = self._get_component_configurations( + configuration_file_jsons + ) + agent_configuration_obj.component_configurations = component_configurations + return agent_configuration_obj + + def _get_component_configurations( + self, configuration_file_jsons + ) -> Dict[ComponentId, Dict]: + """ + Get the component configurations from the tail pages of the aea-config.yaml file. + + :param configuration_file_jsons: the JSON objects of the custom configurations of a aea-config.yaml file. + :return: a dictionary whose keys are component ids and values are the configurations. + """ component_configurations: Dict[ComponentId, Dict] = {} # load the other components. for i, component_configuration_json in enumerate(configuration_file_jsons[1:]): - component_id, component_config = self._process_component_section( + component_id = self._process_component_section( i, component_configuration_json ) if component_id in component_configurations: raise ValueError( f"Configuration of component {component_id} occurs more than once." ) - component_configurations[component_id] = component_config - - agent_configuration_obj.component_configurations = component_configurations - return agent_configuration_obj + component_configurations[component_id] = component_configuration_json + return component_configurations def _dump_agent_config( self, configuration: AgentConfig, file_pointer: TextIO @@ -278,7 +327,7 @@ def _dump_component_config(self, configuration: T, file_pointer: TextIO) -> None def _process_component_section( self, i: int, component_configuration_json: Dict - ) -> Tuple[ComponentId, Dict]: + ) -> ComponentId: """ Process a component configuration in an agent configuration file. @@ -291,17 +340,18 @@ def _process_component_section( :param component_configuration_json: the JSON object. :return: the processed component configuration. """ - component_id, result = self._split_component_id_and_config( + component_id = self._split_component_id_and_config( i, component_configuration_json ) - self._validate_component_configuration(component_id, result) - self._check_only_configurable_fields(component_id, result) - return component_id, result + self._validate_component_configuration( + component_id, component_configuration_json + ) + return component_id @staticmethod def _split_component_id_and_config( i: int, component_configuration_json: Dict - ) -> Tuple[ComponentId, Dict]: + ) -> ComponentId: """ Split component id and configuration. @@ -310,7 +360,6 @@ def _split_component_id_and_config( :return: the component id and the configuration object. :raises ValueError: if the component id cannot be extracted. """ - result = deepcopy(component_configuration_json) # author, name, version, type are mandatory fields missing_fields = {"author", "name", "version", "type"}.difference( component_configuration_json.keys() @@ -319,15 +368,15 @@ def _split_component_id_and_config( raise ValueError( f"There are missing fields in component id {i + 1}: {missing_fields}." ) - component_name = result.pop("name") - component_author = result.pop("author") - component_version = result.pop("version") - component_type = ComponentType(result.pop("type")) + component_name = component_configuration_json["name"] + component_author = component_configuration_json["author"] + component_version = component_configuration_json["version"] + component_type = ComponentType(component_configuration_json["type"]) component_public_id = PublicId( component_author, component_name, component_version ) component_id = ComponentId(component_type, component_public_id) - return component_id, result + return component_id @staticmethod def _validate_component_configuration( @@ -343,56 +392,15 @@ def _validate_component_configuration( :return: None :raises ValueError: if the configuration is not valid. """ - # we need to populate the required fields to validate the configurations. - temporary_config = deepcopy(configuration) - # common to every package - temporary_config["name"] = component_id.name - temporary_config["author"] = component_id.author - temporary_config["version"] = component_id.version - temporary_config["license"] = "some_license" - temporary_config["aea_version"] = "0.1.0" - if component_id.component_type == ComponentType.PROTOCOL: - pass # no other required field - elif component_id.component_type == ComponentType.CONNECTION: - temporary_config["class_name"] = "SomeClassName" - temporary_config["protocols"] = [] - temporary_config.setdefault("config", {}) - elif component_id.component_type == ComponentType.CONTRACT: - temporary_config["class_name"] = "SomeClassName" - elif component_id.component_type == ComponentType.SKILL: - temporary_config["protocols"] = [] - temporary_config["contracts"] = [] - temporary_config["skills"] = [] - loader = ConfigLoaders.from_package_type(component_id.package_type) + schema_file = _get_path_to_custom_config_schema_from_type( + component_id.component_type + ) try: - loader._load_from_json(temporary_config) # pylint: disable=protected-access + BaseConfigLoader(schema_file).validate(configuration) except jsonschema.ValidationError as e: raise ValueError( f"Configuration of component {component_id} is not valid." ) from e - # all good! - - @staticmethod - def _check_only_configurable_fields( - component_id: ComponentId, configuration: Dict - ) -> None: - """ - Check that there are only configurable fields. - - :param component_id: the component id. - :param configuration: the configuration object. - :return: None - """ - configurable_fields = ( - component_id.package_type.configuration_class().configurable_fields - ) - non_configurable_fields = set(configuration.keys()).difference( - configurable_fields - ) - enforce( - len(non_configurable_fields) == 0, - f"Bad configuration for component {component_id}: {non_configurable_fields} are non-configurable fields.", - ) class ConfigLoaders: diff --git a/aea/configurations/schemas/configurable_parts/base-custom_config.json b/aea/configurations/schemas/configurable_parts/base-custom_config.json new file mode 100644 index 0000000000..7e44b416bf --- /dev/null +++ b/aea/configurations/schemas/configurable_parts/base-custom_config.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Base schema for a custom component configuration in the agent configuration file.", + "additionalProperties": false, + "required": [ + "name", + "author", + "version", + "type" + ], + "properties": { + "name": { + "$ref": "definitions.json#/definitions/resource_name" + }, + "author": { + "$ref": "definitions.json#/definitions/author" + }, + "version": { + "$ref": "definitions.json#/definitions/package_version" + }, + "type": { + "$ref": "definitions.json#/definitions/component_type" + } + } +} diff --git a/aea/configurations/schemas/configurable_parts/connection-custom_config.json b/aea/configurations/schemas/configurable_parts/connection-custom_config.json new file mode 100644 index 0000000000..a81b002836 --- /dev/null +++ b/aea/configurations/schemas/configurable_parts/connection-custom_config.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Schema for the configurable part of a connection configuration in the agent configuration file.", + "additionalProperties": false, + "required": [ + "name", + "author", + "version", + "type" + ], + "properties": { + "name": { + "$ref": "definitions.json#/definitions/resource_name" + }, + "author": { + "$ref": "definitions.json#/definitions/author" + }, + "version": { + "$ref": "definitions.json#/definitions/package_version" + }, + "type": { + "$ref": "definitions.json#/definitions/component_type" + }, + "config": { + "type": "object" + } + } +} diff --git a/aea/configurations/schemas/configurable_parts/skill-custom_config.json b/aea/configurations/schemas/configurable_parts/skill-custom_config.json index 1b2befcd2a..a1c43e2618 100644 --- a/aea/configurations/schemas/configurable_parts/skill-custom_config.json +++ b/aea/configurations/schemas/configurable_parts/skill-custom_config.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Schema for the configurable part of a skill configuration file.", + "description": "Schema for the configurable part of a skill configuration in the agent configuration file.", "additionalProperties": false, "required": [ "name", From b6e46346be05818745ceedc571b75bbaae4634f7 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Mon, 28 Sep 2020 21:59:11 +0300 Subject: [PATCH 097/131] fixes --- aea/aea_builder.py | 21 +++++++-- aea/cli/registry/fetch.py | 11 ++--- aea/configurations/loader.py | 19 +++++--- aea/configurations/project.py | 50 +++++++++++++++++++++ aea/manager.py | 84 ++++++++++++++++------------------- 5 files changed, 124 insertions(+), 61 deletions(-) create mode 100644 aea/configurations/project.py diff --git a/aea/aea_builder.py b/aea/aea_builder.py index 54e89d1642..99ceef4f71 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -1348,13 +1348,25 @@ def from_aea_project( @classmethod def from_config_json( - cls, json_data, aea_project_path: PathLike, skip_consistency_check: bool = False - ): + cls, + json_data: List[Dict], + aea_project_path: PathLike, + skip_consistency_check: bool = False, + ) -> "AEABuilder": + """ + Load agent configuration for alreaady provided json data. + + :param json_data: list of dicts with agent configuration + :param aea_project_path: path to project root + :param skip_consistency_check: skip consistency check on configs load. + + :return: AEABuilder instance + """ aea_project_path = Path(aea_project_path) builder = AEABuilder(with_default_packages=False) # load agent configuration file - agent_configuration = cls.loader._load_agent_config_from_json(json_data) + agent_configuration = cls.loader.load_agent_config_from_json(json_data) builder.set_from_configuration( agent_configuration, aea_project_path, skip_consistency_check @@ -1362,7 +1374,8 @@ def from_config_json( return builder @staticmethod - def get_configuration_file_path(aea_project_path): + def get_configuration_file_path(aea_project_path: Union[Path, str]) -> Path: + """Return path to aea-config file for the given aea project path.""" return Path(aea_project_path) / DEFAULT_AEA_CONFIG_FILE def _load_and_add_components( diff --git a/aea/cli/registry/fetch.py b/aea/cli/registry/fetch.py index cf0270c391..7d03503cb9 100644 --- a/aea/cli/registry/fetch.py +++ b/aea/cli/registry/fetch.py @@ -16,12 +16,10 @@ # limitations under the License. # # ------------------------------------------------------------------------------ -from aea.helpers.base import cd -import shutil - """Methods for CLI fetch functionality.""" import os +import shutil from typing import Optional import click @@ -39,7 +37,7 @@ def fetch_agent( ctx: Context, public_id: PublicId, alias: Optional[str] = None, - dir: Optional[str] = None, + target_dir: Optional[str] = None, ) -> None: """ Fetch Agent from Registry. @@ -57,14 +55,13 @@ def fetch_agent( filepath = download_file(file_url, ctx.cwd) - folder_name = dir or (name if alias is None else alias) + folder_name = target_dir or (name if alias is None else alias) aea_folder = os.path.join(ctx.cwd, folder_name) - print(aea_folder) ctx.clean_paths.append(aea_folder) extract(filepath, ctx.cwd) - if alias or dir: + if alias or target_dir: shutil.move( os.path.join(ctx.cwd, name), aea_folder, ) diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index 4956406c95..eef1a20ff1 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -229,10 +229,19 @@ def _load_from_json(self, configuration_file_json: Dict) -> T: configuration_obj._key_order = key_order # pylint: disable=protected-access return configuration_obj - def _load_agent_config_from_json(self, configuration_file_jsons) -> AgentConfig: - if len(configuration_file_jsons) == 0: + def load_agent_config_from_json( + self, configuration_json: List[Dict] + ) -> AgentConfig: + """ + Load agent configuration from configuration json data. + + :param configuration_json: list of dicts with aea configuration + + :return: AgentConfig instance + """ + if len(configuration_json) == 0: raise ValueError("Agent configuration file was empty.") - agent_config_json = configuration_file_jsons[0] + agent_config_json = configuration_json[0] self._validate(agent_config_json) key_order = list(agent_config_json.keys()) agent_configuration_obj = cast( @@ -244,7 +253,7 @@ def _load_agent_config_from_json(self, configuration_file_jsons) -> AgentConfig: component_configurations: Dict[ComponentId, Dict] = {} # load the other components. - for i, component_configuration_json in enumerate(configuration_file_jsons[1:]): + for i, component_configuration_json in enumerate(configuration_json[1:]): component_id, component_config = self._process_component_section( i, component_configuration_json ) @@ -260,7 +269,7 @@ def _load_agent_config_from_json(self, configuration_file_jsons) -> AgentConfig: def _load_agent_config(self, file_pointer: TextIO) -> AgentConfig: """Load an agent configuration.""" configuration_file_jsons = yaml_load_all(file_pointer) - return self._load_agent_config_from_json(configuration_file_jsons) + return self.load_agent_config_from_json(configuration_file_jsons) def _dump_agent_config( self, configuration: AgentConfig, file_pointer: TextIO diff --git a/aea/configurations/project.py b/aea/configurations/project.py new file mode 100644 index 0000000000..8aeace45b8 --- /dev/null +++ b/aea/configurations/project.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2018-2020 Fetch.AI Limited +# +# 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. +# +# ------------------------------------------------------------------------------ +"""This module contains the implementation of AEA agents project configuiration.""" +import os +from shutil import rmtree +from typing import Set + +from aea.cli.registry.fetch import fetch_agent +from aea.cli.utils.context import Context +from aea.configurations.base import PublicId + + +class Project: + """Agent project representation.""" + + def __init__(self, public_id: PublicId, path: str): + """Init project with public_id and project's path.""" + self.public_id: PublicId = public_id + self.path: str = path + self.agents: Set[str] = set() + + @classmethod + def load(cls, working_dir: str, public_id: PublicId) -> "Project": + """Load project with given pubblic_id to working_dir.""" + ctx = Context(cwd=working_dir) + path = os.path.join(working_dir, public_id.author, public_id.name) + fetch_agent( + ctx, public_id, target_dir=os.path.join(public_id.author, public_id.name) + ) + return cls(public_id, path) + + def remove(self) -> None: + """Remove project, do cleanup.""" + rmtree(self.path) diff --git a/aea/manager.py b/aea/manager.py index de92bf7edb..d39e89b296 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -16,6 +16,7 @@ # limitations under the License. # # ------------------------------------------------------------------------------ + """This module contains the implementation of AEA agents manager.""" import asyncio import copy @@ -24,40 +25,17 @@ from asyncio.tasks import FIRST_COMPLETED from shutil import rmtree from threading import Thread -from typing import Callable, Dict, List, Optional, Set +from typing import Callable, Dict, List, Optional from aea.aea import AEA from aea.aea_builder import AEABuilder -from aea.cli.registry.fetch import fetch_agent -from aea.cli.utils.context import Context from aea.configurations.base import ComponentId, PublicId from aea.configurations.constants import DEFAULT_LEDGER +from aea.configurations.project import Project from aea.crypto.helpers import create_private_key from aea.helpers.base import yaml_load_all -class Project: - """Agent project representation.""" - - def __init__(self, public_id: PublicId, path: str): - """Init project with public_id and project's path.""" - self.public_id = public_id - self.path = path - self.agents: Set[str] = set() - - @classmethod - def load(cls, working_dir, public_id) -> "Project": - """Load project with given pubblic_id to working_dir.""" - ctx = Context(cwd=working_dir) - path = os.path.join(working_dir, public_id.author, public_id.name) - fetch_agent(ctx, public_id, dir=os.path.join(public_id.author, public_id.name)) - return cls(public_id, path) - - def remove(self): - """Remove project, do cleanup.""" - rmtree(self.path) - - class AgentAlias: """Agent alias representation.""" @@ -116,7 +94,7 @@ async def _run_wrapper(self) -> None: self.caller_loop.call_soon_threadsafe(self._done_future.set_result, None) except asyncio.CancelledError: self.caller_loop.call_soon_threadsafe(self._done_future.set_result, None) - except Exception as e: + except Exception as e: # pylint: disable=broad-except self.caller_loop.call_soon_threadsafe(self._done_future.set_exception, e) async def run(self) -> None: @@ -232,22 +210,21 @@ async def _manager_loop(self) -> None: else: await task - def start_manager(self) -> None: + def start_manager(self) -> "Manager": """Start manager.""" self._ensure_working_dir() self._started_event.clear() self._is_running = True self._thread.start() self._started_event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) + return self - def stop_manager(self, cleanup: bool = False) -> None: + def stop_manager(self) -> "Manager": """ Stop manager. Stops all running agents and stop agent. - :param cleanup: remove agents_dir and purge in memory registry. - :return: None """ if not self._loop or not self._event: @@ -260,14 +237,16 @@ def stop_manager(self, cleanup: bool = False) -> None: self._is_running = False self._loop.call_soon_threadsafe(self._event.set) self._thread.join(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) + return self - def add_project(self, public_id: PublicId) -> None: + def add_project(self, public_id: PublicId) -> "Manager": """Fetch agent project and all dependencies to working_dir.""" if public_id in self._projects: raise ValueError(f"Project {public_id} was already added!") self._projects[public_id] = Project.load(self.working_dir, public_id) + return self - def remove_project(self, public_id: PublicId) -> None: + def remove_project(self, public_id: PublicId) -> "Manager": """Remove agent project.""" if public_id not in self._projects: raise ValueError(f"Project {public_id} was not added!") @@ -278,6 +257,7 @@ def remove_project(self, public_id: PublicId) -> None: ) self._projects.pop(public_id).remove() + return self def list_projects(self) -> List[PublicId]: """ @@ -293,7 +273,7 @@ def add_agent( agent_name: str, agent_overrides: Optional[dict] = None, component_overrides: Optional[List[dict]] = None, - ) -> None: + ) -> "Manager": """ Create new agent configuration based on project with config overrides applied. @@ -304,7 +284,7 @@ def add_agent( :param agent_overrides: overrides for agent config. :param component_overrides: overrides for component section. - :return: None + :return: manager """ if agent_name in self._agents: raise ValueError(f"Agent with name {agent_name} already exists!") @@ -320,6 +300,7 @@ def add_agent( component_overrides=component_overrides, ) self._agents[agent_name] = agent_alias + return self def list_agents(self, running_only: bool = False) -> List[str]: """ @@ -333,7 +314,7 @@ def list_agents(self, running_only: bool = False) -> List[str]: return list(self._agents_tasks.keys()) return list(self._agents.keys()) - def remove_agent(self, agent_name: str) -> None: + def remove_agent(self, agent_name: str) -> "Manager": """ Remove agent alias definition from registry. @@ -349,8 +330,9 @@ def remove_agent(self, agent_name: str) -> None: agent_alias = self._agents.pop(agent_name) agent_alias.remove() + return self - def start_agent(self, agent_name: str) -> None: + def start_agent(self, agent_name: str) -> "Manager": """ Start selected agent. @@ -375,6 +357,7 @@ def start_agent(self, agent_name: str) -> None: task.start() self._agents_tasks[agent_name] = task self._loop.call_soon_threadsafe(self._event.set) + return self def _is_agent_running(self, agent_name): if agent_name not in self._agents_tasks: @@ -386,7 +369,7 @@ def _is_agent_running(self, agent_name): del self._agents_tasks[agent_name] return False - def start_all_agents(self) -> None: + def start_all_agents(self) -> "Manager": """ Start all not started agents. @@ -397,7 +380,9 @@ def start_all_agents(self) -> None: continue self.start_agent(agent_name) - def stop_agent(self, agent_name: str) -> None: + return self + + def stop_agent(self, agent_name: str) -> "Manager": """ Stop running agent. @@ -410,13 +395,15 @@ def stop_agent(self, agent_name: str) -> None: if self._thread.ident == threading.get_ident(): # In same thread do not perform blocking operations! self._agents_tasks[agent_name].stop() - return + return self event = threading.Event() self._agents_tasks[agent_name].wait().add_done_callback(lambda x: event.set()) self._agents_tasks[agent_name].stop() event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) - def stop_all_agents(self) -> None: + return self + + def stop_all_agents(self) -> "Manager": """ Stop all agents running. @@ -425,7 +412,9 @@ def stop_all_agents(self) -> None: for agent_name in self.list_agents(running_only=True): self.stop_agent(agent_name) - def stop_agents(self, agent_names: List[str]) -> None: + return self + + def stop_agents(self, agent_names: List[str]) -> "Manager": """ Stop specified agents. @@ -438,7 +427,9 @@ def stop_agents(self, agent_names: List[str]) -> None: for agent_name in agent_names: self.stop_agent(agent_name) - def start_agents(self, agent_names: List[str]) -> None: + return self + + def start_agents(self, agent_names: List[str]) -> "Manager": """ Stop specified agents. @@ -447,9 +438,11 @@ def start_agents(self, agent_names: List[str]) -> None: for agent_name in agent_names: self.start_agent(agent_name) - def get_agent_details(self, agent_name: str) -> AgentAlias: + return self + + def get_agent_alias(self, agent_name: str) -> AgentAlias: """ - Return details about agent definition. + Return details about agent alias definition. :return: AgentAlias """ @@ -491,7 +484,8 @@ def _build_agent_alias( agent = builder.build() return AgentAlias(project, agent_name, json_config, agent) - def _update_dict(self, base: dict, override: dict) -> dict: + @staticmethod + def _update_dict(base: dict, override: dict) -> dict: """Apply overrides for dict.""" base = copy.deepcopy(base) base.update(override) From 807044747fe3d00d7cc42db8ee21ec5d28c4835e Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Mon, 28 Sep 2020 22:02:28 +0300 Subject: [PATCH 098/131] small fix --- aea/runtime.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aea/runtime.py b/aea/runtime.py index 04e70e1ed9..e6af111556 100644 --- a/aea/runtime.py +++ b/aea/runtime.py @@ -299,9 +299,11 @@ async def run_runtime(self) -> None: async def _start_multiplexer(self) -> None: """Call multiplexer connect asynchronous way.""" - self.setup_multiplexer() - if not self._loop: + if not self._loop: # pragma: nocover raise ValueError("no loop is set for runtime.") + + self.setup_multiplexer() + self.multiplexer.set_loop(self._loop) self.multiplexer.start() await self.multiplexer.wait_completed() From 16cf1a1634f454a6eaf5d44f2db0ad2e2031c97a Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 29 Sep 2020 11:42:39 +0200 Subject: [PATCH 099/131] Update only arguments of components --- aea/aea_builder.py | 28 +++++-- aea/configurations/base.py | 50 +++++++++---- .../skill-custom_config.json | 74 ++++++++++++++++++- aea/helpers/base.py | 35 +++++++++ tests/conftest.py | 4 +- tests/data/aea-config.example_multipage.yaml | 4 - tests/test_configurations/test_base.py | 45 +++++++++-- 7 files changed, 201 insertions(+), 39 deletions(-) diff --git a/aea/aea_builder.py b/aea/aea_builder.py index ee5b77abe8..3e71026779 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -1372,18 +1372,13 @@ def _load_and_add_components( logging.Logger, make_logger(configuration, agent_name) ) else: - configuration = deepcopy(configuration) - configuration.update( - self._custom_component_configurations.get( - configuration.component_id, {} - ) - ) if configuration.is_abstract_component: load_aea_package(configuration) continue - _logger = make_logger(configuration, agent_name) + new_configuration = self._overwrite_custom_configuration(configuration) + _logger = make_logger(new_configuration, agent_name) component = load_component_from_config( - configuration, logger=_logger, **kwargs + new_configuration, logger=_logger, **kwargs ) resources.add_component(component) @@ -1397,6 +1392,23 @@ def _check_we_can_build(self): "Please call 'reset() if you want to build another agent." ) + def _overwrite_custom_configuration(self, configuration: ComponentConfiguration): + """ + Overwrite custom configurations. + + It deep-copies the configuration, to avoid undesired side-effects. + + :param configuration: the configuration object. + :param custom_config: the configurations to apply. + :return: the new configuration instance. + """ + new_configuration = deepcopy(configuration) + custom_config = self._custom_component_configurations.get( + new_configuration.component_id, {} + ) + new_configuration.update(custom_config) + return new_configuration + def make_logger( configuration: ComponentConfiguration, agent_name: str, diff --git a/aea/configurations/base.py b/aea/configurations/base.py index ff92bf616b..48cd40aa98 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -53,6 +53,7 @@ from aea.__version__ import __version__ as __aea_version__ from aea.exceptions import enforce +from aea.helpers.base import merge_update from aea.helpers.ipfs.base import IPFSHashOnly @@ -1058,10 +1059,13 @@ def update(self, data: Dict) -> None: """ Update configuration with other data. - :param data: the data to replace. + This method does side-effect on the configuration object. + + :param data: the data to populate or replace. :return: None """ - self.config = data.get("config", self.config) + new_config = data.get("config", {}) + merge_update(self.config, new_config) class ProtocolConfig(ComponentConfiguration): @@ -1318,18 +1322,34 @@ def update(self, data: Dict) -> None: :param data: the data to replace. :return: None """ - for behaviour_id, behaviour_data in data.get("behaviours", {}).items(): - behaviour_config = SkillComponentConfiguration.from_json(behaviour_data) - self.behaviours.update(behaviour_id, behaviour_config) - for handler_id, handler_data in data.get("handlers", {}).items(): - handler_config = SkillComponentConfiguration.from_json(handler_data) - self.handlers.update(handler_id, handler_config) + def _update_skill_component_config(type_plural: str, data: Dict): + """ + Update skill component configurations with new data. - for model_id, model_data in data.get("models", {}).items(): - model_config = SkillComponentConfiguration.from_json(model_data) - self.models.update(model_id, model_config) + Also check that there are not undeclared components. + """ + registry: CRUDCollection[SkillComponentConfiguration] = getattr( + self, type_plural + ) + new_component_config = data.get(type_plural, {}) + all_component_names = dict(registry.read_all()) + + new_skill_component_names = set(new_component_config.keys()).difference( + set(all_component_names.keys()) + ) + if len(new_skill_component_names) > 0: + raise ValueError( + f"The custom configuration for skill {self.public_id} includes new {type_plural}: {new_skill_component_names}. This is not allowed." + ) + + for component_name, component_data in data.get(type_plural, {}).items(): + component_config = registry.read(component_name) + merge_update(component_config.args, component_data.get("args", {})) + _update_skill_component_config("behaviours", data) + _update_skill_component_config("handlers", data) + _update_skill_component_config("models", data) self.is_abstract = data.get("is_abstract", self.is_abstract) @@ -1625,10 +1645,10 @@ def from_json(cls, obj: Dict): component_configurations = {} for config in obj.get("component_configurations", []): tmp = deepcopy(config) - name = tmp.pop("name") - author = tmp.pop("author") - version = tmp.pop("version") - type_ = tmp.pop("type") + name = tmp["name"] + author = tmp["author"] + version = tmp["version"] + type_ = tmp["type"] component_id = ComponentId( ComponentType(type_), PublicId(author, name, version) ) diff --git a/aea/configurations/schemas/configurable_parts/skill-custom_config.json b/aea/configurations/schemas/configurable_parts/skill-custom_config.json index a1c43e2618..b470606888 100644 --- a/aea/configurations/schemas/configurable_parts/skill-custom_config.json +++ b/aea/configurations/schemas/configurable_parts/skill-custom_config.json @@ -22,16 +22,82 @@ "$ref": "definitions.json#/definitions/component_type" }, "handlers": { - "$ref": "skill-config_schema.json#/definitions/handlers" + "$ref": "#/definitions/handlers" }, "behaviours": { - "$ref": "skill-config_schema.json#/definitions/behaviours" + "$ref": "#/definitions/behaviours" }, "models": { - "$ref": "skill-config_schema.json#/definitions/models" + "$ref": "#/definitions/models" }, "is_abstract": { - "$ref": "skill-config_schema.json#/properties/is_abstract" + "$ref": "#/properties/is_abstract" + } + }, + "definitions": { + "handlers": { + "type": "object", + "additionalProperties": false, + "uniqueItems": true, + "patternProperties": { + "^[^\\d\\W]\\w*\\Z": { + "$ref": "#/definitions/handler" + } + } + }, + "behaviours": { + "type": "object", + "uniqueItems": true, + "patternProperties": { + "^[^\\d\\W]\\w*\\Z": { + "$ref": "#/definitions/behaviour" + } + } + }, + "models": { + "type": "object", + "uniqueItems": true, + "patternProperties": { + "^[^\\d\\W]\\w*\\Z": { + "$ref": "#/definitions/model" + } + } + }, + "behaviour": { + "type": "object", + "additionalProperties": false, + "required": [ + "args" + ], + "properties": { + "args": { + "type": "object" + } + } + }, + "handler": { + "type": "object", + "additionalProperties": false, + "required": [ + "args" + ], + "properties": { + "args": { + "type": "object" + } + } + }, + "model": { + "type": "object", + "additionalProperties": false, + "required": [ + "args" + ], + "properties": { + "args": { + "type": "object" + } + } } } } diff --git a/aea/helpers/base.py b/aea/helpers/base.py index 89cd6e3e71..e39a9fe80b 100644 --- a/aea/helpers/base.py +++ b/aea/helpers/base.py @@ -390,3 +390,38 @@ def exception_log_and_reraise(log_method: Callable, message: str): except BaseException as e: # pylint: disable=broad-except # pragma: no cover # generic code log_method(message.format(e)) raise + + +def merge_update(to_update: Dict, new_values: Dict): + """ + Merge two dictionaries by replacing conflicts with the new values. + + It does side-effects to the first dictionary. + + >>> to_update = dict(a=1, b=2, subdict=dict(subfield1=1)) + >>> new_values = dict(b=3, c=4, subdict=dict(subfield2=2)) + >>> merge_update(to_update, new_values) + >>> to_update + {'a': 1, 'b': 3, 'subdict': {'subfield1': 1, 'subfield2': 2}, 'c': 4} + + :param to_update: the dictionary to update. + :param new_values: the dictionary of new values to add/replace. + :return: the merged dictionary. + """ + for key, value in new_values.items(): + if key not in to_update: + to_update[key] = value + continue + + value_to_update = to_update[key] + value_type = type(value) + value_to_update_type = type(value_to_update) + if value_type != value_to_update_type: + raise ValueError( + f"Trying to replace value '{value}' with value '{value_to_update}' which is of different type." + ) + + if value_type == value_to_update_type == dict: + merge_update(value_to_update, value) + else: + to_update[key] = value diff --git a/tests/conftest.py b/tests/conftest.py index 6eda95ebaa..6efe975b86 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -205,6 +205,8 @@ DUMMY_CONNECTION_PUBLIC_ID = PublicId("dummy_author", "dummy", "0.1.0") DUMMY_SKILL_PUBLIC_ID = PublicId("dummy_author", "dummy", "0.1.0") +DUMMY_SKILL_PATH = os.path.join(CUR_PATH, "data", "dummy_skill", SKILL_YAML) + MAX_FLAKY_RERUNS = 3 MAX_FLAKY_RERUNS_ETH = 1 MAX_FLAKY_RERUNS_INTEGRATION = 1 @@ -278,7 +280,7 @@ os.path.join(FETCHAI_PREF, "skills", "thermometer_client", SKILL_YAML), os.path.join(FETCHAI_PREF, "skills", "weather_client", SKILL_YAML), os.path.join(FETCHAI_PREF, "skills", "weather_station", SKILL_YAML), - os.path.join(CUR_PATH, "data", "dummy_skill", SKILL_YAML), + DUMMY_SKILL_PATH, os.path.join(CUR_PATH, "data", "dummy_aea", "skills", "dummy", SKILL_YAML), os.path.join(CUR_PATH, "data", "dependencies_skill", SKILL_YAML), os.path.join(CUR_PATH, "data", "exception_skill", SKILL_YAML), diff --git a/tests/data/aea-config.example_multipage.yaml b/tests/data/aea-config.example_multipage.yaml index 03ba6f66ee..1b205cb297 100644 --- a/tests/data/aea-config.example_multipage.yaml +++ b/tests/data/aea-config.example_multipage.yaml @@ -39,22 +39,18 @@ behaviours: args: behaviour_arg_1: 1 behaviour_arg_2: '2' - class_name: DummyBehaviour handlers: dummy: args: handler_arg_1: 1 handler_arg_2: '2' - class_name: DummyHandler dummy_internal: args: handler_arg_1: 1 handler_arg_2: '2' - class_name: DummyInternalHandler models: dummy: args: model_arg_1: 1 model_arg_2: '2' - class_name: DummyModel ... diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index b8e3f700b2..f75385294f 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -19,6 +19,7 @@ """This module contains the tests for the aea.configurations.base module.""" import re +from copy import copy from pathlib import Path from unittest import TestCase, mock @@ -52,6 +53,7 @@ from tests.conftest import ( AUTHOR, + DUMMY_SKILL_PATH, ROOT_DIR, agent_config_files, connection_config_files, @@ -200,6 +202,37 @@ def test_from_json_and_to_json(self, skill_path): def test_update_method(self): """Test the update method.""" + skill_config_path = Path(DUMMY_SKILL_PATH) + loader = ConfigLoaders.from_package_type(PackageType.SKILL) + skill_config = loader.load(skill_config_path.open()) + + dummy_behaviour = skill_config.behaviours.read("dummy") + expected_dummy_behaviour_args = copy(dummy_behaviour.args) + expected_dummy_behaviour_args["new_arg"] = 1 + + dummy_handler = skill_config.handlers.read("dummy") + expected_dummy_handler_args = copy(dummy_handler.args) + expected_dummy_handler_args["new_arg"] = 1 + + dummy_model = skill_config.models.read("dummy") + expected_dummy_model_args = copy(dummy_model.args) + expected_dummy_model_args["new_arg"] = 1 + + new_configurations = { + "behaviours": {"dummy": {"args": dict(new_arg=1)}}, + "handlers": {"dummy": {"args": dict(new_arg=1)}}, + "models": {"dummy": {"args": dict(new_arg=1)}}, + } + skill_config.update(new_configurations) + + assert ( + expected_dummy_behaviour_args == skill_config.behaviours.read("dummy").args + ) + assert expected_dummy_handler_args == skill_config.handlers.read("dummy").args + assert expected_dummy_model_args == skill_config.models.read("dummy").args + + def test_update_method_raises_error_if_skill_component_not_allowed(self): + """Test that we raise error if the custom configuration contain unexpected skill components.""" skill_config_path = Path( ROOT_DIR, "aea", "skills", "error", DEFAULT_SKILL_CONFIG_FILE ) @@ -210,14 +243,12 @@ def test_update_method(self): "handlers": {"new_handler": {"args": {}, "class_name": "SomeClass"}}, "models": {"new_model": {"args": {}, "class_name": "SomeClass"}}, } - skill_config.update(new_configurations) - new_behaviour = skill_config.behaviours.read("new_behaviour") - assert new_behaviour.json == new_configurations["behaviours"]["new_behaviour"] - new_handler = skill_config.handlers.read("new_handler") - assert new_handler.json == new_configurations["handlers"]["new_handler"] - new_model = skill_config.models.read("new_model") - assert new_model.json == new_configurations["models"]["new_model"] + with pytest.raises( + ValueError, + match="The custom configuration for skill fetchai/error:0.6.0 includes new behaviours: {'new_behaviour'}. This is not allowed.", + ): + skill_config.update(new_configurations) class TestAgentConfig: From 3b1637ce20d8a69354a66c1116f53fa4a77841d1 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 29 Sep 2020 15:29:46 +0200 Subject: [PATCH 100/131] fix recursion in jsonschema --- aea/configurations/loader.py | 12 ++++++------ .../configurable_parts/skill-custom_config.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index 515dcfd615..0f19ddaea4 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -326,7 +326,7 @@ def _dump_component_config(self, configuration: T, file_pointer: TextIO) -> None yaml_dump(result, file_pointer) def _process_component_section( - self, i: int, component_configuration_json: Dict + self, component_index: int, component_configuration_json: Dict ) -> ComponentId: """ Process a component configuration in an agent configuration file. @@ -336,12 +336,12 @@ def _process_component_section( - validate the component configuration - check that there are only configurable fields - :param i: the index of the component in the file. + :param component_index: the index of the component in the file. :param component_configuration_json: the JSON object. :return: the processed component configuration. """ component_id = self._split_component_id_and_config( - i, component_configuration_json + component_index, component_configuration_json ) self._validate_component_configuration( component_id, component_configuration_json @@ -350,12 +350,12 @@ def _process_component_section( @staticmethod def _split_component_id_and_config( - i: int, component_configuration_json: Dict + component_index: int, component_configuration_json: Dict ) -> ComponentId: """ Split component id and configuration. - :param i: the position of the component configuration in the agent config file.. + :param component_index: the position of the component configuration in the agent config file.. :param component_configuration_json: the JSON object to process. :return: the component id and the configuration object. :raises ValueError: if the component id cannot be extracted. @@ -366,7 +366,7 @@ def _split_component_id_and_config( ) if len(missing_fields) > 0: raise ValueError( - f"There are missing fields in component id {i + 1}: {missing_fields}." + f"There are missing fields in component id {component_index + 1}: {missing_fields}." ) component_name = component_configuration_json["name"] component_author = component_configuration_json["author"] diff --git a/aea/configurations/schemas/configurable_parts/skill-custom_config.json b/aea/configurations/schemas/configurable_parts/skill-custom_config.json index b470606888..b5ab051d3c 100644 --- a/aea/configurations/schemas/configurable_parts/skill-custom_config.json +++ b/aea/configurations/schemas/configurable_parts/skill-custom_config.json @@ -31,7 +31,7 @@ "$ref": "#/definitions/models" }, "is_abstract": { - "$ref": "#/properties/is_abstract" + "$ref": "skill-config_schema.json#/properties/is_abstract" } }, "definitions": { From 56860c903995daaf0fbf36d727b032eaa596d36f Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 29 Sep 2020 15:34:19 +0200 Subject: [PATCH 101/131] address PR comments --- aea/configurations/base.py | 4 +++- aea/configurations/loader.py | 15 +++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 48cd40aa98..2b4d2e6e26 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -1344,7 +1344,9 @@ def _update_skill_component_config(type_plural: str, data: Dict): ) for component_name, component_data in data.get(type_plural, {}).items(): - component_config = registry.read(component_name) + component_config = cast( + SkillComponentConfiguration, registry.read(component_name) + ) merge_update(component_config.args, component_data.get("args", {})) _update_skill_component_config("behaviours", data) diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index 0f19ddaea4..4723b209f1 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -51,6 +51,11 @@ _CUR_DIR = os.path.dirname(inspect.getfile(inspect.currentframe())) # type: ignore _SCHEMAS_DIR = os.path.join(_CUR_DIR, "schemas") +_PREFIX_BASE_CONFIGURABLE_PARTS = "base" +_SCHEMAS_CONFIGURABLE_PARTS_DIRNAME = "configurable_parts" +_POSTFIX_CUSTOM_CONFIG = "-custom_config.json" +STARTING_INDEX_CUSTOM_CONFIGS = 1 + T = TypeVar( "T", AgentConfig, @@ -83,12 +88,12 @@ def _get_path_to_custom_config_schema_from_type(component_type: ComponentType) - :param component_type: a component type. :return: the path to the JSON schema file. """ - path_prefix: Path = Path(_SCHEMAS_DIR) / "configurable_parts" + path_prefix: Path = Path(_SCHEMAS_DIR) / _SCHEMAS_CONFIGURABLE_PARTS_DIRNAME if component_type in {ComponentType.SKILL, ComponentType.CONNECTION}: filename_prefix = component_type.value else: - filename_prefix = "base" - full_path = path_prefix / (filename_prefix + "-custom_config.json") + filename_prefix = _PREFIX_BASE_CONFIGURABLE_PARTS + full_path = path_prefix / (filename_prefix + _POSTFIX_CUSTOM_CONFIG) return str(full_path) @@ -298,7 +303,9 @@ def _get_component_configurations( """ component_configurations: Dict[ComponentId, Dict] = {} # load the other components. - for i, component_configuration_json in enumerate(configuration_file_jsons[1:]): + for i, component_configuration_json in enumerate( + configuration_file_jsons[STARTING_INDEX_CUSTOM_CONFIGS:] + ): component_id = self._process_component_section( i, component_configuration_json ) From d1223914eedde0517952e677396699be8b052e36 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Tue, 29 Sep 2020 16:03:54 +0100 Subject: [PATCH 102/131] fix logger name in some connections --- packages/fetchai/connections/ledger/base.py | 11 ++--------- packages/fetchai/connections/ledger/connection.yaml | 6 +++--- .../fetchai/connections/ledger/contract_dispatcher.py | 10 +++++++++- .../fetchai/connections/ledger/ledger_dispatcher.py | 10 +++++++++- packages/fetchai/connections/soef/connection.py | 2 +- packages/fetchai/connections/soef/connection.yaml | 2 +- packages/hashes.csv | 4 ++-- 7 files changed, 27 insertions(+), 18 deletions(-) diff --git a/packages/fetchai/connections/ledger/base.py b/packages/fetchai/connections/ledger/base.py index c9fbdd4411..b26b5f8bf9 100644 --- a/packages/fetchai/connections/ledger/base.py +++ b/packages/fetchai/connections/ledger/base.py @@ -18,7 +18,6 @@ # ------------------------------------------------------------------------------ """This module contains base classes for the ledger API connection.""" import asyncio -import logging from abc import ABC, abstractmethod from asyncio import Task from concurrent.futures._base import Executor @@ -45,11 +44,11 @@ class RequestDispatcher(ABC): def __init__( self, + logger: Logger, connection_state: AsyncState, loop: Optional[asyncio.AbstractEventLoop] = None, executor: Optional[Executor] = None, api_configs: Optional[Dict[str, Dict[str, str]]] = None, - logger: Optional[Logger] = None, ): """ Initialize the request dispatcher. @@ -61,13 +60,7 @@ def __init__( self.loop = loop if loop is not None else asyncio.get_event_loop() self.executor = executor self._api_configs = api_configs - self.logger = ( - logger - if logger is not None - else logging.getLogger( - "aea.packages.fetchai.connections.ledger.contract_dispatcher" - ) - ) + self.logger = logger def api_config(self, ledger_id: str) -> Dict[str, str]: """Get api config.""" diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index 63641cb273..2edc0b499a 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -8,10 +8,10 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmY6YCoxyUXSwQzFvNPKd3nfHaoMsjCLCZAvTGSGwZnZbP __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj - base.py: QmNnSBVmVgdDFwzqDUncwLHeyDfMEfmvujJdKbdGNGH4Be + base.py: QmdWmK8S9dX1U6jiRotdFrEfAbPhLUDvPj8yPiCwsJnUDZ connection.py: Qmdibf99GzdFjFCcoTX7AiiBVWznKvPZWvur8cngSRNdye - contract_dispatcher.py: QmXMPf7Mekyfo8SofcVYWWgMwADQZw68cXbmtf1pyKchVc - ledger_dispatcher.py: QmTGvnN5W7VHZ9McQSyDQ1jPQoFWmQmuR2a3y8LL6J7aiM + contract_dispatcher.py: QmNYR1K1MAMo6jZE84XhsTQBDtUZMuCE1PeBpJ2sMxM4dc + ledger_dispatcher.py: QmcpASNeDRwuPJ9wLfTHp3qEMutrUZV9VUzLWzvk312K2i fingerprint_ignore_patterns: [] protocols: - fetchai/contract_api:0.5.0 diff --git a/packages/fetchai/connections/ledger/contract_dispatcher.py b/packages/fetchai/connections/ledger/contract_dispatcher.py index c553633baa..f9cddf8341 100644 --- a/packages/fetchai/connections/ledger/contract_dispatcher.py +++ b/packages/fetchai/connections/ledger/contract_dispatcher.py @@ -19,6 +19,7 @@ """This module contains the implementation of the contract API request dispatcher.""" import inspect +import logging from typing import Callable, Optional, cast from aea.contracts import Contract, contract_registry @@ -38,6 +39,11 @@ ) +_default_logger = logging.getLogger( + "aea.packages.fetchai.connections.ledger.contract_dispatcher" +) + + class ContractApiDialogues(BaseContractApiDialogues): """The dialogues class keeps track of all dialogues.""" @@ -73,7 +79,9 @@ class ContractApiRequestDispatcher(RequestDispatcher): def __init__(self, *args, **kwargs): """Initialize the dispatcher.""" - super().__init__(*args, **kwargs) + logger = kwargs.pop("logger", None) + logger = logger if logger is not None else _default_logger + super().__init__(*args, **kwargs, logger=logger) self._contract_api_dialogues = ContractApiDialogues() @property diff --git a/packages/fetchai/connections/ledger/ledger_dispatcher.py b/packages/fetchai/connections/ledger/ledger_dispatcher.py index 224e5dfbe3..9f38cfd79c 100644 --- a/packages/fetchai/connections/ledger/ledger_dispatcher.py +++ b/packages/fetchai/connections/ledger/ledger_dispatcher.py @@ -17,6 +17,7 @@ # # ------------------------------------------------------------------------------ """This module contains the implementation of the ledger API request dispatcher.""" +import logging import time from typing import cast @@ -36,6 +37,11 @@ from packages.fetchai.protocols.ledger_api.message import LedgerApiMessage +_default_logger = logging.getLogger( + "aea.packages.fetchai.connections.ledger.ledger_dispatcher" +) + + class LedgerApiDialogues(BaseLedgerApiDialogues): """The dialogues class keeps track of all dialogues.""" @@ -71,7 +77,9 @@ class LedgerApiRequestDispatcher(RequestDispatcher): def __init__(self, *args, **kwargs): """Initialize the dispatcher.""" - super().__init__(*args, **kwargs) + logger = kwargs.pop("logger", None) + logger = logger if logger is not None else _default_logger + super().__init__(*args, **kwargs, logger=logger) self._ledger_api_dialogues = LedgerApiDialogues() def get_ledger_id(self, message: Message) -> str: diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 66a39a80b3..9760e022db 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -63,7 +63,7 @@ from packages.fetchai.protocols.oef_search.message import OefSearchMessage -_default_logger = logging.getLogger("aea.packages.fetchai.connections.oef") +_default_logger = logging.getLogger("aea.packages.fetchai.connections.soef") PUBLIC_ID = PublicId.from_str("fetchai/soef:0.9.0") diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index da4a8d5dc4..3d84862432 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmS9zorTodmaRyaxocELEwEqHEPowKoG9wgSAak7s59rZD __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmRTPeJ8aTDuWs28EM7vbBEDbZ75XqqzCo8zhSNXEGmeK3 + connection.py: QmZaBtcck4gXs92SH5vcptJMm1d1f8WqUuCwvfTXnxsc3y fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.7.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index 8826c1bb2b..2c5b8f816b 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -22,14 +22,14 @@ fetchai/agents/weather_station,QmRAs7AY2R9RNi5M4gnSDiQzLb58z4nuCYAnG2UAnv3XC2 fetchai/connections/gym,Qmack3EaCW6ARrHrtCnJmL3kR2xrHutJmgD8uoRVGFz6kH fetchai/connections/http_client,QmaCa98anLuMAduNWtnApEwLWBcqdVkNBREBZ9T5VPSaUm fetchai/connections/http_server,QmT6JV2sB1rv7XZgx1bEpMjfQJAtpq775D2n8yvzKzSXYK -fetchai/connections/ledger,QmYzBWDgAETzBr8PGPyKvdDMJMGPSo3KFiKVP9MmkVGfd9 +fetchai/connections/ledger,QmQRTE8m3ABL8cPeckfsL3pSYyaMFqqo6CFyZJuSfo62BH fetchai/connections/local,QmNXMDuB7vfGrhv2Q4R8REDicSUgXfVPd7x1tAP3847jsr fetchai/connections/oef,QmT6nbEYgjHPTwoXqV5FNeg7SUaraXGQGUhGeVGEhqXVDg fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4Jb27b fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,Qme2vP55mGemMKMWdHKGUaC1nW88ZEdD55qgdY9a984T7i +fetchai/connections/soef,QmXBtvcw2mQdMwkEaoU9h4pRLkGGZueqJNzGCHA279CNQk fetchai/connections/stub,QmQxzFLTBjPUMkpE1uBdkoyhb7iXY4k8VPzyykpjhuUcK1 fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd From 1b93a80c052b9e00983c9ca3e091bfb8daf6343b Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Tue, 29 Sep 2020 18:36:46 +0300 Subject: [PATCH 103/131] fixes and tests --- aea/manager.py | 142 ++++++++++++++------ tests/test_manager.py | 292 +++++++++++++++++++++++++++++++++--------- 2 files changed, 334 insertions(+), 100 deletions(-) diff --git a/aea/manager.py b/aea/manager.py index a303eb7991..2c711f8057 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -16,6 +16,7 @@ # limitations under the License. # # ------------------------------------------------------------------------------ + """This module contains the implementation of AEA agents manager.""" import asyncio import copy @@ -74,37 +75,43 @@ def start(self) -> None: def wait(self) -> asyncio.Future: """Return future to wait task completed.""" - if not self._done_future: + if not self._done_future: # pragma: nocover raise ValueError("Task not started!") return self._done_future def stop(self) -> None: """Stop task.""" - if not self.run_loop or not self.task: + if not self.run_loop or not self.task: # pragma: nocover raise ValueError("Task was not started!") self.run_loop.call_soon_threadsafe(self.task.cancel) async def _run_wrapper(self) -> None: """Run task internals.""" - if not self._done_future: + if not self._done_future: # pragma: nocover raise ValueError("Task was not started! please use start method") + exc = None try: await self.run() - self.caller_loop.call_soon_threadsafe(self._done_future.set_result, None) - except asyncio.CancelledError: - self.caller_loop.call_soon_threadsafe(self._done_future.set_result, None) + except asyncio.CancelledError: # pragma: nocover + pass except Exception as e: # pylint: disable=broad-except - self.caller_loop.call_soon_threadsafe(self._done_future.set_exception, e) + exc = e + finally: + self.caller_loop.call_soon_threadsafe(self._set_result, exc) + + def _set_result(self, exc: Optional[BaseException]) -> None: + """Set result of task execution.""" + if not self._done_future: # pragma: nocover + return + if exc: + self._done_future.set_exception(exc) + else: + self._done_future.set_result(None) async def run(self) -> None: """Run task body.""" self.agent.runtime.set_loop(self.run_loop) - try: - self.agent.runtime.start() - while True: - await asyncio.sleep(1) - finally: - self.agent.runtime.stop() + await self.agent.runtime.run() @property def is_running(self) -> bool: @@ -154,7 +161,7 @@ def __init__(self, working_dir: str, mode: str = "async") -> None: self._agents: Dict[str, AgentAlias] = {} self._agents_tasks: Dict[str, AsyncTask] = {} - self._thread = Thread(target=self._run_thread, daemon=True) + self._thread: Optional[Thread] = None self._loop: Optional[asyncio.AbstractEventLoop] = None self._event: Optional[asyncio.Event] = None @@ -203,17 +210,26 @@ async def _manager_loop(self) -> None: agent_name = tasks_for_agents[task] self._agents_tasks.pop(agent_name) if task.exception(): - print(agent_name, "exceptioned", task.exception()) for callback in self._error_callbacks: callback(agent_name, task.exception()) else: await task + def add_error_callback( + self, error_callback: Callable[[str, BaseException], None] + ) -> None: + """Add error callback to call on error raised.""" + self._error_callbacks.append(error_callback) + def start_manager(self) -> "Manager": """Start manager.""" + if self._is_running: + return self + self._ensure_working_dir() self._started_event.clear() self._is_running = True + self._thread = Thread(target=self._run_thread, daemon=True) self._thread.start() self._started_event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) return self @@ -226,18 +242,40 @@ def stop_manager(self) -> "Manager": :return: None """ - if not self._loop or not self._event: + if not self._is_running: + return self + + if not self._loop or not self._event or not self._thread: # pragma: nocover raise ValueError("Manager was not started!") - if self._was_working_dir_created: - rmtree(self.working_dir) - if self._thread.is_alive(): - self.stop_all_agents() + if not self._thread.is_alive(): # pragma: nocover + return self + + self.stop_all_agents() + + for agent_name in self.list_agents(): + self.remove_agent(agent_name) + + for project in list(self._projects.keys()): + self.remove_project(project) + + self._cleanup() + self._is_running = False + self._loop.call_soon_threadsafe(self._event.set) - self._thread.join(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) + + if self._thread.ident != threading.get_ident(): + self._thread.join(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) + + self._thread = None return self + def _cleanup(self) -> None: + """Remove workdir if was created.""" + if self._was_working_dir_created and os.path.exists(self.working_dir): + rmtree(self.working_dir) + def add_project(self, public_id: PublicId) -> "Manager": """Fetch agent project and all dependencies to working_dir.""" if public_id in self._projects: @@ -290,6 +328,7 @@ def add_agent( if public_id not in self._projects: raise ValueError(f"{public_id} project is not added!") + project = self._projects[public_id] agent_alias = self._build_agent_alias( @@ -310,7 +349,7 @@ def list_agents(self, running_only: bool = False) -> List[str]: :return: list of agents names """ if running_only: - return list(self._agents_tasks.keys()) + return [i for i in self._agents.keys() if self._is_agent_running(i)] return list(self._agents.keys()) def remove_agent(self, agent_name: str) -> "Manager": @@ -339,12 +378,14 @@ def start_agent(self, agent_name: str) -> "Manager": :return: None """ - if not self._loop or not self._event: + if not self._loop or not self._event: # pragma: nocover raise ValueError("agent is not started!") agent_alias = self._agents.get(agent_name) + if not agent_alias: raise ValueError(f"{agent_name} is not registered!") + if self._is_agent_running(agent_name): raise ValueError(f"{agent_name} is already started!") @@ -358,15 +399,13 @@ def start_agent(self, agent_name: str) -> "Manager": self._loop.call_soon_threadsafe(self._event.set) return self - def _is_agent_running(self, agent_name): + def _is_agent_running(self, agent_name: str) -> bool: + """Return is agent running state.""" if agent_name not in self._agents_tasks: return False task = self._agents_tasks[agent_name] - if task.is_running: - return True - del self._agents_tasks[agent_name] - return False + return task.is_running def start_all_agents(self) -> "Manager": """ @@ -374,10 +413,13 @@ def start_all_agents(self) -> "Manager": :return: None """ - for agent_name in self.list_agents(): - if self._is_agent_running(agent_name): - continue - self.start_agent(agent_name) + self.start_agents( + [ + agent_name + for agent_name in self.list_agents() + if not self._is_agent_running(agent_name) + ] + ) return self @@ -389,15 +431,31 @@ def stop_agent(self, agent_name: str) -> "Manager": :return: None """ - if not self._is_agent_running(agent_name): + if not self._is_agent_running(agent_name) or not self._thread or not self._loop: raise ValueError(f"{agent_name} is not running!") - if self._thread.ident == threading.get_ident(): + + agent_task = self._agents_tasks[agent_name] + + if self._thread.ident == threading.get_ident(): # pragma: nocover # In same thread do not perform blocking operations! - self._agents_tasks[agent_name].stop() + agent_task.stop() return self + + wait_future = agent_task.wait() + event = threading.Event() - self._agents_tasks[agent_name].wait().add_done_callback(lambda x: event.set()) - self._agents_tasks[agent_name].stop() + + def event_set(*args): # pylint: disable=unused-argument + event.set() + + def _add_cb(): + if wait_future.done(): + event_set() # pragma: nocover + else: + wait_future.add_done_callback(event_set) # pramga: nocover + + self._loop.call_soon_threadsafe(_add_cb) + agent_task.stop() event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) return self @@ -408,8 +466,8 @@ def stop_all_agents(self) -> "Manager": :return: None """ - for agent_name in self.list_agents(running_only=True): - self.stop_agent(agent_name) + agents_list = self.list_agents(running_only=True) + self.stop_agents(agents_list) return self @@ -445,7 +503,7 @@ def get_agent_alias(self, agent_name: str) -> AgentAlias: :return: AgentAlias """ - if agent_name not in self._agents: + if agent_name not in self._agents: # pragma: nocover raise ValueError(f"Agent with name {agent_name} does not exist!") return self._agents[agent_name] @@ -455,7 +513,7 @@ def _ensure_working_dir(self) -> None: os.makedirs(self.working_dir) self._was_working_dir_created = True - if not os.path.isdir(self.working_dir): + if not os.path.isdir(self.working_dir): # pragma: nocover raise ValueError(f"{self.working_dir} is not a directory!") os.makedirs(self._keys_dir) @@ -473,7 +531,7 @@ def _build_agent_alias( builder = AEABuilder.from_config_json(json_config, project.path) builder.set_name(agent_name) - # builder.set_runtime_mode("async") + builder.set_runtime_mode("threaded") if not builder.private_key_paths: default_ledger = json_config[0].get("default_ledger", DEFAULT_LEDGER) diff --git a/tests/test_manager.py b/tests/test_manager.py index 170ea6b96e..a0b08ecf6a 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -18,50 +18,91 @@ # ------------------------------------------------------------------------------ """This module contains tests for aea manager.""" import os -import time -from contextlib import suppress -from shutil import rmtree +from unittest.mock import Mock, patch import pytest from aea.configurations.base import PublicId from aea.manager import Manager +from tests.common.utils import wait_for_condition -def test_manager(): - """Perform some tests.""" - # pydocsyle - try: - working_dir = "manager_dir" - project_public_id = PublicId("fetchai", "my_first_aea", "0.11.0") - project_path = os.path.join( - working_dir, project_public_id.author, project_public_id.name + +class TestManagerAsyncMode: # pylint: disable=unused-argument,protected-access,attribute-defined-outside-init + """Tests for manager in async mode.""" + + MODE = "async" + + echo_skill_id = PublicId("fetchai", "echo", "0.7.0") + + def setup(self): + """Set test case.""" + self.agent_name = "test_what_ever12" + self.working_dir = "manager_dir" + self.project_public_id = PublicId("fetchai", "my_first_aea", "0.11.0") + self.project_path = os.path.join( + self.working_dir, self.project_public_id.author, self.project_public_id.name ) - assert not os.path.exists(working_dir) - manager = Manager(working_dir) - manager.start_manager() - assert os.path.exists(working_dir) - assert manager.is_running + assert not os.path.exists(self.working_dir) + self.manager = Manager(self.working_dir, mode=self.MODE) + + def teardown(self): + """Tear down test case.""" + self.manager.stop_manager() + + def test_workdir_created_removed(self): + """Check work dit created removed on manager start and stop.""" + assert not os.path.exists(self.working_dir) + self.manager.start_manager() + assert os.path.exists(self.working_dir) + self.manager.stop_manager() + assert not os.path.exists(self.working_dir) + + def test_manager_is_running(self): + """Check manager is running property reflects state.""" + assert not self.manager.is_running + self.manager.start_manager() + assert self.manager.is_running + self.manager.stop_manager() + assert not self.manager.is_running - manager.add_project(project_public_id) + def test_add_remove_project(self): + """Test add and remove project.""" + self.manager.start_manager() - assert project_public_id in manager.list_projects() - assert os.path.exists(project_path) - assert manager._projects[project_public_id].path == project_path + self.manager.add_project(self.project_public_id) + + assert self.project_public_id in self.manager.list_projects() + assert os.path.exists(self.project_path) with pytest.raises(ValueError, match=r".*was already added.*"): - manager.add_project(project_public_id) - - echo_skill_id = PublicId("fetchai", "echo", "0.7.0") - new_tick_interval = 1.1111 - agent_name = "test_what_ever12" - manager.add_agent( - project_public_id, - agent_name, + self.manager.add_project(self.project_public_id) + + self.manager.remove_project(self.project_public_id) + assert self.project_public_id not in self.manager.list_projects() + + with pytest.raises(ValueError, match=r"was not added"): + self.manager.remove_project(self.project_public_id) + + self.manager.add_project(self.project_public_id) + assert self.project_public_id in self.manager.list_projects() + assert os.path.exists(self.project_path) + + def test_add_agent(self): + """Test add agent alias.""" + self.manager.start_manager() + + self.manager.add_project(self.project_public_id) + + new_tick_interval = 0.2111 + + self.manager.add_agent( + self.project_public_id, + self.agent_name, component_overrides=[ { "type": "skill", - **echo_skill_id.json, + **self.echo_skill_id.json, "behaviours": { "echo": { "args": {"tick_interval": new_tick_interval}, @@ -71,47 +112,182 @@ def test_manager(): } ], ) - agent_alias = manager.get_agent_details(agent_name) - assert agent_alias.name == agent_name + agent_alias = self.manager.get_agent_alias(self.agent_name) + assert agent_alias.name == self.agent_name assert ( agent_alias.agent.resources.get_behaviour( - echo_skill_id, "echo" + self.echo_skill_id, "echo" ).tick_interval == new_tick_interval ) with pytest.raises(ValueError, match="already exists"): - manager.add_agent( - project_public_id, agent_name, + self.manager.add_agent( + self.project_public_id, self.agent_name, ) - assert agent_name in manager.list_agents() - manager.start_all_agents() - assert agent_name in manager.list_agents(running_only=True) - manager.start_all_agents() + + def test_remove_agent(self): + """Test remove agent alias.""" + self.test_add_agent() + assert self.agent_name in self.manager.list_agents() + self.manager.remove_agent(self.agent_name) + assert self.agent_name not in self.manager.list_agents() + + with pytest.raises(ValueError, match="does not exist!"): + self.manager.remove_agent(self.agent_name) + + def test_remove_project_with_alias(self): + """Test remove project with alias presents.""" + self.test_add_agent() + + with pytest.raises( + ValueError, match="Can not remove projects with aliases exists" + ): + self.manager.remove_project(self.project_public_id) + + def test_add_agent_for_non_exist_project(self): + """Test add agent when no project added.""" + with pytest.raises(ValueError, match=" project is not added"): + self.manager.add_agent(PublicId("test", "test", "0.1.0"), "another_agent") + + def test_agent_acually_running(self): + """Test manager starts agent correctly and agent perform acts.""" + self.test_add_agent() + agent_alias = self.manager.get_agent_alias(self.agent_name) + behaviour = agent_alias.agent.resources.get_behaviour( + self.echo_skill_id, "echo" + ) + assert behaviour + with patch.object(behaviour, "act") as act_mock: + self.manager.start_all_agents() + wait_for_condition(lambda: act_mock.call_count > 0, timeout=10) + + def test_exception_handling(self): + """Test erro callback works.""" + self.test_add_agent() + agent_alias = self.manager.get_agent_alias(self.agent_name) + behaviour = agent_alias.agent.resources.get_behaviour( + self.echo_skill_id, "echo" + ) + callback_mock = Mock() + + self.manager.add_error_callback(callback_mock) + assert behaviour + + with patch.object(behaviour, "act", side_effect=ValueError("expected")): + self.manager.start_all_agents() + wait_for_condition(lambda: callback_mock.call_count > 0, timeout=10) + + def test_stop_from_exception_handling(self): + """Test stop manager from erro callback.""" + self.test_add_agent() + agent_alias = self.manager.get_agent_alias(self.agent_name) + behaviour = agent_alias.agent.resources.get_behaviour( + self.echo_skill_id, "echo" + ) + + def handler(*args, **kwargs): + self.manager.stop_manager() + + self.manager.add_error_callback(handler) + + assert behaviour + + with patch.object(behaviour, "act", side_effect=ValueError("expected")): + self.manager.start_all_agents() + wait_for_condition(lambda: not self.manager.is_running, timeout=10) + + def test_start_all(self): + """Test manager start all agents.""" + self.test_add_agent() + assert self.agent_name in self.manager.list_agents() + assert self.agent_name not in self.manager.list_agents(running_only=True) + self.manager.start_all_agents() + assert self.agent_name in self.manager.list_agents(running_only=True) + + self.manager.start_all_agents() + + with pytest.raises(ValueError, match="is already started!"): + self.manager.start_agents(self.manager.list_agents()) with pytest.raises(ValueError, match="is already started!"): - manager.start_agents(manager.list_agents()) + self.manager.start_agent(self.agent_name) + + with pytest.raises(ValueError, match="is not registered!"): + self.manager.start_agent("non_exists_agent") + + def test_stop_agent(self): + """Test stop agent.""" + self.test_start_all() + wait_for_condition( + lambda: self.manager.list_agents(running_only=True), timeout=10 + ) + self.manager.stop_all_agents() + + assert not self.manager.list_agents(running_only=True) + with pytest.raises(ValueError, match=" is not running!"): + self.manager.stop_agent(self.agent_name) + + with pytest.raises(ValueError, match=" is not running!"): + self.manager.stop_agents([self.agent_name]) + + def test_do_no_allow_override_some_fields(self): + """Do not allo to override some values in agent config.""" + self.manager.start_manager() + + self.manager.add_project(self.project_public_id) + + BAD_OVERRIDES = ["skills", "connections", "contracts", "protocols"] + + for bad_override in BAD_OVERRIDES: + with pytest.raises(ValueError, match="Do not override any"): + self.manager.add_agent( + self.project_public_id, + self.agent_name, + agent_overrides={bad_override: "some value"}, + ) + + @staticmethod + def test_invalid_mode(): + """Test manager fails on invalid mode.""" + with pytest.raises(ValueError, match="Invalid mode"): + Manager("test_dir", mode="invalid_mode") + + def test_double_start(self): + """Test double manager start.""" + self.manager.start_manager() + self.manager.start_manager() + + def test_double_stop(self): + """Test double manager stop.""" + self.manager.start_manager() + self.manager.stop_manager() + self.manager.stop_manager() + + @pytest.mark.asyncio + async def test_run_loop_direct_call(self): + """Test do not allow to run manager_loop directly.""" + with pytest.raises( + ValueError, match="Do not use this method directly, use start_manager" + ): + await self.manager._manager_loop() + + def test_remove_running_agent(self): + """Test fail on remove running agent.""" + self.test_start_all() with pytest.raises(ValueError, match="Agent is running. stop it first!"): - manager.remove_agent(agent_name) + self.manager.remove_agent(self.agent_name) - time.sleep(2) - manager.stop_all_agents() + self.manager.stop_all_agents() + wait_for_condition( + lambda: self.agent_name not in self.manager.list_agents(running_only=True), + timeout=5, + ) + self.manager.remove_agent(self.agent_name) + assert self.agent_name not in self.manager.list_agents() - manager.remove_agent(agent_name) - assert agent_name not in manager.list_agents() - with pytest.raises(ValueError, match="does not exist!"): - manager.remove_agent(agent_name) - manager.remove_project(project_public_id) - assert project_public_id not in manager._projects - assert not os.path.exists(project_path) - assert project_public_id not in manager.list_projects() +class TestManagerThreadedMode(TestManagerAsyncMode): + """Tests for manager in threaded mode.""" - with pytest.raises(ValueError, match=r"was not added"): - manager.remove_project(project_public_id) - manager.stop_manager() - assert not os.path.exists(working_dir) - assert not manager.is_running - finally: - with suppress(FileNotFoundError): - rmtree(working_dir) + MODE = "threaded" From 8eb1b6d7492b41b7bbf6f9f34691c0e8f4acd58a Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Tue, 29 Sep 2020 17:03:54 +0100 Subject: [PATCH 104/131] fix issues with previous commit --- packages/fetchai/connections/ledger/connection.yaml | 4 ++-- packages/fetchai/connections/ledger/contract_dispatcher.py | 3 ++- packages/fetchai/connections/ledger/ledger_dispatcher.py | 2 +- packages/hashes.csv | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/fetchai/connections/ledger/connection.yaml b/packages/fetchai/connections/ledger/connection.yaml index 2edc0b499a..e5e6fb9093 100644 --- a/packages/fetchai/connections/ledger/connection.yaml +++ b/packages/fetchai/connections/ledger/connection.yaml @@ -10,8 +10,8 @@ fingerprint: __init__.py: QmZvYZ5ECcWwqiNGh8qNTg735wu51HqaLxTSifUxkQ4KGj base.py: QmdWmK8S9dX1U6jiRotdFrEfAbPhLUDvPj8yPiCwsJnUDZ connection.py: Qmdibf99GzdFjFCcoTX7AiiBVWznKvPZWvur8cngSRNdye - contract_dispatcher.py: QmNYR1K1MAMo6jZE84XhsTQBDtUZMuCE1PeBpJ2sMxM4dc - ledger_dispatcher.py: QmcpASNeDRwuPJ9wLfTHp3qEMutrUZV9VUzLWzvk312K2i + contract_dispatcher.py: QmbwomSmrddSY4wREL7ywHF2p9qQ3daCiv9VoYf9cbBR61 + ledger_dispatcher.py: QmfFNHQQdGiE33Cef5vRHMnXJmLVr6mQGR3iENx5ShDnQk fingerprint_ignore_patterns: [] protocols: - fetchai/contract_api:0.5.0 diff --git a/packages/fetchai/connections/ledger/contract_dispatcher.py b/packages/fetchai/connections/ledger/contract_dispatcher.py index f9cddf8341..503d116088 100644 --- a/packages/fetchai/connections/ledger/contract_dispatcher.py +++ b/packages/fetchai/connections/ledger/contract_dispatcher.py @@ -81,7 +81,8 @@ def __init__(self, *args, **kwargs): """Initialize the dispatcher.""" logger = kwargs.pop("logger", None) logger = logger if logger is not None else _default_logger - super().__init__(*args, **kwargs, logger=logger) + + super().__init__(logger, *args, **kwargs) self._contract_api_dialogues = ContractApiDialogues() @property diff --git a/packages/fetchai/connections/ledger/ledger_dispatcher.py b/packages/fetchai/connections/ledger/ledger_dispatcher.py index 9f38cfd79c..4756d9a1eb 100644 --- a/packages/fetchai/connections/ledger/ledger_dispatcher.py +++ b/packages/fetchai/connections/ledger/ledger_dispatcher.py @@ -79,7 +79,7 @@ def __init__(self, *args, **kwargs): """Initialize the dispatcher.""" logger = kwargs.pop("logger", None) logger = logger if logger is not None else _default_logger - super().__init__(*args, **kwargs, logger=logger) + super().__init__(logger, *args, **kwargs) self._ledger_api_dialogues = LedgerApiDialogues() def get_ledger_id(self, message: Message) -> str: diff --git a/packages/hashes.csv b/packages/hashes.csv index 2c5b8f816b..712b147ae5 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -22,7 +22,7 @@ fetchai/agents/weather_station,QmRAs7AY2R9RNi5M4gnSDiQzLb58z4nuCYAnG2UAnv3XC2 fetchai/connections/gym,Qmack3EaCW6ARrHrtCnJmL3kR2xrHutJmgD8uoRVGFz6kH fetchai/connections/http_client,QmaCa98anLuMAduNWtnApEwLWBcqdVkNBREBZ9T5VPSaUm fetchai/connections/http_server,QmT6JV2sB1rv7XZgx1bEpMjfQJAtpq775D2n8yvzKzSXYK -fetchai/connections/ledger,QmQRTE8m3ABL8cPeckfsL3pSYyaMFqqo6CFyZJuSfo62BH +fetchai/connections/ledger,QmPwbSbzK66j147Bjjxaqp3jRAR2ui59zthqFAqB5i7Uxy fetchai/connections/local,QmNXMDuB7vfGrhv2Q4R8REDicSUgXfVPd7x1tAP3847jsr fetchai/connections/oef,QmT6nbEYgjHPTwoXqV5FNeg7SUaraXGQGUhGeVGEhqXVDg fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh From f82f467650c86c74d1622ddb5002a4d3a93762f5 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Tue, 29 Sep 2020 18:18:08 +0200 Subject: [PATCH 105/131] update tests --- aea/aea_builder.py | 4 +- aea/configurations/base.py | 6 +-- aea/helpers/base.py | 23 ++++++------ tests/test_aea_builder.py | 21 +++++------ tests/test_configurations/test_base.py | 21 ++++++++--- tests/test_helpers/test_base.py | 51 +++++++++++++++++++++++++- 6 files changed, 91 insertions(+), 35 deletions(-) diff --git a/aea/aea_builder.py b/aea/aea_builder.py index 3e71026779..82e66e5276 100644 --- a/aea/aea_builder.py +++ b/aea/aea_builder.py @@ -1372,10 +1372,10 @@ def _load_and_add_components( logging.Logger, make_logger(configuration, agent_name) ) else: - if configuration.is_abstract_component: + new_configuration = self._overwrite_custom_configuration(configuration) + if new_configuration.is_abstract_component: load_aea_package(configuration) continue - new_configuration = self._overwrite_custom_configuration(configuration) _logger = make_logger(new_configuration, agent_name) component = load_component_from_config( new_configuration, logger=_logger, **kwargs diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 2b4d2e6e26..190dee4ef3 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -53,7 +53,7 @@ from aea.__version__ import __version__ as __aea_version__ from aea.exceptions import enforce -from aea.helpers.base import merge_update +from aea.helpers.base import recursive_update from aea.helpers.ipfs.base import IPFSHashOnly @@ -1065,7 +1065,7 @@ def update(self, data: Dict) -> None: :return: None """ new_config = data.get("config", {}) - merge_update(self.config, new_config) + recursive_update(self.config, new_config) class ProtocolConfig(ComponentConfiguration): @@ -1347,7 +1347,7 @@ def _update_skill_component_config(type_plural: str, data: Dict): component_config = cast( SkillComponentConfiguration, registry.read(component_name) ) - merge_update(component_config.args, component_data.get("args", {})) + recursive_update(component_config.args, component_data.get("args", {})) _update_skill_component_config("behaviours", data) _update_skill_component_config("handlers", data) diff --git a/aea/helpers/base.py b/aea/helpers/base.py index e39a9fe80b..3289f0c175 100644 --- a/aea/helpers/base.py +++ b/aea/helpers/base.py @@ -392,36 +392,37 @@ def exception_log_and_reraise(log_method: Callable, message: str): raise -def merge_update(to_update: Dict, new_values: Dict): +def recursive_update(to_update: Dict, new_values: Dict): """ - Merge two dictionaries by replacing conflicts with the new values. + Update a dictionary by replacing conflicts with the new values. It does side-effects to the first dictionary. >>> to_update = dict(a=1, b=2, subdict=dict(subfield1=1)) - >>> new_values = dict(b=3, c=4, subdict=dict(subfield2=2)) - >>> merge_update(to_update, new_values) + >>> new_values = dict(b=3, subdict=dict(subfield1=2)) + >>> recursive_update(to_update, new_values) >>> to_update - {'a': 1, 'b': 3, 'subdict': {'subfield1': 1, 'subfield2': 2}, 'c': 4} + {'a': 1, 'b': 3, 'subdict': {'subfield1': 2}} :param to_update: the dictionary to update. - :param new_values: the dictionary of new values to add/replace. - :return: the merged dictionary. + :param new_values: the dictionary of new values to replace. + :return: the updated dictionary. """ for key, value in new_values.items(): if key not in to_update: - to_update[key] = value - continue + raise ValueError( + f"Key '{key}' is not contained in the dictionary to update." + ) value_to_update = to_update[key] value_type = type(value) value_to_update_type = type(value_to_update) if value_type != value_to_update_type: raise ValueError( - f"Trying to replace value '{value}' with value '{value_to_update}' which is of different type." + f"Trying to replace value '{value_to_update}' with value '{value}' which is of different type." ) if value_type == value_to_update_type == dict: - merge_update(value_to_update, value) + recursive_update(value_to_update, value) else: to_update[key] = value diff --git a/tests/test_aea_builder.py b/tests/test_aea_builder.py index 667a3b6a96..f99aa5fbec 100644 --- a/tests/test_aea_builder.py +++ b/tests/test_aea_builder.py @@ -616,18 +616,15 @@ def _add_dummy_skill_config(self): behaviours: dummy: args: - {indent(yaml.dump(self.expected_behaviour_args), " ")} - class_name: DummyBehaviour + {indent(yaml.dump(self.new_behaviour_args), " ")} handlers: dummy: args: - {indent(yaml.dump(self.expected_handler_args), " ")} - class_name: DummyHandler + {indent(yaml.dump(self.new_handler_args), " ")} models: dummy: args: - {indent(yaml.dump(self.expected_model_args), " ")} - class_name: DummyModel + {indent(yaml.dump(self.new_model_args), " ")} ... """ ) @@ -635,9 +632,9 @@ def _add_dummy_skill_config(self): def test_from_project(self): """Test builder set from project dir.""" - self.expected_behaviour_args = {"behaviour_arg_1": 42} - self.expected_handler_args = {"handler_arg_1": 42} - self.expected_model_args = {"model_arg_1": 42} + self.new_behaviour_args = {"behaviour_arg_1": 42} + self.new_handler_args = {"handler_arg_1": 42} + self.new_model_args = {"model_arg_1": 42} self._add_dummy_skill_config() builder = AEABuilder.from_aea_project(Path(self._get_cwd())) with cd(self._get_cwd()): @@ -647,11 +644,11 @@ def test_from_project(self): PublicId("dummy_author", "dummy", "0.1.0") ) dummy_behaviour = dummy_skill.behaviours["dummy"] - assert dummy_behaviour.config == self.expected_behaviour_args + assert dummy_behaviour.config == {"behaviour_arg_1": 42, "behaviour_arg_2": "2"} dummy_handler = dummy_skill.handlers["dummy"] - assert dummy_handler.config == self.expected_handler_args + assert dummy_handler.config == {"handler_arg_1": 42, "handler_arg_2": "2"} dummy_model = dummy_skill.models["dummy"] - assert dummy_model.config == self.expected_model_args + assert dummy_model.config == {"model_arg_1": 42, "model_arg_2": "2"} class TestFromAEAProjectMakeSkillAbstract(AEATestCase): diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index f75385294f..c2fb7954ec 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -208,20 +208,20 @@ def test_update_method(self): dummy_behaviour = skill_config.behaviours.read("dummy") expected_dummy_behaviour_args = copy(dummy_behaviour.args) - expected_dummy_behaviour_args["new_arg"] = 1 + expected_dummy_behaviour_args["behaviour_arg_1"] = 42 dummy_handler = skill_config.handlers.read("dummy") expected_dummy_handler_args = copy(dummy_handler.args) - expected_dummy_handler_args["new_arg"] = 1 + expected_dummy_handler_args["handler_arg_1"] = 42 dummy_model = skill_config.models.read("dummy") expected_dummy_model_args = copy(dummy_model.args) - expected_dummy_model_args["new_arg"] = 1 + expected_dummy_model_args["model_arg_1"] = 42 new_configurations = { - "behaviours": {"dummy": {"args": dict(new_arg=1)}}, - "handlers": {"dummy": {"args": dict(new_arg=1)}}, - "models": {"dummy": {"args": dict(new_arg=1)}}, + "behaviours": {"dummy": {"args": dict(behaviour_arg_1=42)}}, + "handlers": {"dummy": {"args": dict(handler_arg_1=42)}}, + "models": {"dummy": {"args": dict(model_arg_1=42)}}, } skill_config.update(new_configurations) @@ -744,3 +744,12 @@ def test_package_version_lt(): v2 = PackageVersion("0.2.0") v3 = PackageVersion("latest") assert v1 < v2 < v3 + + +def test_configuration_class(): + """Test the attribute 'configuration class' of PackageType.""" + assert PackageType.PROTOCOL.configuration_class() == ProtocolConfig + assert PackageType.CONNECTION.configuration_class() == ConnectionConfig + assert PackageType.CONTRACT.configuration_class() == ContractConfig + assert PackageType.SKILL.configuration_class() == SkillConfig + assert PackageType.AGENT.configuration_class() == AgentConfig diff --git a/tests/test_helpers/test_base.py b/tests/test_helpers/test_base.py index b063cc3732..24b5678032 100644 --- a/tests/test_helpers/test_base.py +++ b/tests/test_helpers/test_base.py @@ -38,6 +38,7 @@ load_env_file, load_module, locate, + recursive_update, retry_decorator, send_control_c, try_decorator, @@ -209,7 +210,7 @@ def test_send_control_c(): # because o/w pytest would be stopped. process = Popen( # nosec ["timeout" if platform.system() == "Windows" else "sleep", "5"], - **win_popen_kwargs() + **win_popen_kwargs(), ) time.sleep(0.001) send_control_c(process) @@ -241,3 +242,51 @@ def test_yaml_dump_all_load_all(): f.seek(0) assert yaml_load_all(f) == data + + +def test_recursive_update_no_recursion(): + """Test the 'recursive update' utility, in the case there's no recursion.""" + to_update = dict(not_updated=0, an_integer=1, a_list=[1, 2, 3], a_tuple=(1, 2, 3)) + + new_integer, new_list, new_tuple = 2, [3], (3,) + new_values = dict(an_integer=new_integer, a_list=new_list, a_tuple=new_tuple) + recursive_update(to_update, new_values) + assert to_update == dict( + not_updated=0, an_integer=new_integer, a_list=new_list, a_tuple=new_tuple + ) + + +def test_recursive_update_with_recursion(): + """Test the 'recursive update' utility with recursion.""" + # here we try to update an integer and add a new value + to_update = dict(subdict=dict(to_update=1)) + new_values = dict(subdict=dict(to_update=2)) + + recursive_update(to_update, new_values) + assert to_update == dict(subdict=dict(to_update=2)) + + +def test_recursive_update_negative_different_type(): + """Test the 'recursive update' utility, when the types are different.""" + # here we try to update an integer with a boolean - it raises error. + to_update = dict(subdict=dict(to_update=1)) + new_values = dict(subdict=dict(to_update=False)) + + with pytest.raises( + ValueError, + match=f"Trying to replace value '1' with value 'False' which is of different type.", + ): + recursive_update(to_update, new_values) + + +def test_recursive_update_negative_unknown_field(): + """Test the 'recursive update' utility, when there are unknown fields.""" + # here we try to update an integer with a boolean - it raises error. + to_update = dict(subdict=dict(field=1)) + new_values = dict(subdict=dict(new_field=False)) + + with pytest.raises( + ValueError, + match=f"Key 'new_field' is not contained in the dictionary to update.", + ): + recursive_update(to_update, new_values) From 437c116e969acc9b844d690fbe9a03203f1cca4a Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Tue, 29 Sep 2020 23:59:35 +0300 Subject: [PATCH 106/131] fixes --- aea/configurations/project.py | 21 ++++++++- aea/manager.py | 88 +++++++++++++++-------------------- scripts/whitelist.py | 9 ++++ tests/test_manager.py | 40 ++++++++-------- 4 files changed, 87 insertions(+), 71 deletions(-) diff --git a/aea/configurations/project.py b/aea/configurations/project.py index 8aeace45b8..11e6631807 100644 --- a/aea/configurations/project.py +++ b/aea/configurations/project.py @@ -19,8 +19,9 @@ """This module contains the implementation of AEA agents project configuiration.""" import os from shutil import rmtree -from typing import Set +from typing import Dict, List, Set +from aea.aea import AEA from aea.cli.registry.fetch import fetch_agent from aea.cli.utils.context import Context from aea.configurations.base import PublicId @@ -48,3 +49,21 @@ def load(cls, working_dir: str, public_id: PublicId) -> "Project": def remove(self) -> None: """Remove project, do cleanup.""" rmtree(self.path) + + +class AgentAlias: + """Agent alias representation.""" + + def __init__( + self, project: Project, agent_name: str, config: List[Dict], agent: AEA + ): + """Init agent alias with project, config, name, agent.""" + self.project = project + self.config = config + self.agent_name = agent_name + self.agent = agent + self.project.agents.add(self.agent_name) + + def remove_from_project(self): + """Remove agent alias from project.""" + self.project.agents.remove(self.agent_name) diff --git a/aea/manager.py b/aea/manager.py index 2c711f8057..470e4f8e0f 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -31,28 +31,12 @@ from aea.aea_builder import AEABuilder from aea.configurations.base import ComponentId, PublicId from aea.configurations.constants import DEFAULT_LEDGER -from aea.configurations.project import Project +from aea.configurations.project import AgentAlias, Project from aea.crypto.helpers import create_private_key from aea.helpers.base import yaml_load_all -class AgentAlias: - """Agent alias representation.""" - - def __init__(self, project: Project, name: str, config: List[Dict], agent: AEA): - """Init agent alias with project, config, name, agent.""" - self.project = project - self.config = config - self.name = name - self.agent = agent - self.project.agents.add(self.name) - - def remove(self): - """Remove agent alias from project.""" - self.project.agents.remove(self.name) - - -class AsyncTask: +class AgentRunAsyncTask: """Async task wrapper for agent.""" def __init__(self, agent: AEA, loop: asyncio.AbstractEventLoop) -> None: @@ -119,12 +103,12 @@ def is_running(self) -> bool: return not self.wait().done() -class ThreadedTask(AsyncTask): - """Threaded task.""" +class AgentRunThreadTask(AgentRunAsyncTask): + """Threaded wrapper to run agent.""" def __init__(self, agent: AEA, loop: asyncio.AbstractEventLoop) -> None: """Init task with agent and loop.""" - AsyncTask.__init__(self, agent, loop) + AgentRunAsyncTask.__init__(self, agent, loop) self._thread: Optional[Thread] = None def create_run_loop(self) -> None: @@ -140,12 +124,12 @@ def start(self) -> None: self._thread.start() -class Manager: - """Abstract agents manager.""" +class MultiAgentManager: + """Multi agents manager.""" AGENT_DO_NOT_OVERRIDE_VALUES = ["skills", "connections", "protocols", "contracts"] MODES = ["async", "threaded"] - DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS = 60 + DEFAULT_TIMEOUT_FOR_BLOCKING_OPERATIONS = 60 def __init__(self, working_dir: str, mode: str = "async") -> None: """ @@ -159,7 +143,7 @@ def __init__(self, working_dir: str, mode: str = "async") -> None: self._projects: Dict[PublicId, Project] = {} self._keys_dir = os.path.abspath(os.path.join(self.working_dir, "keys")) self._agents: Dict[str, AgentAlias] = {} - self._agents_tasks: Dict[str, AsyncTask] = {} + self._agents_tasks: Dict[str, AgentRunAsyncTask] = {} self._thread: Optional[Thread] = None self._loop: Optional[asyncio.AbstractEventLoop] = None @@ -186,28 +170,30 @@ def _run_thread(self) -> None: self._loop.run_until_complete(self._manager_loop()) async def _manager_loop(self) -> None: - """Perform manager stop.""" + """Await and control running manager.""" if not self._event: raise ValueError("Do not use this method directly, use start_manager.") self._started_event.set() while self._is_running: - tasks_for_agents = { + agents_run_tasks_futures = { task.wait(): agent_name for agent_name, task in self._agents_tasks.items() } - wait_tasks = list(tasks_for_agents.keys()) + [self._event.wait()] # type: ignore + wait_tasks = list(agents_run_tasks_futures.keys()) + [self._event.wait()] # type: ignore done, _ = await asyncio.wait(wait_tasks, return_when=FIRST_COMPLETED) if self._event.is_set(): self._event.clear() for task in done: - if task not in tasks_for_agents: + if task not in agents_run_tasks_futures: + # task not in agents_run_tasks_futures, so it's event_wait, skip it await task continue - agent_name = tasks_for_agents[task] + + agent_name = agents_run_tasks_futures[task] self._agents_tasks.pop(agent_name) if task.exception(): for callback in self._error_callbacks: @@ -221,7 +207,7 @@ def add_error_callback( """Add error callback to call on error raised.""" self._error_callbacks.append(error_callback) - def start_manager(self) -> "Manager": + def start_manager(self) -> "MultiAgentManager": """Start manager.""" if self._is_running: return self @@ -231,10 +217,10 @@ def start_manager(self) -> "Manager": self._is_running = True self._thread = Thread(target=self._run_thread, daemon=True) self._thread.start() - self._started_event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) + self._started_event.wait(self.DEFAULT_TIMEOUT_FOR_BLOCKING_OPERATIONS) return self - def stop_manager(self) -> "Manager": + def stop_manager(self) -> "MultiAgentManager": """ Stop manager. @@ -266,7 +252,7 @@ def stop_manager(self) -> "Manager": self._loop.call_soon_threadsafe(self._event.set) if self._thread.ident != threading.get_ident(): - self._thread.join(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) + self._thread.join(self.DEFAULT_TIMEOUT_FOR_BLOCKING_OPERATIONS) self._thread = None return self @@ -276,17 +262,17 @@ def _cleanup(self) -> None: if self._was_working_dir_created and os.path.exists(self.working_dir): rmtree(self.working_dir) - def add_project(self, public_id: PublicId) -> "Manager": + def add_project(self, public_id: PublicId) -> "MultiAgentManager": """Fetch agent project and all dependencies to working_dir.""" if public_id in self._projects: raise ValueError(f"Project {public_id} was already added!") self._projects[public_id] = Project.load(self.working_dir, public_id) return self - def remove_project(self, public_id: PublicId) -> "Manager": + def remove_project(self, public_id: PublicId) -> "MultiAgentManager": """Remove agent project.""" if public_id not in self._projects: - raise ValueError(f"Project {public_id} was not added!") + raise ValueError(f"Project {public_id} is not present!") if self._projects[public_id].agents: raise ValueError( @@ -307,10 +293,10 @@ def list_projects(self) -> List[PublicId]: def add_agent( self, public_id: PublicId, - agent_name: str, + agent_name: Optional[str] = None, agent_overrides: Optional[dict] = None, component_overrides: Optional[List[dict]] = None, - ) -> "Manager": + ) -> "MultiAgentManager": """ Create new agent configuration based on project with config overrides applied. @@ -323,6 +309,8 @@ def add_agent( :return: manager """ + agent_name = agent_name or public_id.name + if agent_name in self._agents: raise ValueError(f"Agent with name {agent_name} already exists!") @@ -352,7 +340,7 @@ def list_agents(self, running_only: bool = False) -> List[str]: return [i for i in self._agents.keys() if self._is_agent_running(i)] return list(self._agents.keys()) - def remove_agent(self, agent_name: str) -> "Manager": + def remove_agent(self, agent_name: str) -> "MultiAgentManager": """ Remove agent alias definition from registry. @@ -367,10 +355,10 @@ def remove_agent(self, agent_name: str) -> "Manager": raise ValueError("Agent is running. stop it first!") agent_alias = self._agents.pop(agent_name) - agent_alias.remove() + agent_alias.remove_from_project() return self - def start_agent(self, agent_name: str) -> "Manager": + def start_agent(self, agent_name: str) -> "MultiAgentManager": """ Start selected agent. @@ -390,9 +378,9 @@ def start_agent(self, agent_name: str) -> "Manager": raise ValueError(f"{agent_name} is already started!") if self._mode == "async": - task = AsyncTask(agent_alias.agent, self._loop) + task = AgentRunAsyncTask(agent_alias.agent, self._loop) elif self._mode == "threaded": - task = ThreadedTask(agent_alias.agent, self._loop) + task = AgentRunThreadTask(agent_alias.agent, self._loop) task.start() self._agents_tasks[agent_name] = task @@ -407,7 +395,7 @@ def _is_agent_running(self, agent_name: str) -> bool: task = self._agents_tasks[agent_name] return task.is_running - def start_all_agents(self) -> "Manager": + def start_all_agents(self) -> "MultiAgentManager": """ Start all not started agents. @@ -423,7 +411,7 @@ def start_all_agents(self) -> "Manager": return self - def stop_agent(self, agent_name: str) -> "Manager": + def stop_agent(self, agent_name: str) -> "MultiAgentManager": """ Stop running agent. @@ -456,11 +444,11 @@ def _add_cb(): self._loop.call_soon_threadsafe(_add_cb) agent_task.stop() - event.wait(self.DEFALUT_TIMEOUT_FOR_BLOCKING_OPERATIONS) + event.wait(self.DEFAULT_TIMEOUT_FOR_BLOCKING_OPERATIONS) return self - def stop_all_agents(self) -> "Manager": + def stop_all_agents(self) -> "MultiAgentManager": """ Stop all agents running. @@ -471,7 +459,7 @@ def stop_all_agents(self) -> "Manager": return self - def stop_agents(self, agent_names: List[str]) -> "Manager": + def stop_agents(self, agent_names: List[str]) -> "MultiAgentManager": """ Stop specified agents. @@ -486,7 +474,7 @@ def stop_agents(self, agent_names: List[str]) -> "Manager": return self - def start_agents(self, agent_names: List[str]) -> "Manager": + def start_agents(self, agent_names: List[str]) -> "MultiAgentManager": """ Stop specified agents. diff --git a/scripts/whitelist.py b/scripts/whitelist.py index 9547a8a7fa..e16caa277f 100644 --- a/scripts/whitelist.py +++ b/scripts/whitelist.py @@ -190,3 +190,12 @@ receiver_address # unused variable (aea/decision_maker/default.py:99) create_with_message # unused method (aea/helpers/dialogue/base.py:1054) _.is_disconnecting # unused property (aea/multiplexer.py:67) +MultiAgentManager # unused class (aea/manager.py:127) +_.add_error_callback # unused method (aea/manager.py:202) +_.start_manager # unused method (aea/manager.py:208) +_.stop_manager # unused method (aea/manager.py:221) +_.add_project # unused method (aea/manager.py:263) +_.list_projects # unused method (aea/manager.py:283) +_.add_agent # unused method (aea/manager.py:291) +_.start_all_agents # unused method (aea/manager.py:396) +_.get_agent_alias # unused method (aea/manager.py:486) diff --git a/tests/test_manager.py b/tests/test_manager.py index a0b08ecf6a..46237f3b1e 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -23,13 +23,13 @@ import pytest from aea.configurations.base import PublicId -from aea.manager import Manager +from aea.manager import MultiAgentManager from tests.common.utils import wait_for_condition -class TestManagerAsyncMode: # pylint: disable=unused-argument,protected-access,attribute-defined-outside-init - """Tests for manager in async mode.""" +class TestMultiAgentManagerAsyncMode: # pylint: disable=unused-argument,protected-access,attribute-defined-outside-init + """Tests for MultiAgentManager in async mode.""" MODE = "async" @@ -38,28 +38,28 @@ class TestManagerAsyncMode: # pylint: disable=unused-argument,protected-access, def setup(self): """Set test case.""" self.agent_name = "test_what_ever12" - self.working_dir = "manager_dir" + self.working_dir = "MultiAgentManager_dir" self.project_public_id = PublicId("fetchai", "my_first_aea", "0.11.0") self.project_path = os.path.join( self.working_dir, self.project_public_id.author, self.project_public_id.name ) assert not os.path.exists(self.working_dir) - self.manager = Manager(self.working_dir, mode=self.MODE) + self.manager = MultiAgentManager(self.working_dir, mode=self.MODE) def teardown(self): """Tear down test case.""" self.manager.stop_manager() def test_workdir_created_removed(self): - """Check work dit created removed on manager start and stop.""" + """Check work dit created removed on MultiAgentManager start and stop.""" assert not os.path.exists(self.working_dir) self.manager.start_manager() assert os.path.exists(self.working_dir) self.manager.stop_manager() assert not os.path.exists(self.working_dir) - def test_manager_is_running(self): - """Check manager is running property reflects state.""" + def test_MultiAgentManager_is_running(self): + """Check MultiAgentManager is running property reflects state.""" assert not self.manager.is_running self.manager.start_manager() assert self.manager.is_running @@ -81,7 +81,7 @@ def test_add_remove_project(self): self.manager.remove_project(self.project_public_id) assert self.project_public_id not in self.manager.list_projects() - with pytest.raises(ValueError, match=r"was not added"): + with pytest.raises(ValueError, match=r"is not present"): self.manager.remove_project(self.project_public_id) self.manager.add_project(self.project_public_id) @@ -113,7 +113,7 @@ def test_add_agent(self): ], ) agent_alias = self.manager.get_agent_alias(self.agent_name) - assert agent_alias.name == self.agent_name + assert agent_alias.agent_name == self.agent_name assert ( agent_alias.agent.resources.get_behaviour( self.echo_skill_id, "echo" @@ -150,7 +150,7 @@ def test_add_agent_for_non_exist_project(self): self.manager.add_agent(PublicId("test", "test", "0.1.0"), "another_agent") def test_agent_acually_running(self): - """Test manager starts agent correctly and agent perform acts.""" + """Test MultiAgentManager starts agent correctly and agent perform acts.""" self.test_add_agent() agent_alias = self.manager.get_agent_alias(self.agent_name) behaviour = agent_alias.agent.resources.get_behaviour( @@ -178,7 +178,7 @@ def test_exception_handling(self): wait_for_condition(lambda: callback_mock.call_count > 0, timeout=10) def test_stop_from_exception_handling(self): - """Test stop manager from erro callback.""" + """Test stop MultiAgentManager from erro callback.""" self.test_add_agent() agent_alias = self.manager.get_agent_alias(self.agent_name) behaviour = agent_alias.agent.resources.get_behaviour( @@ -197,7 +197,7 @@ def handler(*args, **kwargs): wait_for_condition(lambda: not self.manager.is_running, timeout=10) def test_start_all(self): - """Test manager start all agents.""" + """Test MultiAgentManager start all agents.""" self.test_add_agent() assert self.agent_name in self.manager.list_agents() assert self.agent_name not in self.manager.list_agents(running_only=True) @@ -249,24 +249,24 @@ def test_do_no_allow_override_some_fields(self): @staticmethod def test_invalid_mode(): - """Test manager fails on invalid mode.""" + """Test MultiAgentManager fails on invalid mode.""" with pytest.raises(ValueError, match="Invalid mode"): - Manager("test_dir", mode="invalid_mode") + MultiAgentManager("test_dir", mode="invalid_mode") def test_double_start(self): - """Test double manager start.""" + """Test double MultiAgentManager start.""" self.manager.start_manager() self.manager.start_manager() def test_double_stop(self): - """Test double manager stop.""" + """Test double MultiAgentManager stop.""" self.manager.start_manager() self.manager.stop_manager() self.manager.stop_manager() @pytest.mark.asyncio async def test_run_loop_direct_call(self): - """Test do not allow to run manager_loop directly.""" + """Test do not allow to run MultiAgentManager_loop directly.""" with pytest.raises( ValueError, match="Do not use this method directly, use start_manager" ): @@ -287,7 +287,7 @@ def test_remove_running_agent(self): assert self.agent_name not in self.manager.list_agents() -class TestManagerThreadedMode(TestManagerAsyncMode): - """Tests for manager in threaded mode.""" +class TestMultiAgentManagerThreadedMode(TestMultiAgentManagerAsyncMode): + """Tests for MultiAgentManager in threaded mode.""" MODE = "threaded" From 10cbc3911c6c7ff1d7ba046e00fd426edd05432c Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 30 Sep 2020 11:27:42 +0100 Subject: [PATCH 107/131] docs updates, including multi agent manager --- docs/acn.md | 4 +++ docs/config.md | 2 +- docs/message-routing.md | 8 +++--- docs/multi-agent-manager.md | 54 +++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 5 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 docs/multi-agent-manager.md diff --git a/docs/acn.md b/docs/acn.md index ff5e4ec970..63d7572a7d 100644 --- a/docs/acn.md +++ b/docs/acn.md @@ -4,4 +4,8 @@

      Details coming soon. In the meantime check out this section.

      + +missing: +- different configurations of setting up peer and client +
      diff --git a/docs/config.md b/docs/config.md index 6e4435706e..1173780dbf 100644 --- a/docs/config.md +++ b/docs/config.md @@ -10,7 +10,7 @@ PUBLIC_ID_REGEX: "^[a-zA-Z0-9_]*/[a-zA-Z_][a-zA-Z0-9_]*:(0|[1-9]\\d*)\\.(0|[1-9] LEDGER_ID_REGEX: "^[^\\d\\W]\\w*\\Z" ``` -The `aea-config.yaml` defines the AEA project. The compulsary components are listed below: +The `aea-config.yaml` defines the AEA project. The compulsory components are listed below: ``` yaml agent_name: my_agent # Name of the AEA project (must satisfy PACKAGE_REGEX) author: fetchai # Author handle of the project's author (must satisfy AUTHOR_REGEX) diff --git a/docs/message-routing.md b/docs/message-routing.md index a387eab022..8b2741aaf1 100644 --- a/docs/message-routing.md +++ b/docs/message-routing.md @@ -13,9 +13,11 @@ Message routing can be split up into the routing of incoming and outgoing `Messa - `Skills` deposit `Messages` in `OutBox` - `OutBox` constructs an `Envelope` from the `Message` - `Multiplexer` assigns messages to relevant `Connection` based on three rules: -1. checks if `EnvelopeContext` exists and specifies a `Connection`, if so uses that else -2. checks if default routing is specified for the `protocol_id` referenced in the `Envelope`, if so uses that else -3. sends to default `Connection`. + + 1. checks if `EnvelopeContext` exists and specifies a `Connection`, if so uses that else + 2. checks if default routing is specified for the `protocol_id` referenced in the `Envelope`, if so uses that else + 3. sends to default `Connection`. + - `Connections` can encode envelopes where necessary or pass them on for transport to another agent ## Address fields in `Envelopes`/`Messages` diff --git a/docs/multi-agent-manager.md b/docs/multi-agent-manager.md new file mode 100644 index 0000000000..4ff3d1747f --- /dev/null +++ b/docs/multi-agent-manager.md @@ -0,0 +1,54 @@ + +The `MultiAgentManager` allows managing multiple agent projects programmatically. + +## Setup + +We intantiate the manager by providing it with the working directory in which to operate and starting it: + +``` python +from aea.manager import MultiAgentManager + +WORKING_DIR = "." + +manager = MultiAgentManager(WORKING_DIR) +manager.start_manager() +``` + +## Adding projects + +We first add a couple of finished AEA project: + +``` python +manager.add_project("fetchai/weather_client:0.13.0") +manager.add_project("fetchai/weather_station:0.13.0") +``` + +## Adding agent instances + +``` python +manager.add_agent("fetchai/weather_client:0.13.0") +manager.add_agent("fetchai/weather_station:0.13.0") +``` + +missing: +- configuring private keys +- configure delayed startup sequence + + +## Running the agents: + +``` python +manager.start_all_agents() +``` + +## Stopping the agents: + +``` python +manager.stop_all_agents() +``` + +## Cleaning up + +``` python +manager.stop_manager() +``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 749294b81b..d68fc85c12 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,6 +62,7 @@ nav: - AEAs vs agents: 'agent-vs-aea.md' - Upgrading versions: 'upgrading.md' - Modes of running an AEA: 'modes.md' + - Multi agent manager: 'multi-agent-manager.md' - Use case components: - Generic skills: 'generic-skills.md' - Front-end intergration: 'connect-a-frontend.md' From 0ba97ccf5aaa29d909b74ae8ad3e1c755685ffda Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Wed, 30 Sep 2020 13:19:06 +0300 Subject: [PATCH 108/131] fix for cancellerror supression in multiplexer._connect_all --- aea/multiplexer.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/aea/multiplexer.py b/aea/multiplexer.py index d604b1e1f0..8c2e58b907 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -264,7 +264,10 @@ async def connect(self) -> None: self._recv_loop_task = self._loop.create_task(self._receiving_loop()) self._send_loop_task = self._loop.create_task(self._send_loop()) self.logger.debug("Multiplexer connected and running.") - except (CancelledError, Exception): + except (CancelledError, asyncio.CancelledError): + await self._stop() + raise asyncio.CancelledError() + except Exception: self.logger.exception("Exception on connect:") await self._stop() raise AEAConnectionError("Failed to connect the multiplexer.") @@ -274,7 +277,7 @@ async def disconnect(self) -> None: self.logger.debug("Multiplexer disconnecting...") async with self._lock: if self.connection_status.is_disconnected: - self.logger.debug("Multiplexer already disconnected.") + self.logger.debug("Multiplexer disconnected.") return try: self.connection_status.set(ConnectionStates.disconnecting) @@ -341,14 +344,13 @@ async def _connect_all(self) -> None: await self._connect_one(connection_id) connected.append(connection_id) except Exception as e: # pylint: disable=broad-except - self.logger.error( - "Error while connecting {}: {}".format( - str(type(connection)), str(e) + if not isinstance(e, (asyncio.CancelledError, CancelledError)): + self.logger.exception( + "Error while connecting {}: {}".format( + str(type(connection)), repr(e) + ) ) - ) - for c in connected: - await self._disconnect_one(c) - break + raise self.logger.debug("Multiplexer connections are set.") async def _connect_one(self, connection_id: PublicId) -> None: From 86c0b9304bf4e6b74845c99589d9ee585c90cf16 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 30 Sep 2020 16:02:37 +0200 Subject: [PATCH 109/131] overwrite agent configs in manager --- aea/configurations/base.py | 63 +++++++++++++++++++++++++++++--------- aea/helpers/base.py | 4 +-- aea/manager.py | 53 +++++++++++++++++++------------- tests/test_manager.py | 7 ++--- 4 files changed, 84 insertions(+), 43 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 190dee4ef3..a8ba960947 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -27,7 +27,7 @@ import re from abc import ABC, abstractmethod from collections import OrderedDict -from copy import deepcopy +from copy import copy, deepcopy from enum import Enum from pathlib import Path from typing import ( @@ -833,6 +833,14 @@ def package_dependencies(self) -> Set[ComponentId]: """Get the package dependencies.""" return set() + def update(self, data: Dict) -> None: + """ + Update configuration with other data. + + :param data: the data to replace. + :return: None + """ + class ComponentConfiguration(PackageConfiguration, ABC): """Class to represent an agent component configuration.""" @@ -916,14 +924,6 @@ def check_aea_version(self): """ _check_aea_version(self) - def update(self, data: Dict) -> None: - """ - Update configuration with other data. - - :param data: the data to replace. - :return: None - """ - class ConnectionConfig(ComponentConfiguration): """Handle connection configuration.""" @@ -1537,7 +1537,18 @@ def default_ledger(self, ledger_id: str): def component_configurations_json(self) -> List[OrderedDict]: """Get the component configurations in JSON format.""" - return list(map(OrderedDict, self.component_configurations.values())) + result: List[OrderedDict] = [] + for component_id, config in self.component_configurations.items(): + result.append( + OrderedDict( + author=component_id.author, + name=component_id.name, + version=component_id.version, + type=str(component_id.component_type), + **config, + ) + ) + return result @property def json(self) -> Dict: @@ -1647,10 +1658,10 @@ def from_json(cls, obj: Dict): component_configurations = {} for config in obj.get("component_configurations", []): tmp = deepcopy(config) - name = tmp["name"] - author = tmp["author"] - version = tmp["version"] - type_ = tmp["type"] + name = tmp.pop("name") + author = tmp.pop("author") + version = tmp.pop("version") + type_ = tmp.pop("type") component_id = ComponentId( ComponentType(type_), PublicId(author, name, version) ) @@ -1665,6 +1676,30 @@ def from_json(cls, obj: Dict): return agent_config + def update(self, data: Dict) -> None: + """ + Update configuration with other data. + + To update the component parts, populate the field "component_configurations" as a + mapping from ComponentId to configurations. + + :param data: the data to replace. + :return: None + """ + data = copy(data) + # update component parts + new_component_configurations: Dict = data.pop("component_configurations", {}) + result: Dict[ComponentId, Dict] = copy(self.component_configurations) + for component_id, obj in new_component_configurations.items(): + if component_id not in result: + result[component_id] = obj + else: + recursive_update(result[component_id], obj) + self.component_configurations = result + + # update other fields + # currently not supported. + class SpeechActContentConfig(Configuration): """Handle a speech_act content configuration.""" diff --git a/aea/helpers/base.py b/aea/helpers/base.py index 3289f0c175..b4a22ced9f 100644 --- a/aea/helpers/base.py +++ b/aea/helpers/base.py @@ -392,7 +392,7 @@ def exception_log_and_reraise(log_method: Callable, message: str): raise -def recursive_update(to_update: Dict, new_values: Dict): +def recursive_update(to_update: Dict, new_values: Dict) -> None: """ Update a dictionary by replacing conflicts with the new values. @@ -406,7 +406,7 @@ def recursive_update(to_update: Dict, new_values: Dict): :param to_update: the dictionary to update. :param new_values: the dictionary of new values to replace. - :return: the updated dictionary. + :return: None """ for key, value in new_values.items(): if key not in to_update: diff --git a/aea/manager.py b/aea/manager.py index 470e4f8e0f..ce40d6756f 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -23,17 +23,18 @@ import os import threading from asyncio.tasks import FIRST_COMPLETED +from pathlib import Path from shutil import rmtree from threading import Thread from typing import Callable, Dict, List, Optional from aea.aea import AEA from aea.aea_builder import AEABuilder -from aea.configurations.base import ComponentId, PublicId +from aea.configurations.base import AgentConfig, ComponentId, PackageType, PublicId from aea.configurations.constants import DEFAULT_LEDGER +from aea.configurations.loader import ConfigLoaders from aea.configurations.project import AgentAlias, Project from aea.crypto.helpers import create_private_key -from aea.helpers.base import yaml_load_all class AgentRunAsyncTask: @@ -509,8 +510,8 @@ def _build_agent_alias( self, project: Project, agent_name: str, - agent_overrides=None, - component_overrides=None, + agent_overrides: Optional[dict] = None, + component_overrides: Optional[List[dict]] = None, ) -> AgentAlias: """Create agent alias for project, with given name and overrided values.""" json_config = self._make_config( @@ -529,13 +530,6 @@ def _build_agent_alias( agent = builder.build() return AgentAlias(project, agent_name, json_config, agent) - @staticmethod - def _update_dict(base: dict, override: dict) -> dict: - """Apply overrides for dict.""" - base = copy.deepcopy(base) - base.update(override) - return base - def _make_config( self, project_path: str, @@ -551,20 +545,35 @@ def _make_config( 'Do not override any of {" ".join(self.AGENT_DO_NOT_OVERRIDE_VALUES)}' ) - json_data = yaml_load_all( - AEABuilder.get_configuration_file_path(project_path).open() + agent_configuration_file_path: Path = AEABuilder.get_configuration_file_path( + project_path ) - agent_config = self._update_dict(json_data[0], agent_overrides) - - components_configs = {PublicId.from_json(obj): obj for obj in json_data[1:]} - + loader = ConfigLoaders.from_package_type(PackageType.AGENT) + with agent_configuration_file_path.open() as fp: + agent_config: AgentConfig = loader.load(fp) + + # prepare configuration overrides + # - agent part + agent_update_dictionary: Dict = dict(**agent_overrides) + # - components part + components_configs: Dict[ComponentId, Dict] = {} for obj in component_overrides: - component_id = ComponentId(obj["type"], PublicId.from_json(obj)) - components_configs[component_id] = self._update_dict( - components_configs.get(component_id, {}), obj + obj = copy.copy(obj) + author, name, version = ( + obj.pop("author"), + obj.pop("name"), + obj.pop("version"), ) - - return [agent_config] + list(components_configs.values()) + component_id = ComponentId(obj.pop("type"), PublicId(author, name, version)) + components_configs[component_id] = obj + agent_update_dictionary["component_configurations"] = components_configs + # do the override (and valiation) + agent_config.update(agent_update_dictionary) + + # return the multi-paged JSON object. + json_data = agent_config.ordered_json + result: List[Dict] = [json_data] + json_data.pop("component_configurations") + return result def _create_private_key(self, name, ledger) -> str: """Create new key for agent alias in working dir keys dir.""" diff --git a/tests/test_manager.py b/tests/test_manager.py index 46237f3b1e..7b680ee698 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -101,13 +101,10 @@ def test_add_agent(self): self.agent_name, component_overrides=[ { - "type": "skill", **self.echo_skill_id.json, + "type": "skill", "behaviours": { - "echo": { - "args": {"tick_interval": new_tick_interval}, - "class_name": "EchoBehaviour", - } + "echo": {"args": {"tick_interval": new_tick_interval}} }, } ], From a8102c62ad74f9ffe1c3a0f14d6dfb958895e891 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 30 Sep 2020 17:07:04 +0200 Subject: [PATCH 110/131] fix tests on aea builder --- aea/configurations/base.py | 5 +++++ aea/configurations/loader.py | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index a8ba960947..91e046ccbb 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -733,6 +733,11 @@ def prefix_import_path(self) -> str: self.public_id.author, self.component_type.to_plural(), self.public_id.name ) + @property + def json(self) -> Dict: + """Get the JSON representation.""" + return dict(**self.public_id.json, type=str(self.component_type)) + ProtocolId = PublicId ContractId = PublicId diff --git a/aea/configurations/loader.py b/aea/configurations/loader.py index f58eb43fa9..2779585959 100644 --- a/aea/configurations/loader.py +++ b/aea/configurations/loader.py @@ -386,10 +386,10 @@ def _split_component_id_and_config( raise ValueError( f"There are missing fields in component id {component_index + 1}: {missing_fields}." ) - component_name = component_configuration_json["name"] - component_author = component_configuration_json["author"] - component_version = component_configuration_json["version"] - component_type = ComponentType(component_configuration_json["type"]) + component_name = component_configuration_json.pop("name") + component_author = component_configuration_json.pop("author") + component_version = component_configuration_json.pop("version") + component_type = ComponentType(component_configuration_json.pop("type")) component_public_id = PublicId( component_author, component_name, component_version ) @@ -414,7 +414,9 @@ def _validate_component_configuration( component_id.component_type ) try: - BaseConfigLoader(schema_file).validate(configuration) + BaseConfigLoader(schema_file).validate( + dict(**component_id.json, **configuration) + ) except jsonschema.ValidationError as e: raise ValueError( f"Configuration of component {component_id} is not valid." From 5136887ccb7c6071880a405a2746e657e7a72d52 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Wed, 30 Sep 2020 16:22:39 +0300 Subject: [PATCH 111/131] fixes --- aea/multiplexer.py | 2 +- tests/common/pexpect_popen.py | 10 ++++++++-- tests/test_cli/test_launch.py | 4 ++-- tests/test_multiplexer.py | 9 ++++++--- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/aea/multiplexer.py b/aea/multiplexer.py index 8c2e58b907..a766694392 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -277,7 +277,7 @@ async def disconnect(self) -> None: self.logger.debug("Multiplexer disconnecting...") async with self._lock: if self.connection_status.is_disconnected: - self.logger.debug("Multiplexer disconnected.") + self.logger.debug("Multiplexer already disconnected.") return try: self.connection_status.set(ConnectionStates.disconnecting) diff --git a/tests/common/pexpect_popen.py b/tests/common/pexpect_popen.py index e4e591a9b3..220bfd58c3 100644 --- a/tests/common/pexpect_popen.py +++ b/tests/common/pexpect_popen.py @@ -86,12 +86,15 @@ def aea_cli(cls, args) -> "PexpectWrapper": logfile=sys.stdout, ) - def expect_all(self, pattern_list: List[str], timeout: float = 10) -> None: + def expect_all( + self, pattern_list: List[str], timeout: float = 10, strict: bool = True + ) -> None: """ Wait for all patterns appear in process output. :param pattern_list: list of string to expect :param timeout: timeout in seconds + :param strict: if non strict, it allows regular expression :return: None """ @@ -102,7 +105,10 @@ def expect_all(self, pattern_list: List[str], timeout: float = 10) -> None: time_spent = time.time() - start_time if time_spent > timeout: raise TIMEOUT(timeout) - idx = self.expect_exact(pattern_list, timeout - time_spent) + if strict: + idx = self.expect_exact(pattern_list, timeout - time_spent) + else: + idx = self.expect(pattern_list, timeout - time_spent) pattern_list.pop(idx) def wait_eof(self, timeout: float = 10) -> None: diff --git a/tests/test_cli/test_launch.py b/tests/test_cli/test_launch.py index 91b7a65fba..0918f98772 100644 --- a/tests/test_cli/test_launch.py +++ b/tests/test_cli/test_launch.py @@ -213,11 +213,11 @@ def test_exit_code_equal_to_zero(self): f"[{self.agent_name_1}] Start processing messages", f"[{self.agent_name_2}] Start processing messages", ], - timeout=20, + timeout=30, ) process_launch.control_c() process_launch.expect_all( - ["Exit cli. code: 0"], timeout=20, + ["Exit cli. code: 0"], timeout=30, ) diff --git a/tests/test_multiplexer.py b/tests/test_multiplexer.py index 93b206e796..e16806ca3b 100644 --- a/tests/test_multiplexer.py +++ b/tests/test_multiplexer.py @@ -728,12 +728,15 @@ def test_multiplexer_disconnected_on_early_interruption(self): ) self.proc.expect_all( - ["Finished downloading golang dependencies"], timeout=20, + ["Finished downloading golang dependencies"], timeout=50, ) self.proc.control_c() self.proc.expect_all( - ["Multiplexer disconnecting...", "Multiplexer disconnected.", EOF], - timeout=20, + ["Multiplexer .*disconnected."], timeout=20, strict=False, + ) + + self.proc.expect_all( + [EOF], timeout=20, ) def test_multiplexer_disconnected_on_termination_after_connected(self): From 6c1a327f16790d699614a2620aa1af7226e18cd9 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Wed, 30 Sep 2020 17:13:18 +0200 Subject: [PATCH 112/131] add basic test to AgentConfig.update --- tests/test_configurations/test_base.py | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index c2fb7954ec..6506a797ed 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -34,6 +34,7 @@ ComponentType, ConnectionConfig, ContractConfig, + DEFAULT_AEA_CONFIG_FILE, DEFAULT_SKILL_CONFIG_FILE, PackageId, PackageType, @@ -53,7 +54,9 @@ from tests.conftest import ( AUTHOR, + CUR_PATH, DUMMY_SKILL_PATH, + DUMMY_SKILL_PUBLIC_ID, ROOT_DIR, agent_config_files, connection_config_files, @@ -270,6 +273,45 @@ def test_from_json_and_to_json(self, agent_path): actual_json = actual_config.json assert expected_json == actual_json + def test_update(self): + """Test the update method.""" + aea_config_path = Path(CUR_PATH, "data", "dummy_aea", DEFAULT_AEA_CONFIG_FILE) + loader = ConfigLoaders.from_package_type(PackageType.AGENT) + aea_config: AgentConfig = loader.load(aea_config_path.open()) + + dummy_skill_component_id = ComponentId( + ComponentType.SKILL, DUMMY_SKILL_PUBLIC_ID + ) + + new_dummy_skill_config = { + "behaviours": {"dummy": {"args": dict(behaviour_arg_1=42)}}, + "handlers": {"dummy": {"args": dict(handler_arg_1=42)}}, + "models": {"dummy": {"args": dict(model_arg_1=42)}}, + } + + aea_config.update( + dict( + component_configurations={ + dummy_skill_component_id: new_dummy_skill_config + } + ) + ) + assert ( + aea_config.component_configurations[dummy_skill_component_id] + == new_dummy_skill_config + ) + aea_config.update( + dict( + component_configurations={ + dummy_skill_component_id: new_dummy_skill_config + } + ) + ) + assert ( + aea_config.component_configurations[dummy_skill_component_id] + == new_dummy_skill_config + ) + class GetDefaultConfigurationFileNameFromStrTestCase(TestCase): """Test case for _get_default_configuration_file_name_from_type method.""" From 9fa4f988871db01b8eead2fc45be711c8f013bbc Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 30 Sep 2020 18:20:31 +0100 Subject: [PATCH 113/131] fix based on PR comments --- aea/cli/registry/fetch.py | 5 ++--- aea/manager.py | 2 +- tests/test_helpers/test_base.py | 4 ++-- tests/test_manager.py | 7 ++++++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/aea/cli/registry/fetch.py b/aea/cli/registry/fetch.py index c3eedebc9d..c98f6a47d3 100644 --- a/aea/cli/registry/fetch.py +++ b/aea/cli/registry/fetch.py @@ -42,9 +42,9 @@ def fetch_agent( Fetch Agent from Registry. :param ctx: Context - :param public_id: str public ID of desirable Agent. - :param ctx: a Context object. + :param public_id: str public ID of desirable agent. :param alias: an optional alias. + :param target_dir: the target directory to which the agent is fetched. :return: None """ author, name, version = public_id.author, public_id.name, public_id.version @@ -56,7 +56,6 @@ def fetch_agent( folder_name = target_dir or (name if alias is None else alias) aea_folder = os.path.join(ctx.cwd, folder_name) - print(aea_folder) ctx.clean_paths.append(aea_folder) extract(filepath, ctx.cwd) diff --git a/aea/manager.py b/aea/manager.py index ce40d6756f..8dff9ff952 100644 --- a/aea/manager.py +++ b/aea/manager.py @@ -536,7 +536,7 @@ def _make_config( agent_overrides: Optional[dict] = None, component_overrides: Optional[List[dict]] = None, ) -> List[dict]: - """Make new config baseed on proejct's config with overrides applied.""" + """Make new config based on project's config with overrides applied.""" agent_overrides = agent_overrides or {} component_overrides = component_overrides or [] diff --git a/tests/test_helpers/test_base.py b/tests/test_helpers/test_base.py index 24b5678032..916b4218f1 100644 --- a/tests/test_helpers/test_base.py +++ b/tests/test_helpers/test_base.py @@ -274,7 +274,7 @@ def test_recursive_update_negative_different_type(): with pytest.raises( ValueError, - match=f"Trying to replace value '1' with value 'False' which is of different type.", + match="Trying to replace value '1' with value 'False' which is of different type.", ): recursive_update(to_update, new_values) @@ -287,6 +287,6 @@ def test_recursive_update_negative_unknown_field(): with pytest.raises( ValueError, - match=f"Key 'new_field' is not contained in the dictionary to update.", + match="Key 'new_field' is not contained in the dictionary to update.", ): recursive_update(to_update, new_values) diff --git a/tests/test_manager.py b/tests/test_manager.py index 7b680ee698..b78e9866bb 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -146,7 +146,7 @@ def test_add_agent_for_non_exist_project(self): with pytest.raises(ValueError, match=" project is not added"): self.manager.add_agent(PublicId("test", "test", "0.1.0"), "another_agent") - def test_agent_acually_running(self): + def test_agent_actually_running(self): """Test MultiAgentManager starts agent correctly and agent perform acts.""" self.test_add_agent() agent_alias = self.manager.get_agent_alias(self.agent_name) @@ -253,13 +253,18 @@ def test_invalid_mode(): def test_double_start(self): """Test double MultiAgentManager start.""" self.manager.start_manager() + assert self.manager.is_running self.manager.start_manager() + assert self.manager.is_running def test_double_stop(self): """Test double MultiAgentManager stop.""" self.manager.start_manager() + assert self.manager.is_running self.manager.stop_manager() + assert not self.manager.is_running self.manager.stop_manager() + assert not self.manager.is_running @pytest.mark.asyncio async def test_run_loop_direct_call(self): From 57bff07981ca54ff0c34ff946043deca6f92c0e0 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 30 Sep 2020 19:49:40 +0100 Subject: [PATCH 114/131] ignore coverage --- aea/multiplexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aea/multiplexer.py b/aea/multiplexer.py index a766694392..ea384fe5a1 100644 --- a/aea/multiplexer.py +++ b/aea/multiplexer.py @@ -258,7 +258,7 @@ async def connect(self) -> None: if all(c.is_connected for c in self._connections): self.connection_status.set(ConnectionStates.connected) - else: + else: # pragma: nocover raise AEAConnectionError("Failed to connect the multiplexer.") self._recv_loop_task = self._loop.create_task(self._receiving_loop()) From 93fb0012a1c954176ef58424f619fe2f52a2cc77 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Wed, 30 Sep 2020 21:55:23 +0100 Subject: [PATCH 115/131] extend agent manager documentation --- docs/multi-agent-manager.md | 53 ++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/docs/multi-agent-manager.md b/docs/multi-agent-manager.md index 4ff3d1747f..f23c3ac4a5 100644 --- a/docs/multi-agent-manager.md +++ b/docs/multi-agent-manager.md @@ -19,26 +19,61 @@ manager.start_manager() We first add a couple of finished AEA project: ``` python -manager.add_project("fetchai/weather_client:0.13.0") -manager.add_project("fetchai/weather_station:0.13.0") +from aea.configurations.base import PublicId + +weather_client_id = PublicId.from_str("fetchai/weather_client:0.13.0") +weather_station_id = PublicId.from_str("fetchai/weather_station:0.13.0") +manager.add_project(weather_client_id) +manager.add_project(weather_station_id) ``` ## Adding agent instances +Save the following private keys in the respective files. ``` python -manager.add_agent("fetchai/weather_client:0.13.0") -manager.add_agent("fetchai/weather_station:0.13.0") +# 72d3149f5689f0749eaec5ebf6dba5deeb1e89b93ae1c58c71fd43dfaa231e87 +FET_PRIVATE_KEY_PATH_1 = "fetchai_private_key_1.txt" +# bf529acb2546e13615ef6004c48e393f0638a5dc0c4979631a9a4bc554079f6f +COSMOS_PRIVATE_KEY_PATH_1 = "cosmos_private_key_1.txt" +# 589839ae54b71b8754a7fe96b52045364077c28705a1806b74441debcae16e0a +FET_PRIVATE_KEY_PATH_2 = "fetchai_private_key_2.txt" +# c9b38eff57f678f5ab5304447997351edb08eceb883267fa4ad849074bec07e4 +COSMOS_PRIVATE_KEY_PATH_2 = "cosmos_private_key_2.txt" ``` -missing: -- configuring private keys -- configure delayed startup sequence - +Add the agent instances +``` python +agent_overrides = { + "private_key_paths": {"fetchai": FET_PRIVATE_KEY_PATH_1}, + "connection_private_key_paths": {"cosmos": COSMOS_PRIVATE_KEY_PATH_1} +} +manager.add_agent(weather_station_id, agent_overrides=agent_overrides) + +component_overrides = { + "name": "p2p_libp2p", + "author": "fetchai", + "version": "0.9.0", + "type": "connection", + "config": { + "delegate_uri": "127.0.0.1:11001", + "entry_peers": ['/dns4/127.0.0.1/tcp/9000/p2p/16Uiu2HAkzgZYyk25XjAhmgXcdMbahrHYi18uuAzHuxPn1KkdmLRw'], + "local_uri": "127.0.0.1:9001", + "public_uri": "127.0.0.1:9001", + } +} +agent_overrides = { + "private_key_paths": {"fetchai": FET_PRIVATE_KEY_PATH_2}, + "connection_private_key_paths": {"cosmos": COSMOS_PRIVATE_KEY_PATH_2} +} +manager.add_agent(weather_client_id, component_overrides=[component_overrides], agent_overrides=agent_overrides) +``` ## Running the agents: ``` python -manager.start_all_agents() +manager.start_agent(weather_station_id.name) +# wait for ~10 seconds for peer node to go live +manager.start_agent(weather_station_id.name) ``` ## Stopping the agents: From 36d578052cfd5b70323b22ca838422b61b5597d0 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Thu, 1 Oct 2020 00:42:39 +0200 Subject: [PATCH 116/131] add update of agent config all configurable fields --- aea/configurations/base.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 91e046ccbb..5d4d8ae8b8 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -1402,8 +1402,8 @@ def __init__( self.agent_name = agent_name self.registry_path = registry_path self.description = description - self.private_key_paths = CRUDCollection[str]() - self.connection_private_key_paths = CRUDCollection[str]() + self.private_key_paths: CRUDCollection[str] = CRUDCollection[str]() + self.connection_private_key_paths: CRUDCollection[str] = CRUDCollection[str]() self.logging_config = logging_config if logging_config is not None else {} self._default_ledger = None # type: Optional[str] @@ -1703,7 +1703,14 @@ def update(self, data: Dict) -> None: self.component_configurations = result # update other fields - # currently not supported. + for item_id, value in data.get("private_key_paths", {}): + self.private_key_paths.update(item_id, value) + + for item_id, value in data.get("connection_private_key_paths", {}): + self.connection_private_key_paths.update(item_id, value) + + self.logging_config = data.get("logging_config", self.logging_config) + self.registry_path = data.get("registry_path", self.registry_path) class SpeechActContentConfig(Configuration): From c15fd2293d9d3a4a5f28f6614eb05c0e98b3d326 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Thu, 1 Oct 2020 00:55:26 +0200 Subject: [PATCH 117/131] overwrite only existing private keys ids. --- aea/configurations/base.py | 10 ++++++---- tests/test_configurations/test_base.py | 13 ++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 5d4d8ae8b8..30786ca9e3 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -347,6 +347,8 @@ def update(self, item_id: str, item: T) -> None: :param item: the item to be added. :return: None """ + if item_id not in self._items_by_id: + raise ValueError(f"No item registered with id '{item_id}'.") self._items_by_id[item_id] = item def delete(self, item_id: str) -> None: @@ -1402,8 +1404,8 @@ def __init__( self.agent_name = agent_name self.registry_path = registry_path self.description = description - self.private_key_paths: CRUDCollection[str] = CRUDCollection[str]() - self.connection_private_key_paths: CRUDCollection[str] = CRUDCollection[str]() + self.private_key_paths = CRUDCollection[str]() + self.connection_private_key_paths = CRUDCollection[str]() self.logging_config = logging_config if logging_config is not None else {} self._default_ledger = None # type: Optional[str] @@ -1703,10 +1705,10 @@ def update(self, data: Dict) -> None: self.component_configurations = result # update other fields - for item_id, value in data.get("private_key_paths", {}): + for item_id, value in data.get("private_key_paths", {}).items(): self.private_key_paths.update(item_id, value) - for item_id, value in data.get("connection_private_key_paths", {}): + for item_id, value in data.get("connection_private_key_paths", {}).items(): self.connection_private_key_paths.update(item_id, value) self.logging_config = data.get("logging_config", self.logging_config) diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index 6506a797ed..6956269208 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -99,6 +99,9 @@ def test_update(self): collection.update("one", 2) assert collection.read("one") == 2 + with pytest.raises(ValueError, match=f"No item registered with id 'two'."): + collection.update("two", 2) + def test_delete(self): """Test that the delete method works correctly.""" collection = CRUDCollection() @@ -293,13 +296,21 @@ def test_update(self): dict( component_configurations={ dummy_skill_component_id: new_dummy_skill_config - } + }, + private_key_paths=dict(foo="bar"), + connection_private_key_paths=dict(foo="bar"), ) ) assert ( aea_config.component_configurations[dummy_skill_component_id] == new_dummy_skill_config ) + assert dict(aea_config.private_key_paths.read_all()) == {"foo": "bar"} + assert dict(aea_config.connection_private_key_paths.read_all()) == { + "foo": "bar" + } + + # test idempotence aea_config.update( dict( component_configurations={ From 68814b9250126287f807b84c4d5d0a8e232fbce2 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Thu, 1 Oct 2020 01:02:34 +0200 Subject: [PATCH 118/131] update test on overwrite of private keys config --- aea/configurations/base.py | 2 +- tests/data/dummy_aea/aea-config.yaml | 3 +++ tests/data/hashes.csv | 2 +- tests/test_configurations/test_base.py | 14 ++++++++------ 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 30786ca9e3..8ad9f910c8 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -1548,8 +1548,8 @@ def component_configurations_json(self) -> List[OrderedDict]: for component_id, config in self.component_configurations.items(): result.append( OrderedDict( - author=component_id.author, name=component_id.name, + author=component_id.author, version=component_id.version, type=str(component_id.component_type), **config, diff --git a/tests/data/dummy_aea/aea-config.yaml b/tests/data/dummy_aea/aea-config.yaml index 5c038adebf..cea1bf386a 100644 --- a/tests/data/dummy_aea/aea-config.yaml +++ b/tests/data/dummy_aea/aea-config.yaml @@ -25,4 +25,7 @@ logging_config: private_key_paths: cosmos: cosmos_private_key.txt ethereum: ethereum_private_key.txt +connection_private_key_paths: + cosmos: cosmos_private_key.txt + ethereum: ethereum_private_key.txt registry_path: ../../packages diff --git a/tests/data/hashes.csv b/tests/data/hashes.csv index f068b6b33c..5a2e72f81a 100644 --- a/tests/data/hashes.csv +++ b/tests/data/hashes.csv @@ -1,4 +1,4 @@ -dummy_author/agents/dummy_aea,QmaFcsXAx9mCjPnYEzATwGJyBFJRgCHftfYmKCfZtSGSLw +dummy_author/agents/dummy_aea,QmYEVtxkYh889JfQy5umXqM7KBNVfjDunV1SWf1Kd9zDfm dummy_author/skills/dummy_skill,QmTBZg36AhCipACz8x7eJsA5CHKqUQN1SwT3n8zX6n9XNF fetchai/connections/dummy_connection,QmWegP8qsY6Ngdh9xorMDCSA1UBjt4CrrPeVWQqyVfHvob fetchai/contracts/dummy_contract,QmPMs9VDGZGF8xJ8XBYLVb1xK5XAgiaJr5Gwcq7Vr3TUyu diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index 6956269208..c7f5ab549a 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -292,23 +292,25 @@ def test_update(self): "models": {"dummy": {"args": dict(model_arg_1=42)}}, } + new_private_key_paths = dict(ethereum="foo", cosmos="bar") aea_config.update( dict( component_configurations={ dummy_skill_component_id: new_dummy_skill_config }, - private_key_paths=dict(foo="bar"), - connection_private_key_paths=dict(foo="bar"), + private_key_paths=new_private_key_paths, + connection_private_key_paths=new_private_key_paths, ) ) assert ( aea_config.component_configurations[dummy_skill_component_id] == new_dummy_skill_config ) - assert dict(aea_config.private_key_paths.read_all()) == {"foo": "bar"} - assert dict(aea_config.connection_private_key_paths.read_all()) == { - "foo": "bar" - } + assert dict(aea_config.private_key_paths.read_all()) == new_private_key_paths + assert ( + dict(aea_config.connection_private_key_paths.read_all()) + == new_private_key_paths + ) # test idempotence aea_config.update( From fb7349b8de20dc33eeaee134fec7cf55ac63c81b Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 09:24:46 +0100 Subject: [PATCH 119/131] add acn documentation --- docs/acn.md | 60 +++++++++++++++++++++++++++-- docs/assets/acn-tiers.png | Bin 0 -> 69774 bytes docs/assets/acn-trust-security.png | Bin 0 -> 92534 bytes docs/assets/dht.png | Bin 0 -> 159612 bytes 4 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 docs/assets/acn-tiers.png create mode 100644 docs/assets/acn-trust-security.png create mode 100644 docs/assets/dht.png diff --git a/docs/acn.md b/docs/acn.md index 63d7572a7d..e091fdab46 100644 --- a/docs/acn.md +++ b/docs/acn.md @@ -1,11 +1,65 @@ +The agent communication network (ACN) provides the agents with a system to find each other based on their addresses and communicate. + +An agent owner faces the following problem: Given a wallet address, how can my agent whilst maintaining certain guarantees deliver a message to the holder of this address (i.e. another agent)? + +The guarantees we would like to have are: + +- Reliability: with guarantees on message delivery +- Security: no third-party can tamper with the message +- Authentication: prevent impersonation +- Confidentiality: prevent exposing sensitive information +- Availability: some guarantees about the liveness of the service (tampering detection) + +The problem statement and the context impose a number of design constraints: + +- Distributed environment: no assumption are placed about the location of the agent, they can be anywhere in the publicly reachable internet +- Decentralized environment: no trusted central authority +- Support for resource-constrained devices + +The ACN solves the above problem whilst providing the above guarantees and satisfying the constraints. + +## Peers + +The ACN is maintained by peers. Peers are not to be equated with agents. They are processes (usually distributed and decentralized) that together maintain the service. + +## Distributed hash table + +At its core, the ACN comrises of a distributed hash table (DHT). A DHT is similar to a regular hash table in that it stores key-value pairs. However, storage is distributed across multiple machines (peers) with an efficient lookup mechanism. This is enabled by: + +- Consistent hashing: assignment +- Structured overlays: (efficient) routing + +DHT + +For the ACN, we use the DHT to store and maintain association between an agent address and the (network) location of its peer. + + +## N-tier architecture + +To satisfy different resource constraints and flexible deployment the ACN is implemented as a multi-tier architecture. As such, it provides an extension of the client-server model. For the agent framework different tiers implemented as different `Connections`: + +DHT +

      Note

      -

      Details coming soon. In the meantime check out this section.

      +

      The `p2p_libp2p_mailbox` connection is not available yet. +

      +## Trust and security + +An agent can choose which connection to use depending on the resource and trust requirements: + +- `p2p_libp2p` connection: the agent maintains a peer of the ACN. The agent does not need to trust any other entity. +- `p2p_libp2p_client` connection: the agent maintains a client connection to a server which is operated by a peer of the ACN. The agent does need to trust the entity operating the peer. + +The main protocol uses public cryptography to provide trust and security: +- DHT process starts with a public key pair signed by agent +- Lookup for agent addresses includes agent signature +- TLS handshake (with self-signed certificates) + +DHT -missing: -- different configurations of setting up peer and client
      diff --git a/docs/assets/acn-tiers.png b/docs/assets/acn-tiers.png new file mode 100644 index 0000000000000000000000000000000000000000..92b7560f391b866c60e017cc8a19309f04592811 GIT binary patch literal 69774 zcma&N1ymK?7dK2xNC*f5B1j{pba%IabV}!?LmCtWl8h zf8W<NT zHMJBIQ}{Iqz!cItay?1S`UIJizfZn@7m_`=f&aQaUoJ2BwNgG8FPdqk7a!ya=+ zx5GV7|JcSu+^F)Vg55oMl7`+N!vPP@ggAqxA6~cyb5lzq;Nka=7dS87@{}o%h5Jz# z$^8>qUUQ=@K1W6#e&G)PMR7nM<(J*t39Sr=)ywxn)`=PY{X`wfjU%F1F?1$pms&UG zme)1-%M8J*_I~ea;-#oR?+0@Sq*fJl`d<8V9v>Xti^6xZV?REw zA|MlvVLyHBO1R&i^_Vl5TQr%BA(;j$VQvsvMAZEbTFb>RY))rOOB}!ECCE|iMIIQ!Q`=}6@_t8-KA!E+Kb2#{ zg+CR>a`Z#3wd4?cl(%`0-isyxckhlkMdpKJj2981!uLjeABI881aM&mm>zuQja`3Y7v(Y zJH&nof5%F4ps_=lwrAnSzJnda<|)RcK~nR?ZLGP|i94|0s<`T7t*UYtsx0c)4LKz} zLcLuhf)^4(B@r}Zg$wzP!BWuFj0>%_H>DBRL%2Etq+b+`X-g}9+$+3STDqi(=L*l4 z-_~xu{^1oSW^a6EI4$ zG-FyX(w387NiPs`8l^wBzraTDB3W-GHAQFiXR;3<@_-}5ffE(xet^9wj4O?(YLxcX zUZA^G{^=b?B-2cULZq!0$DLiUTHpf6 zsa}Ua#Zmo&UM8h`5Bv3dq{j==cccBXA16s;QAosoe`s<~#lKLJlVU1Td-=}tQ%3}z zFlTbEC{JnZeZqaLugb($ueCF=)*r;acO0-_M@tJ>&14(Eb$(X=ut?N;pveO96@oy7 zzC^=7u7wcFQ_^=KTE=z{NS0nYX!6Ft?=17sBwmoj6 zuT7~(D|stU5wk9R_@?36`$V}^1zpK$`DrPe$F4YJI2STh(e#~h_|l=2zhvHI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D^Z)*d6vn!@ znx3oue*XC5+5h#=f0y!SJOBF({@s;-cjcEo{Odvg?G}HG;@@5Qf3hpPdn30MHbUmM RGWLKEy{kr73bY&_{0~YndxHP~ literal 0 HcmV?d00001 diff --git a/docs/assets/acn-trust-security.png b/docs/assets/acn-trust-security.png new file mode 100644 index 0000000000000000000000000000000000000000..fce4ed3366281e9bc15e421f037606dae57f9f57 GIT binary patch literal 92534 zcmeFZWmFv9)-DPJ570mYgy2r_KyYX*cnIzmg1fsza0m{;J-7$=5Zpp=cXxNV)ggPo z`M!J3+20uV&;4;SMprl0RjbyT^2}$>H9J8v??q9OUm`<6L7|F^y_JK4LIguWLFXaD z181@&YIdNYQ1p$3gk;2pgotHqEDem!^r4`{f?|~sRHBt}nismsb>K*e$#yA%`=OWx zRWM-nkTWr(_`e6fCJC$^mV?{Dmc_>^4p#Z52A%%|V}}lTpDXxDtOUK1b;j`m%Fk&} zo(JdDn>qH4)RTGJ_xpFvuFyYsmizRs^1x7VzXY8H^{7qd)VM-U(b1uCUqG{2tv-Fu z{NBwC#fy3LK~qcfNnkeB%@_P5H|Esr54`y_ac>L(u#+sN1T-KKR{PH|QT7 z^JPfk_=gaeiM_ute&Rq{mW6{GQFMa-@&2b4{E6f&jA>7Wy#!*4E zXllKyTh#|cKOTq*GR_^l~#52WZsI! z&clCX5thvy$01Ti#L4w13XjC2iN9FpROb}rSyhM``Vr83{t#B_)_lzHBHT__r1p7bB(XHyxpFjZkZx zC#X_%soV%!FOCuvVR9P9vf33vFm8C8Z3Ozrbl&t7)q2^Hc5gQ8mVwhH@+T*oOh838|h4h+A6{-lMM`K zh#fI|q^lU{80Q$RL*}K)C$)66%@;9YHb0HtAf@=Mr?dRTw0m8TUo2?)v&ra*3k+|# zmT<$*Tq8bsCW6o)Rb7i0cq<>RRk-59ddi(uIF*9NKAfqr+~zXsYN{}vV^b}oB>OeA zvEuttt-!d!gF)KS8p+=Y_x``{aC-Aeqxw=g&PQ@P)+^gjEHm1dP9G zWZ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@T3(ct;hncN{mF)-Pf7s)CKStmZ4^ zw0LYtC~o$aga096*Hm5DXQ%39n3~(i%5nMPe7UQdYfZHo61)LLk=3E3bBiI)#f8yZ z9L{DkAJ60s%icpj>tnOSKz!fJ$L9k2Mcc(aXR79#67IEJGur5-Vb{emj8*lAtF576 z5tNwc*=0gvt-PI^IvW6qcFemhouXM=X)_yM-<>yDg@ zVb{ip1jp9Sw!OSd2{)5;BuO)f`&9tk-A6}9!GrWzY|&r+{XXvQ>GNi*RrB?0=;f1H zkPX8&fadb1i}Vb_hkr1RtsN)`W!H@_HNJlmVkkrY3tS>rjh8%`f%pAoVjIH5ecR{& z1{uDfe4saZw}Z0KN>N_!{v}PNor}*;+M?TC0=S3=D=D0IdoO&R{RLBk zJ1i}~Iwm@5vp8BW25%2ZeDPT+gYdll#?YzQcirnO_ByY;^a132#eVxw<2Q$D*B~-P zjS!TZwjZlTL23GdKC}B%G?M;HvmV))|E#A?hgWk%X;n3@V-wNQifM(^d3``vD@ZH+phZ1 zq1HZ9e2bRIclYv?7n`z411=<8-PizbKIl8)A3C9DaetaG=@=?)$xTR!QExWS3f#}% zzQka)*xtS#wNUNw*db+7tWZe<1rW0P&C&@Bnp2*P#@zF&i`$)jHuHlY$2GLJ-t3P> zrRo}`BxqgUt&8d1&o|1fIoVsqs>}jgVY?#Rqqf`_8);f9_Ga>8% literal 0 HcmV?d00001 From 9b551d554f2ff3191f601e3295377dc7ece63b05 Mon Sep 17 00:00:00 2001 From: MarcoFavorito Date: Thu, 1 Oct 2020 10:30:57 +0200 Subject: [PATCH 120/131] replace private key paths entirely --- aea/configurations/base.py | 2 -- tests/test_configurations/test_base.py | 14 ++++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/aea/configurations/base.py b/aea/configurations/base.py index 8ad9f910c8..75160b6424 100644 --- a/aea/configurations/base.py +++ b/aea/configurations/base.py @@ -347,8 +347,6 @@ def update(self, item_id: str, item: T) -> None: :param item: the item to be added. :return: None """ - if item_id not in self._items_by_id: - raise ValueError(f"No item registered with id '{item_id}'.") self._items_by_id[item_id] = item def delete(self, item_id: str) -> None: diff --git a/tests/test_configurations/test_base.py b/tests/test_configurations/test_base.py index c7f5ab549a..78fd3b0fd8 100644 --- a/tests/test_configurations/test_base.py +++ b/tests/test_configurations/test_base.py @@ -99,9 +99,6 @@ def test_update(self): collection.update("one", 2) assert collection.read("one") == 2 - with pytest.raises(ValueError, match=f"No item registered with id 'two'."): - collection.update("two", 2) - def test_delete(self): """Test that the delete method works correctly.""" collection = CRUDCollection() @@ -292,7 +289,10 @@ def test_update(self): "models": {"dummy": {"args": dict(model_arg_1=42)}}, } - new_private_key_paths = dict(ethereum="foo", cosmos="bar") + new_private_key_paths = dict(ethereum="foo") + expected_private_key_paths = dict( + ethereum="foo", cosmos="cosmos_private_key.txt" + ) aea_config.update( dict( component_configurations={ @@ -306,10 +306,12 @@ def test_update(self): aea_config.component_configurations[dummy_skill_component_id] == new_dummy_skill_config ) - assert dict(aea_config.private_key_paths.read_all()) == new_private_key_paths + assert ( + dict(aea_config.private_key_paths.read_all()) == expected_private_key_paths + ) assert ( dict(aea_config.connection_private_key_paths.read_all()) - == new_private_key_paths + == expected_private_key_paths ) # test idempotence From b2aed44e637c448ca31d57ece458b3d492ee9d7f Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 11:24:59 +0100 Subject: [PATCH 121/131] temporary lock add to soef --- .../fetchai/connections/soef/connection.py | 33 +++++++++++-------- .../fetchai/connections/soef/connection.yaml | 2 +- packages/hashes.csv | 2 +- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 9760e022db..876fe24f5f 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -265,6 +265,7 @@ def __init__( self._find_around_me_queue: Optional[asyncio.Queue] = None self._find_around_me_processor_task: Optional[asyncio.Task] = None self.logger = logger + self._unregister_lock: Optional[asyncio.Lock] = None async def _find_around_me_processor(self) -> None: """Process find me around requests in background task.""" @@ -902,19 +903,24 @@ async def _unregister_agent(self) -> None: # pylint: disable=unused-argument :return: None """ - await self._stop_periodic_ping_task() - if self.unique_page_address is None: # pragma: nocover - self.logger.debug( - "The service is not registered to the simple OEF. Cannot unregister." - ) - return + if self._unregister_lock is None: + raise ValueError("Lock is not set, use connect first!") # pragma: nocover + async with self._unregister_lock: + await self._stop_periodic_ping_task() + if self.unique_page_address is None: # pragma: nocover + self.logger.debug( + "The service is not registered to the simple OEF. Cannot unregister." + ) + return - response = await self._generic_oef_command("unregister", check_success=False) - enforce( - "Goodbye!" in response, - "No Goodbye response.", - ) - self.unique_page_address = None + response = await self._generic_oef_command( + "unregister", check_success=False + ) + enforce( + "Goodbye!" in response, + "No Goodbye response.", + ) + self.unique_page_address = None async def _stop_periodic_ping_task(self) -> None: """Cancel periodic ping task.""" @@ -934,6 +940,7 @@ async def connect(self) -> None: self._find_around_me_processor_task = self._loop.create_task( self._find_around_me_processor() ) + self._unregister_lock = asyncio.Lock() async def disconnect(self) -> None: """ @@ -941,8 +948,6 @@ async def disconnect(self) -> None: :return: None """ - await self._stop_periodic_ping_task() - if self.in_queue is None: raise ValueError("Queue is not set, use connect first!") # pragma: nocover await self._unregister_agent() diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index 3d84862432..e306ca6178 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmS9zorTodmaRyaxocELEwEqHEPowKoG9wgSAak7s59rZD __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmZaBtcck4gXs92SH5vcptJMm1d1f8WqUuCwvfTXnxsc3y + connection.py: QmcWSUrozGZeNbkyKs32oEEy9Knz9jAnzK4Zyoqgk4d7xF fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.7.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index 712b147ae5..bbbf5e8794 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -29,7 +29,7 @@ fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4Jb27b fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmXBtvcw2mQdMwkEaoU9h4pRLkGGZueqJNzGCHA279CNQk +fetchai/connections/soef,Qme5g5U1MAYV5naZnJCzne4n4cGqQSpfzTWKs8VRWeTK9J fetchai/connections/stub,QmQxzFLTBjPUMkpE1uBdkoyhb7iXY4k8VPzyykpjhuUcK1 fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd From baeef26355b6d92ea7e22191b8c9dde89b3f7c0f Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Thu, 1 Oct 2020 16:46:18 +0300 Subject: [PATCH 122/131] soef connection unregister: lock and shield from cancelation --- .../fetchai/connections/soef/connection.py | 43 +++++++++++++------ .../fetchai/connections/soef/connection.yaml | 2 +- packages/hashes.csv | 2 +- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 9760e022db..c8ff7714ed 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -265,6 +265,7 @@ def __init__( self._find_around_me_queue: Optional[asyncio.Queue] = None self._find_around_me_processor_task: Optional[asyncio.Task] = None self.logger = logger + self._unregister_lock: Optional[asyncio.Lock] = None async def _find_around_me_processor(self) -> None: """Process find me around requests in background task.""" @@ -276,7 +277,11 @@ async def _find_around_me_processor(self) -> None: oef_message, oef_search_dialogue, radius, params ) await asyncio.sleep(self.FIND_AROUND_ME_REQUEST_DELAY) - except asyncio.CancelledError: # pylint: disable=try-except-raise + except ( + asyncio.CancelledError, + CancelledError, + GeneratorExit, + ): # pylint: disable=try-except-raise return except Exception: # pylint: disable=broad-except # pragma: nocover self.logger.exception( @@ -902,19 +907,29 @@ async def _unregister_agent(self) -> None: # pylint: disable=unused-argument :return: None """ - await self._stop_periodic_ping_task() - if self.unique_page_address is None: # pragma: nocover - self.logger.debug( - "The service is not registered to the simple OEF. Cannot unregister." + if not self._unregister_lock: + raise ValueError("unregistered lock is not set, please call connect!") + + async with self._unregister_lock: + if self.unique_page_address is None: # pragma: nocover + self.logger.debug( + "The service is not registered to the simple OEF. Cannot unregister." + ) + return + + task = asyncio.ensure_future( + self._generic_oef_command("unregister", check_success=False) ) - return - response = await self._generic_oef_command("unregister", check_success=False) - enforce( - "Goodbye!" in response, - "No Goodbye response.", - ) - self.unique_page_address = None + try: + response = await asyncio.shield(task) + finally: + response = await task + enforce( + "Goodbye!" in response, + "No Goodbye response.", + ) + self.unique_page_address = None async def _stop_periodic_ping_task(self) -> None: """Cancel periodic ping task.""" @@ -930,6 +945,7 @@ async def connect(self) -> None: self._loop = asyncio.get_event_loop() self.in_queue = asyncio.Queue() self._find_around_me_queue = asyncio.Queue() + self._unregister_lock = asyncio.Lock() self._executor_pool = ThreadPoolExecutor(max_workers=10) self._find_around_me_processor_task = self._loop.create_task( self._find_around_me_processor() @@ -945,13 +961,14 @@ async def disconnect(self) -> None: if self.in_queue is None: raise ValueError("Queue is not set, use connect first!") # pragma: nocover - await self._unregister_agent() if self._find_around_me_processor_task: if not self._find_around_me_processor_task.done(): self._find_around_me_processor_task.cancel() await self._find_around_me_processor_task + await self._unregister_agent() + await self.in_queue.put(None) self._find_around_me_queue = None diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index 3d84862432..56638797f8 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmS9zorTodmaRyaxocELEwEqHEPowKoG9wgSAak7s59rZD __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmZaBtcck4gXs92SH5vcptJMm1d1f8WqUuCwvfTXnxsc3y + connection.py: QmWuGDjmuK75F1EnyNt7t3kso2ywHHPH8197Scw64HPmdp fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.7.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index 712b147ae5..c4bf60fc0b 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -29,7 +29,7 @@ fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4Jb27b fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmXBtvcw2mQdMwkEaoU9h4pRLkGGZueqJNzGCHA279CNQk +fetchai/connections/soef,Qmd6RwK9x8yTY5XdM8QgZc25TCu4tT7Kab7St8NsRSQd9S fetchai/connections/stub,QmQxzFLTBjPUMkpE1uBdkoyhb7iXY4k8VPzyykpjhuUcK1 fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd From 5c6b8224cfee23b9204d780f9c8d117154949cf5 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 16:43:56 +0100 Subject: [PATCH 123/131] Apply suggestions from code review Co-authored-by: Lokman Rahmani --- docs/acn.md | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/docs/acn.md b/docs/acn.md index e091fdab46..5929eaf79d 100644 --- a/docs/acn.md +++ b/docs/acn.md @@ -1,17 +1,18 @@ -The agent communication network (ACN) provides the agents with a system to find each other based on their addresses and communicate. +The agent communication network (ACN) provides a system for agents to find each other and communicate, solely based on their wallet addresses. It addresses the message delivery problem. -An agent owner faces the following problem: Given a wallet address, how can my agent whilst maintaining certain guarantees deliver a message to the holder of this address (i.e. another agent)? +## Message delivery problem +Agents need to contact each others. Given the wallet address of a target agent, how can the originator agent deliver a message to it whilst guarantying certain properties? -The guarantees we would like to have are: +The properties we would like to have are: -- Reliability: with guarantees on message delivery +- Reliability: with guarantees on message reception - Security: no third-party can tamper with the message -- Authentication: prevent impersonation -- Confidentiality: prevent exposing sensitive information +- Authentication: to prevent impersonation +- Confidentiality: to prevent exposing sensitive information within the message - Availability: some guarantees about the liveness of the service (tampering detection) -The problem statement and the context impose a number of design constraints: +The problem statement and the agents framework context impose a number of design constraints: - Distributed environment: no assumption are placed about the location of the agent, they can be anywhere in the publicly reachable internet - Decentralized environment: no trusted central authority @@ -21,14 +22,14 @@ The ACN solves the above problem whilst providing the above guarantees and satis ## Peers -The ACN is maintained by peers. Peers are not to be equated with agents. They are processes (usually distributed and decentralized) that together maintain the service. +The ACN is maintained by peers. Peers are not to be equated with agents. They are processes (usually distributed and decentralized) that together maintain the service. To use the service, agents need to associate themselves with peers. Thanks to digital signatures, the association between a given peer and agent can be verified by any participant in the system. ## Distributed hash table -At its core, the ACN comrises of a distributed hash table (DHT). A DHT is similar to a regular hash table in that it stores key-value pairs. However, storage is distributed across multiple machines (peers) with an efficient lookup mechanism. This is enabled by: +At its core, the ACN implements a distributed hash table (DHT). A DHT is similar to a regular hash table in that it stores key-value pairs. However, storage is distributed across the participating machines (peers) with an efficient lookup operation. This is enabled by: -- Consistent hashing: assignment -- Structured overlays: (efficient) routing +- Consistent hashing: decide responsibility for assignment of the DHT key-value storage +- Structured overlays: organize the participating peers in a well defined topology for efficient routing DHT @@ -37,7 +38,7 @@ For the ACN, we use the DHT to store and maintain association between an agent a ## N-tier architecture -To satisfy different resource constraints and flexible deployment the ACN is implemented as a multi-tier architecture. As such, it provides an extension of the client-server model. For the agent framework different tiers implemented as different `Connections`: +To satisfy different resource constraints and flexible deployment the ACN is implemented as a multi-tier architecture. As such, it provides an extension of the client-server model. The agent framework exploits this by implementing different tiers as different `Connections`: DHT @@ -51,13 +52,10 @@ To satisfy different resource constraints and flexible deployment the ACN is imp An agent can choose which connection to use depending on the resource and trust requirements: -- `p2p_libp2p` connection: the agent maintains a peer of the ACN. The agent does not need to trust any other entity. +- `p2p_libp2p` connection: the agent maintains a peer of the ACN. The agent has full control over the peer and does not need to trust any other entity. - `p2p_libp2p_client` connection: the agent maintains a client connection to a server which is operated by a peer of the ACN. The agent does need to trust the entity operating the peer. -The main protocol uses public cryptography to provide trust and security: -- DHT process starts with a public key pair signed by agent -- Lookup for agent addresses includes agent signature -- TLS handshake (with self-signed certificates) +All communication protocols use public cryptography to ensure security (authentication, confidentiality, and availability) using TLS handshakes with pre-shared public keys. DHT From b0dc33dc81108596941d313b50ae7682e359f69e Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 16:52:08 +0100 Subject: [PATCH 124/131] fix overwrite --- packages/fetchai/connections/soef/connection.py | 3 ++- packages/fetchai/connections/soef/connection.yaml | 2 +- packages/hashes.csv | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 46cab80324..0b41b15501 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -952,7 +952,6 @@ async def connect(self) -> None: self._find_around_me_processor_task = self._loop.create_task( self._find_around_me_processor() ) - self._unregister_lock = asyncio.Lock() async def disconnect(self) -> None: """ @@ -960,6 +959,8 @@ async def disconnect(self) -> None: :return: None """ + await self._stop_periodic_ping_task() + if self.in_queue is None: raise ValueError("Queue is not set, use connect first!") # pragma: nocover diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index a7e416dc69..07f0d6aaf4 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmS9zorTodmaRyaxocELEwEqHEPowKoG9wgSAak7s59rZD __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmPXMo6hVXE6Zdbvn2sfP2cN63FK5ebtDU3tj9GDwK3bWq + connection.py: QmYXqA1b1YBgwNuf6nUYTJgJeHVb7d8UNmCaQmkN2mY9KZ fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.7.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index 2471d31f9a..7777abae93 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -29,7 +29,7 @@ fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4Jb27b fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmNTp8AL4nVdXt5FQRPdqYLrx9Br5bdz16dutDaAp95x4a +fetchai/connections/soef,QmW3x9tzEaE4fqBsqzMXmke8fh2y75CrFZFtMrn8WRGyZD fetchai/connections/stub,QmQxzFLTBjPUMkpE1uBdkoyhb7iXY4k8VPzyykpjhuUcK1 fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd From c85337cffa594c96a3f500c0912e6d63e72b956d Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 17:07:37 +0100 Subject: [PATCH 125/131] fix doc links, update api docs --- docs/api/aea_builder.md | 30 ++ docs/api/agent_loop.md | 93 ++----- docs/api/configurations/base.md | 163 +++++++++-- docs/api/configurations/loader.md | 80 +++++- docs/api/configurations/project.md | 69 +++++ docs/api/crypto/cosmos.md | 9 - docs/api/helpers/async_utils.md | 124 +++++++-- docs/api/helpers/base.md | 26 ++ docs/api/helpers/multiaddr/base.md | 6 +- docs/api/helpers/pipe.md | 103 ++++--- docs/api/helpers/transaction/base.md | 144 ++++++++++ docs/api/manager.md | 365 +++++++++++++++++++++++++ docs/api/multiplexer.md | 55 ++-- docs/api/protocols/generator/base.md | 3 + docs/api/protocols/generator/common.md | 17 ++ docs/api/registries/base.md | 134 ++++++++- docs/api/runtime.md | 83 ++++-- docs/oef-ledger.md | 2 +- docs/p2p-connection.md | 4 +- scripts/generate_api_docs.py | 2 + 20 files changed, 1289 insertions(+), 223 deletions(-) create mode 100644 docs/api/configurations/project.md create mode 100644 docs/api/manager.md diff --git a/docs/api/aea_builder.md b/docs/api/aea_builder.md index bb39ff9170..55c78bd993 100644 --- a/docs/api/aea_builder.md +++ b/docs/api/aea_builder.md @@ -785,6 +785,36 @@ Construct the builder from an AEA project. an AEABuilder. + +#### from`_`config`_`json + +```python + | @classmethod + | from_config_json(cls, json_data: List[Dict], aea_project_path: PathLike, skip_consistency_check: bool = False) -> "AEABuilder" +``` + +Load agent configuration for alreaady provided json data. + +**Arguments**: + +- `json_data`: list of dicts with agent configuration +- `aea_project_path`: path to project root +- `skip_consistency_check`: skip consistency check on configs load. + +**Returns**: + +AEABuilder instance + + +#### get`_`configuration`_`file`_`path + +```python + | @staticmethod + | get_configuration_file_path(aea_project_path: Union[Path, str]) -> Path +``` + +Return path to aea-config file for the given aea project path. + #### make`_`logger diff --git a/docs/api/agent_loop.md b/docs/api/agent_loop.md index 9860d50b64..2afb2f1034 100644 --- a/docs/api/agent_loop.md +++ b/docs/api/agent_loop.md @@ -3,11 +3,29 @@ This module contains the implementation of an agent loop using asyncio. + +## AgentLoopException Objects + +```python +class AgentLoopException(AEAException) +``` + +Exception for agent loop runtime errors. + + +## AgentLoopStates Objects + +```python +class AgentLoopStates(Enum) +``` + +Internal agent loop states. + ## BaseAgentLoop Objects ```python -class BaseAgentLoop(WithLogger, ABC) +class BaseAgentLoop(Runnable, WithLogger, ABC) ``` Base abstract agent loop class. @@ -16,7 +34,7 @@ Base abstract agent loop class. #### `__`init`__` ```python - | __init__(agent: AbstractAgent, loop: Optional[AbstractEventLoop] = None) -> None + | __init__(agent: AbstractAgent, loop: Optional[AbstractEventLoop] = None, threaded=False) -> None ``` Init loop. @@ -43,59 +61,24 @@ Get agent. Set event loop and all event loopp related objects. - -#### start - -```python - | start() -> None -``` - -Start agent loop synchronously in own asyncio loop. - - -#### setup + +#### run ```python - | setup() -> None -``` - -Set up loop before started. - - -#### teardown - -```python - | teardown() -``` - -Tear down loop on stop. - - -#### run`_`loop - -```python - | async run_loop() -> None + | async run() -> None ``` Run agent loop. - -#### wait`_`run`_`loop`_`stopped - -```python - | async wait_run_loop_stopped() -> None -``` - -Wait all tasks stopped. - - -#### stop + +#### state ```python - | stop() -> None + | @property + | state() -> AgentLoopStates ``` -Stop agent loop. +Get current main loop state. #### is`_`running @@ -107,24 +90,6 @@ Stop agent loop. Get running state of the loop. - -## AgentLoopException Objects - -```python -class AgentLoopException(AEAException) -``` - -Exception for agent loop runtime errors. - - -## AgentLoopStates Objects - -```python -class AgentLoopStates(Enum) -``` - -Internal agent loop states. - ## AsyncAgentLoop Objects @@ -138,7 +103,7 @@ Asyncio based agent loop suitable only for AEA. #### `__`init`__` ```python - | __init__(agent: AbstractAgent, loop: AbstractEventLoop = None) + | __init__(agent: AbstractAgent, loop: AbstractEventLoop = None, threaded=False) ``` Init agent loop. diff --git a/docs/api/configurations/base.md b/docs/api/configurations/base.md index 6ebf8cafdf..02f7c60415 100644 --- a/docs/api/configurations/base.md +++ b/docs/api/configurations/base.md @@ -23,6 +23,66 @@ The package name must satisfy +## PackageVersion Objects + +```python +@functools.total_ordering +class PackageVersion() +``` + +A package version. + + +#### `__`init`__` + +```python + | __init__(version_like: PackageVersionLike) +``` + +Initialize a package version. + +**Arguments**: + +- `version_like`: a string, os a semver.VersionInfo object. + + +#### is`_`latest + +```python + | @property + | is_latest() -> bool +``` + +Check whether the version is 'latest'. + + +#### `__`str`__` + +```python + | __str__() -> str +``` + +Get the string representation. + + +#### `__`eq`__` + +```python + | __eq__(other) -> bool +``` + +Check equality. + + +#### `__`lt`__` + +```python + | __lt__(other) +``` + +Compare with another object. + ## PackageType Objects @@ -324,12 +384,17 @@ The concatenation of those three elements gives the public identifier: >>> another_public_id = PublicId("author", "my_package", "0.1.0") >>> assert hash(public_id) == hash(another_public_id) >>> assert public_id == another_public_id +>>> latest_public_id = PublicId("author", "my_package", "latest") +>>> latest_public_id + +>>> latest_public_id.package_version.is_latest +True #### `__`init`__` ```python - | __init__(author: str, name: str, version: PackageVersionLike) + | __init__(author: str, name: str, version: Optional[PackageVersionLike] = None) ``` Initialize the public identifier. @@ -362,17 +427,17 @@ Get the name. | version() -> str ``` -Get the version. +Get the version string. - -#### version`_`info + +#### package`_`version ```python | @property - | version_info() -> PackageVersion + | package_version() -> PackageVersion ``` -Get the package version. +Get the package version object. #### latest @@ -384,6 +449,24 @@ Get the package version. Get the public id in `latest` form. + +#### same`_`prefix + +```python + | same_prefix(other: "PublicId") -> bool +``` + +Check if the other public id has the same author and name of this. + + +#### to`_`latest + +```python + | to_latest() -> "PublicId" +``` + +Return the same public id, but with latest version. + #### from`_`str @@ -765,6 +848,16 @@ Get the component identifier without the version. Get the prefix import path for this component. + +#### json + +```python + | @property + | json() -> Dict +``` + +Get the JSON representation. + ## PackageConfiguration Objects @@ -853,6 +946,23 @@ Get the public id. Get the package dependencies. + +#### update + +```python + | update(data: Dict) -> None +``` + +Update configuration with other data. + +**Arguments**: + +- `data`: the data to replace. + +**Returns**: + +None + ## ComponentConfiguration Objects @@ -945,23 +1055,6 @@ Check that the AEA version matches the specifier set. :raises ValueError if the version of the aea framework falls within a specifier. - -#### update - -```python - | update(data: Dict) -> None -``` - -Update configuration with other data. - -**Arguments**: - -- `data`: the data to replace. - -**Returns**: - -None - ## ConnectionConfig Objects @@ -1019,9 +1112,11 @@ Initialize from a JSON object. Update configuration with other data. +This method does side-effect on the configuration object. + **Arguments**: -- `data`: the data to replace. +- `data`: the data to populate or replace. **Returns**: @@ -1337,6 +1432,26 @@ Return the JSON representation. Initialize from a JSON object. + +#### update + +```python + | update(data: Dict) -> None +``` + +Update configuration with other data. + +To update the component parts, populate the field "component_configurations" as a +mapping from ComponentId to configurations. + +**Arguments**: + +- `data`: the data to replace. + +**Returns**: + +None + ## SpeechActContentConfig Objects diff --git a/docs/api/configurations/loader.md b/docs/api/configurations/loader.md index 5898403b87..954ba2685b 100644 --- a/docs/api/configurations/loader.md +++ b/docs/api/configurations/loader.md @@ -20,30 +20,29 @@ Make the JSONSchema base URI, cross-platform. the string in URI form. - -## ConfigLoader Objects + +## BaseConfigLoader Objects ```python -class ConfigLoader(Generic[T]) +class BaseConfigLoader() ``` -This class implement parsing, serialization and validation functionalities for the 'aea' configuration files. +Base class for configuration loader classes. - + #### `__`init`__` ```python - | __init__(schema_filename: str, configuration_class: Type[T]) + | __init__(schema_filename: str) ``` -Initialize the parser for configuration files. +Initialize the base configuration loader. **Arguments**: -- `schema_filename`: the path to the JSON-schema file in 'aea/configurations/schemas'. -- `configuration_class`: the configuration class (e.g. AgentConfig, SkillConfig etc.) +- `schema_filename`: the path to the schema. - + #### validator ```python @@ -53,7 +52,24 @@ Initialize the parser for configuration files. Get the json schema validator. - + +#### validate + +```python + | validate(json_data: Dict) -> None +``` + +Validate a JSON object. + +**Arguments**: + +- `json_data`: the JSON data. + +**Returns**: + +None. + + #### required`_`fields ```python @@ -61,12 +77,35 @@ Get the json schema validator. | required_fields() -> List[str] ``` -Get required fields. +Get the required fields. **Returns**: list of required fields. + +## ConfigLoader Objects + +```python +class ConfigLoader(Generic[T], BaseConfigLoader) +``` + +Parsing, serialization and validation for package configuration files. + + +#### `__`init`__` + +```python + | __init__(schema_filename: str, configuration_class: Type[T]) +``` + +Initialize the parser for configuration files. + +**Arguments**: + +- `schema_filename`: the path to the JSON-schema file in 'aea/configurations/schemas'. +- `configuration_class`: the configuration class (e.g. AgentConfig, SkillConfig etc.) + #### configuration`_`class @@ -157,6 +196,23 @@ None Get the configuration loader from the type. + +#### load`_`agent`_`config`_`from`_`json + +```python + | load_agent_config_from_json(configuration_json: List[Dict]) -> AgentConfig +``` + +Load agent configuration from configuration json data. + +**Arguments**: + +- `configuration_json`: list of dicts with aea configuration + +**Returns**: + +AgentConfig instance + ## ConfigLoaders Objects diff --git a/docs/api/configurations/project.md b/docs/api/configurations/project.md new file mode 100644 index 0000000000..b98b950b04 --- /dev/null +++ b/docs/api/configurations/project.md @@ -0,0 +1,69 @@ + +# aea.configurations.project + +This module contains the implementation of AEA agents project configuiration. + + +## Project Objects + +```python +class Project() +``` + +Agent project representation. + + +#### `__`init`__` + +```python + | __init__(public_id: PublicId, path: str) +``` + +Init project with public_id and project's path. + + +#### load + +```python + | @classmethod + | load(cls, working_dir: str, public_id: PublicId) -> "Project" +``` + +Load project with given pubblic_id to working_dir. + + +#### remove + +```python + | remove() -> None +``` + +Remove project, do cleanup. + + +## AgentAlias Objects + +```python +class AgentAlias() +``` + +Agent alias representation. + + +#### `__`init`__` + +```python + | __init__(project: Project, agent_name: str, config: List[Dict], agent: AEA) +``` + +Init agent alias with project, config, name, agent. + + +#### remove`_`from`_`project + +```python + | remove_from_project() +``` + +Remove agent alias from project. + diff --git a/docs/api/crypto/cosmos.md b/docs/api/crypto/cosmos.md index 8e4566442f..1b9ddd5be4 100644 --- a/docs/api/crypto/cosmos.md +++ b/docs/api/crypto/cosmos.md @@ -614,15 +614,6 @@ class CosmosApi(_CosmosApi, CosmosHelper) Class to interact with the Cosmos SDK via a HTTP APIs. - -## CosmWasmCLIWrapper Objects - -```python -class CosmWasmCLIWrapper() -``` - -Wrapper of the CosmWasm CLI. - ## CosmosFaucetApi Objects diff --git a/docs/api/helpers/async_utils.md b/docs/api/helpers/async_utils.md index a55cc92680..4b6bc6857c 100644 --- a/docs/api/helpers/async_utils.md +++ b/docs/api/helpers/async_utils.md @@ -151,25 +151,6 @@ Activate period calls. Remove from schedule. - -#### ensure`_`loop - -```python -ensure_loop(loop: Optional[AbstractEventLoop] = None) -> AbstractEventLoop -``` - -Use loop provided or create new if not provided or closed. - -Return loop passed if its provided,not closed and not running, otherwise returns new event loop. - -**Arguments**: - -- `loop`: optional event loop - -**Returns**: - -asyncio event loop - ## AnotherThreadTask Objects @@ -295,7 +276,7 @@ Stop event loop in thread. class AwaitableProc() ``` -Async-friendly subprocess.Popen +Async-friendly subprocess.Popen. #### `__`init`__` @@ -313,7 +294,7 @@ Initialise awaitable proc. | async start() ``` -Start the subprocess +Start the subprocess. ## ItemGetter Objects @@ -368,3 +349,104 @@ Init HandlerItemGetter. - `getters`: List of tuples of handler and couroutine to be awaiteed for an item. + +## Runnable Objects + +```python +class Runnable(ABC) +``` + +Abstract Runnable class. + +Use to run async task in same event loop or in dedicated thread. +Provides: start, stop sync methods to start and stop task +Use wait_completed to await task was completed. + + +#### `__`init`__` + +```python + | __init__(loop: asyncio.AbstractEventLoop = None, threaded: bool = False) -> None +``` + +Init runnable. + +**Arguments**: + +- `loop`: asyncio event loop to use. +- `threaded`: bool. start in thread if True. + +**Returns**: + +None + + +#### start + +```python + | start() -> bool +``` + +Start runnable. + +**Returns**: + +bool started or not. + + +#### is`_`running + +```python + | @property + | is_running() -> bool +``` + +Get running state. + + +#### run + +```python + | @abstractmethod + | async run() -> Any +``` + +Implement run logic respectfull to CancelError on termination. + + +#### wait`_`completed + +```python + | wait_completed(sync: bool = False, timeout: float = None, force_result: bool = False) -> Awaitable +``` + +Wait runnable execution completed. + +**Arguments**: + +- `sync`: bool. blocking wait +- `timeout`: float seconds +- `force_result`: check result even it was waited. + +**Returns**: + +awaitable if sync is False, otherise None + + +#### stop + +```python + | stop(force: bool = False) -> None +``` + +Stop runnable. + + +#### start`_`and`_`wait`_`completed + +```python + | start_and_wait_completed(*args, **kwargs) -> Awaitable +``` + +Alias for start and wait methods. + diff --git a/docs/api/helpers/base.md b/docs/api/helpers/base.md index 708e1a5c7d..bf6420d777 100644 --- a/docs/api/helpers/base.md +++ b/docs/api/helpers/base.md @@ -269,3 +269,29 @@ Run code in context to log and re raise exception. - `log_method`: function to print log - `message`: message template to add error text. + +#### recursive`_`update + +```python +recursive_update(to_update: Dict, new_values: Dict) -> None +``` + +Update a dictionary by replacing conflicts with the new values. + +It does side-effects to the first dictionary. + +>>> to_update = dict(a=1, b=2, subdict=dict(subfield1=1)) +>>> new_values = dict(b=3, subdict=dict(subfield1=2)) +>>> recursive_update(to_update, new_values) +>>> to_update +{'a': 1, 'b': 3, 'subdict': {'subfield1': 2}} + +**Arguments**: + +- `to_update`: the dictionary to update. +- `new_values`: the dictionary of new values to replace. + +**Returns**: + +None + diff --git a/docs/api/helpers/multiaddr/base.md b/docs/api/helpers/multiaddr/base.md index d7a9062ce3..371ee50517 100644 --- a/docs/api/helpers/multiaddr/base.md +++ b/docs/api/helpers/multiaddr/base.md @@ -10,7 +10,7 @@ This module contains multiaddress class. class MultiAddr() ``` -Protocol Labs' Multiaddress representation of a network address +Protocol Labs' Multiaddress representation of a network address. #### `__`init`__` @@ -19,7 +19,7 @@ Protocol Labs' Multiaddress representation of a network address | __init__(host: str, port: int, public_key: str) ``` -Initialize a multiaddress +Initialize a multiaddress. **Arguments**: @@ -75,7 +75,7 @@ Get the peer id. | format() -> str ``` -Canonical representation of a multiaddress +Canonical representation of a multiaddress. #### `__`str`__` diff --git a/docs/api/helpers/pipe.md b/docs/api/helpers/pipe.md index 0597f6acfc..47262b7de2 100644 --- a/docs/api/helpers/pipe.md +++ b/docs/api/helpers/pipe.md @@ -10,7 +10,7 @@ Portable pipe implementation for Linux, MacOS, and Windows. class IPCChannelClient(ABC) ``` -Multi-platform interprocess communication channel for the client side +Multi-platform interprocess communication channel for the client side. #### connect @@ -35,6 +35,7 @@ Connect to communication channel ``` Write `data` bytes to the other end of the channel + Will first write the size than the actual data **Arguments**: @@ -50,6 +51,7 @@ Will first write the size than the actual data ``` Read bytes from the other end of the channel + Will first read the size than the actual data **Returns**: @@ -64,7 +66,11 @@ read bytes | async close() -> None ``` -Close the communication channel +Close the communication channel. + +**Returns**: + +None ## IPCChannel Objects @@ -73,7 +79,7 @@ Close the communication channel class IPCChannel(IPCChannelClient) ``` -Multi-platform interprocess communication channel +Multi-platform interprocess communication channel. #### in`_`path @@ -84,7 +90,11 @@ Multi-platform interprocess communication channel | in_path() -> str ``` -Rendezvous point for incoming communication +Rendezvous point for incoming communication. + +**Returns**: + +path #### out`_`path @@ -95,7 +105,11 @@ Rendezvous point for incoming communication | out_path() -> str ``` -Rendezvous point for outgoing communication +Rendezvous point for outgoing communication. + +**Returns**: + +path ## PosixNamedPipeProtocol Objects @@ -104,7 +118,7 @@ Rendezvous point for outgoing communication class PosixNamedPipeProtocol() ``` -Posix named pipes async wrapper communication protocol +Posix named pipes async wrapper communication protocol. #### `__`init`__` @@ -113,7 +127,7 @@ Posix named pipes async wrapper communication protocol | __init__(in_path: str, out_path: str, logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None) ``` -Initialize a new posix named pipe +Initialize a new posix named pipe. **Arguments**: @@ -170,7 +184,7 @@ read bytes | async close() -> None ``` -Disconnect pipe +Disconnect pipe. ## TCPSocketProtocol Objects @@ -179,7 +193,7 @@ Disconnect pipe class TCPSocketProtocol() ``` -TCP socket communication protocol +TCP socket communication protocol. #### `__`init`__` @@ -188,7 +202,7 @@ TCP socket communication protocol | __init__(reader: asyncio.StreamReader, writer: asyncio.StreamWriter, logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None) ``` -Initialize the tcp socket protocol +Initialize the tcp socket protocol. **Arguments**: @@ -228,7 +242,7 @@ read bytes | async close() -> None ``` -Disconnect socket +Disconnect socket. ## TCPSocketChannel Objects @@ -237,7 +251,7 @@ Disconnect socket class TCPSocketChannel(IPCChannel) ``` -Interprocess communication channel implementation using tcp sockets +Interprocess communication channel implementation using tcp sockets. #### `__`init`__` @@ -246,7 +260,7 @@ Interprocess communication channel implementation using tcp sockets | __init__(logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None) ``` -Initialize tcp socket interprocess communication channel +Initialize tcp socket interprocess communication channel. #### connect @@ -255,7 +269,7 @@ Initialize tcp socket interprocess communication channel | async connect(timeout: float = PIPE_CONN_TIMEOUT) -> bool ``` -Setup communication channel and wait for other end to connect +Setup communication channel and wait for other end to connect. **Arguments**: @@ -294,7 +308,7 @@ Read from channel. | async close() -> None ``` -Disconnect from channel and clean it up +Disconnect from channel and clean it up. #### in`_`path @@ -304,7 +318,7 @@ Disconnect from channel and clean it up | in_path() -> str ``` -Rendezvous point for incoming communication +Rendezvous point for incoming communication. #### out`_`path @@ -314,7 +328,7 @@ Rendezvous point for incoming communication | out_path() -> str ``` -Rendezvous point for outgoing communication +Rendezvous point for outgoing communication. ## PosixNamedPipeChannel Objects @@ -323,7 +337,7 @@ Rendezvous point for outgoing communication class PosixNamedPipeChannel(IPCChannel) ``` -Interprocess communication channel implementation using Posix named pipes +Interprocess communication channel implementation using Posix named pipes. #### `__`init`__` @@ -332,7 +346,7 @@ Interprocess communication channel implementation using Posix named pipes | __init__(logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None) ``` -Initialize posix named pipe interprocess communication channel +Initialize posix named pipe interprocess communication channel. #### connect @@ -341,12 +355,16 @@ Initialize posix named pipe interprocess communication channel | async connect(timeout: float = PIPE_CONN_TIMEOUT) -> bool ``` -Setup communication channel and wait for other end to connect +Setup communication channel and wait for other end to connect. **Arguments**: - `timeout`: timeout for connection to be established +**Returns**: + +bool, indicating sucess + #### write @@ -380,7 +398,7 @@ read bytes | async close() -> None ``` -Close the channel and clean it up +Close the channel and clean it up. #### in`_`path @@ -390,7 +408,7 @@ Close the channel and clean it up | in_path() -> str ``` -Rendezvous point for incoming communication +Rendezvous point for incoming communication. #### out`_`path @@ -400,7 +418,7 @@ Rendezvous point for incoming communication | out_path() -> str ``` -Rendezvous point for outgoing communication +Rendezvous point for outgoing communication. ## TCPSocketChannelClient Objects @@ -409,7 +427,7 @@ Rendezvous point for outgoing communication class TCPSocketChannelClient(IPCChannelClient) ``` -Interprocess communication channel client using tcp sockets +Interprocess communication channel client using tcp sockets. #### `__`init`__` @@ -418,7 +436,7 @@ Interprocess communication channel client using tcp sockets | __init__(in_path: str, out_path: str, logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None) ``` -Initialize a tcp socket communication channel client +Initialize a tcp socket communication channel client. **Arguments**: @@ -432,7 +450,7 @@ Initialize a tcp socket communication channel client | async connect(timeout: float = PIPE_CONN_TIMEOUT) -> bool ``` -Connect to the other end of the communication channel +Connect to the other end of the communication channel. **Arguments**: @@ -445,7 +463,7 @@ Connect to the other end of the communication channel | async write(data: bytes) -> None ``` -Write data to channel +Write data to channel. **Arguments**: @@ -458,7 +476,7 @@ Write data to channel | async read() -> Optional[bytes] ``` -Read data from channel +Read data from channel. **Returns**: @@ -471,7 +489,7 @@ read bytes | async close() -> None ``` -Disconnect from communication channel +Disconnect from communication channel. ## PosixNamedPipeChannelClient Objects @@ -480,7 +498,7 @@ Disconnect from communication channel class PosixNamedPipeChannelClient(IPCChannelClient) ``` -Interprocess communication channel client using Posix named pipes +Interprocess communication channel client using Posix named pipes. #### `__`init`__` @@ -489,7 +507,7 @@ Interprocess communication channel client using Posix named pipes | __init__(in_path: str, out_path: str, logger: logging.Logger = _default_logger, loop: Optional[AbstractEventLoop] = None) ``` -Initialize a posix named pipe communication channel client +Initialize a posix named pipe communication channel client. **Arguments**: @@ -503,7 +521,7 @@ Initialize a posix named pipe communication channel client | async connect(timeout: float = PIPE_CONN_TIMEOUT) -> bool ``` -Connect to the other end of the communication channel +Connect to the other end of the communication channel. **Arguments**: @@ -516,7 +534,7 @@ Connect to the other end of the communication channel | async write(data: bytes) -> None ``` -Write data to channel +Write data to channel. **Arguments**: @@ -529,7 +547,7 @@ Write data to channel | async read() -> Optional[bytes] ``` -Read data from channel +Read data from channel. **Returns**: @@ -542,7 +560,7 @@ read bytes | async close() -> None ``` -Disconnect from communication channel +Disconnect from communication channel. #### make`_`ipc`_`channel @@ -553,6 +571,15 @@ make_ipc_channel(logger: logging.Logger = _default_logger, loop: Optional[Abstra Build a portable bidirectional InterProcess Communication channel +**Arguments**: + +- `logger`: the logger +- `loop`: the loop + +**Returns**: + +IPCChannel + #### make`_`ipc`_`channel`_`client @@ -566,4 +593,10 @@ Build a portable bidirectional InterProcess Communication client channel - `in_path`: rendezvous point for incoming communication - `out_path`: rendezvous point for outgoing outgoing +- `logger`: the logger +- `loop`: the loop + +**Returns**: + +IPCChannel diff --git a/docs/api/helpers/transaction/base.md b/docs/api/helpers/transaction/base.md index d7f9b47d5f..2db69505a1 100644 --- a/docs/api/helpers/transaction/base.md +++ b/docs/api/helpers/transaction/base.md @@ -82,6 +82,24 @@ A new instance of this class must be created that matches the protocol buffer ob A new instance of this class that matches the protocol buffer object in the 'raw_transaction_protobuf_object' argument. + +#### `__`eq`__` + +```python + | __eq__(other) +``` + +Check equality. + + +#### `__`str`__` + +```python + | __str__() +``` + +Get string representation. + ## RawMessage Objects @@ -171,6 +189,24 @@ A new instance of this class must be created that matches the protocol buffer ob A new instance of this class that matches the protocol buffer object in the 'raw_message_protobuf_object' argument. + +#### `__`eq`__` + +```python + | __eq__(other) +``` + +Check equality. + + +#### `__`str`__` + +```python + | __str__() +``` + +Get string representation. + ## SignedTransaction Objects @@ -250,6 +286,24 @@ A new instance of this class must be created that matches the protocol buffer ob A new instance of this class that matches the protocol buffer object in the 'signed_transaction_protobuf_object' argument. + +#### `__`eq`__` + +```python + | __eq__(other) +``` + +Check equality. + + +#### `__`str`__` + +```python + | __str__() +``` + +Get string representation. + ## SignedMessage Objects @@ -339,6 +393,24 @@ A new instance of this class must be created that matches the protocol buffer ob A new instance of this class that matches the protocol buffer object in the 'signed_message_protobuf_object' argument. + +#### `__`eq`__` + +```python + | __eq__(other) +``` + +Check equality. + + +#### `__`str`__` + +```python + | __str__() +``` + +Get string representation. + ## State Objects @@ -418,6 +490,24 @@ A new instance of this class must be created that matches the protocol buffer ob A new instance of this class that matches the protocol buffer object in the 'state_protobuf_object' argument. + +#### `__`eq`__` + +```python + | __eq__(other) +``` + +Check equality. + + +#### `__`str`__` + +```python + | __str__() +``` + +Get string representation. + ## Terms Objects @@ -784,6 +874,24 @@ A new instance of this class must be created that matches the protocol buffer ob A new instance of this class that matches the protocol buffer object in the 'terms_protobuf_object' argument. + +#### `__`eq`__` + +```python + | __eq__(other) +``` + +Check equality. + + +#### `__`str`__` + +```python + | __str__() +``` + +Get string representation. + ## TransactionDigest Objects @@ -863,6 +971,24 @@ A new instance of this class must be created that matches the protocol buffer ob A new instance of this class that matches the protocol buffer object in the 'transaction_digest_protobuf_object' argument. + +#### `__`eq`__` + +```python + | __eq__(other) +``` + +Check equality. + + +#### `__`str`__` + +```python + | __str__() +``` + +Get string representation. + ## TransactionReceipt Objects @@ -952,3 +1078,21 @@ A new instance of this class must be created that matches the protocol buffer ob A new instance of this class that matches the protocol buffer object in the 'transaction_receipt_protobuf_object' argument. + +#### `__`eq`__` + +```python + | __eq__(other) +``` + +Check equality. + + +#### `__`str`__` + +```python + | __str__() +``` + +Get string representation. + diff --git a/docs/api/manager.md b/docs/api/manager.md new file mode 100644 index 0000000000..2c9a7aca94 --- /dev/null +++ b/docs/api/manager.md @@ -0,0 +1,365 @@ + +# aea.manager + +This module contains the implementation of AEA agents manager. + + +## AgentRunAsyncTask Objects + +```python +class AgentRunAsyncTask() +``` + +Async task wrapper for agent. + + +#### `__`init`__` + +```python + | __init__(agent: AEA, loop: asyncio.AbstractEventLoop) -> None +``` + +Init task with agent and loop. + + +#### create`_`run`_`loop + +```python + | create_run_loop() -> None +``` + +Create run loop. + + +#### start + +```python + | start() -> None +``` + +Start task. + + +#### wait + +```python + | wait() -> asyncio.Future +``` + +Return future to wait task completed. + + +#### stop + +```python + | stop() -> None +``` + +Stop task. + + +#### run + +```python + | async run() -> None +``` + +Run task body. + + +#### is`_`running + +```python + | @property + | is_running() -> bool +``` + +Return is task running. + + +## AgentRunThreadTask Objects + +```python +class AgentRunThreadTask(AgentRunAsyncTask) +``` + +Threaded wrapper to run agent. + + +#### `__`init`__` + +```python + | __init__(agent: AEA, loop: asyncio.AbstractEventLoop) -> None +``` + +Init task with agent and loop. + + +#### create`_`run`_`loop + +```python + | create_run_loop() -> None +``` + +Create run loop. + + +#### start + +```python + | start() -> None +``` + +Run task in a dedicated thread. + + +## MultiAgentManager Objects + +```python +class MultiAgentManager() +``` + +Multi agents manager. + + +#### `__`init`__` + +```python + | __init__(working_dir: str, mode: str = "async") -> None +``` + +Initialize manager. + +**Arguments**: + +- `working_dir`: directory to store base agents. + + +#### is`_`running + +```python + | @property + | is_running() -> bool +``` + +Is manager running. + + +#### add`_`error`_`callback + +```python + | add_error_callback(error_callback: Callable[[str, BaseException], None]) -> None +``` + +Add error callback to call on error raised. + + +#### start`_`manager + +```python + | start_manager() -> "MultiAgentManager" +``` + +Start manager. + + +#### stop`_`manager + +```python + | stop_manager() -> "MultiAgentManager" +``` + +Stop manager. + +Stops all running agents and stop agent. + +**Returns**: + +None + + +#### add`_`project + +```python + | add_project(public_id: PublicId) -> "MultiAgentManager" +``` + +Fetch agent project and all dependencies to working_dir. + + +#### remove`_`project + +```python + | remove_project(public_id: PublicId) -> "MultiAgentManager" +``` + +Remove agent project. + + +#### list`_`projects + +```python + | list_projects() -> List[PublicId] +``` + +List all agents projects added. + +**Returns**: + +lit of public ids of projects + + +#### add`_`agent + +```python + | add_agent(public_id: PublicId, agent_name: Optional[str] = None, agent_overrides: Optional[dict] = None, component_overrides: Optional[List[dict]] = None) -> "MultiAgentManager" +``` + +Create new agent configuration based on project with config overrides applied. + +Alias is stored in memory only! + +**Arguments**: + +- `public_id`: base agent project public id +- `agent_name`: unique name for the agent +- `agent_overrides`: overrides for agent config. +- `component_overrides`: overrides for component section. + +**Returns**: + +manager + + +#### list`_`agents + +```python + | list_agents(running_only: bool = False) -> List[str] +``` + +List all agents. + +**Arguments**: + +- `running_only`: returns only running if set to True + +**Returns**: + +list of agents names + + +#### remove`_`agent + +```python + | remove_agent(agent_name: str) -> "MultiAgentManager" +``` + +Remove agent alias definition from registry. + +**Arguments**: + +- `agent_name`: agent name to remove + +**Returns**: + +None + + +#### start`_`agent + +```python + | start_agent(agent_name: str) -> "MultiAgentManager" +``` + +Start selected agent. + +**Arguments**: + +- `agent_name`: agent name to start + +**Returns**: + +None + + +#### start`_`all`_`agents + +```python + | start_all_agents() -> "MultiAgentManager" +``` + +Start all not started agents. + +**Returns**: + +None + + +#### stop`_`agent + +```python + | stop_agent(agent_name: str) -> "MultiAgentManager" +``` + +Stop running agent. + +**Arguments**: + +- `agent_name`: agent name to stop + +**Returns**: + +None + + +#### stop`_`all`_`agents + +```python + | stop_all_agents() -> "MultiAgentManager" +``` + +Stop all agents running. + +**Returns**: + +None + + +#### stop`_`agents + +```python + | stop_agents(agent_names: List[str]) -> "MultiAgentManager" +``` + +Stop specified agents. + +**Returns**: + +None + + +#### start`_`agents + +```python + | start_agents(agent_names: List[str]) -> "MultiAgentManager" +``` + +Stop specified agents. + +**Returns**: + +None + + +#### get`_`agent`_`alias + +```python + | get_agent_alias(agent_name: str) -> AgentAlias +``` + +Return details about agent alias definition. + +**Returns**: + +AgentAlias + diff --git a/docs/api/multiplexer.md b/docs/api/multiplexer.md index 0323f016dc..3349f0916d 100644 --- a/docs/api/multiplexer.md +++ b/docs/api/multiplexer.md @@ -65,7 +65,7 @@ Return is disconnected. ## AsyncMultiplexer Objects ```python -class AsyncMultiplexer(WithLogger) +class AsyncMultiplexer(Runnable, WithLogger) ``` This class can handle multiple connections at once. @@ -74,7 +74,7 @@ This class can handle multiple connections at once. #### `__`init`__` ```python - | __init__(connections: Optional[Sequence[Connection]] = None, default_connection_index: int = 0, loop: Optional[AbstractEventLoop] = None, exception_policy: ExceptionPolicyEnum = ExceptionPolicyEnum.propagate) + | __init__(connections: Optional[Sequence[Connection]] = None, default_connection_index: int = 0, loop: Optional[AbstractEventLoop] = None, exception_policy: ExceptionPolicyEnum = ExceptionPolicyEnum.propagate, threaded: bool = False) ``` Initialize the connection multiplexer. @@ -88,6 +88,15 @@ If connections is None, this parameter is ignored. - `loop`: the event loop to run the multiplexer. If None, a new event loop is created. - `agent_name`: the name of the agent that owns the multiplexer, for logging purposes. + +#### run + +```python + | async run() -> None +``` + +Run multiplexer connect and recv/send tasks. + #### default`_`connection @@ -285,6 +294,25 @@ running on a different thread than the one used in this function. None + +#### setup + +```python + | setup(connections: Collection[Connection], default_routing: Optional[Dict[PublicId, PublicId]] = None, default_connection: Optional[PublicId] = None) -> None +``` + +Set up the multiplexer. + +**Arguments**: + +- `connections`: the connections to use. It will replace the other ones. +- `default_routing`: the default routing. +- `default_connection`: the default connection. + +**Returns**: + +None. + ## Multiplexer Objects @@ -370,25 +398,6 @@ running on a different thread than the one used in this function. None - -#### setup - -```python - | setup(connections: Collection[Connection], default_routing: Optional[Dict[PublicId, PublicId]] = None, default_connection: Optional[PublicId] = None) -> None -``` - -Set up the multiplexer. - -**Arguments**: - -- `connections`: the connections to use. It will replace the other ones. -- `default_routing`: the default routing. -- `default_connection`: the default connection. - -**Returns**: - -None. - ## InBox Objects @@ -402,7 +411,7 @@ A queue from where you can only consume envelopes. #### `__`init`__` ```python - | __init__(multiplexer: Multiplexer) + | __init__(multiplexer: AsyncMultiplexer) ``` Initialize the inbox. @@ -498,7 +507,7 @@ A queue from where you can only enqueue envelopes. #### `__`init`__` ```python - | __init__(multiplexer: Multiplexer) + | __init__(multiplexer: AsyncMultiplexer) ``` Initialize the outbox. diff --git a/docs/api/protocols/generator/base.md b/docs/api/protocols/generator/base.md index 8859ed4742..666c4eb5b2 100644 --- a/docs/api/protocols/generator/base.md +++ b/docs/api/protocols/generator/base.md @@ -39,6 +39,7 @@ None ``` Run the generator in "protobuf only" mode: + a) validate the protocol specification. b) create the protocol buffer schema file. @@ -54,6 +55,7 @@ None ``` Run the generator in "full" mode: + a) validates the protocol specification. b) creates the protocol buffer schema file. c) generates python modules. @@ -72,6 +74,7 @@ None ``` Run the generator. If in "full" mode (protobuf_only is False), it: + a) validates the protocol specification. b) creates the protocol buffer schema file. c) generates python modules. diff --git a/docs/api/protocols/generator/common.md b/docs/api/protocols/generator/common.md index 67247544c4..1bc0a01466 100644 --- a/docs/api/protocols/generator/common.md +++ b/docs/api/protocols/generator/common.md @@ -67,6 +67,23 @@ Run Black code formatting via subprocess. None + +#### try`_`run`_`isort`_`formatting + +```python +try_run_isort_formatting(path_to_protocol_package: str) -> None +``` + +Run Isort code formatting via subprocess. + +**Arguments**: + +- `path_to_protocol_package`: a path where formatting should be applied. + +**Returns**: + +None + #### try`_`run`_`protoc diff --git a/docs/api/registries/base.md b/docs/api/registries/base.md index 9306db7d64..ea7799d533 100644 --- a/docs/api/registries/base.md +++ b/docs/api/registries/base.md @@ -35,7 +35,7 @@ Register an item. - `item_id`: the public id of the item. - `item`: the item. -- `is_dynamicall_added`: whether or not the item is dynamicall added. +- `is_dynamically_added`: whether or not the item is dynamically added. **Returns**: @@ -93,6 +93,20 @@ Fetch all the items. the list of items. + +#### ids + +```python + | @abstractmethod + | ids() -> Set[ItemId] +``` + +Return the set of all the used item ids. + +**Returns**: + +the set of item ids. + #### setup @@ -121,6 +135,98 @@ Teardown the registry. None + +## PublicIdRegistry Objects + +```python +class PublicIdRegistry(Generic[Item], Registry[PublicId, Item]) +``` + +This class implement a registry whose keys are public ids. + +In particular, it is able to handle the case when the public id +points to the 'latest' version of a package. + + +#### `__`init`__` + +```python + | __init__() +``` + +Initialize the registry. + + +#### register + +```python + | register(public_id: PublicId, item: Item, is_dynamically_added: bool = False) -> None +``` + +Register an item. + + +#### unregister + +```python + | unregister(public_id: PublicId) -> None +``` + +Unregister an item. + + +#### fetch + +```python + | fetch(public_id: PublicId) -> Optional[Item] +``` + +Fetch an item associated with a public id. + +**Arguments**: + +- `public_id`: the public id. + +**Returns**: + +an item, or None if the key is not present. + + +#### fetch`_`all + +```python + | fetch_all() -> List[Item] +``` + +Fetch all the items. + + +#### ids + +```python + | ids() -> Set[PublicId] +``` + +Get all the item ids. + + +#### setup + +```python + | setup() -> None +``` + +Set up the items. + + +#### teardown + +```python + | teardown() -> None +``` + +Tear down the items. + ## AgentComponentRegistry Objects @@ -156,7 +262,7 @@ Register a component. - `component_id`: the id of the component. - `component`: the component object. -- `is_dynamicall_added`: whether or not the item is dynamicall added. +- `is_dynamically_added`: whether or not the item is dynamically added. #### unregister @@ -213,6 +319,15 @@ Fetch all the components by a given type.. - `component_type`: a component type :return the list of registered components of a given type. + +#### ids + +```python + | ids() -> Set[ComponentId] +``` + +Get the item ids. + #### setup @@ -275,7 +390,7 @@ Register a item. - `item_id`: a pair (skill id, item name). - `item`: the item to register. -- `is_dynamicall_added`: whether or not the item is dynamicall added. +- `is_dynamically_added`: whether or not the item is dynamically added. **Returns**: @@ -321,7 +436,7 @@ the Item #### fetch`_`by`_`skill ```python - | fetch_by_skill(skill_id: SkillId) -> List[Item] + | fetch_by_skill(skill_id: SkillId) -> List[SkillComponentType] ``` Fetch all the items of a given skill. @@ -344,6 +459,15 @@ Fetch all the items. Unregister all the components by skill. + +#### ids + +```python + | ids() -> Set[Tuple[SkillId, str]] +``` + +Get the item ids. + #### setup @@ -405,7 +529,7 @@ Register a handler. - `item_id`: the item id. - `item`: the handler. -- `is_dynamicall_added`: whether or not the item is dynamicall added. +- `is_dynamically_added`: whether or not the item is dynamically added. **Returns**: diff --git a/docs/api/runtime.md b/docs/api/runtime.md index 64d57ce31a..9e18f7cfcf 100644 --- a/docs/api/runtime.md +++ b/docs/api/runtime.md @@ -3,6 +3,35 @@ This module contains the implementation of runtime for economic agent (AEA). + +## `_`StopRuntime Objects + +```python +class _StopRuntime(Exception) +``` + +Exception to stop runtime. + +For internal usage only! +Used to perform asyncio call from sync callbacks. + + +#### `__`init`__` + +```python + | __init__(reraise: Optional[Exception] = None) +``` + +Init _StopRuntime exception. + +**Arguments**: + +- `reraise`: exception to reraise. + +**Returns**: + +None + ## RuntimeStates Objects @@ -16,7 +45,7 @@ Runtime states. ## BaseRuntime Objects ```python -class BaseRuntime(ABC) +class BaseRuntime(Runnable) ``` Abstract runtime class to create implementations. @@ -25,7 +54,7 @@ Abstract runtime class to create implementations. #### `__`init`__` ```python - | __init__(agent: AbstractAgent, loop_mode: Optional[str] = None, loop: Optional[AbstractEventLoop] = None) -> None + | __init__(agent: AbstractAgent, loop_mode: Optional[str] = None, loop: Optional[AbstractEventLoop] = None, threaded=False) -> None ``` Init runtime. @@ -74,7 +103,7 @@ Get the task manager. ```python | @property - | loop() -> AbstractEventLoop + | loop() -> Optional[AbstractEventLoop] ``` Get event loop. @@ -84,7 +113,7 @@ Get event loop. ```python | @property - | multiplexer() -> Multiplexer + | multiplexer() -> AsyncMultiplexer ``` Get multiplexer. @@ -108,24 +137,6 @@ Return decision maker if set. Set decision maker with handler provided. - -#### start - -```python - | start() -> None -``` - -Start agent using runtime. - - -#### stop - -```python - | stop() -> None -``` - -Stop agent and runtime. - #### is`_`running @@ -186,7 +197,7 @@ Asynchronous runtime: uses asyncio loop for multiplexer and async agent main loo #### `__`init`__` ```python - | __init__(agent: AbstractAgent, loop_mode: Optional[str] = None, loop: Optional[AbstractEventLoop] = None) -> None + | __init__(agent: AbstractAgent, loop_mode: Optional[str] = None, loop: Optional[AbstractEventLoop] = None, threaded=False) -> None ``` Init runtime. @@ -214,6 +225,30 @@ Set event loop to be used. - `loop`: event loop to use. + +#### run + +```python + | async run() -> None +``` + +Start runtime task. + +Starts multiplexer and agent loop. + + +#### stop`_`runtime + +```python + | async stop_runtime() -> None +``` + +Stop runtime coroutine. + +Stop main loop. +Tear down the agent.. +Disconnect multiplexer. + #### run`_`runtime @@ -227,7 +262,7 @@ Run agent and starts multiplexer. ## ThreadedRuntime Objects ```python -class ThreadedRuntime(BaseRuntime) +class ThreadedRuntime(AsyncRuntime) ``` Run agent and multiplexer in different threads with own asyncio loops. diff --git a/docs/oef-ledger.md b/docs/oef-ledger.md index 9575ac8e42..9020561da9 100644 --- a/docs/oef-ledger.md +++ b/docs/oef-ledger.md @@ -93,7 +93,7 @@ Whilst a ledger can, in principle, also be used to store structured data - for i The Python version of the AEA Framework currently integrates with three ledgers: - Fetch.ai ledger -- Ethereum ledger +- Ethereum ledger - Cosmos ledger However, the framework makes it straightforward for further ledgers to be added by any developer. diff --git a/docs/p2p-connection.md b/docs/p2p-connection.md index 8537bfe080..1e8163ba4b 100644 --- a/docs/p2p-connection.md +++ b/docs/p2p-connection.md @@ -77,9 +77,9 @@ To learn more about how to configure your `fetchai/p2p_libp2p:0.10.0` connection You can run the peer node in standalone mode, that is, as a Go process with no dependency to the agents framework. To facilitate the deployment, we provide a script - `run_acn_node_standalone.py` + `run_acn_node_standalone.py` and a corresponding - Dockerfile. + Dockerfile. First, you need to build the node's binary (`libp2p_node`) either: diff --git a/scripts/generate_api_docs.py b/scripts/generate_api_docs.py index a282611af5..90ad331f18 100755 --- a/scripts/generate_api_docs.py +++ b/scripts/generate_api_docs.py @@ -36,6 +36,7 @@ "aea.common": "api/common.md", "aea.exceptions": "api/exceptions.md", "aea.launcher": "api/launcher.md", + "aea.manager": "api/manager.md", "aea.multiplexer": "api/multiplexer.md", "aea.runner": "api/runner.md", "aea.runtime": "api/runtime.md", @@ -44,6 +45,7 @@ "aea.configurations.base": "api/configurations/base.md", "aea.configurations.constants": "api/configurations/constants.md", "aea.configurations.loader": "api/configurations/loader.md", + "aea.configurations.project": "api/configurations/project.md", "aea.configurations.pypi": "api/configurations/pypi.md", "aea.connections.base": "api/connections/base.md", "aea.connections.stub.connection": "api/connections/stub/connection.md", From 36db577a324968c45ddc39e029844899a925a4fb Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 17:12:33 +0100 Subject: [PATCH 126/131] increase timeout for ipfs daemon exit --- scripts/generate_ipfs_hashes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_ipfs_hashes.py b/scripts/generate_ipfs_hashes.py index 4813357fe5..04b6020faf 100755 --- a/scripts/generate_ipfs_hashes.py +++ b/scripts/generate_ipfs_hashes.py @@ -233,7 +233,7 @@ def __enter__(self): def __exit__(self, exc_type, exc_val, exc_tb): """Terminate the ipfs daemon.""" self.process.send_signal(signal.SIGTERM) - self.process.wait(timeout=10) + self.process.wait(timeout=30) poll = self.process.poll() if poll is None: self.process.terminate() From d4de3228a46dcb5b0af6309cb2cf2eff85295d44 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 17:15:17 +0100 Subject: [PATCH 127/131] fix soef pragma statement --- packages/fetchai/connections/soef/connection.py | 4 ++-- packages/fetchai/connections/soef/connection.yaml | 2 +- packages/hashes.csv | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/fetchai/connections/soef/connection.py b/packages/fetchai/connections/soef/connection.py index 0b41b15501..ab150d35a5 100644 --- a/packages/fetchai/connections/soef/connection.py +++ b/packages/fetchai/connections/soef/connection.py @@ -908,9 +908,9 @@ async def _unregister_agent(self) -> None: # pylint: disable=unused-argument :return: None """ if not self._unregister_lock: - raise ValueError( + raise ValueError( # pragma: nocover "unregistered lock is not set, please call connect!" - ) # pragma: nocover + ) async with self._unregister_lock: if self.unique_page_address is None: # pragma: nocover diff --git a/packages/fetchai/connections/soef/connection.yaml b/packages/fetchai/connections/soef/connection.yaml index 07f0d6aaf4..83c44646c6 100644 --- a/packages/fetchai/connections/soef/connection.yaml +++ b/packages/fetchai/connections/soef/connection.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.6.0, <0.7.0' fingerprint: README.md: QmS9zorTodmaRyaxocELEwEqHEPowKoG9wgSAak7s59rZD __init__.py: Qmd5VBGFJHXFe1H45XoUh5mMSYBwvLSViJuGFeMgbPdQts - connection.py: QmYXqA1b1YBgwNuf6nUYTJgJeHVb7d8UNmCaQmkN2mY9KZ + connection.py: QmaH2heEFqpA7tECzQKrzcZKuXHpBQ3oKofKj2b2dtz5zk fingerprint_ignore_patterns: [] protocols: - fetchai/oef_search:0.7.0 diff --git a/packages/hashes.csv b/packages/hashes.csv index 7777abae93..89725bf818 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -29,7 +29,7 @@ fetchai/connections/p2p_libp2p,QmbPgTY8am7PgLoP3ksaHyuwZzfFGXN4cBrvjV9byramEh fetchai/connections/p2p_libp2p_client,QmSbfL2DT9L1oooKn2pme1tjivEzkzaiRqJ4zahB4Jb27b fetchai/connections/p2p_stub,QmecGYtXsb7HA2dSWrw2ARNTPFqZsKXAbVroBo57cdUQSG fetchai/connections/scaffold,QmNUta43nLexAHaXLgmLQYEjntLXSV6MLNvc6Q2CTx7eBS -fetchai/connections/soef,QmW3x9tzEaE4fqBsqzMXmke8fh2y75CrFZFtMrn8WRGyZD +fetchai/connections/soef,QmaaC1Va79rkztC2GDEwDXEugkiDGqe9hPkPgYsHRdn7d7 fetchai/connections/stub,QmQxzFLTBjPUMkpE1uBdkoyhb7iXY4k8VPzyykpjhuUcK1 fetchai/connections/tcp,QmPADQqZJQ4cw1ecdMC2wR7NwFCdk7MYzvmyP62nbfGk7E fetchai/connections/webhook,QmWcm3WGxcm5JvhuYRyauQp5wmzFAkV61e2aYpDvYmNvWd From 8d3db2aab1063f9878d2a3fb89c638f3b18a1744 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 17:55:32 +0100 Subject: [PATCH 128/131] prep develop for release 0.6.2 --- HISTORY.md | 15 +++++++++++++++ aea/__version__.py | 2 +- benchmark/run_from_branch.sh | 2 +- deploy-image/docker-env.sh | 2 +- develop-image/docker-env.sh | 2 +- docs/acn.md | 1 - docs/quickstart.md | 4 ++-- docs/upgrading.md | 4 ++++ .../test_bash_yaml/md_files/bash-quickstart.md | 4 ++-- 9 files changed, 27 insertions(+), 9 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 9668f9fbd4..9d22b1514c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,20 @@ # Release History +## 0.6.2 (2020-10-01) + +- Adds MultiAgentManager to manage multiple agent projects programmatically +- Improves SOEF connection reliability on unregister +- Extends configuration classes to handle overriding configurations programmatically +- Fixes Multiplexer termination errors +- Allow finger-grained override of component configurations from aea-config +- Fixes tac controller to work with Ethereum contracts again +- Fixes to multiple deploy and development scripts +- Introduces isort to development dependencies for automated import sorting +- Adds reset password command to CLI +- Adds additional docstring linters for improved api documentation checks +- Multiple docs updates including additional explanations of ACN architecture +- Multiple additional tests and test stability fixes + ## 0.6.1 (2020-09-17) - Adds a standalone script to deploy an ACN node diff --git a/aea/__version__.py b/aea/__version__.py index 254b018066..5a9f575037 100644 --- a/aea/__version__.py +++ b/aea/__version__.py @@ -22,7 +22,7 @@ __title__ = "aea" __description__ = "Autonomous Economic Agent framework" __url__ = "https://github.com/fetchai/agents-aea.git" -__version__ = "0.6.1" +__version__ = "0.6.2" __author__ = "Fetch.AI Limited" __license__ = "Apache-2.0" __copyright__ = "2019 Fetch.AI Limited" diff --git a/benchmark/run_from_branch.sh b/benchmark/run_from_branch.sh index 0027e2644c..f5bc0a4d35 100755 --- a/benchmark/run_from_branch.sh +++ b/benchmark/run_from_branch.sh @@ -12,7 +12,7 @@ pip install pipenv # this is to install benchmark dependencies pipenv install --dev --skip-lock # this is to install the AEA in the Pipenv virtual env -pipenv run pip install --upgrade aea[all]=="0.6.1" +pipenv run pip install --upgrade aea[all]=="0.6.2" chmod +x benchmark/checks/run_benchmark.sh echo "Start the experiments." diff --git a/deploy-image/docker-env.sh b/deploy-image/docker-env.sh index cc70ac7041..7279162c26 100755 --- a/deploy-image/docker-env.sh +++ b/deploy-image/docker-env.sh @@ -1,7 +1,7 @@ #!/bin/bash # Swap the following lines if you want to work with 'latest' -DOCKER_IMAGE_TAG=aea-deploy:0.6.1 +DOCKER_IMAGE_TAG=aea-deploy:0.6.2 # DOCKER_IMAGE_TAG=aea-deploy:latest DOCKER_BUILD_CONTEXT_DIR=.. diff --git a/develop-image/docker-env.sh b/develop-image/docker-env.sh index 2b49119402..e9010daaca 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=aea-develop:0.6.1 +DOCKER_IMAGE_TAG=aea-develop:0.6.2 # DOCKER_IMAGE_TAG=aea-develop:latest DOCKER_BUILD_CONTEXT_DIR=.. diff --git a/docs/acn.md b/docs/acn.md index 5929eaf79d..d903ccaa6f 100644 --- a/docs/acn.md +++ b/docs/acn.md @@ -7,7 +7,6 @@ Agents need to contact each others. Given the wallet address of a target agent, The properties we would like to have are: - Reliability: with guarantees on message reception -- Security: no third-party can tamper with the message - Authentication: to prevent impersonation - Confidentiality: to prevent exposing sensitive information within the message - Availability: some guarantees about the liveness of the service (tampering detection) diff --git a/docs/quickstart.md b/docs/quickstart.md index 42f57ff4ad..6c7729d9d5 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -86,7 +86,7 @@ Confirm password: / ___ \ | |___ / ___ \ /_/ \_\|_____|/_/ \_\ -v0.6.1 +v0.6.2 AEA configurations successfully initialized: {'author': 'fetchai'} ``` @@ -175,7 +175,7 @@ You will see the echo skill running in the terminal window. / ___ \ | |___ / ___ \ /_/ \_\|_____|/_/ \_\ -v0.6.1 +v0.6.2 Starting AEA 'my_first_aea' in 'async' mode ... info: Echo Handler: setup method called. diff --git a/docs/upgrading.md b/docs/upgrading.md index ec0120a156..1142a43044 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -1,5 +1,9 @@ This page provides some tipps of how to upgrade between versions. +## v0.6.1 to v0.6.2 + +No public APIs have been changed. + ## v0.6.0 to v0.6.1 The `soef` connection and `oef_search` protocol have backward incompatible changes. 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 e81c856ac9..8a9bfd9c2b 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 @@ -36,7 +36,7 @@ Confirm password: / ___ \ | |___ / ___ \ /_/ \_\|_____|/_/ \_\ -v0.6.1 +v0.6.2 AEA configurations successfully initialized: {'author': 'fetchai'} ``` @@ -70,7 +70,7 @@ aea run --connections fetchai/stub:0.10.0 / ___ \ | |___ / ___ \ /_/ \_\|_____|/_/ \_\ -v0.6.1 +v0.6.2 Starting AEA 'my_first_aea' in 'async' mode ... info: Echo Handler: setup method called. From 788c97ef51817ebff8e20f6ee362bc8fc48247eb Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 18:09:58 +0100 Subject: [PATCH 129/131] add missing release details --- HISTORY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.md b/HISTORY.md index 9d22b1514c..09f840efb2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -11,6 +11,7 @@ - Fixes to multiple deploy and development scripts - Introduces isort to development dependencies for automated import sorting - Adds reset password command to CLI +- Adds support for abbreviated public ids (latest) to CLI and configurations - Adds additional docstring linters for improved api documentation checks - Multiple docs updates including additional explanations of ACN architecture - Multiple additional tests and test stability fixes From 1aa7951ceeabcadf62017ab9b87cfe1822985a96 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 18:10:39 +0100 Subject: [PATCH 130/131] add missing release details 2 --- HISTORY.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 09f840efb2..ac78542d04 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,10 +5,11 @@ - Adds MultiAgentManager to manage multiple agent projects programmatically - Improves SOEF connection reliability on unregister - Extends configuration classes to handle overriding configurations programmatically +- Improves configuration schemas and validations - Fixes Multiplexer termination errors -- Allow finger-grained override of component configurations from aea-config +- Allow finer-grained override of component configurations from aea-config - Fixes tac controller to work with Ethereum contracts again -- Fixes to multiple deploy and development scripts +- Fixes multiple deploy and development scripts - Introduces isort to development dependencies for automated import sorting - Adds reset password command to CLI - Adds support for abbreviated public ids (latest) to CLI and configurations From b0f98322860713363a30578168d07968edd78b0c Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 1 Oct 2020 20:43:18 +0100 Subject: [PATCH 131/131] fix mkdocs doc paths --- mkdocs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index d68fc85c12..7c02d4ccc0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -107,6 +107,7 @@ nav: - Common: 'api/common.md' - Exceptions: 'api/exceptions.md' - Launcher: 'api/launcher.md' + - Manager: 'api/manager.md' - Multiplexer: 'api/multiplexer.md' - Runner: 'api/runner.md' - Runtime: 'api/runtime.md' @@ -117,6 +118,7 @@ nav: - Base: 'api/configurations/base.md' - Constants: 'api/configurations/constants.md' - Loader: 'api/configurations/loader.md' + - Project: 'api/configurations/project.md' - Pypi: 'api/configurations/pypi.md' - Connections: - Base: 'api/connections/base.md'