aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn/utils.py')
-rw-r--r--python/Dawn/utils.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/python/Dawn/utils.py b/python/Dawn/utils.py
deleted file mode 100644
index 3dd0d1c5..00000000
--- a/python/Dawn/utils.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import re
-from pickle import dumps
-
-
-def bump_rev(filename):
- pattern = r"([^r]*)(\srev(\d)|).pdf"
- begin, _, rev_number = re.match(pattern, filename).groups()
- rev_number = int(rev_number) + 1 if rev_number else 1
- return f"{begin} rev{rev_number}.pdf"
-
-
-def simple_serialize(obj, **kwargs):
- d = {c.name: getattr(obj, c.name) for c in obj.__table__.columns}
- # add data from foreign relationship
- if obj.__table__.name == "wires":
- d.update(
- {
- "Counterparty": obj.account.counterparty,
- "cashaccount": obj.account.cash_account,
- "custodian": obj.account.custodian,
- }
- )
- d.update(kwargs)
- return dumps(d)