From d72e4b94d46dd7c13d4b0fafa6f28f2c41435da8 Mon Sep 17 00:00:00 2001 From: cyberosa Date: Wed, 27 Nov 2024 13:08:51 +0100 Subject: [PATCH] fixing linter checks --- packages/packages.json | 12 ++++++------ packages/valory/agents/trader/aea-config.yaml | 6 +++--- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../behaviours/decision_receive.py | 2 -- .../behaviours/decision_request.py | 1 + .../decision_maker_abci/behaviours/sampling.py | 4 ++-- packages/valory/skills/decision_maker_abci/models.py | 4 ++++ .../valory/skills/decision_maker_abci/skill.yaml | 8 ++++---- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 11 files changed, 25 insertions(+), 22 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 3b63b7f8..eea8fab3 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -16,14 +16,14 @@ "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", "skill/valory/market_manager_abci/0.1.0": "bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeig2jl42h6xaivcoyo4sm2wxprugb5qfvy6tyuazj3rw5flrvfvdta", - "skill/valory/trader_abci/0.1.0": "bafybeicvnnvdnhxdkyvtenkrlwm5suv2aisx5usswnt4uknn3fwh2zg7y4", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihnw5dvvo4zyalgmgfvylx6s3myzjulsymt5wq27p2msilgaid24u", + "skill/valory/decision_maker_abci/0.1.0": "bafybeiceebgqcansnorcwxzssfim3zphtvscpdmzjwqg4tginks43sf23u", + "skill/valory/trader_abci/0.1.0": "bafybeich2ltlouxrdtigll66n4xggauprneuf7oun7qqluijfsvl5l2lp4", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeigk2dvncnpvqyzngasivq2gufff2hq42rktkm3xlthus2ny7m3lqq", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini", - "agent/valory/trader/0.1.0": "bafybeiemp3y75nnkm6be5iaopookc6gjdlfm4ntfo6xkuwkd5rvzajvzj4", - "service/valory/trader/0.1.0": "bafybeidarmnblrr2bmz76thsak23isw4ap2rol4mgjuc3mrda4lslpylci", - "service/valory/trader_pearl/0.1.0": "bafybeiea5pwuupyaonaqwfsbkxukhv4hbnczbu2src2yhtkini5cn6hun4" + "agent/valory/trader/0.1.0": "bafybeifn3sx2cpuuiv76zxigdvprijv67tg3bvtlsjo6tsp6wd6433v7e4", + "service/valory/trader/0.1.0": "bafybeib2s47inoq44dfvpbuspdgxatt7ddutkjk2r2ctnfwp3bzg7incly", + "service/valory/trader_pearl/0.1.0": "bafybeiaaw7l5gz3wv5yiskuk2jz6tteh6niuvxj6mlppukp6xxbgvih2x4" }, "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 6277a2e1..93d8f9cc 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihnw5dvvo4zyalgmgfvylx6s3myzjulsymt5wq27p2msilgaid24u +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigk2dvncnpvqyzngasivq2gufff2hq42rktkm3xlthus2ny7m3lqq - valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeig2jl42h6xaivcoyo4sm2wxprugb5qfvy6tyuazj3rw5flrvfvdta -- valory/trader_abci:0.1.0:bafybeicvnnvdnhxdkyvtenkrlwm5suv2aisx5usswnt4uknn3fwh2zg7y4 +- valory/decision_maker_abci:0.1.0:bafybeiceebgqcansnorcwxzssfim3zphtvscpdmzjwqg4tginks43sf23u +- valory/trader_abci:0.1.0:bafybeich2ltlouxrdtigll66n4xggauprneuf7oun7qqluijfsvl5l2lp4 - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 2d03ef35..e0bdfbbc 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:bafybeiemp3y75nnkm6be5iaopookc6gjdlfm4ntfo6xkuwkd5rvzajvzj4 +agent: valory/trader:0.1.0:bafybeifn3sx2cpuuiv76zxigdvprijv67tg3bvtlsjo6tsp6wd6433v7e4 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 7ec31b32..83d32ea5 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:bafybeiemp3y75nnkm6be5iaopookc6gjdlfm4ntfo6xkuwkd5rvzajvzj4 +agent: valory/trader:0.1.0:bafybeifn3sx2cpuuiv76zxigdvprijv67tg3bvtlsjo6tsp6wd6433v7e4 number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py index 6933c3d7..47033b6a 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py @@ -491,8 +491,6 @@ def _is_profitable( liquidity_info = self._update_liquidity_info( net_bet_amount, prediction_response.vote ) - # update the sample_bet from the shared state info - # self.update_sampled_bet_from_shared_data() bet.outcomeTokenAmounts = self.shared_state.current_liquidity_amounts bet.outcomeTokenMarginalPrices = ( self.shared_state.current_liquidity_prices diff --git a/packages/valory/skills/decision_maker_abci/behaviours/decision_request.py b/packages/valory/skills/decision_maker_abci/behaviours/decision_request.py index 190bf0c0..2e3e1729 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/decision_request.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/decision_request.py @@ -73,6 +73,7 @@ def setup(self) -> None: self.context.logger.info(msg) def initialize_bet_id_row_manager(self) -> Dict[str, List[int]]: + """Initialization of the dictionary used to traverse mocked tool responses""" bets_mapping: Dict[str, List[int]] = {} dataset_filepath = ( self.params.store_path / self.benchmarking_mode.dataset_filename diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 460cf8ee..3b9f2089 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -155,13 +155,13 @@ def async_act(self) -> Generator: day_increased = False if idx is None and self.benchmarking_mode.enabled: self.context.logger.info( - f"No more markets to bet in the simulated day. Increasing simulated day." + "No more markets to bet in the simulated day. Increasing simulated day." ) self.shared_state.increase_one_day_simulation() benchmarking_finished = self.shared_state.check_benchmarking_finished() if benchmarking_finished: self.context.logger.info( - f"No more days to simulate in benchmarking mode." + "No more days to simulate in benchmarking mode." ) day_increased = True self.store_bets() diff --git a/packages/valory/skills/decision_maker_abci/models.py b/packages/valory/skills/decision_maker_abci/models.py index dc7af847..907f2e97 100644 --- a/packages/valory/skills/decision_maker_abci/models.py +++ b/packages/valory/skills/decision_maker_abci/models.py @@ -279,6 +279,7 @@ def bet_id_row_manager(self, mapping: Dict[str, List[int]]) -> None: def _initialize_simulated_now_timestamps( self, bets: List[Bet], safe_voting_range: int ) -> None: + """Creates the list of simulated days for the benchmarking mode""" self.simulated_days_idx = 0 # Find the maximum timestamp from openingTimestamp field max_timestamp = max(bet.openingTimestamp for bet in bets) @@ -305,14 +306,17 @@ def _initialize_simulated_now_timestamps( self.simulated_days = timestamps def increase_one_day_simulation(self) -> None: + """Increased the index used for the current simulated day""" self.simulated_days_idx += 1 def check_benchmarking_finished(self) -> bool: + """Checks if we simulated already all days""" return self.simulated_days_idx >= len(self.simulated_days) def get_simulated_now_timestamp( self, bets: List[Bet], safe_voting_range: int ) -> int: + """Gets the current simulated day timestamp""" if len(self.simulated_days) == 0: self._initialize_simulated_now_timestamps(bets, safe_voting_range) diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index eb37c188..05714017 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -17,14 +17,14 @@ fingerprint: behaviours/blacklisting.py: bafybeifitqx2omj5qdwokizhqjkxvybtsyxo22dxkucbtxaocafzgbseku behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e - behaviours/decision_receive.py: bafybeihdqhsknydqszh3dqfqaapbs64x7uqjtvgyfg3cv5j442ibcpbks4 - behaviours/decision_request.py: bafybeibytikxjg7bdblrr73ghimsxad6snzahzwyyrxs2mdo462mct2vm4 + behaviours/decision_receive.py: bafybeialstj5xsv7ahbjl4hhbl2u2fgdrgf3v525u4hqgg7fpje2vw4tfq + behaviours/decision_request.py: bafybeid2kelmtdkg2miiqiwmzs4sr7ynopotp3brwuy2rfl42uhlm4zzci behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm behaviours/order_subscription.py: bafybeicrmdvhci5prfldvuf3bclbbqi6j7lpv6hmphw3qwgmkmwat3od44 behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeiaxwp4lx62owcaqfp6xcqh6567f5yvwnl4rage2f5hmq4nltkzjjy behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeifwjpjsouuisrcdqo325ovhyuupjr7x3kdjapyj32xidjk2q3qssq + behaviours/sampling.py: bafybeidrcyeecrh2wzw3n56iwyon56rommc7nyjnlcdzhldpvoh25sfeoe behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -32,7 +32,7 @@ fingerprint: handlers.py: bafybeigod6gbjrxy4mbmulbzsbokeaoycoqys64vqtxnumishfukzf73za io_/__init__.py: bafybeifxgmmwjqzezzn3e6keh2bfo4cyo7y5dq2ept3stfmgglbrzfl5rq io_/loader.py: bafybeih3sdsx5dhe4kzhtoafexjgkutsujwqy3zcdrlrkhtdks45bc7exa - models.py: bafybeicbxbiaefywvfg4dh653d4zfe56mj6nwpqxlh4bknwitd27rdphre + models.py: bafybeidj22vpmi2pq3scrnriufomtituqdn2n2c6qkm6y74iflbweietgq payloads.py: bafybeihzwxhdc6a6ek2lvsyzkex4ypsl7fnahszal3dxtr7ce6wp7nmgmm policy.py: bafybeihlzs4o5e7yfmfzcvvrzkf4bhxfsg5gxnzsrpepwgfugh45gafye4 redeem_info.py: bafybeifiiix4gihfo4avraxt34sfw35v6dqq45do2drrssei2shbps63mm diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index e0150278..b8031d6b 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,8 +27,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeig2jl42h6xaivcoyo4sm2wxprugb5qfvy6tyuazj3rw5flrvfvdta -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihnw5dvvo4zyalgmgfvylx6s3myzjulsymt5wq27p2msilgaid24u +- valory/decision_maker_abci:0.1.0:bafybeiceebgqcansnorcwxzssfim3zphtvscpdmzjwqg4tginks43sf23u +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigk2dvncnpvqyzngasivq2gufff2hq42rktkm3xlthus2ny7m3lqq - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index caaa11b5..2202a4a0 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeig2jl42h6xaivcoyo4sm2wxprugb5qfvy6tyuazj3rw5flrvfvdta +- valory/decision_maker_abci:0.1.0:bafybeiceebgqcansnorcwxzssfim3zphtvscpdmzjwqg4tginks43sf23u - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: