From 6afe864a15600d96263bd981fde92622b33fae8b Mon Sep 17 00:00:00 2001 From: GACLove Date: Wed, 16 Jul 2025 18:51:28 +0800 Subject: [PATCH] docs: add contributing guidelines to README files, enhancing community contribution process and code quality checks --- README.md | 28 ++++++++++++++++++++++++++++ README_CN.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/README.md b/README.md index 7591651..54e524d 100644 --- a/README.md +++ b/README.md @@ -172,3 +172,31 @@ Example workflow JSON files are provided in the `examples/` directory: - `wan_i2v.json` - Basic image-to-video - `wan_i2v_with_distill_lora.json` - I2V with distillation LoRA - `wan_t2v_with_distill_lora.json` - T2V with distillation LoRA + +## Contributing Guidelines + +We welcome community contributions! Before submitting code, please ensure you follow these steps: + +### Install Development Dependencies + +```bash +pip install ruff pre-commit +``` + +### Code Quality Check + +Before committing code, run the following command: + +```bash +pre-commit run --all-files +``` + +This will automatically check code formatting, syntax errors, and other code quality issues. + +### Contribution Process + +1. Fork this repository +2. Create a feature branch (`git checkout -b feature/amazing-feature`) +3. Commit your changes (`git commit -m 'Add some amazing feature'`) +4. Push to the branch (`git push origin feature/amazing-feature`) +5. Create a Pull Request diff --git a/README_CN.md b/README_CN.md index 6b7e8f4..cec5be9 100644 --- a/README_CN.md +++ b/README_CN.md @@ -172,3 +172,31 @@ ComfyUI/models/lightx2v/ - `wan_i2v.json` - 基础图像生成视频 - `wan_i2v_with_distill_lora.json` - 带蒸馏 LoRA 的 I2V - `wan_t2v_with_distill_lora.json` - 带蒸馏 LoRA 的 T2V + +## 贡献指南 + +我们欢迎社区贡献!在提交代码之前,请确保遵循以下步骤: + +### 安装开发依赖 + +```bash +pip install ruff pre-commit +``` + +### 代码质量检查 + +在提交代码之前,请运行以下命令: + +```bash +pre-commit run --all-files +``` + +这将自动检查代码格式、语法错误和其他代码质量问题。 + +### 贡献流程 + +1. Fork 本仓库 +2. 创建功能分支 (`git checkout -b feature/amazing-feature`) +3. 提交更改 (`git commit -m 'Add some amazing feature'`) +4. 推送到分支 (`git push origin feature/amazing-feature`) +5. 创建 Pull Request