Contributing to MetaGEAR Pipeline Wrapper
Thank you for your interest in contributing to the MetaGEAR Pipeline Wrapper! This document provides guidelines for contributors.
π Getting Started
Prerequisites
- Bash 4.0+ (for the wrapper scripts)
- Bats (for running tests)
- Git
Development Setup
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/metagear.git cd metagear - Install Bats for testing:
# On Ubuntu/Debian sudo apt-get install bats # On macOS brew install bats-core
π§ͺ Testing
Always run tests before submitting changes:
# Run all tests
bats tests
# Run specific test file
bats tests/install.bats
# Run with verbose output
bats -t tests
π Making Changes
1. Create a Feature Branch
git checkout -b feature/your-feature-name
2. Code Style Guidelines
Bash Scripts
- Use
set -euo pipefailfor strict error handling - Quote variables:
"$variable" - Use
localfor function variables - Follow existing naming conventions
- Add comments for complex logic
Function Documentation
# Description: Brief function description
# Parameters:
# $1 - Parameter description
# Returns: Description of return value
function_name() {
local param1="$1"
# Implementation
}
3. Writing Tests
Add tests for new functionality in the tests/ directory:
@test "function should do something" {
source lib/common.sh
run function_name "input"
[ "$status" -eq 0 ]
[[ "$output" == *"expected"* ]]
}
4. Documentation Updates
- Update relevant documentation files
- Add examples for new features
- Update help text if adding new options
π Submission Process
1. Commit Guidelines
Use clear, descriptive commit messages:
# Good examples
git commit -m "Add support for custom config directory"
git commit -m "Fix workflow argument parsing for spaces"
git commit -m "Update installation documentation"
# Follow conventional commits format when applicable
git commit -m "feat: add debug logging option"
git commit -m "fix: handle missing input file gracefully"
git commit -m "docs: update contributing guidelines"
2. Pull Request Process
- Push your changes:
git push origin feature/your-feature-name - Create a Pull Request on GitHub with:
- Clear title describing the change
- Detailed description of what was changed and why
- Reference any related issues
- Screenshots/examples if applicable
- PR Template (use this structure):
## Description Brief description of changes ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Documentation update - [ ] Performance improvement - [ ] Code refactoring ## Testing - [ ] Tests pass locally - [ ] New tests added for new functionality - [ ] Manual testing completed ## Checklist - [ ] Code follows project style guidelines - [ ] Self-review completed - [ ] Documentation updated - [ ] Tests added/updated
3. Review Process
- Maintainers will review your PR
- Address any feedback or requested changes
- Once approved, your PR will be merged
π Reporting Issues
Bug Reports
Use the issue template and include:
- Environment: OS, Bash version, installation method
- Steps to reproduce: Exact commands and inputs
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Error messages: Full error output
- Additional context: Any other relevant information
Feature Requests
- Describe the feature and its use case
- Explain why it would be valuable
- Provide examples of how it would work
- Consider implementation complexity
π Issue Labels
bug: Something isnβt workingenhancement: New feature or requestdocumentation: Improvements or additions to docsgood first issue: Good for newcomershelp wanted: Extra attention is neededpriority:high: High priority issuespriority:low: Low priority issues
π― Areas for Contribution
High Priority
- Bug fixes
- Performance improvements
- Test coverage improvements
- Documentation updates
Medium Priority
- New workflow support
- Configuration enhancements
- Error handling improvements
- Code refactoring
Good First Issues
- Documentation improvements
- Small bug fixes
- Test additions
- Help text updates
π¬ Communication
- Issues: Use GitHub issues for bug reports and feature requests
- Discussions: Use GitHub discussions for questions and ideas
- Email: Contact maintainers for sensitive issues
π Code of Conduct
Our Standards
- Be respectful and inclusive
- Focus on constructive feedback
- Help create a welcoming environment
- Be patient with newcomers
Unacceptable Behavior
- Harassment of any kind
- Discriminatory language or behavior
- Public or private attacks
- Publishing private information
π Resources
Documentation
External Resources
π Recognition
Contributors will be:
- Listed in the repository contributors
- Mentioned in release notes for significant contributions
- Acknowledged in project documentation
Thank you for contributing to MetaGEAR!