-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I refactored money out, namely: 1. Made naming more consistent (e.g. "debt" to "amount" for numerical quantitiest that are not a Debt object). 2. Added a utility for automatically setting the right types when reading a model from CSV. 3. Simplified message formatting. 4. Added a constant for decimal precision. My editor automatically formatted everything with Black, I'm not sure if we are ok with that, let me know and I can figure out how to disable that.
- Loading branch information
Jair Trejo
committed
Jun 13, 2024
1 parent
a620af0
commit aed9022
Showing
4 changed files
with
251 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import os | ||
|
||
ABE_ROOT = './abe' | ||
PAYOUTS_DIR = os.path.join(ABE_ROOT, 'payouts') | ||
PAYMENTS_DIR = os.path.join(ABE_ROOT, 'payments') | ||
ABE_ROOT = "./abe" | ||
PAYOUTS_DIR = os.path.join(ABE_ROOT, "payouts") | ||
PAYMENTS_DIR = os.path.join(ABE_ROOT, "payments") | ||
NONATTRIBUTABLE_PAYMENTS_DIR = os.path.join( | ||
ABE_ROOT, 'payments', 'nonattributable' | ||
ABE_ROOT, "payments", "nonattributable" | ||
) | ||
|
||
TRANSACTIONS_FILE = os.path.join(ABE_ROOT, 'transactions.txt') | ||
DEBTS_FILE = os.path.join(ABE_ROOT, 'debts.txt') | ||
ADVANCES_FILE = os.path.join(ABE_ROOT, 'advances.txt') | ||
UNPAYABLE_CONTRIBUTORS_FILE = os.path.join(ABE_ROOT, 'unpayable_contributors.txt') | ||
ITEMIZED_PAYMENTS_FILE = os.path.join(ABE_ROOT, 'itemized_payments.txt') | ||
PRICE_FILE = os.path.join(ABE_ROOT, 'price.txt') | ||
VALUATION_FILE = os.path.join(ABE_ROOT, 'valuation.txt') | ||
ATTRIBUTIONS_FILE = 'attributions.txt' | ||
INSTRUMENTS_FILE = 'instruments.txt' | ||
TRANSACTIONS_FILE = os.path.join(ABE_ROOT, "transactions.txt") | ||
DEBTS_FILE = os.path.join(ABE_ROOT, "debts.txt") | ||
ADVANCES_FILE = os.path.join(ABE_ROOT, "advances.txt") | ||
UNPAYABLE_CONTRIBUTORS_FILE = os.path.join( | ||
ABE_ROOT, "unpayable_contributors.txt" | ||
) | ||
ITEMIZED_PAYMENTS_FILE = os.path.join(ABE_ROOT, "itemized_payments.txt") | ||
PRICE_FILE = os.path.join(ABE_ROOT, "price.txt") | ||
VALUATION_FILE = os.path.join(ABE_ROOT, "valuation.txt") | ||
ATTRIBUTIONS_FILE = "attributions.txt" | ||
INSTRUMENTS_FILE = "instruments.txt" | ||
|
||
DECIMAL_PRECISION = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.