Skip to content

Installation Guide

Risk Bridge is designed for modern Python environments, prioritizing fast dependency resolution, strict typing, and reproducible builds.

Requirements

  • Python Version: Python 3.11, 3.12, or 3.13.
  • Operating System: macOS, Linux, or Windows.
  • Package Manager: uv is strongly recommended for speed and lockfile integrity, though standard pip is fully supported.

Standard Installation (PyPI)

To install the latest release (1.0.5) from PyPI:

Add risk-bridge to your existing project:

uv add risk-bridge

Or install it in an isolated tool environment:

uv tool install risk-bridge

Using pip

pip install risk-bridge

Installing from Source

For development, contributing, or reproducing the full replication case suite:

  1. Clone the Repository:
git clone https://github.com/SaehwanPark/risk-bridge.git
cd risk-bridge
  1. Synchronize Dependencies with uv:
uv sync --locked
  1. Verify the Environment:

Run the unit test suite and type check:

uv run pytest
uv run basedpyright

All 96 public test suite cases should execute and pass cleanly.


Core Dependencies

Risk Bridge relies on a focused set of scientific and tabular computing libraries:

Package Minimum Version Purpose
comp-builders \(\ge 1.0.0\) Explicit Result composition and functional error handling
numpy \(\ge 2.4.2\) Vectorized numerical operations and linear algebra
scipy \(\ge 1.17.1\) Statistical distributions and numerical optimizers (trust-constr, SLSQP, BFGS)
scikit-learn \(\ge 1.8.0\) Base risk logistic regression and ROC metrics
polars \(\ge 1.38.1\) High-performance dataframe manipulation and schema enforcement
pandas \(\ge 3.0.1\) Interoperability and legacy data exchange
rdata \(\ge 1.0.0\) Conversion and parsing of R dataset formats

Public Reproduction Case Runners

The public wheel and source distributions include four curated, privacy-safe reproduction cases:

  • cases.numerical_validation
  • cases.external_calibration_validation
  • cases.synthetic_transport_example
  • cases.runtime_support_scaling

After installing from PyPI, these runners can be invoked directly as Python modules:

python -m cases.numerical_validation.run_suite
python -m cases.external_calibration_validation.run_suite --profile smoke --condition matched
python -m cases.synthetic_transport_example.run_case
python -m cases.runtime_support_scaling.run_scaling --profile smoke