Contributing to SWE‑Flow
June 10, 2025 · View on GitHub
First off, thanks for taking the time to contribute! This project benefits greatly from community involvement, whether that’s reporting issues, improving documentation, or adding new functionality.
📜 Code of Conduct
Please read and follow our Code of Conduct (coming soon) to keep the community open and welcoming.
🏁 Getting Started
-
Fork the repository and clone your fork locally.
-
Install the development environment:
conda create -n sweflow python=3.12 conda activate sweflow python -m pip install -e .[dev] -
Run the full test suite to ensure everything passes on your machine:
python -m pytest
🔖 Types of Contributions
| Type | What to do |
|---|---|
| 🐞 Bug Report | Open an issue with a minimal reproducible example. |
| ✨ Feature Idea | Start a discussion or issue describing the motivation and possible design. |
| 🛠️ Code Fix / Enhancement | Create a pull request (PR) from a feature branch. |
| 📚 Documentation | Improve README, API docs, or tutorial notebooks. |
| 📊 Benchmark / Dataset | Share new evaluation scripts or dataset extensions. |
🧰 Development Workflow
-
Branch naming Use
feat/<brief-description>for new features orfix/<issue-#>for bug fixes. -
Commit style — follow Conventional Commits:
feat(rdg): add call‑graph pruning for unused functions fix(cli): handle missing --output argument docs: clarify installation steps in README -
Keep commits small & focused; separate formatting-only commits (
style:) if necessary. -
Run linters & tests before pushing:
pre-commit run --all-files pytest -
Open a PR against the
mainbranch. Include context, screenshots (if UI), and reference related issues (e.g.Fixes #42). -
Review process A maintainer will review within a few business days. Please be responsive to feedback.
🖌️ Code Style Guide
| Tool | Purpose | Command |
|---|---|---|
| yapf | Auto-formatting (line length 100) | yapf . |
| isort | Import ordering (profile=black) | isort . |
These tools run automatically via pre-commit hooks.
🧪 Testing Guidelines
- Place unit tests under
tests/and mirror the package structure. - Use pytest fixtures for common setups.
- When fixing a bug, add a test that fails before the fix and passes after.
- CI (GitHub Actions) will run the full suite on every PR.
📜 Documentation Updates
Docstrings follow the Google style. Significant user‑facing changes should also update:
README.mddocs/markdown pages- Example notebooks in
examples/
📜 License
By submitting a contribution you agree to license your work under the MIT License. You also certify that you have the right to license it under those terms.
🙋 Need help?
Open an issue with the question label or reach out to the maintainer:
- James Zhang – https://github.com/Hambaobao
Thanks for helping make SWE‑Flow better! 🚀