From ccbb6fc2fb1fd81ea1ef753bad5770ad98fd9526 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 9 Aug 2024 17:03:41 +0100 Subject: [PATCH 01/12] test: check stop trading models tests --- .../tests/test_models.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 packages/valory/skills/check_stop_trading_abci/tests/test_models.py diff --git a/packages/valory/skills/check_stop_trading_abci/tests/test_models.py b/packages/valory/skills/check_stop_trading_abci/tests/test_models.py new file mode 100644 index 000000000..096190aa4 --- /dev/null +++ b/packages/valory/skills/check_stop_trading_abci/tests/test_models.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ + +"""Test the models.py module of the CheckStopTrading skill.""" + +from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext +from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_PARAMS +from packages.valory.skills.check_stop_trading_abci.models import SharedState, CheckStopTradingParams + + +class TestCheckStopTradingParams: + """Test CheckStopTradingParams of CheckStopTrading.""" + + def test_initialization(self) -> None: + """ Test initialization.""" + + CheckStopTradingParams(disable_trading=True, + stop_trading_if_staking_kpi_met=True, + staking_contract_address="", + staking_interaction_sleep_time=1, + mech_activity_checker_contract="", + **BASE_DUMMY_PARAMS, + ) + + +class TestSharedState: + """Test SharedState of CheckStopTrading.""" + + def test_initialization(self) -> None: + """Test initialization.""" + SharedState(name="", skill_context=DummyContext()) \ No newline at end of file From ce19b0ea77642e38f47cca43be59d4fde08bb2f1 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 19 Aug 2024 18:23:52 +0100 Subject: [PATCH 02/12] test: test_loader --- .../decision_maker_abci/tests/test_loader.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/valory/skills/decision_maker_abci/tests/test_loader.py diff --git a/packages/valory/skills/decision_maker_abci/tests/test_loader.py b/packages/valory/skills/decision_maker_abci/tests/test_loader.py new file mode 100644 index 000000000..b73a1d134 --- /dev/null +++ b/packages/valory/skills/decision_maker_abci/tests/test_loader.py @@ -0,0 +1,16 @@ +from packages.valory.skills.decision_maker_abci.io_.loader import ComponentPackageLoader + + +class TestComponentPackageLoader: + + def test_load(self) -> None: + loader = ComponentPackageLoader.load({ + "component.yaml": """ + entry_point: entry_point.py + callable: dummy_callable + """, + "entry_point.py": "dummy_function()" + }) + + assert loader == ({'entry_point': 'entry_point.py', 'callable': 'dummy_callable'}, "dummy_function()", "dummy_callable") + From 2961948e57645c8ce0cc9c9386a2f1c0bd24abe7 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 19 Aug 2024 18:46:48 +0100 Subject: [PATCH 03/12] test: test_loader completed --- .../decision_maker_abci/tests/test_loader.py | 72 ++++++++++++++++--- 1 file changed, 63 insertions(+), 9 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/tests/test_loader.py b/packages/valory/skills/decision_maker_abci/tests/test_loader.py index b73a1d134..9066c1207 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_loader.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_loader.py @@ -1,16 +1,70 @@ +from dataclasses import dataclass +from typing import Dict, Any, Optional + +import pytest + from packages.valory.skills.decision_maker_abci.io_.loader import ComponentPackageLoader +@dataclass +class LoaderTestCase: + + name: str + serialized_objects: Dict + error: Optional[Any] + class TestComponentPackageLoader: - def test_load(self) -> None: - loader = ComponentPackageLoader.load({ - "component.yaml": """ - entry_point: entry_point.py - callable: dummy_callable - """, - "entry_point.py": "dummy_function()" - }) + @pytest.mark.parametrize( + "test_case", + [ + LoaderTestCase( + name="happy path", + serialized_objects={ + "component.yaml": """ + entry_point: entry_point.py + callable: dummy_callable + """, + "entry_point.py": "dummy_function()" + }, + error=None + ), + LoaderTestCase( + name="missing component.yaml", + serialized_objects={ + "entry_point.py": "dummy_function()" + }, + error="Invalid component package. The package MUST contain a component.yaml." + ), + LoaderTestCase( + name="missing entry_point", + serialized_objects={ + "component.yaml": """ + not_entry_point: none + """, + "entry_point.py": "dummy_function()" + }, + error="Invalid component package. The component.yaml file MUST contain the 'entry_point' and 'callable' keys." + ), + LoaderTestCase( + name="happy path", + serialized_objects={ + "component.yaml": """ + entry_point: entry_point.py + callable: dummy_callable + """, + + }, + error="Invalid component package. entry_point.py is not present in the component package." + ), + ] + ) + def test_load(self, test_case) -> None: + if test_case.error: + with pytest.raises(ValueError, match=test_case.error): + ComponentPackageLoader.load(test_case.serialized_objects) + else: + loader = ComponentPackageLoader.load(test_case.serialized_objects) - assert loader == ({'entry_point': 'entry_point.py', 'callable': 'dummy_callable'}, "dummy_function()", "dummy_callable") + assert loader == ({'entry_point': 'entry_point.py', 'callable': 'dummy_callable'}, "dummy_function()", "dummy_callable") From 43a8e4ecc2518170264a06c146b7c781a26a8d53 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Thu, 22 Aug 2024 14:40:18 +0100 Subject: [PATCH 04/12] test: models added --- .../decision_maker_abci/tests/io_/__init__.py | 0 .../decision_maker_abci/tests/test_models.py | 126 ++++++++++++ .../tests/test_redeem_info.py | 127 ++++++++++++ .../skills/market_manager_abci/models.py | 5 + .../market_manager_abci/tests/test_models.py | 182 ++++++++++++++++++ .../market_manager_abci/tests/test_rounds.py | 0 .../skills/staking_abci/tests/test_models.py | 42 ++++ .../skills/trader_abci/tests/test_models.py | 145 ++++++++++++++ .../test_tx_settlement_multiplexer_models.py | 41 ++++ 9 files changed, 668 insertions(+) create mode 100644 packages/valory/skills/decision_maker_abci/tests/io_/__init__.py create mode 100644 packages/valory/skills/decision_maker_abci/tests/test_models.py create mode 100644 packages/valory/skills/decision_maker_abci/tests/test_redeem_info.py create mode 100644 packages/valory/skills/market_manager_abci/tests/test_models.py create mode 100644 packages/valory/skills/market_manager_abci/tests/test_rounds.py create mode 100644 packages/valory/skills/staking_abci/tests/test_models.py create mode 100644 packages/valory/skills/trader_abci/tests/test_models.py create mode 100644 packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py diff --git a/packages/valory/skills/decision_maker_abci/tests/io_/__init__.py b/packages/valory/skills/decision_maker_abci/tests/io_/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/packages/valory/skills/decision_maker_abci/tests/test_models.py b/packages/valory/skills/decision_maker_abci/tests/test_models.py new file mode 100644 index 000000000..437d3371a --- /dev/null +++ b/packages/valory/skills/decision_maker_abci/tests/test_models.py @@ -0,0 +1,126 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023-2024 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ +from typing import Union, Dict + +import pytest + +from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext +from packages.valory.skills.decision_maker_abci.models import PromptTemplate, LiquidityInfo, RedeemingProgress, \ + SharedState, BenchmarkingMockData + + +class TestLiquidityInfo: + """Test LiquidityInfo of DecisionMakerAbci.""" + + def setup(self): + self.liquidity_info = LiquidityInfo(l0_end=1, l1_end=1, l0_start=1, l1_start=1) + + def test_validate_end_information_raises(self) -> None: + """Test validate end information of LiquidityInfo raises.""" + + self.liquidity_info.l0_end = None + self.liquidity_info.l0_end = None + with pytest.raises(ValueError): + self.liquidity_info.validate_end_information() + + def test_validate_end_information(self) -> None: + """Test validate end information of LiquidityInfo.""" + assert self.liquidity_info.validate_end_information() == (1, 1) + + def test_get_new_prices(self) -> None: + """Test get new prices of LiquidityInfo.""" + assert self.liquidity_info.get_new_prices() == [0.5, 0.5] + + def test_get_end_liquidity(self) -> None: + """Test get_end_liquidity of LiquidityInfo.""" + assert self.liquidity_info.get_end_liquidity() == [1, 1] + + +class TestRedeemingProgress: + """Test RedeemingProgress of DecisionMakerAbci.""" + + def setup(self) -> None: + """Set up tests.""" + self.redeeming_progress = RedeemingProgress( + + ) + + def test_check_finished(self) -> None: + self.redeeming_progress.check_started = True + self.redeeming_progress.check_from_block = "latest" + assert self.redeeming_progress.check_finished is True + + def test_claim_finished(self) -> None: + self.redeeming_progress.claim_started = True + self.redeeming_progress.claim_from_block = "latest" + assert self.redeeming_progress.claim_finished is True + + def test_claim_params(self) -> None: + self.redeeming_progress.answered = [{"args": {"history_hash": "h1", "user": "u1", "bond": "b1", "answer": "a1"}}] + claim_params = self.redeeming_progress.claim_params + + +class TestSharedState: + """Test SharedState of DecisionMakerAbci.""" + + def setup(self)-> None: + """Set up tests.""" + self.shared_state = SharedState(name="", skill_context=DummyContext()) + self.shared_state.mock_data = BenchmarkingMockData(id="dummy_id", + question="dummy_question", + answer="dummy_answer", + p_yes=1.1) + self.shared_state.liquidity_prices = {"test_1": [1.1]} + self.shared_state.liquidity_amounts = {"dummy_id": [1]} + + def test_initialization(self) -> None: + """Test initialization.""" + SharedState(name="", skill_context=DummyContext()) + + def test_mock_question_id(self) -> None: + """Test mock_question_id.""" + mock_question_id = self.shared_state.mock_question_id + assert mock_question_id == "dummy_id" + + def test_get_liquidity_info(self) -> None: + """test _get_liquidity_info.""" + liquidity_data = {"dummy_id": [1], "test_1": [1.1]} + liquidity_info = self.shared_state._get_liquidity_info(liquidity_data) + assert liquidity_info == [1] + + def test_current_liquidity_prices(self) -> None: + """Test current_liquidity_prices.""" + current_liquidity_prices = self.shared_state.current_liquidity_prices + assert current_liquidity_prices == [1.1] + + 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]} + + def test_current_liquidity_amounts(self) -> None: + """test current_liquidity_amounts.""" + current_liquidity_amounts = self.shared_state.current_liquidity_amounts + assert current_liquidity_amounts == [1] + + def test_current_liquidity_amounts_setter(self) -> None: + """Test current_liquidity_prices setter.""" + self.shared_state.current_liquidity_amounts = [2] + assert self.shared_state.liquidity_amounts == {"dummy_id": [2]} + 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 new file mode 100644 index 000000000..bdc351003 --- /dev/null +++ b/packages/valory/skills/decision_maker_abci/tests/test_redeem_info.py @@ -0,0 +1,127 @@ +import pytest +from hexbytes import HexBytes + +from packages.valory.skills.decision_maker_abci.redeem_info import Condition, Question, FPMM, Trade + + +class TestCondition: + + def test_initialization(self) -> None: + condition = Condition(id="0x00000000000000001234567890abcdef", + outcomeSlotCount=2) + condition.__post_init__() + + assert condition.outcomeSlotCount == 2 + assert condition.id == HexBytes("0x00000000000000001234567890abcdef") + assert condition.index_sets == [1, 2] + + +class TestQuestion: + + @pytest.mark.parametrize( + "name, id", + [ + [ + "id as bytes", + b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' + ], + [ + "id as string", + "0x00000000000000001234567890abcdef" + ] + ] + ) + def test_initialization(self, name, id) -> None: + question = Question(id=id, + data="dummy_data") + + question.__post_init__() + + +class TestFPMM: + + def test_initialization(self) -> None: + fpmm = FPMM( + answerFinalizedTimestamp=1, + collateralToken="dummy_collateral_token", + 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"}, + templateId=1 + ) + fpmm.__post_init__() + + assert ( + fpmm.answerFinalizedTimestamp==1, + fpmm.collateralToken=="dummy_collateral_token", + fpmm.condition==Condition(id=HexBytes("0x00000000000000001234567890abcdef"), + outcomeSlotCount=2), + fpmm.creator=="dummy_creator", + fpmm.creationTimestamp==1, + fpmm.currentAnswer=="0x1A2B3C", + fpmm.question==Question(id=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', + data="dummy_data"), + fpmm.templateId==1, + fpmm.current_answer_index==1715004 + ) + + +class TestTrade: + + @pytest.mark.parametrize( + "outcomeIndex", + [ + 1, + 2 + ] + ) + def test_initialization(self, outcomeIndex) -> None: + trade = Trade( + fpmm=dict( + answerFinalizedTimestamp=1, + collateralToken="dummy_collateral_token", + condition=Condition(id=HexBytes("0x00000000000000001234567890abcdef"), + outcomeSlotCount=2), + creator="dummy_creator", + creationTimestamp=1, + currentAnswer="0x2", + 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 + ), + outcomeIndex=outcomeIndex, + outcomeTokenMarginalPrice=1.00, + outcomeTokensTraded=1, + transactionHash="0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab" + ) + + trade.__post_init__() + assert ( + trade.fpmm==FPMM( + answerFinalizedTimestamp=1, + collateralToken="dummy_collateral_token", + condition=Condition(id=HexBytes("0x00000000000000001234567890abcdef"), + outcomeSlotCount=2), + creator="dummy_creator", + creationTimestamp=1, + currentAnswer="0x2", + 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 + ), + trade.outcomeTokensTraded==1, + trade.outcomeTokenMarginalPrice==1.00, + trade.outcomeTokensTraded==1, + trade.transactionHash=="0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab", + ) + if trade.outcomeIndex==1: + assert (not trade.is_winning, + trade.claimable_amount==-1) + else: + assert (trade.is_winning, + trade.claimable_amount==2) + diff --git a/packages/valory/skills/market_manager_abci/models.py b/packages/valory/skills/market_manager_abci/models.py index c39c3fc94..4ce5799fd 100644 --- a/packages/valory/skills/market_manager_abci/models.py +++ b/packages/valory/skills/market_manager_abci/models.py @@ -52,13 +52,18 @@ class Subgraph(ApiSpecs): def process_response(self, response: HttpMessage) -> Any: """Process the response.""" res = super().process_response(response) + print(f"RES: {res}") if res is not None: + # return res return res error_data = self.response_info.error_data + print(f"ERROR DATA: {error_data}") expected_error_type = getattr(builtins, self.response_info.error_type) + print(f"EXPECTED ERROR TYPE: {expected_error_type}") if isinstance(error_data, expected_error_type): error_message_key = self.context.params.the_graph_error_message_key + print(f"ERROR MESSAGE KEY: {error_message_key}") error_message = error_data.get(error_message_key, None) if self.context.params.the_graph_payment_required_error in error_message: err = "Payment required for subsequent requests for the current 'The Graph' API key!" diff --git a/packages/valory/skills/market_manager_abci/tests/test_models.py b/packages/valory/skills/market_manager_abci/tests/test_models.py new file mode 100644 index 000000000..740b8081a --- /dev/null +++ b/packages/valory/skills/market_manager_abci/tests/test_models.py @@ -0,0 +1,182 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023-2024 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ + +"""Test the models.py module of the MarketManager skill.""" +import builtins +import unittest +from copy import deepcopy +from typing import Any, Iterator +from unittest.mock import MagicMock + +import pytest + +from packages.valory.skills.abstract_round_abci.models import ApiSpecs +from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext +from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_SPECS_CONFIG, BASE_DUMMY_PARAMS +from packages.valory.skills.market_manager_abci.models import SharedState, Subgraph, OmenSubgraph, NetworkSubgraph, MarketManagerParams + +DUMMY_SPECS_CONFIG = deepcopy(BASE_DUMMY_SPECS_CONFIG) +DUMMY_SPECS_CONFIG.update(the_graph_error_mesage_key="the_graph_error_message_key" ) + +MARKET_MANAGER_PARAMS = dict(creator_per_subgraph=dict(creator_per_subgraph=[]), + slot_count=2, + opening_margin= 1, + languages=[], + average_block_time=1, + abt_error_mult=1, + the_graph_error_message_key="test", + the_graph_payment_required_error="test") + + +class TestSharedState: + """Test SharedState of MarketManager.""" + + def test_initialization(self) -> None: + """Test initialization.""" + SharedState(name="", skill_context=DummyContext()) + + +class TestSubgraph: + """Test Subgraph of MarketManager.""" + + def setup( + self, + ) -> None: + """Setup test.""" + + self.subgraph = Subgraph( + **BASE_DUMMY_SPECS_CONFIG, + response_key="value", + response_index=0, + response_type="float", + error_key="error", + error_index=None, + error_type="str", + error_data="error text", + ) + self.subgraph.context.logger.error = MagicMock() + + + @pytest.mark.parametrize( + "api_specs_config, message, expected_res, expected_error", + ( + ( + dict( + **BASE_DUMMY_SPECS_CONFIG, + response_key="value", + response_index=None, + response_type="float", + error_key=None, + error_index=None, + error_data=None, + ), + MagicMock(body=b'{"value": "10.232"}'), + 10.232, + None, + ), + ( + dict( + **BASE_DUMMY_SPECS_CONFIG, + response_key="test:response:key", + response_index=2, + error_key="error:key", + error_index=3, + error_type="str", + error_data=1, + ), + MagicMock( + body=b'{"test": {"response": {"key": [""]}}}' + ), + None, + None, + ), + # ( + # dict( + # **DUMMY_SPECS_CONFIG, + # response_key="test:response:key", + # response_index=2, + # error_key="error:key", + # error_index=0, + # error_type="str", + # error_data=None + # ), + # MagicMock( + # body=b'{"test": {"response": {"key_does_not_match": ["does_not_matter", "does_not_matter"]}}, ' + # b'"error": {"key": {"the_graph_error_message_key": "the_graph_payment_required_error"}' + # ), + # None, + # None, + # ), + ), + ) + def test_process_response(self, + api_specs_config: dict, + message: MagicMock, + expected_res: Any, + expected_error: Any, + ) -> None: + """Test process response.""" + api_specs = Subgraph(**api_specs_config) + actual_res = api_specs.process_response(message) + assert actual_res == expected_res + if actual_res is not None: + pass + +class TestOmenSubgraph: + """Test OmenSubgraph of MarketManager.""" + + def test_initialization(self) -> None: + """Test initialization of OmenSubgraph.""" + OmenSubgraph(**BASE_DUMMY_SPECS_CONFIG) + +class TestNetworkSubgraph: + """Test NetworkSubgraph of MarketManager.""" + + def test_initialization(self) -> None: + """Test initialization of NetworkSubgraph.""" + NetworkSubgraph(**BASE_DUMMY_SPECS_CONFIG) + + +class TestMarketManagerParams(unittest.TestCase): + """Test MarketManagerParams of MarketManager.""" + + @pytest.mark.parametrize( + "test_case", + [ + ( + BASE_DUMMY_PARAMS, + MARKET_MANAGER_PARAMS + ) + ] + ) + def test_initialization(self, + test_case: dict + ) -> None: + """Test initialization""" + MarketManagerParams(test_case) + + def test_creators_iterator(self) -> None: + """Test creators iterator.""" + market_manager_params=MarketManagerParams(**BASE_DUMMY_PARAMS, + **MARKET_MANAGER_PARAMS) + + creators_iterator = market_manager_params.creators_iterator + self.assertIsInstance(creators_iterator, Iterator) + for i in creators_iterator: + print(i) \ No newline at end of file diff --git a/packages/valory/skills/market_manager_abci/tests/test_rounds.py b/packages/valory/skills/market_manager_abci/tests/test_rounds.py new file mode 100644 index 000000000..e69de29bb diff --git a/packages/valory/skills/staking_abci/tests/test_models.py b/packages/valory/skills/staking_abci/tests/test_models.py new file mode 100644 index 000000000..64d7bd689 --- /dev/null +++ b/packages/valory/skills/staking_abci/tests/test_models.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023-2024 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ + +"""Test the models.py module of the StakingAbci skill.""" +from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext +from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_PARAMS +from packages.valory.skills.staking_abci.models import SharedState, StakingParams + + +class TestStakingParams: + """Test StakingParams of the StakingAbci.""" + + def test_initialization(self) -> None: + """Test initialization.""" + StakingParams(**BASE_DUMMY_PARAMS, + staking_contract_address="test", + staking_interaction_sleep_time=1, + mech_activity_checker_contract="test") + + +class TestSharedState: + """Test SharedState of StakingAbci.""" + + def test_initialization(self) -> None: + """Test initialization.""" + SharedState(name="", skill_context=DummyContext()) \ No newline at end of file diff --git a/packages/valory/skills/trader_abci/tests/test_models.py b/packages/valory/skills/trader_abci/tests/test_models.py new file mode 100644 index 000000000..1b325c0cc --- /dev/null +++ b/packages/valory/skills/trader_abci/tests/test_models.py @@ -0,0 +1,145 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023-2024 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ + +"""Test the models.py module of the trader skill.""" +import os.path +from pathlib import Path + +from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext +from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_SPECS_CONFIG, BASE_DUMMY_PARAMS +from packages.valory.skills.market_manager_abci.tests.test_models import MARKET_MANAGER_PARAMS +from packages.valory.skills.trader_abci.models import RandomnessApi, TraderParams, SharedState, MARGIN +from packages.valory.skills.tx_settlement_multiplexer_abci.tests.test_tx_settlement_multiplexer_models import \ + DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS + +CURRENT_FILE_PATH = Path(__file__).resolve() +PACKAGE_DIR = CURRENT_FILE_PATH.parents[2] + +DUMMY_DECISION_MAKER_PARAMS = { + 'sample_bets_closing_days': 1, + 'trading_strategy': 'test', + 'use_fallback_strategy': True, + 'tools_accuracy_hash': 'test', + 'bet_threshold': 1, + 'blacklisting_duration': 1, + 'prompt_template': "@{yes}@{no}@{question}", + 'dust_threshold': 1, + 'conditional_tokens_address': '0x123', + 'realitio_proxy_address': '0x456', + 'realitio_address': '0x789', + 'event_filtering_batch_size': 1, + 'reduce_factor': 1.1, + 'minimum_batch_size': 1, + 'max_filtering_retries': 1, + 'redeeming_batch_size': 1, + 'redeem_round_timeout': 1.1, + 'slippage': 0.05, + 'policy_epsilon': 0.1, + 'agent_registry_address': '0xabc', + 'irrelevant_tools': [], + 'tool_punishment_multiplier': 1, + 'contract_timeout': 2.0, + 'file_hash_to_strategies_json': [['{"k1": "key2"}', '{"b1": "b2"}'], ['{"v1": "v2"}', '{"b1": "b2"}']], + 'strategies_kwargs': [['{"k1": "key2"}', '{"b1": "b2"}'], ['{"v1": "v2"}', '{"b1": "b2"}']], + 'use_subgraph_for_redeeming': True, + 'use_nevermined': False, + 'rpc_sleep_time': 2, + 'mech_to_subscription_params': [['{"k1": "key2"}', '{"b1": "b2"}'], ['{"v1": "v2"}', '{"b1": "b2"}']], + 'service_endpoint': 'http://example.com', + 'store_path': str(PACKAGE_DIR) + } + +DUMMY_MECH_INTERACT_PARAMS = { + 'multisend_address': '0x1234567890abcdef1234567890abcdef12345678', + 'multisend_batch_size': 100, + 'mech_contract_address': '0xabcdef1234567890abcdef1234567890abcdef12', + 'mech_request_price': 10, + 'ipfs_address': 'https://ipfs.example.com', + 'mech_chain_id': 'gnosis', + 'mech_wrapped_native_token_address': '0x9876543210abcdef9876543210abcdef98765432', + 'mech_interaction_sleep_time': 5 + } + +DUMMY_TERMINATION_PARAMS = { + "termination_sleep": 1, + "termination_from_block": 1 +} + +DUMMY_TRANSACTION_PARAMS = { + "init_fallback_gas": 1, + "keeper_allowed_retries": 1, + "validate_timeout": 300, + "finalize_timeout": 1.1, + "history_check_timeout": 1, + +} + +DUMMY_CHECK_STOP_TRADING_PARAMS = { + "disable_trading": True, + "stop_trading_if_staking_kpi_met": True +} + +DUMMY_STAKING_PARAMS = { + "staking_contract_address": "test", + "staking_interaction_sleep_time": 1, + "mech_activity_checker_contract": "test" +} + + +class TestRandomnessApi: + """Test the RandomnessApi of the Trader skill.""" + + def test_initialization(self) -> None: + """Test initialization.""" + RandomnessApi(**BASE_DUMMY_SPECS_CONFIG) + + +class TestTraderParams: + """Test the TraderParams of the Trader skill.""" + + def test_initialization(self) -> None: + """Test initialization.""" + TraderParams(**BASE_DUMMY_PARAMS, + **DUMMY_DECISION_MAKER_PARAMS, + **MARKET_MANAGER_PARAMS, + **DUMMY_MECH_INTERACT_PARAMS, + **DUMMY_TERMINATION_PARAMS, + **DUMMY_TRANSACTION_PARAMS, + **DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS, + **DUMMY_STAKING_PARAMS, + **DUMMY_CHECK_STOP_TRADING_PARAMS + ) + + +class TestSharedState: + """Test SharedState of CheckStopTrading.""" + + def setup(self) -> None: + """Set up tests.""" + self.shared_state = SharedState(name="", skill_context=DummyContext()) + + def test_initialization(self) -> None: + """Test initialization.""" + SharedState(name="", skill_context=DummyContext()) + + def test_params(self) -> None: + """Test params of SharedState.""" + + def test_setup(self) -> None: + """Test setup of SharedState.""" \ No newline at end of file diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py b/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py new file mode 100644 index 000000000..fe1dbb3c8 --- /dev/null +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2023-2024 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ +from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext +from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_PARAMS +from packages.valory.skills.tx_settlement_multiplexer_abci.models import TxSettlementMultiplexerParams, SharedState + +DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS = { + "agent_balance_threshold": 1, + "refill_check_interval": 1 +} + +class TestTxSettlementMultiplexerParams: + """Test the TxSettlementMultiplexerParams of the TxSettlementMultiplexerAbci.""" + + def test_initialization(self) -> None: + """Test initialization.""" + TxSettlementMultiplexerParams(**DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS, + **BASE_DUMMY_PARAMS) + +class TestSharedState: + """Test SharedState of TxSettlementMultiplexer skill.""" + + def test_initialization(self) -> None: + """Test initialization.""" + SharedState(name="", skill_context=DummyContext()) From 7546df8263667b38e8fdcbdcb24c1e7891b0b4c1 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 09:42:56 +0100 Subject: [PATCH 05/12] chore: generators --- packages/packages.json | 16 +++--- packages/valory/agents/trader/aea-config.yaml | 10 ++-- packages/valory/services/trader/service.yaml | 2 +- .../valory/services/trader_pearl/service.yaml | 2 +- .../skills/check_stop_trading_abci/skill.yaml | 1 + .../tests/test_models.py | 30 ++++++---- .../skills/decision_maker_abci/skill.yaml | 3 +- .../decision_maker_abci/tests/test_loader.py | 55 ++++++++++++++----- .../skills/market_manager_abci/skill.yaml | 1 + packages/valory/skills/trader_abci/skill.yaml | 8 +-- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 11 files changed, 82 insertions(+), 48 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 9931c6b49..2de2ebe91 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeiec6nnvfs6captlncrtjfygpp275vkfajvj4frrnab7thsca6337e", "contract/valory/staking_token/0.1.0": "bafybeig4fl35dn7d5gnprux2nwsqbirm7zkiujz3xvrwcjuktz6hkq4as4", "contract/valory/relayer/0.1.0": "bafybeihzgjyvhtorugjw3yldznqsbwo3aqpxowm7k2nrvj6qtwpsc7jl7u", - "skill/valory/market_manager_abci/0.1.0": "bafybeiai6djelf6d4dkxgkv46l24q2gz7736b3jdhbxslvcydpvnvrse6e", - "skill/valory/decision_maker_abci/0.1.0": "bafybeieaenzaucsz7234gynswn7f2ufsvhkhbniuc4mhh3kvu7atvdjqwu", - "skill/valory/trader_abci/0.1.0": "bafybeidqh5nmjg6jk5hwqzf3abvjd4jiabs6eroisw5nh6d557isorxely", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiatr5y2qhqkqc7xtllwagk66wfnmbvdjmokb6ptlrhczzwwn76fce", + "skill/valory/market_manager_abci/0.1.0": "bafybeifbgr5jhnhmsc5v7z77bogzo2x37rkhlqptovsifv6pxu7p4kw4vu", + "skill/valory/decision_maker_abci/0.1.0": "bafybeicamwhvad4uimrglmrnf4gigw22vvrhcpr57mtu3jmrj5v2pqi4ba", + "skill/valory/trader_abci/0.1.0": "bafybeigfyzlrdd4pcku4aacmwfo7yjludy2a3hnfxdy34gk4ufatdotegm", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicqmyes7jb3hqhhpcurdjambwtz2xntgejx5pdjb4ekndf546bio4", "skill/valory/staking_abci/0.1.0": "bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi", - "skill/valory/check_stop_trading_abci/0.1.0": "bafybeiepylk35n3faurvp7dskjkdovehftzfjrjxfkpekzuaovt5gojxne", - "agent/valory/trader/0.1.0": "bafybeifinxnuxu4ye2catrgrma7uyqm3f2hlurs4xsch27xftfo6im5ihm", - "service/valory/trader/0.1.0": "bafybeidgliu5ylcpznirtn6vfs3g4d74utzfciuo4yqgcuj3ux6iwz5v2y", - "service/valory/trader_pearl/0.1.0": "bafybeicrstlxew36hlxl7pzi73nmd44aibnhwxzkchzlec6t6yhvs7gvhy" + "skill/valory/check_stop_trading_abci/0.1.0": "bafybeid6wwiqmeppfflixhaxxwiobnxrffodhlfmdttifbukxoe67c5bfa", + "agent/valory/trader/0.1.0": "bafybeigzp5vx4zzixsivqgl6323beenvcusxbrx4jj3spq5eyfcop326ta", + "service/valory/trader/0.1.0": "bafybeicyxtdhklhxhfk36yrmb7tl2vyvehe3tzeailkgz2xja6hrukci4a", + "service/valory/trader_pearl/0.1.0": "bafybeib3w3xbxqenynobr4ivgdi2aywn7iehqel6amp7s5szhogghjxwxi" }, "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 579b38da5..eb5281d98 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -47,12 +47,12 @@ 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:bafybeiatr5y2qhqkqc7xtllwagk66wfnmbvdjmokb6ptlrhczzwwn76fce -- valory/market_manager_abci:0.1.0:bafybeiai6djelf6d4dkxgkv46l24q2gz7736b3jdhbxslvcydpvnvrse6e -- valory/decision_maker_abci:0.1.0:bafybeieaenzaucsz7234gynswn7f2ufsvhkhbniuc4mhh3kvu7atvdjqwu -- valory/trader_abci:0.1.0:bafybeidqh5nmjg6jk5hwqzf3abvjd4jiabs6eroisw5nh6d557isorxely +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicqmyes7jb3hqhhpcurdjambwtz2xntgejx5pdjb4ekndf546bio4 +- valory/market_manager_abci:0.1.0:bafybeifbgr5jhnhmsc5v7z77bogzo2x37rkhlqptovsifv6pxu7p4kw4vu +- valory/decision_maker_abci:0.1.0:bafybeicamwhvad4uimrglmrnf4gigw22vvrhcpr57mtu3jmrj5v2pqi4ba +- valory/trader_abci:0.1.0:bafybeigfyzlrdd4pcku4aacmwfo7yjludy2a3hnfxdy34gk4ufatdotegm - valory/staking_abci:0.1.0:bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi -- valory/check_stop_trading_abci:0.1.0:bafybeiepylk35n3faurvp7dskjkdovehftzfjrjxfkpekzuaovt5gojxne +- valory/check_stop_trading_abci:0.1.0:bafybeid6wwiqmeppfflixhaxxwiobnxrffodhlfmdttifbukxoe67c5bfa - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e customs: - valory/mike_strat:0.1.0:bafybeihjiol7f4ch4piwfikurdtfwzsh6qydkbsztpbwbwb2yrqdqf726m diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index e9ff9f902..e5e5f062e 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:bafybeifinxnuxu4ye2catrgrma7uyqm3f2hlurs4xsch27xftfo6im5ihm +agent: valory/trader:0.1.0:bafybeigzp5vx4zzixsivqgl6323beenvcusxbrx4jj3spq5eyfcop326ta 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 deb8d4296..c8e063d9e 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:bafybeifinxnuxu4ye2catrgrma7uyqm3f2hlurs4xsch27xftfo6im5ihm +agent: valory/trader:0.1.0:bafybeigzp5vx4zzixsivqgl6323beenvcusxbrx4jj3spq5eyfcop326ta number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/check_stop_trading_abci/skill.yaml b/packages/valory/skills/check_stop_trading_abci/skill.yaml index 46f4a866d..e380fada6 100644 --- a/packages/valory/skills/check_stop_trading_abci/skill.yaml +++ b/packages/valory/skills/check_stop_trading_abci/skill.yaml @@ -17,6 +17,7 @@ fingerprint: rounds.py: bafybeigqkzikghmzjj2ceqrnvmiiagtris3livgvn6r5z5ossk73xcfqfy tests/__init__.py: bafybeihv2cjk4va5bc5ncqtppqg2xmmxcro34bma36trtvk32gtmhdycxu tests/test_handlers.py: bafybeigpmtx2hyunzn6nxk2x4bvvybek7jvuhbk34fqlj7fgfsszcoqhxy + tests/test_models.py: bafybeiadfcrmmfpoyxdlds7l5pnvrxvimwrzbkefnbxj6sppuih7uaq564 tests/test_payloads.py: bafybeih7q7kdfxsf4ejxxqwjumwglfwwcrbqcjnuy42mkhnfwccxuhiviy fingerprint_ignore_patterns: [] connections: [] diff --git a/packages/valory/skills/check_stop_trading_abci/tests/test_models.py b/packages/valory/skills/check_stop_trading_abci/tests/test_models.py index 096190aa4..a9c5e35dd 100644 --- a/packages/valory/skills/check_stop_trading_abci/tests/test_models.py +++ b/packages/valory/skills/check_stop_trading_abci/tests/test_models.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2023 Valory AG +# Copyright 2023-2024 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,23 +20,29 @@ """Test the models.py module of the CheckStopTrading skill.""" from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext -from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_PARAMS -from packages.valory.skills.check_stop_trading_abci.models import SharedState, CheckStopTradingParams +from packages.valory.skills.abstract_round_abci.tests.test_models import ( + BASE_DUMMY_PARAMS, +) +from packages.valory.skills.check_stop_trading_abci.models import ( + CheckStopTradingParams, + SharedState, +) class TestCheckStopTradingParams: """Test CheckStopTradingParams of CheckStopTrading.""" def test_initialization(self) -> None: - """ Test initialization.""" + """Test initialization.""" - CheckStopTradingParams(disable_trading=True, - stop_trading_if_staking_kpi_met=True, - staking_contract_address="", - staking_interaction_sleep_time=1, - mech_activity_checker_contract="", - **BASE_DUMMY_PARAMS, - ) + CheckStopTradingParams( + disable_trading=True, + stop_trading_if_staking_kpi_met=True, + staking_contract_address="", + staking_interaction_sleep_time=1, + mech_activity_checker_contract="", + **BASE_DUMMY_PARAMS, + ) class TestSharedState: @@ -44,4 +50,4 @@ class TestSharedState: def test_initialization(self) -> None: """Test initialization.""" - SharedState(name="", skill_context=DummyContext()) \ No newline at end of file + SharedState(name="", skill_context=DummyContext()) diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 7deb33e00..d4d3d6a5b 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -60,6 +60,7 @@ fingerprint: tests/behaviours/test_base.py: bafybeif6pglmr7pvojylatfzaxtlk65igx6a2omyrbxfihnnft6o7p75p4 tests/conftest.py: bafybeidy5hw56kw5mxudnfbhvogofn6k4rqb4ux2bd45baedrrhmgyrude tests/test_handlers.py: bafybeihpkgtjjm3uegpup6zkznpoaxqpu6kmp3ujiggrzbe73p5fzlq7im + tests/test_loader.py: bafybeighetz2cls333d5xci2pdai4i7r5kyu7nr5mpajpddls6klos6yc4 tests/test_payloads.py: bafybeigsftkoc7ursy7okfznbwfiy3pk2kitndfgbn35ebbz4yoptkw3zy utils/__init__.py: bafybeiazrfg3kwfdl5q45azwz6b6mobqxngxpf4hazmrnkhinpk4qhbbf4 utils/nevermined.py: bafybeigallaqxhqopznhjhefr6bukh4ojkz5vdtqyzod5dksshrf24fjgi @@ -85,7 +86,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/market_manager_abci:0.1.0:bafybeiai6djelf6d4dkxgkv46l24q2gz7736b3jdhbxslvcydpvnvrse6e +- valory/market_manager_abci:0.1.0:bafybeifbgr5jhnhmsc5v7z77bogzo2x37rkhlqptovsifv6pxu7p4kw4vu - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: diff --git a/packages/valory/skills/decision_maker_abci/tests/test_loader.py b/packages/valory/skills/decision_maker_abci/tests/test_loader.py index 9066c1207..a9dd97595 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_loader.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_loader.py @@ -1,12 +1,34 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2024 Valory AG +# +# 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 tests for the loader for the decision maker abci.""" + from dataclasses import dataclass -from typing import Dict, Any, Optional +from typing import Any, Dict, Optional import pytest from packages.valory.skills.decision_maker_abci.io_.loader import ComponentPackageLoader + @dataclass class LoaderTestCase: + """Test case for Loader.""" name: str serialized_objects: Dict @@ -14,6 +36,7 @@ class LoaderTestCase: class TestComponentPackageLoader: + """Test ComponentPackageLoader.""" @pytest.mark.parametrize( "test_case", @@ -25,16 +48,14 @@ class TestComponentPackageLoader: entry_point: entry_point.py callable: dummy_callable """, - "entry_point.py": "dummy_function()" + "entry_point.py": "dummy_function()", }, - error=None + error=None, ), LoaderTestCase( name="missing component.yaml", - serialized_objects={ - "entry_point.py": "dummy_function()" - }, - error="Invalid component package. The package MUST contain a component.yaml." + serialized_objects={"entry_point.py": "dummy_function()"}, + error="Invalid component package. The package MUST contain a component.yaml.", ), LoaderTestCase( name="missing entry_point", @@ -42,9 +63,9 @@ class TestComponentPackageLoader: "component.yaml": """ not_entry_point: none """, - "entry_point.py": "dummy_function()" + "entry_point.py": "dummy_function()", }, - error="Invalid component package. The component.yaml file MUST contain the 'entry_point' and 'callable' keys." + error="Invalid component package. The component.yaml file MUST contain the 'entry_point' and 'callable' keys.", ), LoaderTestCase( name="happy path", @@ -53,18 +74,22 @@ class TestComponentPackageLoader: entry_point: entry_point.py callable: dummy_callable """, - }, - error="Invalid component package. entry_point.py is not present in the component package." + error="Invalid component package. entry_point.py is not present in the component package.", ), - ] + ], ) - def test_load(self, test_case) -> None: + def test_load(self, test_case: LoaderTestCase) -> None: + """Test load.""" + if test_case.error: with pytest.raises(ValueError, match=test_case.error): ComponentPackageLoader.load(test_case.serialized_objects) else: loader = ComponentPackageLoader.load(test_case.serialized_objects) - assert loader == ({'entry_point': 'entry_point.py', 'callable': 'dummy_callable'}, "dummy_function()", "dummy_callable") - + assert loader == ( + {"entry_point": "entry_point.py", "callable": "dummy_callable"}, + "dummy_function()", + "dummy_callable", + ) diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index ea81341a8..3ed968ff1 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -6,6 +6,7 @@ description: This skill implements the MarketManager for an AEA. license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: + .coverage: bafybeigbtoq6zhqnq4ggjruae3p6emzkm4nheggnvcca5nep5w5tzea644 README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeiafcd3m6sviezhxjr5rtcwsybauanjplchgabjctr3ukikajczrha diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 4bbfe94d5..35b2a9d8d 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,11 +26,11 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq -- valory/market_manager_abci:0.1.0:bafybeiai6djelf6d4dkxgkv46l24q2gz7736b3jdhbxslvcydpvnvrse6e -- valory/decision_maker_abci:0.1.0:bafybeieaenzaucsz7234gynswn7f2ufsvhkhbniuc4mhh3kvu7atvdjqwu -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiatr5y2qhqkqc7xtllwagk66wfnmbvdjmokb6ptlrhczzwwn76fce +- valory/market_manager_abci:0.1.0:bafybeifbgr5jhnhmsc5v7z77bogzo2x37rkhlqptovsifv6pxu7p4kw4vu +- valory/decision_maker_abci:0.1.0:bafybeicamwhvad4uimrglmrnf4gigw22vvrhcpr57mtu3jmrj5v2pqi4ba +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicqmyes7jb3hqhhpcurdjambwtz2xntgejx5pdjb4ekndf546bio4 - valory/staking_abci:0.1.0:bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi -- valory/check_stop_trading_abci:0.1.0:bafybeiepylk35n3faurvp7dskjkdovehftzfjrjxfkpekzuaovt5gojxne +- valory/check_stop_trading_abci:0.1.0:bafybeid6wwiqmeppfflixhaxxwiobnxrffodhlfmdttifbukxoe67c5bfa - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: main: diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 547c5f421..317d1ad7e 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:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/decision_maker_abci:0.1.0:bafybeieaenzaucsz7234gynswn7f2ufsvhkhbniuc4mhh3kvu7atvdjqwu +- valory/decision_maker_abci:0.1.0:bafybeicamwhvad4uimrglmrnf4gigw22vvrhcpr57mtu3jmrj5v2pqi4ba - valory/staking_abci:0.1.0:bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: From 6313a078a25293c7af20673bdd7a61695699422a Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 09:56:21 +0100 Subject: [PATCH 06/12] add models tests --- .../decision_maker_abci/tests/test_models.py | 29 ++-- .../tests/test_redeem_info.py | 128 ++++++++------- .../market_manager_abci/tests/test_models.py | 147 +++++++----------- .../skills/staking_abci/tests/test_models.py | 16 +- .../skills/trader_abci/tests/test_models.py | 146 +++++++++-------- .../test_tx_settlement_multiplexer_models.py | 19 ++- 6 files changed, 248 insertions(+), 237 deletions(-) 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 437d3371a..de9e2394d 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_models.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_models.py @@ -16,13 +16,18 @@ # limitations under the License. # # ------------------------------------------------------------------------------ -from typing import Union, Dict +from typing import Dict, Union import pytest from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext -from packages.valory.skills.decision_maker_abci.models import PromptTemplate, LiquidityInfo, RedeemingProgress, \ - SharedState, BenchmarkingMockData +from packages.valory.skills.decision_maker_abci.models import ( + BenchmarkingMockData, + LiquidityInfo, + PromptTemplate, + RedeemingProgress, + SharedState, +) class TestLiquidityInfo: @@ -57,9 +62,7 @@ class TestRedeemingProgress: def setup(self) -> None: """Set up tests.""" - self.redeeming_progress = RedeemingProgress( - - ) + self.redeeming_progress = RedeemingProgress() def test_check_finished(self) -> None: self.redeeming_progress.check_started = True @@ -72,20 +75,21 @@ def test_claim_finished(self) -> None: assert self.redeeming_progress.claim_finished is True def test_claim_params(self) -> None: - self.redeeming_progress.answered = [{"args": {"history_hash": "h1", "user": "u1", "bond": "b1", "answer": "a1"}}] + self.redeeming_progress.answered = [ + {"args": {"history_hash": "h1", "user": "u1", "bond": "b1", "answer": "a1"}} + ] claim_params = self.redeeming_progress.claim_params class TestSharedState: """Test SharedState of DecisionMakerAbci.""" - def setup(self)-> None: + def setup(self) -> None: """Set up tests.""" self.shared_state = SharedState(name="", skill_context=DummyContext()) - self.shared_state.mock_data = BenchmarkingMockData(id="dummy_id", - question="dummy_question", - answer="dummy_answer", - p_yes=1.1) + self.shared_state.mock_data = BenchmarkingMockData( + id="dummy_id", question="dummy_question", answer="dummy_answer", p_yes=1.1 + ) self.shared_state.liquidity_prices = {"test_1": [1.1]} self.shared_state.liquidity_amounts = {"dummy_id": [1]} @@ -123,4 +127,3 @@ def test_current_liquidity_amounts_setter(self) -> None: """Test current_liquidity_prices setter.""" self.shared_state.current_liquidity_amounts = [2] assert self.shared_state.liquidity_amounts == {"dummy_id": [2]} - 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 bdc351003..25d3ed57c 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 @@ -1,14 +1,19 @@ import pytest from hexbytes import HexBytes -from packages.valory.skills.decision_maker_abci.redeem_info import Condition, Question, FPMM, Trade +from packages.valory.skills.decision_maker_abci.redeem_info import ( + Condition, + FPMM, + Question, + Trade, +) class TestCondition: - def test_initialization(self) -> None: - condition = Condition(id="0x00000000000000001234567890abcdef", - outcomeSlotCount=2) + condition = Condition( + id="0x00000000000000001234567890abcdef", outcomeSlotCount=2 + ) condition.__post_init__() assert condition.outcomeSlotCount == 2 @@ -17,111 +22,114 @@ def test_initialization(self) -> None: class TestQuestion: - @pytest.mark.parametrize( "name, id", [ [ "id as bytes", - 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", ], - [ - "id as string", - "0x00000000000000001234567890abcdef" - ] - ] + ["id as string", "0x00000000000000001234567890abcdef"], + ], ) def test_initialization(self, name, id) -> None: - question = Question(id=id, - data="dummy_data") + question = Question(id=id, data="dummy_data") question.__post_init__() class TestFPMM: - def test_initialization(self) -> None: fpmm = FPMM( answerFinalizedTimestamp=1, collateralToken="dummy_collateral_token", - condition={"id":HexBytes("0x00000000000000001234567890abcdef"), - "outcomeSlotCount":2}, + 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"}, - templateId=1 + 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__() assert ( - fpmm.answerFinalizedTimestamp==1, - fpmm.collateralToken=="dummy_collateral_token", - fpmm.condition==Condition(id=HexBytes("0x00000000000000001234567890abcdef"), - outcomeSlotCount=2), - fpmm.creator=="dummy_creator", - fpmm.creationTimestamp==1, - fpmm.currentAnswer=="0x1A2B3C", - fpmm.question==Question(id=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', - data="dummy_data"), - fpmm.templateId==1, - fpmm.current_answer_index==1715004 + fpmm.answerFinalizedTimestamp == 1, + fpmm.collateralToken == "dummy_collateral_token", + fpmm.condition + == Condition( + id=HexBytes("0x00000000000000001234567890abcdef"), outcomeSlotCount=2 + ), + fpmm.creator == "dummy_creator", + fpmm.creationTimestamp == 1, + fpmm.currentAnswer == "0x1A2B3C", + fpmm.question + == Question( + id=b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + data="dummy_data", + ), + fpmm.templateId == 1, + fpmm.current_answer_index == 1715004, ) class TestTrade: - - @pytest.mark.parametrize( - "outcomeIndex", - [ - 1, - 2 - ] - ) + @pytest.mark.parametrize("outcomeIndex", [1, 2]) def test_initialization(self, outcomeIndex) -> None: trade = Trade( fpmm=dict( answerFinalizedTimestamp=1, collateralToken="dummy_collateral_token", - condition=Condition(id=HexBytes("0x00000000000000001234567890abcdef"), - outcomeSlotCount=2), + condition=Condition( + id=HexBytes("0x00000000000000001234567890abcdef"), + outcomeSlotCount=2, + ), creator="dummy_creator", creationTimestamp=1, currentAnswer="0x2", - 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 + 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, + ), outcomeIndex=outcomeIndex, outcomeTokenMarginalPrice=1.00, outcomeTokensTraded=1, - transactionHash="0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab" + transactionHash="0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab", ) trade.__post_init__() assert ( - trade.fpmm==FPMM( + trade.fpmm + == FPMM( answerFinalizedTimestamp=1, collateralToken="dummy_collateral_token", - condition=Condition(id=HexBytes("0x00000000000000001234567890abcdef"), - outcomeSlotCount=2), + condition=Condition( + id=HexBytes("0x00000000000000001234567890abcdef"), + outcomeSlotCount=2, + ), creator="dummy_creator", creationTimestamp=1, currentAnswer="0x2", - 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 + 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, ), - trade.outcomeTokensTraded==1, - trade.outcomeTokenMarginalPrice==1.00, - trade.outcomeTokensTraded==1, - trade.transactionHash=="0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab", + trade.outcomeTokensTraded == 1, + trade.outcomeTokenMarginalPrice == 1.00, + trade.outcomeTokensTraded == 1, + trade.transactionHash + == "0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab", ) - if trade.outcomeIndex==1: - assert (not trade.is_winning, - trade.claimable_amount==-1) + if trade.outcomeIndex == 1: + assert (not trade.is_winning, trade.claimable_amount == -1) else: - assert (trade.is_winning, - trade.claimable_amount==2) - + assert (trade.is_winning, trade.claimable_amount == 2) diff --git a/packages/valory/skills/market_manager_abci/tests/test_models.py b/packages/valory/skills/market_manager_abci/tests/test_models.py index 740b8081a..3a6163468 100644 --- a/packages/valory/skills/market_manager_abci/tests/test_models.py +++ b/packages/valory/skills/market_manager_abci/tests/test_models.py @@ -28,20 +28,32 @@ from packages.valory.skills.abstract_round_abci.models import ApiSpecs from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext -from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_SPECS_CONFIG, BASE_DUMMY_PARAMS -from packages.valory.skills.market_manager_abci.models import SharedState, Subgraph, OmenSubgraph, NetworkSubgraph, MarketManagerParams +from packages.valory.skills.abstract_round_abci.tests.test_models import ( + BASE_DUMMY_PARAMS, + BASE_DUMMY_SPECS_CONFIG, +) +from packages.valory.skills.market_manager_abci.models import ( + MarketManagerParams, + NetworkSubgraph, + OmenSubgraph, + SharedState, + Subgraph, +) + DUMMY_SPECS_CONFIG = deepcopy(BASE_DUMMY_SPECS_CONFIG) -DUMMY_SPECS_CONFIG.update(the_graph_error_mesage_key="the_graph_error_message_key" ) +DUMMY_SPECS_CONFIG.update(the_graph_error_mesage_key="the_graph_error_message_key") -MARKET_MANAGER_PARAMS = dict(creator_per_subgraph=dict(creator_per_subgraph=[]), - slot_count=2, - opening_margin= 1, - languages=[], - average_block_time=1, - abt_error_mult=1, - the_graph_error_message_key="test", - the_graph_payment_required_error="test") +MARKET_MANAGER_PARAMS = dict( + creator_per_subgraph=dict(creator_per_subgraph=[]), + slot_count=2, + opening_margin=1, + languages=[], + average_block_time=1, + abt_error_mult=1, + the_graph_error_message_key="test", + the_graph_payment_required_error="test", +) class TestSharedState: @@ -72,65 +84,46 @@ def setup( ) self.subgraph.context.logger.error = MagicMock() - @pytest.mark.parametrize( "api_specs_config, message, expected_res, expected_error", ( - ( - dict( - **BASE_DUMMY_SPECS_CONFIG, - response_key="value", - response_index=None, - response_type="float", - error_key=None, - error_index=None, - error_data=None, - ), - MagicMock(body=b'{"value": "10.232"}'), - 10.232, - None, + ( + dict( + **BASE_DUMMY_SPECS_CONFIG, + response_key="value", + response_index=None, + response_type="float", + error_key=None, + error_index=None, + error_data=None, ), - ( - dict( - **BASE_DUMMY_SPECS_CONFIG, - response_key="test:response:key", - response_index=2, - error_key="error:key", - error_index=3, - error_type="str", - error_data=1, - ), - MagicMock( - body=b'{"test": {"response": {"key": [""]}}}' - ), - None, - None, + MagicMock(body=b'{"value": "10.232"}'), + 10.232, + None, + ), + ( + dict( + **BASE_DUMMY_SPECS_CONFIG, + response_key="test:response:key", + response_index=2, + error_key="error:key", + error_index=3, + error_type="str", + error_data=1, ), - # ( - # dict( - # **DUMMY_SPECS_CONFIG, - # response_key="test:response:key", - # response_index=2, - # error_key="error:key", - # error_index=0, - # error_type="str", - # error_data=None - # ), - # MagicMock( - # body=b'{"test": {"response": {"key_does_not_match": ["does_not_matter", "does_not_matter"]}}, ' - # b'"error": {"key": {"the_graph_error_message_key": "the_graph_payment_required_error"}' - # ), - # None, - # None, - # ), + MagicMock(body=b'{"test": {"response": {"key": [""]}}}'), + None, + None, + ), ), ) - def test_process_response(self, - api_specs_config: dict, - message: MagicMock, - expected_res: Any, - expected_error: Any, - ) -> None: + def test_process_response( + self, + api_specs_config: dict, + message: MagicMock, + expected_res: Any, + expected_error: Any, + ) -> None: """Test process response.""" api_specs = Subgraph(**api_specs_config) actual_res = api_specs.process_response(message) @@ -138,6 +131,7 @@ def test_process_response(self, if actual_res is not None: pass + class TestOmenSubgraph: """Test OmenSubgraph of MarketManager.""" @@ -145,6 +139,7 @@ def test_initialization(self) -> None: """Test initialization of OmenSubgraph.""" OmenSubgraph(**BASE_DUMMY_SPECS_CONFIG) + class TestNetworkSubgraph: """Test NetworkSubgraph of MarketManager.""" @@ -153,30 +148,4 @@ def test_initialization(self) -> None: NetworkSubgraph(**BASE_DUMMY_SPECS_CONFIG) -class TestMarketManagerParams(unittest.TestCase): - """Test MarketManagerParams of MarketManager.""" - @pytest.mark.parametrize( - "test_case", - [ - ( - BASE_DUMMY_PARAMS, - MARKET_MANAGER_PARAMS - ) - ] - ) - def test_initialization(self, - test_case: dict - ) -> None: - """Test initialization""" - MarketManagerParams(test_case) - - def test_creators_iterator(self) -> None: - """Test creators iterator.""" - market_manager_params=MarketManagerParams(**BASE_DUMMY_PARAMS, - **MARKET_MANAGER_PARAMS) - - creators_iterator = market_manager_params.creators_iterator - self.assertIsInstance(creators_iterator, Iterator) - for i in creators_iterator: - print(i) \ No newline at end of file diff --git a/packages/valory/skills/staking_abci/tests/test_models.py b/packages/valory/skills/staking_abci/tests/test_models.py index 64d7bd689..fdbee3032 100644 --- a/packages/valory/skills/staking_abci/tests/test_models.py +++ b/packages/valory/skills/staking_abci/tests/test_models.py @@ -19,7 +19,9 @@ """Test the models.py module of the StakingAbci skill.""" from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext -from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_PARAMS +from packages.valory.skills.abstract_round_abci.tests.test_models import ( + BASE_DUMMY_PARAMS, +) from packages.valory.skills.staking_abci.models import SharedState, StakingParams @@ -28,10 +30,12 @@ class TestStakingParams: def test_initialization(self) -> None: """Test initialization.""" - StakingParams(**BASE_DUMMY_PARAMS, - staking_contract_address="test", - staking_interaction_sleep_time=1, - mech_activity_checker_contract="test") + StakingParams( + **BASE_DUMMY_PARAMS, + staking_contract_address="test", + staking_interaction_sleep_time=1, + mech_activity_checker_contract="test" + ) class TestSharedState: @@ -39,4 +43,4 @@ class TestSharedState: def test_initialization(self) -> None: """Test initialization.""" - SharedState(name="", skill_context=DummyContext()) \ No newline at end of file + SharedState(name="", skill_context=DummyContext()) diff --git a/packages/valory/skills/trader_abci/tests/test_models.py b/packages/valory/skills/trader_abci/tests/test_models.py index 1b325c0cc..d1434ee09 100644 --- a/packages/valory/skills/trader_abci/tests/test_models.py +++ b/packages/valory/skills/trader_abci/tests/test_models.py @@ -22,83 +22,100 @@ from pathlib import Path from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext -from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_SPECS_CONFIG, BASE_DUMMY_PARAMS -from packages.valory.skills.market_manager_abci.tests.test_models import MARKET_MANAGER_PARAMS -from packages.valory.skills.trader_abci.models import RandomnessApi, TraderParams, SharedState, MARGIN -from packages.valory.skills.tx_settlement_multiplexer_abci.tests.test_tx_settlement_multiplexer_models import \ - DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS +from packages.valory.skills.abstract_round_abci.tests.test_models import ( + BASE_DUMMY_PARAMS, + BASE_DUMMY_SPECS_CONFIG, +) +from packages.valory.skills.market_manager_abci.tests.test_models import ( + MARKET_MANAGER_PARAMS, +) +from packages.valory.skills.trader_abci.models import ( + MARGIN, + RandomnessApi, + SharedState, + TraderParams, +) +from packages.valory.skills.tx_settlement_multiplexer_abci.tests.test_tx_settlement_multiplexer_models import ( + DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS, +) + CURRENT_FILE_PATH = Path(__file__).resolve() PACKAGE_DIR = CURRENT_FILE_PATH.parents[2] DUMMY_DECISION_MAKER_PARAMS = { - 'sample_bets_closing_days': 1, - 'trading_strategy': 'test', - 'use_fallback_strategy': True, - 'tools_accuracy_hash': 'test', - 'bet_threshold': 1, - 'blacklisting_duration': 1, - 'prompt_template': "@{yes}@{no}@{question}", - 'dust_threshold': 1, - 'conditional_tokens_address': '0x123', - 'realitio_proxy_address': '0x456', - 'realitio_address': '0x789', - 'event_filtering_batch_size': 1, - 'reduce_factor': 1.1, - 'minimum_batch_size': 1, - 'max_filtering_retries': 1, - 'redeeming_batch_size': 1, - 'redeem_round_timeout': 1.1, - 'slippage': 0.05, - 'policy_epsilon': 0.1, - 'agent_registry_address': '0xabc', - 'irrelevant_tools': [], - 'tool_punishment_multiplier': 1, - 'contract_timeout': 2.0, - 'file_hash_to_strategies_json': [['{"k1": "key2"}', '{"b1": "b2"}'], ['{"v1": "v2"}', '{"b1": "b2"}']], - 'strategies_kwargs': [['{"k1": "key2"}', '{"b1": "b2"}'], ['{"v1": "v2"}', '{"b1": "b2"}']], - 'use_subgraph_for_redeeming': True, - 'use_nevermined': False, - 'rpc_sleep_time': 2, - 'mech_to_subscription_params': [['{"k1": "key2"}', '{"b1": "b2"}'], ['{"v1": "v2"}', '{"b1": "b2"}']], - 'service_endpoint': 'http://example.com', - 'store_path': str(PACKAGE_DIR) - } + "sample_bets_closing_days": 1, + "trading_strategy": "test", + "use_fallback_strategy": True, + "tools_accuracy_hash": "test", + "bet_threshold": 1, + "blacklisting_duration": 1, + "prompt_template": "@{yes}@{no}@{question}", + "dust_threshold": 1, + "conditional_tokens_address": "0x123", + "realitio_proxy_address": "0x456", + "realitio_address": "0x789", + "event_filtering_batch_size": 1, + "reduce_factor": 1.1, + "minimum_batch_size": 1, + "max_filtering_retries": 1, + "redeeming_batch_size": 1, + "redeem_round_timeout": 1.1, + "slippage": 0.05, + "policy_epsilon": 0.1, + "agent_registry_address": "0xabc", + "irrelevant_tools": [], + "tool_punishment_multiplier": 1, + "contract_timeout": 2.0, + "file_hash_to_strategies_json": [ + ['{"k1": "key2"}', '{"b1": "b2"}'], + ['{"v1": "v2"}', '{"b1": "b2"}'], + ], + "strategies_kwargs": [ + ['{"k1": "key2"}', '{"b1": "b2"}'], + ['{"v1": "v2"}', '{"b1": "b2"}'], + ], + "use_subgraph_for_redeeming": True, + "use_nevermined": False, + "rpc_sleep_time": 2, + "mech_to_subscription_params": [ + ['{"k1": "key2"}', '{"b1": "b2"}'], + ['{"v1": "v2"}', '{"b1": "b2"}'], + ], + "service_endpoint": "http://example.com", + "store_path": str(PACKAGE_DIR), +} DUMMY_MECH_INTERACT_PARAMS = { - 'multisend_address': '0x1234567890abcdef1234567890abcdef12345678', - 'multisend_batch_size': 100, - 'mech_contract_address': '0xabcdef1234567890abcdef1234567890abcdef12', - 'mech_request_price': 10, - 'ipfs_address': 'https://ipfs.example.com', - 'mech_chain_id': 'gnosis', - 'mech_wrapped_native_token_address': '0x9876543210abcdef9876543210abcdef98765432', - 'mech_interaction_sleep_time': 5 - } - -DUMMY_TERMINATION_PARAMS = { - "termination_sleep": 1, - "termination_from_block": 1 + "multisend_address": "0x1234567890abcdef1234567890abcdef12345678", + "multisend_batch_size": 100, + "mech_contract_address": "0xabcdef1234567890abcdef1234567890abcdef12", + "mech_request_price": 10, + "ipfs_address": "https://ipfs.example.com", + "mech_chain_id": "gnosis", + "mech_wrapped_native_token_address": "0x9876543210abcdef9876543210abcdef98765432", + "mech_interaction_sleep_time": 5, } +DUMMY_TERMINATION_PARAMS = {"termination_sleep": 1, "termination_from_block": 1} + DUMMY_TRANSACTION_PARAMS = { "init_fallback_gas": 1, "keeper_allowed_retries": 1, "validate_timeout": 300, "finalize_timeout": 1.1, "history_check_timeout": 1, - } DUMMY_CHECK_STOP_TRADING_PARAMS = { "disable_trading": True, - "stop_trading_if_staking_kpi_met": True + "stop_trading_if_staking_kpi_met": True, } DUMMY_STAKING_PARAMS = { "staking_contract_address": "test", "staking_interaction_sleep_time": 1, - "mech_activity_checker_contract": "test" + "mech_activity_checker_contract": "test", } @@ -115,16 +132,17 @@ class TestTraderParams: def test_initialization(self) -> None: """Test initialization.""" - TraderParams(**BASE_DUMMY_PARAMS, - **DUMMY_DECISION_MAKER_PARAMS, - **MARKET_MANAGER_PARAMS, - **DUMMY_MECH_INTERACT_PARAMS, - **DUMMY_TERMINATION_PARAMS, - **DUMMY_TRANSACTION_PARAMS, - **DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS, - **DUMMY_STAKING_PARAMS, - **DUMMY_CHECK_STOP_TRADING_PARAMS - ) + TraderParams( + **BASE_DUMMY_PARAMS, + **DUMMY_DECISION_MAKER_PARAMS, + **MARKET_MANAGER_PARAMS, + **DUMMY_MECH_INTERACT_PARAMS, + **DUMMY_TERMINATION_PARAMS, + **DUMMY_TRANSACTION_PARAMS, + **DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS, + **DUMMY_STAKING_PARAMS, + **DUMMY_CHECK_STOP_TRADING_PARAMS + ) class TestSharedState: @@ -142,4 +160,4 @@ def test_params(self) -> None: """Test params of SharedState.""" def test_setup(self) -> None: - """Test setup of SharedState.""" \ No newline at end of file + """Test setup of SharedState.""" diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py b/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py index fe1dbb3c8..739c9574d 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py @@ -17,21 +17,30 @@ # # ------------------------------------------------------------------------------ from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext -from packages.valory.skills.abstract_round_abci.tests.test_models import BASE_DUMMY_PARAMS -from packages.valory.skills.tx_settlement_multiplexer_abci.models import TxSettlementMultiplexerParams, SharedState +from packages.valory.skills.abstract_round_abci.tests.test_models import ( + BASE_DUMMY_PARAMS, +) +from packages.valory.skills.tx_settlement_multiplexer_abci.models import ( + SharedState, + TxSettlementMultiplexerParams, +) + DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS = { "agent_balance_threshold": 1, - "refill_check_interval": 1 + "refill_check_interval": 1, } + class TestTxSettlementMultiplexerParams: """Test the TxSettlementMultiplexerParams of the TxSettlementMultiplexerAbci.""" def test_initialization(self) -> None: """Test initialization.""" - TxSettlementMultiplexerParams(**DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS, - **BASE_DUMMY_PARAMS) + TxSettlementMultiplexerParams( + **DUMMY_TX_SETTLEMENT_MULTIPLEXER_PARAMS, **BASE_DUMMY_PARAMS + ) + class TestSharedState: """Test SharedState of TxSettlementMultiplexer skill.""" From 071de1ed54d20fcd89a4e6d2ec9f76f8a407bfb8 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 10:59:39 +0100 Subject: [PATCH 07/12] code checks fixes and generators --- packages/packages.json | 18 ++--- packages/valory/agents/trader/aea-config.yaml | 12 +-- packages/valory/services/trader/service.yaml | 2 +- .../valory/services/trader_pearl/service.yaml | 2 +- .../skills/check_stop_trading_abci/skill.yaml | 2 +- .../skills/decision_maker_abci/skill.yaml | 5 +- .../decision_maker_abci/tests/io_/__init__.py | 20 +++++ .../decision_maker_abci/tests/test_models.py | 25 +++++-- .../tests/test_redeem_info.py | 75 +++++++++++++------ .../skills/market_manager_abci/models.py | 1 - .../skills/market_manager_abci/skill.yaml | 3 +- .../market_manager_abci/tests/test_models.py | 10 +-- .../market_manager_abci/tests/test_rounds.py | 0 .../valory/skills/staking_abci/skill.yaml | 1 + packages/valory/skills/trader_abci/skill.yaml | 11 +-- .../skills/trader_abci/tests/test_models.py | 3 +- .../tx_settlement_multiplexer_abci/skill.yaml | 5 +- .../test_tx_settlement_multiplexer_models.py | 2 + 18 files changed, 129 insertions(+), 68 deletions(-) delete mode 100644 packages/valory/skills/market_manager_abci/tests/test_rounds.py diff --git a/packages/packages.json b/packages/packages.json index 2de2ebe91..a7592f3dd 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeiec6nnvfs6captlncrtjfygpp275vkfajvj4frrnab7thsca6337e", "contract/valory/staking_token/0.1.0": "bafybeig4fl35dn7d5gnprux2nwsqbirm7zkiujz3xvrwcjuktz6hkq4as4", "contract/valory/relayer/0.1.0": "bafybeihzgjyvhtorugjw3yldznqsbwo3aqpxowm7k2nrvj6qtwpsc7jl7u", - "skill/valory/market_manager_abci/0.1.0": "bafybeifbgr5jhnhmsc5v7z77bogzo2x37rkhlqptovsifv6pxu7p4kw4vu", - "skill/valory/decision_maker_abci/0.1.0": "bafybeicamwhvad4uimrglmrnf4gigw22vvrhcpr57mtu3jmrj5v2pqi4ba", - "skill/valory/trader_abci/0.1.0": "bafybeigfyzlrdd4pcku4aacmwfo7yjludy2a3hnfxdy34gk4ufatdotegm", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicqmyes7jb3hqhhpcurdjambwtz2xntgejx5pdjb4ekndf546bio4", - "skill/valory/staking_abci/0.1.0": "bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi", - "skill/valory/check_stop_trading_abci/0.1.0": "bafybeid6wwiqmeppfflixhaxxwiobnxrffodhlfmdttifbukxoe67c5bfa", - "agent/valory/trader/0.1.0": "bafybeigzp5vx4zzixsivqgl6323beenvcusxbrx4jj3spq5eyfcop326ta", - "service/valory/trader/0.1.0": "bafybeicyxtdhklhxhfk36yrmb7tl2vyvehe3tzeailkgz2xja6hrukci4a", - "service/valory/trader_pearl/0.1.0": "bafybeib3w3xbxqenynobr4ivgdi2aywn7iehqel6amp7s5szhogghjxwxi" + "skill/valory/market_manager_abci/0.1.0": "bafybeig36dsoo6zjiju2r3qhouaa5djnmjfkcgubvlp4hvs2eg7tpxbdjy", + "skill/valory/decision_maker_abci/0.1.0": "bafybeibl3mzpbpbvpyhasxlf2h2uv4qfxnc2rkv5pale6araicmov7f7li", + "skill/valory/trader_abci/0.1.0": "bafybeic3hwbx4tjo4hodlqychp4fchwygsiqval2id4b5am4xrrmshmw7q", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeidaulqnuqjctppateirss63wcez5l4b6p5cxjmfkx6nslwkg7i44m", + "skill/valory/staking_abci/0.1.0": "bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu", + "skill/valory/check_stop_trading_abci/0.1.0": "bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy", + "agent/valory/trader/0.1.0": "bafybeihphicy4yngruvy7bjpwqtzya5vof7d4ynl7ppv3za5j3a4xtjx4q", + "service/valory/trader/0.1.0": "bafybeigbppgnsegvc436dsmzg4bvw5glscahw5k65lobbmy76mbxzlqcea", + "service/valory/trader_pearl/0.1.0": "bafybeigbiqw6jiz6vxdkblfff2dwd56opjgueudett6sztdw3vlsexzcpm" }, "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 eb5281d98..6468a70fd 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -47,12 +47,12 @@ 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:bafybeicqmyes7jb3hqhhpcurdjambwtz2xntgejx5pdjb4ekndf546bio4 -- valory/market_manager_abci:0.1.0:bafybeifbgr5jhnhmsc5v7z77bogzo2x37rkhlqptovsifv6pxu7p4kw4vu -- valory/decision_maker_abci:0.1.0:bafybeicamwhvad4uimrglmrnf4gigw22vvrhcpr57mtu3jmrj5v2pqi4ba -- valory/trader_abci:0.1.0:bafybeigfyzlrdd4pcku4aacmwfo7yjludy2a3hnfxdy34gk4ufatdotegm -- valory/staking_abci:0.1.0:bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi -- valory/check_stop_trading_abci:0.1.0:bafybeid6wwiqmeppfflixhaxxwiobnxrffodhlfmdttifbukxoe67c5bfa +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeidaulqnuqjctppateirss63wcez5l4b6p5cxjmfkx6nslwkg7i44m +- valory/market_manager_abci:0.1.0:bafybeig36dsoo6zjiju2r3qhouaa5djnmjfkcgubvlp4hvs2eg7tpxbdjy +- valory/decision_maker_abci:0.1.0:bafybeibl3mzpbpbvpyhasxlf2h2uv4qfxnc2rkv5pale6araicmov7f7li +- valory/trader_abci:0.1.0:bafybeic3hwbx4tjo4hodlqychp4fchwygsiqval2id4b5am4xrrmshmw7q +- valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu +- valory/check_stop_trading_abci:0.1.0:bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e customs: - valory/mike_strat:0.1.0:bafybeihjiol7f4ch4piwfikurdtfwzsh6qydkbsztpbwbwb2yrqdqf726m diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index e5e5f062e..d16fc7df2 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:bafybeigzp5vx4zzixsivqgl6323beenvcusxbrx4jj3spq5eyfcop326ta +agent: valory/trader:0.1.0:bafybeihphicy4yngruvy7bjpwqtzya5vof7d4ynl7ppv3za5j3a4xtjx4q 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 c8e063d9e..bbe6defc0 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:bafybeigzp5vx4zzixsivqgl6323beenvcusxbrx4jj3spq5eyfcop326ta +agent: valory/trader:0.1.0:bafybeihphicy4yngruvy7bjpwqtzya5vof7d4ynl7ppv3za5j3a4xtjx4q number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/check_stop_trading_abci/skill.yaml b/packages/valory/skills/check_stop_trading_abci/skill.yaml index e380fada6..55555ebe2 100644 --- a/packages/valory/skills/check_stop_trading_abci/skill.yaml +++ b/packages/valory/skills/check_stop_trading_abci/skill.yaml @@ -26,7 +26,7 @@ contracts: protocols: [] skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/staking_abci:0.1.0:bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi +- valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu behaviours: main: args: {} diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index d4d3d6a5b..f65ef68d6 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -59,9 +59,12 @@ fingerprint: tests/behaviours/dummy_strategy/dummy_strategy.py: bafybeig5e3xfr7gxsakfj4stbxqcwdiljl7klvgahkuwe3obzxgkg3qt2e tests/behaviours/test_base.py: bafybeif6pglmr7pvojylatfzaxtlk65igx6a2omyrbxfihnnft6o7p75p4 tests/conftest.py: bafybeidy5hw56kw5mxudnfbhvogofn6k4rqb4ux2bd45baedrrhmgyrude + tests/io_/__init__.py: bafybeicjlliuugqissa5vxqubqtkq4veyt5ksmqsgilc7zge3uvjkb5vbe tests/test_handlers.py: bafybeihpkgtjjm3uegpup6zkznpoaxqpu6kmp3ujiggrzbe73p5fzlq7im tests/test_loader.py: bafybeighetz2cls333d5xci2pdai4i7r5kyu7nr5mpajpddls6klos6yc4 + tests/test_models.py: bafybeidimg5b6vu6x2ofllndag7bojzysmuapmvi4773zuaera5mu4rqoa tests/test_payloads.py: bafybeigsftkoc7ursy7okfznbwfiy3pk2kitndfgbn35ebbz4yoptkw3zy + tests/test_redeem_info.py: bafybeiegha6yegh3vlzqpxsfrotxn4tjmtgic3j3d6ispz6btcxevpvu7i utils/__init__.py: bafybeiazrfg3kwfdl5q45azwz6b6mobqxngxpf4hazmrnkhinpk4qhbbf4 utils/nevermined.py: bafybeigallaqxhqopznhjhefr6bukh4ojkz5vdtqyzod5dksshrf24fjgi utils/scaling.py: bafybeialr3z4zogp4k3l2bzcjfi4igvxzjexmlpgze2bai2ufc3plaow4y @@ -86,7 +89,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/market_manager_abci:0.1.0:bafybeifbgr5jhnhmsc5v7z77bogzo2x37rkhlqptovsifv6pxu7p4kw4vu +- valory/market_manager_abci:0.1.0:bafybeig36dsoo6zjiju2r3qhouaa5djnmjfkcgubvlp4hvs2eg7tpxbdjy - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: diff --git a/packages/valory/skills/decision_maker_abci/tests/io_/__init__.py b/packages/valory/skills/decision_maker_abci/tests/io_/__init__.py index e69de29bb..5dc73b0f3 100644 --- a/packages/valory/skills/decision_maker_abci/tests/io_/__init__.py +++ b/packages/valory/skills/decision_maker_abci/tests/io_/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2024 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ + +"""Tests for _io pakage of decision_maker skill.""" 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 de9e2394d..cf8da7de9 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_models.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_models.py @@ -16,7 +16,7 @@ # limitations under the License. # # ------------------------------------------------------------------------------ -from typing import Dict, Union +"""This file contains tests for the models of decision maker skill.""" import pytest @@ -24,7 +24,6 @@ from packages.valory.skills.decision_maker_abci.models import ( BenchmarkingMockData, LiquidityInfo, - PromptTemplate, RedeemingProgress, SharedState, ) @@ -33,7 +32,8 @@ class TestLiquidityInfo: """Test LiquidityInfo of DecisionMakerAbci.""" - def setup(self): + def setup(self) -> None: + """Set up tests.""" self.liquidity_info = LiquidityInfo(l0_end=1, l1_end=1, l0_start=1, l1_start=1) def test_validate_end_information_raises(self) -> None: @@ -65,20 +65,28 @@ def setup(self) -> None: self.redeeming_progress = RedeemingProgress() def test_check_finished(self) -> None: + """Test check finished.""" self.redeeming_progress.check_started = True self.redeeming_progress.check_from_block = "latest" assert self.redeeming_progress.check_finished is True def test_claim_finished(self) -> None: + """Test claim finished.""" self.redeeming_progress.claim_started = True self.redeeming_progress.claim_from_block = "latest" assert self.redeeming_progress.claim_finished is True def test_claim_params(self) -> None: + """Test claim params.""" self.redeeming_progress.answered = [ {"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']) class TestSharedState: @@ -90,8 +98,9 @@ def setup(self) -> None: self.shared_state.mock_data = BenchmarkingMockData( id="dummy_id", question="dummy_question", answer="dummy_answer", p_yes=1.1 ) - self.shared_state.liquidity_prices = {"test_1": [1.1]} + self.shared_state.liquidity_prices = {"dummy_id": [1.1]} self.shared_state.liquidity_amounts = {"dummy_id": [1]} + self.shared_state.liquidity_data = {"current_liquidity_prices": [1.1]} def test_initialization(self) -> None: """Test initialization.""" @@ -103,8 +112,8 @@ def test_mock_question_id(self) -> None: assert mock_question_id == "dummy_id" def test_get_liquidity_info(self) -> None: - """test _get_liquidity_info.""" - liquidity_data = {"dummy_id": [1], "test_1": [1.1]} + """Test _get_liquidity_info.""" + liquidity_data = {"dummy_id": [1]} liquidity_info = self.shared_state._get_liquidity_info(liquidity_data) assert liquidity_info == [1] @@ -116,10 +125,10 @@ 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.""" + """Test current_liquidity_amounts.""" current_liquidity_amounts = self.shared_state.current_liquidity_amounts assert current_liquidity_amounts == [1] 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 25d3ed57c..9f285a583 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 @@ -1,3 +1,24 @@ +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2024 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ + +"""Tests for redeem info of decision_maker skill.""" + import pytest from hexbytes import HexBytes @@ -10,7 +31,10 @@ class TestCondition: + """Test condition.""" + def test_initialization(self) -> None: + """Test initialization.""" condition = Condition( id="0x00000000000000001234567890abcdef", outcomeSlotCount=2 ) @@ -22,6 +46,8 @@ def test_initialization(self) -> None: class TestQuestion: + """Test Question.""" + @pytest.mark.parametrize( "name, id", [ @@ -32,14 +58,18 @@ class TestQuestion: ["id as string", "0x00000000000000001234567890abcdef"], ], ) - def test_initialization(self, name, id) -> None: + def test_initialization(self, name: str, id: bytes) -> None: + """Test initialization.""" question = Question(id=id, data="dummy_data") question.__post_init__() class TestFPMM: + """Test FPMM.""" + def test_initialization(self) -> None: + """Test initialization""" fpmm = FPMM( answerFinalizedTimestamp=1, collateralToken="dummy_collateral_token", @@ -59,28 +89,31 @@ def test_initialization(self) -> None: fpmm.__post_init__() assert ( - fpmm.answerFinalizedTimestamp == 1, - fpmm.collateralToken == "dummy_collateral_token", - fpmm.condition + fpmm.answerFinalizedTimestamp == 1 + and fpmm.collateralToken == "dummy_collateral_token" + and fpmm.condition == Condition( id=HexBytes("0x00000000000000001234567890abcdef"), outcomeSlotCount=2 - ), - fpmm.creator == "dummy_creator", - fpmm.creationTimestamp == 1, - fpmm.currentAnswer == "0x1A2B3C", - fpmm.question + ) + and fpmm.creator == "dummy_creator" + and fpmm.creationTimestamp == 1 + and fpmm.currentAnswer == "0x1A2B3C" + and fpmm.question == Question( id=b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", data="dummy_data", - ), - fpmm.templateId == 1, - fpmm.current_answer_index == 1715004, + ) + and fpmm.templateId == 1 + and fpmm.current_answer_index == 1715004 ) class TestTrade: + """Test Trade.""" + @pytest.mark.parametrize("outcomeIndex", [1, 2]) - def test_initialization(self, outcomeIndex) -> None: + def test_initialization(self, outcomeIndex: int) -> None: + """Test initialization.""" trade = Trade( fpmm=dict( answerFinalizedTimestamp=1, @@ -122,14 +155,14 @@ def test_initialization(self, outcomeIndex) -> None: data="dummy_data", ), templateId=1, - ), - trade.outcomeTokensTraded == 1, - trade.outcomeTokenMarginalPrice == 1.00, - trade.outcomeTokensTraded == 1, - trade.transactionHash - == "0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab", + ) + and trade.outcomeTokensTraded == 1 + and trade.outcomeTokenMarginalPrice == 1.00 + and trade.outcomeTokensTraded == 1 + and trade.transactionHash == "0x5b6a3f8eaa6c8a5c3b123d456e7890abcdef1234567890abcdef1234567890ab" ) + if trade.outcomeIndex == 1: - assert (not trade.is_winning, trade.claimable_amount == -1) + assert not trade.is_winning, trade.claimable_amount == -1 else: - assert (trade.is_winning, trade.claimable_amount == 2) + assert trade.is_winning, trade.claimable_amount == 2 diff --git a/packages/valory/skills/market_manager_abci/models.py b/packages/valory/skills/market_manager_abci/models.py index 4ce5799fd..c6b0c8831 100644 --- a/packages/valory/skills/market_manager_abci/models.py +++ b/packages/valory/skills/market_manager_abci/models.py @@ -54,7 +54,6 @@ def process_response(self, response: HttpMessage) -> Any: res = super().process_response(response) print(f"RES: {res}") if res is not None: - # return res return res error_data = self.response_info.error_data diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 3ed968ff1..92bda4db1 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -23,11 +23,12 @@ fingerprint: graph_tooling/requests.py: bafybeibjyb6av33aswnptttekj6t7k7xysgphh2bigoorcgkc54y2j3xkm graph_tooling/utils.py: bafybeig5hxhnqgyfn5ym3poc5nziqwpeozqbd6wa4s6c2hjn6iyedg3t3y handlers.py: bafybeihot2i2yvfkz2gcowvt66wdu6tkjbmv7hsmc4jzt4reqeaiuphbtu - models.py: bafybeibjttnga54y4auz6f33ecfrngyw53b2xzpompm72drjsr4xoytmiy + models.py: bafybeihd224ixbyx7lnhivatczwniucm45diy2zos6i5yhvmbj775ny5nu payloads.py: bafybeicfymvvtdpkcgmkvthfzmb7dqakepkzslqrz6rcs7nxkz7qq3mrzy rounds.py: bafybeigdwc4sr7gvxth4suaz36x7fmrn3jhlertwq4rcch4clyuxq435wa tests/__init__.py: bafybeigaewntxawezvygss345kytjijo56bfwddjtfm6egzxfajsgojam4 tests/test_handlers.py: bafybeiaz3idwevvlplcyieaqo5oeikuthlte6e2gi4ajw452ylvimwgiki + tests/test_models.py: bafybeiddkkekl2xsebvpisfkixhg5aqdnpes234s6mcwjvxv5xlqw7sowi tests/test_payloads.py: bafybeidvld43p5c4wpwi7m6rfzontkheqqgxdchjnme5b54wmldojc5dmm fingerprint_ignore_patterns: [] connections: [] diff --git a/packages/valory/skills/market_manager_abci/tests/test_models.py b/packages/valory/skills/market_manager_abci/tests/test_models.py index 3a6163468..47057b190 100644 --- a/packages/valory/skills/market_manager_abci/tests/test_models.py +++ b/packages/valory/skills/market_manager_abci/tests/test_models.py @@ -18,22 +18,17 @@ # ------------------------------------------------------------------------------ """Test the models.py module of the MarketManager skill.""" -import builtins -import unittest from copy import deepcopy -from typing import Any, Iterator +from typing import Any from unittest.mock import MagicMock import pytest -from packages.valory.skills.abstract_round_abci.models import ApiSpecs from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext from packages.valory.skills.abstract_round_abci.tests.test_models import ( - BASE_DUMMY_PARAMS, BASE_DUMMY_SPECS_CONFIG, ) from packages.valory.skills.market_manager_abci.models import ( - MarketManagerParams, NetworkSubgraph, OmenSubgraph, SharedState, @@ -146,6 +141,3 @@ class TestNetworkSubgraph: def test_initialization(self) -> None: """Test initialization of NetworkSubgraph.""" NetworkSubgraph(**BASE_DUMMY_SPECS_CONFIG) - - - diff --git a/packages/valory/skills/market_manager_abci/tests/test_rounds.py b/packages/valory/skills/market_manager_abci/tests/test_rounds.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/valory/skills/staking_abci/skill.yaml b/packages/valory/skills/staking_abci/skill.yaml index 39144ec26..1f26a7b32 100644 --- a/packages/valory/skills/staking_abci/skill.yaml +++ b/packages/valory/skills/staking_abci/skill.yaml @@ -17,6 +17,7 @@ fingerprint: rounds.py: bafybeic7kre4hriounn6at63fjzttw45zoivxatg23cmojok4ah6fca7ca tests/__init__.py: bafybeid7m6ynosqeb4mvsss2hqg75aly5o2d47r7yfg2xtgwzkkilv2d2m tests/test_handers.py: bafybeibnxlwznx3tsdpjpzh62bnp6lq7zdpolyjxfvxeumzz52ljxfzpme + tests/test_models.py: bafybeic6pfmjy4kj2r4uxp5fp2zw2dj53ynirmq4duvxcec6mftvv5eshu tests/test_payloads.py: bafybeiaq2dxpbein6qhipalibi57x6niiydxi6kvbpeqripzlngcgpb3qq fingerprint_ignore_patterns: [] connections: [] diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 35b2a9d8d..845429c03 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -15,6 +15,7 @@ fingerprint: handlers.py: bafybeibbxybbi66em63ad33cllymypr3za3f5xvor3m2krhuxoyxnqjnxu models.py: bafybeidrtcycxhuig776kjhnuonwlvjmn4kb2n3uvxdrpmc3hwn65qsolm tests/__init__.py: bafybeiadatapyjh3e7ucg2ehz77oms3ihrbutwb2cs2tkjehy54utwvuyi + tests/test_models.py: bafybeiefcrk547wccqwc7cps5uiom6bz2algvqqz5rxywd5tofkuox2h3q tests/tests_handlers.py: bafybeifxvd63qblqpsmyvj7k4dbqubab2pshao5zd2zs2srs7rt32zvciu fingerprint_ignore_patterns: [] connections: [] @@ -26,11 +27,11 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq -- valory/market_manager_abci:0.1.0:bafybeifbgr5jhnhmsc5v7z77bogzo2x37rkhlqptovsifv6pxu7p4kw4vu -- valory/decision_maker_abci:0.1.0:bafybeicamwhvad4uimrglmrnf4gigw22vvrhcpr57mtu3jmrj5v2pqi4ba -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicqmyes7jb3hqhhpcurdjambwtz2xntgejx5pdjb4ekndf546bio4 -- valory/staking_abci:0.1.0:bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi -- valory/check_stop_trading_abci:0.1.0:bafybeid6wwiqmeppfflixhaxxwiobnxrffodhlfmdttifbukxoe67c5bfa +- valory/market_manager_abci:0.1.0:bafybeig36dsoo6zjiju2r3qhouaa5djnmjfkcgubvlp4hvs2eg7tpxbdjy +- valory/decision_maker_abci:0.1.0:bafybeibl3mzpbpbvpyhasxlf2h2uv4qfxnc2rkv5pale6araicmov7f7li +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeidaulqnuqjctppateirss63wcez5l4b6p5cxjmfkx6nslwkg7i44m +- valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu +- valory/check_stop_trading_abci:0.1.0:bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: main: diff --git a/packages/valory/skills/trader_abci/tests/test_models.py b/packages/valory/skills/trader_abci/tests/test_models.py index d1434ee09..5e76e8e8e 100644 --- a/packages/valory/skills/trader_abci/tests/test_models.py +++ b/packages/valory/skills/trader_abci/tests/test_models.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """Test the models.py module of the trader skill.""" -import os.path + from pathlib import Path from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext @@ -30,7 +30,6 @@ MARKET_MANAGER_PARAMS, ) from packages.valory.skills.trader_abci.models import ( - MARGIN, RandomnessApi, SharedState, TraderParams, diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 317d1ad7e..fc9fd143c 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -16,6 +16,7 @@ fingerprint: rounds.py: bafybeig3dhhrf5tkj63b3bk2mqfprcwzk3galz2ukzvdenz4g2femaixku tests/__init__.py: bafybeiat74pbtmxvylsz7karp57qp2v7y6wtrsz572jkrghbcssoudgjay tests/test_handlers.py: bafybeiayuktfupylm3p3ygufjb66swzxhpbmioqoffwuauakfgbkwrv7ma + tests/test_tx_settlement_multiplexer_models.py: bafybeidqbnncg3zersztdryd2i2gmvdwksak3cccmvbd5zhxhomkpwmxca fingerprint_ignore_patterns: [] connections: [] contracts: [] @@ -23,8 +24,8 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/decision_maker_abci:0.1.0:bafybeicamwhvad4uimrglmrnf4gigw22vvrhcpr57mtu3jmrj5v2pqi4ba -- valory/staking_abci:0.1.0:bafybeiduborfqevheegy3plk7bzhkl4fukwixvlb57tenijdepintubbdi +- valory/decision_maker_abci:0.1.0:bafybeibl3mzpbpbvpyhasxlf2h2uv4qfxnc2rkv5pale6araicmov7f7li +- valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: main: diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py b/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py index 739c9574d..f69f1a750 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/tests/test_tx_settlement_multiplexer_models.py @@ -16,6 +16,8 @@ # limitations under the License. # # ------------------------------------------------------------------------------ +"""Tests for the models of the tx settlement multiplexer.""" + from packages.valory.skills.abstract_round_abci.test_tools.base import DummyContext from packages.valory.skills.abstract_round_abci.tests.test_models import ( BASE_DUMMY_PARAMS, From 7d3d66c62f8f2ee6760204e5e80a25bc32c56e47 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 11:08:18 +0100 Subject: [PATCH 08/12] revert models changes --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- .../valory/skills/market_manager_abci/models.py | 4 ---- .../valory/skills/market_manager_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 9 files changed, 19 insertions(+), 23 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index a7592f3dd..973c4535d 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeiec6nnvfs6captlncrtjfygpp275vkfajvj4frrnab7thsca6337e", "contract/valory/staking_token/0.1.0": "bafybeig4fl35dn7d5gnprux2nwsqbirm7zkiujz3xvrwcjuktz6hkq4as4", "contract/valory/relayer/0.1.0": "bafybeihzgjyvhtorugjw3yldznqsbwo3aqpxowm7k2nrvj6qtwpsc7jl7u", - "skill/valory/market_manager_abci/0.1.0": "bafybeig36dsoo6zjiju2r3qhouaa5djnmjfkcgubvlp4hvs2eg7tpxbdjy", - "skill/valory/decision_maker_abci/0.1.0": "bafybeibl3mzpbpbvpyhasxlf2h2uv4qfxnc2rkv5pale6araicmov7f7li", - "skill/valory/trader_abci/0.1.0": "bafybeic3hwbx4tjo4hodlqychp4fchwygsiqval2id4b5am4xrrmshmw7q", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeidaulqnuqjctppateirss63wcez5l4b6p5cxjmfkx6nslwkg7i44m", + "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/staking_abci/0.1.0": "bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy", - "agent/valory/trader/0.1.0": "bafybeihphicy4yngruvy7bjpwqtzya5vof7d4ynl7ppv3za5j3a4xtjx4q", - "service/valory/trader/0.1.0": "bafybeigbppgnsegvc436dsmzg4bvw5glscahw5k65lobbmy76mbxzlqcea", - "service/valory/trader_pearl/0.1.0": "bafybeigbiqw6jiz6vxdkblfff2dwd56opjgueudett6sztdw3vlsexzcpm" + "agent/valory/trader/0.1.0": "bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy", + "service/valory/trader/0.1.0": "bafybeif5wc3hugq575pnjwjqgnsm6jzup64ey6cjvtvmtgpdjqt5g43dpu", + "service/valory/trader_pearl/0.1.0": "bafybeihy2wnyxxcxtszamxhcpvof5emevnqfw7xko2jwauxuu7ljeq2roe" }, "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 6468a70fd..c5891a7b0 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:bafybeidaulqnuqjctppateirss63wcez5l4b6p5cxjmfkx6nslwkg7i44m -- valory/market_manager_abci:0.1.0:bafybeig36dsoo6zjiju2r3qhouaa5djnmjfkcgubvlp4hvs2eg7tpxbdjy -- valory/decision_maker_abci:0.1.0:bafybeibl3mzpbpbvpyhasxlf2h2uv4qfxnc2rkv5pale6araicmov7f7li -- valory/trader_abci:0.1.0:bafybeic3hwbx4tjo4hodlqychp4fchwygsiqval2id4b5am4xrrmshmw7q +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiflfqz2tm6h35bqnjneewn7jugdk4rpzit3e5gh3cuvctar3sot7m +- valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze +- valory/decision_maker_abci:0.1.0:bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we +- valory/trader_abci:0.1.0:bafybeih25xwmgwqzsfoejfg6mssbcw57psphtrnf6makth4jg4soaxofc4 - 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 d16fc7df2..09cd3fc2c 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:bafybeihphicy4yngruvy7bjpwqtzya5vof7d4ynl7ppv3za5j3a4xtjx4q +agent: valory/trader:0.1.0:bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy 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 bbe6defc0..8aca4f947 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:bafybeihphicy4yngruvy7bjpwqtzya5vof7d4ynl7ppv3za5j3a4xtjx4q +agent: valory/trader:0.1.0:bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy 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 f65ef68d6..234db1861 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -89,7 +89,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/market_manager_abci:0.1.0:bafybeig36dsoo6zjiju2r3qhouaa5djnmjfkcgubvlp4hvs2eg7tpxbdjy +- valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: diff --git a/packages/valory/skills/market_manager_abci/models.py b/packages/valory/skills/market_manager_abci/models.py index c6b0c8831..c39c3fc94 100644 --- a/packages/valory/skills/market_manager_abci/models.py +++ b/packages/valory/skills/market_manager_abci/models.py @@ -52,17 +52,13 @@ class Subgraph(ApiSpecs): def process_response(self, response: HttpMessage) -> Any: """Process the response.""" res = super().process_response(response) - print(f"RES: {res}") if res is not None: return res error_data = self.response_info.error_data - print(f"ERROR DATA: {error_data}") expected_error_type = getattr(builtins, self.response_info.error_type) - print(f"EXPECTED ERROR TYPE: {expected_error_type}") if isinstance(error_data, expected_error_type): error_message_key = self.context.params.the_graph_error_message_key - print(f"ERROR MESSAGE KEY: {error_message_key}") error_message = error_data.get(error_message_key, None) if self.context.params.the_graph_payment_required_error in error_message: err = "Payment required for subsequent requests for the current 'The Graph' API key!" diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 92bda4db1..4ee4cb8aa 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -23,7 +23,7 @@ fingerprint: graph_tooling/requests.py: bafybeibjyb6av33aswnptttekj6t7k7xysgphh2bigoorcgkc54y2j3xkm graph_tooling/utils.py: bafybeig5hxhnqgyfn5ym3poc5nziqwpeozqbd6wa4s6c2hjn6iyedg3t3y handlers.py: bafybeihot2i2yvfkz2gcowvt66wdu6tkjbmv7hsmc4jzt4reqeaiuphbtu - models.py: bafybeihd224ixbyx7lnhivatczwniucm45diy2zos6i5yhvmbj775ny5nu + models.py: bafybeibjttnga54y4auz6f33ecfrngyw53b2xzpompm72drjsr4xoytmiy payloads.py: bafybeicfymvvtdpkcgmkvthfzmb7dqakepkzslqrz6rcs7nxkz7qq3mrzy rounds.py: bafybeigdwc4sr7gvxth4suaz36x7fmrn3jhlertwq4rcch4clyuxq435wa tests/__init__.py: bafybeigaewntxawezvygss345kytjijo56bfwddjtfm6egzxfajsgojam4 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 845429c03..39b3f6bdf 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,9 +27,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq -- valory/market_manager_abci:0.1.0:bafybeig36dsoo6zjiju2r3qhouaa5djnmjfkcgubvlp4hvs2eg7tpxbdjy -- valory/decision_maker_abci:0.1.0:bafybeibl3mzpbpbvpyhasxlf2h2uv4qfxnc2rkv5pale6araicmov7f7li -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeidaulqnuqjctppateirss63wcez5l4b6p5cxjmfkx6nslwkg7i44m +- 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/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 fc9fd143c..c9443c774 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:bafybeibl3mzpbpbvpyhasxlf2h2uv4qfxnc2rkv5pale6araicmov7f7li +- valory/decision_maker_abci:0.1.0:bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we - valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: From 5ea72385c82c128888f8992ec6d4329305c78614 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 12:01:43 +0100 Subject: [PATCH 09/12] generators --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- .../valory/services/trader_pearl/service.yaml | 2 +- .../skills/decision_maker_abci/skill.yaml | 2 +- .../skills/market_manager_abci/skill.yaml | 1 + .../market_manager_abci/tests/test_rounds.py | 19 +++++++++++++++++++ packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 9 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 packages/valory/skills/market_manager_abci/tests/test_rounds.py diff --git a/packages/packages.json b/packages/packages.json index 973c4535d..5051d2421 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeiec6nnvfs6captlncrtjfygpp275vkfajvj4frrnab7thsca6337e", "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/market_manager_abci/0.1.0": "bafybeihkwnez6serxzp5wsammvxbl3a267jwo6lxhzvkaw3btwpg4eqgte", + "skill/valory/decision_maker_abci/0.1.0": "bafybeig5r6s5gwv2whtjurlkbunhmphoqjgtuldxgmex44qrjnstio6rl4", + "skill/valory/trader_abci/0.1.0": "bafybeigweqymioiszq5lbx4sf5q3hbue4crwkzgndxczxjw6k447zuywvq", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeifqvuphxbysgwvr7yuvjttgw63b22y4wmmdyforlm6bzv3h4rkt5i", "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": "bafybeif2ftgnvpvjd6r3dpihrspomb7cwfhxizhgzkacvjk3fc4mvxqrxq", + "service/valory/trader/0.1.0": "bafybeicplbmolvhdjlf4szdx76j7rs3uwp33puo6gopo6horryubqqnh5a", + "service/valory/trader_pearl/0.1.0": "bafybeiebpxwxdhonqe7gpuy4cutfbiajcfebilgcfzcwu2zv6e4wlxedga" }, "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..87faa59fa 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/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze -- valory/decision_maker_abci:0.1.0:bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we -- valory/trader_abci:0.1.0:bafybeih25xwmgwqzsfoejfg6mssbcw57psphtrnf6makth4jg4soaxofc4 +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifqvuphxbysgwvr7yuvjttgw63b22y4wmmdyforlm6bzv3h4rkt5i +- valory/market_manager_abci:0.1.0:bafybeihkwnez6serxzp5wsammvxbl3a267jwo6lxhzvkaw3btwpg4eqgte +- valory/decision_maker_abci:0.1.0:bafybeig5r6s5gwv2whtjurlkbunhmphoqjgtuldxgmex44qrjnstio6rl4 +- valory/trader_abci:0.1.0:bafybeigweqymioiszq5lbx4sf5q3hbue4crwkzgndxczxjw6k447zuywvq - 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..05d301d6d 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:bafybeif2ftgnvpvjd6r3dpihrspomb7cwfhxizhgzkacvjk3fc4mvxqrxq 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..960d6dedf 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:bafybeif2ftgnvpvjd6r3dpihrspomb7cwfhxizhgzkacvjk3fc4mvxqrxq 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..2d8cc3a83 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -89,7 +89,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze +- valory/market_manager_abci:0.1.0:bafybeihkwnez6serxzp5wsammvxbl3a267jwo6lxhzvkaw3btwpg4eqgte - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 4ee4cb8aa..8a5ae90a6 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -30,6 +30,7 @@ fingerprint: tests/test_handlers.py: bafybeiaz3idwevvlplcyieaqo5oeikuthlte6e2gi4ajw452ylvimwgiki tests/test_models.py: bafybeiddkkekl2xsebvpisfkixhg5aqdnpes234s6mcwjvxv5xlqw7sowi tests/test_payloads.py: bafybeidvld43p5c4wpwi7m6rfzontkheqqgxdchjnme5b54wmldojc5dmm + tests/test_rounds.py: bafybeidkwfdu5svrtxme3w7enwit45jghanywfke6ivaacawsoyqw6f4sa fingerprint_ignore_patterns: [] connections: [] contracts: [] diff --git a/packages/valory/skills/market_manager_abci/tests/test_rounds.py b/packages/valory/skills/market_manager_abci/tests/test_rounds.py new file mode 100644 index 000000000..c2d0689f7 --- /dev/null +++ b/packages/valory/skills/market_manager_abci/tests/test_rounds.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# ------------------------------------------------------------------------------ +# +# Copyright 2021-2024 Valory AG +# +# 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. +# +# ------------------------------------------------------------------------------ diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 39b3f6bdf..6e42ca0b6 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,9 +27,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie - 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/market_manager_abci:0.1.0:bafybeihkwnez6serxzp5wsammvxbl3a267jwo6lxhzvkaw3btwpg4eqgte +- valory/decision_maker_abci:0.1.0:bafybeig5r6s5gwv2whtjurlkbunhmphoqjgtuldxgmex44qrjnstio6rl4 +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifqvuphxbysgwvr7yuvjttgw63b22y4wmmdyforlm6bzv3h4rkt5i - 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..e6c4112a7 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:bafybeig5r6s5gwv2whtjurlkbunhmphoqjgtuldxgmex44qrjnstio6rl4 - valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: From 460a6e157f8659650f3ae5490927c95a46808701 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 12:02:37 +0100 Subject: [PATCH 10/12] generators --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- .../valory/services/trader_pearl/service.yaml | 2 +- .../skills/decision_maker_abci/skill.yaml | 2 +- .../skills/market_manager_abci/skill.yaml | 1 - .../market_manager_abci/tests/test_rounds.py | 19 ------------------- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 9 files changed, 18 insertions(+), 38 deletions(-) delete mode 100644 packages/valory/skills/market_manager_abci/tests/test_rounds.py diff --git a/packages/packages.json b/packages/packages.json index 5051d2421..973c4535d 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeiec6nnvfs6captlncrtjfygpp275vkfajvj4frrnab7thsca6337e", "contract/valory/staking_token/0.1.0": "bafybeig4fl35dn7d5gnprux2nwsqbirm7zkiujz3xvrwcjuktz6hkq4as4", "contract/valory/relayer/0.1.0": "bafybeihzgjyvhtorugjw3yldznqsbwo3aqpxowm7k2nrvj6qtwpsc7jl7u", - "skill/valory/market_manager_abci/0.1.0": "bafybeihkwnez6serxzp5wsammvxbl3a267jwo6lxhzvkaw3btwpg4eqgte", - "skill/valory/decision_maker_abci/0.1.0": "bafybeig5r6s5gwv2whtjurlkbunhmphoqjgtuldxgmex44qrjnstio6rl4", - "skill/valory/trader_abci/0.1.0": "bafybeigweqymioiszq5lbx4sf5q3hbue4crwkzgndxczxjw6k447zuywvq", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeifqvuphxbysgwvr7yuvjttgw63b22y4wmmdyforlm6bzv3h4rkt5i", + "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/staking_abci/0.1.0": "bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy", - "agent/valory/trader/0.1.0": "bafybeif2ftgnvpvjd6r3dpihrspomb7cwfhxizhgzkacvjk3fc4mvxqrxq", - "service/valory/trader/0.1.0": "bafybeicplbmolvhdjlf4szdx76j7rs3uwp33puo6gopo6horryubqqnh5a", - "service/valory/trader_pearl/0.1.0": "bafybeiebpxwxdhonqe7gpuy4cutfbiajcfebilgcfzcwu2zv6e4wlxedga" + "agent/valory/trader/0.1.0": "bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy", + "service/valory/trader/0.1.0": "bafybeif5wc3hugq575pnjwjqgnsm6jzup64ey6cjvtvmtgpdjqt5g43dpu", + "service/valory/trader_pearl/0.1.0": "bafybeihy2wnyxxcxtszamxhcpvof5emevnqfw7xko2jwauxuu7ljeq2roe" }, "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 87faa59fa..c5891a7b0 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:bafybeifqvuphxbysgwvr7yuvjttgw63b22y4wmmdyforlm6bzv3h4rkt5i -- valory/market_manager_abci:0.1.0:bafybeihkwnez6serxzp5wsammvxbl3a267jwo6lxhzvkaw3btwpg4eqgte -- valory/decision_maker_abci:0.1.0:bafybeig5r6s5gwv2whtjurlkbunhmphoqjgtuldxgmex44qrjnstio6rl4 -- valory/trader_abci:0.1.0:bafybeigweqymioiszq5lbx4sf5q3hbue4crwkzgndxczxjw6k447zuywvq +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiflfqz2tm6h35bqnjneewn7jugdk4rpzit3e5gh3cuvctar3sot7m +- valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze +- valory/decision_maker_abci:0.1.0:bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we +- valory/trader_abci:0.1.0:bafybeih25xwmgwqzsfoejfg6mssbcw57psphtrnf6makth4jg4soaxofc4 - 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 05d301d6d..09cd3fc2c 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:bafybeif2ftgnvpvjd6r3dpihrspomb7cwfhxizhgzkacvjk3fc4mvxqrxq +agent: valory/trader:0.1.0:bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy 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 960d6dedf..8aca4f947 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:bafybeif2ftgnvpvjd6r3dpihrspomb7cwfhxizhgzkacvjk3fc4mvxqrxq +agent: valory/trader:0.1.0:bafybeia7nfj7sduozo5o55ke6ixvefzp3p5uehapz4m7hepwy5lx64iqmy 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 2d8cc3a83..234db1861 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -89,7 +89,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/market_manager_abci:0.1.0:bafybeihkwnez6serxzp5wsammvxbl3a267jwo6lxhzvkaw3btwpg4eqgte +- valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 8a5ae90a6..4ee4cb8aa 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -30,7 +30,6 @@ fingerprint: tests/test_handlers.py: bafybeiaz3idwevvlplcyieaqo5oeikuthlte6e2gi4ajw452ylvimwgiki tests/test_models.py: bafybeiddkkekl2xsebvpisfkixhg5aqdnpes234s6mcwjvxv5xlqw7sowi tests/test_payloads.py: bafybeidvld43p5c4wpwi7m6rfzontkheqqgxdchjnme5b54wmldojc5dmm - tests/test_rounds.py: bafybeidkwfdu5svrtxme3w7enwit45jghanywfke6ivaacawsoyqw6f4sa fingerprint_ignore_patterns: [] connections: [] contracts: [] diff --git a/packages/valory/skills/market_manager_abci/tests/test_rounds.py b/packages/valory/skills/market_manager_abci/tests/test_rounds.py deleted file mode 100644 index c2d0689f7..000000000 --- a/packages/valory/skills/market_manager_abci/tests/test_rounds.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# ------------------------------------------------------------------------------ -# -# Copyright 2021-2024 Valory AG -# -# 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. -# -# ------------------------------------------------------------------------------ diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 6e42ca0b6..39b3f6bdf 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,9 +27,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/termination_abci:0.1.0:bafybeif2zim2de356eo3sipkmoev5emwadpqqzk3huwqarywh4tmqt3vzq -- valory/market_manager_abci:0.1.0:bafybeihkwnez6serxzp5wsammvxbl3a267jwo6lxhzvkaw3btwpg4eqgte -- valory/decision_maker_abci:0.1.0:bafybeig5r6s5gwv2whtjurlkbunhmphoqjgtuldxgmex44qrjnstio6rl4 -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifqvuphxbysgwvr7yuvjttgw63b22y4wmmdyforlm6bzv3h4rkt5i +- 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/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 e6c4112a7..c9443c774 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:bafybeig5r6s5gwv2whtjurlkbunhmphoqjgtuldxgmex44qrjnstio6rl4 +- valory/decision_maker_abci:0.1.0:bafybeicsxmt3a3ptewtoj6csxfchc3kbsu2o66tq6gkbcvcrxabkcc37we - valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: From 28825af7b2c973475505ee6a566c456115dba7b0 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 13:19:30 +0100 Subject: [PATCH 11/12] 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: From bc93c24fdc90f76d0b4ed4927bf2d2e54f4e6371 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 23 Aug 2024 15:55:54 +0100 Subject: [PATCH 12/12] lock packages --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- .../valory/skills/market_manager_abci/skill.yaml | 1 - packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 18 insertions(+), 19 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 172d0c0bf..df0557afa 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeiec6nnvfs6captlncrtjfygpp275vkfajvj4frrnab7thsca6337e", "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": "bafybeidi53bxvh3otmuvpid5igm2mfwrxr57s3vh4krdywub46gfkgn54a", - "skill/valory/trader_abci/0.1.0": "bafybeie6tn5gniarudm25c5md4jfvw2kus3wae2sdbdkyj6ei4eh43mmtq", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeig4w2d6odlfxydntao7acprcbwmpqclk6twgmmhphcfzbqus32okq", + "skill/valory/market_manager_abci/0.1.0": "bafybeid5ne5o75g4lipoagsaw4elo63tlukn6litdghcygtcuxjvqoehq4", + "skill/valory/decision_maker_abci/0.1.0": "bafybeigrg3qrekuvqqegizifj3l323hemqtxd5i2jfw6blprsa4iyt75ha", + "skill/valory/trader_abci/0.1.0": "bafybeibp6qumpdewwsxl7crt4mahlbq72fn5ji52bnujz6khc2zkiiqtwy", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeieyzzoo7kg7nyoa35ezykbkecipvzf6as63zwdvvem2m2zbgj3vme", "skill/valory/staking_abci/0.1.0": "bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeif6my6vcflbdki7okfhpote3szyywqi7ns5mb72j53vsy5k3pqlpy", - "agent/valory/trader/0.1.0": "bafybeiclnqybfzzlz55otkj54milns64ddoanq4h3bco7n67v6luhizzba", - "service/valory/trader/0.1.0": "bafybeibh5vdaeegxmm5vq62gwxc4htl2hjkm6ogsjznt73lm3p6mgx42ry", - "service/valory/trader_pearl/0.1.0": "bafybeihgbket3zt6jilgsegjqyk6etgfbwo2sz63i2qvvhuqstnl5xddki" + "agent/valory/trader/0.1.0": "bafybeiaxqyyyttr7uky44nfkovpbbalvulrzaryppishcmb6tvqpl63ob4", + "service/valory/trader/0.1.0": "bafybeicwisgz2ljub3raqxztlgnyh5zvrzytshncatux7xbhlcef2wtpdi", + "service/valory/trader_pearl/0.1.0": "bafybeibp3sccmcpq26jxfmgf75dv6ff4pucvkirvghosehoxmfyvbvidxq" }, "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 2bc215e50..fa5b074ee 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:bafybeig4w2d6odlfxydntao7acprcbwmpqclk6twgmmhphcfzbqus32okq -- valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze -- valory/decision_maker_abci:0.1.0:bafybeidi53bxvh3otmuvpid5igm2mfwrxr57s3vh4krdywub46gfkgn54a -- valory/trader_abci:0.1.0:bafybeie6tn5gniarudm25c5md4jfvw2kus3wae2sdbdkyj6ei4eh43mmtq +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeieyzzoo7kg7nyoa35ezykbkecipvzf6as63zwdvvem2m2zbgj3vme +- valory/market_manager_abci:0.1.0:bafybeid5ne5o75g4lipoagsaw4elo63tlukn6litdghcygtcuxjvqoehq4 +- valory/decision_maker_abci:0.1.0:bafybeigrg3qrekuvqqegizifj3l323hemqtxd5i2jfw6blprsa4iyt75ha +- valory/trader_abci:0.1.0:bafybeibp6qumpdewwsxl7crt4mahlbq72fn5ji52bnujz6khc2zkiiqtwy - 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 5707119d2..91b4fb3f7 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:bafybeiclnqybfzzlz55otkj54milns64ddoanq4h3bco7n67v6luhizzba +agent: valory/trader:0.1.0:bafybeiaxqyyyttr7uky44nfkovpbbalvulrzaryppishcmb6tvqpl63ob4 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 d0bc1d95c..7cfa7f64f 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:bafybeiclnqybfzzlz55otkj54milns64ddoanq4h3bco7n67v6luhizzba +agent: valory/trader:0.1.0:bafybeiaxqyyyttr7uky44nfkovpbbalvulrzaryppishcmb6tvqpl63ob4 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 f4041d687..8da897960 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -89,7 +89,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeiar2yhzxacfe3qqamqhaihtlcimquwedffctw55sowx6rac3cm3ui -- valory/market_manager_abci:0.1.0:bafybeiabosuej3jjwji7kpjtxrlfhrbu3qvyt4qtq5pohydkcqtgv4etze +- valory/market_manager_abci:0.1.0:bafybeid5ne5o75g4lipoagsaw4elo63tlukn6litdghcygtcuxjvqoehq4 - valory/transaction_settlement_abci:0.1.0:bafybeic3tccdjypuge2lewtlgprwkbb53lhgsgn7oiwzyrcrrptrbeyote - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 4ee4cb8aa..90f9bace1 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -6,7 +6,6 @@ description: This skill implements the MarketManager for an AEA. license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: - .coverage: bafybeigbtoq6zhqnq4ggjruae3p6emzkm4nheggnvcca5nep5w5tzea644 README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeiafcd3m6sviezhxjr5rtcwsybauanjplchgabjctr3ukikajczrha diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 53cf55436..1b27842db 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,9 +27,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeiameewywqigpupy3u2iwnkfczeiiucue74x2l5lbge74rmw6bgaie - 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:bafybeidi53bxvh3otmuvpid5igm2mfwrxr57s3vh4krdywub46gfkgn54a -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig4w2d6odlfxydntao7acprcbwmpqclk6twgmmhphcfzbqus32okq +- valory/market_manager_abci:0.1.0:bafybeid5ne5o75g4lipoagsaw4elo63tlukn6litdghcygtcuxjvqoehq4 +- valory/decision_maker_abci:0.1.0:bafybeigrg3qrekuvqqegizifj3l323hemqtxd5i2jfw6blprsa4iyt75ha +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeieyzzoo7kg7nyoa35ezykbkecipvzf6as63zwdvvem2m2zbgj3vme - 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 1f86517f4..e8d01f8d5 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:bafybeidi53bxvh3otmuvpid5igm2mfwrxr57s3vh4krdywub46gfkgn54a +- valory/decision_maker_abci:0.1.0:bafybeigrg3qrekuvqqegizifj3l323hemqtxd5i2jfw6blprsa4iyt75ha - valory/staking_abci:0.1.0:bafybeicdmf7eqgnf7dyaau4jhvmsje7ueehiq5bhlekzslikntl5zomxmu - valory/mech_interact_abci:0.1.0:bafybeih2cck5xu6yaibomwtm5zbcp6llghr3ighdnk56fzwu3ihu5xx35e behaviours: