Files
HeurAMS/CONTRIBUTING.md
2025-12-15 19:01:33 +08:00

69 lines
1.8 KiB
Markdown
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.

# 贡献指南
欢迎为潜进 (HeurAMS) 项目做出贡献!本项目是一个开源项目,我们鼓励社区成员参与改进。
## 开发流程
1. **讨论功能**:在开始编写代码之前,建议先通过 Issue 讨论新功能或修复。
2. **分支策略**
- `main` 分支:稳定版本
- `develop` 分支:开发版本
- 功能分支:从 `develop` 分支创建,命名格式为 `feature/描述``fix/描述`
3. **代码风格**
- 使用 Black 格式化代码(如果配置)
- 遵循 PEP 8 规范
- 使用类型注解
- 添加适当的文档字符串(中英文均可)
4. **提交消息**
- 使用中文或英文撰写清晰的提交消息
- 格式:`类型: 描述`,例如 `fix: 修复登录错误``feat: 添加新算法`
5. **测试**
- 为新功能添加单元测试
- 确保所有测试通过
- 运行 `pytest` 检查
## 项目结构
请参阅 README.md 中的项目结构部分,了解代码组织方式。
## 设置开发环境
```bash
# 克隆仓库
git clone https://github.com/yourusername/HeurAMS.git
cd HeurAMS
# 安装依赖
pip install -r requirements.txt
# 安装开发版本
pip install -e .
```
## 提交更改
1. 确保代码通过测试:
```bash
python -m pytest tests/
```
2. 提交更改:
```bash
git add .
git commit -m "类型: 描述"
git push origin 分支名
```
3. 创建 Pull Request
- 在 GitHub 上创建 Pull Request将你的分支合并到 `develop`
- 描述更改内容和动机
- 链接相关 Issue如果有
## 行为准则
请保持友好、尊重的交流氛围。我们遵循 [贡献者公约](https://www.contributor-covenant.org/)。
## 许可证
贡献者同意其贡献将在 AGPL-3.0 许可证下发布。