From bf5dd3a814f455e6e4e6b611f45b24c765950cc6 Mon Sep 17 00:00:00 2001 From: Alf Lervag Date: Mon, 18 May 2020 14:08:52 +0200 Subject: [PATCH] Updated tests and changelog --- CHANGELOG.md | 3 ++- .../integration/029_docs_generate_tests/test_docs_generate.py | 4 +++- test/unit/test_contracts_graph_parsed.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08d4e2e8adf..1c00455edda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - Added warning to nodes selector if nothing was matched ([#2115](https://github.com/fishtown-analytics/dbt/issues/2115), [#2343](https://github.com/fishtown-analytics/dbt/pull/2343)) - Suport column descriptions for BigQuery models ([#2335](https://github.com/fishtown-analytics/dbt/issues/2335), [#2402](https://github.com/fishtown-analytics/dbt/pull/2402)) - Added BigQuery option maximum_bytes_billed to set an upper limit for query costs ([#2346](https://github.com/fishtown-analytics/dbt/issues/2346), [#2427](https://github.com/fishtown-analytics/dbt/pull/2427)) +- Added a "docs" field to macros, with a "show" subfield to allow for hiding macros from the documentation site ([#2430](https://github.com/fishtown-analytics/dbt/issues/2430)) ### Fixes - When tracking is disabled due to errors, do not reset the invocation ID ([#2398](https://github.com/fishtown-analytics/dbt/issues/2398), [#2400](https://github.com/fishtown-analytics/dbt/pull/2400)) @@ -43,7 +44,7 @@ Contributors: - [@mikaelene](https://github.com/mikaelene) [#2414](https://github.com/fishtown-analytics/dbt/pull/2414) - [@raalsky](https://github.com/Raalsky) ([#2343](https://github.com/fishtown-analytics/dbt/pull/2343)) - [@haukeduden](https://github.com/haukeduden) ([#2427](https://github.com/fishtown-analytics/dbt/pull/2427)) - - [@alf-mindshift](https://github.com/alf-mindshift) ([docs#90](https://github.com/fishtown-analytics/dbt-docs/pull/90)) + - [@alf-mindshift](https://github.com/alf-mindshift) ([docs#90](https://github.com/fishtown-analytics/dbt-docs/pull/90), [#2431](https://github.com/fishtown-analytics/dbt/pull/2431) ## dbt 0.17.0b1 (May 5, 2020) diff --git a/test/integration/029_docs_generate_tests/test_docs_generate.py b/test/integration/029_docs_generate_tests/test_docs_generate.py index 8cf96e0575a..9eeea700e60 100644 --- a/test/integration/029_docs_generate_tests/test_docs_generate.py +++ b/test/integration/029_docs_generate_tests/test_docs_generate.py @@ -843,7 +843,7 @@ def _verify_generic_macro_structure(self, manifest): 'path', 'original_file_path', 'package_name', 'root_path', 'name', 'unique_id', 'tags', 'resource_type', 'depends_on', 'meta', 'description', 'patch_path', 'arguments', - 'macro_sql', + 'macro_sql', 'docs' } ) # Don't compare the sql, just make sure it exists @@ -869,6 +869,7 @@ def _verify_generic_macro_structure(self, manifest): 'resource_type': 'macro', 'depends_on': {'macros': []}, 'description': '', + 'docs': {'show': True}, 'patch_path': None, 'meta': {}, 'arguments': [], @@ -1689,6 +1690,7 @@ def expected_postgres_references_manifest(self, model_database=None): 'name': 'test_nothing', 'depends_on': {'macros': []}, 'description': 'My custom test that I wrote that does nothing', + 'docs': {'show': True}, 'macro_sql': AnyStringWith('macro test_nothing'), 'original_file_path': self.dir('macros/dummy_test.sql'), 'path': self.dir('macros/dummy_test.sql'), diff --git a/test/unit/test_contracts_graph_parsed.py b/test/unit/test_contracts_graph_parsed.py index dace3716bbb..6324a3e4639 100644 --- a/test/unit/test_contracts_graph_parsed.py +++ b/test/unit/test_contracts_graph_parsed.py @@ -1204,6 +1204,7 @@ def _ok_dict(self): 'depends_on': {'macros': []}, 'meta': {}, 'description': 'my macro description', + 'docs': {'show': True}, 'arguments': [], }