Metadata-Version: 2.4
Name: valedate
Version: 0.1.0b1
Summary: Pytest-friendly Vale harness and assertions for rule authors
Author-email: Payton McIntosh <pmcintosh@df12.net>
License: ISC
Project-URL: Homepage, https://df12.studio/docs.html
Project-URL: Repository, https://github.com/leynos/valedate
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: msgspec>=0.18.6
Dynamic: license-file

# valedate

Reusable Vale testing harness and pytest assertions for rule authors. The
package bundles the `Valedate` sandbox first introduced in `concordat-vale` so
you can lint fixtures against isolated, temporary styles trees without touching
your global Vale configuration.

## Requirements

- Python 3.10+
- A `vale` binary available on `PATH` (no mocks or stubs are provided)

## Quick start

```python
from valedate import Valedate, assert_has_diagnostic

ini = {
    "__root__": {"MinAlertLevel": "suggestion"},
    "[*.md]": {"BasedOnStyles": "Test"},
}

styles = {
    "Test/NoFoo.yml": """
        extends: existence
        message: "Avoid 'foo'."
        level: warning
        tokens:
          - foo
    """,
}

with Valedate(ini, styles=styles) as env:
    diags = env.lint("foo is discouraged")
    assert_has_diagnostic(diags, check="Test.NoFoo")
```

Run the test suite with `make test` to validate that your rules behave as Vale
reports them.
