diff --git a/octobot/community/models/strategy_data.py b/octobot/community/models/strategy_data.py index 4a214c322..6018df93c 100644 --- a/octobot/community/models/strategy_data.py +++ b/octobot/community/models/strategy_data.py @@ -23,9 +23,6 @@ CATEGORY_NAME_TRANSLATIONS_BY_SLUG = { "coingecko-index": {"en": "Crypto Basket"} } -FORCED_URL_PATH_BY_SLUG = { - "coingecko-index": "features/crypto-basket", -} DEFAULT_LOGO_NAME_BY_SLUG = { "coingecko-index": "crypto-basket.png", } @@ -108,11 +105,6 @@ class StrategyData(commons_dataclasses.FlexibleDataclass): def get_name(self, locale, default_locale=constants.DEFAULT_LOCALE): return self.content["name_translations"].get(locale, default_locale) - def get_url(self) -> str: - if path := FORCED_URL_PATH_BY_SLUG.get(self.category.slug): - return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_URL}/{path}" - return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_URL}/strategies/{self.slug}" - def get_product_url(self) -> str: return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_URL}/strategies/{self.slug}" diff --git a/requirements.txt b/requirements.txt index d41e0b94c..27ddc6d48 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ # Drakkar-Software requirements OctoBot-Commons==1.9.82 -OctoBot-Trading==2.4.216 +OctoBot-Trading==2.4.217 OctoBot-Evaluators==1.9.7 -OctoBot-Tentacles-Manager==2.9.16 +OctoBot-Tentacles-Manager==2.9.17 OctoBot-Services==1.6.26 OctoBot-Backtesting==1.9.7 Async-Channel==2.2.1 @@ -12,7 +12,7 @@ trading-backend==1.2.42 colorlog==6.8.0 requests==2.32.5 urllib3 # required by requests, used in imports: make sure it's always available -packaging==23.2 +packaging==25.0 python-dotenv==1.0.0 setuptools==79.0.1 # warning: setuptools>=80 breaks easy_install, need to find an alternative not to break installs # see https://community.palantir.com/t/important-update-on-setuptools-pinning-the-version-below-80-0-0/3872 diff --git a/tests/unit_tests/community/test_community_mqtt_feed.py b/tests/unit_tests/community/test_community_mqtt_feed.py index c712af77c..f63a4a687 100644 --- a/tests/unit_tests/community/test_community_mqtt_feed.py +++ b/tests/unit_tests/community/test_community_mqtt_feed.py @@ -31,10 +31,10 @@ NAME = "name_a" -def _build_message(value, identifier): +def _build_message(value, identifier, version=constants.COMMUNITY_FEED_CURRENT_MINIMUM_VERSION): return json.dumps({ commons_enums.CommunityFeedAttrs.CHANNEL_TYPE.value: commons_enums.CommunityChannelTypes.SIGNAL.value, - commons_enums.CommunityFeedAttrs.VERSION.value: constants.COMMUNITY_FEED_CURRENT_MINIMUM_VERSION, + commons_enums.CommunityFeedAttrs.VERSION.value: version, commons_enums.CommunityFeedAttrs.VALUE.value: value, commons_enums.CommunityFeedAttrs.ID.value: identifier, }).encode() @@ -132,3 +132,13 @@ async def test_on_message(connected_community_feed): connected_community_feed.feed_callbacks["topic"][1].reset_mock() await connected_community_feed._on_message(client, topic, message, 1, {}) assert all(cb.assert_not_called() is None for cb in connected_community_feed.feed_callbacks["topic"]) + + for cb in connected_community_feed.feed_callbacks["topic"]: + cb.reset_mock() + + for version in ["0.1.0", "333.1.0"]: + message = _build_message("hello", "2", version) + # version is not supported + await connected_community_feed._on_message(client, topic, message, 1, {}) + for cb in connected_community_feed.feed_callbacks["topic"]: + cb.assert_not_called()