Metadata-Version: 2.4
Name: minimindslab-path-parent-rank
Version: 0.1.0
Summary: Rank filesystem-like paths by depth from their parent count and return simple deterministic depth metrics for local path lists.
Author: MiniMindsLab
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# MiniMindsLab Path Parent Rank

`minimindslab-path-parent-rank` is a tiny pure-Python utility for ranking filesystem-like paths by parent depth.

It normalizes repeated separators and trailing slashes, then returns deterministic depth metrics over an input list.

## Features

- Pure Python (standard library only)
- Deterministic normalization and depth counting
- Helpful summary output for tooling and tests

## Quick example

```python
from minimindslab_path_parent_rank import summarize_paths

paths = [
    "a/b/c",
    "a//b/",
    "/root/data/file.txt",
]

summary = summarize_paths(paths)
print(summary["max_depth"])
print(summary["ranked_paths"])
```

## Returned summary keys

- `input_count`: number of input paths
- `unique_normalized_count`: number of unique normalized paths
- `max_depth`: maximum parent depth
- `min_depth`: minimum parent depth (0 for empty input)
- `average_depth`: arithmetic mean depth (0.0 for empty input)
- `ranked_paths`: list sorted by depth descending, then normalized path
  - each item has: `path`, `normalized_path`, `depth`

## Normalization rules

- Backslashes are treated as separators and converted to `/`
- Repeated separators collapse to a single `/`
- Trailing separators are removed (except root `/`)
- `.` segments are ignored
- `..` segments pop one prior segment when possible (never above root)

## License

MIT
