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

[Round 2] Fix #9005: Allow singular tests to be documented in properties.yml #10792

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

aranke
Copy link
Member

@aranke aranke commented Sep 27, 2024

Resolves #9005

Problem

Take 2 of #10744 that was reverted in #10790, accounting for scenario where customer has already used the data_tests YAML key.

Solution

Skip parsing and warn the user that the data_tests key is now used for data test documentation.

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 27, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

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

Project coverage is 89.17%. Comparing base (2ff3f20) to head (cdf5c26).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10792      +/-   ##
==========================================
+ Coverage   89.11%   89.17%   +0.06%     
==========================================
  Files         183      183              
  Lines       23288    23456     +168     
==========================================
+ Hits        20752    20916     +164     
- Misses       2536     2540       +4     
Flag Coverage Δ
integration 86.41% <86.76%> (+0.09%) ⬆️
unit 62.09% <41.17%> (-0.11%) ⬇️

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

Components Coverage Δ
Unit Tests 62.09% <41.17%> (-0.11%) ⬇️
Integration Tests 86.41% <86.76%> (+0.09%) ⬆️

@aranke aranke marked this pull request as ready for review September 30, 2024 14:06
@aranke aranke requested a review from a team as a code owner September 30, 2024 14:06
@aranke aranke requested a review from gshank September 30, 2024 14:07
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.

This looks good, but I do wonder if we might want to give a more detailed explanation in the warning, mentioning that "data_tests" is a newly parsed key? Or something...

@aranke aranke merged commit 5e9f1b5 into main Oct 1, 2024
65 of 66 checks passed
@aranke aranke deleted the fix_9005_2 branch October 1, 2024 07:05
dbeatty10 added a commit to dbt-labs/docs.getdbt.com that referenced this pull request Oct 1, 2024
Resolves #6132
Originally #6147

## What are you changing in this pull request and why?

The `description` property is available for singular data tests
beginning in dbt v1.9, and this PR highlights how singular tests can now
be documented.

### 🎩 Previews
-
[`description`](https://docs-getdbt-com-git-dbeatty-6132-docs-dbt-labs.vercel.app/reference/resource-properties/description)
-
[`docs-paths`](https://docs-getdbt-com-git-dbeatty-6132-docs-dbt-labs.vercel.app/reference/project-configs/docs-paths)
- [documentation
placement](https://docs-getdbt-com-git-dbeatty-6132-docs-dbt-labs.vercel.app/docs/build/documentation#placement)

### Additional information

Opened #6193 since we
don't have documentation how to add a `description` for the Jinja macro
associated with custom generic tests. This follow-up will allow us to
consider the `description` of both generic and singular data tests in
context of each other.


## Checklist
- [x] I have reviewed the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [x] The topic I'm writing about is for specific dbt version(s) and I
have versioned it according to the [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and/or [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content)
guidelines.
- [x] Wait until dbt-labs/dbt-core#10792 is
merged
- [x] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)

---------

Co-authored-by: Natalie Fiann <Natalie.Fiann@dbtlabs.com>
Co-authored-by: nataliefiann <120089939+nataliefiann@users.noreply.github.com>
Co-authored-by: Mirna Wong <89008547+mirnawong1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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