Refine accounting related config loading routine doc strings

basic_buy_bot
Tyler Goodlet 2023-06-16 21:08:35 -04:00
parent 77dfeb4bf2
commit bc58e42a74
1 changed files with 8 additions and 2 deletions

View File

@ -309,9 +309,9 @@ def load_account(
) -> tuple[dict, Path]:
'''
Load a accounting (with positions) file from
$PIKER_CONFIG_DIR/accounting/account.<brokername>.<acctid>.toml.
$CONFIG_DIR/accounting/account.<brokername>.<acctid>.toml
Where normally $PIKER_CONFIG_DIR = ~/.config/piker/
Where normally $CONFIG_DIR = ~/.config/piker/
and we implicitly create a accounting subdir which should
normally be linked to a git repo managed by the user B)
@ -366,7 +366,13 @@ def load_ledger(
acctid: str,
) -> tuple[dict, Path]:
'''
Load a ledger (TOML) file from user's config directory:
$CONFIG_DIR/accounting/ledgers/trades_<brokername>_<acctid>.toml
Return its `dict`-content and file path.
'''
ldir: Path = _config_dir / 'accounting' / 'ledgers'
if not ldir.is_dir():
ldir.mkdir()