From 343983815a86870377f4f81bb206076d56c6efb9 Mon Sep 17 00:00:00 2001 From: z3z1ma Date: Sun, 5 May 2024 11:12:33 -0700 Subject: [PATCH] chore: format, update changelog, and trigger release --- .changes/0.12.10.md | 3 +++ CHANGELOG.md | 4 ++++ src/dbt_osmosis/main.py | 12 +++--------- tests/test_column_level_knowledge_propagator.py | 2 ++ 4 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 .changes/0.12.10.md diff --git a/.changes/0.12.10.md b/.changes/0.12.10.md new file mode 100644 index 0000000..a510716 --- /dev/null +++ b/.changes/0.12.10.md @@ -0,0 +1,3 @@ +## 0.12.10 - 2024-05-05 +### Added +* New --add-inheritance-for-specified-keys flag to allow inheriting arbitrary keys from model node diff --git a/CHANGELOG.md b/CHANGELOG.md index a252677..cbdac76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## 0.12.10 - 2024-05-05 +### Added +* New --add-inheritance-for-specified-keys flag to allow inheriting arbitrary keys from model node + ## 0.12.9 - 2024-04-07 ### Changed * update setup python and checkout action in ci workflow diff --git a/src/dbt_osmosis/main.py b/src/dbt_osmosis/main.py index e9cd3e4..f655001 100644 --- a/src/dbt_osmosis/main.py +++ b/src/dbt_osmosis/main.py @@ -181,9 +181,7 @@ def wrapper(*args, **kwargs): "--add-inheritance-for-specified-keys", multiple=True, type=click.STRING, - help=( - "If specified, will add inheritance for the specified keys." - ) + help="If specified, will add inheritance for the specified keys.", ) @click.argument("models", nargs=-1) def refactor( @@ -321,9 +319,7 @@ def refactor( "--add-inheritance-for-specified-keys", multiple=True, type=click.STRING, - help=( - "If specified, will add inheritance for the specified keys." - ) + help="If specified, will add inheritance for the specified keys.", ) @click.argument("models", nargs=-1) def organize( @@ -478,9 +474,7 @@ def organize( "--add-inheritance-for-specified-keys", multiple=True, type=click.STRING, - help=( - "If specified, will add inheritance for the specified keys." - ) + help="If specified, will add inheritance for the specified keys.", ) @click.argument("models", nargs=-1) def document( diff --git a/tests/test_column_level_knowledge_propagator.py b/tests/test_column_level_knowledge_propagator.py index 69755e8..efc6fe7 100644 --- a/tests/test_column_level_knowledge_propagator.py +++ b/tests/test_column_level_knowledge_propagator.py @@ -486,6 +486,7 @@ def test_update_undocumented_columns_with_prior_knowledge_add_progenitor_to_meta } assert set(target_node.columns["customer_id"].tags) == set(["my_tag1", "my_tag2"]) + def test_update_undocumented_columns_with_prior_knowledge_with_add_inheritance_for_specified_keys(): manifest = load_manifest() manifest.nodes["model.jaffle_shop_duckdb.stg_customers"].columns[ @@ -559,6 +560,7 @@ def test_update_undocumented_columns_with_prior_knowledge_with_add_inheritance_f ) assert set(target_node.columns["customer_id"]._extra["policy_tags"]) == set(["my_policy_tag1"]) + @pytest.mark.parametrize("use_unrendered_descriptions", [True, False]) def test_use_unrendered_descriptions(use_unrendered_descriptions): manifest = load_manifest()