Welcome Contributors!
Thank you for your interest in contributing to HeartMAP! We welcome contributions from the community to help improve this cardiac analysis platform.HeartMAP is an open-source project licensed under Apache 2.0. Contributions of all kinds are welcome: bug reports, feature requests, documentation improvements, and code contributions.
Ways to Contribute
Report Bugs
Found an issue? Help us improve by reporting bugs on GitHub Issues.
Suggest Features
Have an idea? Share feature requests and enhancements in Discussions.
Improve Documentation
Help others by improving guides, examples, and API documentation.
Submit Code
Contribute bug fixes, new features, or performance improvements.
Getting Started
Development Setup
Alternative: Automated Setup
For convenience, use the automated setup script:Development Workflow
1. Create a Feature Branch
2. Make Your Changes
Follow these guidelines:- Write clear, readable code
- Follow existing code style and conventions
- Add docstrings to functions and classes
- Include type hints where appropriate
- Update tests if needed
- Update documentation if needed
3. Test Your Changes
4. Code Quality Checks
5. Commit Your Changes
6. Submit Pull Request
- Go to the HeartMap repository
- Click “New Pull Request”
- Select your branch
- Fill out the PR template:
- Clear description of changes
- Related issues (if any)
- Testing performed
- Documentation updates (if any)
- Submit for review
Code Guidelines
Python Style Guide
HeartMAP follows PEP 8 with some modifications:Code Style Rules
Code Style Rules
- Line length: 100 characters (not 79)
- Indentation: 4 spaces (no tabs)
- Imports: Standard library, third-party, local (separated by blank lines)
- Docstrings: Google style format
- Type hints: Use where appropriate for clarity
- Naming:
- Functions/variables:
snake_case - Classes:
PascalCase - Constants:
UPPER_CASE
- Functions/variables:
Documentation Style
Docstring Format
Docstring Format
Use Google-style docstrings:
Testing Guidelines
Writing Tests
Writing Tests
Tests should be:
- Comprehensive: Cover normal cases and edge cases
- Independent: Tests should not depend on each other
- Fast: Use mock data or small datasets
- Clear: Test one thing at a time with clear names
Project Structure
Understanding the codebase:Adding New Features
New Analysis Models
Create new models by inheriting fromBaseModel:
src/heartmap/models/.
New Pipelines
Create new pipelines by inheriting fromBasePipeline:
src/heartmap/pipelines/.
Configuration Options
Extend configuration by modifying dataclasses insrc/heartmap/config/:
API Endpoints
Add new REST API endpoints insrc/heartmap/api/rest.py:
Testing Requirements
Before Submitting PR
Ensure all checks pass:- Tests
- Code Quality
- Validation
Test Coverage
Aim for good test coverage:Documentation
Updating Documentation
If your changes affect user-facing features:- Update docstrings: Ensure all functions have clear documentation
- Update guides: Modify relevant documentation pages
- Add examples: Include usage examples where appropriate
- Update CHANGELOG: Add entry for your changes
Writing Examples
Provide clear examples for new features:Pull Request Guidelines
PR Checklist
Before Submitting
Before Submitting
- Code follows style guidelines
- All tests pass
- New tests added (if applicable)
- Documentation updated (if applicable)
- CHANGELOG updated (if applicable)
- Code formatted with Black
- No linting errors
- Type hints added where appropriate
- Examples provided (if adding features)
- Commits are clear and descriptive
PR Description Template
Code Review Process
- Submission: You submit a pull request
- Automated checks: CI/CD runs tests and quality checks
- Review: Maintainers review your code
- Feedback: Reviewers may request changes
- Iteration: Address feedback and update PR
- Approval: Once approved, PR is merged
- Release: Changes included in next release
Getting Help
Need help contributing?- Questions: Ask in GitHub Discussions
- Issues: Check existing issues
- Email: Contact [email protected]
Recognition
Contributors are recognized:- Listed in the project contributors
- Mentioned in release notes
- Acknowledged in the README
Code of Conduct
Our Standards
We expect all contributors to:- Be respectful and inclusive
- Accept constructive feedback gracefully
- Focus on what’s best for the community
- Show empathy towards others
Unacceptable Behavior
- Harassment or discriminatory language
- Personal attacks
- Trolling or inflammatory comments
- Publishing others’ private information
Enforcement
Violations may result in:- Warning
- Temporary ban
- Permanent ban
License
By contributing, you agree that your contributions will be licensed under Apache 2.0, the same license as HeartMAP.Ready to Contribute?
Fork the repository, make your changes, and submit a pull request. We look forward to your contributions!View on GitHub