From 6fabb5ac099427c98446fe2f0f904dd2da2f8e80 Mon Sep 17 00:00:00 2001 From: Soichi Hayashi Date: Thu, 21 Nov 2019 19:35:24 -0500 Subject: [PATCH 1/3] added skip_citation_process flag to skip processing citation.md which causes jobs to fail due to pandoc using too much vmem --- fmriprep/cli/run.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fmriprep/cli/run.py b/fmriprep/cli/run.py index 697bccc9e..021382eff 100755 --- a/fmriprep/cli/run.py +++ b/fmriprep/cli/run.py @@ -73,6 +73,9 @@ def get_parser(): g_bids.add_argument('--skip_bids_validation', '--skip-bids-validation', action='store_true', default=False, help='assume the input dataset is BIDS compliant and skip the validation') + g_bids.add_argument('--skip_citation_process', '--skip-citation-process', action='store_true', + default=False, + help='skip processing HTML and LaTeX formatted citation with pandoc') g_bids.add_argument('--participant_label', '--participant-label', action='store', nargs='+', help='a space delimited list of participant identifiers or a single ' 'identifier (the sub- prefix can be removed)') @@ -444,7 +447,7 @@ def main(): for ext in ('bib', 'tex', 'md', 'html') } - if citation_files['md'].exists(): + if not opts.skip_citation_process and citation_files['md'].exists(): # Generate HTML file resolving citations cmd = ['pandoc', '-s', '--bibliography', pkgrf('fmriprep', 'data/boilerplate.bib'), From f9056e42c9a912b7f1eab79492a0888df218329f Mon Sep 17 00:00:00 2001 From: Soichi Hayashi Date: Sun, 24 Nov 2019 16:47:28 -0500 Subject: [PATCH 2/3] renamed skip_citation_process to md_only_biolerplate and storing it under g_perfm --- fmriprep/cli/run.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fmriprep/cli/run.py b/fmriprep/cli/run.py index 021382eff..53b109c74 100755 --- a/fmriprep/cli/run.py +++ b/fmriprep/cli/run.py @@ -73,9 +73,6 @@ def get_parser(): g_bids.add_argument('--skip_bids_validation', '--skip-bids-validation', action='store_true', default=False, help='assume the input dataset is BIDS compliant and skip the validation') - g_bids.add_argument('--skip_citation_process', '--skip-citation-process', action='store_true', - default=False, - help='skip processing HTML and LaTeX formatted citation with pandoc') g_bids.add_argument('--participant_label', '--participant-label', action='store', nargs='+', help='a space delimited list of participant identifiers or a single ' 'identifier (the sub- prefix can be removed)') @@ -111,6 +108,9 @@ def get_parser(): help='DEPRECATED (now does nothing, see --error-on-aroma-warnings) ' '- ignores the errors ICA_AROMA returns when there are no ' 'components classified as either noise or signal') + g_perfm.add_argument('--md-only-boilerplate', action='store_true', + default=False, + help='skip generation of HTML and LaTeX formatted citation from citation.md with pandoc') g_perfm.add_argument('--error-on-aroma-warnings', action='store_true', default=False, help='Raise an error if ICA_AROMA does not produce sensible output ' @@ -447,7 +447,7 @@ def main(): for ext in ('bib', 'tex', 'md', 'html') } - if not opts.skip_citation_process and citation_files['md'].exists(): + if not opts.md_only_boilerplate and citation_files['md'].exists(): # Generate HTML file resolving citations cmd = ['pandoc', '-s', '--bibliography', pkgrf('fmriprep', 'data/boilerplate.bib'), From 1c6335d22020db94a4a92f9d482405cb71109038 Mon Sep 17 00:00:00 2001 From: Soichi Hayashi Date: Sun, 24 Nov 2019 16:50:10 -0500 Subject: [PATCH 3/3] shorten help line --- fmriprep/cli/run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fmriprep/cli/run.py b/fmriprep/cli/run.py index 53b109c74..43cab5290 100755 --- a/fmriprep/cli/run.py +++ b/fmriprep/cli/run.py @@ -108,9 +108,9 @@ def get_parser(): help='DEPRECATED (now does nothing, see --error-on-aroma-warnings) ' '- ignores the errors ICA_AROMA returns when there are no ' 'components classified as either noise or signal') - g_perfm.add_argument('--md-only-boilerplate', action='store_true', + g_perfm.add_argument('--md-only-boilerplate', action='store_true', default=False, - help='skip generation of HTML and LaTeX formatted citation from citation.md with pandoc') + help='skip generation of HTML and LaTeX formatted citation with pandoc') g_perfm.add_argument('--error-on-aroma-warnings', action='store_true', default=False, help='Raise an error if ICA_AROMA does not produce sensible output '