diff --git a/aea/helpers/dialogue/base.py b/aea/helpers/dialogue/base.py index 9632596dde..acf8a4c0e3 100644 --- a/aea/helpers/dialogue/base.py +++ b/aea/helpers/dialogue/base.py @@ -152,10 +152,9 @@ def __init__( """ Initialize a dialogue. - :param dialogue_label: the identifier of the dialogue - :param agent_address: the address of the agent for whom this dialogue is maintained - :param role: the role of the agent this dialogue is maintained for - :param rules: the rules of the dialogue + :param initial_performatives: the set of all initial performatives. + :param terminal_performatives: the set of all terminal performatives. + :param valid_replies: the reply structure of speech-acts. :return: None """ @@ -661,7 +660,7 @@ def update(self, message: Message) -> Optional[Dialogue]: """ Update the state of dialogues with a new message. - If the message is for a new dialogue, a new dialogue is created with 'message' as its first message and returned. + If the message is for a new dialogue, a new dialogue is created with 'message' as its first message, and returned. If the message is addressed to an existing dialogue, the dialogue is retrieved, extended with this message and returned. If there are any errors, e.g. the message dialogue reference does not exists or the message is invalid w.r.t. the dialogue, return None. @@ -697,6 +696,14 @@ def update(self, message: Message) -> Optional[Dialogue]: dialogue = self.get_dialogue(message) if dialogue is not None: + if message.counterparty is None: + message.counterparty = dialogue.dialogue_label.dialogue_opponent_addr + else: + assert ( + message.counterparty + == dialogue.dialogue_label.dialogue_opponent_addr + ), "The counterparty specified in the message is different from the opponent in this dialogue." + dialogue.update(message) result = dialogue # type: Optional[Dialogue] else: # couldn't find the dialogue diff --git a/aea/protocols/default/dialogues.py b/aea/protocols/default/dialogues.py index c8ebb9e12e..e833fdd5e3 100644 --- a/aea/protocols/default/dialogues.py +++ b/aea/protocols/default/dialogues.py @@ -49,7 +49,7 @@ class DefaultDialogue(Dialogue): DefaultMessage.Performative.ERROR: frozenset(), } - class AgentRole(Dialogue.Role): + class Role(Dialogue.Role): """This class defines the agent's role in a default dialogue.""" AGENT = "agent" diff --git a/aea/protocols/default/protocol.yaml b/aea/protocols/default/protocol.yaml index 595541f926..a079cd48a8 100644 --- a/aea/protocols/default/protocol.yaml +++ b/aea/protocols/default/protocol.yaml @@ -9,7 +9,7 @@ fingerprint: custom_types.py: QmRcgwDdTxkSHyfF9eoMtsb5P5GJDm4oyLq5W6ZBko1MFU default.proto: QmNzMUvXkBm5bbitR5Yi49ADiwNn1FhCvXqSKKoqAPZyXv default_pb2.py: QmSRFi1s3jcqnPuk4yopJeNuC6o58RL7dvEdt85uns3B3N - dialogues.py: QmQGK4MLsyyGPTU9hmfABGgak9P3avmYVdttzZRqZVjqcK + dialogues.py: QmP2K2GZedU4o9khkdeB3LCGxxZek7TiT8jJnmcvWAh11j message.py: QmapJFvDxeyrM7c5yGwxH1caREkJwaJ6MGmD71FrjUfLZR serialization.py: QmRnajc9BNCftjGkYTKCP9LnD3rq197jM3Re1GDVJTHh2y fingerprint_ignore_patterns: [] diff --git a/aea/protocols/generator/base.py b/aea/protocols/generator/base.py index 910d6f6dac..46d32d4de8 100644 --- a/aea/protocols/generator/base.py +++ b/aea/protocols/generator/base.py @@ -931,7 +931,7 @@ def _agent_role_enum_str(self) -> str: :return: the agent role Enum string """ - enum_str = self.indent + "class AgentRole(Dialogue.Role):\n" + enum_str = self.indent + "class Role(Dialogue.Role):\n" self._change_indent(1) enum_str += ( self.indent @@ -2017,14 +2017,14 @@ def generate_full_mode(self) -> None: self._serialization_class_str(), ) - # Run black formatting - try_run_black_formatting(self.path_to_generated_protocol_package) - # Run protocol buffer compiler try_run_protoc( self.path_to_generated_protocol_package, self.protocol_specification.name ) + # Run black formatting + try_run_black_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( diff --git a/aea/protocols/generator/extract_specification.py b/aea/protocols/generator/extract_specification.py index fe180eafca..e3f42cf45c 100644 --- a/aea/protocols/generator/extract_specification.py +++ b/aea/protocols/generator/extract_specification.py @@ -254,7 +254,7 @@ def extract( roles_set = cast( Dict[str, None], protocol_specification.dialogue_config["roles"] ) - spec.roles = sorted(roles_set, reverse=True) + spec.roles = sorted(roles_set) spec.end_states = cast( List[str], protocol_specification.dialogue_config["end_states"] ) diff --git a/docs/thermometer-skills-step-by-step.md b/docs/thermometer-skills-step-by-step.md index e2fbe9a27c..711f681e00 100644 --- a/docs/thermometer-skills-step-by-step.md +++ b/docs/thermometer-skills-step-by-step.md @@ -792,7 +792,7 @@ class Dialogues(Model, FipaDialogues): :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.SELLER + return FipaDialogue.Role.SELLER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, @@ -1607,7 +1607,7 @@ class Dialogues(Model, FipaDialogues): :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.BUYER + return FipaDialogue.Role.BUYER def _create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/protocols/fipa/dialogues.py b/packages/fetchai/protocols/fipa/dialogues.py index 0b5c117668..22e10d0808 100644 --- a/packages/fetchai/protocols/fipa/dialogues.py +++ b/packages/fetchai/protocols/fipa/dialogues.py @@ -82,11 +82,11 @@ class FipaDialogue(Dialogue): ), } - class AgentRole(Dialogue.Role): + class Role(Dialogue.Role): """This class defines the agent's role in a fipa dialogue.""" - SELLER = "seller" BUYER = "buyer" + SELLER = "seller" class EndState(Dialogue.EndState): """This class defines the end states of a fipa dialogue.""" diff --git a/packages/fetchai/protocols/fipa/protocol.yaml b/packages/fetchai/protocols/fipa/protocol.yaml index e63516e177..0a1231400b 100644 --- a/packages/fetchai/protocols/fipa/protocol.yaml +++ b/packages/fetchai/protocols/fipa/protocol.yaml @@ -7,7 +7,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmZuv8RGegxunYaJ7sHLwj2oLLCFCAGF139b8DxEY68MRT custom_types.py: Qmb7bzEUAW74ZeSFqL7sTccNCjudStV63K4CFNZtibKUHB - dialogues.py: QmXBXE895ABocddgmiH51XHT2ZEEvaHJTvNfBM6csrJin9 + dialogues.py: QmYcgipy556vUs74sC9CsckBbPCYSMsiR36Z8TCPVkEkpq fipa.proto: QmP7JqnuQSQ9BDcKkscrTydKEX4wFBoyFaY1bkzGkamcit fipa_pb2.py: QmZMkefJLrb3zJKoimb6a9tdpxDBhc8rR2ghimqg7gZ471 message.py: QmeQiZadU2g6T4hw4mXkNLLBirVdPmJUQjTwA6wVv9hrbn diff --git a/packages/fetchai/protocols/gym/dialogues.py b/packages/fetchai/protocols/gym/dialogues.py index 84751fcdf6..f21f745b90 100644 --- a/packages/fetchai/protocols/gym/dialogues.py +++ b/packages/fetchai/protocols/gym/dialogues.py @@ -59,11 +59,11 @@ class GymDialogue(Dialogue): ), } - class AgentRole(Dialogue.Role): + class Role(Dialogue.Role): """This class defines the agent's role in a gym dialogue.""" - ENVIRONMENT = "environment" AGENT = "agent" + ENVIRONMENT = "environment" class EndState(Dialogue.EndState): """This class defines the end states of a gym dialogue.""" diff --git a/packages/fetchai/protocols/gym/protocol.yaml b/packages/fetchai/protocols/gym/protocol.yaml index 4d35b1f676..287ca939bf 100644 --- a/packages/fetchai/protocols/gym/protocol.yaml +++ b/packages/fetchai/protocols/gym/protocol.yaml @@ -7,7 +7,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmWBvruqGuU2BVCq8cuP1S3mgvuC78yrG4TdtSvKhCT8qX custom_types.py: QmfDaswopanUqsETQXMatKfwwDSSo7q2Edz9MXGimT5jbf - dialogues.py: QmULPS7NXpedqtxocguYgvRd9TbxEJTxCGxDBszse3xB5f + dialogues.py: QmWJv1gRNvqkFGyx9FGkhhorymD5javXuBA8HwQ6z9BLPw gym.proto: QmQGF9Xz4Z93wmhdKoztzxjo5pS4SsAWe2TQdvZCLuzdGC gym_pb2.py: QmSTz7xrL8ryqzR1Sgu1NpR6PmW7GUhBGnN2qYc8m8NCcN message.py: QmaiYJbphafhurv7cYCLfJLY4hHCTzyqWz2r8YRJngkpq4 diff --git a/packages/fetchai/protocols/http/dialogues.py b/packages/fetchai/protocols/http/dialogues.py index 265c7145de..a6d3ae9f6c 100644 --- a/packages/fetchai/protocols/http/dialogues.py +++ b/packages/fetchai/protocols/http/dialogues.py @@ -46,11 +46,11 @@ class HttpDialogue(Dialogue): HttpMessage.Performative.RESPONSE: frozenset(), } - class AgentRole(Dialogue.Role): + class Role(Dialogue.Role): """This class defines the agent's role in a http dialogue.""" - SERVER = "server" CLIENT = "client" + SERVER = "server" class EndState(Dialogue.EndState): """This class defines the end states of a http dialogue.""" diff --git a/packages/fetchai/protocols/http/protocol.yaml b/packages/fetchai/protocols/http/protocol.yaml index d611ab35a4..d8d83b2cca 100644 --- a/packages/fetchai/protocols/http/protocol.yaml +++ b/packages/fetchai/protocols/http/protocol.yaml @@ -6,7 +6,7 @@ license: Apache-2.0 aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmRWie4QPiFJE8nK4fFJ6prqoG3u36cPo7st5JUZAGpVWv - dialogues.py: Qmeb3u3X3954KLCV1LMnHS3Uvqxq3Mpp7fwrYtKsiwkGZS + dialogues.py: QmYXrUN76rptudYbvdZwzf4DRPN2HkuG67mkxvzznLBvao http.proto: QmdTUTvvxGxMxSTB67AXjMUSDLdsxBYiSuJNVxHuLKB1jS http_pb2.py: QmYYKqdwiueq54EveL9WXn216FXLSQ6XGJJHoiJxwJjzHC message.py: QmX1rFsvggjpHcujLhB3AZRJpUWpEsf9gG6M2A2qdg6FVY diff --git a/packages/fetchai/protocols/ml_trade/dialogues.py b/packages/fetchai/protocols/ml_trade/dialogues.py index 8319572319..263794b3c9 100644 --- a/packages/fetchai/protocols/ml_trade/dialogues.py +++ b/packages/fetchai/protocols/ml_trade/dialogues.py @@ -50,11 +50,11 @@ class MlTradeDialogue(Dialogue): ), } - class AgentRole(Dialogue.Role): + class Role(Dialogue.Role): """This class defines the agent's role in a ml_trade dialogue.""" - SELLER = "seller" BUYER = "buyer" + SELLER = "seller" class EndState(Dialogue.EndState): """This class defines the end states of a ml_trade dialogue.""" diff --git a/packages/fetchai/protocols/ml_trade/protocol.yaml b/packages/fetchai/protocols/ml_trade/protocol.yaml index 41434e02bf..4036832a27 100644 --- a/packages/fetchai/protocols/ml_trade/protocol.yaml +++ b/packages/fetchai/protocols/ml_trade/protocol.yaml @@ -7,7 +7,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmXZMVdsBXUJxLZvwwhWBx58xfxMSyoGxdYp5Aeqmzqhzt custom_types.py: QmPa6mxbN8WShsniQxJACfzAPRjGzYLbUFGoVU4N9DewUw - dialogues.py: Qmc6KMkEK2U3uTNGe6m8GTCWmcq6VyisE5jpmnrVjrpMdo + dialogues.py: QmZFztFu4LxHdsJZpSHizELFStHtz2ZGfQBx9cnP7gHHWf message.py: QmdCpkebeDrFZk4R7S2mrX2KMCDgo8JV78Hj6jb6sA5EL4 ml_trade.proto: QmeB21MQduEGQCrtiYZQzPpRqHL4CWEkvvcaKZ9GsfE8f6 ml_trade_pb2.py: QmZVvugPysR1og6kWCJkvo3af2s9pQRHfuj4BptE7gU1EU diff --git a/packages/fetchai/protocols/oef_search/dialogues.py b/packages/fetchai/protocols/oef_search/dialogues.py index c7924310c5..90daad5cef 100644 --- a/packages/fetchai/protocols/oef_search/dialogues.py +++ b/packages/fetchai/protocols/oef_search/dialogues.py @@ -67,11 +67,11 @@ class OefSearchDialogue(Dialogue): ), } - class AgentRole(Dialogue.Role): + class Role(Dialogue.Role): """This class defines the agent's role in a oef_search dialogue.""" - OEF_NODE = "oef_node" AGENT = "agent" + OEF_NODE = "oef_node" class EndState(Dialogue.EndState): """This class defines the end states of a oef_search dialogue.""" diff --git a/packages/fetchai/protocols/oef_search/protocol.yaml b/packages/fetchai/protocols/oef_search/protocol.yaml index c8b1862117..490c926f6d 100644 --- a/packages/fetchai/protocols/oef_search/protocol.yaml +++ b/packages/fetchai/protocols/oef_search/protocol.yaml @@ -7,7 +7,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmRvTtynKcd7shmzgf8aZdcA5witjNL5cL2a7WPgscp7wq custom_types.py: QmR4TS6KhXpRtGqq78B8mXMiiFXcFe7JEkxB7jHvqPVkgD - dialogues.py: QmSGsvdok4AxLa24zRMjRxwFDwV5ZKhdEeUyvkj8tkzxBs + dialogues.py: QmQyUVWzX8uMq48sWU6pUBazk7UiTMhydLDVLWQs9djY6v message.py: QmY5qSJawsgmcKZ3dDBij9s4hN41BpnhbzTtVkRaQdT6QU oef_search.proto: QmRg28H6bNo1PcyJiKLYjHe6FCwtE6nJ43DeJ4RFTcHm68 oef_search_pb2.py: Qmd6S94v2GuZ2ffDupTa5ESBx4exF9dgoV8KcYtJVL6KhN diff --git a/packages/fetchai/protocols/tac/dialogues.py b/packages/fetchai/protocols/tac/dialogues.py index a38190946a..e26f2853ae 100644 --- a/packages/fetchai/protocols/tac/dialogues.py +++ b/packages/fetchai/protocols/tac/dialogues.py @@ -68,7 +68,7 @@ class TacDialogue(Dialogue): ), } - class AgentRole(Dialogue.Role): + class Role(Dialogue.Role): """This class defines the agent's role in a tac dialogue.""" CONTROLLER = "controller" diff --git a/packages/fetchai/protocols/tac/protocol.yaml b/packages/fetchai/protocols/tac/protocol.yaml index a59d009892..71572ba34b 100644 --- a/packages/fetchai/protocols/tac/protocol.yaml +++ b/packages/fetchai/protocols/tac/protocol.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmZYdAjm3o44drRiY3MT4RtG2fFLxtaL8h898DmjoJwJzV custom_types.py: QmXQATfnvuCpt4FicF4QcqCcLj9PQNsSHjCBvVQknWpyaN - dialogues.py: QmUnYHa9zjDidpcBEDDZDJYm7VPrkwy9uhUAqhgJShRP9F + dialogues.py: QmPgpHYgGMvhs11j1mwfMLyBwY8njfMkFNa11JVvyUnb8V message.py: QmSwTV913SRq1AcJP6NTwkBRx6JS6Jt89LNJFwHB7dpo6m serialization.py: QmYfsDQXv8j3CyQgQqv77CYLfu9WeNFSGgfhhVzLcPbJpj tac.proto: QmedPvKHu387gAsdxTDLWgGcCucYXEfCaTiLJbTJPRqDkR diff --git a/packages/fetchai/skills/carpark_client/dialogues.py b/packages/fetchai/skills/carpark_client/dialogues.py index 0ccee4d377..19b0346702 100644 --- a/packages/fetchai/skills/carpark_client/dialogues.py +++ b/packages/fetchai/skills/carpark_client/dialogues.py @@ -80,10 +80,10 @@ def role_from_first_message(message: Message) -> Dialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.BUYER + return FipaDialogue.Role.BUYER def create_dialogue( - self, dialogue_label: BaseDialogueLabel, role: Dialogue.Role, + self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, ) -> Dialogue: """ Create an instance of dialogue. diff --git a/packages/fetchai/skills/carpark_client/skill.yaml b/packages/fetchai/skills/carpark_client/skill.yaml index 3a14bc389c..fc7bb6643e 100644 --- a/packages/fetchai/skills/carpark_client/skill.yaml +++ b/packages/fetchai/skills/carpark_client/skill.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmPZ4bRmXpsDKD7ogCJHEMrtm67hpA5aqxvujgfQD1PtMd behaviours.py: QmboDuRrgmmFgfWkfvc5GwyYeAmSsJ8AXphhHvmMgMNpBY - dialogues.py: QmfDdymVydk8keq16GZs1WnH6GLA5EWy38qADPJH6ptoZu + dialogues.py: QmbYXfiXZ8ZikudgFVauvGrDRat8E8g5oJX4kETiLow1CM handlers.py: QmYBNetL1Afyq3TgwEibHFzph4j4bxGCtoyeBtFmDLeeeB strategy.py: QmTBPEseQV8KVTTTfGx2eXoUqR5mkcNtAhFwqpKAwXjNdG fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/carpark_detection/dialogues.py b/packages/fetchai/skills/carpark_detection/dialogues.py index 7e5646372f..3c7d9b1713 100644 --- a/packages/fetchai/skills/carpark_detection/dialogues.py +++ b/packages/fetchai/skills/carpark_detection/dialogues.py @@ -81,7 +81,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.SELLER + return FipaDialogue.Role.SELLER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/carpark_detection/skill.yaml b/packages/fetchai/skills/carpark_detection/skill.yaml index 363b429010..6cb656adfe 100644 --- a/packages/fetchai/skills/carpark_detection/skill.yaml +++ b/packages/fetchai/skills/carpark_detection/skill.yaml @@ -10,7 +10,7 @@ fingerprint: behaviours.py: QmepjZcV5PVT5a9S8cGSAkR8tqPDD6dhGgELywDJUQyqTR carpark_detection_data_model.py: QmZej7YGMXhNAgYG53pio7ifgPhH9giTbwkV1xdpMRyRgr detection_database.py: QmVUoN2cuAE54UPvSBRFArdGmVzoSuEjrJXiVkGcfwHrvb - dialogues.py: QmXvtptqguRrfHxRpQT9gQYE85x7KLyALmV6Wd7r8ipXxc + dialogues.py: QmPabA5pC1DP6Syfjs3Z9v99apzq1oErprTabFGpYpd4rH handlers.py: QmaMGQv42116aunu21zKLyCETPsVYa1FBDn6x6XMZis1aW strategy.py: QmcFQ9QymhW2SRczxiicsgJbUt2PyqZdb3rmQ3ueqWUmzq fingerprint_ignore_patterns: diff --git a/packages/fetchai/skills/erc1155_client/dialogues.py b/packages/fetchai/skills/erc1155_client/dialogues.py index 3c62bc1e5b..a36a22eed5 100644 --- a/packages/fetchai/skills/erc1155_client/dialogues.py +++ b/packages/fetchai/skills/erc1155_client/dialogues.py @@ -91,7 +91,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.BUYER + return FipaDialogue.Role.BUYER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/erc1155_client/skill.yaml b/packages/fetchai/skills/erc1155_client/skill.yaml index d3bfa1fcd9..ed98490d19 100644 --- a/packages/fetchai/skills/erc1155_client/skill.yaml +++ b/packages/fetchai/skills/erc1155_client/skill.yaml @@ -7,7 +7,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmRXXJsv5bfvb7qsyxQtVzXwn6PMLJKkbm6kg4DNkT1NtW behaviours.py: QmZjPpSukWHJd4FZdxZgVSHzLpMQDEdXgJVTEzNfjbtiQX - dialogues.py: QmWdJrmE9UZ4G3L3LWoaPFNCBG9WA9xcrFkZRkcCSiHG2j + dialogues.py: Qmbemx2zQTjGWyZJ5AvM4ojLfUG5oMm3n5nmLwLgw6DFUT handlers.py: QmZVi3EQiuQPYRqZLfZK5DGvzJciqPgN1p26Z4TdUkh3aj strategy.py: Qme3Ck9KfWPWXRhV1GvHfYL65VapShETK8jyJqs3a2HBR5 fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/erc1155_deploy/dialogues.py b/packages/fetchai/skills/erc1155_deploy/dialogues.py index 74ceab366a..25392582b6 100644 --- a/packages/fetchai/skills/erc1155_deploy/dialogues.py +++ b/packages/fetchai/skills/erc1155_deploy/dialogues.py @@ -91,7 +91,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.SELLER + return FipaDialogue.Role.SELLER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/erc1155_deploy/skill.yaml b/packages/fetchai/skills/erc1155_deploy/skill.yaml index 15e3dcd743..86224cda05 100644 --- a/packages/fetchai/skills/erc1155_deploy/skill.yaml +++ b/packages/fetchai/skills/erc1155_deploy/skill.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: Qmbm3ZtGpfdvvzqykfRqbaReAK9a16mcyK7qweSfeN5pq1 behaviours.py: QmfVhsodjSXefvHcxqnE8mZeWYP3cLewwgBjk2UkTjtZvz - dialogues.py: QmPwjeYetp1QRe9jiRgrbRY94sT9KgLEXxd41xJJJGUqgH + dialogues.py: QmWHrE6cNNxH9uFa3qrKGdVpQ2dzzsix92EkhZUptbdPh2 handlers.py: QmUebHTe1kE3cwH7TyW8gt9xm4aT7D9gE5S6mRJwBYXCde strategy.py: QmXUq6w8w5NX9ryVr4uJyNgFL3KPzD6EbWNYbfXXqWAxGK fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/generic_buyer/dialogues.py b/packages/fetchai/skills/generic_buyer/dialogues.py index e0e95c4c53..8b72a88bd6 100644 --- a/packages/fetchai/skills/generic_buyer/dialogues.py +++ b/packages/fetchai/skills/generic_buyer/dialogues.py @@ -80,7 +80,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.BUYER + return FipaDialogue.Role.BUYER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/generic_buyer/skill.yaml b/packages/fetchai/skills/generic_buyer/skill.yaml index 2265c87efd..74495a7818 100644 --- a/packages/fetchai/skills/generic_buyer/skill.yaml +++ b/packages/fetchai/skills/generic_buyer/skill.yaml @@ -7,7 +7,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmaEDrNJBeHCJpbdFckRUhLSBqCXQ6umdipTMpYhqSKxSG behaviours.py: QmRgSkJYi1WkoCTNNVv28NMhWVn5ptASmSvj2ArpTkfpis - dialogues.py: QmPbjpgXJ2njh1podEpHhAyAVLjUZ3i8xHy4mXGip7K6Dp + dialogues.py: QmSSvLAKmPTHnWLKJkjNtTm3LjwDeVjFW8RNi7mUKeR2p5 handlers.py: QmcRz2BV35T6bUkJLxFzd6tgzqRk722K6yeSvMmGL1neK2 strategy.py: QmQF5YhSM4BbadrfggAeaoLDYPkSDscEPKj5agPWcuBTwH fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/generic_seller/dialogues.py b/packages/fetchai/skills/generic_seller/dialogues.py index 327b22aa78..f21add2fbb 100644 --- a/packages/fetchai/skills/generic_seller/dialogues.py +++ b/packages/fetchai/skills/generic_seller/dialogues.py @@ -81,7 +81,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.SELLER + return FipaDialogue.Role.SELLER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/generic_seller/skill.yaml b/packages/fetchai/skills/generic_seller/skill.yaml index 5f77922198..b4c7dd0269 100644 --- a/packages/fetchai/skills/generic_seller/skill.yaml +++ b/packages/fetchai/skills/generic_seller/skill.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmbfkeFnZVKppLEHpBrTXUXBwg2dpPABJWSLND8Lf1cmpG behaviours.py: QmRcbkDFZoFRvheDXQj71FR8qW4hkCM1uVjN4rg6TaZdgs - dialogues.py: QmYox8f4LBUQAEJjUELTFA7xgLqiFuk8mFCStMj2mgqxV1 + dialogues.py: QmQoDL8EshnSTMh8w8bFsi2yexFG28tkmtaKEej3LkaGDW handlers.py: QmRoQqFQFUYYdaq77S9319Xn329n1f9drFKGxwLg57Tm35 strategy.py: QmTQgnXKzAuoXAiU6JnYzhLswo2g15fxV73yguXMbHXQvf fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/tac_negotiation/dialogues.py b/packages/fetchai/skills/tac_negotiation/dialogues.py index e9194311ba..e53143567a 100644 --- a/packages/fetchai/skills/tac_negotiation/dialogues.py +++ b/packages/fetchai/skills/tac_negotiation/dialogues.py @@ -83,7 +83,5 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: is_seller = ( query.model.name == DEMAND_DATAMODEL_NAME ) # the agent is querying for demand/buyers (this agent is sending the CFP so it is the seller) - role = ( - FipaDialogue.AgentRole.SELLER if is_seller else FipaDialogue.AgentRole.BUYER - ) + role = FipaDialogue.Role.SELLER if is_seller else FipaDialogue.Role.BUYER return role diff --git a/packages/fetchai/skills/tac_negotiation/handlers.py b/packages/fetchai/skills/tac_negotiation/handlers.py index 63d13fa6fd..cdb35dccdb 100644 --- a/packages/fetchai/skills/tac_negotiation/handlers.py +++ b/packages/fetchai/skills/tac_negotiation/handlers.py @@ -131,7 +131,7 @@ def _on_cfp(self, cfp: FipaMessage, dialogue: Dialogue) -> None: query = cast(Query, cfp.query) strategy = cast(Strategy, self.context.strategy) proposal_description = strategy.get_proposal_for_query( - query, cast(Dialogue.AgentRole, dialogue.role) + query, cast(Dialogue.Role, dialogue.role) ) if proposal_description is None: @@ -167,7 +167,7 @@ def _on_cfp(self, cfp: FipaMessage, dialogue: Dialogue) -> None: TransactionMessage.Performative.PROPOSE_FOR_SIGNING, proposal_description, dialogue.dialogue_label, - cast(Dialogue.AgentRole, dialogue.role), + cast(Dialogue.Role, dialogue.role), self.context.agent_address, ) transactions.add_pending_proposal( @@ -220,12 +220,12 @@ def _on_propose(self, propose: FipaMessage, dialogue: Dialogue) -> None: TransactionMessage.Performative.PROPOSE_FOR_SIGNING, proposal_description, dialogue.dialogue_label, - cast(Dialogue.AgentRole, dialogue.role), + cast(Dialogue.Role, dialogue.role), self.context.agent_address, ) if strategy.is_profitable_transaction( - transaction_msg, role=cast(Dialogue.AgentRole, dialogue.role) + transaction_msg, role=cast(Dialogue.Role, dialogue.role) ): self.context.logger.info( "[{}]: Accepting propose (as {}).".format( @@ -233,7 +233,7 @@ def _on_propose(self, propose: FipaMessage, dialogue: Dialogue) -> None: ) ) transactions.add_locked_tx( - transaction_msg, role=cast(Dialogue.AgentRole, dialogue.role) + transaction_msg, role=cast(Dialogue.Role, dialogue.role) ) transactions.add_pending_initial_acceptance( dialogue.dialogue_label, new_msg_id, transaction_msg @@ -331,7 +331,7 @@ def _on_accept(self, accept: FipaMessage, dialogue: Dialogue) -> None: strategy = cast(Strategy, self.context.strategy) if strategy.is_profitable_transaction( - transaction_msg, role=cast(Dialogue.AgentRole, dialogue.role) + transaction_msg, role=cast(Dialogue.Role, dialogue.role) ): self.context.logger.info( "[{}]: locking the current state (as {}).".format( @@ -339,7 +339,7 @@ def _on_accept(self, accept: FipaMessage, dialogue: Dialogue) -> None: ) ) transactions.add_locked_tx( - transaction_msg, role=cast(Dialogue.AgentRole, dialogue.role) + transaction_msg, role=cast(Dialogue.Role, dialogue.role) ) if strategy.is_contract_tx: contract = cast(ERC1155Contract, self.context.contracts.erc1155) diff --git a/packages/fetchai/skills/tac_negotiation/skill.yaml b/packages/fetchai/skills/tac_negotiation/skill.yaml index f4d16ea29b..ff84793dc6 100644 --- a/packages/fetchai/skills/tac_negotiation/skill.yaml +++ b/packages/fetchai/skills/tac_negotiation/skill.yaml @@ -8,14 +8,14 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmcgZLvHebdfocqBmbu6gJp35khs6nbdbC649jzUyS86wy behaviours.py: QmSgtvb4rD4RZ5H2zQQqPUwBzAeoR6ZBTJ1p33YqL5XjMe - dialogues.py: QmSVqtbxZvy3R5oJXATHpkjnNekMqHbPY85dTf3f6LqHYs - handlers.py: QmapDkx39VBUsNxcUwjUj1tyPuVnPxE9huNvHhbgcge4QM + dialogues.py: QmZe9PJncaWzJ4yn9b76Mm5R93VLNxGVd5ogUWhfp8Q6km + handlers.py: QmQ2DFUyPbhPQHTnZ57X7dNquc6nuSujChH3UfaAkzQW5Y helpers.py: QmXa3aD15jcv3NiEAcTjqrKNHv7U1ZQfES9siknL1kLtbV registration.py: QmexnkCCmyiFpzM9bvXNj5uQuxQ2KfBTUeMomuGN9ccP7g search.py: QmSTtMm4sHUUhUFsQzufHjKihCEVe5CaU5MGjhzSdPUzDT - strategy.py: QmTK9wqubsgBm18Us3UzKNFckmjSprC1dtV7JtFPWGKVgz + strategy.py: QmULTdqKdZsjAKvBR2CEcq18ej7r2tWiiwbmjfDZawSTcP tasks.py: QmbAUngTeyH1agsHpzryRQRFMwoWDmymaQqeKeC3TZCPFi - transactions.py: QmdD4b9Zzh5QoZpPtPNvfU5RmbsYdFFwhS9z5qprsiBt4z + transactions.py: QmV539r7VkZGByob82efqXDsuJtDtLkTEiiEHsHsH9nLu9 fingerprint_ignore_patterns: [] contracts: - fetchai/erc1155:0.5.0 diff --git a/packages/fetchai/skills/tac_negotiation/strategy.py b/packages/fetchai/skills/tac_negotiation/strategy.py index 8430dfe407..a1a850d4b7 100644 --- a/packages/fetchai/skills/tac_negotiation/strategy.py +++ b/packages/fetchai/skills/tac_negotiation/strategy.py @@ -222,7 +222,7 @@ def _get_proposal_for_query( return random.choice(proposals) # nosec def get_proposal_for_query( - self, query: Query, role: Dialogue.AgentRole + self, query: Query, role: Dialogue.Role ) -> Optional[Description]: """ Generate proposal (in the form of a description) which matches the query. @@ -232,7 +232,7 @@ def get_proposal_for_query( :return: a description """ - is_seller = role == Dialogue.AgentRole.SELLER + is_seller = role == Dialogue.Role.SELLER own_service_description = self.get_own_service_description( is_supply=is_seller, is_search_description=False @@ -330,7 +330,7 @@ def _generate_candidate_proposals(self, is_seller: bool): return proposals def is_profitable_transaction( - self, transaction_msg: TransactionMessage, role: Dialogue.AgentRole + self, transaction_msg: TransactionMessage, role: Dialogue.Role ) -> bool: """ Check if a transaction is profitable. @@ -345,7 +345,7 @@ def is_profitable_transaction( :return: True if the transaction is good (as stated above), False otherwise. """ - is_seller = role == Dialogue.AgentRole.SELLER + is_seller = role == Dialogue.Role.SELLER transactions = cast(Transactions, self.context.transactions) ownership_state_after_locks = transactions.ownership_state_after_locks( diff --git a/packages/fetchai/skills/tac_negotiation/transactions.py b/packages/fetchai/skills/tac_negotiation/transactions.py index 3687a871e7..ebeba88664 100644 --- a/packages/fetchai/skills/tac_negotiation/transactions.py +++ b/packages/fetchai/skills/tac_negotiation/transactions.py @@ -97,7 +97,7 @@ def generate_transaction_message( performative: TransactionMessage.Performative, proposal_description: Description, dialogue_label: DialogueLabel, - role: Dialogue.AgentRole, + role: Dialogue.Role, agent_addr: Address, ) -> TransactionMessage: """ @@ -109,7 +109,7 @@ def generate_transaction_message( :param agent_addr: the address of the agent :return: a transaction message """ - is_seller = role == Dialogue.AgentRole.SELLER + is_seller = role == Dialogue.Role.SELLER sender_tx_fee = ( proposal_description.values["seller_tx_fee"] @@ -305,7 +305,7 @@ def _register_transaction_with_time(self, transaction_id: TransactionId) -> None self._last_update_for_transactions.append((now, transaction_id)) def add_locked_tx( - self, transaction_msg: TransactionMessage, role: Dialogue.AgentRole + self, transaction_msg: TransactionMessage, role: Dialogue.Role ) -> None: """ Add a lock (in the form of a transaction). @@ -316,7 +316,7 @@ def add_locked_tx( :return: None """ - as_seller = role == Dialogue.AgentRole.SELLER + as_seller = role == Dialogue.Role.SELLER transaction_id = transaction_msg.tx_id assert transaction_id not in self._locked_txs diff --git a/packages/fetchai/skills/thermometer/dialogues.py b/packages/fetchai/skills/thermometer/dialogues.py index d939e6bacd..7e7a005c0c 100644 --- a/packages/fetchai/skills/thermometer/dialogues.py +++ b/packages/fetchai/skills/thermometer/dialogues.py @@ -81,7 +81,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.SELLER + return FipaDialogue.Role.SELLER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/thermometer/skill.yaml b/packages/fetchai/skills/thermometer/skill.yaml index ae6ee32ffc..64abafa3a6 100644 --- a/packages/fetchai/skills/thermometer/skill.yaml +++ b/packages/fetchai/skills/thermometer/skill.yaml @@ -7,7 +7,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta behaviours.py: QmPv8BWTqVCZQJ8YVwWD6T6Hv4fbJZdX2KUiBC7Q32sPdF - dialogues.py: Qmf3WGxKXa655d67icvZUSk2MzFtUxB6k2ggznSwNZQEjK + dialogues.py: QmVN9rdtDaGdJg1qRdu4GfxaTFCNBpkmgbYdimL8Qkfn4n handlers.py: QmaGZWgkcxHikmrzGB7Cnp6WAYBDeEf9wDztu77fAJ2aW6 strategy.py: QmeoxCowVvHowrggqwYEmywVhx9JGK9Ef7wwaVrQHT5CQt thermometer_data_model.py: QmWBR4xcXgBJ1XtNKjcK2cnU46e1PQRBqMW9TSHo8n8NjE diff --git a/packages/fetchai/skills/thermometer_client/dialogues.py b/packages/fetchai/skills/thermometer_client/dialogues.py index 5558cfff4b..0470a8cdc6 100644 --- a/packages/fetchai/skills/thermometer_client/dialogues.py +++ b/packages/fetchai/skills/thermometer_client/dialogues.py @@ -80,7 +80,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.BUYER + return FipaDialogue.Role.BUYER def _create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/thermometer_client/skill.yaml b/packages/fetchai/skills/thermometer_client/skill.yaml index d2ee8b1686..fdb9775108 100644 --- a/packages/fetchai/skills/thermometer_client/skill.yaml +++ b/packages/fetchai/skills/thermometer_client/skill.yaml @@ -8,7 +8,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta behaviours.py: QmRVFYb2Yww1BmvcRkDExgnp8wj4memqNxDQpuHvzXMvWZ - dialogues.py: QmbUgDgUGfEMe4tsG96cvZ6UVQ7orVv2LZBzJEF25B62Yj + dialogues.py: QmT6qd2L9KjBba3Q2LddNXk41H4hc1BsKGoTGJJoGuS3Ro handlers.py: QmdnLREGXsy9aR42xPLsDUVYcDSHiQ4NzHxaT3XL9veHBf strategy.py: QmYwypsndrFexLwHSeJ4kbyez3gbB4VCAcV53UzDjtvwti fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/weather_client/dialogues.py b/packages/fetchai/skills/weather_client/dialogues.py index 775cebf078..f3cab23b88 100644 --- a/packages/fetchai/skills/weather_client/dialogues.py +++ b/packages/fetchai/skills/weather_client/dialogues.py @@ -80,7 +80,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: The role of the agent """ - return FipaDialogue.AgentRole.BUYER + return FipaDialogue.Role.BUYER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/weather_client/skill.yaml b/packages/fetchai/skills/weather_client/skill.yaml index 1ba2d758b9..4a2a9f9498 100644 --- a/packages/fetchai/skills/weather_client/skill.yaml +++ b/packages/fetchai/skills/weather_client/skill.yaml @@ -7,7 +7,7 @@ aea_version: '>=0.4.0, <0.5.0' fingerprint: __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta behaviours.py: QmeWFX1WyXqE3gcU43ZsNaz1dU1z3kJSwFKfdmvdRyXr3i - dialogues.py: QmfXc9VBAosqtr28jrJnuGQAdK1vbsT4crSN8gczK3RCKX + dialogues.py: QmNw8ghTmT14RpNbiza4j9kW9jnPNfP27z5zDJiVxVDnCQ handlers.py: QmQ2t7YYwiNkCo1nVicVX13yhp3dUw6QyZc6MCzLeoupHH strategy.py: QmcuqouWhqSzYpaNe8nHcah6JBue5ejHEJTx88B4TckyDj fingerprint_ignore_patterns: [] diff --git a/packages/fetchai/skills/weather_station/dialogues.py b/packages/fetchai/skills/weather_station/dialogues.py index 629b8813e3..3d206ba320 100644 --- a/packages/fetchai/skills/weather_station/dialogues.py +++ b/packages/fetchai/skills/weather_station/dialogues.py @@ -81,7 +81,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: the agent's role """ - return FipaDialogue.AgentRole.SELLER + return FipaDialogue.Role.SELLER def create_dialogue( self, dialogue_label: BaseDialogueLabel, role: BaseDialogue.Role, diff --git a/packages/fetchai/skills/weather_station/skill.yaml b/packages/fetchai/skills/weather_station/skill.yaml index 09c5b40903..59666ffac0 100644 --- a/packages/fetchai/skills/weather_station/skill.yaml +++ b/packages/fetchai/skills/weather_station/skill.yaml @@ -9,7 +9,7 @@ fingerprint: __init__.py: QmNkZAetyctaZCUf6ACxP5onGWsSxu2hjSNoFmJ3ta6Lta behaviours.py: QmWdv9BWgBLt9Y7T3U8Wd4KhTMScXANVY7A2pB5kqfBnaP db_communication.py: QmPHjQJvYp96TRUWxTRW9TE9BHATNuUyMw3wy5oQSftnug - dialogues.py: QmUVgQaBaAUB9cFKkyYGQmtYXNiXh53AGkcrCfcmDm6f1z + dialogues.py: QmUP7yeDEb5wFZphcy2C1RJzzF7HBK786d3BXezfM54x2n dummy_weather_station_data.py: QmUD52fXy9DW2FgivyP1VMhk3YbvRVUWUEuZVftXmkNymR handlers.py: QmeYB2f5yLV474GVH1jJC2zCAGV5R1QmPsc3TPUMCnYjAg strategy.py: Qmeh8PVR6sukZiaGsCWacZz5u9kwd6FKZocoGqg3LW3ZCQ diff --git a/packages/hashes.csv b/packages/hashes.csv index 8fde95911a..a965f11caa 100644 --- a/packages/hashes.csv +++ b/packages/hashes.csv @@ -34,24 +34,24 @@ fetchai/connections/tcp,QmQqWPKhxBVN7mNyw9eQidSc98smPzBkUQ8Zv5q5KY9KDK fetchai/connections/webhook,Qmd9bhRt7scphgKgt6i7CfhpCdVccj2qmGYKRhWLbP9hEc fetchai/contracts/erc1155,QmRYcbKAWSeSbR3mDhJGEnjjpkLFmRjwCAdmNKDJR619MD fetchai/contracts/scaffold,QmemGGZ2znyWCqgr7jpS9aUYdVr1NH2NCnG9z2R8StxMKb -fetchai/protocols/default,QmaCMZ2udbarH46f7jydA6VvbVseqQRbmbqT3aJdivz1c2 -fetchai/protocols/fipa,QmfEmaCogWuMzrDrvgy51tyYkaM5dJ7vywE2bVSzAEzZBe -fetchai/protocols/gym,QmUNndNWuC9J4sxVWjV1dzsCCHFMdqZ6SoHWgN2rJcAonQ -fetchai/protocols/http,Qmc4BkFqdjSRRN6HpSWzLNG5Lih32tG1x465XdP2uKwMdL -fetchai/protocols/ml_trade,QmSZNjE35Cu3k4a1H6Dw5dfZLR65nzLWmNP8ijcv7y21NG -fetchai/protocols/oef_search,Qmbr2MW1jw5NFK1oVPFv3Mm6CfYwTRTpfLmHGSgPkqEDkj +fetchai/protocols/default,QmYgQPZwVxE5wEKt9LEJdAtV3CoRBn7YcdwVysuqmQ3UaK +fetchai/protocols/fipa,QmWXHdJqeJ8S7qbRyVkSUUrF7HThsq2iRthZ76x8Uz6bMa +fetchai/protocols/gym,QmbieYzEbRA4uRouvWunkgp4voc7T1TC3abdfQ7aUizQSk +fetchai/protocols/http,QmXBhNtjdtKUdFfHYoFYsN1UKzLjTM78dhaxcmJ6Ybx7i3 +fetchai/protocols/ml_trade,Qmc1tcm1GHhTSkWCFDhZVoyR8TCQuXFPYiG23S43aLVY6M +fetchai/protocols/oef_search,QmYm6JkHRd6ktY3AtPMnryxhSnAiGE2xL59FR6vQaY3q3c fetchai/protocols/scaffold,Qmd3tjgn6KjXXvyi91vuUeGNc3ka4mQpNTVJdmaBsKmER6 -fetchai/protocols/tac,QmcVLttEnpZDk4NskLctSbjiJnrMaNAjkbeKvEpMXuBUGw +fetchai/protocols/tac,QmSxR3s7FQzqeVhjKYEL8e5bMhu1t5VUGBqU4TkRL1Bsya fetchai/skills/aries_alice,QmbTv3smwVJa9dEQ7XN3QbYbwBmdDpvhmKBVm62EGefPT9 fetchai/skills/aries_faber,QmdJyVE1aFEfhm7Ktc5ETZDrQmYgAoh3Lbv5PhoEmYrEVr -fetchai/skills/carpark_client,QmXASn716CTWtE5G1UQUq8gZ6TxwW8QfUbXnVAGjwiwjyR -fetchai/skills/carpark_detection,QmVykMENLojGu7UBtStj5jYxzfWJLDRHTA2GxMxGhMNGM5 +fetchai/skills/carpark_client,QmTD4uJZWXuesZBFew3DEkuWfuUuFgocrmacjLDcxVuCKZ +fetchai/skills/carpark_detection,QmSqQLx5pxVtYV2MFFhZTCYkjxUkfmhbx6NgG97xuWooQp fetchai/skills/echo,Qmb5LwXSxHbibRp7X1pWXtrp3fzwAe4bChECYhLzkivuzk -fetchai/skills/erc1155_client,QmXWGppVnki1hKU71nGP5MML2LWYJ7hpZ7uwbpAPxURwGt -fetchai/skills/erc1155_deploy,QmVRoQqj4xgEUGnwLRQjZPmtpmfPrULQBED1KFNAbWub9K +fetchai/skills/erc1155_client,Qma13qdPFp1QRisLUwf8JxtzfDDzeokrsUDdrRGehqQuwq +fetchai/skills/erc1155_deploy,QmdPYJ6EVDScf8qJb7nSXwLNSBLVnGSdUeu6i182prkMYE fetchai/skills/error,QmRE9DQr3jZN3afDeKbVTpBDfQjdWnyYJLApaz7YY1AMfc -fetchai/skills/generic_buyer,Qmd6PseVtnFyxoWLAvotJWgfF4KWTrFEHkhzc3hj2cDzAR -fetchai/skills/generic_seller,QmV3ewrZFc4r6UCvhaurEdeGxsJ8TCKuaHvgDywSbMmS96 +fetchai/skills/generic_buyer,QmQA1ssb3WhcyteDqdQhwXwPiuyqj1vxKSYUuVf7H3vdoi +fetchai/skills/generic_seller,QmUbaCeT3YJj8WyZ59w6ByfYaVb5icMTC1YyVBAWdmghLC fetchai/skills/gym,QmUYmjU7ejhxWTe45tcnDURqNZJCyNC1AQkzKHayhhQgv5 fetchai/skills/http_echo,QmXKc49HmhLmz4SCnNkba72DbFoRKDj1mXRTBRKYqxWPRt fetchai/skills/ml_data_provider,Qma3bX4D76fCKCFbM8RCCX2BBMsgbvS744kp4dR3fg9gMZ @@ -60,9 +60,9 @@ fetchai/skills/scaffold,QmZGxpk9PmTb3198AZgSUZFHZZkfv7eakiWiAN6Ce8vqzP fetchai/skills/simple_service_registration,QmaQbvhgwBmRx8nxnhMkL6PiHxR6RNdHE842v8VEngExrJ fetchai/skills/tac_control,QmcDECvZgYDhmdjAgycDoYwjv1UKSnF34PsL5V7QWkmkzf fetchai/skills/tac_control_contract,QmbxqiwNYVRTL6odfFN9UkFG7HG6b5Rcd24UH84Tfq3Taa -fetchai/skills/tac_negotiation,QmfQB52B88dSDmUCCx4EsMjVGFt8YvCQbUyPqdTAcrSUqP +fetchai/skills/tac_negotiation,QmZKxLRRZyZy8WZMgr3DLitr7A8Aqh7h36juWWtfSN6E6b fetchai/skills/tac_participation,QmXs11EMeLJQSadaRDH6Pepe5mffyjpyD15wPaoGgmu4pQ -fetchai/skills/thermometer,QmR3n22VRxairFohu2aQmSUf5jS89ros2CG2ibLaJrAQfo -fetchai/skills/thermometer_client,QmQ7FALgEzW5GRPXRTdeWXu2DYiUYMmEqhrLe2qt6PGXxD -fetchai/skills/weather_client,QmNnB9q6rLcAWfXnTdvgjDQYXTV7tjNKykRfVDiPB4ohQx -fetchai/skills/weather_station,QmV9uMRysja4W8ofeVJLMuaKxdTXZ9xZ3fMZidaP5UZXDw +fetchai/skills/thermometer,QmWKFUiZpcwvWKxHKnELom3YRdW26CKdnXdntdAaUA7SoN +fetchai/skills/thermometer_client,QmUw7DwKJi93hSLsLGyhA1hShW5Q47nKwgGEBcqa81EK8p +fetchai/skills/weather_client,QmZzTnL14hEBB4kD2krN5JixWUi9KSxwarydbHai8iQJEg +fetchai/skills/weather_station,QmYM3xiJXpbC2fZnB4hPp5t6wCvexinK2R3ZVvMgc13FoG diff --git a/tests/test_packages/test_protocols/test_fipa.py b/tests/test_packages/test_protocols/test_fipa.py index 21fde08fd1..b34d4862c8 100644 --- a/tests/test_packages/test_protocols/test_fipa.py +++ b/tests/test_packages/test_protocols/test_fipa.py @@ -369,20 +369,20 @@ def setup_class(cls): def test_create_self_initiated(self): """Test the self initialisation of a dialogue.""" result = self.buyer_dialogues._create_self_initiated( - dialogue_opponent_addr=self.seller_addr, role=FipaDialogue.AgentRole.SELLER, + dialogue_opponent_addr=self.seller_addr, role=FipaDialogue.Role.SELLER, ) assert isinstance(result, FipaDialogue) - assert result.role == FipaDialogue.AgentRole.SELLER, "The role must be seller." + assert result.role == FipaDialogue.Role.SELLER, "The role must be seller." def test_create_opponent_initiated(self): """Test the opponent initialisation of a dialogue.""" result = self.buyer_dialogues._create_opponent_initiated( dialogue_opponent_addr=self.seller_addr, dialogue_reference=(str(0), ""), - role=FipaDialogue.AgentRole.BUYER, + role=FipaDialogue.Role.BUYER, ) assert isinstance(result, FipaDialogue) - assert result.role == FipaDialogue.AgentRole.BUYER, "The role must be buyer." + assert result.role == FipaDialogue.Role.BUYER, "The role must be buyer." def test_dialogue_endstates(self): """Test the end states of a dialogue.""" @@ -658,7 +658,7 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: The role of the agent """ - return FipaDialogue.AgentRole.BUYER + return FipaDialogue.Role.BUYER class SellerDialogue(FipaDialogue): @@ -719,4 +719,4 @@ def role_from_first_message(message: Message) -> BaseDialogue.Role: :param message: an incoming/outgoing first message :return: The role of the agent """ - return FipaDialogue.AgentRole.SELLER + return FipaDialogue.Role.SELLER