Merge branch 'develop'

This commit is contained in:
Frederic Fortier
2018-01-19 18:18:15 -05:00
7 changed files with 52 additions and 14 deletions
+12
View File
@@ -285,6 +285,7 @@ def run(ctx,
analyze_live=None,
live_graph=False,
simulate_orders=True,
auth_aliases=None,
stats_output=None,
)
@@ -413,6 +414,15 @@ def catalyst_magic(line, cell=None):
help='Simulating orders enable the paper trading mode. No orders will be '
'sent to the exchange unless set to false.',
)
@click.option(
'--auth-aliases',
default=None,
help='Authentication file aliases for the specified exchanges. By default,'
'each exchange uses the "auth.json" file in the exchange folder. '
'Specifying an "auth2" alias would use "auth2.json". It should be '
'specified like this: "[exchange_name],[alias],..." For example, '
'"binance,auth2" or "binance,auth2,bittrex,auth2".',
)
@click.pass_context
def live(ctx,
algofile,
@@ -427,6 +437,7 @@ def live(ctx,
base_currency,
end,
live_graph,
auth_aliases,
simulate_orders):
"""Trade live with the given algorithm.
"""
@@ -480,6 +491,7 @@ def live(ctx,
live_graph=live_graph,
analyze_live=None,
simulate_orders=simulate_orders,
auth_aliases=auth_aliases,
stats_output=None,
)
+14
View File
@@ -8,6 +8,8 @@ from time import sleep
import click
import pandas as pd
from six import string_types
from catalyst.data.bundles import load
from catalyst.data.data_portal import DataPortal
from catalyst.exchange.exchange_pricing_loader import ExchangePricingLoader, \
@@ -97,6 +99,7 @@ def _run(handle_data,
This is shared between the cli and :func:`catalyst.run_algo`.
"""
# TODO: refactor for more granularity
if algotext is not None:
if local_namespace:
ip = get_ipython() # noqa
@@ -163,6 +166,17 @@ def _run(handle_data,
if exchange_name is None:
raise ValueError('Please specify at least one exchange.')
if isinstance(auth_aliases, string_types):
aliases = auth_aliases.split(',')
if len(aliases) < 2 or len(aliases) % 2 != 0:
raise ValueError(
'the `auth_aliases` parameter must contain an even list '
'of comma-delimited values. For example, '
'"binance,auth2" or "binance,auth2,bittrex,auth2".'
)
auth_aliases = dict(zip(aliases[::2], aliases[1::2]))
exchange_list = [x.strip().lower() for x in exchange.split(',')]
exchanges = dict()
for name in exchange_list:
+5 -5
View File
@@ -23,7 +23,7 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " build to build the C and Cython extensions for zipline"
@echo " build to build the C and Cython extensions for catalyst"
@echo " html to make standalone HTML files"
@echo " livehtml to run a persistent process that rebuilds the docs"
@echo " dirhtml to make HTML files named index.html in directories"
@@ -96,9 +96,9 @@ qthelp: build
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/zipline.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/catalyst.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/zipline.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/catalyst.qhc"
applehelp: build
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@@ -113,8 +113,8 @@ devhelp: build
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/zipline"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/zipline"
@echo "# mkdir -p $$HOME/.local/share/devhelp/catalyst"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/catalyst"
@echo "# devhelp"
epub: build
+5 -5
View File
@@ -8,8 +8,8 @@ from shutil import move, rmtree
from subprocess import check_call
HERE = dirname(abspath(__file__))
ZIPLINE_ROOT = dirname(HERE)
TEMP_LOCATION = '/tmp/zipline-doc'
CATALYST_ROOT = dirname(HERE)
TEMP_LOCATION = '/tmp/catalyst-doc'
TEMP_LOCATION_GLOB = TEMP_LOCATION + '/*'
@@ -46,8 +46,8 @@ def main():
print("Copying built files to temp location.")
move('build/html', TEMP_LOCATION)
print("Moving to '%s'" % ZIPLINE_ROOT)
os.chdir(ZIPLINE_ROOT)
print("Moving to '%s'" % CATALYST_ROOT)
os.chdir(CATALYST_ROOT)
print("Checking out gh-pages branch.")
check_call(
@@ -70,7 +70,7 @@ def main():
os.chdir(old_dir)
print()
print("Updated documentation branch in directory %s" % ZIPLINE_ROOT)
print("Updated documentation branch in directory %s" % CATALYST_ROOT)
print("If you are happy with these changes, commit and push to gh-pages.")
if __name__ == '__main__':
+2 -2
View File
@@ -127,9 +127,9 @@ if "%1" == "qthelp" (
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\zipline.qhcp
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\catalyst.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\zipline.ghc
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\catalyst.ghc
goto end
)
+2 -2
View File
@@ -41,11 +41,11 @@ master_doc = 'index'
# General information about the project.
project = u'Catalyst'
copyright = u'2017, Enigma MPC, Inc.'
copyright = u'2018, Enigma MPC, Inc.'
# The full version, including alpha/beta/rc tags, but excluding the commit hash
#release = version.split('+', 1)[0]
release = '0.3'
release = '0.4'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
+12
View File
@@ -2,6 +2,18 @@
Release Notes
=============
Version 0.4.7
^^^^^^^^^^^^^
**Release Date**: 2018-01-19
Bug Fixes
~~~~~~~~~
- Fixing issue :issue:`137` impacting the CLI
Build
~~~~~
- Implemented authentication aliases (:issue:`60`)
Version 0.4.6
^^^^^^^^^^^^^
**Release Date**: 2018-01-18