Contributing¶
Contributions are welcome! Here's how to get started.
Development Setup¶
# Clone the repository
git clone https://github.com/mhoward2718/pinball-qr.git
cd pinball-qr
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
# Install in editable mode with dev dependencies
pip install -e ".[dev]" --no-build-isolation
Dependencies¶
The Fortran extensions require a Fortran compiler. On macOS:
On Ubuntu/Debian:
Running Tests¶
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=pinball --cov-report=html
# Run sklearn check_estimator compliance
pytest tests/test_sklearn_compat.py -v
Code Style¶
- Follow PEP 8 guidelines
- Use type hints for function signatures
- Write docstrings in NumPy style
- Keep lines under 88 characters (Black default)
Submitting Changes¶
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Write tests for your changes
- Ensure all tests pass (
pytest tests/ -v) - Commit your changes (
git commit -m "Add my feature") - Push to your fork (
git push origin feature/my-feature) - Open a Pull Request
Adding a New Solver¶
The solver architecture uses the Open/Closed Principle — adding a new solver requires no changes to existing code:
- Create a new module in
pinball/linear/solvers/(e.g.my_solver.py) - Subclass
BaseSolverand implement_solve_impl() - Register the solver in
pinball/linear/solvers/__init__.py:
- Add tests in
tests/test_solvers.py - Update the documentation
Reporting Issues¶
Please include:
- Python version (
python --version) - NumPy/SciPy/sklearn versions (
pip list | grep -E "numpy|scipy|scikit") - Operating system
- Minimal reproducible example
- Full traceback
License¶
By contributing, you agree that your contributions will be licensed under the MIT License.