diff --git a/lib/tool_shed/scripts/api/add_repository_registry_entry.py b/scripts/tool_shed/api/add_repository_registry_entry.py similarity index 100% rename from lib/tool_shed/scripts/api/add_repository_registry_entry.py rename to scripts/tool_shed/api/add_repository_registry_entry.py diff --git a/lib/tool_shed/scripts/api/common.py b/scripts/tool_shed/api/common.py similarity index 99% rename from lib/tool_shed/scripts/api/common.py rename to scripts/tool_shed/api/common.py index 88f7fcf2e94..1b249149eff 100644 --- a/lib/tool_shed/scripts/api/common.py +++ b/scripts/tool_shed/api/common.py @@ -4,7 +4,7 @@ import sys import urllib import urllib2 -sys.path.insert(1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir ) ) +sys.path.insert( 1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir, 'lib' ) ) from tool_shed.util import hg_util from galaxy import util diff --git a/lib/tool_shed/scripts/api/create_categories.py b/scripts/tool_shed/api/create_categories.py similarity index 100% rename from lib/tool_shed/scripts/api/create_categories.py rename to scripts/tool_shed/api/create_categories.py diff --git a/lib/tool_shed/scripts/api/create_users.py b/scripts/tool_shed/api/create_users.py similarity index 100% rename from lib/tool_shed/scripts/api/create_users.py rename to scripts/tool_shed/api/create_users.py diff --git a/lib/tool_shed/scripts/api/export.py b/scripts/tool_shed/api/export.py similarity index 98% rename from lib/tool_shed/scripts/api/export.py rename to scripts/tool_shed/api/export.py index f60bc5497b0..5773354558d 100644 --- a/lib/tool_shed/scripts/api/export.py +++ b/scripts/tool_shed/api/export.py @@ -13,7 +13,7 @@ import sys import tempfile import urllib2 -sys.path.insert(1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir ) ) +sys.path.insert( 1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir, 'lib' ) ) from tool_shed.util import basic_util from common import display, submit diff --git a/lib/tool_shed/scripts/api/get_filtered_repository_revisions.py b/scripts/tool_shed/api/get_filtered_repository_revisions.py similarity index 87% rename from lib/tool_shed/scripts/api/get_filtered_repository_revisions.py rename to scripts/tool_shed/api/get_filtered_repository_revisions.py index b47bbdc6ba9..83c3ffcf4ca 100644 --- a/lib/tool_shed/scripts/api/get_filtered_repository_revisions.py +++ b/scripts/tool_shed/api/get_filtered_repository_revisions.py @@ -23,9 +23,8 @@ Here is a working example of how to use this script. import argparse import os import sys -import urllib -sys.path.insert(1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir ) ) +sys.path.insert( 1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir, 'lib' ) ) from galaxy.util import asbool from tool_shed.util import hg_util @@ -44,14 +43,14 @@ def main( options ): test_install_error = str( options.test_install_error ) tools_functionally_correct = str( options.tools_functionally_correct ) parts = [ 'repository_revisions' ] - params = urllib.urlencode( dict( do_not_test=do_not_test, - downloadable=downloadable, - includes_tools=includes_tools, - malicious=malicious, - missing_test_components=missing_test_components, - skip_tool_test=skip_tool_test, - test_install_error=test_install_error, - tools_functionally_correct=tools_functionally_correct ) ) + params = dict( do_not_test=do_not_test, + downloadable=downloadable, + includes_tools=includes_tools, + malicious=malicious, + missing_test_components=missing_test_components, + skip_tool_test=skip_tool_test, + test_install_error=test_install_error, + tools_functionally_correct=tools_functionally_correct ) api_url = get_api_url( base=base_tool_shed_url, parts=parts, params=params ) baseline_repository_dicts, error_message = json_from_url( api_url ) if baseline_repository_dicts is None or error_message: diff --git a/lib/tool_shed/scripts/api/import_capsule.py b/scripts/tool_shed/api/import_capsule.py similarity index 100% rename from lib/tool_shed/scripts/api/import_capsule.py rename to scripts/tool_shed/api/import_capsule.py diff --git a/lib/tool_shed/scripts/api/remove_repository_registry_entry.py b/scripts/tool_shed/api/remove_repository_registry_entry.py similarity index 100% rename from lib/tool_shed/scripts/api/remove_repository_registry_entry.py rename to scripts/tool_shed/api/remove_repository_registry_entry.py diff --git a/lib/tool_shed/scripts/api/reset_metadata_on_repositories.py b/scripts/tool_shed/api/reset_metadata_on_repositories.py similarity index 100% rename from lib/tool_shed/scripts/api/reset_metadata_on_repositories.py rename to scripts/tool_shed/api/reset_metadata_on_repositories.py diff --git a/lib/tool_shed/scripts/api/tool_shed_repository_revision_update.py b/scripts/tool_shed/api/tool_shed_repository_revision_update.py similarity index 100% rename from lib/tool_shed/scripts/api/tool_shed_repository_revision_update.py rename to scripts/tool_shed/api/tool_shed_repository_revision_update.py diff --git a/lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_tool_shed.sh b/scripts/tool_shed/bootstrap_tool_shed/bootstrap_tool_shed.sh similarity index 77% rename from lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_tool_shed.sh rename to scripts/tool_shed/bootstrap_tool_shed/bootstrap_tool_shed.sh index 1de9d78710f..4a7b61208e6 100755 --- a/lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_tool_shed.sh +++ b/scripts/tool_shed/bootstrap_tool_shed/bootstrap_tool_shed.sh @@ -11,15 +11,15 @@ stop_err() { exit 1 } -tool_shed=`./lib/tool_shed/scripts/bootstrap_tool_shed/parse_run_sh_args.sh $@` +tool_shed=`./scripts/tool_shed/bootstrap_tool_shed/parse_run_sh_args.sh $@` if [ $? -ne 0 ] ; then exit 0 fi -log_file="lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap.log" +log_file="scripts/tool_shed/bootstrap_tool_shed/bootstrap.log" -database_result=`python ./lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_util.py --execute check_db --config_file ${TOOL_SHED_CONFIG_FILE}` +database_result=`python ./scripts/tool_shed/bootstrap_tool_shed/bootstrap_util.py --execute check_db --config_file ${TOOL_SHED_CONFIG_FILE}` if [ $? -ne 0 ] ; then stop_err "Unable to bootstrap tool shed. $database_result" @@ -36,8 +36,8 @@ else fi if [ $? -eq 0 ] ; then - user_auth=`python ./lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_util.py --execute admin_user_info --config_file ${TOOL_SHED_CONFIG_FILE}` - local_shed_url=`python ./lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_util.py --execute get_url --config_file ${TOOL_SHED_CONFIG_FILE}` + user_auth=`python ./scripts/tool_shed/bootstrap_tool_shed/bootstrap_util.py --execute admin_user_info --config_file ${TOOL_SHED_CONFIG_FILE}` + local_shed_url=`python ./scripts/tool_shed/bootstrap_tool_shed/bootstrap_util.py --execute get_url --config_file ${TOOL_SHED_CONFIG_FILE}` fi admin_user_name=`echo $user_auth | awk 'BEGIN { FS="__SEP__" } ; { print \$1 }'` @@ -46,7 +46,7 @@ admin_user_password=`echo $user_auth | awk 'BEGIN { FS="__SEP__" } ; { print \$3 echo -n "Creating user '$admin_user_name' with email address '$admin_user_email'..." -python ./lib/tool_shed/scripts/bootstrap_tool_shed/create_user_with_api_key.py -c ${TOOL_SHED_CONFIG_FILE} >> $log_file +python ./scripts/tool_shed/bootstrap_tool_shed/create_user_with_api_key.py -c ${TOOL_SHED_CONFIG_FILE} >> $log_file echo " done." @@ -94,10 +94,10 @@ echo " done." if [ $? -eq 0 ] ; then echo -n "Creating users... " - python lib/tool_shed/scripts/api/create_users.py -a $api_key -f $tool_shed -t $local_shed_url >> $log_file + python scripts/tool_shed/api/create_users.py -a $api_key -f $tool_shed -t $local_shed_url >> $log_file echo "done." echo -n "Creating categories... " - python lib/tool_shed/scripts/api/create_categories.py -a $api_key -f $tool_shed -t $local_shed_url >> $log_file + python scripts/tool_shed/api/create_categories.py -a $api_key -f $tool_shed -t $local_shed_url >> $log_file echo "done." else stop_err "Error getting API key from local tool shed." diff --git a/lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_util.py b/scripts/tool_shed/bootstrap_tool_shed/bootstrap_util.py similarity index 96% rename from lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_util.py rename to scripts/tool_shed/bootstrap_tool_shed/bootstrap_util.py index e49c7a06bc5..980873e2df8 100755 --- a/lib/tool_shed/scripts/bootstrap_tool_shed/bootstrap_util.py +++ b/scripts/tool_shed/bootstrap_tool_shed/bootstrap_util.py @@ -4,7 +4,7 @@ import ConfigParser import os import sys -sys.path.insert(1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir ) ) +sys.path.insert( 1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir, 'lib' ) ) from sqlalchemy.exc import OperationalError, ProgrammingError @@ -69,7 +69,7 @@ def check_db( config_parser ): def admin_user_info( ): - user_info_config = os.path.abspath( os.path.join( os.getcwd(), 'lib/tool_shed/scripts/bootstrap_tool_shed', 'user_info.xml' ) ) + user_info_config = os.path.abspath( os.path.join( os.getcwd(), 'scripts/tool_shed/bootstrap_tool_shed', 'user_info.xml' ) ) tree, error_message = xml_util.parse_xml( user_info_config ) username = None email = None diff --git a/lib/tool_shed/scripts/bootstrap_tool_shed/create_user_with_api_key.py b/scripts/tool_shed/bootstrap_tool_shed/create_user_with_api_key.py similarity index 99% rename from lib/tool_shed/scripts/bootstrap_tool_shed/create_user_with_api_key.py rename to scripts/tool_shed/bootstrap_tool_shed/create_user_with_api_key.py index 231ad1074c1..d431307ba67 100644 --- a/lib/tool_shed/scripts/bootstrap_tool_shed/create_user_with_api_key.py +++ b/scripts/tool_shed/bootstrap_tool_shed/create_user_with_api_key.py @@ -7,7 +7,7 @@ import re import sys import optparse -sys.path.insert(1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir ) ) +sys.path.insert(1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir, 'lib' ) ) sys.path.insert(1, os.path.join( os.path.dirname( __file__ ) ) ) import galaxy.webapps.tool_shed.config as tool_shed_config diff --git a/lib/tool_shed/scripts/bootstrap_tool_shed/parse_run_sh_args.sh b/scripts/tool_shed/bootstrap_tool_shed/parse_run_sh_args.sh similarity index 100% rename from lib/tool_shed/scripts/bootstrap_tool_shed/parse_run_sh_args.sh rename to scripts/tool_shed/bootstrap_tool_shed/parse_run_sh_args.sh diff --git a/lib/tool_shed/scripts/bootstrap_tool_shed/user_info.xml.sample b/scripts/tool_shed/bootstrap_tool_shed/user_info.xml.sample similarity index 100% rename from lib/tool_shed/scripts/bootstrap_tool_shed/user_info.xml.sample rename to scripts/tool_shed/bootstrap_tool_shed/user_info.xml.sample diff --git a/lib/tool_shed/scripts/check_filesystem_for_empty_tool_dependency_installation_paths.py b/scripts/tool_shed/check_filesystem_for_empty_tool_dependency_installation_paths.py similarity index 100% rename from lib/tool_shed/scripts/check_filesystem_for_empty_tool_dependency_installation_paths.py rename to scripts/tool_shed/check_filesystem_for_empty_tool_dependency_installation_paths.py diff --git a/lib/tool_shed/scripts/check_repositories_for_functional_tests.py b/scripts/tool_shed/check_repositories_for_functional_tests.py similarity index 100% rename from lib/tool_shed/scripts/check_repositories_for_functional_tests.py rename to scripts/tool_shed/check_repositories_for_functional_tests.py diff --git a/lib/tool_shed/scripts/check_s3_for_empty_tool_dependency_installation_paths.py b/scripts/tool_shed/check_s3_for_empty_tool_dependency_installation_paths.py similarity index 100% rename from lib/tool_shed/scripts/check_s3_for_empty_tool_dependency_installation_paths.py rename to scripts/tool_shed/check_s3_for_empty_tool_dependency_installation_paths.py diff --git a/lib/tool_shed/scripts/check_tool_dependency_definition_repositories.py b/scripts/tool_shed/check_tool_dependency_definition_repositories.py similarity index 100% rename from lib/tool_shed/scripts/check_tool_dependency_definition_repositories.py rename to scripts/tool_shed/check_tool_dependency_definition_repositories.py diff --git a/lib/tool_shed/scripts/clean_up_tool_dependency_directory.py b/scripts/tool_shed/clean_up_tool_dependency_directory.py similarity index 100% rename from lib/tool_shed/scripts/clean_up_tool_dependency_directory.py rename to scripts/tool_shed/clean_up_tool_dependency_directory.py diff --git a/lib/tool_shed/scripts/deprecate_repositories_without_metadata.py b/scripts/tool_shed/deprecate_repositories_without_metadata.py similarity index 100% rename from lib/tool_shed/scripts/deprecate_repositories_without_metadata.py rename to scripts/tool_shed/deprecate_repositories_without_metadata.py diff --git a/lib/tool_shed/scripts/show_tool_dependency_installation_dir_contents.py b/scripts/tool_shed/show_tool_dependency_installation_dir_contents.py similarity index 100% rename from lib/tool_shed/scripts/show_tool_dependency_installation_dir_contents.py rename to scripts/tool_shed/show_tool_dependency_installation_dir_contents.py