First off, thank you for considering contributing to BinaryOptionsTools v2! It's people like you that make this library a great tool for the community.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to our Discord community.
Before creating bug reports, please check the existing issues as you might find that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title for the issue
- Describe the exact steps to reproduce the problem with as many details as possible
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed and what behavior you expected to see
- Include code samples and error messages if applicable
- Specify your environment: OS, Python version, library version, etc.
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Provide specific examples to demonstrate the use case
- Explain why this enhancement would be useful to most users
Please follow these steps for sending us your pull requests:
- Fork the repository and create your branch from
master - Make your changes following our coding standards
- Add tests for any new functionality
- Ensure all tests pass (
cargo testandpytest) - Update documentation if you're changing functionality
- Write clear commit messages describing your changes
- Create a pull request with a clear description of your changes
- Rust: 1.70 or later (install via rustup)
- Python: 3.8 or later
- Maturin:
pip install maturin
# Clone your fork
git clone https://github.com/YOUR_USERNAME/BinaryOptionsTools-v2.git
cd BinaryOptionsTools-v2
# Build the Rust core
cd crates/binary_options_tools
cargo build
cargo test
# Build Python bindings
cd ../../BinaryOptionsToolsV2
maturin develop --release
# Run Python tests
pytest ../tests/- Follow the Rust Style Guide
- Run
cargo fmtbefore committing - Run
cargo clippyand fix all warnings - Write tests for new functionality
- Document public APIs with doc comments
- Follow PEP 8 style guide
- Use type hints where appropriate
- Write docstrings for all public functions and classes
- Keep line length under 120 characters (as configured in pyproject.toml)
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
Example:
Add WebSocket reconnection with exponential backoff
- Implement exponential backoff strategy for reconnection
- Add max retry configuration
- Update tests for reconnection logic
Fixes #123
# Rust tests
cd crates/binary_options_tools
cargo test
# Python tests
cd BinaryOptionsToolsV2
pytest ../tests/
# Run specific test
pytest ../tests/test_connection.py -v- Write unit tests for all new functionality
- Ensure tests are deterministic and don't require external services when possible
- Use mocking for WebSocket connections when appropriate
- Add integration tests for critical paths
- Update the README.md if you change functionality
- Add examples for new features in the
docs/examples/directory - Update relevant documentation in the
docs/directory - Ensure all public APIs have docstrings/doc comments
- Join our Discord server for discussions
- Be respectful and constructive in all interactions
- Help others when you can
- Share your use cases and experiences
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
Don't hesitate to ask questions on our Discord server or by opening an issue. We're here to help!
Thank you for your contributions! 🎉