Skip to content

Commit 6f918a8

Browse files
author
rob
committed
1 parent 2f70f87 commit 6f918a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+125
-121
lines changed

sysbrokers/IB/client/ib_orders_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
)
77

88
from syscore.exceptions import missingContract
9-
from syscore.objects import arg_not_supplied, missing_order
9+
from syscore.objects import arg_not_supplied
10+
from sysexecution.orders.named_order_objects import missing_order
1011
from sysbrokers.IB.client.ib_contracts_client import ibContractsClient
1112
from sysbrokers.IB.ib_translate_broker_order_objects import (
1213
tradeWithContract,

sysbrokers/IB/ib_orders.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
from sysbrokers.IB.client.ib_orders_client import ibOrdersClient
1919
from sysbrokers.broker_execution_stack import brokerExecutionStackData
2020

21-
from syscore.objects import missing_order, failure, success, arg_not_supplied
21+
from syscore.objects import failure, success, arg_not_supplied
22+
from sysexecution.orders.named_order_objects import missing_order
2223

2324
from sysexecution.order_stacks.broker_order_stack import orderWithControls
2425
from sysexecution.orders.list_of_orders import listOfOrders

sysbrokers/IB/ib_translate_broker_order_objects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
from sysbrokers.IB.ib_contracts import ibcontractWithLegs
99
from sysbrokers.broker_trade import brokerTrade
1010
from syscore.exceptions import missingData
11-
from syscore.objects import missing_order, arg_not_supplied
11+
from syscore.objects import arg_not_supplied
12+
from sysexecution.orders.named_order_objects import missing_order
1213
from sysexecution.orders.base_orders import resolve_multi_leg_price_to_single_price
1314

1415
from sysobjects.spot_fx_prices import currencyValue

syscore/fileutils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def rename_files_with_extension_in_pathname_as_archive_files(
9292
"""
9393

9494
resolved_pathname = get_resolved_pathname(pathname)
95-
list_of_files = files_with_extension_in_resolved_pathname(resolved_pathname)
95+
list_of_files = files_with_extension_in_resolved_pathname(
96+
resolved_pathname, extension=extension
97+
)
9698

9799
for filename in list_of_files:
98100
full_filename = os.path.join(resolved_pathname, filename)

syscore/objects.py

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""
22
Do fun things with objects and classes
33
"""
4-
from collections import namedtuple
54
import importlib
65

76
none_type = type(None)
@@ -16,31 +15,13 @@ def __repr__(self):
1615

1716

1817
missing_instrument = named_object("missing instrument")
19-
20-
missing_order = named_object("missing order")
21-
locked_order = named_object("locked order")
22-
duplicate_order = named_object("duplicate order")
23-
zero_order = named_object("zero order")
24-
18+
missing_file = named_object("missing file")
19+
missing_data = named_object("missing data")
2520
market_closed = named_object("market closed")
26-
2721
fill_exceeds_trade = named_object("fill too big for trade")
2822

29-
order_is_in_status_finished = named_object("order status is modification close")
30-
order_is_in_status_modified = named_object("order status is being modified")
31-
order_is_in_status_not_modified = named_object("order status is not currently modified")
32-
order_is_in_status_reject_modification = named_object(
33-
"order status is modification rejected"
34-
)
35-
36-
no_order_id = named_object("no order ID")
37-
no_children = named_object("no_children")
38-
no_parent = named_object("no parent")
39-
40-
rolling_cant_trade = named_object("rolling can't trade")
41-
ROLL_PSEUDO_STRATEGY = "_ROLL_PSEUDO_STRATEGY"
42-
43-
not_updated = named_object("not updated")
23+
arg_not_supplied = named_object("arg not supplied")
24+
user_exit = named_object("exit")
4425

4526

4627
class status(named_object):
@@ -50,13 +31,7 @@ class status(named_object):
5031
success = status("success")
5132
failure = status("failure")
5233

53-
arg_not_supplied = named_object("arg not supplied")
54-
user_exit = named_object("exit")
55-
56-
table = namedtuple("table", "Heading Body")
57-
header = namedtuple("header", "Heading")
58-
body_text = namedtuple("bodytext", "Text")
59-
figure = namedtuple("figure", "pdf_filename")
34+
## FIXME HERE
6035

6136

6237
def get_methods(a_stage_object) -> list:
@@ -67,7 +42,7 @@ def get_methods(a_stage_object) -> list:
6742
dir_list = [method_name for method_name in dir_list if method_name[0] != "_"]
6843

6944
# remove special
70-
special_list = ["log", "name", "parent", "description"]
45+
special_list = ["log", "name", "parent", "description", "data"]
7146
dir_list = [
7247
method_name for method_name in dir_list if method_name not in special_list
7348
]
@@ -219,8 +194,3 @@ def hasallattr(some_object, attrlist=[]):
219194

220195
def get_class_name(class_object):
221196
return class_object.__name__
222-
223-
224-
missing_file = named_object("missing file")
225-
missing_data = named_object("missing data")
226-
ALL_ROLL_INSTRUMENTS = "ALL"

sysdata/mongodb/mongo_historic_orders.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import datetime
22

33
from syscore.exceptions import missingData
4-
from syscore.objects import success, missing_order, arg_not_supplied
4+
from syscore.objects import success, arg_not_supplied
5+
from sysexecution.orders.named_order_objects import missing_order
56
from sysdata.mongodb.mongo_generic import mongoDataWithSingleKey
67

78
from sysexecution.orders.base_orders import Order

sysdata/mongodb/mongo_order_stack.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
from sysdata.mongodb.mongo_generic import mongoDataWithSingleKey
33
from syslogdiag.log_to_screen import logtoscreen
44

5-
from sysexecution.order_stacks.order_stack import orderStackData, missing_order
5+
from sysexecution.order_stacks.order_stack import orderStackData
6+
from sysexecution.orders.named_order_objects import missing_order
67
from sysexecution.orders.base_orders import Order
78
from sysexecution.orders.instrument_orders import instrumentOrder
89
from sysexecution.order_stacks.instrument_order_stack import instrumentOrderStackData

sysdata/production/historic_orders.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"""
1616
import datetime
1717

18-
from syscore.objects import arg_not_supplied, missing_order
18+
from syscore.objects import arg_not_supplied
19+
from sysexecution.orders.named_order_objects import missing_order
1920

2021
from sysdata.base_data import baseData
2122
from sysobjects.fills import listOfFills, fill_from_order

sysexecution/algos/algo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from syscore.exceptions import missingContract
55
from syscore.objects import (
66
arg_not_supplied,
7-
missing_order,
87
missing_data,
98
)
9+
from sysexecution.orders.named_order_objects import missing_order
1010

1111
from sysdata.data_blob import dataBlob
1212

sysexecution/algos/algo_limit_orders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Simplest possible execution method, one market order
33
"""
44
from copy import copy
5-
from syscore.objects import missing_order
5+
from sysexecution.orders.named_order_objects import missing_order
66
from sysproduction.data.broker import dataBroker
77

88
from sysexecution.algos.algo import Algo, limit_price_from_input, limit_order_type

0 commit comments

Comments
 (0)