Metadata-Version: 2.5
Name: tff-core
Version: 0.28.0
Summary: Core rules and fitness functions engine for transformation projects
Author-email: Bart Schuijt <schuijt.bart@gmail.com>
License: MIT
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.12
Requires-Dist: pydantic>=2.13.5
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: sqlglot>=23.0
Provides-Extra: dataform
Provides-Extra: dbt
Provides-Extra: sqlmesh
Requires-Dist: sqlmesh>=0.236.2; extra == 'sqlmesh'
Description-Content-Type: text/markdown

# tff-core

Core architectural linter and fitness function engine for data transformation pipelines.

`tff-core` executes layer boundary validation, structural graph policies, schema contracts, and duplicate logic detection across dbt, SQLMesh, and Google Cloud Dataform projects.

## Installation

Install `tff-core` with the adapter corresponding to your transformation engine:

```bash
# dbt adapter
pip install "tff-core[dbt]"

# SQLMesh adapter
pip install "tff-core[sqlmesh]"

# Dataform adapter
pip install "tff-core[dataform]"

# All adapters
pip install "tff-core[all]"
```

## Architecture

| Subsystem | Function & Scope |
| :--- | :--- |
| **AST & Semantic Parser** | Extracts AST nodes and semantic relationships using SQLGlot without database connections. |
| **Check Registry** | Unified execution harness evaluating layer integrity, syntax bans, and duplicate CTEs. |
| **Health Scoring** | Computes weighted quality metrics (0–100) and penalty distributions. |
| **Adapter Interface** | Normalizes project manifests and configurations across pipeline engines. |

## Documentation

For CLI usage, configuration specifications, and rule authoring, refer to the [main documentation](https://tff.readthedocs.io/) and the [tff repository](https://github.com/tjirab/tff).

## License

Distributed under the [MIT License](https://github.com/tjirab/tff/blob/main/LICENSE).
