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

Add Behavior Flag Framework #183

Merged
merged 17 commits into from
Sep 6, 2024
Merged

Add Behavior Flag Framework #183

merged 17 commits into from
Sep 6, 2024

Conversation

mikealfare
Copy link
Contributor

@mikealfare mikealfare commented Aug 8, 2024

resolves #178

Description

Add Behavior Flag Framework to dbt-common in alignment with RFC-78.

Checklist

@mikealfare mikealfare requested a review from a team as a code owner August 8, 2024 23:36
@cla-bot cla-bot bot added the cla:yes label Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

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.

@mikealfare mikealfare self-assigned this Aug 8, 2024
@@ -140,6 +141,7 @@ show_error_codes = true
disable_error_code = "attr-defined" # TODO: revisit once other mypy errors resolved
disallow_untyped_defs = false # TODO: add type annotations everywhere
warn_redundant_casts = true
ignore_missing_imports = true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

mypy was looking for pytest_mock types.

@mikealfare mikealfare changed the title dd behavior flag framework Add Behavior Flag Framework Aug 8, 2024
@mikealfare mikealfare marked this pull request as draft August 8, 2024 23:39
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 57.02479% with 52 lines in your changes missing coverage. Please review.

Project coverage is 65.08%. Comparing base (35af654) to head (9f07b2b).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
dbt_common/events/types_pb2.py 4.16% 46 Missing ⚠️
dbt_common/behavior_flags.py 94.23% 3 Missing ⚠️
dbt_common/events/types.py 90.00% 2 Missing ⚠️
dbt_common/__about__.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #183      +/-   ##
==========================================
+ Coverage   64.45%   65.08%   +0.63%     
==========================================
  Files          51       52       +1     
  Lines        3249     3325      +76     
==========================================
+ Hits         2094     2164      +70     
- Misses       1155     1161       +6     
Flag Coverage Δ
unit 65.08% <57.02%> (+0.63%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

dbt_common/behavior_flags.py Outdated Show resolved Hide resolved
dbt_common/behavior_flags.py Outdated Show resolved Hide resolved
@@ -1 +1 @@
version = "1.7.0"
version = "1.8.0a1"
Copy link
Contributor Author

@mikealfare mikealfare Aug 24, 2024

Choose a reason for hiding this comment

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

If I don't do this, hatch will not install this branch when testing in dbt-adapters since the version on this branch matches what's in PyPI. This will become 1.8.0 at some point so this feels right.

@mikealfare mikealfare marked this pull request as ready for review September 4, 2024 22:56
]
per-file-ignores = ["*/__init__.py: F401"]
per-file-ignores = ["*/__init__.py: F401", "*/conftest.py: F401"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

pytest fixtures get registered by importing them into conftest.py. They do not need to be used in that file.

@peterallenwebb
Copy link
Contributor

Looks good.

@mikealfare mikealfare added this pull request to the merge queue Sep 6, 2024
Merged via the queue into main with commit ce09ad3 Sep 6, 2024
20 checks passed
@mikealfare mikealfare deleted the behavior-flags branch September 6, 2024 19:33
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.

[Behavior Flags] Add Behavior Flag Framework to dbt-common
4 participants