Contribution Guide
Contribution Guide
Thank you for your interest in contributing to sillo! This guide will help you get started with contributing to the project.
Quick Start
Section titled “Quick Start”-
Fork the repository: https://github.com/sillohq/core
-
Clone your fork:
Terminal window git clone https://github.com/YOUR_USERNAME/sillo.gitcd sillo -
Set up development environment:
Terminal window # Create virtual environment and install dependenciesuv venvuv sync --extra dev -
Create a feature branch:
Terminal window git checkout -b feature/your-feature-name -
Make changes and commit:
Terminal window git add .git commit -m "feat: add your feature" -
Push to your fork:
Terminal window git push origin feature/your-feature-name -
Open a Pull Request to the v3 branch
Development Setup
Section titled “Development Setup”Prerequisites
Section titled “Prerequisites”- Python 3.10 or higher
- Git
- A GitHub account
- uv - Modern Python package installer. See the uv documentation.
Environment Setup
Section titled “Environment Setup”-
Clone the repository:
Terminal window git clone https://github.com/sillohq/core.gitcd sillo -
Set up virtual environment:
Terminal window # Create virtual environmentuv venv -
Install dependencies:
Terminal window # Install development dependenciesuv sync --extra dev -
Install pre-commit hooks:
Terminal window pre-commit install
Running Tests
Section titled “Running Tests”# Run all tests pytest
# Run tests with coverage pytest --cov=sillo --cov-report=term-missing
# Run tests in parallel pytest -n autoFinding Issues to Work On
Section titled “Finding Issues to Work On”- Good First Issues: Look for issues labeled
good first issuefor beginner-friendly tasks - Help Wanted: Issues with the
help wantedlabel need community assistance - Bug Reports: Help fix reported bugs
- Feature Requests: Contribute new features
Submitting Changes
Section titled “Submitting Changes”Pull Request Process
Section titled “Pull Request Process”-
Before Submitting:
- Run tests:
pytest - Check code style:
black --check .andisort --check-only . - Ensure all tests pass locally
- Update documentation if needed
- Run tests:
-
Creating the PR:
- Target the
v3branch - Use a clear, descriptive title
- Reference related issues using
#issue-number - Include a detailed description of changes
- Target the
-
PR Description Template:
## DescriptionBrief description of what this PR does.## Changes- List of changes made## Testing- How you tested the changes- Test cases added/modified## Related IssuesCloses #123
Code Style
Section titled “Code Style”We follow strict code style guidelines:
- Python: Follow PEP 8
- Line length: 88 characters (Black formatter standard)
- Type hints: Required for all public APIs
- Docstrings: Follow Google Python Style Guide
Code Formatting Tools
Section titled “Code Formatting Tools”# Format codeblack .
# Sort importsisort .
# Lint codeflake8 .Commit Message Format
Section titled “Commit Message Format”We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style/formattingrefactor: Code changes that don’t add featurestest: Adding testschore: Maintenance tasks
Example:
feat(auth): add OAuth2 support
- Add OAuth2 authentication flow- Update documentation- Add tests for new functionality
Closes #123Creating Libraries for sillo
Section titled “Creating Libraries for sillo”Want to create a library that extends sillo? We provide a project template to help you get started:
Project Template: https://github.com/sillohq/project-template
This template includes:
- Standard project structure
- CI/CD configuration
- Testing setup
- Documentation template
- Pre-commit hooks
- PyPI publishing configuration
Use the Template
Section titled “Use the Template”- Click “Use this template” on the GitHub repository
- Clone your new repository
- Customize the template:
- Update
pyproject.tomlwith your project details - Modify README.md
- Update package name and imports
- Update
- Install dependencies and start developing
Documentation
Section titled “Documentation”Documentation Structure
Section titled “Documentation Structure”docs/├── guide/ # Tutorials and how-to guides├── intro/ # Introduction and getting started├── community/ # Community resources└── .vitepress/ # Vitepress configurationMaking Documentation Changes
Section titled “Making Documentation Changes”-
Small Fixes:
- Fix typos, broken links, or outdated information
- Use the “Edit this page” link at the bottom of each doc
-
New Content:
- Follow the existing documentation style
- Add new Markdown files in the appropriate directory
- Update navigation in the config file
-
Running Documentation Locally:
Terminal window # Install dependenciesnpm install# Start development servernpm run docs:dev# Build for productionnpm run docs:build
Documentation Guidelines
Section titled “Documentation Guidelines”- Use clear, concise language
- Include code examples with proper syntax highlighting
- Add step-by-step instructions for complex procedures
- Include links to related documentation
- Keep documentation up-to-date with code changes
Testing
Section titled “Testing”Test Structure
Section titled “Test Structure”tests/├── unit/ # Unit tests├── integration/ # Integration tests├── conftest.py # Shared fixtures└── test_config.py # Test configurationWriting Tests
Section titled “Writing Tests”-
Test Naming:
- Test files:
test_<module_name>.py - Test classes:
Test<ClassName> - Test methods:
test_<method_name>_<condition>
- Test files:
-
Test Structure:
import pytestfrom sillo.module import function_to_testdef test_function_with_valid_input():"""Test function with valid input returns expected result."""# Arrangeinput_data = {"key": "value"}expected = {"result": "success"}# Actresult = function_to_test(input_data)# Assertassert result == expected -
Testing Best Practices:
- Write descriptive test names
- Use fixtures for reusable test data
- Test both success and failure cases
- Mock external dependencies
- Aim for high test coverage
Issue Reporting
Section titled “Issue Reporting”Bug Reports
Section titled “Bug Reports”When reporting bugs, please include:
- Clear Title: e.g., “Fix: API returns 500 when X”
- Description:
- Steps to reproduce
- Expected vs actual behavior
- Error messages or logs (use code blocks)
- Environment Details:
Terminal window OS: [e.g., Windows 11, macOS 13, Ubuntu 22.04]Python: [e.g., 3.9.7]sillo Version: [e.g., 1.0.0] - Screenshots/Videos: For UI-related issues
Feature Requests
Section titled “Feature Requests”For feature requests, include:
- Clear description of the feature
- Use case and why it’s valuable
- Proposed implementation (if you have ideas)
- Alternative approaches considered
Community
Section titled “Community”Getting Help
Section titled “Getting Help”- Discord: Join our Discord community for real-time help
- GitHub Discussions: Use GitHub Discussions for longer conversations
- Issues: Report bugs or request features via GitHub Issues
Code of Conduct
Section titled “Code of Conduct”Please note that this project is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Release Management
Section titled “Release Management”Versioning
Section titled “Versioning”We follow Semantic Versioning:
MAJOR: Incompatible API changesMINOR: Backward-compatible functionalityPATCH: Backward-compatible bug fixes
Branch Strategy
Section titled “Branch Strategy”v3: Latest stable release (main development branch)next: Next release candidaterelease-x.y: Maintenance branches for patch releases
Recognition
Section titled “Recognition”Contributors are recognized in several ways:
- Contributors list in the repository
- Release notes mentioning significant contributions
- Community recognition in Discord and discussions
- Maintainer opportunities for consistent contributors
Thank you for contributing to sillo! Your contributions help make the framework better for everyone. Whether you’re fixing bugs, adding features, improving documentation, or helping others in the community, your efforts are greatly appreciated.