From 54f8a615fcdada32568b666ebda6525187329e25 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 8 Jun 2023 10:24:42 -0400 Subject: [PATCH] Use `code.interact()` in anal subcmd for now --- piker/storage/cli.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/piker/storage/cli.py b/piker/storage/cli.py index ae7393e4..b0ec881a 100644 --- a/piker/storage/cli.py +++ b/piker/storage/cli.py @@ -152,11 +152,15 @@ def anal( src_df = await client.as_df(fqme, period) df = mod.with_dts(src_df) gaps: pl.DataFrame = mod.detect_time_gaps(df) - if gaps.is_empty(): - breakpoint() - breakpoint() - # await tractor.breakpoint() + # TODO: something better with tab completion.. + # is there something more minimal but nearly as + # functional as ipython? + import code + code.interact( + f'df: {df}\ngaps: {gaps}\n', + local=locals() + ) trio.run(main) @@ -173,8 +177,10 @@ def clone( ) import polars as pl + # TODO: actually look up an existing shm buf (set) from + # an fqme and file name parsing.. # open existing shm buffer for kucoin backend - key: str = 'piker.brokerd[a9e7a4fe-39ae-44].btcusdt.binance.hist' + key: str = 'piker.brokerd[3595d316-3c15-46].xmrusdt.kucoin.hist' shmpath: Path = Path('/dev/shm') / key assert shmpath.is_file()