We welcome contributions to Pixe-Core! This document provides guidelines for contributing to the project.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Pixelog.git cd Pixelog - Add the upstream remote:
git remote add upstream https://github.com/ArqonAi/Pixelog.git
- Go 1.21 or higher
- Git
# Install dependencies
go mod tidy
# Build the CLI tool
go build ./cmd/pixe
# Run tests
go test ./...
# Run example
go run examples/basic_usage.go- Check existing issues - Look for related issues or discussions
- Create an issue - For new features or significant changes
- Get feedback - Discuss your approach before implementation
Use descriptive branch names:
feature/add-compression-algorithmfix/encryption-key-validationdocs/update-cli-examplesrefactor/crypto-package-structure
Follow conventional commit format:
type(scope): description
- feat(crypto): add ChaCha20-Poly1305 encryption support
- fix(cli): handle invalid file paths gracefully
- docs(readme): update installation instructions
- test(converter): add edge case tests for large files
- Add tests for all new functionality
- Ensure tests cover edge cases and error conditions
- Use table-driven tests for multiple scenarios
- Mock external dependencies
# Unit tests
go test ./pkg/...
# Integration tests
go test ./cmd/...
# Example tests
go test ./examples/...Maintain high test coverage:
go test -cover ./...-
Update your fork:
git fetch upstream git checkout main git merge upstream/main
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit them
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
- Clear title and description - Explain what and why
- Reference issues - Use "Fixes #123" or "Closes #456"
- Keep changes focused - One feature/fix per PR
- Update documentation - Include relevant docs updates
- Add tests - Ensure new code is tested
Follow standard Go conventions:
- Use
gofmtfor formatting - Follow
golintrecommendations - Use meaningful variable and function names
- Add comments for exported functions and packages
- Handle errors explicitly
// Package comment explaining purpose
package packagename
import (
// Standard library first
"fmt"
"os"
// Third-party packages
"github.com/external/package"
// Internal packages last
"github.com/ArqonAi/Pixelog/pkg/crypto"
)// Good: Descriptive error messages
if err != nil {
return fmt.Errorf("failed to encrypt data: %w", err)
}
// Good: Check all errors
data, err := os.ReadFile(filename)
if err != nil {
return nil, fmt.Errorf("failed to read file %s: %w", filename, err)
}DO NOT report security vulnerabilities in public issues.
Instead:
- Email security@arqon.ai with details
- Include steps to reproduce
- Wait for acknowledgment before public disclosure
- Never hardcode secrets or API keys
- Use secure random number generation for cryptographic operations
- Validate all inputs
- Follow secure coding practices
- Keep dependencies updated
For changes to encryption/decryption:
- Consult cryptographic experts
- Provide detailed security analysis
- Include test vectors
- Document breaking changes clearly
// ConvertFile converts a single file to .pixe format with optional encryption.
// It returns the path to the created .pixe file or an error if conversion fails.
//
// Parameters:
// - inputPath: Path to the input file
// - opts: Conversion options including encryption key and output path
//
// Returns:
// - string: Path to the created .pixe file
// - error: Error if conversion fails
func (c *Converter) ConvertFile(inputPath string, opts *ConvertOptions) (string, error) {
// Implementation...
}When adding features:
- Update feature list
- Add usage examples
- Update CLI reference if applicable
We follow Semantic Versioning:
MAJOR.MINOR.PATCH- Breaking changes increment MAJOR
- New features increment MINOR
- Bug fixes increment PATCH
Maintain CHANGELOG.md with:
- Added features
- Changed behavior
- Deprecated features
- Removed features
- Fixed bugs
- Security updates
- Open an issue for bugs or feature requests
- Start a discussion for questions or ideas
- Check existing issues and discussions first
Contributors will be recognized in:
- CHANGELOG.md for their contributions
- GitHub contributors list
- Release notes for significant contributions
Thank you for contributing to Pixe-Core! 🚀