Contributing to MAIF
Thank you for your interest in contributing to the MAIF Framework! This document provides guidelines for contributing.
Development Documentation
For detailed development documentation including package structure, testing strategies, and CI/CD pipeline, visit DeepWiki - Development Guide.
Ways to Contribute
Reporting Issues
- Bug Reports: Use GitHub Issues with clear reproduction steps
- Feature Requests: Describe the use case and expected behavior
- Documentation: Report unclear or missing documentation
Code Contributions
Setting Up Development Environment
bash
# Clone the repository
git clone https://github.com/vineethsai/maif.git
cd maif
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/Development Workflow
Fork the repository
Create a feature branch:
bashgit checkout -b feature/your-feature-nameMake your changes:
- Follow existing code style
- Add tests for new features
- Update documentation as needed
Run tests and linting:
bashpytest tests/ python -m pylint maif/Commit with clear messages:
bashgit commit -m "feat: add new feature description"Push and create Pull Request:
bashgit push origin feature/your-feature-name
Commit Message Format
Follow conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions or modificationsrefactor:Code refactoringperf:Performance improvementschore:Maintenance tasks
Examples:
feat: add semantic compression algorithm
fix: correct hash chain verification
docs: update installation guideCode Style
Python Code
- Follow PEP 8 style guide
- Use type hints where applicable
- Maximum line length: 100 characters
- Use meaningful variable names
Example:
python
def create_artifact(
artifact_id: str,
enable_privacy: bool = False
) -> MAIFArtifact:
"""
Create a new MAIF artifact.
Args:
artifact_id: Unique identifier for the artifact
enable_privacy: Enable privacy features
Returns:
Newly created MAIF artifact
"""
passDocumentation
- Use Markdown for documentation
- Include code examples
- Add diagrams where helpful
- Keep language clear and concise
Testing
Writing Tests
- Place tests in
tests/directory - Use pytest framework
- Name test files
test_*.py - Include unit and integration tests
Example:
python
def test_artifact_creation():
"""Test basic artifact creation"""
artifact = create_artifact("test_id")
assert artifact.artifact_id == "test_id"Running Tests
bash
# Run all tests
pytest tests/
# Run specific test file
pytest tests/test_core.py
# Run with coverage
pytest --cov=maif tests/Documentation Contributions
Building Documentation
bash
cd docs
npm install
npm run build
npm run dev # Local previewDocumentation Structure
- User guides:
docs/guide/ - API reference:
docs/api/ - Examples:
docs/examples/ - Tutorials: Add to appropriate section
Adding Examples
Great examples help users understand MAIF. To add an example:
- Create example file in
examples/<category>/ - Add README explaining the example
- Update documentation in
docs/examples/ - Add to navigation in
docs/.vitepress/config.js
Example structure:
examples/
your-example/
README.md # Usage instructions
demo.py # Main example code
requirements.txt # DependenciesReview Process
Pull Request Checklist
- [ ] Code follows style guidelines
- [ ] Tests added/updated and passing
- [ ] Documentation updated
- [ ] Commit messages follow format
- [ ] No breaking changes (or documented)
- [ ] CI/CD checks passing
Review Timeline
- Initial review: Within 3-5 business days
- Follow-up reviews: 1-2 business days
- Merge: After approval and CI passing
Community Guidelines
Code of Conduct
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Assume good intentions
Getting Help
- GitHub Issues: Bug reports and feature requests
- Discussions: Questions and ideas
- Documentation: Check guides first
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Recognition
Contributors are recognized in:
- Release notes
- GitHub contributors page
- Documentation credits
Thank you for contributing to MAIF.