Skip to content

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

# Run tests
pytest

# Type check
mypy slidegen/

# Lint
ruff check slidegen/

Development Workflow

1. Create a Branch

git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix

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:

feat(module): brief description

- detailed change 1
- detailed change 2

Fixes #123

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

git push origin feature/your-feature-name

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

def test_feature_name():
    """Test description."""
    # Arrange
    # Act
    # Assert

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

  1. Maintainers review your PR
  2. Address any feedback
  3. 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?

Recognition

Contributors will be recognized in: - README.md contributors section - Release notes - Project documentation

Thank you for contributing to SlideGen! ๐ŸŽ‰