Metadata-Version: 2.4
Name: gitpowerdash
Version: 0.1.1
Summary: Git analytics specifically for Power BI projects
Requires-Python: >=3.12
Requires-Dist: pandas>=2.3.3
Requires-Dist: typer>=0.21.0
Description-Content-Type: text/markdown

# GitPowerDash

**Empowering Executive Oversight through Git Analytics for Power BI.**

`gitpowerdash` is a lightweight Python CLI and library designed to bridge the gap between technical development history and executive-level project management. It extracts Git repository metadata into a structured format optimized for Power BI's star schema.

## 🚀 The Value Proposition

Traditional Git viewers are built for developers. `gitpowerdash` is built for **Decision Makers**. By integrating this data into Power BI, you can:

* **Visualize Velocity:** Correlate commit frequency with project milestones.
* **Identify Volatility:** Spot "hot" files or modules that change too frequently.
* **Mitigate Knowledge Silos:** See which team members are the sole contributors to critical components.
* **Scale with Fabric:** Use as a local CLI or import directly into Microsoft Fabric Notebooks.

---

## 🛠️ Installation

`gitpowerdash` is built with `uv` and is available via PyPI.

```bash
pip install gitpowerdash
# OR using pipx for a global CLI
pipx install gitpowerdash

```

---

## 📖 Usage

### CLI (Local Development)

Navigate to any Git repository and run the extraction. By default, this will create an `export/` directory containing the CSV files for your Power BI dashboard.

```bash
gitpowerdash extract --output ./export

```

### Library (Fabric / Python)

You can also use the core logic directly in Python scripts or Fabric Notebooks to write data directly to a Lakehouse.

```python
from gitpowerdash import get_commits, get_file_changes

# Returns a Pandas DataFrame
commits_df = get_commits()
changes_df = get_file_changes()

```

---

## 📊 Data Model

The CLI generates two primary tables linked by the `SHA` (Commit ID).

| Table | Purpose | Key Columns |
| --- | --- | --- |
| **commits_fact.csv** | High-level "Who, When, What" | `SHA`, `Author`, `Date`, `Subject` |
| **file_changes_fact.csv** | Granular "Where and How Much" | `SHA`, `FilePath`, `Insertion`, `Deletion` |

---

## 📋 Recommended Power BI Setup

1. **Load:** Import both CSVs into Power BI Desktop.
2. **Relate:** Create a **One-to-Many** relationship from `commits_fact[SHA]` to `file_changes_fact[SHA]`.
3. **Analyze:** Use a **Treemap** visual with `FilePath` for size (by Insertions) to identify the most active parts of your codebase.

---

## License

Distributed under the MIT License. See `LICENSE` for more information.

---

## ✨ Contributors

* **George Bennett** - City of Memphis Wastewater
