Skip to content

feat: Windows CI 矩阵 + .day/.lc5 二进制解析 fixture 测试#35

Merged
xbfighting merged 1 commit into
masterfrom
feat-issue-34-ci-fixtures
Jul 7, 2026
Merged

feat: Windows CI 矩阵 + .day/.lc5 二进制解析 fixture 测试#35
xbfighting merged 1 commit into
masterfrom
feat-issue-34-ci-fixtures

Conversation

@xbfighting

Copy link
Copy Markdown
Owner

Summary

CI 覆盖 Windows(用户主场景),二进制解析器获得逐字段确定性回归测试。对标调研(easy_tdx 工程实践)的批次 A。

Related Issue

Closes #34

What Changed

  • CI 矩阵:ubuntu+windows × py3.9/3.11 + ubuntu 3.10(5 个 job);defaults.run.shell: bash 保证 if [ -f ... ] 语法在 Windows runner 可用
  • tests/fixtures/:合成字节 fixture(深市 .day 2 条 / 688 .day 1 条 / .lc5 2 条),价格值选二进制可精确表示的数(×.25/.5/.75),断言可用 ==
  • make_fixtures.py:fixture 生成器 + 真实文件切片方法注释(dd bs=32 count=5),数据盘可用后可换/补真实字节样本
  • tests/test_reader.py:4 个测试覆盖三条解析路径——pytdx A 股系数路径(价/量 ×0.01)、688 自研 struct 回退(断言与 pytdx 同系数)、lc5 分钟线(日期位域 (年-2004)×2048+月×100+日)

Done Criteria Mapping

  • CI 矩阵扩展:workflow 更新
  • fixture 打底:合成字节已入库,真实切片待数据盘(issue 中已注明)
  • 逐字段断言:date/OHLC/amount/volume/code/market 全断言
  • Windows CI 通过:本 PR 的 CI 即为验证
  • CLAUDE.md 同步

How to Test

pytest tests/test_reader.py -v(52 passed 全量);观察本 PR 的 windows-latest job。

Risks / Tradeoffs

🤖 Generated with Claude Code

- CI 矩阵扩展为 ubuntu+windows × 3.9/3.11(+ ubuntu 3.10),
  Windows 是本地读通达信文件的用户主场景;run 步骤统一 bash shell
- tests/fixtures/:确定性合成字节 fixture(.day 深市 / 688 / .lc5),
  生成器 make_fixtures.py 附真实文件切片方法(dd)备后续替换
- tests/test_reader.py:三条解析路径逐字段断言(pytdx A 股系数路径 /
  688 自研 struct 回退路径 / lc5 分钟线),共 4 个测试
- 对标调研吸收(easy_tdx 的 fixture 回归法与 Windows 矩阵实践)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@xbfighting
xbfighting merged commit 1eac346 into master Jul 7, 2026
5 checks passed
@xbfighting
xbfighting deleted the feat-issue-34-ci-fixtures branch July 7, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

工程加固:Windows CI 矩阵 + .day/.lc5 二进制解析 fixture 回归测试

1 participant