Skip to content

Latest commit

 

History

History
215 lines (159 loc) · 5.4 KB

File metadata and controls

215 lines (159 loc) · 5.4 KB

Contributing to Tooka

Thank you for your interest in contributing to Tooka! 🎉

We welcome contributions of all kinds: bug reports, feature requests, documentation improvements, and code contributions.

Table of Contents

Code of Conduct

This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to demetzbenjamin23@gmail.com.

Getting Started

Prerequisites

  • Rust 1.87 or later
  • Cargo (comes with Rust)
  • Git

Fork and Clone

  1. Fork the repository on GitHub
  2. Clone your fork locally:
    git clone https://github.com/YOUR_USERNAME/tooka.git
    cd tooka
  3. Add the upstream repository:
    git remote add upstream https://github.com/benji377/tooka.git

How to Contribute

Reporting Bugs

Before creating a bug report, please check the existing issues to avoid duplicates.

When filing a bug report, use the bug report template and include:

  • A clear description of the issue
  • Steps to reproduce the behavior
  • Expected vs. actual behavior
  • Logs (see wiki for log location)
  • Your environment (OS, terminal, version)

Suggesting Features

Feature requests are welcome! Please use the feature request template and:

  • Explain the problem you're trying to solve
  • Describe your proposed solution
  • Consider alternative approaches
  • Provide any additional context

For larger features, consider opening a discussion first to gather feedback.

Improving Documentation

Documentation improvements are always appreciated:

  • Fix typos or unclear explanations
  • Add examples or use cases
  • Improve the wiki
  • Write or improve code comments

Development Setup

  1. Build the project:

    cargo build
  2. Run the application:

    cargo run -- [arguments]
  3. Run tests:

    cargo test
  4. Run linter:

    cargo clippy --all-features
  5. Format code:

    cargo fmt
  6. Run performance benchmarks:

    cargo run --release --bin performance_benchmarks

    See benches/README.md for details on the benchmark suite.

Coding Guidelines

General Principles

  • Write clear, readable code
  • Follow the existing code style
  • Add tests for new functionality
  • Update documentation as needed
  • Keep commits focused and atomic

Rust Conventions

  • Follow the Rust API Guidelines
  • Run cargo fmt before committing
  • Ensure cargo clippy passes without warnings
  • Write comprehensive tests for new features
  • Document public APIs with doc comments

Testing

  • All new features should include tests
  • Ensure all tests pass: cargo test
  • Add tests to the appropriate test module
  • Test edge cases and error conditions

Performance

  • Run benchmarks for performance-sensitive changes: cargo run --release --bin performance_benchmarks
  • Add new benchmarks for critical code paths (see benches/README.md)
  • Investigate performance regressions before merging
  • Document expected performance characteristics

Commit Messages

Write clear, descriptive commit messages:

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Keep the first line under 50 characters
  • Provide additional context in the body if needed

Example:

Add support for custom date formats

- Implement date format parsing in utils
- Update rule matching to support custom formats
- Add tests for various date format patterns

Submitting Changes

  1. Create a branch:

    git checkout -b feature/your-feature-name
  2. Make your changes:

    • Write your code
    • Add or update tests
    • Update documentation
  3. Test your changes:

    cargo test
    cargo clippy --all-features
    cargo fmt
  4. Commit your changes:

    git add .
    git commit -m "Your descriptive commit message"
  5. Push to your fork:

    git push origin feature/your-feature-name
  6. Open a Pull Request:

    • Go to the Tooka repository
    • Click "New Pull Request"
    • Select your fork and branch
    • Fill out the PR template
    • Link any related issues

Pull Request Guidelines

  • Fill out the PR template completely
  • Link to relevant issues
  • Ensure all CI checks pass
  • Respond to review feedback promptly
  • Keep PRs focused on a single feature or fix
  • Update your branch with main if needed

Community

Questions?

If you have questions about contributing, feel free to:


Thank you for contributing to Tooka! Your efforts help make this project better for everyone. ❤️