From 552059fdea11ad5b36e7facf62d62e494fa6e224 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 14 Apr 2016 14:49:45 -0400 Subject: [PATCH] Use new features in Galaxy 16.07 to improve serve command. - Mount ``test-data`` directory as the FTP upload directory. - Automatically log user in as planemo@galaxyproject.org and as an admin. --- planemo/galaxy/config.py | 7 +++++++ planemo/options.py | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/planemo/galaxy/config.py b/planemo/galaxy/config.py index 9f51b75dc..3846000cb 100644 --- a/planemo/galaxy/config.py +++ b/planemo/galaxy/config.py @@ -199,7 +199,14 @@ def config_join(*args): log_level=kwds.get("log_level", "DEBUG"), ) tool_config_file = "%s,%s" % (tool_conf, shed_tool_conf) + user_email = kwds.get("galaxy_email") properties = dict( + single_user=user_email, + admin_users=user_email, + ftp_upload_dir_template="${ftp_upload_dir}", + ftp_upload_purge="False", + ftp_upload_dir=test_data_dir or os.path.abspath('.'), + ftp_upload_site="Test Data", tool_dependency_dir=dependency_dir, file_path=file_path, new_file_path="${temp_directory}/tmp", diff --git a/planemo/options.py b/planemo/options.py index 84e7e50b5..5ca3f4980 100644 --- a/planemo/options.py +++ b/planemo/options.py @@ -46,6 +46,16 @@ def tool_data_table_option(): ) +def galaxy_email_option(): + return planemo_option( + "--galaxy_email", + type=str, + default="planemo@galaxyproject.org", + use_global_config=True, + help="E-mail address to use when launching single-user Galaxy server.", + ) + + def galaxy_root_option(): return planemo_option( "--galaxy_root", @@ -720,6 +730,7 @@ def galaxy_target_options(): skip_venv_option(), no_cache_galaxy_option(), no_cleanup_option(), + galaxy_email_option(), # Profile options... job_config_option(), tool_dependency_dir_option(),