Contributing
We welcome contributions to onlinerake
! This guide will help you get started.
Development Setup
Requirements
Python 3.10 or later
Git
Setup Steps
Fork the repository on GitHub
Clone your fork locally:
git clone https://github.com/your-username/onlinerake.git
cd onlinerake
Install in development mode:
pip install -e .
pip install pytest black flake8 sphinx sphinx-rtd-theme myst-parser
Code Style
We use black
for code formatting and flake8
for linting:
# Format code
black onlinerake/
# Check formatting
black --check onlinerake/
# Run linting
flake8 onlinerake/
Running Tests
Run the test suite to make sure everything works:
# Run all tests
pytest test_onlinerake.py -v
# Run with coverage
pytest test_onlinerake.py --cov=onlinerake --cov-report=term
# Run simulation tests
python examples/simulation.py
python realistic_examples.py
Types of Contributions
- Bug Reports
Found a bug? Please open an issue with: - Clear description of the problem - Minimal code example to reproduce - Your Python version and package versions
- Feature Requests
Have an idea for improvement? Open an issue with: - Description of the proposed feature - Use case and motivation - Proposed API (if applicable)
- Code Contributions
Ready to contribute code? Here’s the process:
Check existing issues or open a new one
Create a feature branch:
git checkout -b feature-name
Make your changes with tests
Run the test suite and style checks
Commit with descriptive messages
Push and create a pull request
Documentation
Documentation improvements are always welcome:
# Build docs locally
cd docs/
make html
# View in browser
open _build/html/index.html
Documentation is written in reStructuredText and built with Sphinx.
Areas for Contribution
Here are some areas where contributions would be especially valuable:
- Algorithm Enhancements
Support for multi-level categorical variables
Adaptive learning rate schedules
Alternative loss functions
Regularization techniques
- Performance Optimizations
Vectorized operations for batch processing
Memory-efficient implementations
GPU acceleration (optional)
- Additional Features
Integration with popular survey platforms
Visualization tools for weight evolution
Export functionality for different formats
Real-time monitoring dashboards
- Testing & Quality
More edge case tests
Performance benchmarks
Integration tests
Property-based testing
Pull Request Guidelines
To ensure smooth review process:
Focus: Keep changes focused and atomic
Tests: Add tests for new functionality
Documentation: Update docs for API changes
Style: Follow existing code conventions
Commit Messages: Use descriptive commit messages
Example commit message:
Add support for custom weight initialization
- Allow users to provide initial weights via new parameter
- Add validation for weight dimensions and positivity
- Update documentation and examples
- Add comprehensive tests for edge cases
Review Process
All contributions go through code review:
Automated checks (CI/CD) must pass
Manual review by maintainers
Discussion and iteration as needed
Merge when approved
Questions?
Feel free to:
Open an issue for questions
Start a discussion for broader topics
Reach out to maintainers directly
Thank you for contributing to onlinerake
!