scaffold other code locations
This commit is contained in:
0
apps/stocks/src/__init__.py
Normal file
0
apps/stocks/src/__init__.py
Normal file
0
apps/stocks/src/assets.py
Normal file
0
apps/stocks/src/assets.py
Normal file
27
apps/stocks/src/definitions.py
Normal file
27
apps/stocks/src/definitions.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
|
||||
import assets
|
||||
from dagster_polars import PolarsParquetIOManager
|
||||
from icecream import install
|
||||
|
||||
import dagster as dg
|
||||
from dagster import load_assets_from_modules
|
||||
|
||||
install()
|
||||
|
||||
APP = os.environ["APP"]
|
||||
|
||||
definitions = dg.Definitions(
|
||||
assets=[
|
||||
asset.with_attributes(
|
||||
group_names_by_key={asset.key: APP},
|
||||
tags_by_key={asset.key: {"app": APP}},
|
||||
)
|
||||
for asset in load_assets_from_modules([assets])
|
||||
],
|
||||
resources={
|
||||
"polars_parquet_io_manager": PolarsParquetIOManager(
|
||||
base_dir=os.environ.get("STORAGE_DIR", "/storage") + f"/{APP}"
|
||||
),
|
||||
},
|
||||
)
|
||||
0
apps/tesla/src/__init__.py
Normal file
0
apps/tesla/src/__init__.py
Normal file
0
apps/tesla/src/assets.py
Normal file
0
apps/tesla/src/assets.py
Normal file
27
apps/tesla/src/definitions.py
Normal file
27
apps/tesla/src/definitions.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
|
||||
import assets
|
||||
from dagster_polars import PolarsParquetIOManager
|
||||
from icecream import install
|
||||
|
||||
import dagster as dg
|
||||
from dagster import load_assets_from_modules
|
||||
|
||||
install()
|
||||
|
||||
APP = os.environ["APP"]
|
||||
|
||||
definitions = dg.Definitions(
|
||||
assets=[
|
||||
asset.with_attributes(
|
||||
group_names_by_key={asset.key: APP},
|
||||
tags_by_key={asset.key: {"app": APP}},
|
||||
)
|
||||
for asset in load_assets_from_modules([assets])
|
||||
],
|
||||
resources={
|
||||
"polars_parquet_io_manager": PolarsParquetIOManager(
|
||||
base_dir=os.environ.get("STORAGE_DIR", "/storage") + f"/{APP}"
|
||||
),
|
||||
},
|
||||
)
|
||||
@@ -9,18 +9,20 @@ from utils.email import EmailService
|
||||
|
||||
import dagster as dg
|
||||
|
||||
APP = os.environ["APP"]
|
||||
|
||||
install()
|
||||
definitions = dg.Definitions(
|
||||
assets=[
|
||||
asset.with_attributes(
|
||||
group_names_by_key={asset.key: "vinyl"},
|
||||
tags_by_key={asset.key: {"app": "vinyl"}},
|
||||
group_names_by_key={asset.key: APP},
|
||||
tags_by_key={asset.key: {"app": APP}},
|
||||
)
|
||||
for asset in dg.load_assets_from_modules([assets])
|
||||
],
|
||||
resources={
|
||||
"polars_parquet_io_manager": PolarsParquetIOManager(
|
||||
base_dir=os.environ.get("STORAGE_DIR", "/storage") + "/vinyl"
|
||||
base_dir=os.environ.get("STORAGE_DIR", "/storage") + f"/{APP}"
|
||||
),
|
||||
"email_service": EmailService(
|
||||
smtp_server=dg.EnvVar("SMTP_SERVER"),
|
||||
|
||||
0
apps/weather/src/__init__.py
Normal file
0
apps/weather/src/__init__.py
Normal file
0
apps/weather/src/assets.py
Normal file
0
apps/weather/src/assets.py
Normal file
27
apps/weather/src/definitions.py
Normal file
27
apps/weather/src/definitions.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
|
||||
import assets
|
||||
from dagster_polars import PolarsParquetIOManager
|
||||
from icecream import install
|
||||
|
||||
import dagster as dg
|
||||
from dagster import load_assets_from_modules
|
||||
|
||||
install()
|
||||
|
||||
APP = os.environ["APP"]
|
||||
|
||||
definitions = dg.Definitions(
|
||||
assets=[
|
||||
asset.with_attributes(
|
||||
group_names_by_key={asset.key: APP},
|
||||
tags_by_key={asset.key: {"app": APP}},
|
||||
)
|
||||
for asset in load_assets_from_modules([assets])
|
||||
],
|
||||
resources={
|
||||
"polars_parquet_io_manager": PolarsParquetIOManager(
|
||||
base_dir=os.environ.get("STORAGE_DIR", "/storage") + f"/{APP}"
|
||||
),
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user