Skip to content

Commit

Permalink
fix cli and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkent committed Jan 22, 2024
1 parent 716391e commit 7033877
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 7033877

Please sign in to comment.