Compare commits
1 Commits
main
...
add_visida
| Author | SHA1 | Date |
|---|---|---|
|
|
b55e7e1dee |
|
|
@ -95,15 +95,12 @@ bc why install with `python` when you can faster with `rust` ::
|
||||||
|
|
||||||
include all GUIs (ex. for charting)::
|
include all GUIs (ex. for charting)::
|
||||||
|
|
||||||
uv sync --group uis
|
uv sync --extra uis
|
||||||
|
|
||||||
AND with **all** our normal hacking tools::
|
AND with all our hacking tools and WIP integrations::
|
||||||
|
|
||||||
uv sync --dev
|
uv sync --dev --all-extras
|
||||||
|
|
||||||
AND if you want to try WIP integrations::
|
|
||||||
|
|
||||||
uv sync --all-groups
|
|
||||||
|
|
||||||
Ensure you can run the root-daemon::
|
Ensure you can run the root-daemon::
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,13 +102,12 @@ class AggTrade(Struct, frozen=True):
|
||||||
a: int # Aggregate trade ID
|
a: int # Aggregate trade ID
|
||||||
p: float # Price
|
p: float # Price
|
||||||
q: float # Quantity with all the market trades
|
q: float # Quantity with all the market trades
|
||||||
|
nq: float # Normal quantity without the trades involving RPI orders
|
||||||
f: int # First trade ID
|
f: int # First trade ID
|
||||||
l: int # noqa Last trade ID
|
l: int # noqa Last trade ID
|
||||||
T: int # Trade time
|
T: int # Trade time
|
||||||
m: bool # Is the buyer the market maker?
|
m: bool # Is the buyer the market maker?
|
||||||
M: bool|None = None # Ignore
|
M: bool | None = None # Ignore
|
||||||
nq: float|None = None # Normal quantity without the trades involving RPI orders
|
|
||||||
# ^XXX https://developers.binance.com/docs/derivatives/change-log#2025-12-29
|
|
||||||
|
|
||||||
|
|
||||||
async def stream_messages(
|
async def stream_messages(
|
||||||
|
|
|
||||||
103
pyproject.toml
103
pyproject.toml
|
|
@ -77,42 +77,49 @@ dependencies = [
|
||||||
"pyvnc",
|
"pyvnc",
|
||||||
]
|
]
|
||||||
# ------ dependencies ------
|
# ------ dependencies ------
|
||||||
# NOTE, by default we ship only a "headless" deps set bc
|
|
||||||
# the `uis` group is not listed in the optional set.
|
|
||||||
|
|
||||||
# [optional-dependencies]
|
|
||||||
# uis = []
|
# TODO: add an `--only daemon` group for running non-ui / pikerd
|
||||||
# ?TODO? really we should be able to mv this `uis` group
|
# service tree in distributed mode B)
|
||||||
# to be under [optional-dependencies] and then include
|
|
||||||
# it in the dev deps?
|
|
||||||
# https://docs.astral.sh/uv/concepts/projects/dependencies/#optional-dependencies
|
# https://docs.astral.sh/uv/concepts/projects/dependencies/#optional-dependencies
|
||||||
# -> uis should be included in pubbed pkgs.
|
|
||||||
# [ ] uv seems to have no way to do this though?
|
|
||||||
|
|
||||||
# TODO? move to a `uv.toml`?
|
|
||||||
[tool.uv]
|
|
||||||
# https://docs.astral.sh/uv/reference/settings/#python-preference
|
|
||||||
python-preference = 'system'
|
|
||||||
# https://docs.astral.sh/uv/reference/settings/#python-downloads
|
|
||||||
python-downloads = 'manual'
|
|
||||||
# https://docs.astral.sh/uv/concepts/projects/dependencies/#default-groups
|
|
||||||
default-groups = [
|
|
||||||
'uis',
|
|
||||||
]
|
|
||||||
# ------ tool.uv ------
|
|
||||||
|
|
||||||
[dependency-groups]
|
[dependency-groups]
|
||||||
uis = [
|
uis = [
|
||||||
"pyqtgraph",
|
# https://docs.astral.sh/uv/concepts/projects/dependencies/#optional-dependencies
|
||||||
"qdarkstyle >=3.0.2, <4.0.0",
|
# TODO: make sure the levenshtein shit compiles on nix..
|
||||||
"pyqt6 >=6.7.0, <7.0.0",
|
# rapidfuzz = {extras = ["speedup"], version = "^0.18.0"}
|
||||||
|
"rapidfuzz >=3.2.0, <4.0.0",
|
||||||
# fuzzy search
|
"qdarkstyle >=3.0.2, <4.0.0",
|
||||||
"rapidfuzz >=3.2.0, <4.0.0",
|
"pyqt6 >=6.7.0, <7.0.0",
|
||||||
|
"pyqtgraph",
|
||||||
]
|
]
|
||||||
|
|
||||||
# dev deps enabled by `uv --dev`
|
# TODO: a toolset that makes debugging a `pikerd` service (tree) easy
|
||||||
# https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies
|
# to hack on directly using more or less the local env:
|
||||||
|
# - xonsh + xxh
|
||||||
|
# - rsyscall + pdbp
|
||||||
|
# - actor runtime control console like BEAM/OTP
|
||||||
|
#
|
||||||
|
# console ehancements and eventually remote debugging extras/helpers.
|
||||||
|
# use `uv --dev` to enable
|
||||||
|
repl = [
|
||||||
|
# debug
|
||||||
|
"pdbp >=1.5.0, <2.0.0",
|
||||||
|
"greenback >=1.1.1, <2.0.0",
|
||||||
|
"xonsh",
|
||||||
|
"prompt-toolkit ==3.0.40",
|
||||||
|
"pyperclip>=1.9.0",
|
||||||
|
|
||||||
|
# tsdb console toolz
|
||||||
|
"visidata>=3.1.1",
|
||||||
|
]
|
||||||
|
testing = [
|
||||||
|
"pytest",
|
||||||
|
]
|
||||||
|
de = [
|
||||||
|
# DE-specific
|
||||||
|
"i3ipc>=2.2.1",
|
||||||
|
]
|
||||||
dev = [
|
dev = [
|
||||||
# https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies
|
# https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies
|
||||||
"cython >=3.0.0, <4.0.0",
|
"cython >=3.0.0, <4.0.0",
|
||||||
|
|
@ -124,34 +131,13 @@ dev = [
|
||||||
{include-group = 'testing'},
|
{include-group = 'testing'},
|
||||||
{include-group = 'de'},
|
{include-group = 'de'},
|
||||||
]
|
]
|
||||||
repl = [
|
|
||||||
# `tractor`'s debugger
|
|
||||||
"pdbp >=1.8.2, <2.0.0",
|
|
||||||
"greenback >=1.1.1, <2.0.0",
|
|
||||||
|
|
||||||
# @goodboy's preferred console toolz
|
|
||||||
"xonsh",
|
|
||||||
"prompt-toolkit ==3.0.40",
|
|
||||||
"pyperclip>=1.9.0",
|
|
||||||
|
|
||||||
# ?TODO, new stuff to consider..
|
|
||||||
# "visidata" # console numerics
|
|
||||||
# "xxh" # for remote `xonsh`-ing
|
|
||||||
# "rsyscall" # (eventual) optional `tractor` backend
|
|
||||||
# - an actor-runtime-ctl console like BEAM/OTP
|
|
||||||
]
|
|
||||||
testing = [
|
|
||||||
"pytest",
|
|
||||||
]
|
|
||||||
de = [ # (linux) specific DEs
|
|
||||||
"i3ipc>=2.2.1",
|
|
||||||
]
|
|
||||||
lint = [
|
lint = [
|
||||||
# XXX, with flake.nix needs to be from nixpkgs
|
# XXX, with flake.nix needs to be from nixpkgs
|
||||||
"ruff>=0.9.6"
|
"ruff>=0.9.6"
|
||||||
|
#
|
||||||
|
# ^TODO? these markers don't work; use deps-flags for now?
|
||||||
# ; os_name != 'nixos' and platform_system != 'NixOS'",
|
# ; os_name != 'nixos' and platform_system != 'NixOS'",
|
||||||
# ?TODO? since ^ markers won't work, use a deps-flags to toggle for
|
# ; defined('IN_NIX_SHELL')",
|
||||||
# now.
|
|
||||||
]
|
]
|
||||||
dbs = [
|
dbs = [
|
||||||
"elasticsearch >=8.9.0, <9.0.0",
|
"elasticsearch >=8.9.0, <9.0.0",
|
||||||
|
|
@ -186,6 +172,15 @@ include = ["piker"]
|
||||||
# ------ tool.hatch ------
|
# ------ tool.hatch ------
|
||||||
|
|
||||||
|
|
||||||
|
# TODO? move to a `uv.toml`?
|
||||||
|
[tool.uv]
|
||||||
|
python-preference = 'system'
|
||||||
|
python-downloads = 'manual'
|
||||||
|
# https://docs.astral.sh/uv/concepts/projects/dependencies/#default-groups
|
||||||
|
default-groups = ['uis', 'dev']
|
||||||
|
# ------ tool.uv ------
|
||||||
|
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
pyqtgraph = { git = "https://github.com/pikers/pyqtgraph.git" }
|
pyqtgraph = { git = "https://github.com/pikers/pyqtgraph.git" }
|
||||||
tomlkit = { git = "https://github.com/pikers/tomlkit.git", branch ="piker_pin" }
|
tomlkit = { git = "https://github.com/pikers/tomlkit.git", branch ="piker_pin" }
|
||||||
|
|
|
||||||
48
uv.lock
48
uv.lock
|
|
@ -955,16 +955,16 @@ wheels = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pdbp"
|
name = "pdbp"
|
||||||
version = "1.8.2"
|
version = "1.8.1"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
||||||
{ name = "pygments" },
|
{ name = "pygments" },
|
||||||
{ name = "tabcompleter" },
|
{ name = "tabcompleter" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/50/91/2d614b0db12840d646159f65510415ade0db9db595d6dee3eac60dfe9302/pdbp-1.8.2.tar.gz", hash = "sha256:367c25c17555d3ac1f024b9ad494ff50e6e20f6494a84741487f3e6596d88f94", size = 25843, upload-time = "2026-01-14T03:10:28.134Z" }
|
sdist = { url = "https://files.pythonhosted.org/packages/fc/f5/794ef06a84b4aea5619cda8956aefb838c6b4849002079dca3bc8955f6e3/pdbp-1.8.1.tar.gz", hash = "sha256:e2acef6b14567b5599f624aec7378139cba086695c13a4e7e327ccb235c3a00b", size = 25812, upload-time = "2025-11-02T18:15:27.098Z" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/51/fe/53ac0cd932db5dcaf55961bc7cb7afdca8d80d8cc7406ed661f0c7dc111a/pdbp-1.8.2-py3-none-any.whl", hash = "sha256:d4fd05e177636b5ccd0b2e03e378cec57afc06149e5fd975de6f8ddb3d0109a8", size = 21969, upload-time = "2026-01-14T03:10:27.062Z" },
|
{ url = "https://files.pythonhosted.org/packages/75/58/3af430d0de0b95d5adf7e576067e07d750ba76e28d142871982464fb40db/pdbp-1.8.1-py3-none-any.whl", hash = "sha256:643e8c84df7c09542c0c7c3f0f18a6c2fb4fb372f9f054ceca80a9037db986a5", size = 21950, upload-time = "2025-11-02T18:15:25.923Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1054,6 +1054,7 @@ dev = [
|
||||||
{ name = "pytest" },
|
{ name = "pytest" },
|
||||||
{ name = "qdarkstyle" },
|
{ name = "qdarkstyle" },
|
||||||
{ name = "rapidfuzz" },
|
{ name = "rapidfuzz" },
|
||||||
|
{ name = "visidata" },
|
||||||
{ name = "xonsh" },
|
{ name = "xonsh" },
|
||||||
]
|
]
|
||||||
lint = [
|
lint = [
|
||||||
|
|
@ -1064,6 +1065,7 @@ repl = [
|
||||||
{ name = "pdbp" },
|
{ name = "pdbp" },
|
||||||
{ name = "prompt-toolkit" },
|
{ name = "prompt-toolkit" },
|
||||||
{ name = "pyperclip" },
|
{ name = "pyperclip" },
|
||||||
|
{ name = "visidata" },
|
||||||
{ name = "xonsh" },
|
{ name = "xonsh" },
|
||||||
]
|
]
|
||||||
testing = [
|
testing = [
|
||||||
|
|
@ -1115,7 +1117,7 @@ dev = [
|
||||||
{ name = "cython", specifier = ">=3.0.0,<4.0.0" },
|
{ name = "cython", specifier = ">=3.0.0,<4.0.0" },
|
||||||
{ name = "greenback", specifier = ">=1.1.1,<2.0.0" },
|
{ name = "greenback", specifier = ">=1.1.1,<2.0.0" },
|
||||||
{ name = "i3ipc", specifier = ">=2.2.1" },
|
{ name = "i3ipc", specifier = ">=2.2.1" },
|
||||||
{ name = "pdbp", specifier = ">=1.8.2,<2.0.0" },
|
{ name = "pdbp", specifier = ">=1.5.0,<2.0.0" },
|
||||||
{ name = "prompt-toolkit", specifier = "==3.0.40" },
|
{ name = "prompt-toolkit", specifier = "==3.0.40" },
|
||||||
{ name = "pyperclip", specifier = ">=1.9.0" },
|
{ name = "pyperclip", specifier = ">=1.9.0" },
|
||||||
{ name = "pyqt6", specifier = ">=6.7.0,<7.0.0" },
|
{ name = "pyqt6", specifier = ">=6.7.0,<7.0.0" },
|
||||||
|
|
@ -1123,14 +1125,16 @@ dev = [
|
||||||
{ name = "pytest" },
|
{ name = "pytest" },
|
||||||
{ name = "qdarkstyle", specifier = ">=3.0.2,<4.0.0" },
|
{ name = "qdarkstyle", specifier = ">=3.0.2,<4.0.0" },
|
||||||
{ name = "rapidfuzz", specifier = ">=3.2.0,<4.0.0" },
|
{ name = "rapidfuzz", specifier = ">=3.2.0,<4.0.0" },
|
||||||
|
{ name = "visidata", specifier = ">=3.1.1" },
|
||||||
{ name = "xonsh" },
|
{ name = "xonsh" },
|
||||||
]
|
]
|
||||||
lint = [{ name = "ruff", specifier = ">=0.9.6" }]
|
lint = [{ name = "ruff", specifier = ">=0.9.6" }]
|
||||||
repl = [
|
repl = [
|
||||||
{ name = "greenback", specifier = ">=1.1.1,<2.0.0" },
|
{ name = "greenback", specifier = ">=1.1.1,<2.0.0" },
|
||||||
{ name = "pdbp", specifier = ">=1.8.2,<2.0.0" },
|
{ name = "pdbp", specifier = ">=1.5.0,<2.0.0" },
|
||||||
{ name = "prompt-toolkit", specifier = "==3.0.40" },
|
{ name = "prompt-toolkit", specifier = "==3.0.40" },
|
||||||
{ name = "pyperclip", specifier = ">=1.9.0" },
|
{ name = "pyperclip", specifier = ">=1.9.0" },
|
||||||
|
{ name = "visidata", specifier = ">=3.1.1" },
|
||||||
{ name = "xonsh" },
|
{ name = "xonsh" },
|
||||||
]
|
]
|
||||||
testing = [{ name = "pytest" }]
|
testing = [{ name = "pytest" }]
|
||||||
|
|
@ -1773,6 +1777,15 @@ wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0", size = 29575, upload-time = "2021-05-16T22:03:41.177Z" },
|
{ url = "https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0", size = 29575, upload-time = "2021-05-16T22:03:41.177Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "standard-mailcap"
|
||||||
|
version = "3.13.0"
|
||||||
|
source = { registry = "https://pypi.org/simple" }
|
||||||
|
sdist = { url = "https://files.pythonhosted.org/packages/53/e8/672bd621c146b89667a2bfaa58a1384db13cdd62bb7722ddb8d672bf7a75/standard_mailcap-3.13.0.tar.gz", hash = "sha256:19ed7955dbeaccb35e8bb05b2b5443ce55c1f932a8cbe7a5c13d42f9db4f499a", size = 8797, upload-time = "2024-10-30T16:01:37.415Z" }
|
||||||
|
wheels = [
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/83/ed/a49825f8ff1bd4f1f77fb631441c00c8e831a4a3decacd34f1cf3e24bb44/standard_mailcap-3.13.0-py3-none-any.whl", hash = "sha256:4f509e11cb5a4700e91118630447643398b183ff3bb734011c8c030b3d671f0a", size = 6185, upload-time = "2024-10-30T16:01:14.706Z" },
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tabcompleter"
|
name = "tabcompleter"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
|
|
@ -2003,6 +2016,20 @@ wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/e4/16/c1fd27e9549f3c4baf1dc9c20c456cd2f822dbf8de9f463824b0c0357e06/uvloop-0.22.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6cde23eeda1a25c75b2e07d39970f3374105d5eafbaab2a4482be82f272d5a5e", size = 4296730, upload-time = "2025-10-16T22:17:00.744Z" },
|
{ url = "https://files.pythonhosted.org/packages/e4/16/c1fd27e9549f3c4baf1dc9c20c456cd2f822dbf8de9f463824b0c0357e06/uvloop-0.22.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6cde23eeda1a25c75b2e07d39970f3374105d5eafbaab2a4482be82f272d5a5e", size = 4296730, upload-time = "2025-10-16T22:17:00.744Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "visidata"
|
||||||
|
version = "3.3"
|
||||||
|
source = { registry = "https://pypi.org/simple" }
|
||||||
|
dependencies = [
|
||||||
|
{ name = "python-dateutil" },
|
||||||
|
{ name = "standard-mailcap", marker = "python_full_version >= '3.13'" },
|
||||||
|
{ name = "windows-curses", marker = "sys_platform == 'win32'" },
|
||||||
|
]
|
||||||
|
sdist = { url = "https://files.pythonhosted.org/packages/aa/c0/ab9f01fcacbfbacde960e143f7c168c4de3c4f7e450873f8fd96fa2fcfb3/visidata-3.3.tar.gz", hash = "sha256:a94f4e398477e038541849cf4df1d1f2efc399da544d77db189bdb7f2fc014c4", size = 13248725, upload-time = "2025-09-08T04:50:45.326Z" }
|
||||||
|
wheels = [
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/95/35/9dc5f6e5e3623ff2cbb2d1e0d7307bf055ef9d0ee4057b832073429cd3e5/visidata-3.3-py3-none-any.whl", hash = "sha256:e805d8ad3f3eeb9959ab9a8a1cabe897807df032cf73367a97b399ec8a2d03f5", size = 549087, upload-time = "2025-09-08T04:50:39.976Z" },
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wcwidth"
|
name = "wcwidth"
|
||||||
version = "0.2.14"
|
version = "0.2.14"
|
||||||
|
|
@ -2032,6 +2059,17 @@ wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/79/4d/9cc401e7b07e80532ebc8c8e993f42541534da9e9249c59ee0139dcb0352/websockets-12.0-py3-none-any.whl", hash = "sha256:dc284bbc8d7c78a6c69e0c7325ab46ee5e40bb4d50e494d8131a07ef47500e9e", size = 118370, upload-time = "2023-10-21T14:21:10.075Z" },
|
{ url = "https://files.pythonhosted.org/packages/79/4d/9cc401e7b07e80532ebc8c8e993f42541534da9e9249c59ee0139dcb0352/websockets-12.0-py3-none-any.whl", hash = "sha256:dc284bbc8d7c78a6c69e0c7325ab46ee5e40bb4d50e494d8131a07ef47500e9e", size = 118370, upload-time = "2023-10-21T14:21:10.075Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-curses"
|
||||||
|
version = "2.4.1"
|
||||||
|
source = { registry = "https://pypi.org/simple" }
|
||||||
|
wheels = [
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/f4/99/60f34e51514c82631aa5c6d21eab88ce1701562de9844608411e39462a46/windows_curses-2.4.1-cp312-cp312-win32.whl", hash = "sha256:bdbe7d58747408aef8a9128b2654acf6fbd11c821b91224b9a046faba8c6b6ca", size = 71489, upload-time = "2025-01-11T00:26:22.726Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/62/8f/d908bcab1954375b156a9300fa86ceccb110f39457cd6fd59c72777626ab/windows_curses-2.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:5c9c2635faf171a229caca80e1dd760ab00db078e2a285ba2f667bbfcc31777c", size = 81777, upload-time = "2025-01-11T00:26:25.273Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/25/a0/e8d074f013117633f6b502ca123ecfc377fe0bd36818fe65e8935c91ca9c/windows_curses-2.4.1-cp313-cp313-win32.whl", hash = "sha256:05d1ca01e5199a435ccb6c8c2978df4a169cdff1ec99ab15f11ded9de8e5be26", size = 71390, upload-time = "2025-01-11T00:26:27.66Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/2b/4b/2838a829b074a68c570d54ae0ae8539979657d3e619a4dc5a4b03eb69745/windows_curses-2.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:8cf653f8928af19c103ae11cfed38124f418dcdd92643c4cd17239c0cec2f9da", size = 81636, upload-time = "2025-01-11T00:26:29.595Z" },
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wrapt"
|
name = "wrapt"
|
||||||
version = "1.17.3"
|
version = "1.17.3"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue