Skip to content

Commit c48bc2f

Browse files
committed
fix: ensure prov is set before wf initialization
1 parent ce57831 commit c48bc2f

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

mindboggle/mindboggle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ def first_string_containing_substring(substring, List):
348348
first_matching_string = [x for x in List if substring in x][0]
349349
return first_matching_string
350350

351+
# Ensure provenance configuration is inherited by workflow
352+
if args.prov:
353+
config.enable_provenance()
354+
351355
# ============================================================================
352356
#
353357
# Initialize workflow inputs and outputs
@@ -2361,11 +2365,10 @@ if __name__ == '__main__':
23612365
time0 = time()
23622366

23632367
# ------------------------------------------------------------------------
2364-
# Workflow configuration: provenance tracking, content hashing, etc.:
2368+
# Workflow configuration: content hashing, crashfiles, etc.:
23652369
# ------------------------------------------------------------------------
2366-
if args.prov:
2367-
config.enable_provenance()
23682370
mbFlow.config['execution']['hash_method'] = 'content'
2371+
mbFlow.config['execution']['crashfile_format'] = 'txt'
23692372
# mbFlow.config['execution']['use_relative_paths'] = True
23702373

23712374
# ------------------------------------------------------------------------

mindboggle/mindboggle123

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ TDIR = args.template
130130
if args.skip_freesurfer and args.skip_ants:
131131
print("Use only one of the skip arguments: --skip_freesurfer, --skip_ants.")
132132

133+
# Ensure provenance configuration is inherited by workflow
134+
if args.prov:
135+
config.enable_provenance()
136+
133137
# ----------------------------------------------------------------------------
134138
# Initialize workflow inputs and outputs
135139
# ----------------------------------------------------------------------------
@@ -445,10 +449,8 @@ if __name__ == '__main__':
445449
time0 = time()
446450

447451
# --------------------------------------------------------------------
448-
# Workflow configuration: provenance tracking, content hashing, etc.:
452+
# Workflow configuration: content hashing, crashfiles, etc.:
449453
# --------------------------------------------------------------------
450-
if args.prov:
451-
config.enable_provenance()
452454
mbFlow.config['execution']['hash_method'] = 'content'
453455
# mbFlow.config['execution']['use_relative_paths'] = True
454456
mbFlow.config['execution']['crashfile_format'] = 'txt'

0 commit comments

Comments
 (0)