From 2a49fbad99178771d79db6d8a0611d1eb6137970 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 8 Oct 2021 17:00:26 -0500 Subject: [PATCH 01/13] Bunch version to rc --- neuroscout_cli/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neuroscout_cli/__init__.py b/neuroscout_cli/__init__.py index ed7d50e..0a22c4e 100644 --- a/neuroscout_cli/__init__.py +++ b/neuroscout_cli/__init__.py @@ -1 +1 @@ -__version__ = '0.5.3' +__version__ = '0.5.4-rc' From e5460608140ccc333f8d05a32ffa6345b651ae49 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Sat, 9 Oct 2021 14:49:34 -0500 Subject: [PATCH 02/13] TMP: fitlins to fix branch --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index c84f857..93e6448 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ datalad==0.10.2 tqdm pyns==0.4.7 git+https://github.com/bids-standard/pybids.git@maint/0.13.x +git+httts://github.com/poldracklab/fitlins.git@fix/smoothing_level \ No newline at end of file From 19ab6ce1274867e585940dd72b7c3e8602c88e2d Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Sat, 9 Oct 2021 14:53:42 -0500 Subject: [PATCH 03/13] FIX: typo in requirement --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 93e6448..fa7e097 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ datalad==0.10.2 tqdm pyns==0.4.7 git+https://github.com/bids-standard/pybids.git@maint/0.13.x -git+httts://github.com/poldracklab/fitlins.git@fix/smoothing_level \ No newline at end of file +git+https://github.com/poldracklab/fitlins.git@fix/smoothing_level \ No newline at end of file From 7b7af4a8d58c60b7ca110ae3ac1edb95c365ac1c Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Sat, 9 Oct 2021 14:59:37 -0500 Subject: [PATCH 04/13] Instead instlal fitlins first --- Dockerfile | 4 ++++ requirements.txt | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d2431d..5b72138 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,10 @@ RUN /bin/bash -c "source activate neuro \ && pip install -q --no-cache-dir -e /src/neuroscout/" \ && sync +RUN /bin/bash -c "source activate neuro \ + && pip install -q --no-cache-dir --upgrade git+https://github.com/poldracklab/fitlins.git@fix/smoothing_level" \ + && sync + RUN /bin/bash -c "source activate neuro \ && pip install -q --no-cache-dir --upgrade -r /src/neuroscout/requirements.txt" \ && sync diff --git a/requirements.txt b/requirements.txt index fa7e097..30df56d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,4 @@ docopt==0.6.2 datalad==0.10.2 tqdm pyns==0.4.7 -git+https://github.com/bids-standard/pybids.git@maint/0.13.x -git+https://github.com/poldracklab/fitlins.git@fix/smoothing_level \ No newline at end of file +git+https://github.com/bids-standard/pybids.git@maint/0.13.x \ No newline at end of file From 6a0b774c343ace49ee14adf528397fe5bbe2651a Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Tue, 12 Oct 2021 12:51:43 -0500 Subject: [PATCH 05/13] Exit if fail, closes #140 --- neuroscout_cli/cli.py | 6 +++++- neuroscout_cli/commands/run.py | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/neuroscout_cli/cli.py b/neuroscout_cli/cli.py index 95c15fb..6aa8d12 100644 --- a/neuroscout_cli/cli.py +++ b/neuroscout_cli/cli.py @@ -67,5 +67,9 @@ def main(): for bundle in bundles: logging.info("Analysis ID : {}".format(bundle)) args[''] = bundle - command(deepcopy(args)).run() + retcode = command(deepcopy(args)).run() + + # If any execution fails, then exit + if retcode != 0: + sys.exit(retcode) sys.exit(0) diff --git a/neuroscout_cli/commands/run.py b/neuroscout_cli/commands/run.py index 8df8102..a41d854 100644 --- a/neuroscout_cli/commands/run.py +++ b/neuroscout_cli/commands/run.py @@ -72,6 +72,7 @@ def run(self, upload_only=False): "https://github.com/neuroscout/neuroscout-cli/issues\n" "-------------------------------------------------------\n" ) + return retcode if neurovault != 'disable': model = json.load(open(model_path, 'r')) @@ -122,4 +123,6 @@ def run(self, upload_only=False): # Drop files if no separate install dir, and the user has not said otherwise. if not self.install_dir and not no_drop: - drop(str(self.preproc_dir.absolute())) \ No newline at end of file + drop(str(self.preproc_dir.absolute())) + + return retcode \ No newline at end of file From 0d2abcb92ae787736d8f252426c80fe4bb5bfcc8 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Tue, 12 Oct 2021 12:52:49 -0500 Subject: [PATCH 06/13] upload cli args to neuroscout --- neuroscout_cli/commands/run.py | 1 + requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/neuroscout_cli/commands/run.py b/neuroscout_cli/commands/run.py index a41d854..aad0463 100644 --- a/neuroscout_cli/commands/run.py +++ b/neuroscout_cli/commands/run.py @@ -119,6 +119,7 @@ def run(self, upload_only=False): fmriprep_version=fmriprep_version, estimator=estimator, cli_version=VERSION, + cli_args=self.options, n_subjects=n_subjects) # Drop files if no separate install dir, and the user has not said otherwise. diff --git a/requirements.txt b/requirements.txt index 30df56d..cfa7bbe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ docopt==0.6.2 datalad==0.10.2 tqdm -pyns==0.4.7 +pyns==0.4.8 git+https://github.com/bids-standard/pybids.git@maint/0.13.x \ No newline at end of file From ed9008a7604bfae928ba7a5fde40077bc3785ab4 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Tue, 12 Oct 2021 12:58:08 -0500 Subject: [PATCH 07/13] Allow users to set smoothing level and type. Closes #142 --- README.md | 5 +++-- neuroscout_cli/cli.py | 5 +++-- neuroscout_cli/commands/run.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5bac554..6ee8e00 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,9 @@ Options: -w, --work-dir Optional Fitlins working directory -c, --n-cpus Maximum number of threads across all processes [default: 1] - -s, --smoothing Smoothing kernel FWHM at group level - [default: 4] + -s, --smoothing Smoothing to apply in format: FWHM:level:type. + See fitlins documentation for more information. + [default: 4:Dataset:iso] -u, --unlock Unlock datalad dataset -n, --neurovault Upload mode (disable, all, or group) [default: group] diff --git a/neuroscout_cli/cli.py b/neuroscout_cli/cli.py index 6aa8d12..a31b2db 100644 --- a/neuroscout_cli/cli.py +++ b/neuroscout_cli/cli.py @@ -14,8 +14,9 @@ -w, --work-dir Optional Fitlins working directory -c, --n-cpus Maximum number of threads across all processes [default: 1] - -s, --smoothing Smoothing kernel FWHM at group level - [default: 4] + -s, --smoothing Smoothing to apply in format: FWHM:level:type. + See fitlins documentation for more information. + [default: 4:Dataset:iso] -u, --unlock Unlock datalad dataset -n, --neurovault Upload mode (disable, all, or group) [default: group] diff --git a/neuroscout_cli/commands/run.py b/neuroscout_cli/commands/run.py index aad0463..97aec90 100644 --- a/neuroscout_cli/commands/run.py +++ b/neuroscout_cli/commands/run.py @@ -38,7 +38,7 @@ def run(self, upload_only=False): f'--model={model_path}', '--ignore=/(.*desc-confounds_regressors.*)/', f'--derivatives={str(self.bundle_dir.absolute())} {str(self.preproc_dir.absolute())}', - f'--smoothing={self.options["--smoothing"]}:Dataset', + f'--smoothing={self.options["--smoothing"]}', f'--estimator={self.options["--estimator"]}', f'--n-cpus={self.options["--n-cpus"]}' ] From b73795f6943ed7a854de03c2bd317d581d27b27b Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Tue, 12 Oct 2021 18:06:12 -0500 Subject: [PATCH 08/13] Pin mainenance verson of fitlins --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5b72138..655454b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN /bin/bash -c "source activate neuro \ && sync RUN /bin/bash -c "source activate neuro \ - && pip install -q --no-cache-dir --upgrade git+https://github.com/poldracklab/fitlins.git@fix/smoothing_level" \ + && pip install -q --no-cache-dir --upgrade git+https://github.com/poldracklab/fitlins.git@maint/0.9.x" \ && sync RUN /bin/bash -c "source activate neuro \ From 9127bd5136c8c1d9e7197d0f7d14d44824275d0e Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Wed, 13 Oct 2021 14:53:02 -0500 Subject: [PATCH 09/13] Load options --- neuroscout_cli/commands/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neuroscout_cli/commands/run.py b/neuroscout_cli/commands/run.py index 97aec90..436cadf 100644 --- a/neuroscout_cli/commands/run.py +++ b/neuroscout_cli/commands/run.py @@ -83,6 +83,7 @@ def run(self, upload_only=False): options = json.load((out_dir / 'options.json').open('r')) estimator = options.get('--estimator') except: + options = None print("No saved options found skipping...") try: @@ -119,7 +120,7 @@ def run(self, upload_only=False): fmriprep_version=fmriprep_version, estimator=estimator, cli_version=VERSION, - cli_args=self.options, + cli_args=options, n_subjects=n_subjects) # Drop files if no separate install dir, and the user has not said otherwise. From f060eeda978d650f9dc4b0e3e077792f5eb1ecdb Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Wed, 13 Oct 2021 14:53:13 -0500 Subject: [PATCH 10/13] TMP: pin pyNS --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index cfa7bbe..f444ab1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ docopt==0.6.2 datalad==0.10.2 tqdm pyns==0.4.8 +git+https://github.com/neuroscout/pyNS.gitpybids.git@fix_smoothing git+https://github.com/bids-standard/pybids.git@maint/0.13.x \ No newline at end of file From d549eb63caec96c91f8a1c280e51417ad2faad50 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Wed, 13 Oct 2021 15:02:12 -0500 Subject: [PATCH 11/13] TMP: FIX pin --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f444ab1..2020cda 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ docopt==0.6.2 datalad==0.10.2 tqdm pyns==0.4.8 -git+https://github.com/neuroscout/pyNS.gitpybids.git@fix_smoothing +git+https://github.com/neuroscout/pyNS.git@fix_smoothing git+https://github.com/bids-standard/pybids.git@maint/0.13.x \ No newline at end of file From 4d09b47688ceb47434e94bbfe725867d6703affd Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Wed, 13 Oct 2021 15:19:53 -0500 Subject: [PATCH 12/13] TMP: pin pyNS2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2020cda..a0c1d7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ docopt==0.6.2 datalad==0.10.2 tqdm pyns==0.4.8 -git+https://github.com/neuroscout/pyNS.git@fix_smoothing +git+https://github.com/neuroscout/pyNS.git@upload_cli git+https://github.com/bids-standard/pybids.git@maint/0.13.x \ No newline at end of file From e2b1e41a9937b846a1e9411b6411497a2f4118ca Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Wed, 13 Oct 2021 15:58:47 -0500 Subject: [PATCH 13/13] Update pyNS version and update neuroscout-cli version --- neuroscout_cli/__init__.py | 2 +- requirements.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/neuroscout_cli/__init__.py b/neuroscout_cli/__init__.py index 0a22c4e..19283fe 100644 --- a/neuroscout_cli/__init__.py +++ b/neuroscout_cli/__init__.py @@ -1 +1 @@ -__version__ = '0.5.4-rc' +__version__ = '0.5.4' diff --git a/requirements.txt b/requirements.txt index a0c1d7c..cfa7bbe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,4 @@ docopt==0.6.2 datalad==0.10.2 tqdm pyns==0.4.8 -git+https://github.com/neuroscout/pyNS.git@upload_cli git+https://github.com/bids-standard/pybids.git@maint/0.13.x \ No newline at end of file