Skip to content

Commit

Permalink
Merge pull request #96 from neuroscout/upload_cli
Browse files Browse the repository at this point in the history
Upload cli_args to neuroscout
  • Loading branch information
adelavega committed Oct 13, 2021
2 parents 85ba98f + e990273 commit 9f1a8d0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pyns/models/analysis.py
Expand Up @@ -9,6 +9,7 @@
import tqdm
import time
import re
import json

altair = attempt_to_import('altair')
nib = attempt_to_import('nibabel')
Expand Down Expand Up @@ -330,7 +331,7 @@ def plot_report(self, id, run_id=None, plot_type='design_matrix_plot',
def upload_neurovault(self, id, validation_hash, subject_paths=None,
group_paths=None, collection_id=None, force=False,
cli_version=None, fmriprep_version=None,
estimator=None, n_subjects=None):
estimator=None, n_subjects=None, cli_args=None):
""" Submit analysis for report generation
:param str id: Analysis hash_id.
:param str validation_hash: Validation hash string.
Expand All @@ -341,7 +342,8 @@ def upload_neurovault(self, id, validation_hash, subject_paths=None,
:param str: fmriprep version at runtime
:param str: estimator used in fitlins (anfi/nilearn)
:param int n_subjects: Number of subjects in analysis.
:return: client response object
:param dict runtime_options
:return: dict cli_args Arguments specified to CLI at runtime
"""

def _ts_first(paths):
Expand All @@ -361,8 +363,8 @@ def _ts_first(paths):
id=id, sub_route='upload', files=files, level='GROUP',
validation_hash=validation_hash, force=force,
fmriprep_version=fmriprep_version, estimator=estimator,
cli_version=cli_version, n_subjects=n_subjects,
collection_id=collection_id)
cli_version=cli_version, n_subjects=n_subjects,
cli_args=json.dumps(cli_args), collection_id=collection_id)
if collection_id is None:
collection_id = req['collection_id']

Expand Down

0 comments on commit 9f1a8d0

Please sign in to comment.