From 47d4ec5985414e56cac835ae9846ea7497985a53 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 26 Sep 2020 14:11:14 -0400 Subject: [PATCH] Move _source under data package --- piker/brokers/ib.py | 2 +- piker/{ui => data}/_source.py | 1 + piker/ui/_chart.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename piker/{ui => data}/_source.py (98%) diff --git a/piker/brokers/ib.py b/piker/brokers/ib.py index 607d2e32..01e30e3d 100644 --- a/piker/brokers/ib.py +++ b/piker/brokers/ib.py @@ -32,7 +32,7 @@ from ..data import ( get_shm_token, subscribe_ohlc_for_increment, ) -from ..ui._source import from_df +from ..data._source import from_df log = get_logger(__name__) diff --git a/piker/ui/_source.py b/piker/data/_source.py similarity index 98% rename from piker/ui/_source.py rename to piker/data/_source.py index b8816636..74238bb1 100644 --- a/piker/ui/_source.py +++ b/piker/data/_source.py @@ -8,6 +8,7 @@ import numpy as np import pandas as pd +# our minimum structured array layout for ohlc data base_ohlc_dtype = np.dtype( [ ('index', int), diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index 3860c0f6..cab465d8 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -16,7 +16,7 @@ from ._axes import ( from ._graphics import CrossHair, BarItems from ._axes import YSticky from ._style import _xaxis_at, _min_points_to_show, hcolor -from ._source import Symbol +from ..data._source import Symbol from .. import brokers from .. import data from ..data import (