From b692bfce25af84c73248a8380bd6c2eadcebfaf5 Mon Sep 17 00:00:00 2001 From: Rex Ledesma Date: Thu, 1 Feb 2024 14:47:50 -0500 Subject: [PATCH] refactor(dbt): move scaffold to subdirectory --- python_modules/libraries/dagster-dbt/dagster_dbt/cli/app.py | 4 ++-- .../libraries/dagster-dbt/dagster_dbt/include/__init__.py | 3 --- .../dagster_dbt/include/starter_project/__init__.py | 3 +++ .../include/{ => starter_project}/pyproject.toml.jinja | 0 .../include/{ => starter_project}/scaffold/__init__.py.jinja | 0 .../include/{ => starter_project}/scaffold/assets.py.jinja | 0 .../include/{ => starter_project}/scaffold/constants.py.jinja | 0 .../{ => starter_project}/scaffold/definitions.py.jinja | 0 .../include/{ => starter_project}/scaffold/schedules.py.jinja | 0 .../dagster_dbt/include/{ => starter_project}/setup.py.jinja | 0 10 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/__init__.py rename python_modules/libraries/dagster-dbt/dagster_dbt/include/{ => starter_project}/pyproject.toml.jinja (100%) rename python_modules/libraries/dagster-dbt/dagster_dbt/include/{ => starter_project}/scaffold/__init__.py.jinja (100%) rename python_modules/libraries/dagster-dbt/dagster_dbt/include/{ => starter_project}/scaffold/assets.py.jinja (100%) rename python_modules/libraries/dagster-dbt/dagster_dbt/include/{ => starter_project}/scaffold/constants.py.jinja (100%) rename python_modules/libraries/dagster-dbt/dagster_dbt/include/{ => starter_project}/scaffold/definitions.py.jinja (100%) rename python_modules/libraries/dagster-dbt/dagster_dbt/include/{ => starter_project}/scaffold/schedules.py.jinja (100%) rename python_modules/libraries/dagster-dbt/dagster_dbt/include/{ => starter_project}/setup.py.jinja (100%) diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/cli/app.py b/python_modules/libraries/dagster-dbt/dagster_dbt/cli/app.py index 88942cb954373..a35e5a0b89a72 100644 --- a/python_modules/libraries/dagster-dbt/dagster_dbt/cli/app.py +++ b/python_modules/libraries/dagster-dbt/dagster_dbt/cli/app.py @@ -11,7 +11,7 @@ from rich.syntax import Syntax from typing_extensions import Annotated -from ..include import STARTER_PROJECT_PATH +from ..include.starter_project import DAGSTER_DBT_STARTER_PROJECT_PATH from ..version import __version__ as dagster_dbt_version app = typer.Typer( @@ -121,7 +121,7 @@ def copy_scaffold( for target in profile["outputs"].values() ] - shutil.copytree(src=STARTER_PROJECT_PATH, dst=dagster_project_dir) + shutil.copytree(src=DAGSTER_DBT_STARTER_PROJECT_PATH, dst=dagster_project_dir) dagster_project_dir.joinpath("__init__.py").unlink() if use_dbt_project_package_data_dir: diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/__init__.py b/python_modules/libraries/dagster-dbt/dagster_dbt/include/__init__.py index 763d150f5d373..e69de29bb2d1d 100644 --- a/python_modules/libraries/dagster-dbt/dagster_dbt/include/__init__.py +++ b/python_modules/libraries/dagster-dbt/dagster_dbt/include/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -STARTER_PROJECT_PATH = Path(__file__).joinpath("..").resolve() diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/__init__.py b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/__init__.py new file mode 100644 index 0000000000000..0cbc340039197 --- /dev/null +++ b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/__init__.py @@ -0,0 +1,3 @@ +from pathlib import Path + +DAGSTER_DBT_STARTER_PROJECT_PATH = Path(__file__).joinpath("..").resolve() diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/pyproject.toml.jinja b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/pyproject.toml.jinja similarity index 100% rename from python_modules/libraries/dagster-dbt/dagster_dbt/include/pyproject.toml.jinja rename to python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/pyproject.toml.jinja diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/__init__.py.jinja b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/__init__.py.jinja similarity index 100% rename from python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/__init__.py.jinja rename to python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/__init__.py.jinja diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/assets.py.jinja b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/assets.py.jinja similarity index 100% rename from python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/assets.py.jinja rename to python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/assets.py.jinja diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/constants.py.jinja b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/constants.py.jinja similarity index 100% rename from python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/constants.py.jinja rename to python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/constants.py.jinja diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/definitions.py.jinja b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/definitions.py.jinja similarity index 100% rename from python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/definitions.py.jinja rename to python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/definitions.py.jinja diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/schedules.py.jinja b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/schedules.py.jinja similarity index 100% rename from python_modules/libraries/dagster-dbt/dagster_dbt/include/scaffold/schedules.py.jinja rename to python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/scaffold/schedules.py.jinja diff --git a/python_modules/libraries/dagster-dbt/dagster_dbt/include/setup.py.jinja b/python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/setup.py.jinja similarity index 100% rename from python_modules/libraries/dagster-dbt/dagster_dbt/include/setup.py.jinja rename to python_modules/libraries/dagster-dbt/dagster_dbt/include/starter_project/setup.py.jinja