no_symcache_no_problem: be more tolerant of not-yet-implemented provider backends #39

Open
goodboy wants to merge 8 commits from no_symcache_no_problem into tsp_gaps

A hack to workaround such cases where backends not yet implementing a sym-cache (intro-ed on GH in commit 005023275e but no feat branch yet..) would break on fqme lookup while processing a trades ledger; instead this patch attemps to allow bypassing this, BUT it’s very flaky at best and will definitely fail on multiple mkts loaded into a single chart..


See history of .data._symcache here: https://pikers.dev/pikers/piker/commits/branch/account_tests/piker/data/_symcache.py

Mabye todo?

  • depending on how we land these upstream GH feats branches it might make sense to just include this PRs history with that?
A hack to workaround such cases where backends not yet implementing a sym-cache (intro-ed on GH in commit 005023275e69be503130ac544134be8870e5971b but no feat branch yet..) would break on fqme lookup while processing a trades ledger; instead this patch *attemps* to allow bypassing this, BUT it's **very flaky** at best and will definitely fail on multiple mkts loaded into a single chart.. --- See history of `.data._symcache` here: https://pikers.dev/pikers/piker/commits/branch/account_tests/piker/data/_symcache.py #### Mabye todo? - [ ] depending on how we land these upstream GH feats branches it might make sense to just include this PRs history with that?
goodboy added 3 commits 2025-02-20 16:48:07 +00:00
850cdbfe59 Allow ledger passes to ignore (symcache) unknown fqmes
For example in the paper-eng, if you have a backend that doesn't fully
support a symcache (yet) it's handy to be able to ignore processing
other paper-eng txns when all you care about at the moment is the
simulated symbol.

NOTE, that currently this will still result in a key-error when you load
more then one mkt with the paper engine (for which the backend does not
have the symcache implemented) since no fqme ad-hoc query was made for
the 2nd symbol (and i'm not sure we should support that kinda hackery
over just encouraging the sym-cache being added?). Def needs a little
more thought depending on how many backends are never going to be able
to (easily) support caching..
a945bb33f3 Invert `getattr()` check for `get_mkt_pairs()` ep
Such that we `return` early when not defined by the provider backend to
reduce an indent level in `SymbologyCache.load()`.
9e6bfa0926 Teensie `piker.data` styling tweaks
- use more compact optional value style with `|`-union
- fix `.flows` typing-only import since we need `MktPair` to be
  immediately defined for use on a `msgspec.Struct` field.
- more "tree-like" warning msg in `.validate()` reporting.
goodboy force-pushed no_symcache_no_problem from 9e6bfa0926 to c3f3b25524 2025-02-21 21:37:55 +00:00 Compare
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b no_symcache_no_problem tsp_gaps
git pull origin no_symcache_no_problem

Step 2:

Merge the changes and update on Gitea.
git checkout tsp_gaps
git merge --no-ff no_symcache_no_problem
git push origin tsp_gaps
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pikers/piker#39
There is no content yet.