Thank you for your interest in contributing to Odyc CLI! We welcome contributions from everyone and are grateful for every pull request, bug report, and feature suggestion.
Before you begin, ensure you have the following installed:
- Go 1.24+: Download and install Go
- Git: Install Git
- golangci-lint: Install golangci-lint
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/odyc-cli.git cd odyc-cli - Add the upstream remote:
git remote add upstream https://github.com/meldiron/odyc-cli.git
- Install dependencies:
go mod download
- Build and test the project:
go build -o odyc-cli . ./odyc-cli --help
When reporting bugs, please include:
- Clear title describing the issue
- Steps to reproduce the bug
- Expected behavior vs actual behavior
- Environment details:
- Go version (
go version) - Operating system
- Odyc CLI version
- Go version (
- Sample files if the bug is related to sprite processing
- Error messages and stack traces (if any)
**Bug Description**
A clear and concise description of what the bug is.
**Steps to Reproduce**
1. Run command '...'
2. With files '...'
3. See error
**Expected Behavior**
What you expected to happen.
**Actual Behavior**
What actually happened.
**Environment**
- Go version:
- OS:
- Odyc CLI version:
**Additional Context**
Add any other context about the problem here.We love feature suggestions! When proposing new features:
- Check existing issues to avoid duplicates
- Describe the problem your feature would solve
- Explain your proposed solution in detail
- Consider alternatives and mention them
- Think about backward compatibility
**Feature Summary**
A brief description of the feature you'd like to see.
**Problem Statement**
What problem does this feature solve?
**Proposed Solution**
Detailed description of how you envision this feature working.
**Alternatives Considered**
What other approaches did you consider?
**Additional Context**
Any other relevant information.-
Create a feature branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes following our coding standards
-
Test your changes:
# Run tests go test ./... # Build and test manually go build -o odyc-cli . ./odyc-cli sprites --assets ./test-assets --output ./test.js
-
Format and lint:
# Format code go fmt ./... # or ./format.sh # Run linter golangci-lint run # or ./lint.sh
-
Commit your changes:
git add . git commit -m "feat: add new sprite processing feature"
We follow the Conventional Commits specification:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or modifying testschore:- Maintenance tasks
Examples:
feat: add support for JPEG sprite processing
fix: handle empty sprite directories gracefully
docs: update installation instructions
refactor: simplify color indexing algorithm
-
Update your branch with upstream changes:
git fetch upstream git rebase upstream/main
-
Push your changes:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub with:
- Clear title and description
- Reference to related issues (if any)
- Screenshots/examples (if applicable)
- Confirmation that tests pass
-
Address review feedback promptly
-
Squash commits if requested before merging
When creating a PR, please include:
## Description
Brief description of changes made.
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
- [ ] Other (please describe)
## Testing
- [ ] I have tested these changes locally
- [ ] I have added/updated tests as needed
- [ ] All existing tests pass
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated (if needed)
- [ ] No breaking changes (or clearly documented)
## Related Issues
Fixes #(issue number)- Follow standard Go conventions and idioms
- Use
go fmtfor consistent formatting - Write clear, descriptive variable and function names
- Add comments for complex logic
- Keep functions small and focused
- Always handle errors appropriately
- Use descriptive error messages
- Wrap errors with context when needed:
if err != nil { return fmt.Errorf("failed to process sprite %s: %w", filename, err) }
- Use the project's logging system (
charmbracelet/log) - Choose appropriate log levels:
log.Error()- Critical errorslog.Warn()- Warnings that don't stop executionlog.Info()- General informationlog.Debug()- Detailed debugging information
- Write tests for new functionality
- Maintain or improve code coverage
- Use table-driven tests when appropriate
- Test both happy path and error cases
Test Example:
func TestSpriteProcessing(t *testing.T) {
tests := []struct {
name string
inputFile string
expected SpriteMetadata
expectError bool
}{
{
name: "valid sprite",
inputFile: "test-sprite.png",
expected: SpriteMetadata{/* ... */},
expectError: false,
},
// Add more test cases...
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Test implementation
})
}
}- Update documentation for new features
- Include examples in docstrings
- Update README.md if needed
- Write clear commit messages
All submissions require code review. Here's what reviewers look for:
- Code correctness and efficiency
- Proper error handling
- Test coverage
- Documentation completeness
- Consistent formatting
- Clear naming conventions
- Appropriate comments
- Go idioms and best practices
- API design consistency
- Backward compatibility
- Performance implications
- Security considerations
Releases follow semantic versioning (SemVer):
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
If you need help:
- Check existing Issues
- Read the README
- Create a new issue with the "question" label
- Join community discussions
Contributors are recognized through:
- GitHub contributor graphs
- Release notes acknowledgments
- Community shout-outs
Thank you for contributing to Odyc CLI! 🎉
This contributing guide is inspired by open source best practices and may be updated as the project evolves.