Contributing to Spage
We welcome contributions to Spage! This guide will help you get started with contributing to the project.
Development Setup
Prerequisites
- Go (1.24 or later)
- Git
Getting Started
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/spage.git
cd spage -
Add the upstream remote:
git remote add upstream https://github.com/AlexanderGrooff/spage.git
-
Install dependencies:
go mod download
-
Run the tests to make sure everything is working:
make test
Development Workflow
Making Changes
-
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
-
Make your changes and commit them:
git add .
git commit -m "Add your descriptive commit message" -
Push your branch to your fork:
git push origin feature/your-feature-name
-
Create a pull request on GitHub
Code Standards
- Follow Go conventions and use
gofmt
to format your code - Write tests for new functionality
- Update documentation as needed
- Ensure all tests pass before submitting a PR
Running Tests
# Run all tests
go test ./...
Types of Contributions
Bug Reports
If you find a bug, please create an issue with:
- A clear description of the problem
- Steps to reproduce the issue
- Expected vs actual behavior
- Your environment details (OS, Go version, etc.)
Feature Requests
For new features:
- Describe the feature and its use case
- Explain why it would be valuable
- Consider backward compatibility
Code Contributions
We welcome:
- Bug fixes
- New module implementations
- Performance improvements
- Documentation improvements
- Test coverage improvements
Documentation
Help improve our documentation by:
- Fixing typos and grammar
- Adding examples
- Improving clarity
- Adding missing documentation
Module Development
When adding new modules:
- Create the module in
pkg/modules/
- Implement the required interfaces
- Add comprehensive tests
- Update documentation
- Add examples
Performance Considerations
Spage prioritizes performance. When contributing:
- Profile your changes using the built-in profiling tools
- Run benchmarks to ensure no performance regressions
- Consider memory usage and allocations
Getting Help
If you need help with contributing:
- Check existing issues and discussions
- Create a new issue with the "question" label
- Join our community discussions
Code of Conduct
Please be respectful and follow our code of conduct. We want to maintain a welcoming environment for all contributors.
Thank you for contributing to Spage!