From 1442cff47b38b03e039b7dc65e314074a94e9da7 Mon Sep 17 00:00:00 2001 From: David Vilela Date: Tue, 3 Dec 2024 17:37:32 +0100 Subject: [PATCH 1/5] feat: add round info to healthcheck --- .../dvilela/skills/memeooorr_abci/handlers.py | 32 ++++ .../skills/memeooorr_abci/rounds_info.py | 159 ++++++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 packages/dvilela/skills/memeooorr_abci/rounds_info.py diff --git a/packages/dvilela/skills/memeooorr_abci/handlers.py b/packages/dvilela/skills/memeooorr_abci/handlers.py index dd293822..a65d31e9 100644 --- a/packages/dvilela/skills/memeooorr_abci/handlers.py +++ b/packages/dvilela/skills/memeooorr_abci/handlers.py @@ -23,9 +23,11 @@ import re from datetime import datetime from enum import Enum +from pathlib import Path from typing import Callable, Dict, List, Optional, Tuple, Union, cast from urllib.parse import urlparse +import yaml from aea.configurations.data_types import PublicId from aea.protocols.base import Message @@ -33,6 +35,7 @@ from packages.dvilela.skills.memeooorr_abci.dialogues import HttpDialogue, HttpDialogues from packages.dvilela.skills.memeooorr_abci.models import SharedState from packages.dvilela.skills.memeooorr_abci.rounds import SynchronizedData +from packages.dvilela.skills.memeooorr_abci.rounds_info import ROUNDS_INFO from packages.valory.connections.http_server.connection import ( PUBLIC_ID as HTTP_SERVER_PUBLIC_ID, ) @@ -70,6 +73,24 @@ IpfsHandler = BaseIpfsHandler +def camel_to_snake(camel_str): + """Converts from CamelCase to snake_case""" + snake_str = re.sub(r"(? None: self.json_content_header = "Content-Type: application/json\n" # pylint: disable=attribute-defined-outside-init self.html_content_header = "Content-Type: text/html\n" # pylint: disable=attribute-defined-outside-init + # Load round info for the healthcheck + fsm = load_fsm_spec() + + self.rounds_info = {camel_to_snake(k): v for k, v in ROUNDS_INFO.items()} + for source_info, target_round in fsm["transition_func"].items(): + source_round, event = source_info[1:-1].split(", ") + self.rounds_info[camel_to_snake(source_round)]["transitions"][ + event.lower() + ] = camel_to_snake(target_round) + @property def synchronized_data(self) -> SynchronizedData: """Return the synchronized data.""" @@ -307,6 +338,7 @@ def _handle_get_health( "reset_pause_duration": self.context.params.reset_pause_duration, "rounds": rounds, "is_transitioning_fast": is_transitioning_fast, + "rounds_info": self.rounds_info, } self._send_ok_response(http_msg, http_dialogue, data) diff --git a/packages/dvilela/skills/memeooorr_abci/rounds_info.py b/packages/dvilela/skills/memeooorr_abci/rounds_info.py new file mode 100644 index 00000000..b3c3bea3 --- /dev/null +++ b/packages/dvilela/skills/memeooorr_abci/rounds_info.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2024 David Vilela Freire +# +# 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 information about the rounds that is used by the Http handler.""" + + +ROUNDS_INFO = { + "ActionDecisionRound": { + "name": "Taking a decision on what to do with the token", + "description": "Takes a decision about whether to interact with other tokens", + "transitions": {}, + }, + "ActionPreparationRound": { + "name": "Preparing the token action transaction", + "description": "Prepares a transaction to unleash, hearth, collect or burn a token", + "transitions": {}, + }, + "ActionTweetRound": { + "name": "Tweeting about the token action", + "description": "Publishes a tweet announcing the performed token action", + "transitions": {}, + }, + "AnalizeFeedbackRound": { + "name": "Analyzing Twitter feedback", + "description": "Analyzes responses to agent tweets and extracts feedback from them", + "transitions": {}, + }, + "CheckFundsRound": { + "name": "Checking funds", + "description": "Checks the agetn has enough funds to send a transaction", + "transitions": {}, + }, + "CheckLateTxHashesRound": { + "name": "Checking late transaction hashes", + "description": "Checks late transaction hashes", + "transitions": {}, + }, + "CheckTransactionHistoryRound": { + "name": "Checking the transaction history", + "description": "Checks the transaction history", + "transitions": {}, + }, + "CollectFeedbackRound": { + "name": "Collecting feedback from Twitter", + "description": "Collects responses to agent tweets", + "transitions": {}, + }, + "CollectSignatureRound": { + "name": "Collecting agent signatures", + "description": "Collects agent signatures for a transaction", + "transitions": {}, + }, + "DeploymentRound": { + "name": "Preparing a token deployment", + "description": "Prepares a token deployment transaction", + "transitions": {}, + }, + "EngageRound": { + "name": "Engaging with other agents", + "description": "Responds to tweets from other agents", + "transitions": {}, + }, + "FinalizationRound": { + "name": "Sending a transaction", + "description": "Sends a transaction for mining", + "transitions": {}, + }, + "LoadDatabaseRound": { + "name": "Loading the database", + "description": "Loads the database", + "transitions": {}, + }, + "PostAnnouncementRound": { + "name": "Twitting about the token deployment", + "description": "Publishes a tweet about the token deployment", + "transitions": {}, + }, + "PostTweetRound": { + "name": "Publishing a tweet", + "description": "Publishes a tweet", + "transitions": {}, + }, + "PullMemesRound": { + "name": "Pulling other tokens from the subgraph", + "description": "Pulls other tokens from the subgraph", + "transitions": {}, + }, + "RandomnessTransactionSubmissionRound": { + "name": "Getting some randomness", + "description": "Gets randomness from a decentralized randomness source", + "transitions": {}, + }, + "RegistrationRound": { + "name": "Registering agents ", + "description": "Initializes the agent registration process", + "transitions": {}, + }, + "RegistrationStartupRound": { + "name": "Registering agents at startup", + "description": "Initializes the agent registration process", + "transitions": {}, + }, + "ResetAndPauseRound": { + "name": "Cleaning up and sleeping for some time", + "description": "Cleans up and sleeps for some time before running again", + "transitions": {}, + }, + "ResetRound": { + "name": "Cleaning up and resetting", + "description": "Cleans up and resets the agent", + "transitions": {}, + }, + "SelectKeeperTransactionSubmissionARound": { + "name": "Selecting an agent to send the transaction", + "description": "Selects an agent to send the transaction", + "transitions": {}, + }, + "SelectKeeperTransactionSubmissionBAfterTimeoutRound": { + "name": "Selecting an agent to send the transaction", + "description": "Selects an agent to send the transaction", + "transitions": {}, + }, + "SelectKeeperTransactionSubmissionBRound": { + "name": "Selecting an agent to send the transaction", + "description": "Selects an agent to send the transaction", + "transitions": {}, + }, + "SynchronizeLateMessagesRound": { + "name": "Synchronizing late messages", + "description": "Synchronizes late messages", + "transitions": {}, + }, + "TransactionMultiplexerRound": { + "name": "Selecting next round", + "description": "Decides where to transition next based on the state previous to the transaction", + "transitions": {}, + }, + "ValidateTransactionRound": { + "name": "Validating the transaction", + "description": "Checks that the transaction was succesful", + "transitions": {}, + }, +} From b50ba7a2983fa356a18308b9683f13a588a44bc4 Mon Sep 17 00:00:00 2001 From: David Vilela Date: Tue, 3 Dec 2024 18:12:57 +0100 Subject: [PATCH 2/5] fix: hashes --- packages/dvilela/agents/memeooorr/aea-config.yaml | 4 ++-- packages/dvilela/services/memeooorr/service.yaml | 2 +- packages/dvilela/skills/memeooorr_abci/skill.yaml | 3 ++- packages/dvilela/skills/memeooorr_chained_abci/skill.yaml | 2 +- packages/packages.json | 8 ++++---- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/dvilela/agents/memeooorr/aea-config.yaml b/packages/dvilela/agents/memeooorr/aea-config.yaml index bae1a9ae..d63639c0 100644 --- a/packages/dvilela/agents/memeooorr/aea-config.yaml +++ b/packages/dvilela/agents/memeooorr/aea-config.yaml @@ -41,8 +41,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeihq2yenstblmaadzcjousowj5kfn5l7ns5pxweq2gcrsczfyq5wzm - valory/registration_abci:0.1.0:bafybeicnth5q4httefsusywx3zrrq4al47owvge72dqf2fziruicq6hqta - valory/reset_pause_abci:0.1.0:bafybeievjciqdvxhqxfjd4whqs27h6qbxqzrae7wwj7fpvxlvmtw3x35im -- dvilela/memeooorr_abci:0.1.0:bafybeihlhmxryhaahfifxatt3lejqpsrbhm3a2ipamm2fygnybhy62olzu -- dvilela/memeooorr_chained_abci:0.1.0:bafybeiczw2uly5awhzmpzjbdmbhsu6hhfsigqsseivxwk3ooe7ssvyfoo4 +- dvilela/memeooorr_abci:0.1.0:bafybeiepz5o7q5fqeoerxb4zfi2mp3qjnftqpr4dnlx6bwrnu2frfv6hmi +- dvilela/memeooorr_chained_abci:0.1.0:bafybeiduzz3orkcgcgj3scahlg257km55jsplom4gcowzxq3kespboitci default_ledger: ethereum required_ledgers: - ethereum diff --git a/packages/dvilela/services/memeooorr/service.yaml b/packages/dvilela/services/memeooorr/service.yaml index a839852a..bf119726 100644 --- a/packages/dvilela/services/memeooorr/service.yaml +++ b/packages/dvilela/services/memeooorr/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeiaekcmielp6mb4qvmo2twwkpmoun36bqajrh7wnnkcpdnia45ycl4 fingerprint_ignore_patterns: [] -agent: dvilela/memeooorr:0.1.0:bafybeiczczqg7ubzk5k2r5zu4esdjxo4fdq3qomseplf2mirgzugmgjuje +agent: dvilela/memeooorr:0.1.0:bafybeigiqsm43cjubyujjx5mrddcag7muex7ujhfylogzzrshrb4baxsqi number_of_agents: 1 deployment: agent: diff --git a/packages/dvilela/skills/memeooorr_abci/skill.yaml b/packages/dvilela/skills/memeooorr_abci/skill.yaml index bfd6d926..3565fe97 100644 --- a/packages/dvilela/skills/memeooorr_abci/skill.yaml +++ b/packages/dvilela/skills/memeooorr_abci/skill.yaml @@ -16,11 +16,12 @@ fingerprint: behaviours.py: bafybeibdbimezloiomvsv3zgfdug4tw276gt7tb5agnezl2nuqcfcplscu dialogues.py: bafybeiaygigeleloplgrsg2sovv463uvzk3zc2tupgazn4ak2vqcangksu fsm_specification.yaml: bafybeidqesafw5vtekw2dtffjznuchdjllo52najwmmkj2npfdyaouigfa - handlers.py: bafybeia3ew422w57ot7jpbrhmagepm7pcoqkkc53p5w4jm4co4yh4tz7em + handlers.py: bafybeieniukixt2v4tdhnswm4jsch54vlfsih2b5oe3wlskbl2srkxniiy models.py: bafybeid7ngfjyc3ck65yuzriy7y7eppz5kn7m7nsrilcvtqhqsfu54cn5e payloads.py: bafybeif5ycv3aaim4sbfkmx5jnwjm5yvx562zkykhng5on63zfeqskddse prompts.py: bafybeicww22zga6ximcfjb3h4hwhqfupuapc3uxl3bmev4hjfgd7cymzea rounds.py: bafybeickhz2scrsecxhooytqf2q32kp2sck6clv433bxqlcpfv3lrok2ia + rounds_info.py: bafybeieqaemvqwiwku7nlxkdebsqzldpvvidijf6wcwy7e3xbyz335jr6i subgraph.py: bafybeigme6r3cwiiu5l7r55rcbj7y37b62cxtlsnewpkbjqcbadwte32xm fingerprint_ignore_patterns: [] connections: diff --git a/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml b/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml index 82a9db8d..70ba7a45 100644 --- a/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml +++ b/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml @@ -23,7 +23,7 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeievjciqdvxhqxfjd4whqs27h6qbxqzrae7wwj7fpvxlvmtw3x35im - valory/transaction_settlement_abci:0.1.0:bafybeihq2yenstblmaadzcjousowj5kfn5l7ns5pxweq2gcrsczfyq5wzm - valory/termination_abci:0.1.0:bafybeid54buqxipiuduw7b6nnliiwsxajnltseuroad53wukfonpxca2om -- dvilela/memeooorr_abci:0.1.0:bafybeihlhmxryhaahfifxatt3lejqpsrbhm3a2ipamm2fygnybhy62olzu +- dvilela/memeooorr_abci:0.1.0:bafybeiepz5o7q5fqeoerxb4zfi2mp3qjnftqpr4dnlx6bwrnu2frfv6hmi behaviours: main: args: {} diff --git a/packages/packages.json b/packages/packages.json index cf89811d..6809f745 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -3,10 +3,10 @@ "contract/dvilela/meme_factory/0.1.0": "bafybeihh2fty6e3w2bvhn6y6jwa3yyssnn6yttopmmjczpgsudwrd7q4hq", "contract/dvilela/meme/0.1.0": "bafybeihubei6hbhbyiwwyxcbredb5mhomhwfktxlwufmqxrzo4jj4ohweq", "connection/dvilela/twikit/0.1.0": "bafybeiawfdnjxlcpdfrlqayhzymwlyumsp4ingnat6t4cluiswkduf3kk4", - "skill/dvilela/memeooorr_abci/0.1.0": "bafybeihlhmxryhaahfifxatt3lejqpsrbhm3a2ipamm2fygnybhy62olzu", - "skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiczw2uly5awhzmpzjbdmbhsu6hhfsigqsseivxwk3ooe7ssvyfoo4", - "agent/dvilela/memeooorr/0.1.0": "bafybeiczczqg7ubzk5k2r5zu4esdjxo4fdq3qomseplf2mirgzugmgjuje", - "service/dvilela/memeooorr/0.1.0": "bafybeic6qec2szhrxfwdcbtml6skrt6ayocig4kn65toy3n6l3nd2hduj4" + "skill/dvilela/memeooorr_abci/0.1.0": "bafybeiepz5o7q5fqeoerxb4zfi2mp3qjnftqpr4dnlx6bwrnu2frfv6hmi", + "skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiduzz3orkcgcgj3scahlg257km55jsplom4gcowzxq3kespboitci", + "agent/dvilela/memeooorr/0.1.0": "bafybeigiqsm43cjubyujjx5mrddcag7muex7ujhfylogzzrshrb4baxsqi", + "service/dvilela/memeooorr/0.1.0": "bafybeifuqqdw3vhwfuoyexpyhwcfzvbfpmqlysz7ua4jjpnruvc5spudci" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", From 6839ca189ba5519a828a42af21c5df70871db8e9 Mon Sep 17 00:00:00 2001 From: David Vilela Date: Tue, 3 Dec 2024 18:24:31 +0100 Subject: [PATCH 3/5] fix: linters --- packages/dvilela/agents/memeooorr/aea-config.yaml | 4 ++-- packages/dvilela/services/memeooorr/service.yaml | 2 +- packages/dvilela/skills/memeooorr_abci/skill.yaml | 2 ++ packages/dvilela/skills/memeooorr_chained_abci/skill.yaml | 2 +- packages/packages.json | 8 ++++---- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/dvilela/agents/memeooorr/aea-config.yaml b/packages/dvilela/agents/memeooorr/aea-config.yaml index d63639c0..be27e168 100644 --- a/packages/dvilela/agents/memeooorr/aea-config.yaml +++ b/packages/dvilela/agents/memeooorr/aea-config.yaml @@ -41,8 +41,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeihq2yenstblmaadzcjousowj5kfn5l7ns5pxweq2gcrsczfyq5wzm - valory/registration_abci:0.1.0:bafybeicnth5q4httefsusywx3zrrq4al47owvge72dqf2fziruicq6hqta - valory/reset_pause_abci:0.1.0:bafybeievjciqdvxhqxfjd4whqs27h6qbxqzrae7wwj7fpvxlvmtw3x35im -- dvilela/memeooorr_abci:0.1.0:bafybeiepz5o7q5fqeoerxb4zfi2mp3qjnftqpr4dnlx6bwrnu2frfv6hmi -- dvilela/memeooorr_chained_abci:0.1.0:bafybeiduzz3orkcgcgj3scahlg257km55jsplom4gcowzxq3kespboitci +- dvilela/memeooorr_abci:0.1.0:bafybeidfql4kwk62h2ey2gcs3xx224um5ctx3mqih277elyxsjje4phnlu +- dvilela/memeooorr_chained_abci:0.1.0:bafybeiahuur3aztt7siqcpfdwgbkwvftmfoku53mf66pthmas25m4xo2h4 default_ledger: ethereum required_ledgers: - ethereum diff --git a/packages/dvilela/services/memeooorr/service.yaml b/packages/dvilela/services/memeooorr/service.yaml index bf119726..c22a8824 100644 --- a/packages/dvilela/services/memeooorr/service.yaml +++ b/packages/dvilela/services/memeooorr/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeiaekcmielp6mb4qvmo2twwkpmoun36bqajrh7wnnkcpdnia45ycl4 fingerprint_ignore_patterns: [] -agent: dvilela/memeooorr:0.1.0:bafybeigiqsm43cjubyujjx5mrddcag7muex7ujhfylogzzrshrb4baxsqi +agent: dvilela/memeooorr:0.1.0:bafybeiffgs2u2gwmoe4h4qlin6r4egf4rakyebj65czlkwo6czyhra7gfy number_of_agents: 1 deployment: agent: diff --git a/packages/dvilela/skills/memeooorr_abci/skill.yaml b/packages/dvilela/skills/memeooorr_abci/skill.yaml index 3565fe97..6288666e 100644 --- a/packages/dvilela/skills/memeooorr_abci/skill.yaml +++ b/packages/dvilela/skills/memeooorr_abci/skill.yaml @@ -182,5 +182,7 @@ dependencies: version: ==3.0.0 textblob: version: '>=0.18.0.post0' + PyYAML: + version: '>=3.10,<=6.0.1' is_abstract: true customs: [] diff --git a/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml b/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml index 70ba7a45..22cb76fb 100644 --- a/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml +++ b/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml @@ -23,7 +23,7 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeievjciqdvxhqxfjd4whqs27h6qbxqzrae7wwj7fpvxlvmtw3x35im - valory/transaction_settlement_abci:0.1.0:bafybeihq2yenstblmaadzcjousowj5kfn5l7ns5pxweq2gcrsczfyq5wzm - valory/termination_abci:0.1.0:bafybeid54buqxipiuduw7b6nnliiwsxajnltseuroad53wukfonpxca2om -- dvilela/memeooorr_abci:0.1.0:bafybeiepz5o7q5fqeoerxb4zfi2mp3qjnftqpr4dnlx6bwrnu2frfv6hmi +- dvilela/memeooorr_abci:0.1.0:bafybeidfql4kwk62h2ey2gcs3xx224um5ctx3mqih277elyxsjje4phnlu behaviours: main: args: {} diff --git a/packages/packages.json b/packages/packages.json index 6809f745..9508e827 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -3,10 +3,10 @@ "contract/dvilela/meme_factory/0.1.0": "bafybeihh2fty6e3w2bvhn6y6jwa3yyssnn6yttopmmjczpgsudwrd7q4hq", "contract/dvilela/meme/0.1.0": "bafybeihubei6hbhbyiwwyxcbredb5mhomhwfktxlwufmqxrzo4jj4ohweq", "connection/dvilela/twikit/0.1.0": "bafybeiawfdnjxlcpdfrlqayhzymwlyumsp4ingnat6t4cluiswkduf3kk4", - "skill/dvilela/memeooorr_abci/0.1.0": "bafybeiepz5o7q5fqeoerxb4zfi2mp3qjnftqpr4dnlx6bwrnu2frfv6hmi", - "skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiduzz3orkcgcgj3scahlg257km55jsplom4gcowzxq3kespboitci", - "agent/dvilela/memeooorr/0.1.0": "bafybeigiqsm43cjubyujjx5mrddcag7muex7ujhfylogzzrshrb4baxsqi", - "service/dvilela/memeooorr/0.1.0": "bafybeifuqqdw3vhwfuoyexpyhwcfzvbfpmqlysz7ua4jjpnruvc5spudci" + "skill/dvilela/memeooorr_abci/0.1.0": "bafybeidfql4kwk62h2ey2gcs3xx224um5ctx3mqih277elyxsjje4phnlu", + "skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiahuur3aztt7siqcpfdwgbkwvftmfoku53mf66pthmas25m4xo2h4", + "agent/dvilela/memeooorr/0.1.0": "bafybeiffgs2u2gwmoe4h4qlin6r4egf4rakyebj65czlkwo6czyhra7gfy", + "service/dvilela/memeooorr/0.1.0": "bafybeibfrappgwgw5ffbh5dr6okt6mupxzvbscut4sss7w4jjhylqd45uq" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", From b232d9350993d2ec32548ce19ec279a6fa7ae7b8 Mon Sep 17 00:00:00 2001 From: David Vilela Date: Tue, 3 Dec 2024 18:28:51 +0100 Subject: [PATCH 4/5] fix: linters --- packages/dvilela/agents/memeooorr/aea-config.yaml | 4 ++-- packages/dvilela/services/memeooorr/service.yaml | 2 +- packages/dvilela/skills/memeooorr_abci/handlers.py | 4 +++- packages/dvilela/skills/memeooorr_abci/skill.yaml | 2 +- packages/dvilela/skills/memeooorr_chained_abci/skill.yaml | 2 +- packages/packages.json | 8 ++++---- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/dvilela/agents/memeooorr/aea-config.yaml b/packages/dvilela/agents/memeooorr/aea-config.yaml index be27e168..7c529f17 100644 --- a/packages/dvilela/agents/memeooorr/aea-config.yaml +++ b/packages/dvilela/agents/memeooorr/aea-config.yaml @@ -41,8 +41,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeihq2yenstblmaadzcjousowj5kfn5l7ns5pxweq2gcrsczfyq5wzm - valory/registration_abci:0.1.0:bafybeicnth5q4httefsusywx3zrrq4al47owvge72dqf2fziruicq6hqta - valory/reset_pause_abci:0.1.0:bafybeievjciqdvxhqxfjd4whqs27h6qbxqzrae7wwj7fpvxlvmtw3x35im -- dvilela/memeooorr_abci:0.1.0:bafybeidfql4kwk62h2ey2gcs3xx224um5ctx3mqih277elyxsjje4phnlu -- dvilela/memeooorr_chained_abci:0.1.0:bafybeiahuur3aztt7siqcpfdwgbkwvftmfoku53mf66pthmas25m4xo2h4 +- dvilela/memeooorr_abci:0.1.0:bafybeiein2hn2lttakznykvllal2amduevvke65etakoxfztpyd3pwhfwi +- dvilela/memeooorr_chained_abci:0.1.0:bafybeiegssczcee2r5l6x5bdsid7bd64xrkgqeun3555mysprw3nuzinkm default_ledger: ethereum required_ledgers: - ethereum diff --git a/packages/dvilela/services/memeooorr/service.yaml b/packages/dvilela/services/memeooorr/service.yaml index c22a8824..c51144c5 100644 --- a/packages/dvilela/services/memeooorr/service.yaml +++ b/packages/dvilela/services/memeooorr/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeiaekcmielp6mb4qvmo2twwkpmoun36bqajrh7wnnkcpdnia45ycl4 fingerprint_ignore_patterns: [] -agent: dvilela/memeooorr:0.1.0:bafybeiffgs2u2gwmoe4h4qlin6r4egf4rakyebj65czlkwo6czyhra7gfy +agent: dvilela/memeooorr:0.1.0:bafybeiax5djqpsol7ar4jz4m63nmva7ybicomgyanbuyz34k3vuz52vchq number_of_agents: 1 deployment: agent: diff --git a/packages/dvilela/skills/memeooorr_abci/handlers.py b/packages/dvilela/skills/memeooorr_abci/handlers.py index a65d31e9..f7d482cd 100644 --- a/packages/dvilela/skills/memeooorr_abci/handlers.py +++ b/packages/dvilela/skills/memeooorr_abci/handlers.py @@ -165,7 +165,9 @@ def setup(self) -> None: # Load round info for the healthcheck fsm = load_fsm_spec() - self.rounds_info = {camel_to_snake(k): v for k, v in ROUNDS_INFO.items()} + self.rounds_info = { # pylint: disable=attribute-defined-outside-init + camel_to_snake(k): v for k, v in ROUNDS_INFO.items() + } for source_info, target_round in fsm["transition_func"].items(): source_round, event = source_info[1:-1].split(", ") self.rounds_info[camel_to_snake(source_round)]["transitions"][ diff --git a/packages/dvilela/skills/memeooorr_abci/skill.yaml b/packages/dvilela/skills/memeooorr_abci/skill.yaml index 6288666e..dd8d3986 100644 --- a/packages/dvilela/skills/memeooorr_abci/skill.yaml +++ b/packages/dvilela/skills/memeooorr_abci/skill.yaml @@ -16,7 +16,7 @@ fingerprint: behaviours.py: bafybeibdbimezloiomvsv3zgfdug4tw276gt7tb5agnezl2nuqcfcplscu dialogues.py: bafybeiaygigeleloplgrsg2sovv463uvzk3zc2tupgazn4ak2vqcangksu fsm_specification.yaml: bafybeidqesafw5vtekw2dtffjznuchdjllo52najwmmkj2npfdyaouigfa - handlers.py: bafybeieniukixt2v4tdhnswm4jsch54vlfsih2b5oe3wlskbl2srkxniiy + handlers.py: bafybeicbe6jxas4hiqbad4zf5kt2qdlu446bkhbwwiwpibva2pdxoriohi models.py: bafybeid7ngfjyc3ck65yuzriy7y7eppz5kn7m7nsrilcvtqhqsfu54cn5e payloads.py: bafybeif5ycv3aaim4sbfkmx5jnwjm5yvx562zkykhng5on63zfeqskddse prompts.py: bafybeicww22zga6ximcfjb3h4hwhqfupuapc3uxl3bmev4hjfgd7cymzea diff --git a/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml b/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml index 22cb76fb..e5cb7925 100644 --- a/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml +++ b/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml @@ -23,7 +23,7 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeievjciqdvxhqxfjd4whqs27h6qbxqzrae7wwj7fpvxlvmtw3x35im - valory/transaction_settlement_abci:0.1.0:bafybeihq2yenstblmaadzcjousowj5kfn5l7ns5pxweq2gcrsczfyq5wzm - valory/termination_abci:0.1.0:bafybeid54buqxipiuduw7b6nnliiwsxajnltseuroad53wukfonpxca2om -- dvilela/memeooorr_abci:0.1.0:bafybeidfql4kwk62h2ey2gcs3xx224um5ctx3mqih277elyxsjje4phnlu +- dvilela/memeooorr_abci:0.1.0:bafybeiein2hn2lttakznykvllal2amduevvke65etakoxfztpyd3pwhfwi behaviours: main: args: {} diff --git a/packages/packages.json b/packages/packages.json index 9508e827..d5ce41a1 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -3,10 +3,10 @@ "contract/dvilela/meme_factory/0.1.0": "bafybeihh2fty6e3w2bvhn6y6jwa3yyssnn6yttopmmjczpgsudwrd7q4hq", "contract/dvilela/meme/0.1.0": "bafybeihubei6hbhbyiwwyxcbredb5mhomhwfktxlwufmqxrzo4jj4ohweq", "connection/dvilela/twikit/0.1.0": "bafybeiawfdnjxlcpdfrlqayhzymwlyumsp4ingnat6t4cluiswkduf3kk4", - "skill/dvilela/memeooorr_abci/0.1.0": "bafybeidfql4kwk62h2ey2gcs3xx224um5ctx3mqih277elyxsjje4phnlu", - "skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiahuur3aztt7siqcpfdwgbkwvftmfoku53mf66pthmas25m4xo2h4", - "agent/dvilela/memeooorr/0.1.0": "bafybeiffgs2u2gwmoe4h4qlin6r4egf4rakyebj65czlkwo6czyhra7gfy", - "service/dvilela/memeooorr/0.1.0": "bafybeibfrappgwgw5ffbh5dr6okt6mupxzvbscut4sss7w4jjhylqd45uq" + "skill/dvilela/memeooorr_abci/0.1.0": "bafybeiein2hn2lttakznykvllal2amduevvke65etakoxfztpyd3pwhfwi", + "skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiegssczcee2r5l6x5bdsid7bd64xrkgqeun3555mysprw3nuzinkm", + "agent/dvilela/memeooorr/0.1.0": "bafybeiax5djqpsol7ar4jz4m63nmva7ybicomgyanbuyz34k3vuz52vchq", + "service/dvilela/memeooorr/0.1.0": "bafybeidlke6trxjlb2uuhat5sp3urfehqu2g275resrdarbod3b6znsajm" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", From 6c8a231de6a92ce482212089307f25620e4cc8d5 Mon Sep 17 00:00:00 2001 From: David Vilela Date: Tue, 3 Dec 2024 18:32:44 +0100 Subject: [PATCH 5/5] fix: linters --- packages/dvilela/agents/memeooorr/aea-config.yaml | 4 ++-- packages/dvilela/services/memeooorr/service.yaml | 2 +- packages/dvilela/skills/memeooorr_abci/handlers.py | 6 +++--- packages/dvilela/skills/memeooorr_abci/skill.yaml | 2 +- packages/dvilela/skills/memeooorr_chained_abci/skill.yaml | 2 +- packages/packages.json | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/dvilela/agents/memeooorr/aea-config.yaml b/packages/dvilela/agents/memeooorr/aea-config.yaml index 7c529f17..92e41a8b 100644 --- a/packages/dvilela/agents/memeooorr/aea-config.yaml +++ b/packages/dvilela/agents/memeooorr/aea-config.yaml @@ -41,8 +41,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeihq2yenstblmaadzcjousowj5kfn5l7ns5pxweq2gcrsczfyq5wzm - valory/registration_abci:0.1.0:bafybeicnth5q4httefsusywx3zrrq4al47owvge72dqf2fziruicq6hqta - valory/reset_pause_abci:0.1.0:bafybeievjciqdvxhqxfjd4whqs27h6qbxqzrae7wwj7fpvxlvmtw3x35im -- dvilela/memeooorr_abci:0.1.0:bafybeiein2hn2lttakznykvllal2amduevvke65etakoxfztpyd3pwhfwi -- dvilela/memeooorr_chained_abci:0.1.0:bafybeiegssczcee2r5l6x5bdsid7bd64xrkgqeun3555mysprw3nuzinkm +- dvilela/memeooorr_abci:0.1.0:bafybeigfhi5k3fiodiyjbhy54lqcjjgiojtljlnzfnbhfkilg7slcz6ocu +- dvilela/memeooorr_chained_abci:0.1.0:bafybeie4vem72o3m5iryggjbzfkukdcyqrj74ov7qdyjwc4wmxycu6n44u default_ledger: ethereum required_ledgers: - ethereum diff --git a/packages/dvilela/services/memeooorr/service.yaml b/packages/dvilela/services/memeooorr/service.yaml index c51144c5..8361c6b4 100644 --- a/packages/dvilela/services/memeooorr/service.yaml +++ b/packages/dvilela/services/memeooorr/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeiaekcmielp6mb4qvmo2twwkpmoun36bqajrh7wnnkcpdnia45ycl4 fingerprint_ignore_patterns: [] -agent: dvilela/memeooorr:0.1.0:bafybeiax5djqpsol7ar4jz4m63nmva7ybicomgyanbuyz34k3vuz52vchq +agent: dvilela/memeooorr:0.1.0:bafybeiempli5guocheudowojeqlh335zoe4lpuxas6f3cecxbcwhx2ia6q number_of_agents: 1 deployment: agent: diff --git a/packages/dvilela/skills/memeooorr_abci/handlers.py b/packages/dvilela/skills/memeooorr_abci/handlers.py index f7d482cd..36b03ed8 100644 --- a/packages/dvilela/skills/memeooorr_abci/handlers.py +++ b/packages/dvilela/skills/memeooorr_abci/handlers.py @@ -73,13 +73,13 @@ IpfsHandler = BaseIpfsHandler -def camel_to_snake(camel_str): +def camel_to_snake(camel_str: str) -> str: """Converts from CamelCase to snake_case""" snake_str = re.sub(r"(? Dict: """Load the chained FSM spec""" with open( Path(__file__).parent.parent @@ -165,7 +165,7 @@ def setup(self) -> None: # Load round info for the healthcheck fsm = load_fsm_spec() - self.rounds_info = { # pylint: disable=attribute-defined-outside-init + self.rounds_info: Dict = { # pylint: disable=attribute-defined-outside-init camel_to_snake(k): v for k, v in ROUNDS_INFO.items() } for source_info, target_round in fsm["transition_func"].items(): diff --git a/packages/dvilela/skills/memeooorr_abci/skill.yaml b/packages/dvilela/skills/memeooorr_abci/skill.yaml index dd8d3986..e83ca5be 100644 --- a/packages/dvilela/skills/memeooorr_abci/skill.yaml +++ b/packages/dvilela/skills/memeooorr_abci/skill.yaml @@ -16,7 +16,7 @@ fingerprint: behaviours.py: bafybeibdbimezloiomvsv3zgfdug4tw276gt7tb5agnezl2nuqcfcplscu dialogues.py: bafybeiaygigeleloplgrsg2sovv463uvzk3zc2tupgazn4ak2vqcangksu fsm_specification.yaml: bafybeidqesafw5vtekw2dtffjznuchdjllo52najwmmkj2npfdyaouigfa - handlers.py: bafybeicbe6jxas4hiqbad4zf5kt2qdlu446bkhbwwiwpibva2pdxoriohi + handlers.py: bafybeigdxkm45w27sh7cpgiwuperjldql6oupbhxqtizhbwfv7abxe3dku models.py: bafybeid7ngfjyc3ck65yuzriy7y7eppz5kn7m7nsrilcvtqhqsfu54cn5e payloads.py: bafybeif5ycv3aaim4sbfkmx5jnwjm5yvx562zkykhng5on63zfeqskddse prompts.py: bafybeicww22zga6ximcfjb3h4hwhqfupuapc3uxl3bmev4hjfgd7cymzea diff --git a/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml b/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml index e5cb7925..7fad449e 100644 --- a/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml +++ b/packages/dvilela/skills/memeooorr_chained_abci/skill.yaml @@ -23,7 +23,7 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeievjciqdvxhqxfjd4whqs27h6qbxqzrae7wwj7fpvxlvmtw3x35im - valory/transaction_settlement_abci:0.1.0:bafybeihq2yenstblmaadzcjousowj5kfn5l7ns5pxweq2gcrsczfyq5wzm - valory/termination_abci:0.1.0:bafybeid54buqxipiuduw7b6nnliiwsxajnltseuroad53wukfonpxca2om -- dvilela/memeooorr_abci:0.1.0:bafybeiein2hn2lttakznykvllal2amduevvke65etakoxfztpyd3pwhfwi +- dvilela/memeooorr_abci:0.1.0:bafybeigfhi5k3fiodiyjbhy54lqcjjgiojtljlnzfnbhfkilg7slcz6ocu behaviours: main: args: {} diff --git a/packages/packages.json b/packages/packages.json index d5ce41a1..ec55d995 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -3,10 +3,10 @@ "contract/dvilela/meme_factory/0.1.0": "bafybeihh2fty6e3w2bvhn6y6jwa3yyssnn6yttopmmjczpgsudwrd7q4hq", "contract/dvilela/meme/0.1.0": "bafybeihubei6hbhbyiwwyxcbredb5mhomhwfktxlwufmqxrzo4jj4ohweq", "connection/dvilela/twikit/0.1.0": "bafybeiawfdnjxlcpdfrlqayhzymwlyumsp4ingnat6t4cluiswkduf3kk4", - "skill/dvilela/memeooorr_abci/0.1.0": "bafybeiein2hn2lttakznykvllal2amduevvke65etakoxfztpyd3pwhfwi", - "skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiegssczcee2r5l6x5bdsid7bd64xrkgqeun3555mysprw3nuzinkm", - "agent/dvilela/memeooorr/0.1.0": "bafybeiax5djqpsol7ar4jz4m63nmva7ybicomgyanbuyz34k3vuz52vchq", - "service/dvilela/memeooorr/0.1.0": "bafybeidlke6trxjlb2uuhat5sp3urfehqu2g275resrdarbod3b6znsajm" + "skill/dvilela/memeooorr_abci/0.1.0": "bafybeigfhi5k3fiodiyjbhy54lqcjjgiojtljlnzfnbhfkilg7slcz6ocu", + "skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeie4vem72o3m5iryggjbzfkukdcyqrj74ov7qdyjwc4wmxycu6n44u", + "agent/dvilela/memeooorr/0.1.0": "bafybeiempli5guocheudowojeqlh335zoe4lpuxas6f3cecxbcwhx2ia6q", + "service/dvilela/memeooorr/0.1.0": "bafybeihpd6ub2sacptilitj4htdqo2vqpj4mwufmsxlukqmqpamu3ff6ry" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",