Metadata-Version: 2.4
Name: tqlint
Version: 0.4.2
Summary: tq inspects a codebase's tests and enforces quality rules so tests remain discoverable, focused, actionable, and maintainable
Keywords: testing,lint,pytest,quality,developer-tools
Author: Stephen Lewis
Author-email: Stephen Lewis <31178492+stelewis@users.noreply.github.com>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Dist: click>=8.3.1
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rich>=14.3.2
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/stelewis/tq
Project-URL: Repository, https://github.com/stelewis/tq
Project-URL: Issues, https://github.com/stelewis/tq/issues
Project-URL: Changelog, https://github.com/stelewis/tq/blob/main/CHANGELOG.md
Description-Content-Type: text/markdown

# `tq` - Test Quality Toolkit

`tq` inspects a codebase's tests and enforces quality rules so tests remain discoverable, focused, actionable, and maintainable.

## Installation

PyPI distribution name: `tqlint`

Add to a project:

```sh
uv add --dev tqlint
uv run tq check
```

Run without installing (ephemeral):

```sh
uvx tqlint check
```

Install as a persistent global tool:

```sh
uv tool install tqlint
tq check
```

Note: `uvx tq check` is not available because the `tq` package name on PyPI is owned by another project.

## Current scope

`tq` currently analyzes Python source and Python tests (`.py`) only.

## Usage

Run checks:

```sh
uv run tq check
```

Emit machine-readable diagnostics:

```sh
uv run tq check --output-format json
```

## Configuration

Configure `tq` in `pyproject.toml` under `[tool.tq]`:

```toml
[tool.tq]
package = "tq"
source_root = "src"
test_root = "tests"
ignore_init_modules = true
max_test_file_non_blank_lines = 600
qualifier_strategy = "allowlist"
allowed_qualifiers = ["regression"]
```

## Documentation

- See [docs/developer/tools/tq_check.md](docs/developer/tools/tq_check.md) for tool usage and configuration details.
- See [docs/developer/tools/rules.md](docs/developer/tools/rules.md) for built-in rules.

## Development

Contribution guidelines are in [CONTRIBUTING.md](CONTRIBUTING.md). For local development, follow below steps.

Install dependencies:

```sh
uv sync
```

Install pre-commit hooks (including `pre-commit`, `commit-msg`, and `pre-push`):

```sh
uv run prek install
```

Run tests:

```sh
uv run pytest -q
```
