Install ocr for development#
This guide shows how to set up Open Climate Risk (ocr) for local development using pixi.
Prerequisites#
Python 3.12+
Git
Steps#
1. Install pixi#
# macOS / Linux
curl -sSf https://sh.pixi.sh | sh
For other platforms, see pixi.sh.
2. Clone and install dependencies#
git clone https://github.com/carbonplan/ocr.git
cd ocr
pixi install
3. Configure environment#
cp ocr-local.env .env
Edit .env and set required variables:
OCR_STORAGE_ROOT— where outputs are written (e.g.,s3://your-bucket/or local path)OCR_ENVIRONMENT— environment name (QA,STAGING, orPROD)OCR_DEBUG— set to1for verbose logging
4. Verify installation#
pixi run python -c "import ocr; print('ocr', ocr.__version__)"
pixi run ocr --help
5. Run tests#
pixi run tests
Next steps#
See Data pipeline to run the processing pipeline
Read Project structure to understand the codebase