First off, thank you for considering contributing to Sai! It's people like you who make Sai such a great tool.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
When filing a bug report, please include:
- Ruby Version: The version of Ruby you're using
- Sai Version: The version of Sai where you encountered the issue
- Terminal Environment: Your terminal emulator and operating system
- Description: A clear description of what happened versus what you expected
- Reproduction Steps: Detailed steps to reproduce the issue
- Code Sample: A minimal code example that demonstrates the issue
- Terminal Output: Any relevant error messages or unexpected output
- Screenshots: If applicable, screenshots showing the issue (especially for color-related bugs)
Enhancement suggestions are welcome! When suggesting an enhancement, please:
- Check Existing Issues: Make sure a similar suggestion hasn't already been made
- Provide Context: Explain why this enhancement would be useful
- Consider Scope: Describe if this is a general enhancement or specific to certain use cases
- Include Examples: If possible, provide example code or mockups
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/sai.git
- Create a branch:
git checkout -b my-feature-branch
- Run
bin/setup
to install dependencies - Make your changes
- Add tests for your changes
- Run the CI checks locally:
bin/ci
We follow a specific code style as defined in our RuboCop configuration:
- Methods should be organized by class/instance and visibility
- Documentation should follow YARD format with required tags
- Tests should follow our RSpec guidelines (see Testing section)
Please make sure your changes include appropriate tests:
- New features should include unit tests
- Bug fixes should include regression tests
- Tests should be clear and maintainable
Documentation is crucial! Please:
- Add YARD documentation for new methods/classes
- Update the README.md if necessary
- Add examples showing how to use new features
- Update the USAGE.md guide for significant changes
- Ensure all CI checks pass
- Get review from maintainers
- Respond to feedback and make requested changes
- Once approved, maintainers will merge your PR
- Install Ruby (see .ruby-version for current version)
- Clone the repository
- Run
bin/setup
- Run the CI script to verify setup
- Full CI check: Use the CI script above
- Just RSpec:
bundle exec rspec
- Specific tests:
bundle exec rspec spec/path/to/file_spec.rb
- RuboCop:
bundle exec rubocop
orbundle exec rubocop -A
for auto-correct - Type checking:
bundle exec steep check
If you need help, you can:
- Open a GitHub Discussion for general questions
- Check the documentation for guides and API reference
- Join our community (link to be added)
Thank you again for contributing to Sai!