Ejemplo n.º 1
0
def test_auto_cli():
    tmpdir = nbtmp.InTemporaryDirectory()
    config_file = op.join(tmpdir.name, 'test.toml')

    arg_dict = afb.func_dict_to_arg_dict()
    arg_dict['BIDS']['bids_path']['default'] = tmpdir.name
    afb.generate_config(config_file, arg_dict, False)
    with pytest.raises(
            ValueError,
            match="There must be a dataset_description.json in bids_path"):
        afb.parse_config_run_afq(config_file, arg_dict, False)
Ejemplo n.º 2
0
def test_run_using_auto_cli():
    tmpdir, bids_path, _ = get_temp_hardi()
    config_file = op.join(tmpdir.name, 'test.toml')

    arg_dict = afb.func_dict_to_arg_dict()

    # set our custom defaults for the toml file
    # It is easier to edit them here, than to parse the file and edit them
    # after the file is written
    arg_dict['BIDS']['bids_path']['default'] = bids_path
    arg_dict['BIDS']['dmriprep']['default'] = 'vistasoft'
    arg_dict['BUNDLES']['bundle_names']['default'] = ["CST"]
    arg_dict['TRACTOGRAPHY']['n_seeds']['default'] = 500
    arg_dict['TRACTOGRAPHY']['random_seeds']['default'] = True

    afb.generate_config(config_file, arg_dict, False)
    afb.parse_config_run_afq(config_file, arg_dict, False)