Skip to content

s-neub/governance_score_report

Repository files navigation

ModelOp Logo

Governance Score Reporter

Turn raw compliance data into boardroom-ready intelligence.

The Problem: Your Governance Officers and Risk Teams are flying blind. They have 50+ models in the inventory, but understanding the holistic "health" of that portfolio requires clicking through dozens of screens to check Security, Model, and Change controls manually.

The Solution: This automation engine connects directly to your ModelOp Center API, aggregates the Governance Score components, and generates a professional, high-fidelity PDF report suitable for review.

The Bigger Picture:

  • For the Governance Team: You get an instant, auditable snapshot of compliance across the entire organization without manual data entry.
  • For the Model Owner: You can visualize exactly where your models are failing (e.g., missing "Business Sponsor" or "Risk Rating") before an audit occurs.

Sample Output

Below is an example of the PDF report generated by this tool:

Governance Score Report Example

Visual Logic

flowchart TD
    Start([User Initiates Script]) -->|Reads| CONFIG[config.yaml]
    CONFIG -->|Check| COOKIE{Valid Cookie?}
    
    COOKIE -- No --> AUTH[Launch Selenium Browser]
    AUTH -->|User Logs In| CAPTURE[Capture SESSION Cookie]
    CAPTURE -->|Save| CONFIG
    
    COOKIE -- Yes --> API_INV[Fetch Model Inventory]
    
    API_INV -->|Loop Models| GET_SCORE[Fetch Governance Score]
    GET_SCORE -->|Parse| AGG[Aggregate Controls]
    
    AGG -->|Data| CSV[Export .csv]
    AGG -->|Data| PDF[Generate .pdf Report]
    
    PDF --> End([Report Ready])

Loading

Repository Structure

.
├── generate_report.py       # The Orchestrator (Main Script)
├── config.yaml              # Control Center (Auth & Settings)
├── requirements.txt         # Dependencies
└── output/                  # Generated Reports

Configuration & Setup

This tool runs locally as a client to the ModelOp Center ecosystem. You must configure the config.yaml file to point to your specific environment.

Parameter Description Example
base_url Your ModelOp Center API URL. https://mocaasin.modelop.center/model-manage/api
inventory_params Filters to determine which models to report on. modelOrganization: "Finance", modelRisk: "HIGH"
branding Hex codes to match your corporate identity in the PDF. primary_green: "#006630"

Installation

  1. Clone the Repository to your local machine.
  2. Install Dependencies using the provided requirements file. Note that we strictly require reportlab<4.0 for maximum compatibility.
pip install -r requirements.txt

Usage

Phase 1: Authentication The script handles authentication automatically. If your session is expired, a Chrome window will open. Simply log in to ModelOp Center, and the script will grab your SESSION cookie and update config.yaml automatically.

Phase 2: Execution Run the reporter from your terminal.

python generate_report.py --config config.yaml

Phase 3: Analysis Two artifacts are generated in your folder:

  1. governance_score_data.csv: Raw data suitable for Tableau/PowerBI ingestion.
  2. governance_score_report.pdf: A visual dashboard with doughnut charts, calculating the aggregate pass/fail rates for Security, Model, and Change controls.

Troubleshooting


Context: 401 Unauthorized Loop.

Fix: The script attempts to auto-login, but if it fails, ensure you have Chrome installed. You can also manually paste a cookie into config.yaml.


Context: TypeError: 'usedforsecurity'...

Fix: This is a reportlab version mismatch. Run pip install "reportlab<4.0" to force the compatible version.


Additional Resources

Resource Description Link
Governance Score Definition of the metric components. View Glossary
Model Metadata How metadata drives the score. View Docs
Reporting API API endpoints used for data retrieval. View Docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages