Metadata-Version: 2.4
Name: open-process-intelligence
Version: 0.1.0
Summary: Open-source, local-first process intelligence for everyone.
Author: Shahrukh Khan
License-Expression: AGPL-3.0-or-later
Project-URL: Homepage, https://github.com/S4Good/open-process-intelligence
Project-URL: Repository, https://github.com/S4Good/open-process-intelligence
Project-URL: Issues, https://github.com/S4Good/open-process-intelligence/issues
Project-URL: Changelog, https://github.com/S4Good/open-process-intelligence/blob/main/CHANGELOG.md
Keywords: process-mining,process-intelligence,data-analysis,process-discovery,business-intelligence,event-log
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Requires-Dist: pandas<4,>=3.1.1
Requires-Dist: pm4py<2.8,>=2.7.23.15
Requires-Dist: pyarrow<27,>=26.0.1
Provides-Extra: demo
Requires-Dist: duckdb==2.0.1; extra == "demo"
Requires-Dist: PyYAML==6.0.4; extra == "demo"
Requires-Dist: graphviz==0.21; extra == "demo"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# Open Process Intelligence (OPI)

[![CI](https://github.com/S4Good/open-process-intelligence/actions/workflows/ci.yml/badge.svg)](https://github.com/S4Good/open-process-intelligence/actions/workflows/ci.yml)
![Python](https://img.shields.io/badge/Python-3.12-blue)
![License](https://img.shields.io/badge/License-AGPL--3.0-orange)
![Version](https://img.shields.io/badge/version-0.1.0-blue)
![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey)
![Status](https://img.shields.io/badge/status-alpha-yellow)

Open-source, local-first process intelligence for everyone.

## Mission

Make process intelligence accessible to small businesses,
developers, researchers, and analysts without expensive
enterprise software or mandatory cloud subscriptions.

## Features

- Event log validation and normalization
- Automatic process discovery
- Directly Follows Graphs (DFG)
- Process variant analysis
- Throughput time analysis
- Potential bottleneck detection
- Process visualization
- Structured JSON reporting

## Technology Stack

- Python
- Pandas
- DuckDB
- PM4Py
- Graphviz
- Apache Parquet
- Pytest

## Installation

OPI requires Python 3.12.

After publication on PyPI:

```bash
pip install open-process-intelligence
```

### Installation from source

```bash
git clone https://github.com/S4Good/open-process-intelligence.git
cd open-process-intelligence
python -m pip install .
```

### Development installation

```bash
python -m pip install -e ".[dev,demo]"
```

## Quick Start

Analyze a business process using a Pandas DataFrame.

```python
import pandas as pd

from opi.analytics import analyze_performance, discover_variants
from opi.discovery import discover_process

events = pd.DataFrame(
    {
        "case_id": ["1", "1", "1", "2", "2", "2"],
        "activity": [
            "Order Received",
            "Order Processed",
            "Order Delivered",
            "Order Received",
            "Order Processed",
            "Order Delivered",
        ],
        "event_timestamp": pd.to_datetime(
            [
                "2026-01-01 08:00",
                "2026-01-01 10:00",
                "2026-01-01 14:00",
                "2026-01-02 09:00",
                "2026-01-02 12:00",
                "2026-01-02 18:00",
            ],
            utc=True,
        ),
    }
)

print("=== Process Discovery ===")
print(discover_process(events))

print("\n=== Process Variants ===")
print(discover_variants(events))

print("\n=== Process Performance ===")
print(analyze_performance(events))

```

### Expected Results

| Metric | Result |
|---|---|
| Cases | 2 |
| Events | 6 |
| Activities | 3 |
| Process variants | 1 |
| Average duration | 7.5 hours |
| Minimum duration | 6 hours |
| Maximum duration | 9 hours |

The example runs locally without external datasets,
database servers or cloud services.

## Input Data Format

OPI expects an event log containing three essential columns:

| Column | Description |
|---|---|
| case_id | Unique process instance identifier |
| activity | Name of the executed activity |
| event_timestamp | Timestamp of the event |

Examples of process instances include customer orders,
support tickets, invoices and delivery requests.

## Testing

```bash
python -m pytest -q
python -m ruff check .
```

## Architecture

OPI separates its reusable analytical engine from
industry-specific demonstration projects.

- src/opi: Core process intelligence library
- src/itsm: IT service management demonstration
- examples: Library usage examples
- tests: Automated functional tests
- reports: Analytical outputs

## Verified Demonstration

- 10,000 synthetic IT incidents
- 70,000 source audit records
- 50,000 process events
- 28 passing automated tests

## Roadmap

- Generic CSV and Excel import
- Interactive Process Explorer
- Advanced process analytics
- Conformance checking
- Object-centric process mining
- Business object modeling
- Process automation
- PyPI distribution
- Standalone desktop application

## Principles

- Local-first processing
- Data privacy
- Transparent analytics
- Vendor independence
- Open-source development

## Project Status

Early development (v0.1.0).
Not yet published on PyPI or ready for production use.

## Author

Shahrukh Khan

## License

Open Process Intelligence is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). See [LICENSE](LICENSE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for details.
