Skip to content

Commit

Permalink
fix(ceda_global): Use constants for folders
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Sep 10, 2024
1 parent 2f4b9ff commit 6cd0670
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions local_archives/nwp/ceda/ceda_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
import datetime as dt

from dagster_docker import PipesDockerClient
from constants import LOCATIONS_BY_ENVIRONMENT

env = os.getenv("ENVIRONMENT", "local")
ZARR_FOLDER = LOCATIONS_BY_ENVIRONMENT[env].NWP_ZARR_FOLDER

@dg.asset(
name="zarr_archive",
key_prefix=["nwp", "ceda", "global"],
metadata={
"archive_folder": dg.MetadataValue.text("/mnt/storage_b/nwp/ceda/global"),
"archive_folder": dg.MetadataValue.text(f"{ZARR_FOLDER}/nwp/ceda/global"),
"area": dg.MetadataValue.text("global"),
"source": dg.MetadataValue.text("ceda"),
},
Expand Down Expand Up @@ -42,7 +46,7 @@ def ceda_global(
"CEDA_FTP_PASSWORD": os.environ["CEDA_FTP_PASSWORD"],
},
container_kwargs={
"volumes": ["/mnt/storage_b/nwp/ceda/global:/work"],
"volumes": [f"{ZARR_FOLDER}/nwp/ceda/global:/work"],
},
context=context,
).get_results()

0 comments on commit 6cd0670

Please sign in to comment.