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

Adding dbt_packages when dbt_deps is False #730

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cosmos/dbt/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
DBT_LOG_DIR_NAME,
DBT_TARGET_DIR_NAME,
)
from cosmos.config import RenderConfig
from contextlib import contextmanager
from typing import Generator


def create_symlinks(project_path: Path, tmp_dir: Path) -> None:
"""Helper function to create symlinks to the dbt project files."""
ignore_paths = (DBT_LOG_DIR_NAME, DBT_TARGET_DIR_NAME, "dbt_packages", "profiles.yml")
ignore_paths = [DBT_LOG_DIR_NAME, DBT_TARGET_DIR_NAME, "profiles.yml"]
if RenderConfig.dbt_deps is False:
ignore_paths.append("dbt_packages")

Check warning on line 18 in cosmos/dbt/project.py

View check run for this annotation

Codecov / codecov/patch

cosmos/dbt/project.py#L18

Added line #L18 was not covered by tests
DanMawdsleyBA marked this conversation as resolved.
Show resolved Hide resolved
for child_name in os.listdir(project_path):
if child_name not in ignore_paths:
os.symlink(project_path / child_name, tmp_dir / child_name)
Expand Down
Loading