Contributing to LuminaPy¶
Thank you for your interest in contributing to LuminaPy! This document provides guidelines and instructions for contributing.
Code of Conduct¶
By participating in this project, you agree to abide by our Code of Conduct.
How to Contribute¶
Reporting Issues¶
- Check if the issue already exists
- Use the issue template
- Include:
- Python version
- Steps to reproduce
- Expected vs actual behavior
- Code samples
Submitting Changes¶
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and linting
- Commit with conventional commits
- Push and create a PR
Development Setup¶
Prerequisites¶
- Python 3.10+
- uv (recommended) or pip
- Git
Quick Start¶
# Clone your fork
git clone https://github.com/YOUR_USERNAME/LuminaPy.git
cd LuminaPy
# Install uv
pip install uv
# Install dependencies
uv sync --all-extras
# Install pre-commit hooks
uv run pre-commit install
Running Tests¶
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=build --cov-report=html
# Run specific test file
uv run pytest verify/tests/test_foundations/test_basics.py
Code Style¶
We use Ruff for linting and formatting:
# Check for issues
uv run ruff check .
# Auto-fix issues
uv run ruff check --fix .
# Format code
uv run ruff format .
Type Checking¶
Contribution Types¶
Adding New Algorithms/Data Structures¶
- Place in appropriate directory under
build/ - Include:
- Type hints on all functions
- Time/space complexity in docstrings
- Example usage in
if __name__ == "__main__" - README.md with explanation
Adding Exercises¶
- Place in appropriate module's
exercises.py - Include solution with explanation
- Add corresponding test
Improving Documentation¶
- Update relevant
.mdfiles - Ensure Mermaid diagrams render correctly
- Check all links work
Commit Convention¶
We use Conventional Commits:
feat: add binary search tree implementation
fix: correct edge case in quicksort
docs: update installation instructions
test: add tests for linked list
refactor: simplify merge sort code
Pull Request Process¶
- Ensure all CI checks pass
- Update documentation if needed
- Add tests for new functionality
- Request review from maintainers
- Address review feedback
Questions?¶
- Open a Discussion
- Email: octalume@harery.com
Thank you for helping make LuminaPy better!