Contributing
How to contribute to Humus
Thank you for your interest in contributing to Humus! This guide will help you get started.
Ways to Contribute
- Report Bugs - File issues on GitHub
- Suggest Features - Start a discussion
- Improve Documentation - Fix typos, add examples, clarify explanations
- Write Code - Fix bugs or implement features
- Share Examples - Contribute example applications
Getting Started
- Fork the Repository - https://github.com/z5labs/humus
- Clone Your Fork
git clone https://github.com/YOUR-USERNAME/humus.git cd humus - Set Up Development Environment - See Development Setup
- Create a Branch
git checkout -b feature/my-feature
Development Workflow
Running Tests
# Run all tests with race detection and coverage
go test -race -cover ./...
# Run tests for a specific package
go test -race -cover ./rest
# Run a specific test
go test -race -run TestName ./path/to/package
Linting
# Run golangci-lint
golangci-lint run
# Auto-fix issues where possible
golangci-lint run --fix
Building
# Build all packages
go build ./...
# Verify no build errors
go vet ./...
Code Guidelines
Style
- Follow standard Go conventions
- Use
gofmtfor formatting - Run
golangci-lintbefore committing - Write clear, descriptive commit messages
Testing
- Write tests for new features
- Maintain or improve code coverage
- Use table-driven tests where appropriate
- Mock external dependencies
Documentation
- Document exported types and functions
- Include examples in godoc
- Update relevant documentation pages
- Add package-level documentation
Pull Request Process
Ensure Tests Pass
go test -race -cover ./...Ensure Linting Passes
golangci-lint runUpdate Documentation - If you’re adding features or changing behavior
Write a Clear PR Description
- What does this PR do?
- Why is this change needed?
- How was it tested?
Link Related Issues - Use “Fixes #123” or “Relates to #456”
Be Responsive - Address review comments promptly
Code of Conduct
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Assume good intentions
Questions?
- Development Questions - See Development Setup
- Testing Questions - See Testing Guide
- Documentation - See Documentation Guide
- General Questions - Visit GitHub Discussions