Skip to content

Commit 24311c8

Browse files
committed
[Requirements] add full requirements
1 parent de4306e commit 24311c8

File tree

27 files changed

+118
-40
lines changed

27 files changed

+118
-40
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
git clone -q $OCTOBOT_GH_REPO -b ${TARGET_BRANCH} || git clone -q $OCTOBOT_GH_REPO -b $OCTOBOT_DEFAULT_BRANCH
3939
cd OctoBot
4040
git status
41-
pip install --prefer-binary -r dev_requirements.txt -r requirements.txt
41+
pip install --prefer-binary -r dev_requirements.txt -r requirements.txt -r full_requirements.txt
4242
cd ..
4343
mkdir new_tentacles
4444
cp -r Automation Backtesting Evaluator Meta Services Trading profiles new_tentacles
@@ -70,7 +70,7 @@ jobs:
7070
cd OctoBot
7171
git status
7272
pip install --upgrade pip setuptools wheel
73-
pip install --prefer-binary -r dev_requirements.txt -r requirements.txt
73+
pip install --prefer-binary -r dev_requirements.txt -r requirements.txt -r full_requirements.txt
7474
cd ..
7575
mkdir new_tentacles
7676
xcopy Automation new_tentacles\\Automation /E/H/I
@@ -134,7 +134,7 @@ jobs:
134134
git clone -q $OCTOBOT_GH_REPO -b ${TARGET_BRANCH} || git clone -q $OCTOBOT_GH_REPO -b $OCTOBOT_DEFAULT_BRANCH
135135
cd OctoBot
136136
git status
137-
pip install --prefer-binary -r dev_requirements.txt -r requirements.txt
137+
pip install --prefer-binary -r dev_requirements.txt -r requirements.txt -r full_requirements.txt
138138
cd ..
139139
mkdir new_tentacles
140140
cp -r Automation Backtesting Evaluator Meta Services Trading profiles new_tentacles

Evaluator/Social/forum_evaluator/forum.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
# RedditForumEvaluator is used to get an overall state of a market, it will not trigger a trade
3131
# (notify its evaluators) but is used to measure hype and trend of a market.
3232
class RedditForumEvaluator(evaluators.SocialEvaluator):
33-
34-
SERVICE_FEED_CLASS = Services_feeds.RedditServiceFeed
33+
SERVICE_FEED_CLASS = Services_feeds.RedditServiceFeed if hasattr(Services_feeds, 'RedditServiceFeed') else None
3534

3635
def __init__(self, tentacles_setup_config):
3736
evaluators.SocialEvaluator.__init__(self, tentacles_setup_config)

Evaluator/Social/news_evaluator/news.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# disable inheritance to disable tentacle visibility. Disabled as starting from feb 9 2023, API is now paid only
2828
# class TwitterNewsEvaluator(evaluators.SocialEvaluator):
2929
class TwitterNewsEvaluator:
30-
SERVICE_FEED_CLASS = Services_feeds.TwitterServiceFeed
30+
SERVICE_FEED_CLASS = Services_feeds.TwitterServiceFeed if hasattr(Services_feeds, 'TwitterServiceFeed') else None
3131

3232
# max time to live for a pulse is 10min
3333
_EVAL_MAX_TIME_TO_LIVE = 10 * commons_constants.MINUTE_TO_SECONDS

Evaluator/Social/signal_evaluator/signal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
class TelegramSignalEvaluator(evaluators.SocialEvaluator):
26-
SERVICE_FEED_CLASS = Services_feeds.TelegramServiceFeed
26+
SERVICE_FEED_CLASS = Services_feeds.TelegramServiceFeed if hasattr(Services_feeds, 'TelegramServiceFeed') else None
2727

2828
def init_user_inputs(self, inputs: dict) -> None:
2929
channels_config = self.UI.user_input(services_constants.CONFIG_TELEGRAM_CHANNEL,
@@ -106,7 +106,7 @@ def _get_tentacle_registration_topic(self, all_symbols_by_crypto_currencies, tim
106106

107107

108108
class TelegramChannelSignalEvaluator(evaluators.SocialEvaluator):
109-
SERVICE_FEED_CLASS = Services_feeds.TelegramApiServiceFeed
109+
SERVICE_FEED_CLASS = Services_feeds.TelegramApiServiceFeed if hasattr(Services_feeds, 'TelegramApiServiceFeed') else None
110110

111111
SIGNAL_PATTERN_KEY = "signal_pattern"
112112
SIGNAL_PATTERN_MARKET_BUY_KEY = "MARKET_BUY"

Evaluator/Social/trends_evaluator/trends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
class GoogleTrendsEvaluator(evaluators.SocialEvaluator):
28-
SERVICE_FEED_CLASS = Services_feeds.GoogleServiceFeed
28+
SERVICE_FEED_CLASS = Services_feeds.GoogleServiceFeed if hasattr(Services_feeds, 'GoogleServiceFeed') else None
2929

3030
def __init__(self, tentacles_setup_config):
3131
evaluators.SocialEvaluator.__init__(self, tentacles_setup_config)

Evaluator/Util/text_analysis/text_analysis.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library.
1616

17-
import vaderSentiment.vaderSentiment as vaderSentiment
17+
import octobot_commons.constants as commons_constants
18+
try:
19+
import vaderSentiment.vaderSentiment as vaderSentiment
20+
except ImportError:
21+
if commons_constants.USE_MINIMAL_LIBS:
22+
# mock vaderSentiment imports
23+
class VaderSentimentImportMock:
24+
class SentimentIntensityAnalyzer:
25+
def __init__(self, *args):
26+
raise ImportError("vaderSentiment not installed")
27+
vaderSentiment = VaderSentimentImportMock()
1828

1929

2030
class TextAnalysis:
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from .telegram_bot import TelegramBotInterface
1+
import octobot_commons.constants as commons_constants
2+
if not commons_constants.USE_MINIMAL_LIBS:
3+
from .telegram_bot import TelegramBotInterface

Services/Interfaces/web_interface/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ def register_notifier(notification_key, notifier):
4444
STRATEGY_OPTIMIZER_NOTIFICATION_KEY = "strategy_optimizer_notifications"
4545
DASHBOARD_NOTIFICATION_KEY = "dashboard_notifications"
4646

47-
48-
# Make WebInterface visible to imports
49-
from tentacles.Services.Interfaces.web_interface.web import WebInterface
47+
import octobot_commons.constants as commons_constants
48+
if not commons_constants.USE_MINIMAL_LIBS:
49+
# Make WebInterface visible to imports
50+
from tentacles.Services.Interfaces.web_interface.web import WebInterface
5051

5152

5253
# disable server logging
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from .telegram import TelegramNotifier
1+
import octobot_commons.constants as commons_constants
2+
if not commons_constants.USE_MINIMAL_LIBS:
3+
from .telegram import TelegramNotifier
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from .twitter import TwitterNotifier
1+
import octobot_commons.constants as commons_constants
2+
if not commons_constants.USE_MINIMAL_LIBS:
3+
from .twitter import TwitterNotifier

0 commit comments

Comments
 (0)