Release Historyο
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning
1.1.0ο
Addedο
Support for
dbt-core1.5 and 1.7 or later.dbt-core1.6 is not supported as it requirespydanticv1.
Changedο
CLI args are now parsed with
pydantic-settings, a new dependency, in place ofargparseparsers. The CLI is also stricter:unknown args now fail with an error. Previously they were ignored, and the value of a mistyped option e.g.
--contracts modelswas silently used to filter files.options now need a value. Previously e.g. a bare
--profilewas allowed, which set it toNone.nullmay be given to unset an option e.g.--target null.
dbt-validatenow exits with code 1 when contracts fail without also printing a traceback.PathConditionnow matches paths using forward slashes as separators on every OS. Path patterns should use forward slashes e.g.models/staging, or be given as a list of path parts.
Fixedο
dbt_contracts.propertiesfailed with a circular import when imported beforedbt_contracts.contracts.Running the CLI module directly e.g.
python -m dbt_contracts.cli --operation validateno longer takes the operation as a file to filter on.has_expected_namenow accepts the documentednulldata type key for patterns which apply to all data types without their own patterns. Configs using it previously failed validation.PathConditionpatterns with regex escapes e.g..*\.sql$never matched on any OS, and directory patterns never matched Windows paths, as backslashes were double escaped in both patterns and paths.Validation now runs every term for each item. Previously, terms after the first failing term were skipped so their violations were never reported.
Release builds no longer report a dirty version when the README is sanitised for PyPI, so the default
versioningitformats are restored.
Documentationο
Linting now uses ruff instead of flake8.
The pre-commit guide now refers to the
.pre-commit-config.yamlfile that users configure, and the quick start describes where the contracts file is looked for and which formats are supported.Base classes in the API reference and its inheritance diagrams now link to their generic classes rather than showing pydanticβs parametrised classes e.g.
ContractTerm[TypeVar].Added
makecommands for development e.g.make test,make lintandmake check, and updated the contributing guide to use them withuv.Fixed docs build warnings and removed warning suppressions for Sphinx extensions which are not enabled.
Added an API reference with inheritance diagrams, generated by
sphinx.ext.autosummaryon every docs build. Packages now declare their public API in__all__so classes re-exported from private modules are documented.
1.0.9ο
Fixedο
Path separators in Windows paths were being intepreted as special characters when path filtering. All backslashes in paths are now double escaped to prevent issues with regex matching.
1.0.8ο
Fixedο
PathConditionnow excludes paths correctly
1.0.7ο
Changedο
Properties files now outputted with extra indentation for arrays
1.0.6ο
Fixedο
When selecting only a child contract with
dbt-validate, paths were not being set on parent contracts leading to overprocessing. Paths are now set correctly.
1.0.5ο
Fixedο
Paths were not assigned to runner when passed via CLI. Now passed as expected.
1.0.4ο
Fixedο
HasAllColumnswas not logging the correct extra columns. This is now fixed.
1.0.3ο
Changedο
Drop requirement for pre-release pydantic version
1.0.2ο
Fixedο
CLI functions now set logging to INFO by default. Results can now be viewed in terminal output.
1.0.1ο
Fixedο
Fixed the hooks IDs and added generate hook
1.0.0ο
Stable release! π
Complete redesign to improve modularity and performance
Add generators for properties generation from database objects