Contributing to TwisteRL
We welcome contributions to TwisteRL! This guide will help you get started.
Getting Started
Development Setup
Fork the repository on GitHub
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/twisteRL.git
cd twisteRL
Set up the development environment:
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install Rust toolchain (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Install the package (builds Rust extension)
pip install -e .
Code Style
Python Code
Follow standard Python conventions. Format code before committing.
Rust Code
For Rust code, follow standard Rust conventions:
# Format Rust code
cargo fmt
# Lint Rust code
cargo clippy -- -D warnings
# Run Rust tests
cargo test
Testing
Running Tests
# Run Python tests
pytest tests/ -v
# Run Rust tests
cargo test
Documentation
Building Documentation
cd docs/
pip install -r requirements.txt
make html
# View documentation
open _build/html/index.html # macOS
xdg-open _build/html/index.html # Linux
Contribution Guidelines
Pull Request Process
Create a branch: Use descriptive branch names
git checkout -b feature/my-feature
git checkout -b fix/bug-description
Make your changes: Follow the code style guidelines
Add tests: Ensure your changes are tested
Update documentation: Add/update docs as needed
Submit pull request
Issue Guidelines
Bug Reports:
Include minimal reproduction case
Specify environment details (OS, Python version)
Include error messages and stack traces
Feature Requests:
Clearly describe the motivation
Provide example use cases
Community Guidelines
Be respectful and constructive
Follow the Code of Conduct
Be patient with reviews
Thank you for contributing to TwisteRL!