Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rob committed Jul 26, 2023
2 parents 7fa96f9 + fdd8951 commit 5a962c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion syscontrol/run_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import time
import sys
from syscontrol.report_process_status import reportProcessStatus
from syscore.constants import status, success, failure
from syscore.constants import success

from syscontrol.timer_functions import get_list_of_timer_functions, listOfTimerFunctions

Expand Down
10 changes: 2 additions & 8 deletions sysdata/futures/multiple_prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"""
from syscore.exceptions import existingData
from sysdata.base_data import baseData
from syscore.constants import status, success, failure

# These are used when inferring prices in an incomplete series
from sysobjects.multiple_prices import futuresMultiplePrices
Expand Down Expand Up @@ -46,9 +45,7 @@ def get_multiple_prices(self, instrument_code: str) -> futuresMultiplePrices:

return multiple_prices

def delete_multiple_prices(
self, instrument_code: str, are_you_sure=False
) -> status:
def delete_multiple_prices(self, instrument_code: str, are_you_sure=False):
log = self.log.setup(instrument_code=instrument_code)

if are_you_sure:
Expand All @@ -58,18 +55,15 @@ def delete_multiple_prices(
)
log.info("Deleted multiple price data for %s" % instrument_code)

return success

else:
# doesn't exist anyway
log.warning(
"Tried to delete non existent multiple prices for %s"
% instrument_code
)
return failure
else:
log.error("You need to call delete_multiple_prices with a flag to be sure")
return failure
raise Exception("You need to be sure!")

def is_code_in_data(self, instrument_code: str) -> bool:
if instrument_code in self.get_list_of_instruments():
Expand Down
3 changes: 2 additions & 1 deletion sysinit/futures/repocsv_spread_costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def process_modified_instruments(

if check_on_modify:
okay_to_modify = true_if_answer_is_yes(
"Okay to replace %f with %f" % (existing_spread, new_spread)
"%s: Okay to replace %f with %f"
% (instrument_code, existing_spread, new_spread)
)
if not okay_to_modify:
continue
Expand Down

0 comments on commit 5a962c7

Please sign in to comment.