Skip to content

Commit

Permalink
Merge pull request #809 from douglasjacobsen/modifier-separators
Browse files Browse the repository at this point in the history
Update variable modifications with separators
  • Loading branch information
rfbgo authored Jan 6, 2025
2 parents d12c02e + 515fe11 commit d7ba95a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions var/ramble/repos/builtin/modifiers/apptainer/modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ def extract_names(itr, name_set=set()):
# Define container_mounts
input_mounts = app_inst.expander.expand_var("{container_mounts}")

prefix = ""
if len(input_mounts) > 0:
prefix = ","

exp_mount = "{experiment_run_dir}:{experiment_run_dir}"
expanded_exp_mount = app_inst.expander.expand_var(exp_mount)

Expand All @@ -209,7 +205,8 @@ def extract_names(itr, name_set=set()):
if add_mod:
self.variable_modification(
"container_mounts",
modification=prefix + exp_mount,
modification=exp_mount,
separator=",",
method="append",
mode=self._usage_mode,
)
Expand Down
7 changes: 2 additions & 5 deletions var/ramble/repos/builtin/modifiers/pyxis-enroot/modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@ def extract_names(itr, name_set=set()):
# Define container_mounts
input_mounts = app_inst.expander.expand_var("{container_mounts}")

prefix = ""
if len(input_mounts) > 0:
prefix = ","

exp_mount = "{experiment_run_dir}:{experiment_run_dir}"
expanded_exp_mount = app_inst.expander.expand_var(exp_mount)

Expand All @@ -196,7 +192,8 @@ def extract_names(itr, name_set=set()):
if add_mod:
self.variable_modification(
"container_mounts",
modification=prefix + exp_mount,
modification=exp_mount,
separator=",",
method="append",
mode=self._usage_mode,
)
Expand Down

0 comments on commit d7ba95a

Please sign in to comment.