中文 + English. Pull requests welcome — 欢迎提交贡献。
数值类问题(拟合不收敛、外推结果异常、LaTeX 输出 NaN 等)请附带:
- 输入文件(原始
.txt/.csv,或粘贴示意数据) - 复现步骤(模式 / 公式 / 精度 dps)
- 观察到的输出 vs. 期望输出
- 平台 + DataLab 版本(release tag 或 git SHA)
非数值问题(GUI 卡顿、LaTeX 引擎找不到、打包失败等)请附 ~/.datalab/logs/ 下相关日志。
git clone https://github.com/yilibinbin/DataLab.git
cd DataLab
# 桌面端
pip install -r gui_requirements.txt
pip install -r requirements-test.txt
QT_QPA_PLATFORM=offscreen pytest -q # 770+ tests 全绿
# 或 web 端
pip install -r web_requirements.txt
python app_web/server.py详细架构见 docs/ARCHITECTURE.md。
- Fork + 新分支:
feat/xxx/fix/xxx/chore/xxx/docs/xxx - TDD:先写失败测试,再实现,验收
pytest全绿 - 遵守跨切关注点(详见
docs/ARCHITECTURE.md):- 用户可见字符串走
_dual_msg(zh, en)双语 - mpmath 调用包在
precision_guard(dps)上下文里 - 表达式解析必须经过
datalab_latex/expression_engine.py白名单
- 用户可见字符串走
- 提交信息:
<type>: <description>(feat/fix/refactor/docs/test/chore/perf) - PR 描述包含 Summary + Test plan(参考已合并的 PR)
- Python 3.11+,PEP 8,类型注解必加(strict mypy 在
shared/fitting/extrapolation_methods/datalab_latex/已启用) - 黑色 (
black) 格式化,rufflint - 文件大小目标 200–400 行,800 行为硬上限
For numerical bugs (fits not converging, extrapolation diverging, NaN in LaTeX output, etc.) include:
- Input file (raw
.txt/.csv, or pasted sample data) - Reproduction steps (mode / formula / precision
dps) - Observed output vs. expected output
- Platform + DataLab version (release tag or git SHA)
For non-numerical issues (GUI hangs, LaTeX engine not found, build failures)
attach the relevant log from ~/.datalab/logs/.
git clone https://github.com/yilibinbin/DataLab.git
cd DataLab
# Desktop frontend
pip install -r gui_requirements.txt
pip install -r requirements-test.txt
QT_QPA_PLATFORM=offscreen pytest -q # 770+ tests, all green
# Or web frontend
pip install -r web_requirements.txt
python app_web/server.pySee docs/ARCHITECTURE.md for the architecture map.
- Fork + branch:
feat/xxx/fix/xxx/chore/xxx/docs/xxx - TDD: write the failing test first, implement to make it pass,
confirm
pytestis green - Honor cross-cutting conventions (full list in
docs/ARCHITECTURE.md):- User-facing strings go through
_dual_msg(zh, en)(bilingual) - mpmath calls wrap in
precision_guard(dps)context - Expression parsing must go through the
datalab_latex/expression_engine.pywhitelist (do NOT add a parallel parser)
- User-facing strings go through
- Commit message format:
<type>: <description>(feat/fix/refactor/docs/test/chore/perf) - PR description: include Summary + Test plan (model after merged PRs)
- Python 3.11+, PEP 8, type annotations required (strict mypy is
enabled on
shared/,fitting/,extrapolation_methods/,datalab_latex/) - Format with
black, lint withruff - Target file size 200–400 lines; 800 is the hard cap
By contributing, you agree your contributions will be licensed under the MIT License (the project's license).