Files
big-qmt/labs/__init__.py
2026-09-19 19:45:43 +08:00

18 lines
643 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""labs所有试验与测试代码。
本目录**不属于运行时代码**,只放回测/审计/基准/测试。里面的脚本需要
``py-client`` 在 ``sys.path`` 上才能 import ``config`` / ``libs`` / ``sdk`` / ``strategy``
这里统一补一次,保证从仓库根目录也能直接跑:
py -3.14 -B -m unittest discover -s labs/tests
py -3.14 -B labs/analysis/etf/run.py
py -3.14 -B labs/benchmarks/hotpaths.py
"""
import sys
from pathlib import Path
PY_CLIENT = Path(__file__).resolve().parents[1] / "py-client"
if PY_CLIENT.is_dir() and str(PY_CLIENT) not in sys.path:
sys.path.insert(0, str(PY_CLIENT))