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

Fix #9005: Allow singular tests to be documented in properties.yml #10744

Merged
merged 6 commits into from
Sep 24, 2024

Conversation

aranke
Copy link
Member

@aranke aranke commented Sep 19, 2024

Resolves #9005

Problem

Singular tests cannot be documented in YAML.

Solution

  • Create a new SingularTestPatchParser to parse patches for singular tests under the data_tests key in properties.yml
    • Test that description via doc block, error_if and meta work as expected
  • Add test path to source paths list so that properties.yml can be defined in the test path

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@cla-bot cla-bot bot added the cla:yes label Sep 19, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 86.56716% with 9 lines in your changes missing coverage. Please review.

Project coverage is 88.96%. Comparing base (db69473) to head (43164f7).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10744      +/-   ##
==========================================
- Coverage   88.97%   88.96%   -0.01%     
==========================================
  Files         181      181              
  Lines       22956    23019      +63     
==========================================
+ Hits        20424    20478      +54     
- Misses       2532     2541       +9     
Flag Coverage Δ
integration 86.14% <86.56%> (-0.01%) ⬇️
unit 62.36% <37.31%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.36% <37.31%> (-0.08%) ⬇️
Integration Tests 86.14% <86.56%> (-0.01%) ⬇️

@aranke aranke changed the title Fix #9005: Allow singular tests to be documented Fix #9005: Allow singular tests to be documented in properties.yml Sep 23, 2024
@aranke aranke marked this pull request as ready for review September 23, 2024 18:25
@aranke aranke requested a review from a team as a code owner September 23, 2024 18:25
@aranke aranke requested a review from gshank September 23, 2024 18:25
Copy link
Contributor

@gshank gshank left a comment

Choose a reason for hiding this comment

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

Looks good!

@aranke aranke added the user docs [docs.getdbt.com] Needs better documentation label Sep 24, 2024
@aranke aranke merged commit 3ac20ce into main Sep 24, 2024
70 of 71 checks passed
@aranke aranke deleted the fix_9005 branch September 24, 2024 12:15
@graciegoheen graciegoheen added the dbt tests Issues related to built-in dbt testing functionality label Sep 24, 2024
@dbeatty10
Copy link
Contributor

Reverted in #10790 and new PR in #10792.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes dbt tests Issues related to built-in dbt testing functionality user docs [docs.getdbt.com] Needs better documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-3323] Allow singular tests to be documented
4 participants