Refine accounting related config loading routine doc strings
parent
77dfeb4bf2
commit
bc58e42a74
|
@ -309,9 +309,9 @@ def load_account(
|
||||||
) -> tuple[dict, Path]:
|
) -> tuple[dict, Path]:
|
||||||
'''
|
'''
|
||||||
Load a accounting (with positions) file from
|
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
|
and we implicitly create a accounting subdir which should
|
||||||
normally be linked to a git repo managed by the user B)
|
normally be linked to a git repo managed by the user B)
|
||||||
|
|
||||||
|
@ -366,7 +366,13 @@ def load_ledger(
|
||||||
acctid: str,
|
acctid: str,
|
||||||
|
|
||||||
) -> tuple[dict, Path]:
|
) -> 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'
|
ldir: Path = _config_dir / 'accounting' / 'ledgers'
|
||||||
if not ldir.is_dir():
|
if not ldir.is_dir():
|
||||||
ldir.mkdir()
|
ldir.mkdir()
|
||||||
|
|
Loading…
Reference in New Issue