Skip to content

Commit 8807c01

Browse files
authored
Merge pull request #3076 from Drakkar-Software/dev
Master update
2 parents 7420e1f + a90eac3 commit 8807c01

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

octobot/community/models/strategy_data.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
CATEGORY_NAME_TRANSLATIONS_BY_SLUG = {
2424
"coingecko-index": {"en": "Crypto Basket"}
2525
}
26-
FORCED_URL_PATH_BY_SLUG = {
27-
"coingecko-index": "features/crypto-basket",
28-
}
2926
DEFAULT_LOGO_NAME_BY_SLUG = {
3027
"coingecko-index": "crypto-basket.png",
3128
}
@@ -108,11 +105,6 @@ class StrategyData(commons_dataclasses.FlexibleDataclass):
108105
def get_name(self, locale, default_locale=constants.DEFAULT_LOCALE):
109106
return self.content["name_translations"].get(locale, default_locale)
110107

111-
def get_url(self) -> str:
112-
if path := FORCED_URL_PATH_BY_SLUG.get(self.category.slug):
113-
return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_URL}/{path}"
114-
return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_URL}/strategies/{self.slug}"
115-
116108
def get_product_url(self) -> str:
117109
return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_URL}/strategies/{self.slug}"
118110

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Drakkar-Software requirements
22
OctoBot-Commons==1.9.82
3-
OctoBot-Trading==2.4.216
3+
OctoBot-Trading==2.4.217
44
OctoBot-Evaluators==1.9.7
5-
OctoBot-Tentacles-Manager==2.9.16
5+
OctoBot-Tentacles-Manager==2.9.17
66
OctoBot-Services==1.6.26
77
OctoBot-Backtesting==1.9.7
88
Async-Channel==2.2.1
@@ -12,7 +12,7 @@ trading-backend==1.2.42
1212
colorlog==6.8.0
1313
requests==2.32.5
1414
urllib3 # required by requests, used in imports: make sure it's always available
15-
packaging==23.2
15+
packaging==25.0
1616
python-dotenv==1.0.0
1717
setuptools==79.0.1 # warning: setuptools>=80 breaks easy_install, need to find an alternative not to break installs
1818
# see https://community.palantir.com/t/important-update-on-setuptools-pinning-the-version-below-80-0-0/3872

tests/unit_tests/community/test_community_mqtt_feed.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
NAME = "name_a"
3232

3333

34-
def _build_message(value, identifier):
34+
def _build_message(value, identifier, version=constants.COMMUNITY_FEED_CURRENT_MINIMUM_VERSION):
3535
return json.dumps({
3636
commons_enums.CommunityFeedAttrs.CHANNEL_TYPE.value: commons_enums.CommunityChannelTypes.SIGNAL.value,
37-
commons_enums.CommunityFeedAttrs.VERSION.value: constants.COMMUNITY_FEED_CURRENT_MINIMUM_VERSION,
37+
commons_enums.CommunityFeedAttrs.VERSION.value: version,
3838
commons_enums.CommunityFeedAttrs.VALUE.value: value,
3939
commons_enums.CommunityFeedAttrs.ID.value: identifier,
4040
}).encode()
@@ -132,3 +132,13 @@ async def test_on_message(connected_community_feed):
132132
connected_community_feed.feed_callbacks["topic"][1].reset_mock()
133133
await connected_community_feed._on_message(client, topic, message, 1, {})
134134
assert all(cb.assert_not_called() is None for cb in connected_community_feed.feed_callbacks["topic"])
135+
136+
for cb in connected_community_feed.feed_callbacks["topic"]:
137+
cb.reset_mock()
138+
139+
for version in ["0.1.0", "333.1.0"]:
140+
message = _build_message("hello", "2", version)
141+
# version is not supported
142+
await connected_community_feed._on_message(client, topic, message, 1, {})
143+
for cb in connected_community_feed.feed_callbacks["topic"]:
144+
cb.assert_not_called()

0 commit comments

Comments
 (0)