Skip to content

Commit

Permalink
Merge pull request #329 from DataRecce/feature/drc-431-fix-replace-fa…
Browse files Browse the repository at this point in the history
…iled-from-recce-summary

[Fix] DRC-431 Fix recce summary wording
  • Loading branch information
kentwelcome authored May 20, 2024
2 parents e23e790 + 7b636f2 commit 1b873bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion recce/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def summary(state_file, **kwargs):
exit(1)

output = generate_markdown_summary(ctx, summary_format=kwargs.get('format'))
console.print(output)
print(output)


if __name__ == "__main__":
Expand Down
20 changes: 14 additions & 6 deletions recce/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def generate_markdown_summary(ctx, summary_format: str = 'markdown'):
else:
content += '''
## Lineage Graph
No changed module detected.
No changed module was detected.
'''
if check_content:
content += check_content
Expand All @@ -434,15 +434,23 @@ def generate_check_content(graph, check_statistics):
check_content = markdown_table(data).set_params(quote=False, row_sep='markdown').get_markdown()

if check_statistics.get('total', 0) > 0:
check_summary = markdown_table([{
'Total Checks': check_statistics.get('total', 0),
warning_message = ''
statistics = {
'Checks Run': check_statistics.get('total', 0),
'Data Mismatch Detected': check_statistics.get('mismatch', 0),
'Failed Checks': check_statistics.get('failed', 0),
}]).set_params(quote=False, row_sep='markdown').get_markdown()
}
if check_statistics.get('failed', 0) > 0:
statistics['Incomplete Checks'] = check_statistics.get('failed', 0)
warning_message = '''
:warning: **Incomplete Checks** refers to checks that did not successfully run due to configuration or SQL errors.
Please check the output of `recce run` for more information
'''
check_summary = markdown_table([statistics]).set_params(quote=False, row_sep='markdown').get_markdown()
content += f'''
## Checks Summary
{check_summary}
'''
{warning_message}
'''
if check_content:
content += f'''
### Checks of Data Mismatch Detected
Expand Down

0 comments on commit 1b873bb

Please sign in to comment.