Drop `_graphics` subpkg; flat is better then nested
							parent
							
								
									449c4210e4
								
							
						
					
					
						commit
						62dd327ef3
					
				|  | @ -40,13 +40,13 @@ from ._axes import ( | |||
|     PriceAxis, | ||||
|     YAxisLabel, | ||||
| ) | ||||
| from ._graphics._cursor import ( | ||||
| from ._cursor import ( | ||||
|     Cursor, | ||||
|     ContentsLabel, | ||||
| ) | ||||
| from ._l1 import L1Labels | ||||
| from ._graphics._ohlc import BarItems | ||||
| from ._graphics._curve import FastAppendCurve | ||||
| from ._ohlc import BarItems | ||||
| from ._curve import FastAppendCurve | ||||
| from ._style import ( | ||||
|     hcolor, | ||||
|     CHART_MARGINS, | ||||
|  | @ -1317,7 +1317,7 @@ async def run_fsp( | |||
|         # graphics.curve.setFillLevel(50) | ||||
| 
 | ||||
|         if fsp_func_name == 'rsi': | ||||
|             from ._graphics._lines import level_line | ||||
|             from ._lines import level_line | ||||
|             # add moveable over-[sold/bought] lines | ||||
|             # and labels only for the 70/30 lines | ||||
|             level_line(chart, 20) | ||||
|  |  | |||
|  | @ -27,13 +27,13 @@ import pyqtgraph as pg | |||
| from PyQt5 import QtCore, QtGui, QtWidgets | ||||
| from PyQt5.QtCore import QPointF, QRectF | ||||
| 
 | ||||
| from .._style import ( | ||||
| from ._style import ( | ||||
|     _xaxis_at, | ||||
|     hcolor, | ||||
|     _font_small, | ||||
| ) | ||||
| from .._axes import YAxisLabel, XAxisLabel | ||||
| from ...log import get_logger | ||||
| from ._axes import YAxisLabel, XAxisLabel | ||||
| from ..log import get_logger | ||||
| 
 | ||||
| 
 | ||||
| log = get_logger(__name__) | ||||
|  | @ -23,7 +23,7 @@ from typing import Tuple | |||
| import pyqtgraph as pg | ||||
| from PyQt5 import QtCore, QtGui, QtWidgets | ||||
| 
 | ||||
| from ..._profile import pg_profile_enabled | ||||
| from .._profile import pg_profile_enabled | ||||
| 
 | ||||
| 
 | ||||
| # TODO: got a feeling that dropping this inheritance gets us even more speedups | ||||
|  | @ -28,7 +28,7 @@ from PyQt5.QtCore import QPointF | |||
| import numpy as np | ||||
| 
 | ||||
| from ._style import hcolor, _font | ||||
| from ._graphics._lines import order_line, LevelLine | ||||
| from ._lines import order_line, LevelLine | ||||
| from ..log import get_logger | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,20 +0,0 @@ | |||
| # piker: trading gear for hackers | ||||
| # Copyright (C) 2018-present  Tyler Goodlet (in stewardship of piker0) | ||||
| 
 | ||||
| # This program is free software: you can redistribute it and/or modify | ||||
| # it under the terms of the GNU Affero General Public License as published by | ||||
| # the Free Software Foundation, either version 3 of the License, or | ||||
| # (at your option) any later version. | ||||
| 
 | ||||
| # This program is distributed in the hope that it will be useful, | ||||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
| # GNU Affero General Public License for more details. | ||||
| 
 | ||||
| # You should have received a copy of the GNU Affero General Public License | ||||
| # along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
| 
 | ||||
| """ | ||||
| Internal custom graphics mostly built for low latency and reuse. | ||||
| 
 | ||||
| """ | ||||
|  | @ -26,9 +26,9 @@ from pyqtgraph import Point, functions as fn | |||
| from PyQt5 import QtCore, QtGui, QtWidgets | ||||
| from PyQt5.QtCore import QPointF | ||||
| 
 | ||||
| from .._annotate import mk_marker, qgo_draw_markers | ||||
| from .._label import Label, vbr_left, right_axis | ||||
| from .._style import hcolor, _font | ||||
| from ._annotate import mk_marker, qgo_draw_markers | ||||
| from ._label import Label, vbr_left, right_axis | ||||
| from ._style import hcolor, _font | ||||
| 
 | ||||
| 
 | ||||
| # TODO: probably worth investigating if we can | ||||
|  | @ -27,8 +27,8 @@ from PyQt5.QtCore import QLineF, QPointF | |||
| # from numba import types as ntypes | ||||
| # from ..data._source import numba_ohlc_dtype | ||||
| 
 | ||||
| from ..._profile import pg_profile_enabled | ||||
| from .._style import hcolor | ||||
| from .._profile import pg_profile_enabled | ||||
| from ._style import hcolor | ||||
| 
 | ||||
| 
 | ||||
| def _mk_lines_array( | ||||
|  | @ -29,7 +29,7 @@ import pyqtgraph as pg | |||
| from pydantic import BaseModel | ||||
| import trio | ||||
| 
 | ||||
| from ._graphics._lines import LevelLine, position_line | ||||
| from ._lines import LevelLine, position_line | ||||
| from ._editors import LineEditor, ArrowEditor | ||||
| from ._window import MultiStatus, main_window | ||||
| from ..clearing._client import open_ems, OrderBook | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue