Skip to content

Commit

Permalink
Merge pull request #18 from neurostuff/fix/cli
Browse files Browse the repository at this point in the history
[FIX] fix cli and add test
  • Loading branch information
jdkent authored Jan 22, 2024
2 parents 716391e + 7033877 commit 9b57803
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compose_runner/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@click.option("nsc_key", "--nsc-key", help="Neurosynth Compose api key.")
@click.option("nv_key", "--nv-key", help="Neurovault api key.")
@click.option("--no-upload", is_flag=True, help="Do not upload results.")
@click.option("--n-cores", help="Number of cores to use for parallelization.")
@click.option("--n-cores", type=int, help="Number of cores to use for parallelization.")
def cli(meta_analysis_id, environment, result_dir, nsc_key, nv_key, no_upload, n_cores):
"""Execute and upload a meta-analysis workflow.
Expand Down
13 changes: 13 additions & 0 deletions compose_runner/tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from click.testing import CliRunner

from compose_runner.cli import cli


def test_cli():
runner = CliRunner()
result = runner.invoke(cli, [
"4nBwrGsqVWtt",
'--environment', "staging",
"--n-cores", 1,
"--no-upload"])
assert result.exit_code == 0

0 comments on commit 9b57803

Please sign in to comment.