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

Change test_behavior and execution_mode to use Enum as opposed to Literals #379

Merged
merged 6 commits into from
Jul 23, 2023

Conversation

tatiana
Copy link
Collaborator

@tatiana tatiana commented Jul 21, 2023

Change DbtDag and DbtTaskGroup so they use Enum as opposed to Literal strings to represent the arguments:

  • test_behavior
  • execution_mode

This is a breaking change. Before:

DbtDag(..., execution_mode="kubernetes", test_behavior="after_all")

Now:

from cosmos import ExecutionMode, TestBehavior

DbtDag(..., execution_mode=ExecutionMode.kubernetes, test_behavior=TestBehavior.AFTER_ALL)

Closes #371

@netlify
Copy link

netlify bot commented Jul 21, 2023

👷 Deploy Preview for amazing-pothos-a3bca0 processing.

Name Link
🔨 Latest commit a4c350e
🔍 Latest deploy log https://app.netlify.com/sites/amazing-pothos-a3bca0/deploys/64bd041096cb340008ac91d1

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.28 🎉

Comparison is base (f52293e) 90.70% compared to head (a4c350e) 90.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #379      +/-   ##
==========================================
+ Coverage   90.70%   90.98%   +0.28%     
==========================================
  Files          44       45       +1     
  Lines        1484     1542      +58     
==========================================
+ Hits         1346     1403      +57     
- Misses        138      139       +1     
Impacted Files Coverage Δ
cosmos/__init__.py 100.00% <100.00%> (ø)
cosmos/airflow/graph.py 100.00% <100.00%> (ø)
cosmos/constants.py 100.00% <100.00%> (ø)
cosmos/converter.py 100.00% <100.00%> (ø)
cosmos/dbt/graph.py 100.00% <100.00%> (ø)
cosmos/dbt/parser/project.py 88.73% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tatiana tatiana marked this pull request as ready for review July 21, 2023 14:13
@tatiana tatiana requested a review from a team as a code owner July 21, 2023 14:13
@tatiana tatiana requested a review from a team July 21, 2023 14:13
@jlaneve
Copy link
Collaborator

jlaneve commented Jul 21, 2023

only comment here is to see if we can convert strings to enums in/before the converter so this isn't a breaking change. all current code looks good though!

Copy link
Collaborator

@jlaneve jlaneve left a comment

Choose a reason for hiding this comment

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

pre-emptively approving once the comment about converting strings to enums is addressed

@tatiana
Copy link
Collaborator Author

tatiana commented Jul 21, 2023

Thanks, @jlaneve , I'll address it!

@tatiana tatiana merged commit cdfa0dd into main Jul 23, 2023
38 checks passed
@tatiana tatiana deleted the issue-371-enum branch July 23, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

convert literals to enums
2 participants