Skip to content

Commit

Permalink
Add enum constants to init for direct import (#1184)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabiomx authored Aug 31, 2024
1 parent 0db6d60 commit aa26fc3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cosmos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
ProjectConfig,
RenderConfig,
)
from cosmos.constants import ExecutionMode, LoadMode, TestBehavior
from cosmos.constants import (
DbtResourceType,
ExecutionMode,
InvocationMode,
LoadMode,
SourceRenderingBehavior,
TestBehavior,
TestIndirectSelection,
)
from cosmos.log import get_logger
from cosmos.operators.lazy_load import MissingPackage
from cosmos.operators.local import (
Expand Down Expand Up @@ -157,6 +165,10 @@
"ExecutionMode",
"LoadMode",
"TestBehavior",
"InvocationMode",
"TestIndirectSelection",
"SourceRenderingBehavior",
"DbtResourceType",
]

"""
Expand Down

0 comments on commit aa26fc3

Please sign in to comment.