diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/report_ops/cash.py | 8 | ||||
| -rw-r--r-- | python/report_ops/custodians.py | 6 |
2 files changed, 4 insertions, 10 deletions
diff --git a/python/report_ops/cash.py b/python/report_ops/cash.py index 092dbb7d..c44362c8 100644 --- a/python/report_ops/cash.py +++ b/python/report_ops/cash.py @@ -45,15 +45,13 @@ class IAMDeal(Deal, deal_type=None, table_name="iam_tickets"): @dataclass class CashReport: fund: ClassVar[str] - account_number: ClassVar[str] date: datetime.date _conn: ClassVar[dbconn] = dbconn("dawndb") _staging_queue: ClassVar[set] = set() _insert_sql = "INSERT INTO cash_balances VALUES (%s, %s, %s, %s, %s, %s) ON CONFLICT DO NOTHING" - def __init_subclass__(cls, fund, account_number): + def __init_subclass__(cls, fund): cls.fund = fund - cls.account_number = account_number def to_db(self, report_name): self.download_reports(self.date) @@ -77,7 +75,7 @@ class CashReport: cls._conn.commit() -class NTCashReport(CashReport, NT, fund="ISOSEL", account_number="ISOS01"): +class NTCashReport(CashReport, NT, fund="ISOSEL"): def to_db(self): p = super().to_db("cash_") df = pd.read_csv(p, on_bad_lines="warn") @@ -104,7 +102,7 @@ class NTCashReport(CashReport, NT, fund="ISOSEL", account_number="ISOS01"): ) -class UMBCashReport(CashReport, UMB, fund="SERCGMAST", account_number="159260.1"): +class UMBCashReport(CashReport, UMB, fund="SERCGMAST"): def to_db(self): p = super().to_db("umb_") df = pd.read_excel(p, skiprows=3) diff --git a/python/report_ops/custodians.py b/python/report_ops/custodians.py index 8f952d57..2c383706 100644 --- a/python/report_ops/custodians.py +++ b/python/report_ops/custodians.py @@ -93,9 +93,5 @@ class BNY: p = DAILY_DIR / str(date) / "Reports" / fname if not p.parent.exists(): p.parent.mkdir(parents=True, exist_ok=True) - if not p.exists() or ( - fname.startswith("BowdstWires") and bowdst_wire_recent - ): - if fname.startswith("BowdstWires"): - bowdst_wire_recent = False + if not p.exists(): p.write_bytes(attach.content) |
