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

[Feature] Add remaining enum constants to __init__ for direct import #1183

Closed
1 task done
fabiomx opened this issue Aug 31, 2024 · 0 comments · Fixed by #1184
Closed
1 task done

[Feature] Add remaining enum constants to __init__ for direct import #1183

fabiomx opened this issue Aug 31, 2024 · 0 comments · Fixed by #1184
Assignees
Labels
area:config Related to configuration, like YAML files, environment variables, or executer configuration enhancement New feature or request
Milestone

Comments

@fabiomx
Copy link
Contributor

fabiomx commented Aug 31, 2024

Description

A very minor change aimed at improving the developer experience. As mentioned here, certain constants from cosmos.constants, such as ExecutionMode, LoadMode, or TestBehavior, are already imported in the __init__ file to facilitate direct imports.

However, other constants are not currently included, which leads to an inconsistent import pattern when setting dbt configurations. I'm open to suggestions regarding which constants should be added, but I believe that it would be good to add the remaining enumerations: InvocationMode, TestIndirectSelection, SourceRenderingBehaviour, DbtResourceType.

Use case/motivation

Extend the usability by adding the remaining enum constants to the __init__ file for direct import. This will enhance consistency in imports and simplify usage for developers.

Related issues

No response

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!
@fabiomx fabiomx added enhancement New feature or request triage-needed Items need to be reviewed / assigned to milestone labels Aug 31, 2024
@dosubot dosubot bot added the area:config Related to configuration, like YAML files, environment variables, or executer configuration label Aug 31, 2024
pankajastro pushed a commit that referenced this issue Aug 31, 2024
A very minor change aimed at improving the developer experience. As
mentioned
[here](#1107 (comment)),
certain constants from `cosmos.constants`, such as `ExecutionMode`,
`LoadMode`, or `TestBehavior`, are already imported in the `__init__`
file to facilitate direct imports.

However, other constants are not currently included, which leads to an
inconsistent import pattern when setting dbt configurations.

This PR adds the remaining enumerations: `InvocationMode`,
`TestIndirectSelection`, `SourceRenderingBehaviour`, `DbtResourceType`.

Closes #1183
@pankajastro pankajastro added this to the Cosmos 1.7.0 milestone Aug 31, 2024
@pankajastro pankajastro removed the triage-needed Items need to be reviewed / assigned to milestone label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:config Related to configuration, like YAML files, environment variables, or executer configuration enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants