diff options
Diffstat (limited to 'python/report_ops')
| -rw-r--r-- | python/report_ops/__main__.py | 22 | ||||
| -rw-r--r-- | python/report_ops/misc.py | 9 | ||||
| -rw-r--r-- | python/report_ops/wires.py | 3 |
3 files changed, 20 insertions, 14 deletions
diff --git a/python/report_ops/__main__.py b/python/report_ops/__main__.py index 53dc9773..8082aeeb 100644 --- a/python/report_ops/__main__.py +++ b/python/report_ops/__main__.py @@ -78,11 +78,12 @@ if args.sma_positions: logger.warning(e) if args.cash_reports: - for cash_report_cls in CashReport._registry.values(): - try: - cash_report_cls(args.date).to_db() - except ValueError as e: - logger.warning(e) + for fund, custodians in _fund_custodians.items(): + for custodian in custodians: + try: + CashReport[(fund, custodian)](args.date).to_db() + except ValueError as e: + logger.warning(e) if args.isosel_reports: for fund in ("ISOSEL",): @@ -94,11 +95,12 @@ if args.isosel_reports: logger.warning(e) if args.wire_reports: - for wire_report_cls in Wire._registry.values(): - try: - wire_report_cls.to_db(args.date) - except ValueError as e: - logger.warning(e) + for fund, custodians in _fund_custodians.items(): + for custodian in custodians: + try: + Wire[(fund, custodian)].to_db(args.date) + except ValueError as e: + logger.warning(e) if args.send_to_custodians: for account in ( diff --git a/python/report_ops/misc.py b/python/report_ops/misc.py index 9d56b6a1..0d5a5c8c 100644 --- a/python/report_ops/misc.py +++ b/python/report_ops/misc.py @@ -79,7 +79,14 @@ _cc_recipients = { "BRINKER": ("nyops@lmcg.com",), } -_fund_custodians = {"SERCGMAST": ("UMB",), "ISOSEL": ("NT",), "BOWDST": ("BNY",)} +_fund_custodians = { + "SERCGMAST": ("UMB",), + "ISOSEL": ( + "NT", + "SCOTIA", + ), + "BOWDST": ("BNY",), +} def get_dir( diff --git a/python/report_ops/wires.py b/python/report_ops/wires.py index 63aca32a..bd00c4c6 100644 --- a/python/report_ops/wires.py +++ b/python/report_ops/wires.py @@ -68,9 +68,6 @@ class Wire(Deal, table_name="custodian_wires", deal_type="custodian_wires"): return p -Wire._registry.clear() - - class BowdstBNYWire(Wire, BNY, fund="BOWDST", custodian="BNY", dtkey="%Y%m%d%H%M%S"): @classmethod def from_report_line(cls, line: dict): |
