docs: 补依赖清单与 README
此前仓库无任何依赖声明。按 AST 扫描全部 import 后按用途切分:
requirements.txt 为核心运行时 8 个包,requirements-dev.txt 追加测试与
research/ 所需。
matplotlib / mplfinance / xgboost / scikit-learn 只出现在 ChanPY.py、
ChanLun_Classifier.py、Find_Trend.py、ChanHeng.py 这四个零引用文件中,
故不纳入清单;ChanPY.py 依赖的外部 chan.py 库本就未安装。
README 记录目录结构、启动方式、库用法、分析流程九步与数据约定,并注明
三处现存问题:web/DEPLOY_GUIDE.md 引用的 6 个部署脚本已在 7f393b9 删除、
web/README.txt 指向不存在的 web/requirements.txt、systemd unit 的端口
8123 与 config.py 默认的 8128 不一致且 gunicorn 未声明。
清单已在全新空 venv 中验证:仅装 requirements.txt 时 57 个模块可导入、
Flask 16 条路由正常;装 dev 清单后测试 24 通过。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Tests and research/ — everything beyond the core runtime.
|
||||
#
|
||||
# .venv/bin/pip install -r requirements.txt -r requirements-dev.txt
|
||||
# .venv/bin/python -m pytest chanlun/tests web/tests
|
||||
|
||||
-r requirements.txt
|
||||
|
||||
# --- tests -----------------------------------------------------------------
|
||||
pytest>=8.0
|
||||
|
||||
# --- research/ -------------------------------------------------------------
|
||||
# pyarrow reads the data/binance/*.feather klines (research/lib/data.py) and
|
||||
# writes the parquet cache. Needed for research/, not by the web app.
|
||||
pyarrow>=15.0
|
||||
|
||||
# Only research/step10_direct_return_label.py and step11_breakout_follow.py.
|
||||
# Neither is installed by default; skip this pair unless running those steps.
|
||||
scikit-learn>=1.4
|
||||
lightgbm>=4.3
|
||||
|
||||
# --- indicator parity check (optional) -------------------------------------
|
||||
# chanlun/indicators/ta.py replaced TA-Lib and technical, so nothing here needs
|
||||
# them at runtime. chanlun/tests/test_ta_compat.py pins our output against
|
||||
# TA-Lib bar for bar and SKIPS SILENTLY when they are absent — meaning a change
|
||||
# to ta.py can look tested when it was not. Install these and re-run that file
|
||||
# whenever ta.py changes.
|
||||
#
|
||||
# TA-Lib needs the C library first:
|
||||
# sudo apt-get install -y libta-lib0 ta-lib-dev
|
||||
#
|
||||
# TA-Lib>=0.6
|
||||
# technical>=1.7
|
||||
Reference in New Issue
Block a user