Change `uncons_fqsn()` -> `unpack_fqsn()`

fqsns
Tyler Goodlet 2022-04-11 01:01:36 -04:00
parent e92632bd34
commit ebe2680355
5 changed files with 10 additions and 10 deletions

View File

@ -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:

View File

@ -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,

View File

@ -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 (

View File

@ -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,

View File

@ -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: