mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-29 01:57:31 +08:00
Merge branch 'new_world_order' of github.com:quantopian/zipline into new_world_order
This commit is contained in:
@@ -70,9 +70,7 @@ class ComponentTestCase(TestCase):
|
||||
}
|
||||
|
||||
comp_a = Component(
|
||||
SpecificEquityTrades,
|
||||
args_a,
|
||||
kwargs_a,
|
||||
SpecificEquityTrades(*args_a, **kwargs_a),
|
||||
monitor,
|
||||
socket_uri,
|
||||
DATASOURCE_FRAME,
|
||||
|
||||
@@ -13,7 +13,6 @@ import humanhash
|
||||
import multiprocessing
|
||||
from setproctitle import setproctitle
|
||||
from collections import namedtuple
|
||||
from zipline.gens.utils import hash_args
|
||||
|
||||
|
||||
# pyzmq
|
||||
@@ -48,9 +47,7 @@ class Component(object):
|
||||
# ------------
|
||||
|
||||
def __init__(self,
|
||||
gen_func,
|
||||
gen_args,
|
||||
gen_kwargs,
|
||||
generator,
|
||||
component_id,
|
||||
monitor,
|
||||
socket_uri,
|
||||
@@ -66,13 +63,9 @@ class Component(object):
|
||||
# -----------------
|
||||
# Generator
|
||||
# -----------------
|
||||
self.gen_args = gen_args
|
||||
self.gen_kwargs = gen_kwargs
|
||||
self.gen_func = gen_func
|
||||
self.generator = None
|
||||
self.generator = generator
|
||||
self.frame = frame
|
||||
self.component_id = self.gen_func.__name__ \
|
||||
+ hash_args(gen_args, gen_kwargs)
|
||||
self.component_id = hash(self.generator)
|
||||
|
||||
# lock for waiting on monitor "GO"
|
||||
self.waiting = None
|
||||
@@ -503,7 +496,6 @@ class Component(object):
|
||||
self.setup_control()
|
||||
|
||||
if send:
|
||||
self.generator = self.gen_func(*self.gen_args, **self.gen_kwargs)
|
||||
self.out_socket = self.open_socket(self.out_socket_args)
|
||||
self.sockets.extend([self.out_socket])
|
||||
else:
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ before invoking simulate.
|
||||
|
||||
import inspect
|
||||
import logbook
|
||||
import zipline.utils.factory as factory
|
||||
#import zipline.utils.factory as factory
|
||||
|
||||
from zipline.components import DataSource
|
||||
from zipline.transforms import BaseTransform
|
||||
|
||||
Reference in New Issue
Block a user