Skip to content

Commit ddb3a37

Browse files
committed
Dynamic NFS share dir based on product major version
1 parent b3aa47c commit ddb3a37

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

seaice_ecdr/constants.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def __str__(self) -> str:
3737
)
3838

3939
# NSIDC infrastructure-specific paths:
40-
NSIDC_NFS_SHARE_DIR = Path("/share/apps/G02202_V6")
40+
NSIDC_NFS_SHARE_DIR = Path(
41+
f"/share/apps/G02202_V{ECDR_PRODUCT_VERSION.major_version_number}"
42+
)
4143
if not NSIDC_NFS_SHARE_DIR.is_dir():
4244
raise RuntimeError(f"Expected {NSIDC_NFS_SHARE_DIR} to exist, but it does not.")
4345

@@ -100,7 +102,9 @@ def _get_env_subdir_str() -> str:
100102
major_version_number=4,
101103
revision_number=0,
102104
)
103-
NSIDC_NFS_NRT_SHARE_DIR = Path("/share/apps/G10016_V4")
105+
NSIDC_NFS_NRT_SHARE_DIR = Path(
106+
f"/share/apps/G10016_V{ECDR_NRT_PRODUCT_VERSION.major_version_number}"
107+
)
104108
if not NSIDC_NFS_SHARE_DIR.is_dir():
105109
raise RuntimeError(f"Expected {NSIDC_NFS_NRT_SHARE_DIR} to exist, but it does not.")
106110
DEFAULT_BASE_NRT_OUTPUT_DIR = (

0 commit comments

Comments
 (0)