mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-04 21:53:45 +08:00
reorganized packages, test passing again
This commit is contained in:
+6
-6
@@ -8,16 +8,16 @@ fi
|
||||
export WORKON_HOME=$HOME/.venvs
|
||||
source /usr/local/bin/virtualenvwrapper.sh
|
||||
|
||||
#create the scientific python virtualenv and copy to provide qexec base
|
||||
#create the scientific python virtualenv and copy to provide qsim base
|
||||
mkvirtualenv --no-site-packages scientific_base
|
||||
workon scientific_base
|
||||
./ordered_pip.sh requirements_sci.txt
|
||||
deactivate
|
||||
#re-base qexec
|
||||
#rmvirtualenv qexec
|
||||
cpvirtualenv scientific_base qexec
|
||||
#re-base qsim
|
||||
#rmvirtualenv qsim
|
||||
cpvirtualenv scientific_base qsim
|
||||
|
||||
workon qexec
|
||||
workon qsim
|
||||
./ordered_pip.sh requirements.txt
|
||||
./ordered_pip.sh requirements_dev.txt
|
||||
|
||||
@@ -25,7 +25,7 @@ workon qexec
|
||||
python dev_setup.py
|
||||
|
||||
#run all the tests in test
|
||||
nosetests --with-xcoverage --with-xunit --cover-package=myapp --cover-erase
|
||||
nosetests --with-xcoverage --with-xunit --cover-erase --cover-inclusive
|
||||
pylint -f parseable . | tee pylint.out
|
||||
|
||||
deactivate
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
from data.sources.equity import *
|
||||
from backtest.util import *
|
||||
from simulator.data.sources.equity import *
|
||||
from simulator.backtest.util import *
|
||||
import time
|
||||
import logging
|
||||
|
||||
@@ -114,4 +114,4 @@ class DataFeed(object):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ import logging
|
||||
import random
|
||||
from pymongo import ASCENDING, DESCENDING
|
||||
|
||||
from backtest.util import *
|
||||
from simulator.backtest.util import *
|
||||
|
||||
from qbt_server import * #connect_db
|
||||
from simulator.qbt_server import * #connect_db
|
||||
|
||||
class DataSource(object):
|
||||
def __init__(self, feed, source_id):
|
||||
@@ -0,0 +1,14 @@
|
||||
class Config(object):
|
||||
def __init__(self, dct):
|
||||
self.__dict__.update(dct)
|
||||
|
||||
mongo_conn_args = Config({
|
||||
'mongodb_host' : 'claire.mongohq.com',
|
||||
'mongodb_port' : 10087,
|
||||
'mongodb_dbname' : 'quantodata-staging',
|
||||
'mongodb_user' : 'quantopian',
|
||||
'mongodb_password' : 'quantopian',
|
||||
})
|
||||
|
||||
root_url = 'http://localhost:8000'
|
||||
ws_url = 'ws://localhost:8001'
|
||||
@@ -2,11 +2,11 @@ import unittest2 as unittest
|
||||
import zmq
|
||||
import logging
|
||||
import tornado
|
||||
from data.sources.equity import *
|
||||
from data.feed import *
|
||||
from data.transforms import MergedTransformsFeed, MovingAverage
|
||||
from simulator.data.sources.equity import *
|
||||
from simulator.data.feed import *
|
||||
from transforms.transforms import MergedTransformsFeed, MovingAverage
|
||||
|
||||
from qbt_client import TestClient
|
||||
from simulator.qbt_client import TestClient
|
||||
|
||||
|
||||
class MessagingTestCase(unittest.TestCase):
|
||||
|
||||
@@ -2,11 +2,10 @@ import zmq
|
||||
import logging
|
||||
import datetime
|
||||
import json
|
||||
import config
|
||||
import copy
|
||||
import multiprocessing
|
||||
from backtest.util import *
|
||||
|
||||
from simulator.backtest.util import *
|
||||
import simulator.config as config
|
||||
class Transform(object):
|
||||
"""Parent class for feed transforms. Subclass to create a new derived value from the combined feed."""
|
||||
|
||||
@@ -223,4 +222,4 @@ class MergedTransformsFeed(Transform):
|
||||
#signal to client that we're done
|
||||
self.result_socket.send("DONE")
|
||||
self.logger.info("Transform {name} received {r} and sent {s}".format(name=self.name, r=self.data_buffer.received_count, s=self.data_buffer.sent_count))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user