From eda44081926202bd0b874fd151dba09044f0137c Mon Sep 17 00:00:00 2001 From: David Vilela Date: Thu, 10 Aug 2023 13:54:09 +0200 Subject: [PATCH] fix: enforce ints --- docs/index.md | 2 +- packages/packages.json | 8 ++++---- packages/valory/agents/impact_evaluator/aea-config.yaml | 4 ++-- packages/valory/services/impact_evaluator/service.yaml | 2 +- packages/valory/skills/impact_evaluator_abci/skill.yaml | 2 +- packages/valory/skills/twitter_scoring_abci/behaviours.py | 4 ++-- packages/valory/skills/twitter_scoring_abci/rounds.py | 2 +- packages/valory/skills/twitter_scoring_abci/skill.yaml | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/index.md b/docs/index.md index df3ada01..a48c87c3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -31,7 +31,7 @@ In order to run a local demo service based on the IEKit: 2. Fetch the IEKit. ```bash - autonomy fetch valory/impact_evaluator:0.1.0:bafybeiav2ea6ztfhfpjleiivgnkdeosxz4fqmkfuu5l7iwnroapoa7sd3a --service + autonomy fetch valory/impact_evaluator:0.1.0:bafybeiak245pwvstzhs5ezm2dp7qlrgvkimg4jw7hscfaadwlo6gnvvkbm --service ``` 3. Build the Docker image of the service agents diff --git a/packages/packages.json b/packages/packages.json index 85e5ae74..b5df6c21 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -1,13 +1,13 @@ { "dev": { - "agent/valory/impact_evaluator/0.1.0": "bafybeihgevsp4th3r3cmcv7a7a7hi2fcgiyphaoc2l26nqyqf5xjkfypni", + "agent/valory/impact_evaluator/0.1.0": "bafybeidkflsu444cow22sztkn3pchf4aba52jgzdplvwo3ort6fvi36gxy", "contract/valory/dynamic_contribution/0.1.0": "bafybeiaapvt7o4s5zpkxjcaplbzw7bhgeeqwtsddzjxmg6bfth6ytlvdiq", - "service/valory/impact_evaluator/0.1.0": "bafybeiav2ea6ztfhfpjleiivgnkdeosxz4fqmkfuu5l7iwnroapoa7sd3a", + "service/valory/impact_evaluator/0.1.0": "bafybeiak245pwvstzhs5ezm2dp7qlrgvkimg4jw7hscfaadwlo6gnvvkbm", "skill/valory/dynamic_nft_abci/0.1.0": "bafybeibqbmo6erzdc7x4lroezhtzrxtpcmbjdxcraazxxxpvjfcgdrmwsi", - "skill/valory/twitter_scoring_abci/0.1.0": "bafybeiejp5kp3yttntukfiwjbvah5kvldxruugrhsmigmtrfdlkxqumgui", + "skill/valory/twitter_scoring_abci/0.1.0": "bafybeibb2uz6hndycjn6xuqcqtnuzzgkd2a2nhljxanscuavj26k3k3fka", "skill/valory/ceramic_read_abci/0.1.0": "bafybeib36m6fi5swu43s3amtbk7w5rfie2gvzgw3xhxd7yfnka4kpcegme", "skill/valory/ceramic_write_abci/0.1.0": "bafybeifdjb2iisvtgwo44xoddhrbgqehbis6tbjdktuhh6ehwm5bnuee74", - "skill/valory/impact_evaluator_abci/0.1.0": "bafybeiekanstkrkpqdcwsrg5jtg4pirizzivu3u3m66pcgqmgx43yxedzu", + "skill/valory/impact_evaluator_abci/0.1.0": "bafybeic7jzf537vhfiavg5cugfxfuejiux2iaqm6wt5ppqlxdyxu6ccz5e", "skill/valory/generic_scoring_abci/0.1.0": "bafybeih7s3cnfr2lwbrbdhp2tjayjnqjlaakbdvurs5faxq4ctjkj4rgki", "protocol/valory/twitter/0.1.0": "bafybeib4eyf7qbs7kdntqzhwqsaaj4o2mzcokcztaza6qgwt7sbxgkqu2m", "protocol/valory/llm/1.0.0": "bafybeigqybmg75vsxexmp57hkms7lkp7iwpf54r7wpygizxryvrhfqqpb4", diff --git a/packages/valory/agents/impact_evaluator/aea-config.yaml b/packages/valory/agents/impact_evaluator/aea-config.yaml index 0d0b2436..0ea4f348 100644 --- a/packages/valory/agents/impact_evaluator/aea-config.yaml +++ b/packages/valory/agents/impact_evaluator/aea-config.yaml @@ -42,9 +42,9 @@ protocols: skills: - valory/abstract_abci:0.1.0:bafybeih3bwx5apteinnoxts7sqmjlskntdbo7vvnmdbs5noo2pv76by7fu - valory/abstract_round_abci:0.1.0:bafybeibqpzbklnljvtc67yon4ciijxj75d7vazm7rurcvbbfnk6jtudukm -- valory/impact_evaluator_abci:0.1.0:bafybeiekanstkrkpqdcwsrg5jtg4pirizzivu3u3m66pcgqmgx43yxedzu +- valory/impact_evaluator_abci:0.1.0:bafybeic7jzf537vhfiavg5cugfxfuejiux2iaqm6wt5ppqlxdyxu6ccz5e - valory/generic_scoring_abci:0.1.0:bafybeih7s3cnfr2lwbrbdhp2tjayjnqjlaakbdvurs5faxq4ctjkj4rgki -- valory/twitter_scoring_abci:0.1.0:bafybeiejp5kp3yttntukfiwjbvah5kvldxruugrhsmigmtrfdlkxqumgui +- valory/twitter_scoring_abci:0.1.0:bafybeibb2uz6hndycjn6xuqcqtnuzzgkd2a2nhljxanscuavj26k3k3fka - valory/ceramic_read_abci:0.1.0:bafybeib36m6fi5swu43s3amtbk7w5rfie2gvzgw3xhxd7yfnka4kpcegme - valory/ceramic_write_abci:0.1.0:bafybeifdjb2iisvtgwo44xoddhrbgqehbis6tbjdktuhh6ehwm5bnuee74 - valory/dynamic_nft_abci:0.1.0:bafybeibqbmo6erzdc7x4lroezhtzrxtpcmbjdxcraazxxxpvjfcgdrmwsi diff --git a/packages/valory/services/impact_evaluator/service.yaml b/packages/valory/services/impact_evaluator/service.yaml index 79777509..80760727 100644 --- a/packages/valory/services/impact_evaluator/service.yaml +++ b/packages/valory/services/impact_evaluator/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeign56hilwuoa6bgos3uqabss4gew4vadkik7vhj3ucpqw6nxtqtpe fingerprint_ignore_patterns: [] -agent: valory/impact_evaluator:0.1.0:bafybeihgevsp4th3r3cmcv7a7a7hi2fcgiyphaoc2l26nqyqf5xjkfypni +agent: valory/impact_evaluator:0.1.0:bafybeidkflsu444cow22sztkn3pchf4aba52jgzdplvwo3ort6fvi36gxy number_of_agents: 4 deployment: agent: diff --git a/packages/valory/skills/impact_evaluator_abci/skill.yaml b/packages/valory/skills/impact_evaluator_abci/skill.yaml index e48616ec..82465eac 100644 --- a/packages/valory/skills/impact_evaluator_abci/skill.yaml +++ b/packages/valory/skills/impact_evaluator_abci/skill.yaml @@ -26,7 +26,7 @@ skills: - valory/abstract_round_abci:0.1.0:bafybeibqpzbklnljvtc67yon4ciijxj75d7vazm7rurcvbbfnk6jtudukm - valory/ceramic_read_abci:0.1.0:bafybeib36m6fi5swu43s3amtbk7w5rfie2gvzgw3xhxd7yfnka4kpcegme - valory/generic_scoring_abci:0.1.0:bafybeih7s3cnfr2lwbrbdhp2tjayjnqjlaakbdvurs5faxq4ctjkj4rgki -- valory/twitter_scoring_abci:0.1.0:bafybeiejp5kp3yttntukfiwjbvah5kvldxruugrhsmigmtrfdlkxqumgui +- valory/twitter_scoring_abci:0.1.0:bafybeibb2uz6hndycjn6xuqcqtnuzzgkd2a2nhljxanscuavj26k3k3fka - valory/ceramic_write_abci:0.1.0:bafybeifdjb2iisvtgwo44xoddhrbgqehbis6tbjdktuhh6ehwm5bnuee74 - valory/dynamic_nft_abci:0.1.0:bafybeibqbmo6erzdc7x4lroezhtzrxtpcmbjdxcraazxxxpvjfcgdrmwsi - valory/registration_abci:0.1.0:bafybeia25gpusnkakb2dp4heqkwtuftbc2apppq3i4bds6sphltsovgzvi diff --git a/packages/valory/skills/twitter_scoring_abci/behaviours.py b/packages/valory/skills/twitter_scoring_abci/behaviours.py index c0921553..90c2843c 100644 --- a/packages/valory/skills/twitter_scoring_abci/behaviours.py +++ b/packages/valory/skills/twitter_scoring_abci/behaviours.py @@ -530,9 +530,9 @@ def update_ceramic_db(self) -> Dict: # User data to update user_data = { - "points": new_points, + "points": int(new_points), "twitter_handle": twitter_name, - "current_period_points": current_period_points, + "current_period_points": int(current_period_points), } # If this is a registration diff --git a/packages/valory/skills/twitter_scoring_abci/rounds.py b/packages/valory/skills/twitter_scoring_abci/rounds.py index acaad9b1..9df80aec 100644 --- a/packages/valory/skills/twitter_scoring_abci/rounds.py +++ b/packages/valory/skills/twitter_scoring_abci/rounds.py @@ -164,7 +164,7 @@ def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]: json.loads(value[0])[tweet_id] for value in non_empty_values.values() ] - median = statistics.median(tweet_points) + median = int(statistics.median(tweet_points)) tweets[tweet_id]["points"] = median print(f"Tweet {tweet_id} has been awarded {median} points") diff --git a/packages/valory/skills/twitter_scoring_abci/skill.yaml b/packages/valory/skills/twitter_scoring_abci/skill.yaml index 146bca98..bf5fcc89 100644 --- a/packages/valory/skills/twitter_scoring_abci/skill.yaml +++ b/packages/valory/skills/twitter_scoring_abci/skill.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeifudgakkjoyahuewp2o4gvqayw7nsgpyxw2ayrpgmzexurh2xomaq - behaviours.py: bafybeibbyneeup7elxcd5exunwlw7n244c2qikykbby7ehj4qauvsgfqym + behaviours.py: bafybeia5nl7dha26hsvzzvdktykzriuznqpqnbwreyetzefadalvnpkeuy ceramic_db.py: bafybeicwkoucm5tc3nzgsoqzozpy6mbfntmtzbw3hu2eqrwwqrfshenqoy dialogues.py: bafybeibdqzn37hbo2cq4skww4uh2zvvsjyaxxvdhxisefbdvmjp7rh53si fsm_specification.yaml: bafybeiftbrcjeqy2322ub5oihkrsmohgp4qpkuokfoirt4rg4ymwu5wrei @@ -16,7 +16,7 @@ fingerprint: models.py: bafybeieuk72ydi47dg7iempfasj44abouikb5lifzzjboz5aytnpzv7r7a payloads.py: bafybeiapqgm3uscsl2gghy6fe22jceta4d5suujdlux233c37fyqydjp5i prompts.py: bafybeieiuqn427bgwfnzynxf3vtqfpvmqqscs5tyw4oibfofwropifotke - rounds.py: bafybeie3373orxxuub4nz5w4hffrqfmvlqxhgjjcpctuj7ymfzdwvhtkie + rounds.py: bafybeidizfljfi3wyplejx44hqjqns7ewvowx44on3whkfyq4mfq36rzfm tests/__init__.py: bafybeidwzzd4ejsyf3aryd5kmrvd63h7ajgqyrxphmfaacvpjnneacejay tests/test_behaviours.py: bafybeidhcwz3gwjbwlktbgkafps3wjiyuipewtxa3hponqafgkecwb76we tests/test_ceramic_db.py: bafybeihjsdurxfsxaezvmp6ttmoz2wlvu4h5vndtilkejkugu3g5q2bcb4