Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions octobot/community/models/strategy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down Expand Up @@ -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}"

Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
14 changes: 12 additions & 2 deletions tests/unit_tests/community/test_community_mqtt_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Loading