Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render docs blocks in exposures #2920

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/dbt/contracts/graph/parsed.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,9 @@ class ParsedExposure(UnparsedBaseNode, HasUniqueID, HasFqn):
type: ExposureType
owner: ExposureOwner
resource_type: NodeType = NodeType.Exposure
description: str = ''
maturity: Optional[MaturityType] = None
url: Optional[str] = None
description: Optional[str] = None
depends_on: DependsOn = field(default_factory=DependsOn)
refs: List[List[str]] = field(default_factory=list)
sources: List[List[str]] = field(default_factory=list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ exposures:
- name: notebook_exposure
type: notebook
depends_on:
- ref('model')
- ref('second_model')
- ref('view_summary')
owner:
email: something@example.com
name: Some name
Expand Down
10 changes: 5 additions & 5 deletions test/integration/029_docs_generate_tests/test_docs_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False):
'macros': [],
'nodes': ['model.test.model', 'model.test.second_model']
},
'description': 'A description of the complex exposure',
'description': 'A description of the complex exposure\n',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like I saw a way to add an ignore-whitespace instruction somewhere, but am doing this for now

'fqn': ['test', 'notebook_exposure'],
'maturity': 'medium',
'name': 'notebook_exposure',
Expand All @@ -1594,7 +1594,7 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False):
'model.test.model'
],
},
'description': None,
'description': '',
'fqn': ['test', 'simple_exposure'],
'name': 'simple_exposure',
'original_file_path': self.dir('models/schema.yml'),
Expand Down Expand Up @@ -1996,20 +1996,20 @@ def expected_postgres_references_manifest(self, model_database=None):
'exposure.test.notebook_exposure': {
'depends_on': {
'macros': [],
'nodes': ['model.test.model', 'model.test.second_model']
'nodes': ['model.test.view_summary']
},
'description': 'A description of the complex exposure',
'fqn': ['test', 'notebook_exposure'],
'maturity': 'medium',
'name': 'notebook_exposure',
'original_file_path': self.dir('models/schema.yml'),
'original_file_path': 'models/schema.yml',
joellabes marked this conversation as resolved.
Show resolved Hide resolved
'owner': {
'email': 'something@example.com',
'name': 'Some name'
},
'package_name': 'test',
'path': 'schema.yml',
'refs': [['model'], ['second_model']],
'refs': [['view_summary']],
'resource_type': 'exposure',
'root_path': self.test_root_realpath,
'sources': [],
Expand Down
3 changes: 3 additions & 0 deletions test/unit/test_contracts_graph_parsed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,7 @@ def minimal_parsed_exposure_dict():
'path': 'models/something.yml',
'root_path': '/usr/src/app',
'original_file_path': 'models/something.yml',
'description': ''
}


Expand All @@ -2041,6 +2042,7 @@ def basic_parsed_exposure_dict():
'path': 'models/something.yml',
'root_path': '/usr/src/app',
'original_file_path': 'models/something.yml',
'description': ''
}


Expand All @@ -2056,6 +2058,7 @@ def basic_parsed_exposure_object():
root_path='/usr/src/app',
original_file_path='models/something.yml',
owner=ExposureOwner(email='test@example.com'),
description=''
)


Expand Down