Thank you for your interest in contributing! This guide covers everything you need to get started.
Prerequisites: Python 3.11+, uv, Git with git-lfs.
git clone https://github.com/IBM/READI.git
cd READI
# Create virtual environment and install all dependencies (including dev extras)
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
# Install pre-commit hooks
prek install# Run the full test suite
pytest
# Run a specific test file
pytest tests/readi/test_analyzer.py -v
# Run with coverage report
pytest --cov=risk_assessment --cov-report=htmlThe project uses Ruff for linting and formatting.
# Check for lint errors
ruff check src/ tests/
# Auto-fix lint errors
ruff check --fix src/ tests/
# Format code
ruff format src/ tests/Pre-commit hooks run these checks automatically on every commit. To run them manually:
pre-commit run --all-files- Follow existing patterns in the surrounding code.
- All public classes, methods, and module-level functions must have docstrings.
- Use Google-style docstrings with
Args:,Returns:, andRaises:sections where applicable. - Type hints are required on all function signatures.
- Line length limit is 120 characters (enforced by Ruff).
- Branch off
mainusing a descriptive name, e.g.feat/italian-fiscal-codeorfix/email-regex. - Write tests for any new functionality. PRs without tests for new features will not be merged.
- Ensure all checks pass locally before opening a PR:
prek run --all-files pytest
- Open a Pull Request against
main. Fill in the PR template, linking any related issues. - At least one maintainer review is required before merging.
Use GitHub Issues to report bugs or request features. Please include:
- A minimal reproducible example for bugs.
- The Python version and OS you are using.
- The full error traceback if applicable.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.