Contributing Guide¶
Thank you for your interest in contributing to SlideGen! This guide will help you get started.
How to Contribute¶
We welcome contributions of all kinds:
- ๐ Bug Reports - Report issues you encounter
- ๐ก Feature Requests - Suggest new features
- ๐ Documentation - Improve documentation
- ๐ง Code - Fix bugs or add features
- ๐จ Examples - Add example presentations
- ๐งช Tests - Add or improve tests
Getting Started¶
1. Fork and Clone¶
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/your-username/slidegen.git
cd slidegen
2. Set Up Development Environment¶
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
3. Verify Setup¶
Development Workflow¶
1. Create a Branch¶
2. Make Changes¶
- Write code following our code style guide
- Add tests for new features
- Update documentation as needed
3. Test Your Changes¶
# Run all tests
pytest
# Run specific test file
pytest tests/core/test_generator.py
# Run with coverage
pytest --cov=slidegen --cov-report=html
4. Check Code Quality¶
# Type checking
mypy slidegen/
# Linting
ruff check slidegen/
# Format code (if needed)
ruff format slidegen/
5. Commit Changes¶
Follow our commit message format:
Commit Types:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- test: Test additions/changes
- refactor: Code refactoring
- style: Code style changes (formatting)
- chore: Maintenance tasks
6. Push and Create Pull Request¶
Then create a pull request on GitHub.
Code Style¶
See Code Style Guide for detailed guidelines.
Quick Summary: - Follow PEP 8 - Use type hints - Write docstrings (Google style) - Keep functions focused and small - Add tests for new code
Testing Guidelines¶
Test Structure¶
Test Coverage¶
- Aim for 80%+ coverage
- Test happy paths and edge cases
- Test error conditions
Running Tests¶
# All tests
pytest
# Specific test
pytest tests/core/test_generator.py::test_from_schema
# With coverage
pytest --cov=slidegen --cov-report=term-missing
Documentation¶
Code Documentation¶
- Use Google-style docstrings
- Document all public functions/classes
- Include parameter and return type descriptions
- Add usage examples for complex functions
User Documentation¶
- Update relevant docs in
docs/directory - Add examples for new features
- Update API reference if needed
Pull Request Process¶
Before Submitting¶
- [ ] Code follows style guidelines
- [ ] Tests pass:
pytest - [ ] Type checking passes:
mypy slidegen/ - [ ] Linting passes:
ruff check slidegen/ - [ ] Documentation updated
- [ ] Commit messages follow format
PR Description¶
Include: - Description of changes - Related issue number (if any) - Testing performed - Screenshots (if UI changes)
Review Process¶
- Maintainers review your PR
- Address any feedback
- Once approved, maintainers will merge
Reporting Issues¶
Bug Reports¶
Include: - Description of the bug - Steps to reproduce - Expected behavior - Actual behavior - Environment (OS, Python version, SlideGen version) - Error messages/logs
Feature Requests¶
Include: - Description of the feature - Use case/justification - Proposed implementation (if any)
Code of Conduct¶
Please be respectful and constructive in all interactions. We follow the Contributor Covenant Code of Conduct.
Questions?¶
- ๐ฌ GitHub Discussions
- ๐ง Email: maintainers@slidegen.io
Recognition¶
Contributors will be recognized in: - README.md contributors section - Release notes - Project documentation
Thank you for contributing to SlideGen! ๐