Contributing¶
Thank you for your interest in contributing to Kartoza ZFS Backup Tool!
Getting Started¶
- Fork the repository on GitHub
- Clone your fork:
- Enter the development shell:
- Create a feature branch:
Development Workflow¶
Making Changes¶
- Make your changes
- Test locally:
- Ensure code is formatted:
- Run any tests:
Commit Messages¶
We follow conventional commit format:
Types: - feat: New feature - fix: Bug fix - docs: Documentation only - style: Formatting, no code change - refactor: Code change that neither fixes nor adds - test: Adding tests - chore: Maintenance
Examples:
feat(backup): add support for custom retention policies
fix(ui): correct progress bar calculation
docs(readme): update installation instructions
Pull Requests¶
- Push your branch:
- Open a Pull Request on GitHub
- Fill out the PR template with:
- Description of changes
- Related issues
- Testing performed
- Wait for review
Code Style¶
Go Code¶
- Follow standard Go conventions
- Use
go fmtfor formatting - Keep functions focused and small
- Add comments for exported functions
- Handle errors explicitly
UI Components¶
- Use Kartoza brand colors (defined in
main.go) - Follow the DRY principle for header/footer
- Keep views responsive to terminal size
Documentation¶
- Update docs when adding features
- Use clear, concise language
- Include examples where helpful
Areas for Contribution¶
Good First Issues¶
Look for issues labeled good first issue:
- Documentation improvements
- UI polish
- Error message improvements
- Test coverage
Feature Ideas¶
- Configuration file support
- Custom retention policies
- Multiple backup destinations
- Notification system
- Backup scheduling
Bug Fixes¶
- Check the issue tracker
- Reproduce the issue first
- Write a test if possible
- Fix the issue
- Verify the fix
Testing¶
Manual Testing¶
Since this tool interacts with ZFS, manual testing is important:
-
Set up test pools (use files as vdevs for safety):
-
Test each operation:
- Incremental backup
- Force backup
- Prepare device
-
Unmount
-
Test edge cases:
- Cancel and resume
- Missing pools
- Wrong password
Automated Testing¶
Questions?¶
- Open an issue for bugs or feature requests
- Start a discussion for questions
- Check existing issues first
Code of Conduct¶
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn