Skip to content

Commit

Permalink
Merge branch 'samueldg-disable-alpha-warning' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lenak25 committed Oct 16, 2018
2 parents 49707e6 + 8471044 commit 028cbc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions catalyst/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
SUPPORTED_WALLETS = ['metamask', 'ledger', 'trezor', 'bitbox', 'keystore',
'key']

DISABLE_ALPHA_WARNING = bool(os.environ.get('CATALYST_DISABLE_ALPHA_WARNING'))

ALPHA_WARNING_MESSAGE = 'Catalyst is currently in ALPHA. It is going ' \
'through rapid development and it is subject to ' \
'errors. Please use carefully. We encourage you to ' \
Expand Down
8 changes: 5 additions & 3 deletions catalyst/utils/run_algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
DataPortalExchangeBacktest
from catalyst.exchange.exchange_asset_finder import ExchangeAssetFinder

from catalyst.constants import LOG_LEVEL, ALPHA_WARNING_MESSAGE
from catalyst.constants import LOG_LEVEL, ALPHA_WARNING_MESSAGE, \
DISABLE_ALPHA_WARNING

log = Logger('run_algo', level=LOG_LEVEL)

Expand Down Expand Up @@ -147,9 +148,10 @@ def _run(handle_data,
else:
click.echo(algotext)

log.warn(ALPHA_WARNING_MESSAGE)
log.info('Catalyst version {}'.format(catalyst.__version__))
sleep(3)
if not DISABLE_ALPHA_WARNING:
log.warn(ALPHA_WARNING_MESSAGE)
sleep(3)

if live:
if simulate_orders:
Expand Down

0 comments on commit 028cbc5

Please sign in to comment.