Permalink
Browse files

Improvements to tool data table handling.

 - Use sample if available (it won't have data but at least the tool will load).
 - Add command line option allowing one to specify path this file.
  • Loading branch information...
jmchilton committed Feb 13, 2015
1 parent 834bfb2 commit ac4f82898f7006799142503a33c3978428660ce7
Showing with 14 additions and 1 deletion.
  1. +1 −0 planemo/commands/cmd_test.py
  2. +5 −1 planemo/galaxy_config.py
  3. +8 −0 planemo/options.py
@@ -85,6 +85,7 @@
@options.galaxy_root_option()
@options.install_galaxy_option()
@options.test_data_option()
@options.tool_data_table_option()
@options.dependency_resolvers_option()
@options.job_config_option()
@options.tool_dependency_dir_option()
@@ -238,10 +238,14 @@ def __find_tool_data_table(path, test_data_dir, **kwds):
if tool_data_table:
return os.path.abspath(tool_data_table)
else:
extra_paths = [test_data_dir] if test_data_dir else []
return __search_tool_path_for(
path,
"tool_data_table_conf.xml.test",
[test_data_dir] if test_data_dir else [],
extra_paths,
) or __search_tool_path_for( # if all else fails just use sample
path,
"tool_data_table_conf.xml.sample"
)


@@ -12,6 +12,14 @@ def test_data_option():
)


def tool_data_table_option():
return click.option(
"--tool_data_table",
type=click.Path(exists=True, file_okay=True, resolve_path=True),
help='tool_data_table_conf.xml file to for specified tool(s).'
)


def galaxy_root_option():
return click.option(
"--galaxy_root",

0 comments on commit ac4f828

Please sign in to comment.