From ebe26803557fe6c0e12e900847fa8544684dd782 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 11 Apr 2022 01:01:36 -0400 Subject: [PATCH] Change `uncons_fqsn()` -> `unpack_fqsn()` --- piker/clearing/_client.py | 4 ++-- piker/clearing/_ems.py | 4 ++-- piker/clearing/_paper_engine.py | 4 ++-- piker/data/_source.py | 4 ++-- piker/data/feed.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/piker/clearing/_client.py b/piker/clearing/_client.py index 74a56917..837c28bc 100644 --- a/piker/clearing/_client.py +++ b/piker/clearing/_client.py @@ -201,8 +201,8 @@ async def open_ems( # ready for order commands book = get_orders() - from ..data._source import uncons_fqsn - broker, symbol, suffix = uncons_fqsn(fqsn) + from ..data._source import unpack_fqsn + broker, symbol, suffix = unpack_fqsn(fqsn) async with maybe_open_emsd(broker) as portal: diff --git a/piker/clearing/_ems.py b/piker/clearing/_ems.py index 07de4a6b..c49ff4bf 100644 --- a/piker/clearing/_ems.py +++ b/piker/clearing/_ems.py @@ -1011,8 +1011,8 @@ async def _emsd_main( global _router assert _router - from ..data._source import uncons_fqsn - broker, symbol, suffix = uncons_fqsn(fqsn) + from ..data._source import unpack_fqsn + broker, symbol, suffix = unpack_fqsn(fqsn) dark_book = _router.get_dark_book(broker) # TODO: would be nice if in tractor we can require either a ctx arg, diff --git a/piker/clearing/_paper_engine.py b/piker/clearing/_paper_engine.py index 2ea639c0..99039049 100644 --- a/piker/clearing/_paper_engine.py +++ b/piker/clearing/_paper_engine.py @@ -32,7 +32,7 @@ from dataclasses import dataclass from .. import data from ..data._normalize import iterticks -from ..data._source import uncons_fqsn +from ..data._source import unpack_fqsn from ..log import get_logger from ._messages import ( BrokerdCancel, BrokerdOrder, BrokerdOrderAck, BrokerdStatus, @@ -500,7 +500,7 @@ async def open_paperboi( its context. ''' - broker, symbol, expiry = uncons_fqsn(fqsn) + broker, symbol, expiry = unpack_fqsn(fqsn) service_name = f'paperboi.{broker}' async with ( diff --git a/piker/data/_source.py b/piker/data/_source.py index a9efc8cd..9c760bc6 100644 --- a/piker/data/_source.py +++ b/piker/data/_source.py @@ -92,7 +92,7 @@ def ohlc_zeros(length: int) -> np.ndarray: return np.zeros(length, dtype=base_ohlc_dtype) -def uncons_fqsn(fqsn: str) -> tuple[str, str, str]: +def unpack_fqsn(fqsn: str) -> tuple[str, str, str]: ''' Unpack a fully-qualified-symbol-name to ``tuple``. @@ -178,7 +178,7 @@ class Symbol(BaseModel): # XXX: like wtf.. # ) -> 'Symbol': ) -> None: - broker, key, suffix = uncons_fqsn(fqsn) + broker, key, suffix = unpack_fqsn(fqsn) return cls.from_broker_info( broker, key, diff --git a/piker/data/feed.py b/piker/data/feed.py index 9389daa3..260cab9b 100644 --- a/piker/data/feed.py +++ b/piker/data/feed.py @@ -51,7 +51,7 @@ from .ingest import get_ingestormod from ._source import ( base_iohlc_dtype, Symbol, - uncons_fqsn, + unpack_fqsn, ) from ..ui import _search from ._sampling import ( @@ -672,7 +672,7 @@ async def open_feed( ''' fqsn = fqsns[0].lower() - brokername, key, suffix = uncons_fqsn(fqsn) + brokername, key, suffix = unpack_fqsn(fqsn) bfqsn = fqsn.replace('.' + brokername, '') try: