From 28825af7b2c973475505ee6a566c456115dba7b0 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 13:19:30 +0100 Subject: [PATCH] reformatting and generators --- packages/packages.json | 12 +++++------ packages/valory/agents/trader/aea-config.yaml | 6 +++--- packages/valory/services/trader/service.yaml | 2 +- .../valory/services/trader_pearl/service.yaml | 2 +- .../skills/decision_maker_abci/skill.yaml | 4 ++-- .../decision_maker_abci/tests/test_models.py | 16 +++++++++------ .../tests/test_redeem_info.py | 20 +++++++++---------- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 9 files changed, 36 insertions(+), 32 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 973c4535d..172d0c0bf 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -16,14 +16,14 @@ "contract/valory/staking_token/0.1.0": "bafybeig4fl35dn7d5gnprux2nwsqbirm7zkiujz3xvrwcjuktz6hkq4as4", "contract/valory/relayer/0.1.0": "bafybeihzgjyvhtorugjw3yldznqsbwo3aqpxowm7k2nrvj6qtwpsc7jl7u", "skill/valory/market_manager_abci/0.1.0": "bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze", - "skill/valory/decision_maker_abci/0.1.0": "bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we", - "skill/valory/trader_abci/0.1.0": "bafybeih25xwmgwqzsfoejfg6mssbcw57psphtrnf6makth4jg4soaxofc4", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiflfqz2tm6h35bqnjneewn7jugdk4rpzit3e5gh3cuvctar3sot7m", + "skill/valory/decision_maker_abci/0.1.0": "bafybeidi53bxvh3otmuvpid5igm2mfwrxr57s3vh4krdywub46gfkgn54a", + "skill/valory/trader_abci/0.1.0": "bafybeie6tn5gniarudm25c5md4jfvw2kus3wae2sdbdkyj6ei4eh43mmtq", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeig4w2d6odlfxydntao7acprcbwmpqclk6twgmmhphcfzbqus32okq", "skill/valory/staking_abci/0.1.0": "bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy", - "agent/valory/trader/0.1.0": "bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy", - "service/valory/trader/0.1.0": "bafybeif5wc3hugq575pnjwjqgnsm6jzup64ey6cjvtvmtgpdjqt5g43dpu", - "service/valory/trader_pearl/0.1.0": "bafybeihy2wnyxxcxtszamxhcpvof5emevnqfw7xko2jwauxuu7ljeq2roe" + "agent/valory/trader/0.1.0": "bafybeiclnqybfzzlz55otkj54milns64ddoanq4h3bco7n67v6luhizzba", + "service/valory/trader/0.1.0": "bafybeibh5vdaeegxmm5vq62gwxc4htl2hjkm6ogsjznt73lm3p6mgx42ry", + "service/valory/trader_pearl/0.1.0": "bafybeihgbket3zt6jilgsegjqyk6etgfbwo2sz63i2qvvhuqstnl5xddki" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index c5891a7b0..2bc215e50 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -47,10 +47,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie - valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiflfqz2tm6h35bqnjneewn7jugdk4rpzit3e5gh3cuvctar3sot7m +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig4w2d6odlfxydntao7acprcbwmpqclk6twgmmhphcfzbqus32okq - valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze -- valory/decision_maker_abci:0.1.0:bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we -- valory/trader_abci:0.1.0:bafybeih25xwmgwqzsfoejfg6mssbcw57psphtrnf6makth4jg4soaxofc4 +- valory/decision_maker_abci:0.1.0:bafybeidi53bxvh3otmuvpid5igm2mfwrxr57s3vh4krdywub46gfkgn54a +- valory/trader_abci:0.1.0:bafybeie6tn5gniarudm25c5md4jfvw2kus3wae2sdbdkyj6ei4eh43mmtq - valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu - valory/check_stop_trading_abci:0.1.0:bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 09cd3fc2c..5707119d2 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy +agent: valory/trader:0.1.0:bafybeiclnqybfzzlz55otkj54milns64ddoanq4h3bco7n67v6luhizzba number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 8aca4f947..d0bc1d95c 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy +agent: valory/trader:0.1.0:bafybeiclnqybfzzlz55otkj54milns64ddoanq4h3bco7n67v6luhizzba number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 234db1861..f4041d687 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -62,9 +62,9 @@ fingerprint: tests/io_/__init__.py: bafybeicjlliuugqissa5vxqubqtkq4veyt5ksmqsgilc7zge3uvjkb5vbe tests/test_handlers.py: bafybeihpkgtjjm3uegpup6zkznpoaxqpu6kmp3ujiggrzbe73p5fzlq7im tests/test_loader.py: bafybeighetz2cls333d5xci2pdai4i7r5kyu7nr5mpajpddls6klos6yc4 - tests/test_models.py: bafybeidimg5b6vu6x2ofllndag7bojzysmuapmvi4773zuaera5mu4rqoa + tests/test_models.py: bafybeibnc46fj5e4clf2ox2jtq3tgpbfknkh3cqo5o6hyrwkrw2r7l4jv4 tests/test_payloads.py: bafybeigsftkoc7ursy7okfznbwfiy3pk2kitndfgbn35ebbz4yoptkw3zy - tests/test_redeem_info.py: bafybeiegha6yegh3vlzqpxsfrotxn4tjmtgic3j3d6ispz6btcxevpvu7i + tests/test_redeem_info.py: bafybeihigyydjtvldajuoqalnxxas6qpjbju4o4swiu2wmdwsigt2wyu2m utils/__init__.py: bafybeiazrfg3kwfdl5q45azwz6b6mobqxngxpf4hazmrnkhinpk4qhbbf4 utils/nevermined.py: bafybeigallaqxhqopznhjhefr6bukh4ojkz5vdtqyzod5dksshrf24fjgi utils/scaling.py: bafybeialr3z4zogp4k3l2bzcjfi4igvxzjexmlpgze2bai2ufc3plaow4y diff --git a/packages/valory/skills/decision_maker_abci/tests/test_models.py b/packages/valory/skills/decision_maker_abci/tests/test_models.py index cf8da7de9..5cfa2da82 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_models.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_models.py @@ -82,11 +82,15 @@ def test_claim_params(self) -> None: {"args": {"history_hash": "h1", "user": "u1", "bond": "b1", "answer": "a1"}} ] claim_params = self.redeeming_progress.claim_params - assert claim_params == ([b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' - b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'], - ['u1'], - ['b1'], - ['a1']) + assert claim_params == ( + [ + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + ], + ["u1"], + ["b1"], + ["a1"], + ) class TestSharedState: @@ -125,7 +129,7 @@ def test_current_liquidity_prices(self) -> None: def test_current_liquidity_prices_setter(self) -> None: """Test current_liquidity_prices setter.""" self.shared_state.current_liquidity_prices = [2.1] - assert self.shared_state.liquidity_prices == {'dummy_id': [2.1]} + assert self.shared_state.liquidity_prices == {"dummy_id": [2.1]} def test_current_liquidity_amounts(self) -> None: """Test current_liquidity_amounts.""" diff --git a/packages/valory/skills/decision_maker_abci/tests/test_redeem_info.py b/packages/valory/skills/decision_maker_abci/tests/test_redeem_info.py index 9f285a583..f255cd3b1 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_redeem_info.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_redeem_info.py @@ -73,17 +73,16 @@ def test_initialization(self) -> None: fpmm = FPMM( answerFinalizedTimestamp=1, collateralToken="dummy_collateral_token", - condition={ - "id": HexBytes("0x00000000000000001234567890abcdef"), - "outcomeSlotCount": 2, - }, + condition=Condition( + id=HexBytes("0x00000000000000001234567890abcdef"), outcomeSlotCount=2 + ), creator="dummy_creator", creationTimestamp=1, currentAnswer="0x1A2B3C", - question={ - "id": b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", - "data": "dummy_data", - }, + question=Question( + id=b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + data="dummy_data", + ), templateId=1, ) fpmm.__post_init__() @@ -115,7 +114,7 @@ class TestTrade: def test_initialization(self, outcomeIndex: int) -> None: """Test initialization.""" trade = Trade( - fpmm=dict( + fpmm=FPMM( answerFinalizedTimestamp=1, collateralToken="dummy_collateral_token", condition=Condition( @@ -159,7 +158,8 @@ def test_initialization(self, outcomeIndex: int) -> None: and trade.outcomeTokensTraded == 1 and trade.outcomeTokenMarginalPrice == 1.00 and trade.outcomeTokensTraded == 1 - and trade.transactionHash == "0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab" + and trade.transactionHash + == "0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab" ) if trade.outcomeIndex == 1: diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 39b3f6bdf..53cf55436 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -28,8 +28,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq - valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze -- valory/decision_maker_abci:0.1.0:bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiflfqz2tm6h35bqnjneewn7jugdk4rpzit3e5gh3cuvctar3sot7m +- valory/decision_maker_abci:0.1.0:bafybeidi53bxvh3otmuvpid5igm2mfwrxr57s3vh4krdywub46gfkgn54a +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig4w2d6odlfxydntao7acprcbwmpqclk6twgmmhphcfzbqus32okq - valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu - valory/check_stop_trading_abci:0.1.0:bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index c9443c774..1f86517f4 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -24,7 +24,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/decision_maker_abci:0.1.0:bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we +- valory/decision_maker_abci:0.1.0:bafybeidi53bxvh3otmuvpid5igm2mfwrxr57s3vh4krdywub46gfkgn54a - valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: