Permalink
Browse files

Implement --no_cleanup option for test & serve commands.

Prevents deletion of temporary files created for/by Galaxy. Might be useful for debugging stuff (#80 (comment)) - probably would be a whole lot more useful for debugging if we also dropped a little shell script in that directory that allowed resuming Galaxy from that state.
  • Loading branch information...
jmchilton committed Feb 22, 2015
1 parent 81f903d commit 2e41e0a146b330beee6ba41132b8e4789b756441
@@ -36,6 +36,8 @@ instances.
execute command with.
--install_galaxy Download and configure a disposable copy of
Galaxy from github.
--no_cleanup Do not cleanup temp files created for and by
Galaxy.
--test_data DIRECTORY test-data directory to for specified
tool(s).
--dependency_resolvers_config_file PATH
@@ -61,6 +61,8 @@ please careful and do not try this against production Galaxy instances.
execute command with.
--install_galaxy Download and configure a disposable copy of
Galaxy from github.
--no_cleanup Do not cleanup temp files created for and by
Galaxy.
--test_data DIRECTORY test-data directory to for specified
tool(s).
--tool_data_table PATH tool_data_table_conf.xml file to for
@@ -26,6 +26,8 @@ http://www.ncbi.nlm.nih.gov/pubmed/23024011.
execute command with.
--install_galaxy Download and configure a disposable copy of
Galaxy from github.
--no_cleanup Do not cleanup temp files created for and by
Galaxy.
--test_data DIRECTORY test-data directory to for specified
tool(s).
--dependency_resolvers_config_file PATH
@@ -9,6 +9,7 @@
@options.optional_tools_arg()
@options.galaxy_root_option()
@options.install_galaxy_option()
@options.no_cleanup_option()
@options.test_data_option()
@options.dependency_resolvers_option()
@options.job_config_option()
@@ -84,6 +84,7 @@
)
@options.galaxy_root_option()
@options.install_galaxy_option()
@options.no_cleanup_option()
@options.test_data_option()
@options.tool_data_table_option()
@options.dependency_resolvers_option()
@@ -9,6 +9,7 @@
@click.command('tool_factory')
@options.galaxy_root_option()
@options.install_galaxy_option()
@options.no_cleanup_option()
@options.test_data_option()
@options.dependency_resolvers_option()
@options.job_config_option()
@@ -200,7 +200,8 @@ def config_join(*args):

yield GalaxyConfig(galaxy_root, config_directory, env, test_data_dir)
finally:
if created_config_directory:
cleanup = not kwds.get("no_cleanup", False)
if created_config_directory and cleanup:
shutil.rmtree(config_directory)


@@ -149,6 +149,14 @@ def optional_project_arg(exists=True):
)


def no_cleanup_option():
return click.option(
"--no_cleanup",
is_flag=True,
help=("Do not cleanup temp files created for and by Galaxy.")
)


def docker_cmd_option():
return click.option(
'--docker_cmd',

0 comments on commit 2e41e0a

Please sign in to comment.