From a05a82486d3484f6b4d66e3a2869b7e35999d1b1 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 17 Jul 2023 17:31:12 -0400 Subject: [PATCH] Log a warning on no symcache support in a backend --- piker/ui/_app.py | 5 ++++- piker/ui/_position.py | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/piker/ui/_app.py b/piker/ui/_app.py index 585ccb18..199ba656 100644 --- a/piker/ui/_app.py +++ b/piker/ui/_app.py @@ -59,7 +59,10 @@ async def load_provider_search( ), open_symcache(brokermod) as symcache, ): - assert symcache + if not symcache.mktmaps: + log.warning( + f'BACKEND DOES NOT (yet) support symcaching: `{brokermod.name}`' + ) # keep search engine stream up until cancelled await trio.sleep_forever() diff --git a/piker/ui/_position.py b/piker/ui/_position.py index 0f38978f..11aca3e9 100644 --- a/piker/ui/_position.py +++ b/piker/ui/_position.py @@ -1,5 +1,5 @@ # piker: trading gear for hackers -# Copyright (C) Tyler Goodlet (in stewardship for piker0) +# Copyright (C) Tyler Goodlet (in stewardship for pikers) # 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 @@ -15,7 +15,9 @@ # along with this program. If not, see . ''' -Position (pos) info and display to track ur PnLz B) +UI components to display real-time and historical +`.accounting.Position` cross-asset PnL(s) as well as manage market +agnostic asset ownership state. ''' from __future__ import annotations