Bleh go back to using pdbp for REPL in anal

basic_buy_bot
Tyler Goodlet 2023-06-19 13:36:06 -04:00
parent 9eeea51165
commit 58c096bfad
1 changed files with 12 additions and 7 deletions

View File

@ -132,10 +132,16 @@ def anal(
) -> np.ndarray: ) -> np.ndarray:
# import tractor import tractor
async def main(): async def main():
async with open_storage_client() as (mod, client): async with (
open_piker_runtime(
'tsdb_polars_anal',
# enable_modules=['piker.service._ahab']
),
open_storage_client() as (mod, client),
):
syms: list[str] = await client.list_keys() syms: list[str] = await client.list_keys()
print(f'{len(syms)} FOUND for {mod.name}') print(f'{len(syms)} FOUND for {mod.name}')
@ -154,14 +160,13 @@ def anal(
df = tsmod.with_dts(src_df) df = tsmod.with_dts(src_df)
gaps: pl.DataFrame = tsmod.detect_time_gaps(df) gaps: pl.DataFrame = tsmod.detect_time_gaps(df)
if gaps:
print(f'Gaps found:\n{gaps}')
# TODO: something better with tab completion.. # TODO: something better with tab completion..
# is there something more minimal but nearly as # is there something more minimal but nearly as
# functional as ipython? # functional as ipython?
import code await tractor.breakpoint()
code.interact(
f'df: {df}\ngaps: {gaps}\n',
local=locals()
)
trio.run(main) trio.run(main)