Contributing to GAT
We welcome contributions from the community! Whether you're fixing bugs, adding features, improving documentation, or providing feedback, your help makes GAT better.
Ways to Contribute
๐ Report Bugs
Found a bug? Open an issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs. actual behavior
- System information (OS, GAT version, Rust version)
- Minimal reproducible example if possible
โจ Request Features
Have an idea? Start a discussion or open an issue:
- Describe the feature and use case
- Explain why it would be valuable
- Provide examples of how it would work
- Consider implementation complexity
๐ Improve Documentation
Documentation is always a work in progress:
- Fix typos or unclear explanations
- Add examples and use cases
- Improve getting started guides
- Write tutorials or blog posts
Documentation lives in website/content/docs/ and docs/ directories.
๐ป Contribute Code
Ready to code? See the development workflow below.
๐งช Test and Provide Feedback
Help us test:
- New features on different platforms
- Edge cases and large systems
- Performance benchmarks
- User experience and ergonomics
Development Workflow
1. Set Up Development Environment
# Clone the repository
# Install Rust (if not already installed)
|
# Install system dependencies (Linux)
# Install system dependencies (macOS)
# Build and test
2. Find Something to Work On
- Check good first issues
- Look at help wanted issues
- Review the roadmap
- Propose your own feature or improvement
3. Create a Branch
# Create a feature branch from staging
4. Make Your Changes
Code Style:
- Run
cargo fmtbefore committing - Run
cargo clippyand fix warnings - Write tests for new functionality
- Update documentation as needed
Commit Messages:
- Use clear, descriptive commit messages
- Reference issue numbers when applicable
- Follow conventional commits format if possible:
feat: Add new featurefix: Fix bug in power flowdocs: Update contributing guidetest: Add tests for OPF
5. Test Your Changes
# Run all tests
# Run specific tests
# Check formatting
# Run clippy
# Build documentation
6. Submit a Pull Request
Before submitting:
- Ensure all tests pass
- Run
cargo fmtandcargo clippy - Update documentation if needed
- Add tests for new features
- Rebase on latest staging if needed
Create PR:
- Push your branch:
git push origin feature/your-feature-name - Open a pull request against
staging(notmain) - Fill out the PR template with:
- Clear description of changes
- Related issues
- Testing performed
- Breaking changes (if any)
PR Review Process:
- Automated checks run (tests, formatting, clippy)
- Maintainers review the code
- You may be asked to make changes
- Once approved, maintainers merge to staging
- Changes go to main in the next release
Code Organization
gat/
โโโ crates/
โ โโโ gat-core/ # Core power systems algorithms
โ โโโ gat-cli/ # Command-line interface
โ โโโ gat-tui/ # Terminal user interface
โ โโโ gat-io/ # I/O and data formats
โ โโโ gat-algo/ # Algorithms and solvers
โ โโโ ...
โโโ docs/ # Original documentation (md files)
โโโ website/ # Zola website source
โ โโโ content/ # Website and docs content
โ โโโ templates/ # Website templates
โโโ examples/ # Example datasets and scripts
โโโ test_data/ # Test datasets
โโโ scripts/ # Build and release scripts
Development Guidelines
Code Quality
- Safety: Use safe Rust patterns, avoid
unsafeunless necessary - Performance: Profile before optimizing, but be aware of hot paths
- Error Handling: Use
Resulttypes, provide helpful error messages - Testing: Write unit tests for algorithms, integration tests for CLI
- Documentation: Document public APIs with doc comments
Adding New Features
When adding features:
- Start with an issue or discussion
- Get feedback on the approach
- Write tests first (TDD when possible)
- Implement incrementally
- Document in code and user-facing docs
- Update examples if relevant
Working with Dependencies
- Prefer well-maintained crates with permissive licenses
- Avoid adding heavy dependencies for small features
- Document why dependencies are needed
- Keep dependencies up to date
Release Process
Releases follow a staging โ main โ tag workflow:
- Develop on staging - All PRs merge to staging
- Run diagnostics - Comprehensive testing on staging
- Build packages - Create release artifacts
- Merge to main - When ready for release
- Tag release - Manual git tag on main
- Deploy - GitHub Pages, package distribution
See RELEASE_PROCESS.md for details.
Community Guidelines
Be Respectful
- Treat all contributors with respect
- Welcome newcomers and help them get started
- Focus on constructive feedback
- Assume good intentions
Be Clear
- Write clear issue descriptions
- Provide context in PRs
- Ask questions if something is unclear
- Document your thought process
Be Patient
- Maintainers are volunteers
- Reviews take time
- Not all proposals will be accepted
- Feedback helps everyone learn
License for Contributions
By contributing to GAT, you agree that your contributions will be licensed under the same license as the project (PolyForm Shield License 1.0.0).
This means:
- Your code can be used in the free version of GAT
- Your code can be used in commercial versions of GAT
- You retain copyright to your contributions
- You grant GAT permission to use your contributions
See License & Terms for details.
Getting Help
Stuck? Need guidance?
- Discussions: Ask questions
- Issues: Report problems
- Documentation: Read the docs
- Examples: Check examples
Recognition
Contributors are recognized:
- In commit history
- In release notes
- In the contributor graph
- In special recognition for major contributions
Quick Reference
# Start new work
# During development
# Before PR
# Submit PR
# Open PR on GitHub against 'staging' branch
Thank you for contributing to GAT! Every contribution, no matter how small, helps make power systems analysis better for everyone.