Skip to content

Commit

Permalink
Custom fields are only included in recomputations and computational r…
Browse files Browse the repository at this point in the history
…eplicas
  • Loading branch information
pritchardn committed Jun 28, 2022
1 parent 1a4dccc commit 144c9e9
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def lg_block_fields(category_type: str, rmode: ReproducibilityFlags, custom_fiel
"""
data = {}
if rmode in (
ReproducibilityFlags.NOTHING,
ReproducibilityFlags.RERUN,
ReproducibilityFlags.REPRODUCE,
ReproducibilityFlags.REPLICATE_SCI,
ReproducibilityFlags.NOTHING,
ReproducibilityFlags.RERUN,
ReproducibilityFlags.REPRODUCE,
ReproducibilityFlags.REPLICATE_SCI,
):
return data
# Drop category considerations - Just try to get everything we can, will be filtered later
Expand All @@ -121,8 +121,8 @@ def lg_block_fields(category_type: str, rmode: ReproducibilityFlags, custom_fiel
elif category_type == Categories.FILE:
data["check_filepath_exists"] = FieldOps.STORE
if rmode in (
ReproducibilityFlags.RECOMPUTE,
ReproducibilityFlags.REPLICATE_COMP,
ReproducibilityFlags.RECOMPUTE,
ReproducibilityFlags.REPLICATE_COMP,
):
data["filepath"] = FieldOps.STORE
data["dirname"] = FieldOps.STORE
Expand Down Expand Up @@ -183,7 +183,8 @@ def lg_block_fields(category_type: str, rmode: ReproducibilityFlags, custom_fiel
data["libpath"] = FieldOps.STORE
elif category_type == Categories.DYNLIB_PROC_APP:
data["libpath"] = FieldOps.STORE
if custom_fields is not None:
if custom_fields is not None and rmode in (
ReproducibilityFlags.RECOMPUTE, ReproducibilityFlags.REPLICATE_COMP):
for name in custom_fields:
data[name] = FieldOps.STORE
return data
Expand Down

0 comments on commit 144c9e9

Please sign in to comment.