Qubx 0.6.77__cp312-cp312-manylinux_2_39_x86_64.whl → 0.6.78__cp312-cp312-manylinux_2_39_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Qubx might be problematic. Click here for more details.
- qubx/cli/release.py +23 -6
- qubx/core/account.py +10 -0
- qubx/core/series.cpython-312-x86_64-linux-gnu.so +0 -0
- qubx/core/utils.cpython-312-x86_64-linux-gnu.so +0 -0
- qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so +0 -0
- {qubx-0.6.77.dist-info → qubx-0.6.78.dist-info}/METADATA +1 -1
- {qubx-0.6.77.dist-info → qubx-0.6.78.dist-info}/RECORD +10 -10
- {qubx-0.6.77.dist-info → qubx-0.6.78.dist-info}/LICENSE +0 -0
- {qubx-0.6.77.dist-info → qubx-0.6.78.dist-info}/WHEEL +0 -0
- {qubx-0.6.77.dist-info → qubx-0.6.78.dist-info}/entry_points.txt +0 -0
qubx/cli/release.py
CHANGED
|
@@ -84,9 +84,12 @@ def resolve_relative_import(relative_module: str, file_path: str, project_root:
|
|
|
84
84
|
# Get the directory containing the file (remove filename)
|
|
85
85
|
file_dir = os.path.dirname(rel_file_path)
|
|
86
86
|
|
|
87
|
-
# Convert file directory path to module path
|
|
87
|
+
# Convert file directory path to module path
|
|
88
88
|
if file_dir:
|
|
89
89
|
current_module_parts = file_dir.replace(os.sep, ".").split(".")
|
|
90
|
+
# Remove 'src' prefix if present (common Python project structure)
|
|
91
|
+
if current_module_parts[0] == "src" and len(current_module_parts) > 1:
|
|
92
|
+
current_module_parts = current_module_parts[1:]
|
|
90
93
|
else:
|
|
91
94
|
current_module_parts = []
|
|
92
95
|
|
|
@@ -684,8 +687,8 @@ def _copy_dependencies(strategy_path: str, pyproject_root: str, release_dir: str
|
|
|
684
687
|
if _src_root is None:
|
|
685
688
|
raise DependencyResolutionError(f"Could not find the source root for {_src_dir} in {pyproject_root}")
|
|
686
689
|
|
|
687
|
-
# Now call _get_imports with the correct source root directory
|
|
688
|
-
_imports = _get_imports(strategy_path, _src_root, [_src_dir])
|
|
690
|
+
# Now call _get_imports with the correct source root directory and pyproject_root for relative imports
|
|
691
|
+
_imports = _get_imports(strategy_path, _src_root, [_src_dir], pyproject_root)
|
|
689
692
|
|
|
690
693
|
# Validate all dependencies before copying
|
|
691
694
|
valid_imports, missing_dependencies = _validate_dependencies(_imports, _src_root, _src_dir)
|
|
@@ -920,7 +923,7 @@ def _create_zip_archive(output_dir: str, release_dir: str, tag: str) -> None:
|
|
|
920
923
|
shutil.rmtree(release_dir)
|
|
921
924
|
|
|
922
925
|
|
|
923
|
-
def _get_imports(file_name: str, current_directory: str, what_to_look: list[str]) -> list[Import]:
|
|
926
|
+
def _get_imports(file_name: str, current_directory: str, what_to_look: list[str], pyproject_root: str | None = None, visited: set[str] | None = None) -> list[Import]:
|
|
924
927
|
"""
|
|
925
928
|
Recursively get all imports from a file and its dependencies.
|
|
926
929
|
|
|
@@ -928,6 +931,8 @@ def _get_imports(file_name: str, current_directory: str, what_to_look: list[str]
|
|
|
928
931
|
file_name: Path to the Python file to analyze
|
|
929
932
|
current_directory: Root directory for resolving imports
|
|
930
933
|
what_to_look: List of module prefixes to filter for
|
|
934
|
+
pyproject_root: Root directory of the project for resolving relative imports
|
|
935
|
+
visited: Set of already visited files to prevent infinite recursion
|
|
931
936
|
|
|
932
937
|
Returns:
|
|
933
938
|
List of Import objects for all discovered dependencies
|
|
@@ -935,8 +940,20 @@ def _get_imports(file_name: str, current_directory: str, what_to_look: list[str]
|
|
|
935
940
|
Raises:
|
|
936
941
|
DependencyResolutionError: If a required dependency cannot be found or processed
|
|
937
942
|
"""
|
|
943
|
+
# Initialize visited set if not provided
|
|
944
|
+
if visited is None:
|
|
945
|
+
visited = set()
|
|
946
|
+
|
|
947
|
+
# Skip if already visited to prevent infinite recursion
|
|
948
|
+
if file_name in visited:
|
|
949
|
+
return []
|
|
950
|
+
visited.add(file_name)
|
|
951
|
+
|
|
952
|
+
# Use pyproject_root if provided, otherwise use current_directory as fallback
|
|
953
|
+
project_root_for_resolution = pyproject_root or current_directory
|
|
954
|
+
|
|
938
955
|
try:
|
|
939
|
-
imports = list(get_imports(file_name, what_to_look, project_root=
|
|
956
|
+
imports = list(get_imports(file_name, what_to_look, project_root=project_root_for_resolution))
|
|
940
957
|
except (SyntaxError, FileNotFoundError) as e:
|
|
941
958
|
raise DependencyResolutionError(f"Failed to parse imports from {file_name}: {e}")
|
|
942
959
|
|
|
@@ -959,7 +976,7 @@ def _get_imports(file_name: str, current_directory: str, what_to_look: list[str]
|
|
|
959
976
|
if dependency_file:
|
|
960
977
|
# Recursively process the dependency
|
|
961
978
|
try:
|
|
962
|
-
imports.extend(_get_imports(dependency_file, current_directory, what_to_look))
|
|
979
|
+
imports.extend(_get_imports(dependency_file, current_directory, what_to_look, pyproject_root, visited))
|
|
963
980
|
except DependencyResolutionError as e:
|
|
964
981
|
# Log nested dependency errors but continue processing
|
|
965
982
|
logger.warning(f"Failed to resolve nested dependency: {e}")
|
qubx/core/account.py
CHANGED
|
@@ -18,6 +18,7 @@ from qubx.core.basics import (
|
|
|
18
18
|
)
|
|
19
19
|
from qubx.core.helpers import extract_price
|
|
20
20
|
from qubx.core.interfaces import IAccountProcessor, ISubscriptionManager
|
|
21
|
+
from qubx.core.mixins.utils import EXCHANGE_MAPPINGS
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
class BasicAccountProcessor(IAccountProcessor):
|
|
@@ -356,11 +357,20 @@ class CompositeAccountProcessor(IAccountProcessor):
|
|
|
356
357
|
"""
|
|
357
358
|
if exchange:
|
|
358
359
|
if exchange not in self._account_processors:
|
|
360
|
+
# Check if there's a mapping for this exchange
|
|
361
|
+
if exchange in EXCHANGE_MAPPINGS and EXCHANGE_MAPPINGS[exchange] in self._account_processors:
|
|
362
|
+
return EXCHANGE_MAPPINGS[exchange]
|
|
359
363
|
raise ValueError(f"Unknown exchange: {exchange}")
|
|
360
364
|
return exchange
|
|
361
365
|
|
|
362
366
|
if instrument:
|
|
363
367
|
if instrument.exchange not in self._account_processors:
|
|
368
|
+
# Check if there's a mapping for this exchange
|
|
369
|
+
if (
|
|
370
|
+
instrument.exchange in EXCHANGE_MAPPINGS
|
|
371
|
+
and EXCHANGE_MAPPINGS[instrument.exchange] in self._account_processors
|
|
372
|
+
):
|
|
373
|
+
return EXCHANGE_MAPPINGS[instrument.exchange]
|
|
364
374
|
raise ValueError(f"Unknown exchange: {instrument.exchange}")
|
|
365
375
|
return instrument.exchange
|
|
366
376
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -17,7 +17,7 @@ qubx/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
17
17
|
qubx/cli/commands.py,sha256=z1Qs6jLbrfINk7D6V7n6ruPNLoyq3T-sY66Y-F8LmBE,11714
|
|
18
18
|
qubx/cli/deploy.py,sha256=pQ9FPOsywDyy8jOjLfrgYTTkKQ-MCixCzbgsG68Q3_0,8319
|
|
19
19
|
qubx/cli/misc.py,sha256=tP28QxLEzuP8R2xnt8g3JTs9Z7aYy4iVWY4g3VzKTsQ,14777
|
|
20
|
-
qubx/cli/release.py,sha256=
|
|
20
|
+
qubx/cli/release.py,sha256=Kz5aykF9FlAeUgXF59_Mu3vRFxa_qF9dq0ySqLlKKqo,41362
|
|
21
21
|
qubx/cli/tui.py,sha256=N15UiNEdnWOWYh8E9DNlQCDWdoyP6rMGMhEItogPW88,16491
|
|
22
22
|
qubx/connectors/ccxt/__init__.py,sha256=HEQ7lM9HS8sED_zfsAHrhFT7F9E7NFGAecwZwNr-TDE,65
|
|
23
23
|
qubx/connectors/ccxt/account.py,sha256=f_Qa3ti5RY6CP3aww04CKvGgc8FYdSOi__FMdscG2y4,24664
|
|
@@ -58,7 +58,7 @@ qubx/connectors/ccxt/warmup_service.py,sha256=a7qSFUmgUm6s7qP-ae9RP-j1bR9XyEsNy4
|
|
|
58
58
|
qubx/connectors/tardis/data.py,sha256=TlapY1dwc_aQxf4Na9sF620lK9drrg7E9E8gPTGD3FE,31004
|
|
59
59
|
qubx/connectors/tardis/utils.py,sha256=epThu9DwqbDb7BgScH6fHa_FVpKUaItOqp3JwtKGc5g,9092
|
|
60
60
|
qubx/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
|
-
qubx/core/account.py,sha256=
|
|
61
|
+
qubx/core/account.py,sha256=HhbxVQ-iozVOGr5uL5ZaBGK8TCZi2KoyTaFu79uX3Oo,23880
|
|
62
62
|
qubx/core/basics.py,sha256=ggK75OsmpH-SCH_Q_2kJmmgFxgrgt4RgO7QipCqUCGk,41301
|
|
63
63
|
qubx/core/context.py,sha256=Yq039nsKmf-IeyvcRdnMs_phVmehoCUqFvQuVnm-d4s,26074
|
|
64
64
|
qubx/core/deque.py,sha256=3PsmJ5LF76JpsK4Wp5LLogyE15rKn6EDCkNOOWT6EOk,6203
|
|
@@ -77,12 +77,12 @@ qubx/core/mixins/subscription.py,sha256=GcZKHHzjPyYFLAEpE7j4fpLDOlAhFKojQEYfFO3Q
|
|
|
77
77
|
qubx/core/mixins/trading.py,sha256=7KwxHiPWkXGnkHS4VLaxOZ7BHULkvvqPS8ooAG1NTxM,9477
|
|
78
78
|
qubx/core/mixins/universe.py,sha256=UBa3OIr2XvlK04O7YUG9c66CY8AZ5rQDSZov1rnUSjQ,10512
|
|
79
79
|
qubx/core/mixins/utils.py,sha256=P71cLuqKjId8989MwOL_BtvvCnnwOFMkZyB1SY-0Ork,147
|
|
80
|
-
qubx/core/series.cpython-312-x86_64-linux-gnu.so,sha256=
|
|
80
|
+
qubx/core/series.cpython-312-x86_64-linux-gnu.so,sha256=0FPkdICMQaAvcLrcuMIV9RjdbyaD7Hq987H2awwlSiI,1019592
|
|
81
81
|
qubx/core/series.pxd,sha256=PvnUEupOsZg8u81U5Amd-nbfmWQ0-PwZwc7yUoaZpoQ,4739
|
|
82
82
|
qubx/core/series.pyi,sha256=RkM-F3AyrzT7m1H2UmOvZmmcOzU2eBeEWf2c0GUZe2o,5437
|
|
83
83
|
qubx/core/series.pyx,sha256=wAn7L9HIkvVl-1Tt7bgdWhec7xy4AiHSXyDsrA4a29U,51703
|
|
84
84
|
qubx/core/stale_data_detector.py,sha256=NHnnG9NkcivC93n8QMwJUzFVQv2ziUaN-fg76ppng_c,17118
|
|
85
|
-
qubx/core/utils.cpython-312-x86_64-linux-gnu.so,sha256=
|
|
85
|
+
qubx/core/utils.cpython-312-x86_64-linux-gnu.so,sha256=yUmHzn-JTnvLybsw6nMLz-05T-4ITjc9H1EWNVFKQes,86568
|
|
86
86
|
qubx/core/utils.pyi,sha256=a-wS13V2p_dM1CnGq40JVulmiAhixTwVwt0ah5By0Hc,348
|
|
87
87
|
qubx/core/utils.pyx,sha256=UR9achMR-LARsztd2eelFsDsFH3n0gXACIKoGNPI9X4,1766
|
|
88
88
|
qubx/data/__init__.py,sha256=BlyZ99esHLDmFA6ktNkuIce9RZO99TA1IMKWe94aI8M,599
|
|
@@ -156,7 +156,7 @@ qubx/restorers/signal.py,sha256=5nK5ji8AucyWrFBK9uW619YCI_vPRGFnuDu8JnG3B_Y,1451
|
|
|
156
156
|
qubx/restorers/state.py,sha256=I1VIN0ZcOjigc3WMHIYTNJeAAbN9YB21MDcMl04ZWmY,8018
|
|
157
157
|
qubx/restorers/utils.py,sha256=We2gfqwQKWziUYhuUnjb-xo-5tSlbuHWpPQn0CEMTn0,1155
|
|
158
158
|
qubx/ta/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
159
|
-
qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so,sha256=
|
|
159
|
+
qubx/ta/indicators.cpython-312-x86_64-linux-gnu.so,sha256=xwgp8UOeeixa0CdddHwS_emo-39gCZ6TRSlI2u3ER8s,762760
|
|
160
160
|
qubx/ta/indicators.pxd,sha256=l4JgvNdlWBuLqMzqTZVaYYn4XyZ9-c222YCyBXVv8MA,4843
|
|
161
161
|
qubx/ta/indicators.pyi,sha256=kHoHONhzI7aq0qs-wP5cxyDPj96ZvQLlThEC8yQj6U4,2630
|
|
162
162
|
qubx/ta/indicators.pyx,sha256=rT6OJ7xygZdTF4-pT6vr6g9MRhvbi6nYBlkTzzZYA_U,35126
|
|
@@ -211,8 +211,8 @@ qubx/utils/runner/factory.py,sha256=hmtUDYNFQwVQffHEfxgrlmKwOGLcFQ6uJIH_ZLscpIY,
|
|
|
211
211
|
qubx/utils/runner/runner.py,sha256=gZvj-ScJkSnbl7Vj3VENfdiruc5eCTzUkKek3zPmXiM,33299
|
|
212
212
|
qubx/utils/time.py,sha256=xOWl_F6dOLFCmbB4xccLIx5yVt5HOH-I8ZcuowXjtBQ,11797
|
|
213
213
|
qubx/utils/version.py,sha256=e52fIHyxzCiIuH7svCF6pkHuDlqL64rklqz-2XjWons,5309
|
|
214
|
-
qubx-0.6.
|
|
215
|
-
qubx-0.6.
|
|
216
|
-
qubx-0.6.
|
|
217
|
-
qubx-0.6.
|
|
218
|
-
qubx-0.6.
|
|
214
|
+
qubx-0.6.78.dist-info/LICENSE,sha256=qwMHOSJ2TD0nx6VUJvFhu1ynJdBfNozRMt6tnSul-Ts,35140
|
|
215
|
+
qubx-0.6.78.dist-info/METADATA,sha256=MdOcTFxgH5pUTsBloOTFMxpzZI3envIgDT7VrUzkOyE,5836
|
|
216
|
+
qubx-0.6.78.dist-info/WHEEL,sha256=UckHTmFUCaLKpi4yFY8Dewu0c6XkY-KvEAGzGOnaWo8,110
|
|
217
|
+
qubx-0.6.78.dist-info/entry_points.txt,sha256=VqilDTe8mVuV9SbR-yVlZJBTjbkHIL2JBgXfQw076HY,47
|
|
218
|
+
qubx-0.6.78.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|