Skip to content

Commit

Permalink
fixing linter checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberosa committed Nov 27, 2024
1 parent e53dbb0 commit d72e4b9
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 22 deletions.
12 changes: 6 additions & 6 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/trader_pearl/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions packages/valory/skills/decision_maker_abci/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions packages/valory/skills/decision_maker_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ 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
fsm_specification.yaml: bafybeidp2rpxbx4xlhkeraovbk5qdp2eb3zlbm5s534hxutgspoeoe4b64
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
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/trader_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d72e4b9

Please sign in to comment.