Metadata-Version: 2.4
Name: bkm
Version: 0.0.0
Summary: BKM (Best Known Method) DAG generator for wafer process flows
Author: yRocket
License: MIT
Project-URL: Homepage, https://github.com/yrocket/bkm
Project-URL: Issues, https://github.com/yrocket/bkm/issues
Keywords: bkm,wafer,semiconductor,dag,process-flow
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.5
Requires-Dist: networkx>=2.8
Requires-Dist: tqdm>=4.60
Requires-Dist: pyarrow>=10.0
Provides-Extra: viz
Requires-Dist: graphviz>=0.20; extra == "viz"
Dynamic: license-file

# bkm

**BKM (Best Known Method) DAG generator for wafer process flows.**

Build, validate, fingerprint, and match Directed Acyclic Graphs that describe
semiconductor wafer process flows from parquet data.

## Installation

```bash
pip install bkm
pip install bkm[viz]   # with graphviz rendering
```

## Quick start (Python API)

```python
from bkm import BKM

bkm = BKM(
    version="v1",
    process_data={
        "in": ["a"],
        "a":  ["b", "c"],
        "b":  ["out"],
        "c":  ["out"],
    },
)

print(bkm.fingerprint())
print(bkm.print_graph())
bkm.save("v1.json")
```

## CLI usage (`bkm-generator`)

Process all parquet files in a folder and assign BKM versions:

```bash
bkm-generator --data_folder ./training_data --update
```

Subsequent runs assign wafers to existing BKMs and flag unmatched as `unknown`:

```bash
bkm-generator --data_folder ./new_data
```

## Documentation

- `bkm.md` — `BKM` class API, DAG concepts, edge inference algorithm
- `bkm_generator.md` — multi-BKM registry, loaf composition, CLI pipeline

## License

MIT © 2026 yRocket
