dbt-bouncer 2.0.0rc1__tar.gz → 2.1.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-2.0.0rc1/src/dbt_bouncer.egg-info → dbt_bouncer-2.1.0}/PKG-INFO +3 -12
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/README.md +2 -11
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/pyproject.toml +1 -1
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/main.py +57 -13
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/version.py +1 -1
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0/src/dbt_bouncer.egg-info}/PKG-INFO +3 -12
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/LICENSE +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/setup.cfg +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/__init__.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/catalog_latest.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/manifest_latest.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/dbt_cloud/run_results_latest.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/parsers_catalog.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/parsers_common.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/parsers_manifest.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/parsers_run_results.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/check_base.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/catalog/check_catalog_sources.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/catalog/check_columns.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/common.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_exposures.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_lineage.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_macros.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_metadata.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_models.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_seeds.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_semantic_models.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_snapshots.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_sources.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_unit_tests.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/run_results/check_run_results.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/config_file_parser.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/config_file_validator.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/global_context.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/logger.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/runner.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/utils.py +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer.egg-info/SOURCES.txt +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer.egg-info/dependency_links.txt +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer.egg-info/entry_points.txt +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer.egg-info/requires.txt +0 -0
- {dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbt-bouncer
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Configure and enforce conventions for your dbt project.
|
|
5
5
|
Author-email: Padraic Slattery <pgoslatara@gmail.com>
|
|
6
6
|
Maintainer-email: Padraic Slattery <pgoslatara@gmail.com>
|
|
@@ -134,17 +134,8 @@ All documentation can be found on `dbt-bouncer` [documentation website](https://
|
|
|
134
134
|
|
|
135
135
|
1. Create a `dbt-bouncer.yml` config file:
|
|
136
136
|
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
- name: check_model_directories
|
|
140
|
-
include: ^models
|
|
141
|
-
permitted_sub_directories:
|
|
142
|
-
- intermediate
|
|
143
|
-
- marts
|
|
144
|
-
- staging
|
|
145
|
-
- name: check_model_names
|
|
146
|
-
include: ^models/staging
|
|
147
|
-
model_name_pattern: ^stg_
|
|
137
|
+
```shell
|
|
138
|
+
dbt-bouncer init
|
|
148
139
|
```
|
|
149
140
|
|
|
150
141
|
1. Run `dbt-bouncer`:
|
|
@@ -79,17 +79,8 @@ All documentation can be found on `dbt-bouncer` [documentation website](https://
|
|
|
79
79
|
|
|
80
80
|
1. Create a `dbt-bouncer.yml` config file:
|
|
81
81
|
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
- name: check_model_directories
|
|
85
|
-
include: ^models
|
|
86
|
-
permitted_sub_directories:
|
|
87
|
-
- intermediate
|
|
88
|
-
- marts
|
|
89
|
-
- staging
|
|
90
|
-
- name: check_model_names
|
|
91
|
-
include: ^models/staging
|
|
92
|
-
model_name_pattern: ^stg_
|
|
82
|
+
```shell
|
|
83
|
+
dbt-bouncer init
|
|
93
84
|
```
|
|
94
85
|
|
|
95
86
|
1. Run `dbt-bouncer`:
|
|
@@ -192,7 +192,7 @@ def run_bouncer(
|
|
|
192
192
|
return results[0]
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
@click.
|
|
195
|
+
@click.group(invoke_without_command=True)
|
|
196
196
|
@click.option(
|
|
197
197
|
"--config-file",
|
|
198
198
|
default=Path("dbt-bouncer.yml"),
|
|
@@ -246,15 +246,59 @@ def cli(
|
|
|
246
246
|
verbosity: int,
|
|
247
247
|
) -> None:
|
|
248
248
|
"""Entrypoint for dbt-bouncer."""
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
249
|
+
if ctx.invoked_subcommand is None:
|
|
250
|
+
config_file_source = ctx.get_parameter_source("config_file").name # type: ignore[union-attr]
|
|
251
|
+
exit_code = run_bouncer(
|
|
252
|
+
config_file=config_file,
|
|
253
|
+
create_pr_comment_file=create_pr_comment_file,
|
|
254
|
+
only=only,
|
|
255
|
+
output_file=output_file,
|
|
256
|
+
output_only_failures=output_only_failures,
|
|
257
|
+
show_all_failures=show_all_failures,
|
|
258
|
+
verbosity=verbosity,
|
|
259
|
+
config_file_source=config_file_source,
|
|
260
|
+
)
|
|
261
|
+
ctx.exit(exit_code)
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
@cli.command()
|
|
265
|
+
def init() -> None:
|
|
266
|
+
"""Create a basic dbt-bouncer.yml file.
|
|
267
|
+
|
|
268
|
+
Raises:
|
|
269
|
+
RuntimeError: If the config file already exists.
|
|
270
|
+
|
|
271
|
+
"""
|
|
272
|
+
config_content = """# dbt-bouncer configuration file
|
|
273
|
+
# This file is used to configure dbt-bouncer checks.
|
|
274
|
+
|
|
275
|
+
dbt_artifacts_dir: target # Directory where dbt artifacts (manifest.json, etc.) are located.
|
|
276
|
+
|
|
277
|
+
manifest_checks:
|
|
278
|
+
- name: check_model_description_populated
|
|
279
|
+
description: All models must have a description.
|
|
280
|
+
|
|
281
|
+
- name: check_model_names
|
|
282
|
+
description: Models in the staging layer should always start with "stg_".
|
|
283
|
+
include: ^models/staging
|
|
284
|
+
model_name_pattern: ^stg_
|
|
285
|
+
|
|
286
|
+
- name: check_model_has_unique_test
|
|
287
|
+
description: All models must have a unique test defined.
|
|
288
|
+
|
|
289
|
+
# Example: check that relies on `catalog.json` being present
|
|
290
|
+
# catalog_checks:
|
|
291
|
+
# - name: check_column_description_populated
|
|
292
|
+
# description: All columns in the marts layer must have a description.
|
|
293
|
+
# include: ^models/marts
|
|
294
|
+
"""
|
|
295
|
+
configure_console_logging(verbosity=0)
|
|
296
|
+
|
|
297
|
+
config_path = Path("dbt-bouncer.yml")
|
|
298
|
+
if config_path.exists():
|
|
299
|
+
raise RuntimeError(f"{config_path} already exists.")
|
|
300
|
+
|
|
301
|
+
with Path(config_path).open("w") as f:
|
|
302
|
+
f.write(config_content)
|
|
303
|
+
|
|
304
|
+
logging.info(f"Created `{config_path}`.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbt-bouncer
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Configure and enforce conventions for your dbt project.
|
|
5
5
|
Author-email: Padraic Slattery <pgoslatara@gmail.com>
|
|
6
6
|
Maintainer-email: Padraic Slattery <pgoslatara@gmail.com>
|
|
@@ -134,17 +134,8 @@ All documentation can be found on `dbt-bouncer` [documentation website](https://
|
|
|
134
134
|
|
|
135
135
|
1. Create a `dbt-bouncer.yml` config file:
|
|
136
136
|
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
- name: check_model_directories
|
|
140
|
-
include: ^models
|
|
141
|
-
permitted_sub_directories:
|
|
142
|
-
- intermediate
|
|
143
|
-
- marts
|
|
144
|
-
- staging
|
|
145
|
-
- name: check_model_names
|
|
146
|
-
include: ^models/staging
|
|
147
|
-
model_name_pattern: ^stg_
|
|
137
|
+
```shell
|
|
138
|
+
dbt-bouncer init
|
|
148
139
|
```
|
|
149
140
|
|
|
150
141
|
1. Run `dbt-bouncer`:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/parsers_catalog.py
RENAMED
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/parsers_common.py
RENAMED
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/parsers_manifest.py
RENAMED
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/artifact_parsers/parsers_run_results.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/catalog/check_catalog_sources.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_exposures.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_metadata.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_semantic_models.py
RENAMED
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_snapshots.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.0}/src/dbt_bouncer/checks/manifest/check_unit_tests.py
RENAMED
|
File without changes
|
{dbt_bouncer-2.0.0rc1 → dbt_bouncer-2.1.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|