Metadata-Version: 2.4
Name: dbt-tester
Version: 0.1.0
Summary: Static analysis and health report generator for dbt projects
Author-email: Vinoth J <career.vinothj@gmail.com>
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: jinja2>=3.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Dynamic: license-file

# dbt-tester

`dbt-tester` is a lightweight static analysis tool that inspects dbt projects without running dbt itself. It scans your models, schema YAML files, and compiled manifest metadata to catch missing documentation, test coverage gaps, naming inconsistencies, and lineage issues. The CLI outputs results in the terminal or exports shareable HTML/JSON reports, making it easy to embed into CI pipelines.

## Features
- Discovers all models, sources, and tests in a dbt project directory
- Plug-in style check engine grouped by models, tests, docs, lineage, and sources
- Console, HTML, and JSON reporters with severity levels
- Configurable failure threshold for CI/CD
- Simple to extend with custom checks

## Quick start

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
dbt-tester run path/to/dbt_project --format console
```

- Quotes are required when the project path contains spaces: `dbt-tester run "/home/me/dbt project" --format console`.
- Use `--format html --output report.html` to produce a shareable artifact (`.html`), or `--format json --output findings.json` for automation payloads.
- Control CI failure behavior with `--fail-on error|warning`; defaults to `error`.

## Common commands

| Purpose | Command |
| --- | --- |
| Install for development | `pip install -e .[dev]` |
| Run unit tests | `pytest` |
| Scan current directory | `dbt-tester run . --format console` |
| Export HTML report | `dbt-tester run . --format html --output dbt_report.html` |
| Export JSON report | `dbt-tester run . --format json --output dbt_report.json` |
| Enforce zero warnings in CI | `dbt-tester run . --fail-on warning` |

## Development

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
pytest
```

To ship the package:

```bash
python -m build
twine upload dist/*
```

## License

MIT
