Skip to content

Commit

Permalink
lint and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
maximearmstrong committed Jul 31, 2024
1 parent d0ffe65 commit 2124dff
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
import os

from dagster import Definitions
from dagster import Definitions, load_assets_from_package_module
from dagster_aws.s3 import S3Resource
from dagster_aws.s3.io_manager import S3PickleIOManager
from dagster_dbt import DbtCliResource
from dagster_pyspark import pyspark_resource

from .assets import (
activity_analytics,
core,
recommender,
dbt
)
from .assets import activity_analytics, core, dbt, recommender
from .constants import ACTIVITY_ANALYTICS, CORE, RECOMMENDER
from .jobs import activity_analytics_assets_sensor, core_assets_schedule, recommender_assets_sensor
from .project import dbt_project, DBT_PROJECT_DIR
from .project import DBT_PROJECT_DIR, dbt_project
from .resources.duckdb_parquet_io_manager import DuckDBPartitionedParquetIOManager
from .resources.hn_resource import HNAPIClient, HNAPISubsampleClient
from .resources.parquet_io_manager import LocalPartitionedParquetIOManager, S3PartitionedParquetIOManager
from .resources.parquet_io_manager import (
LocalPartitionedParquetIOManager,
S3PartitionedParquetIOManager,
)
from .resources.snowflake_io_manager import SnowflakeIOManager
from .sensors.slack_on_failure_sensor import make_slack_on_failure_sensor

from dagster import load_assets_from_package_module
from dagster_aws.s3 import S3Resource
from dagster_aws.s3.io_manager import S3PickleIOManager
from dagster_dbt import DbtCliResource
from dagster_pyspark import pyspark_resource


core_assets = load_assets_from_package_module(core, group_name=CORE)

activity_analytics_assets = load_assets_from_package_module(
Expand All @@ -32,10 +27,7 @@
group_name=ACTIVITY_ANALYTICS,
)

recommender_assets = load_assets_from_package_module(
recommender,
group_name=RECOMMENDER
)
recommender_assets = load_assets_from_package_module(recommender, group_name=RECOMMENDER)

dbt_assets = load_assets_from_package_module(dbt)

Expand All @@ -44,7 +36,6 @@
*recommender_assets,
*activity_analytics_assets,
*dbt_assets,

]

dbt_local_resource = DbtCliResource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from dagster_dbt import DbtProject


DBT_PROJECT_DIR = Path(__file__).joinpath("..", "..", "dbt_project").resolve()

dbt_project = DbtProject(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
import os

from dagster._utils import file_relative_path



DBT_PROJECT_DIR = file_relative_path(__file__, "../../dbt_project")
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from project_fully_featured import defs
from project_fully_featured.definitions import defs


def test_defs_can_load():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from pyspark.sql import Row, SparkSession
from pyspark.sql.types import IntegerType, StringType, StructField, StructType

from project_fully_featured.resources import SHARED_SNOWFLAKE_CONF
from project_fully_featured.definitions import SHARED_SNOWFLAKE_CONF
from project_fully_featured.resources.snowflake_io_manager import (
SnowflakeIOManager,
connect_snowflake,
Expand Down

0 comments on commit 2124dff

Please sign in to comment.