🎉 Thank you for your interest in contributing to deep-solutions! Your contributions help make this project better for everyone. We welcome all kinds of contributions — bug fixes, feature enhancements, documentation improvements, and more.
Please take a moment to familiarize yourself with the project:
-
Read the Agent Development Guide — Comprehensive technical documentation covering project structure, code standards, testing, and release procedures. This is essential reading for all contributors.
-
Check Code Standards — Understanding commit conventions and PR requirements.
-
Review Project Structure — Learn about dependencies and how the project is organized.
Follow these steps to contribute a new feature or fix:
First, ensure you have Python 3.8 and conda installed.
# Clone the repository
git clone https://github.com/FrostyHec/deep-solutions.git
cd deep-solutions
# Create development environment
conda env create -f environment.yml
# Activate environment
conda activate deep-solutions
# Install package with dev dependencies
pip install -e ".[dev]"
# Verify setup
python -c "import deep_solutions; print(deep_solutions.__version__)"Important: Read the Agent Development Guide before proceeding. It contains essential information about project structure, code specifications, and best practices.
Before starting work on a feature, consider creating an issue to:
- Discuss your proposed changes
- Get feedback from maintainers
- Ensure it aligns with project goals
Issue Template:
- Title: Brief description of the feature/fix
- Description: What problem does this solve? Why is it needed?
- Acceptance Criteria: How will we know it's complete?
Create a branch from the main branch with a descriptive name.
Branch Naming Convention:
- Features:
feature/description-of-feature - Bug fixes:
fix/description-of-bug - Documentation:
docs/description-of-docs - Examples:
feature/add-tensor-utilsfix/resolve-import-errordocs/improve-contributing-guide
# Ensure you're on main and up-to-date
git checkout main
git pull origin main
# Create and switch to your feature branch
git checkout -b feature/your-feature-name
⚠️ Important: Always create your branch frommain, never from other feature branches.
Before submitting a pull request, ensure all tests pass locally.
Run all checks:
bash scripts/check.shThis will:
- ✅ Check code formatting (ruff format)
- ✅ Run linting (ruff check)
- ✅ Type check (mypy)
- ✅ Verify no Chinese characters in code/docs
- ✅ Run unit tests (pytest)
Other useful test commands:
# Run only unit tests
pytest
# Run tests with coverage
pytest --cov=deep_solutions --cov-report=html
# Test on multiple Python versions (3.8-3.12)
tox
# Simulate full CI locally
bash scripts/ci-local.sh❌ Do not push if any checks fail. Fix issues locally first.
Before submitting your PR, verify the following:
- Commit conventions: All commits follow Conventional Commits format
- All checks pass:
bash scripts/check.shcompletes with no errors - Tests pass:
pytestruns without failures; new features have unit tests - Documentation updated: If you changed behavior, file structure, or APIs, update the relevant docs (both EN and ZH versions)
- No stale references: If you moved/renamed files, update all cross-references in docs and READMEs
Follow the project's commit convention for clear, descriptive commits.
Commit Message Format (Conventional Commits):
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: A new featurefix: A bug fixdocs: Documentation changesrefactor: Code refactoring without feature changestest: Adding or updating testschore: Dependency updates, configuration changes
Examples:
git commit -m "feat(core): add new utility function for tensor processing"
git commit -m "fix(utils): resolve edge case in format_output"
git commit -m "docs(contributing): improve contributor guide"For detailed conventions, see Commit Conventions.
Push your branch and create a PR on GitHub.
Push your branch:
git push origin feature/your-feature-nameCreate PR on GitHub:
- Visit the repository: https://github.com/FrostyHec/deep-solutions
- Click "Pull requests" tab
- Click "New pull request" button
- Set:
- Base branch:
main - Compare branch:
feature/your-feature-name
- Base branch:
- Click "Create pull request"
PR Description Template:
## Description
Brief description of what this PR does.
## Related Issue
Closes #123 (if applicable)
## Changes
- Change 1
- Change 2
- Change 3
## Testing
How did you test this change? (e.g., "Ran pytest locally and all tests pass")
## Checklist
- [ ] I have read the contributing guide
- [ ] All tests pass locally (`bash scripts/check.sh`)
- [ ] Code follows project conventions
- [ ] Commit messages follow Conventional Commits
- [ ] Documentation is updated (if applicable)Pro Tips:
- ✅ Link related issues in the PR description (e.g.,
Closes #123) - ✅ Keep PRs focused — one feature per PR when possible
- ✅ Write clear, descriptive PR titles
After submitting your PR:
-
CI Checks Run Automatically: GitHub Actions will run all tests and checks. Check the status in the PR.
-
Code Review: Maintainers will review your code and may request changes. Address feedback by:
# Make changes to your files git add . git commit -m "refactor: address review feedback" git push origin feature/your-feature-name
-
Approval & Merge: Once approved and CI passes:
- The maintainer will merge using Squash and Merge
- This combines all your commits into a single, clean commit
- The commit message will follow Conventional Commits format
Merge Details:
- Strategy: Squash and Merge (keeps
mainhistory clean) - Commit Message: Based on your PR title and description
- Format:
feat(scope): description(Conventional Commits)
After your PR is merged, delete your local and remote branches:
# Delete local branch
git branch -d feature/your-feature-name
# Delete remote branch
git push origin --delete feature/your-feature-name
⚠️ Important: Once deleted, never push to this branch again. Create a new branch if you need to make additional changes.
Verify cleanup:
# List local branches (feature/your-feature-name should not appear)
git branch -a
# Update local branch list from remote
git fetch --pruneWhen contributing, please follow these standards:
- Formatter: Ruff (
ruff format src/ tests/) - Linter: Ruff (
ruff check src/ tests/) - Type Hints: All functions must have type hints (
mypy src/) - Python Version: Minimum 3.8, test with 3.8-3.12
- Functions/variables:
snake_case - Classes:
PascalCase - Constants:
UPPER_SNAKE_CASE
- All new features must have unit tests
- Aim for >80% code coverage
- Tests go in
tests/directory
- Docstrings: Google-style or NumPy-style
- Include examples where helpful
- Update README if behavior changes
- ✅ Meaningful commit messages
- ✅ Small, focused commits
- ✅ No merge commits in feature branches
- ✅ Delete branches after merge
For more details, see Code Standards and Commit Conventions.
A: Yes! We welcome external contributors. Follow the same workflow — fork the repo, create a branch, and submit a PR.
A: No, it's optional. Small fixes can go directly to PR. For larger features, an issue discussion is helpful.
A: Check the CI logs (click "Details" on the failed check). Fix the issues locally, commit, and push to your branch. The PR will update automatically.
A: Depends on the PR complexity. We aim to review within 2-3 days. Thank you for your patience!
A: Yes! Push updates to the same branch and the PR will update automatically.
A: They are squashed into a single commit with your PR title/description as the commit message, following Conventional Commits format.
A: Create a new correct branch from main, cherry-pick your commits, and submit a new PR. We can help if needed!
- Questions? Open an issue
- Need guidance? Check the Agent Development Guide or Developer Guide
- Found a bug? Report it on GitHub Issues
We deeply appreciate your contributions! Whether it's code, documentation, bug reports, or feature suggestions — every bit helps. The open-source community thrives because of contributors like you.
Let's build something amazing together! 🚀
Last updated: February 2026