Compare commits
4 Commits
b577180773
...
35a9d8ec9d
Author | SHA1 | Date |
---|---|---|
Nelson Torres | 35a9d8ec9d | |
Nelson Torres | a831212c86 | |
Tyler Goodlet | e987d7d7c4 | |
Tyler Goodlet | 5ec756234a |
|
@ -0,0 +1,82 @@
|
||||||
|
with (import <nixpkgs> {});
|
||||||
|
with python312Packages;
|
||||||
|
let
|
||||||
|
glibStorePath = lib.getLib glib;
|
||||||
|
qtpyStorePath = lib.getLib qtpy;
|
||||||
|
pyqt6StorePath = lib.getLib pyqt6;
|
||||||
|
pyqt6SipStorePath = lib.getLib pyqt6-sip;
|
||||||
|
qt6baseStorePath = lib.getLib qt6.qtbase;
|
||||||
|
rapidfuzzStorePath = lib.getLib rapidfuzz;
|
||||||
|
qdarkstyleStorePath = lib.getLib qdarkstyle;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "piker-qt6-poetry-shell";
|
||||||
|
buildInputs = [
|
||||||
|
# System requirements.
|
||||||
|
glib
|
||||||
|
qt6.qtbase
|
||||||
|
libgcc.lib
|
||||||
|
|
||||||
|
# Python requirements.
|
||||||
|
python312Full
|
||||||
|
poetry-core
|
||||||
|
qdarkstyle
|
||||||
|
rapidfuzz
|
||||||
|
pyqt6
|
||||||
|
qtpy
|
||||||
|
];
|
||||||
|
src = null;
|
||||||
|
shellHook = ''
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${libgcc.lib}/lib:${glibStorePath}/lib
|
||||||
|
|
||||||
|
# Set the Qt plugin path
|
||||||
|
# export QT_DEBUG_PLUGINS=1
|
||||||
|
|
||||||
|
QTBASE_PATH="${qt6baseStorePath}"
|
||||||
|
echo "qtbase path: $QTBASE_PATH"
|
||||||
|
echo ""
|
||||||
|
export QT_PLUGIN_PATH="$QTBASE_PATH/lib/qt-6/plugins"
|
||||||
|
export QT_QPA_PLATFORM_PLUGIN_PATH="$QT_PLUGIN_PATH/platforms"
|
||||||
|
echo "qt plugin path: $QT_PLUGIN_PATH"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Maybe create venv & install deps
|
||||||
|
poetry install --with uis
|
||||||
|
|
||||||
|
# Use pyqt6 from System, patch activate script
|
||||||
|
ACTIVATE_SCRIPT_PATH="$(poetry env info --path)/bin/activate"
|
||||||
|
|
||||||
|
export RPDFUZZ_PATH="${rapidfuzzStorePath}/lib/python3.12/site-packages"
|
||||||
|
export QDRKSTYLE_PATH="${qdarkstyleStorePath}/lib/python3.12/site-packages"
|
||||||
|
export QTPY_PATH="${qtpyStorePath}/lib/python3.12/site-packages"
|
||||||
|
export PYQT6_PATH="${pyqt6StorePath}/lib/python3.12/site-packages"
|
||||||
|
export PYQT6_SIP_PATH="${pyqt6SipStorePath}/lib/python3.12/site-packages"
|
||||||
|
echo "rapidfuzz at: $RPDFUZZ_PATH"
|
||||||
|
echo "qdarkstyle at: $QDRKSTYLE_PATH"
|
||||||
|
echo "qtpy at: $QTPY_PATH"
|
||||||
|
echo "pyqt6 at: $PYQT6_PATH"
|
||||||
|
echo "pyqt6-sip at: $PYQT6_SIP_PATH"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
PATCH="export PYTHONPATH=\""
|
||||||
|
|
||||||
|
PATCH="$PATCH\$RPDFUZZ_PATH"
|
||||||
|
PATCH="$PATCH:\$QDRKSTYLE_PATH"
|
||||||
|
PATCH="$PATCH:\$QTPY_PATH"
|
||||||
|
PATCH="$PATCH:\$PYQT6_PATH"
|
||||||
|
PATCH="$PATCH:\$PYQT6_SIP_PATH"
|
||||||
|
|
||||||
|
PATCH="$PATCH\""
|
||||||
|
|
||||||
|
if grep -q "$PATCH" "$ACTIVATE_SCRIPT_PATH"; then
|
||||||
|
echo "venv is already patched."
|
||||||
|
else
|
||||||
|
echo "patching $ACTIVATE_SCRIPT_PATH to use pyqt6 from nixos..."
|
||||||
|
sed -i "\$i$PATCH" $ACTIVATE_SCRIPT_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
poetry shell
|
||||||
|
'';
|
||||||
|
}
|
|
@ -567,6 +567,7 @@ class Client:
|
||||||
) -> str:
|
) -> str:
|
||||||
return {
|
return {
|
||||||
'USDTM': 'usdtm_futes',
|
'USDTM': 'usdtm_futes',
|
||||||
|
'SPOT': 'spot',
|
||||||
# 'COINM': 'coin_futes',
|
# 'COINM': 'coin_futes',
|
||||||
# ^-TODO-^ bc someone might want it..?
|
# ^-TODO-^ bc someone might want it..?
|
||||||
}[pair.venue]
|
}[pair.venue]
|
||||||
|
|
|
@ -458,13 +458,15 @@ async def start_backfill(
|
||||||
'bf_until <- last_start_dt:\n'
|
'bf_until <- last_start_dt:\n'
|
||||||
f'{backfill_until_dt} <- {last_start_dt}\n'
|
f'{backfill_until_dt} <- {last_start_dt}\n'
|
||||||
)
|
)
|
||||||
|
# UGH: what's a better way?
|
||||||
# ugh, what's a better way?
|
# TODO: backends are responsible for being correct on
|
||||||
# TODO: fwiw, we probably want a way to signal a throttle
|
# this right!?
|
||||||
# condition (eg. with ib) so that we can halt the
|
# -[ ] in the `ib` case we could maybe offer some way
|
||||||
# request loop until the condition is resolved?
|
# to halt the request loop until the condition is
|
||||||
if timeframe > 1:
|
# resolved or should the backend be entirely in
|
||||||
await tractor.pause()
|
# charge of solving such faults? yes, right?
|
||||||
|
# if timeframe > 1:
|
||||||
|
# await tractor.pause()
|
||||||
return
|
return
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
|
@ -578,6 +580,7 @@ async def start_backfill(
|
||||||
'crypto',
|
'crypto',
|
||||||
'crypto_currency',
|
'crypto_currency',
|
||||||
'fiat', # a "forex pair"
|
'fiat', # a "forex pair"
|
||||||
|
'perpetual_future', # stupid "perps" from cex land
|
||||||
}:
|
}:
|
||||||
# for now, our table key schema is not including
|
# for now, our table key schema is not including
|
||||||
# the dst[/src] source asset token.
|
# the dst[/src] source asset token.
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -50,10 +50,8 @@ attrs = "^23.1.0"
|
||||||
bidict = "^0.22.1"
|
bidict = "^0.22.1"
|
||||||
colorama = "^0.4.6"
|
colorama = "^0.4.6"
|
||||||
colorlog = "^6.7.0"
|
colorlog = "^6.7.0"
|
||||||
cython = "^3.0.0"
|
|
||||||
greenback = "^1.1.1"
|
|
||||||
ib-insync = "^0.9.86"
|
ib-insync = "^0.9.86"
|
||||||
msgspec = "^0.18.0"
|
msgspec = "^0.18.6"
|
||||||
numba = "^0.59.0"
|
numba = "^0.59.0"
|
||||||
numpy = "^1.25"
|
numpy = "^1.25"
|
||||||
polars = "^0.18.13"
|
polars = "^0.18.13"
|
||||||
|
@ -74,8 +72,8 @@ httpx = "^0.27.0"
|
||||||
|
|
||||||
[tool.poetry.dependencies.tractor]
|
[tool.poetry.dependencies.tractor]
|
||||||
develop = true
|
develop = true
|
||||||
git = 'https://github.com/goodboy/tractor.git'
|
git = 'https://pikers.dev/goodboy/tractor.git'
|
||||||
branch = 'asyncio_debugger_support'
|
branch = 'aio_abandons'
|
||||||
# path = "../tractor"
|
# path = "../tractor"
|
||||||
|
|
||||||
[tool.poetry.dependencies.asyncvnc]
|
[tool.poetry.dependencies.asyncvnc]
|
||||||
|
@ -109,6 +107,8 @@ pytest = "^6.0.0"
|
||||||
elasticsearch = "^8.9.0"
|
elasticsearch = "^8.9.0"
|
||||||
xonsh = "^0.14.2"
|
xonsh = "^0.14.2"
|
||||||
prompt-toolkit = "3.0.40"
|
prompt-toolkit = "3.0.40"
|
||||||
|
cython = "^3.0.0"
|
||||||
|
greenback = "^1.1.1"
|
||||||
|
|
||||||
# console ehancements and eventually remote debugging
|
# console ehancements and eventually remote debugging
|
||||||
# extras/helpers.
|
# extras/helpers.
|
||||||
|
|
Loading…
Reference in New Issue