Thank you for your interest in contributing to UltraLog! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Workflow
- Pull Request Process
- Coding Standards
- Commit Guidelines
- Testing
- Documentation
- Community
By participating in this project, you agree to maintain a respectful and inclusive environment. Please:
- Be respectful and constructive in discussions
- Welcome newcomers and help them get started
- Focus on what's best for the community and project
- Accept constructive criticism gracefully
Before contributing, ensure you have:
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/UltraLog.git cd UltraLog -
Add the upstream remote:
git remote add upstream https://github.com/ClassicMiniDIY/UltraLog.git
-
Install dependencies:
Linux (Ubuntu/Debian):
sudo apt-get update sudo apt-get install -y \ build-essential \ libxcb-render0-dev \ libxcb-shape0-dev \ libxcb-xfixes0-dev \ libxkbcommon-dev \ libssl-dev \ libgtk-3-dev \ libglib2.0-dev \ libatk1.0-dev \ libcairo2-dev \ libpango1.0-dev \ libgdk-pixbuf2.0-devmacOS:
xcode-select --install
Windows:
- Install Visual Studio Build Tools
- Select "Desktop development with C++"
-
Verify the build works:
cargo build cargo test
We welcome many types of contributions:
| Type | Description |
|---|---|
| Bug Fixes | Fix reported issues |
| New Features | Add new functionality |
| ECU Support | Add support for new ECU formats |
| Documentation | Improve README, wiki, or code comments |
| Tests | Add or improve test coverage |
| Performance | Optimize parsing or rendering |
| Accessibility | Improve accessibility features |
| Translations | Help with internationalization |
- Look for issues labeled
good first issuefor beginner-friendly tasks - Check
help wantedfor issues where we need community help - Feel free to propose new features by opening an issue first
- Check existing issues - Someone may already be working on it
- Open an issue - Discuss your proposed changes before starting significant work
- Get feedback - For large changes, wait for maintainer feedback before investing time
Always create a new branch for your work:
# Update your main branch
git checkout main
git pull upstream main
# Create a feature branch
git checkout -b feature/your-feature-nameBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions/changes
- Write clean, readable code
- Follow the coding standards
- Add tests for new functionality
- Update documentation as needed
# Run all tests
cargo test
# Check formatting
cargo fmt --all -- --check
# Run lints
cargo clippy -- -D warnings
# Build release to ensure it compiles
cargo build --releaseFollow the commit guidelines:
git add .
git commit -m "feat: add support for NewECU format"Regularly sync with upstream:
git fetch upstream
git rebase upstream/maingit push origin feature/your-feature-nameThen open a Pull Request on GitHub.
- Code compiles without errors (
cargo build) - All tests pass (
cargo test) - Code is formatted (
cargo fmt) - No clippy warnings (
cargo clippy -- -D warnings) - Documentation is updated if needed
- Commit messages follow guidelines
When creating a PR, please include:
## Description
Brief description of what this PR does.
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
## Related Issues
Fixes #(issue number)
## Testing
Describe how you tested your changes.
## Screenshots (if applicable)
Add screenshots for UI changes.
## Checklist
- [ ] I have read the CONTRIBUTING guidelines
- [ ] My code follows the project's coding standards
- [ ] I have added tests for my changes
- [ ] All new and existing tests pass
- [ ] I have updated documentation as needed- Automated checks - CI must pass (build, test, lint, format)
- Code review - A maintainer will review your code
- Feedback - Address any requested changes
- Approval - Once approved, a maintainer will merge
- Delete your feature branch
- Update your local main branch
- Celebrate your contribution! 🎉
- Follow standard Rust conventions
- Use
rustfmtfor formatting - Address all
clippywarnings
Run before committing:
cargo fmt --allEnsure no warnings:
cargo clippy -- -D warnings| Type | Convention | Example |
|---|---|---|
| Functions | snake_case | parse_log_file |
| Variables | snake_case | channel_count |
| Types/Structs | PascalCase | LoadedFile |
| Traits | PascalCase | Parseable |
| Constants | SCREAMING_SNAKE | MAX_CHANNELS |
| Modules | snake_case | haltech_parser |
- Keep functions focused and small
- Use meaningful names
- Add comments for complex logic
- Group related functionality into modules
- Use
anyhowfor error propagation in parsers - Use
thiserrorfor custom error types - Provide helpful error messages
- Handle errors gracefully in UI (toast notifications)
type(scope): short description
Longer description if needed. Explain the what and why,
not the how (the code shows how).
Fixes #123
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
style |
Formatting, no code change |
refactor |
Code restructuring |
perf |
Performance improvement |
test |
Adding/updating tests |
chore |
Maintenance tasks |
The area of the codebase:
parser- Parsing codeui- User interfaceexport- Export functionalityunits- Unit conversionnormalize- Field normalization
feat(parser): add MegaSquirt log format support
fix(ui): prevent crash when loading empty files
docs: update installation instructions for Linux
refactor(chart): extract LTTB algorithm to separate function
test(parser): add tests for Haltech edge cases
- Keep the first line under 72 characters
- Use imperative mood ("add" not "added" or "adds")
- Don't end the first line with a period
- Reference issues when applicable
# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocapture- Add tests for new functionality
- Test edge cases and error conditions
- Place unit tests in the same file as the code
- Place integration tests in the
tests/directory
- Unit tests: Inline in source files
- Integration tests:
tests/directory - Sample data:
exampleLogs/directory
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_parse_haltech_header() {
let header = "%DataLog%";
assert!(is_haltech_format(header));
}
#[test]
fn test_unit_conversion_celsius() {
let kelvin = 300.0;
let celsius = kelvin_to_celsius(kelvin);
assert!((celsius - 26.85).abs() < 0.01);
}
}- Add doc comments (
///) for public APIs - Explain why, not what (code shows what)
- Keep comments up to date with code changes
Update README.md when:
- Adding new features
- Changing installation steps
- Modifying supported formats
Update wiki pages for:
- New ECU format support
- New configuration options
- Changed workflows
If you're adding support for a new ECU format:
Discuss the new format before implementing. Include:
- ECU system name and model
- File format details
- Sample files (if possible)
- Add ECU type to
EcuTypeenum insrc/parsers/types.rs - Create parser module
src/parsers/newecu.rs - Implement the
Parseabletrait - Add format detection logic
- Add field normalizations in
src/normalize.rs - Add sample files to
exampleLogs/ - Update documentation
- Include sample log files
- Add parser tests
- Test with various file sizes
- Verify all channel types parse correctly
- Questions: Open a Discussion
- Bugs: Open an Issue
- Features: Open an Issue to discuss first
Contributors are recognized in:
- Release notes
- Contributors list
- Commit history
By contributing to UltraLog, you agree that your contributions will be licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
Thank you for contributing to UltraLog! Your efforts help make this tool better for everyone in the automotive tuning community.