dbt-bouncer 1.30.0__tar.gz → 1.31.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/PKG-INFO +2 -3
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/pyproject.toml +2 -3
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_models.py +42 -1
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/config_file_validator.py +2 -2
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/version.py +1 -1
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/LICENSE +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/README.md +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/__init__.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/README.md +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/catalog_latest.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/manifest_latest.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/run_results_latest.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/parsers_catalog.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/parsers_common.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/parsers_manifest.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/parsers_run_results.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/check_base.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/catalog/check_catalog_sources.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/catalog/check_columns.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/common.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_exposures.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_lineage.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_macros.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_metadata.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_semantic_models.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_snapshots.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_sources.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_unit_tests.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/run_results/check_run_results.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/config_file_parser.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/logger.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/main.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/runner.py +0 -0
- {dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: dbt-bouncer
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.31.0
|
|
4
4
|
Summary: Configure and enforce conventions for your dbt project.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: python,cli,dbt,CI/CD
|
|
@@ -18,15 +18,14 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
18
18
|
Requires-Dist: click (<9)
|
|
19
19
|
Requires-Dist: dbt-artifacts-parser (>=0.8)
|
|
20
20
|
Requires-Dist: h11 (>=0.16.0)
|
|
21
|
+
Requires-Dist: jellyfish (>=1,<2)
|
|
21
22
|
Requires-Dist: jinja2 (>=3,<4)
|
|
22
23
|
Requires-Dist: jinja2-simple-tags (<1)
|
|
23
|
-
Requires-Dist: levenshtein (>=0.26.1,<0.27.3)
|
|
24
24
|
Requires-Dist: packaging (<25)
|
|
25
25
|
Requires-Dist: poetry (>=2.0.1,<3.0.0)
|
|
26
26
|
Requires-Dist: progress
|
|
27
27
|
Requires-Dist: pydantic (>=2,<3)
|
|
28
28
|
Requires-Dist: pyyaml (<7)
|
|
29
|
-
Requires-Dist: rapidfuzz (<3.14.0)
|
|
30
29
|
Requires-Dist: requests (>=2,<3)
|
|
31
30
|
Requires-Dist: semver (<4)
|
|
32
31
|
Requires-Dist: tabulate (<1)
|
|
@@ -12,14 +12,13 @@ dependencies =[
|
|
|
12
12
|
"click (<9)",
|
|
13
13
|
"dbt-artifacts-parser (>=0.8)",
|
|
14
14
|
"h11 (>=0.16.0)", # To fix security warning
|
|
15
|
+
"jellyfish (>=1,<2)",
|
|
15
16
|
"jinja2 (>=3,<4)",
|
|
16
17
|
"jinja2-simple-tags (<1)",
|
|
17
|
-
"levenshtein (>=0.26.1,<0.27.3)",
|
|
18
18
|
"packaging (<25)",
|
|
19
19
|
"progress",
|
|
20
20
|
"pydantic (>=2,<3)",
|
|
21
21
|
"pyyaml (<7)",
|
|
22
|
-
"rapidfuzz (<3.14.0)",
|
|
23
22
|
"requests (>=2,<3)",
|
|
24
23
|
"tabulate (<1)",
|
|
25
24
|
"toml (<1)",
|
|
@@ -39,7 +38,7 @@ name = "dbt-bouncer"
|
|
|
39
38
|
readme = "README.md"
|
|
40
39
|
repository = "https://github.com/godatadriven/dbt-bouncer"
|
|
41
40
|
requires-python = ">=3.11,<3.14"
|
|
42
|
-
version = "1.
|
|
41
|
+
version = "1.31.0"
|
|
43
42
|
|
|
44
43
|
[project.scripts]
|
|
45
44
|
dbt-bouncer = "dbt_bouncer.main:cli"
|
|
@@ -414,6 +414,47 @@ class CheckModelDocumentedInSameDirectory(BaseCheck):
|
|
|
414
414
|
)
|
|
415
415
|
|
|
416
416
|
|
|
417
|
+
class CheckModelFileName(BaseCheck):
|
|
418
|
+
r"""Models must have a file name that matches the supplied regex.
|
|
419
|
+
|
|
420
|
+
Parameters:
|
|
421
|
+
file_name_pattern (str): Regexp the file name must match. Please account for the `.sql` extension.
|
|
422
|
+
|
|
423
|
+
Receives:
|
|
424
|
+
model (DbtBouncerModelBase): The DbtBouncerModelBase object to check.
|
|
425
|
+
|
|
426
|
+
Other Parameters:
|
|
427
|
+
description (Optional[str]): Description of what the check does and why it is implemented.
|
|
428
|
+
exclude (Optional[str]): Regex pattern to match the model path. Model paths that match the pattern will not be checked.
|
|
429
|
+
include (Optional[str]): Regex pattern to match the model path. Only model paths that match the pattern will be checked.
|
|
430
|
+
materialization (Optional[Literal["ephemeral", "incremental", "table", "view"]]): Limit check to models with the specified materialization.
|
|
431
|
+
severity (Optional[Literal["error", "warn"]]): Severity level of the check. Default: `error`.
|
|
432
|
+
|
|
433
|
+
Example(s):
|
|
434
|
+
```yaml
|
|
435
|
+
manifest_checks:
|
|
436
|
+
- name: check_model_file_name
|
|
437
|
+
description: Marts must include the model version in their file name.
|
|
438
|
+
include: ^models/marts
|
|
439
|
+
file_name_pattern: .*(v[0-9])\.sql$
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
"""
|
|
443
|
+
|
|
444
|
+
file_name_pattern: str
|
|
445
|
+
model: "DbtBouncerModelBase" = Field(default=None)
|
|
446
|
+
name: Literal["check_model_file_name"]
|
|
447
|
+
|
|
448
|
+
def execute(self) -> None:
|
|
449
|
+
"""Execute the check."""
|
|
450
|
+
file_name = self.model.original_file_path.split("/")[-1]
|
|
451
|
+
assert (
|
|
452
|
+
re.compile(self.file_name_pattern.strip()).match(file_name) is not None
|
|
453
|
+
), (
|
|
454
|
+
f"`{get_clean_model_name(self.model.unique_id)}` is in a file that does not match the supplied regex `{self.file_name_pattern.strip()}`."
|
|
455
|
+
)
|
|
456
|
+
|
|
457
|
+
|
|
417
458
|
class CheckModelGrantPrivilege(BaseCheck):
|
|
418
459
|
"""Model can have grant privileges that match the specified pattern.
|
|
419
460
|
|
|
@@ -1181,7 +1222,7 @@ class CheckModelNames(BaseCheck):
|
|
|
1181
1222
|
re.compile(self.model_name_pattern.strip()).match(self.model.name)
|
|
1182
1223
|
is not None
|
|
1183
1224
|
), (
|
|
1184
|
-
f"`{get_clean_model_name(self.model.unique_id)}` does not match the supplied regex `{self.model_name_pattern.strip()}
|
|
1225
|
+
f"`{get_clean_model_name(self.model.unique_id)}` does not match the supplied regex `{self.model_name_pattern.strip()}`."
|
|
1185
1226
|
)
|
|
1186
1227
|
|
|
1187
1228
|
|
|
@@ -271,7 +271,7 @@ def validate_conf(
|
|
|
271
271
|
try:
|
|
272
272
|
return DbtBouncerConf(**config_file_contents)
|
|
273
273
|
except ValidationError as e:
|
|
274
|
-
|
|
274
|
+
import jellyfish
|
|
275
275
|
|
|
276
276
|
error_message: List[str] = []
|
|
277
277
|
for error in e.errors():
|
|
@@ -290,7 +290,7 @@ def validate_conf(
|
|
|
290
290
|
].split("', '")
|
|
291
291
|
min_dist = 100
|
|
292
292
|
for name in accepted_names:
|
|
293
|
-
dist =
|
|
293
|
+
dist = jellyfish.levenshtein_distance(name, incorrect_name)
|
|
294
294
|
if dist < min_dist:
|
|
295
295
|
min_dist = dist
|
|
296
296
|
min_name = name
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/parsers_catalog.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/parsers_common.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/parsers_manifest.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/artifact_parsers/parsers_run_results.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/catalog/check_catalog_sources.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_exposures.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_semantic_models.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_snapshots.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/manifest/check_unit_tests.py
RENAMED
|
File without changes
|
{dbt_bouncer-1.30.0 → dbt_bouncer-1.31.0}/src/dbt_bouncer/checks/run_results/check_run_results.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|