Merged galaxy/galaxy-central into default

This commit is contained in:
Martin Cech
2013-09-24 10:31:56 -04:00
34 changed files with 580 additions and 487 deletions
+13 -47
View File
@@ -1,88 +1,54 @@
;
; Config for building eggs for distribution (via a site such as
; eggs.g2.bx.psu.edu). Probably only useful to Galaxy developers at
; Penn State. This file is used by scripts/dist-scramble.py
; eggs.galaxyproject.org). Probably only useful to members of the Galaxy Team
; building eggs for distribution. This file is used by
; scripts/dist-scramble.py
;
; More information: http://wiki.g2.bx.psu.edu/Admin/Config/Eggs
; More information: http://wiki.galaxyproject.org/Admin/Config/Eggs
;
[hosts]
py2.5-linux-i686-ucs2 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.5
py2.5-linux-i686-ucs4 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.5
py2.6-linux-i686-ucs2 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.6
py2.6-linux-i686-ucs4 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.6
py2.7-linux-i686-ucs2 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.7
py2.7-linux-i686-ucs4 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.7
py2.5-linux-x86_64-ucs2 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.5
py2.5-linux-x86_64-ucs4 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.5
py2.6-linux-x86_64-ucs2 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.6
py2.6-linux-x86_64-ucs4 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.6
py2.7-linux-x86_64-ucs2 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.7
py2.7-linux-x86_64-ucs4 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.7
py2.5-macosx-10.3-fat-ucs2 = weyerbacher.bx.psu.edu /Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
py2.6-macosx-10.3-fat-ucs2 = weyerbacher.bx.psu.edu /Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
py2.7-macosx-10.3-fat-ucs2 = weyerbacher.bx.psu.edu /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
py2.6-macosx-10.6-universal-ucs2 = lion.bx.psu.edu /usr/bin/python2.6
py2.7-macosx-10.6-intel-ucs2 = lion.bx.psu.edu /usr/local/bin/python2.7
py2.5-solaris-2.10-i86pc_32-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_32-ucs2/bin/python2.5
py2.6-solaris-2.10-i86pc_32-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_32-ucs2/bin/python2.6
py2.7-solaris-2.10-i86pc_32-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_32-ucs2/bin/python2.7
py2.5-solaris-2.10-i86pc_64-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_64-ucs2/bin/python2.5
py2.6-solaris-2.10-i86pc_64-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_64-ucs2/bin/python2.6
py2.7-solaris-2.10-i86pc_64-ucs2 = thumper.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-i86pc_64-ucs2/bin/python2.7
py2.5-solaris-2.10-sun4u_32-ucs2 = early.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.8-sun4u_32-ucs2/bin/python2.5
py2.6-solaris-2.10-sun4u_32-ucs2 = early.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.8-sun4u_32-ucs2/bin/python2.6
py2.7-solaris-2.10-sun4u_32-ucs2 = early.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.8-sun4u_32-ucs2/bin/python2.7
py2.5-solaris-2.10-sun4u_64-ucs2 = early.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-sun4u_64-ucs2/bin/python2.5
py2.6-solaris-2.10-sun4u_64-ucs2 = early.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-sun4u_64-ucs2/bin/python2.6
py2.7-solaris-2.10-sun4u_64-ucs2 = early.bx.psu.edu /afs/bx.psu.edu/project/pythons/solaris-2.10-sun4u_64-ucs2/bin/python2.7
;
; these hosts are used to build eggs with no C extensions
py2.5 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.5
py2.6 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.6
py2.7 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.7
[groups]
py2.5-linux-i686 = py2.5-linux-i686-ucs2 py2.5-linux-i686-ucs4
py2.5-linux-x86_64 = py2.5-linux-x86_64-ucs2 py2.5-linux-x86_64-ucs4
py2.6-linux-i686 = py2.6-linux-i686-ucs2 py2.6-linux-i686-ucs4
py2.6-linux-x86_64 = py2.6-linux-x86_64-ucs2 py2.6-linux-x86_64-ucs4
py2.7-linux-i686 = py2.7-linux-i686-ucs2 py2.7-linux-i686-ucs4
py2.7-linux-x86_64 = py2.7-linux-x86_64-ucs2 py2.7-linux-x86_64-ucs4
py2.5-linux = py2.5-linux-i686 py2.5-linux-x86_64
py2.6-linux = py2.6-linux-i686 py2.6-linux-x86_64
py2.7-linux = py2.7-linux-i686 py2.7-linux-x86_64
linux-i686 = py2.5-linux-i686 py2.6-linux-i686 py2.7-linux-i686
linux-x86_64 = py2.5-linux-x86_64 py2.6-linux-x86_64 py2.7-linux-x86_64
linux-i686 = py2.6-linux-i686 py2.7-linux-i686
linux-x86_64 = py2.6-linux-x86_64 py2.7-linux-x86_64
linux = linux-i686 linux-x86_64
py2.5-macosx = py2.5-macosx-10.3-fat-ucs2
py2.6-macosx = py2.6-macosx-10.3-fat-ucs2 py2.6-macosx-10.6-universal-ucs2
py2.7-macosx = py2.7-macosx-10.3-fat-ucs2 py2.7-macosx-10.6-intel-ucs2
macosx = py2.5-macosx py2.6-macosx py2.7-macosx
py2.5-solaris-i86pc = py2.5-solaris-2.10-i86pc_32-ucs2 py2.5-solaris-2.10-i86pc_64-ucs2
py2.6-solaris-i86pc = py2.6-solaris-2.10-i86pc_32-ucs2 py2.6-solaris-2.10-i86pc_64-ucs2
py2.7-solaris-i86pc = py2.7-solaris-2.10-i86pc_32-ucs2 py2.7-solaris-2.10-i86pc_64-ucs2
py2.5-solaris-sun4u = py2.5-solaris-2.10-sun4u_32-ucs2 py2.5-solaris-2.10-sun4u_64-ucs2
py2.6-solaris-sun4u = py2.6-solaris-2.10-sun4u_32-ucs2 py2.6-solaris-2.10-sun4u_64-ucs2
py2.7-solaris-sun4u = py2.7-solaris-2.10-sun4u_32-ucs2 py2.7-solaris-2.10-sun4u_64-ucs2
py2.5-solaris = py2.5-solaris-i86pc py2.5-solaris-sun4u
py2.6-solaris = py2.6-solaris-i86pc py2.6-solaris-sun4u
py2.7-solaris = py2.7-solaris-i86pc py2.7-solaris-sun4u
solaris-i86pc = py2.5-solaris-i86pc py2.6-solaris-i86pc py2.7-solaris-i86pc
solaris-sun4u = py2.5-solaris-sun4u py2.6-solaris-sun4u py2.7-solaris-sun4u
solaris = solaris-i86pc solaris-sun4u
py2.5-all = py2.5-linux py2.5-macosx py2.5-solaris
py2.6-all = py2.6-linux py2.6-macosx py2.6-solaris
py2.7-all = py2.7-linux py2.7-macosx py2.7-solaris
macosx = py2.6-macosx py2.7-macosx
py2.6-all = py2.6-linux py2.6-macosx
py2.7-all = py2.7-linux py2.7-macosx
; the 'all' key is used internally by the build system to specify which hosts
; to build on when no hosts are specified on the dist-eggs.py command line.
all = linux macosx solaris
all = linux macosx
; the 'noplatform' key, likewise, is for which build hosts should be used when
; building pure python (noplatform) eggs.
noplatform = py2.5 py2.6 py2.7
noplatform = py2.6 py2.7
; don't build these eggs on these platforms:
[ignore]
ctypes = py2.5-linux-i686-ucs2 py2.5-linux-i686-ucs4 py2.6-linux-i686-ucs2 py2.6-linux-i686-ucs4 py2.7-linux-i686-ucs2 py2.7-linux-i686-ucs4 py2.5-linux-x86_64-ucs2 py2.5-linux-x86_64-ucs4 py2.6-linux-x86_64-ucs2 py2.6-linux-x86_64-ucs4 py2.7-linux-x86_64-ucs2 py2.7-linux-x86_64-ucs4 py2.5-macosx-10.3-fat-ucs2 py2.6-macosx-10.3-fat-ucs2 py2.6-macosx-10.6-universal-ucs2 py2.7-macosx-10.3-fat-ucs2 py2.5-solaris-2.10-i86pc_32-ucs2 py2.6-solaris-2.10-i86pc_32-ucs2 py2.7-solaris-2.10-i86pc_32-ucs2 py2.5-solaris-2.10-i86pc_64-ucs2 py2.6-solaris-2.10-i86pc_64-ucs2 py2.7-solaris-2.10-i86pc_64-ucs2 py2.5-solaris-2.10-sun4u_32-ucs2 py2.6-solaris-2.10-sun4u_32-ucs2 py2.7-solaris-2.10-sun4u_32-ucs2 py2.5-solaris-2.10-sun4u_64-ucs2 py2.6-solaris-2.10-sun4u_64-ucs2 py2.7-solaris-2.10-sun4u_64-ucs2
;ctypes =
+4 -4
View File
@@ -21,7 +21,7 @@ MySQL_python = 1.2.3c1
PyRods = 3.2.4
numpy = 1.6.0
pbs_python = 4.3.5
psycopg2 = 2.0.13
psycopg2 = 2.5.1
pycrypto = 2.5
pysam = 0.4.2
pysqlite = 2.5.6
@@ -38,7 +38,7 @@ Beaker = 1.4
boto = 2.5.2
decorator = 3.1.2
docutils = 0.7
drmaa = 0.4b3
drmaa = 0.6
elementtree = 1.2.6_20050316
Fabric = 1.7.0
GeneTrack = 2.0.0_beta_1
@@ -72,7 +72,7 @@ raven = 3.1.8
; extra version information
[tags]
psycopg2 = _8.4.2_static
psycopg2 = _9.2.4_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
bx_python = _7b95ff194725
@@ -83,7 +83,7 @@ pysam = _kanwei_b10f6e722e9a
; the wiki page above
[source]
MySQL_python = mysql-5.1.41
psycopg2 = postgresql-8.4.2
psycopg2 = postgresql-9.2.4
pysqlite = sqlite-amalgamation-3_6_17
[dependencies]
@@ -100,19 +100,14 @@ def get_installed_repositories_from_repository_dependencies( trans, repository_d
continue
# rd_key is something like: 'http://localhost:9009__ESEP__package_rdkit_2012_12__ESEP__test__ESEP__d635ffb9c665__ESEP__True'
# rd_val is something like: [['http://localhost:9009', 'package_numpy_1_7', 'test', 'cddd64ecd985', 'True']]
try:
tool_shed, name, owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td = \
container_util.get_components_from_key( rd_key )
except:
tool_shed, name, owner, changeset_revision = container_util.get_components_from_key( rd_val )
repository_components_tuple = container_util.get_components_from_key( rd_key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
tool_shed, name, owner, changeset_revision = components_list[ 0:4 ]
installed_repository = suc.get_tool_shed_repository_by_shed_name_owner_changeset_revision( trans.app, tool_shed, name, owner, changeset_revision )
if installed_repository not in installed_repositories:
installed_repositories.append( installed_repository )
for rd_val in rd_vals:
try:
tool_shed, name, owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td = rd_val
except:
tool_shed, name, owner, changeset_revision = rd_val
tool_shed, name, owner, changeset_revision = rd_val[ 0:4 ]
installed_repository = suc.get_tool_shed_repository_by_shed_name_owner_changeset_revision( trans.app, tool_shed, name, owner, changeset_revision )
if installed_repository not in installed_repositories:
installed_repositories.append( installed_repository )
@@ -631,13 +626,10 @@ def merge_containers_dicts_for_new_install( containers_dicts ):
# Change the folder id so it won't confict with others being merged.
old_container_repository_dependencies_folder.id = folder_id
folder_id += 1
repository_components_tuple = container_util.get_components_from_key( old_container_repository_dependencies_folder.key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
name = components_list[ 1 ]
# Generate the label by retrieving the repository name.
try:
toolshed, name, owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td = \
container_util.get_components_from_key( old_container_repository_dependencies_folder.key )
except ValueError:
# For backward compatibility to the 12/20/12 Galaxy release.
toolshed, name, owner, changeset_revision = container_util.get_components_from_key( old_container_repository_dependencies_folder.key )
old_container_repository_dependencies_folder.label = str( name )
repository_dependencies_folder.folders.append( old_container_repository_dependencies_folder )
# Merge tool_dependencies.
+11 -10
View File
@@ -352,19 +352,20 @@ def get_required_repo_info_dicts( trans, tool_shed_url, repo_info_dicts ):
for key, val in repository_dependencies.items():
if key in [ 'root_key', 'description' ]:
continue
try:
toolshed, name, owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td = \
container_util.get_components_from_key( key )
components_list = [ toolshed, name, owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td ]
except ValueError:
# For backward compatibility to the 12/20/12 Galaxy release, default prior_installation_required and only_if_compiling_contained_td
# to False in the caller.
toolshed, name, owner, changeset_revision = container_util.get_components_from_key( key )
components_list = [ toolshed, name, owner, changeset_revision ]
only_if_compiling_contained_td = 'False'
repository_components_tuple = container_util.get_components_from_key( key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
# Skip listing a repository dependency if it is required only to compile a tool dependency defined for the dependent repository since
# in this case, the repository dependency is really a dependency of the dependent repository's contained tool dependency, and only if
# that tool dependency requires compilation.
# For backward compatibility to the 12/20/12 Galaxy release.
prior_installation_required = 'False'
only_if_compiling_contained_td = 'False'
if len( components_list ) == 4:
prior_installation_required = 'False'
only_if_compiling_contained_td = 'False'
elif len( components_list ) == 5:
prior_installation_required = components_list[ 4 ]
only_if_compiling_contained_td = 'False'
if not util.asbool( only_if_compiling_contained_td ):
if components_list not in required_repository_tups:
required_repository_tups.append( components_list )
+29 -22
View File
@@ -855,7 +855,7 @@ def build_repository_containers_for_tool_shed( trans, repository, changeset_revi
folder_id, data_managers_root_folder = build_invalid_data_managers_folder( trans, folder_id, data_managers, error_messages, label="Invalid Data Managers" )
containers_dict[ 'invalid_data_managers' ] = data_managers_root_folder
except Exception, e:
log.debug( "Exception in build_repository_containers_for_tool_shed: %s" % str( e ) )
log.exception( "Exception in build_repository_containers_for_tool_shed: %s" % str( e ) )
finally:
lock.release()
return containers_dict
@@ -1325,29 +1325,31 @@ def get_components_from_key( key ):
repository_name = items[ 1 ]
repository_owner = items[ 2 ]
changeset_revision = items[ 3 ]
if len( items ) >= 5:
try:
prior_installation_required = items[ 4 ]
except:
prior_installation_required = 'False'
try:
only_if_compiling_contained_td = items[ 5 ]
except:
only_if_compiling_contained_td = 'False'
if len( items ) == 5:
prior_installation_required = items[ 4 ]
return toolshed_base_url, repository_name, repository_owner, changeset_revision, prior_installation_required
elif len( items ) == 6:
prior_installation_required = items[ 4 ]
only_if_compiling_contained_td = items[ 5 ]
return toolshed_base_url, repository_name, repository_owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td
else:
# For backward compatibility to the 12/20/12 Galaxy release we have to return the following, and callers must handle exceptions.
return toolshed_base_url, repository_name, repository_owner, changeset_revision
def handle_repository_dependencies_container_entry( trans, repository_dependencies_folder, rd_key, rd_value, folder_id, repository_dependency_id, folder_keys ):
try:
toolshed, repository_name, repository_owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td = \
get_components_from_key( rd_key )
except ValueError:
# For backward compatibility to the 12/20/12 Galaxy release, default prior_installation_required and only_if_compiling_contained_td to 'False'.
toolshed, repository_name, repository_owner, changeset_revision = get_components_from_key( rd_key )
repository_components_tuple = get_components_from_key( rd_key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
toolshed, repository_name, repository_owner, changeset_revision = components_list[ 0:4 ]
# For backward compatibility to the 12/20/12 Galaxy release.
if len( components_list ) == 4:
prior_installation_required = 'False'
only_if_compiling_contained_td = 'False'
elif len( components_list ) == 5:
prior_installation_required = components_list[ 4 ]
only_if_compiling_contained_td = 'False'
elif len( components_list ) == 6:
prior_installation_required = components_list[ 4 ]
only_if_compiling_contained_td = components_list[ 5 ]
folder = get_folder( repository_dependencies_folder, rd_key )
label = generate_repository_dependencies_folder_label_from_key( repository_name,
repository_owner,
@@ -1416,14 +1418,19 @@ def is_subfolder_of( folder, repository_dependency ):
return False
def key_is_current_repositorys_key( repository_name, repository_owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td, key ):
try:
toolshed_base_url, key_name, key_owner, key_changeset_revision, key_prior_installation_required, key_only_if_compiling_contained_td = \
get_components_from_key( key )
except ValueError:
# For backward compatibility to the 12/20/12 Galaxy release, default key_prior_installation_required to False.
toolshed_base_url, key_name, key_owner, key_changeset_revision = get_components_from_key( key )
repository_components_tuple = get_components_from_key( key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
toolshed, key_name, key_owner, key_changeset_revision = components_list[ 0:4 ]
# For backward compatibility to the 12/20/12 Galaxy release.
if len( components_list ) == 4:
key_prior_installation_required = 'False'
key_only_if_compiling_contained_td = 'False'
elif len( components_list ) == 5:
key_prior_installation_required = components_list[ 4 ]
key_only_if_compiling_contained_td = 'False'
elif len( components_list ) == 6:
key_prior_installation_required = components_list[ 4 ]
key_only_if_compiling_contained_td = components_list[ 5 ]
if repository_name == key_name and \
repository_owner == key_owner and \
changeset_revision == key_changeset_revision and \
@@ -36,12 +36,9 @@ def build_repository_dependency_relationships( trans, repo_info_dicts, tool_shed
if key in [ 'root_key', 'description' ]:
continue
d_repository = None
try:
d_toolshed, d_name, d_owner, d_changeset_revision, d_prior_installation_required, d_only_if_compiling_contained_td = \
container_util.get_components_from_key( key )
except ValueError:
# For backward compatibility to the 12/20/12 Galaxy release.
d_toolshed, d_name, d_owner, d_changeset_revision = container_util.get_components_from_key( key )
repository_components_tuple = container_util.get_components_from_key( key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
d_toolshed, d_name, d_owner, d_changeset_revision = components_list[ 0:4 ]
for tsr in tool_shed_repositories:
# Get the the tool_shed_repository defined by name, owner and changeset_revision. This is the repository that will be
# dependent upon each of the tool shed repositories contained in val. We'll need to check tool_shed_repository.tool_shed
@@ -437,22 +434,22 @@ def get_updated_changeset_revisions_for_repository_dependencies( trans, key_rd_d
# We have the updated changset revision.
updated_key_rd_dicts.append( new_key_rd_dict )
else:
try:
toolshed, repository_name, repository_owner, repository_changeset_revision, prior_installation_required, rd_only_if_compiling_contained_td = \
container_util.get_components_from_key( key )
except ValueError:
# For backward compatibility to the 12/20/12 Galaxy release.
toolshed, repository_name, repository_owner, repository_changeset_revision = container_util.get_components_from_key( key )
repository_components_tuple = container_util.get_components_from_key( key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
toolshed, repository_name, repository_owner, repository_changeset_revision = components_list[ 0:4 ]
# For backward compatibility to the 12/20/12 Galaxy release.
if len( components_list ) == 4:
prior_installation_required = 'False'
rd_only_if_compiling_contained_td = 'False'
elif len( components_list ) == 5:
rd_only_if_compiling_contained_td = 'False'
message = "The revision %s defined for repository %s owned by %s is invalid, so repository dependencies defined for repository %s will be ignored." % \
( str( rd_changeset_revision ), str( rd_name ), str( rd_owner ), str( repository_name ) )
log.debug( message )
else:
try:
toolshed, repository_name, repository_owner, repository_changeset_revision, prior_installation_required, only_if_compiling_contained_td = \
container_util.get_components_from_key( key )
except ValueError:
# For backward compatibility to the 12/20/12 Galaxy release.
toolshed, repository_name, repository_owner, repository_changeset_revision = container_util.get_components_from_key( key )
repository_components_tuple = container_util.get_components_from_key( key )
components_list = suc.extract_components_from_tuple( repository_components_tuple )
toolshed, repository_name, repository_owner, repository_changeset_revision = components_list[ 0:4 ]
message = "The revision %s defined for repository %s owned by %s is invalid, so repository dependencies defined for repository %s will be ignored." % \
( str( rd_changeset_revision ), str( rd_name ), str( rd_owner ), str( repository_name ) )
log.debug( message )
+15
View File
@@ -307,6 +307,21 @@ def create_or_update_tool_shed_repository( app, name, description, installed_cha
sa_session.flush()
return tool_shed_repository
def extract_components_from_tuple( repository_components_tuple ):
'''Extract the repository components from the provided tuple in a backward-compatible manner.'''
toolshed = repository_components_tuple[ 0 ]
name = repository_components_tuple[ 1 ]
owner = repository_components_tuple[ 2 ]
changeset_revision = repository_components_tuple[ 3 ]
components_list = [ toolshed, name, owner, changeset_revision ]
if len( repository_components_tuple ) == 5:
toolshed, name, owner, changeset_revision, prior_installation_required = repository_components_tuple
components_list = [ toolshed, name, owner, changeset_revision, prior_installation_required ]
elif len( repository_components_tuple ) == 6:
toolshed, name, owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td = repository_components_tuple
components_list = [ toolshed, name, owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td ]
return components_list
def generate_clone_url_for_installed_repository( app, repository ):
"""Generate the URL for cloning a repository that has been installed into a Galaxy instance."""
tool_shed_url = get_url_from_tool_shed( app, repository.tool_shed )
+228 -136
View File
@@ -17,6 +17,34 @@ var GalaxyUpload = Backbone.View.extend(
// upload mod
uploadbox: null,
// extension types
select_extension : {
'' : 'Auto-detect',
'bed' : 'bed',
'ab1' : 'ab1'
},
// states
state : {
init : 'fa-icon-trash',
done : 'fa-icon-caret-down'
},
// counter
counter : {
// stats
announce : 0,
success : 0,
error : 0,
running : 0,
// reset stats
reset : function()
{
this.announce = this.success = this.error = this.running = 0;
}
},
// initialize
initialize : function()
{
@@ -58,21 +86,18 @@ var GalaxyUpload = Backbone.View.extend(
event_mouseleave : function (e)
{
},
// start
event_announce : function(index, file, message)
{
// hide info
this.uploadbox.info().hide();
// make id
var id = '#upload-' + index;
// add upload item
$(this.el).append(this.template_file(id));
$(this.el).append(this.template_file(id, this.select_extension));
// scroll to bottom
$(this.el).scrollTop($(this.el).prop('scrollHeight'));
//$(this.el).scrollTop($(this.el).prop('scrollHeight'));
// access upload item
var it = this.get_upload_item(index);
@@ -84,59 +109,27 @@ var GalaxyUpload = Backbone.View.extend(
it.find('.title').html(file.name);
// configure select field
it.find('#extension').select2(
{
placeholder: 'Auto-detect',
width: 'copy',
ajax: {
url: "http://www.weighttraining.com/sm/search",
dataType: 'jsonp',
quietMillis: 100,
data: function(term, page)
{
return {
types: ["exercise"],
limit: -1,
term: term
};
},
results: function(data, page)
{
return { results: data.results.exercise }
}
},
formatResult: function(exercise)
{
return "<div class='select2-user-result'>" + exercise.term + "</div>";
},
formatSelection: function(exercise)
{
return exercise.term;
},
initSelection : function (element, callback)
{
var elementText = $(element).attr('data-init-text');
callback({"term":elementText});
}
});
//it.find('#extension').select2();
// add functionality to remove button
var self = this;
it.find('.remove').on('click', function() { self.event_remove (index) });
it.find('.symbol').on('click', function() { self.event_remove (index) });
// initialize progress
this.event_progress(index, file, 0);
// update button status
this.modal.enable('Upload');
this.modal.enable('Reset');
// update counter
this.counter.announce++;
// update screen
this.update_screen();
},
// start
event_initialize : function(index, file, message)
{
// update on screen counter
this.button_show.number(message);
this.button_show.number(this.counter.announce);
// get element
var it = this.get_upload_item(index);
@@ -168,16 +161,9 @@ var GalaxyUpload = Backbone.View.extend(
it.find('.info').html(percentage + '% of ' + this.size_to_string (file.size));
},
// end
// success
event_success : function(index, file, message)
{
// get element
var it = this.get_upload_item(index);
// update progress frame
it.addClass('panel-success');
it.removeClass('panel-default');
{
// update galaxy history
Galaxy.currHistoryPanel.refresh();
@@ -186,11 +172,46 @@ var GalaxyUpload = Backbone.View.extend(
// update on screen counter
this.button_show.number('');
// update counter
this.counter.announce--;
this.counter.success++;
// update on screen info
this.update_screen();
// get element
var it = this.get_upload_item(index);
// update progress frame
it.addClass('panel-success');
it.removeClass('panel-default');
// update icon
var sy = it.find('.symbol');
sy.removeClass('fa-icon-spin');
sy.removeClass('fa-icon-spinner');
// set status
sy.addClass(this.state.done);
},
// end
// error
event_error : function(index, file, message)
{
// make sure progress is shown correctly
this.event_progress(index, file, 0);
// update on screen counter
this.button_show.number('');
// update counter
this.counter.announce--;
this.counter.error++;
// update on screen info
this.update_screen();
// get element
var it = this.get_upload_item(index);
@@ -204,29 +225,41 @@ var GalaxyUpload = Backbone.View.extend(
// write error message
it.find('.error').html('<strong>Failed:</strong> ' + message);
// make sure progress is shown correctly
this.event_progress(index, file, 0);
// update icon
var sy = it.find('.symbol');
sy.removeClass('fa-icon-spin');
sy.removeClass('fa-icon-spinner');
// update on screen counter
this.button_show.number('');
// set status
sy.addClass(this.state.done);
},
// start upload process
event_upload : function()
{
// check
if (this.counter.announce == 0 || this.counter.running > 0)
return;
// switch icons for new uploads
var self = this;
$(this.el).find('.symbol').each(function()
{
if($(this).hasClass(self.state.init))
{
$(this).removeClass(self.state.init);
$(this).addClass('fa-icon-spinner');
$(this).addClass('fa-icon-spin');
}
});
// hide configuration
$(this.el).find('.panel-body').hide();
// switch icon
$(this.el).find('.remove').each(function()
{
$(this).removeClass('fa-icon-trash');
$(this).addClass('fa-icon-caret-down');
});
// update button status
this.modal.disable('Upload');
// update running
this.counter.running = this.counter.announce;
this.update_screen();
// configure url
var current_history = Galaxy.currHistoryPanel.model.get('id');
this.uploadbox.configure({url : galaxy_config.root + "api/histories/" + current_history + "/contents"});
@@ -235,62 +268,62 @@ var GalaxyUpload = Backbone.View.extend(
this.uploadbox.upload();
},
// queue is done
event_complete: function()
{
// update running
this.counter.running = 0;
this.update_screen();
},
// remove all
event_reset : function()
{
// remove from screen
var panels = $(this.el).find('.panel');
var self = this;
panels.fadeOut({complete: function()
// make sure queue is not running
if (this.counter.running == 0)
{
// remove panels
panels.remove();
// remove from screen
var panels = $(this.el).find('.panel');
panels.fadeOut({complete: function() { panels.remove(); }});
// reset counter
this.counter.reset();
// show on screen info
self.uploadbox.info().fadeIn();
}});
// update button status
this.modal.disable('Upload');
this.modal.disable('Reset');
// remove from queue
this.uploadbox.reset();
this.update_screen();
// remove from queue
this.uploadbox.reset();
}
},
// remove item from upload list
event_remove : function(index)
{
// remove
var self = this;
// get item
var it = this.get_upload_item(index);
// fade out and update button status
it.fadeOut({complete: function()
{
// remove from screen
it.remove();
// remove from queue
self.uploadbox.remove(index);
// update reset button
if ($(self.el).find('.panel').length > 0)
self.modal.enable('Reset');
else {
// disable reset button
self.modal.disable('Reset');
var sy = it.find('.symbol');
// show on screen info
self.uploadbox.info().fadeIn();
}
// only remove from queue if not in processing line
if (sy.hasClass(this.state.init) || sy.hasClass(this.state.done))
{
// reduce counter
if (it.hasClass('panel-default'))
this.counter.announce--;
else if (it.hasClass('panel-success'))
this.counter.success--;
else if (it.hasClass('panel-danger'))
this.counter.error--;
// update upload button
if (self.uploadbox.length() > 0)
self.modal.enable('Upload');
else
self.modal.disable('Upload');
}});
// show on screen info
this.update_screen();
// remove from queue
this.uploadbox.remove(index);
// remove element
it.remove();
}
},
// show/hide upload frame
@@ -330,11 +363,11 @@ var GalaxyUpload = Backbone.View.extend(
success : function(index, file, message) { self.event_success(index, file, message) },
progress : function(index, file, message) { self.event_progress(index, file, message) },
error : function(index, file, message) { self.event_error(index, file, message) },
complete : function() { self.event_complete() },
});
// update button status
this.modal.disable('Upload');
this.modal.disable('Reset');
// setup info
this.update_screen();
}
// show modal
@@ -362,34 +395,93 @@ var GalaxyUpload = Backbone.View.extend(
return "<strong>" + (Math.round(size) / 10) + "</strong> " + unit;
},
// set screen
update_screen: function ()
{
/*
update on screen info
*/
// check default message
if(this.counter.announce == 0)
{
if (this.uploadbox.compatible)
message = 'Drag&drop files into this box or click \'Select\' to select files!';
else
message = 'Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Please upgrade to i.e. Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+.'
} else {
if (this.counter.running == 0)
message = 'You added ' + this.counter.announce + ' file(s) to the queue. Add more files or click "Upload" to proceed.';
else
message = 'Please wait...' + this.counter.announce + ' out of ' + this.counter.running + ' remaining.';
}
// set html content
$('#upload-info').html(message);
/*
update button status
*/
// update reset button
if (this.counter.running == 0 && this.counter.announce + this.counter.success + this.counter.error > 0)
this.modal.enable('Reset');
else
this.modal.disable('Reset');
// update upload button
if (this.counter.running == 0 && this.counter.announce > 0)
this.modal.enable('Upload');
else
this.modal.disable('Upload');
// select upload button
if (this.counter.running == 0)
this.modal.enable('Select');
else
this.modal.disable('Select');
},
// load html template
template: function(id)
{
return '<div id="' + id + '" class="upload-box"></div>';
return '<div id="' + id + '" class="upload-box"></div><h6 id="upload-info" class="upload-info"></h6>';
},
// load html template
template_file: function(id)
template_file: function(id, select_extension)
{
return '<div id="' + id.substr(1) + '" class="panel panel-default">' +
'<div class="panel-heading">' +
'<h5 class="title"></h5>' +
'<h5 class="info"></h5>' +
'<div class="remove fa-icon-trash"></div>' +
'</div>' +
'<div class="panel-body">' +
'<div class="menu">' +
//'<input id="extension" type="hidden" width="10px"/>&nbsp;' +
'<span><input id="space_to_tabs" type="checkbox">Convert spaces to tabs</input></span>' +
// start template
var tmpl = '<div id="' + id.substr(1) + '" class="panel panel-default">' +
'<div class="panel-heading">' +
'<h5 class="title"></h5>' +
'<h5 class="info"></h5>' +
'<div class="symbol ' + this.state.init + '"></div>' +
'</div>' +
'</div>' +
'<div class="panel-footer">' +
'<div class="progress">' +
'<div class="progress-bar progress-bar-success"></div>' +
'<div class="panel-body">' +
'<div class="menu">' +
'Select file type: ' +
'<select id="extension">';
// add file types to selection
for (key in select_extension)
tmpl += '<option value="' + key + '">' + select_extension[key] + '</option>';
// continue template
tmpl += '</select>,&nbsp;' +
'<span>Convert space to tabs: <input id="space_to_tabs" type="checkbox"></input></span>' +
'</div>' +
'</div>' +
'<h6 class="error"></h6>' +
'</div>' +
'</div>';
'<div class="panel-footer">' +
'<div class="progress">' +
'<div class="progress-bar progress-bar-success"></div>' +
'</div>' +
'<h6 class="error"></h6>' +
'</div>' +
'</div>';
// return html string
return tmpl;
}
});
+28 -24
View File
@@ -1,7 +1,7 @@
/*
Copyright 2012 Igor Vaynberg
Version: 3.4.2 Timestamp: Mon Aug 12 15:04:12 PDT 2013
Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
@@ -688,15 +688,19 @@ the specific language governing permissions and limitations under the Apache Lic
this.opts.element
.data("select2", this)
.attr("tabindex", "-1")
.before(this.container);
.before(this.container)
.on("click.select2", killEvent); // do not leak click events
this.container.data("select2", this);
this.dropdown = this.container.find(".select2-drop");
this.dropdown.addClass(evaluate(opts.dropdownCssClass));
this.dropdown.data("select2", this);
syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
this.dropdown.addClass(evaluate(opts.dropdownCssClass));
this.dropdown.data("select2", this);
this.dropdown.on("click", killEvent);
this.results = results = this.container.find(resultsSelector);
this.search = search = this.container.find("input.select2-input");
@@ -707,6 +711,8 @@ the specific language governing permissions and limitations under the Apache Lic
// initialize the container
this.initContainer();
this.container.on("click", killEvent);
installFilteredMouseMove(this.results);
this.dropdown.on("mousemove-filtered touchstart touchmove touchend", resultsSelector, this.bind(this.highlightUnderEvent));
@@ -968,10 +974,11 @@ the specific language governing permissions and limitations under the Apache Lic
opts.initSelection = function (element, callback) {
var data = [];
$(splitVal(element.val(), opts.separator)).each(function () {
var id = this, text = this, tags=opts.tags;
var obj = { id: this, text: this },
tags = opts.tags;
if ($.isFunction(tags)) tags=tags();
$(tags).each(function() { if (equal(this.id, id)) { text = this.text; return false; } });
data.push({id: id, text: text});
$(tags).each(function() { if (equal(this.id, obj.id)) { obj = this; return false; } });
data.push(obj);
});
callback(data);
@@ -1320,7 +1327,7 @@ the specific language governing permissions and limitations under the Apache Lic
$("#select2-drop-mask").hide();
this.dropdown.removeAttr("id"); // only the active dropdown has the select2-drop id
this.dropdown.hide();
this.container.removeClass("select2-dropdown-open");
this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");
this.results.empty();
@@ -1395,7 +1402,7 @@ the specific language governing permissions and limitations under the Apache Lic
// abstract
findHighlightableChoices: function() {
return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");
return this.results.find(".select2-result-selectable:not(.select2-disabled)");
},
// abstract
@@ -1926,10 +1933,7 @@ the specific language governing permissions and limitations under the Apache Lic
killEvent(e);
return;
case KEY.TAB:
// if selectOnBlur == true, select the currently highlighted option
if (this.opts.selectOnBlur) {
this.selectHighlighted({noFocus: true});
}
this.selectHighlighted({noFocus: true});
return;
case KEY.ESC:
this.cancel(e);
@@ -2046,6 +2050,11 @@ the specific language governing permissions and limitations under the Apache Lic
clear: function(triggerChange) {
var data=this.selection.data("select2-data");
if (data) { // guard against queued quick consecutive clicks
var evt = $.Event("select2-clearing");
this.opts.element.trigger(evt);
if (evt.isDefaultPrevented()) {
return;
}
var placeholderOption = this.getPlaceholderOption();
this.opts.element.val(placeholderOption ? placeholderOption.val() : "");
this.selection.find(".select2-chosen").empty();
@@ -2083,7 +2092,7 @@ the specific language governing permissions and limitations under the Apache Lic
isPlaceholderOptionSelected: function() {
var placeholderOption;
if (!this.opts.placeholder) return false; // no placeholder specified so no option should be considered
if (!this.getPlaceholder()) return false; // no placeholder specified so no option should be considered
return ((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.is(':selected'))
|| (this.opts.element.val() === "")
|| (this.opts.element.val() === undefined)
@@ -2216,7 +2225,7 @@ the specific language governing permissions and limitations under the Apache Lic
this.close();
if (!options || !options.noFocus)
this.selection.focus();
this.focusser.focus();
if (!equal(old, this.id(data))) { this.triggerChange({added:data,removed:oldData}); }
},
@@ -2442,7 +2451,7 @@ the specific language governing permissions and limitations under the Apache Lic
this.selection = selection = this.container.find(selector);
var _this = this;
this.selection.on("click", ".select2-search-choice", function (e) {
this.selection.on("click", ".select2-search-choice:not(.select2-locked)", function (e) {
//killEvent(e);
_this.search[0].focus();
_this.selectChoice($(this));
@@ -2521,10 +2530,7 @@ the specific language governing permissions and limitations under the Apache Lic
killEvent(e);
return;
case KEY.TAB:
// if selectOnBlur == true, select the currently highlighted option
if (this.opts.selectOnBlur) {
this.selectHighlighted({noFocus:true});
}
this.selectHighlighted({noFocus:true});
this.close();
return;
case KEY.ESC:
@@ -2842,9 +2848,7 @@ the specific language governing permissions and limitations under the Apache Lic
return;
}
index = indexOf(this.id(data), val);
if (index >= 0) {
while((index = indexOf(this.id(data), val)) >= 0) {
val.splice(index, 1);
this.setVal(val);
if (this.select) this.postprocessResults();
@@ -2925,7 +2929,7 @@ the specific language governing permissions and limitations under the Apache Lic
searchWidth = minimumWidth;
}
this.search.width(searchWidth);
this.search.width(Math.floor(searchWidth));
},
// multi
+5 -1
View File
@@ -82,6 +82,10 @@ var HDABaseView = Backbone.View.extend( LoggableMixin ).extend(
this.$el.attr( 'id', 'historyItemContainer-' + id );
//HACK: hover exit doesn't seem to be called on prev. tooltips when RE-rendering - so: no tooltip hide
// handle that here by removing previous view's tooltips
this.$el.find("[title]").tooltip( "destroy" );
/** web controller urls for functions relating to this hda.
* These are rendered from urlTemplates using the model data. */
this.urls = this._renderUrls( this.urlTemplates, this.model.toJSON() );
@@ -247,7 +251,7 @@ var HDABaseView = Backbone.View.extend( LoggableMixin ).extend(
var self = this;
displayBtnData.on_click = function(){
Galaxy.frame_manager.frame_new({
title : "Data Viewer",
title : "Data Viewer: " + self.model.get('name'),
type : "url",
location: "center",
content : self.urls.display
+1
View File
@@ -166,6 +166,7 @@ var HDAEditView = HDABaseView.extend( LoggableMixin ).extend(
success: function() {
// FIXME: setting model attribute causes re-rendering, which is unnecessary.
//self.$el.remove();
self.model.set({ deleted: true });
}
});
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
define(["libs/backbone/backbone-relational"],function(){var a=Backbone.View.extend({el_main:"#everything",options:{title:"galaxy-modal",body:"No content available."},initialize:function(b){if(b){this.create(b);$(this.el).hide()}},show:function(b){if(b){this.create(b)}this.$el.fadeIn("fast")},hide:function(){this.$el.fadeOut("fast")},create:function(c){this.$el.remove();if(!c){c=this.options}else{c=_.defaults(c,this.options)}this.setElement(this.template(c.title,c.body));$(this.el_main).append($(this.el));var d=(this.$el).find(".buttons");var b=this;if(c.buttons){$.each(c.buttons,function(e,f){d.append($("<button></button>").text(e).click(f)).append(" ")})}else{d.append($("<button></button>").text("Close").click(function(){b.hide()})).append(" ")}},template:function(c,b){return'<div class="modal in"><div class="modal-backdrop in" style="z-index: -1;"></div><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><span><h3 class="title">'+c+'</h3></span></div><div class="modal-body style="min-width: 540px; max-height: 445px;">'+b+'</div><div class="modal-footer"><div class="buttons" style="float: right;"></div></div></div</div></div>'}});return{GalaxyModal:a}});
define(["libs/backbone/backbone-relational"],function(){var a=Backbone.View.extend({el_main:"#everything",options:{title:"galaxy-modal",body:"No content available."},initialize:function(b){if(b){this.create(b);$(this.el).hide()}},show:function(b){if(b){this.create(b)}this.$el.fadeIn("fast")},hide:function(){this.$el.fadeOut("fast")},create:function(c){this.$el.remove();if(!c){c=this.options}else{c=_.defaults(c,this.options)}this.setElement(this.template(c.title,c.body));$(this.el_main).append($(this.el));var d=(this.$el).find(".buttons");var b=this;if(c.buttons){$.each(c.buttons,function(e,f){d.append($('<button id="'+String(e).toLowerCase()+'"></button>').text(e).click(f)).append(" ")})}else{d.append($("<button></button>").text("Close").click(function(){b.hide()})).append(" ")}},enable:function(b){$(this.el).find("#"+String(b).toLowerCase()).prop("disabled",false)},disable:function(b){$(this.el).find("#"+String(b).toLowerCase()).prop("disabled",true)},template:function(c,b){return'<div class="modal in"><div class="modal-backdrop in" style="z-index: -1;"></div><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><span><h3 class="title">'+c+'</h3></span></div><div class="modal-body style="min-width: 540px; max-height: 445px;">'+b+'</div><div class="modal-footer"><div class="buttons" style="float: right;"></div></div></div</div></div>'}});return{GalaxyModal:a}});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
(function(d){jQuery.event.props.push("dataTransfer");var c={url:"",paramname:"content",maxfilesize:2048,data:{},dragover:function(){},dragleave:function(){},initialize:function(){},start:function(){},progress:function(){},success:function(){},error:function(f,g,h){alert(h)},error_browser:"Your browser does not support drag-and-drop file uploads.",error_filesize:"This file is too large. Please use an FTP client to upload it.",error_default:"The upload failed. Please make sure the file is available and accessible.",text_default:"Drag&drop files here or click to browse your local drive.",text_degrade:"Click here to browse your local drive. <br><br>Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Please upgrade to i.e. Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+."};var a=[];var b=-1;var e=false;d.fn.uploadbox=function(n){var f=d.extend({},c,n);var l=window.File&&window.FileReader&&window.FormData&&window.XMLHttpRequest;this.append('<input id="uploadbox_input" type="file" style="display: none" multiple>');this.append('<div id="uploadbox_info"></div>');if(l){this.find("#uploadbox_info").html(f.text_default)}else{this.find("#uploadbox_info").html(f.text_degrade)}this.on("drop",i);this.on("dragover",j);this.on("dragleave",m);this.on("click",function(p){p.stopPropagation();d("#uploadbox_input").trigger(p)});d("#uploadbox_input").change(function(q){var p=q.target.files;o(p)});function i(q){if(!q.dataTransfer){return}var p=q.dataTransfer.files;o(p);q.preventDefault();return false}function j(p){p.preventDefault();f.dragover.call(this,p)}function m(p){p.stopPropagation();f.dragleave.call(this,p)}function g(p){if(p.lengthComputable){f.progress(this.index,this.file,Math.round((p.loaded*100)/p.total))}}function o(r){var q=a.length;for(var p=0;p<r.length;p++){a.push(r[p])}for(var p=q;p<a.length;p++){f.start(p,a[p],"")}if(!e){h()}}function h(){if(b+1==a.length){e=false;return}e=true;var s=++b;try{var q=new FileReader();var t=a[s];var r=t.size;var p=1048576*f.maxfilesize;q.index=s;if(r<p){q.onloadend=function(v){k(s,t)};q.onerror=function(v){f.error(s,t,f.error_default);e=false};q.readAsDataURL(t)}else{f.error(s,t,f.error_filesize);h()}}catch(u){f.error(s,t,u)}}function k(p,r){var s=new FormData();for(var q in f.data){s.append(q,f.data[q])}s.append(f.paramname,r,r.name);var t=new XMLHttpRequest();t.upload.index=p;t.upload.file=r;t.upload.addEventListener("progress",g,false);t.open("POST",f.url,true);t.setRequestHeader("Accept","application/json");t.setRequestHeader("Cache-Control","no-cache");t.setRequestHeader("X-Requested-With","XMLHttpRequest");t.send(s);t.onloadend=function(){var u=null;if(t.responseText){try{u=jQuery.parseJSON(t.responseText)}catch(v){u=t.responseText}}if(t.status<200||t.status>299){f.error(p,r,t.statusText+" (Server Code "+t.status+")");e=false}else{f.success(p,r,u);h()}}}return this}})(jQuery);
(function(g){jQuery.event.props.push("dataTransfer");var c={url:"",paramname:"content",maxfilesize:250,dragover:function(){},dragleave:function(){},announce:function(){},initialize:function(){},progress:function(){},success:function(){},error:function(i,j,k){alert(k)},complete:function(){},error_browser:"Your browser does not support drag-and-drop file uploads.",error_filesize:"This file is too large (>250MB). Please use an FTP client to upload it.",error_default:"Please make sure the file is available."};var f={};var a={};var b=0;var d=0;var h=false;var e=null;g.fn.uploadbox=function(x){f=g.extend({},c,x);e=this;e.append('<input id="uploadbox_input" type="file" style="display: none" multiple>');e.on("drop",l);e.on("dragover",m);e.on("dragleave",t);g("#uploadbox_input").change(function(y){v(y.target.files)});function l(y){if(!y.dataTransfer){return}v(y.dataTransfer.files);y.preventDefault();return false}function m(y){y.preventDefault();f.dragover.call(y)}function t(y){y.stopPropagation();f.dragleave.call(y)}function i(y){if(y.lengthComputable){f.progress(this.index,this.file,Math.round((y.loaded*100)/y.total))}}function v(A){if(h){return}for(var z=0;z<A.length;z++){var y=String(b++);a[y]=A[z];d++;f.announce(y,a[y],"")}}function o(y){if(a[y]){delete a[y];d--}}function j(){if(d==0){h=false;f.complete();return}else{h=true}var B=-1;for(var D in a){B=D;break}var C=a[B];o(B);var F=f.initialize(B,C);try{var z=new FileReader();var A=C.size;var y=1048576*f.maxfilesize;z.index=B;if(A<y){z.onload=function(G){n(B,C,F)};z.onerror=function(G){r(B,C,f.error_default)};z.readAsDataURL(C)}else{r(B,C,f.error_filesize)}}catch(E){r(B,C,E)}}function n(y,A,B){var C=new FormData();for(var z in B){C.append(z,B[z])}C.append(f.paramname,A,A.name);var D=new XMLHttpRequest();D.upload.index=y;D.upload.file=A;D.upload.addEventListener("progress",i,false);D.open("POST",f.url,true);D.setRequestHeader("Accept","application/json");D.setRequestHeader("Cache-Control","no-cache");D.setRequestHeader("X-Requested-With","XMLHttpRequest");D.send(C);D.onloadend=function(){var E=null;if(D.responseText){try{E=jQuery.parseJSON(D.responseText)}catch(F){E=D.responseText}}if(D.status<200||D.status>299){var G=D.statusText;if(!D.statusText){G=f.error_default}r(y,A,G+" (Server Code "+D.status+")")}else{u(y,A,E)}}}function u(y,z,A){f.success(y,z,A);j()}function r(y,z,A){f.error(y,z,A);j()}function s(){g("#uploadbox_input").trigger("click")}function q(y){for(y in a){o(y)}}function w(){if(!h){j()}}function k(y){f=g.extend({},f,y);return f}function p(){return window.File&&window.FileReader&&window.FormData&&window.XMLHttpRequest}return{select:s,remove:o,upload:w,reset:q,configure:k,compatible:p}}})(jQuery);
+30 -36
View File
@@ -19,11 +19,10 @@
progress : function() {},
success : function() {},
error : function(index, file, message) { alert(message); },
complete : function() {},
error_browser : "Your browser does not support drag-and-drop file uploads.",
error_filesize : "This file is too large (>250MB). Please use an FTP client to upload it.",
error_default : "Please make sure the file is available.",
text_default : "Drag&drop files into this box or click 'Select' to select files!",
text_degrade : "Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Please upgrade to i.e. Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+."
error_default : "Please make sure the file is available."
}
// options
@@ -32,7 +31,7 @@
// file queue
var queue = {};
// counter for file being currently processed
// queue index counter
var queue_index = 0;
// queue length
@@ -50,21 +49,11 @@
// parse options
opts = $.extend({}, default_opts, options);
// compatibility
var mode = window.File && window.FileReader && window.FormData && window.XMLHttpRequest;
// element
el = this;
// append upload button
el.append('<input id="uploadbox_input" type="file" style="display: none" multiple>');
el.append('<div id="uploadbox_info"></div>');
// set info text
if (mode)
el.find('#uploadbox_info').html(opts.text_default);
else
el.find('#uploadbox_info').html(opts.text_degrade);
// attach events
el.on('drop', drop);
@@ -76,6 +65,9 @@
{
// add files to queue
add(e.target.files);
// reset
$(this).val('');
});
// drop event
@@ -120,11 +112,15 @@
// respond to an upload request
function add(files)
{
// only allow adding file if current batch is complete
if (queue_status)
return;
// add new files to queue
for (var i = 0; i < files.length; i++)
{
// new identifier
var index = String(++queue_index);
var index = String(queue_index++);
// add to queue
queue[index] = files[i];
@@ -153,6 +149,15 @@
// process an upload, recursive
function process()
{
// validate
if (queue_length == 0)
{
queue_status = false;
opts.complete();
return;
} else
queue_status = true;
// get an identifier from the queue
var index = -1;
for (var key in queue)
@@ -161,10 +166,6 @@
break;
}
// validate
if (queue_length == 0)
return;
// get current file from queue
var file = queue[index];
@@ -172,7 +173,7 @@
remove(index)
// start
var data = opts.initialize(index, file, length);
var data = opts.initialize(index, file);
// add file to queue
try
@@ -312,12 +313,6 @@
process();
}
// current queue length
function length()
{
return queue_length;
}
// set options
function configure(options)
{
@@ -328,21 +323,20 @@
return opts;
}
// visibility of on screen information
function info()
// verify browser compatibility
function compatible()
{
return el.find('#uploadbox_info');
return window.File && window.FileReader && window.FormData && window.XMLHttpRequest && window.FileList;
}
// export functions
return {
'select' : select,
'remove' : remove,
'upload' : upload,
'reset' : reset,
'length' : length,
'configure' : configure,
'info' : info
'select' : select,
'remove' : remove,
'upload' : upload,
'reset' : reset,
'configure' : configure,
'compatible' : compatible
};
}
})(jQuery);
+10 -8
View File
@@ -1116,16 +1116,17 @@ ul.icons{list-style-type:none;text-indent:-0.75em}ul.icons li [class^="fa-icon-"
.galaxy-frame .frame{z-index:1002;overflow:hidden;position:absolute;background:#fff;border:1px solid #888;-webkit-box-shadow:0 0 5px rgba(0,0,0,0.3);}.galaxy-frame .frame .f-content{position:absolute;overflow:hidden;background:#fff;border:none;top:24px;bottom:3px;left:3px;right:3px}
.galaxy-frame .frame .f-cover{position:absolute;display:none;top:0px;left:0px;height:100%;width:100%;opacity:0.0;background:#fff}
.galaxy-frame .frame .f-iframe{border:none;width:100%;height:100%}
.galaxy-frame .frame .f-header{height:17px;margin:2px;cursor:pointer;border:1px solid #000;background:#2c3143;color:#fff;font-weight:bold}
.galaxy-frame .frame .f-header{height:17px;margin:2px;cursor:pointer;border:1px solid #000;background:#2c3143;color:#fff}
.galaxy-frame .frame .f-title{position:absolute;top:2px;left:16px;right:16px;font-size:12px;font-family:"Lucida Grande",verdana,arial,helvetica,sans-serif;text-align:center}
.galaxy-frame .frame .f-icon{position:absolute;cursor:pointer;font-style:normal}
.galaxy-frame .frame .f-icon{position:absolute;cursor:pointer}
.galaxy-frame .frame .f-not-allowed{cursor:not-allowed}
.galaxy-frame .frame .f-close{right:5px;top:1px}
.galaxy-frame .frame .f-pin{left:6px;top:1px}
.galaxy-frame .frame .f-resize{background:#fff;width:16px;height:16px;color:#2c3143;right:0px;bottom:0px;text-align:center;line-height:16px;border:0px}
.upload-info{font-weight:normal;text-align:center}
.upload-box{width:100%;height:250px;max-height:250px;text-align:center;overflow:scroll;font-size:12px;line-height:1.33;-moz-border-radius:5px;border-radius:5px;border:1px dashed #bfbfbf;padding:20px}.upload-box .panel{display:none}.upload-box .panel .panel-heading{position:relative;height:19px;padding:5px}.upload-box .panel .panel-heading .title{position:absolute;top:2px;font-weight:normal;text-align:left;margin:0px;max-width:300px;overflow:hidden}
.upload-box .panel .panel-heading .info{position:absolute;top:3px;font-weight:normal;right:20px;text-align:right;margin:0px}
.upload-box .panel .panel-heading .remove{position:absolute;cursor:pointer;top:0px;right:3px}
.upload-box .panel .panel-heading .symbol{position:absolute;cursor:pointer;top:0px;right:3px}
.upload-box .panel .panel-body{position:relative;padding:5px}
.upload-box .panel .panel-footer{position:relative;height:20px;padding:0px}.upload-box .panel .panel-footer .progress{height:10px;margin:5px}
.upload-box .panel .panel-footer .error{font-weight:normal;margin:2px}
@@ -1168,12 +1169,12 @@ div.unified-panel-body{position:absolute;top:30px;bottom:0;width:100%}
.panel-warning-message{background-image:url(warn_small.png);background-color:#fce1ba}
.panel-done-message{background-image:url(ok_small.png);background-color:#aff1af}
.panel-info-message{background-image:url(info_small.png);background-color:#a6e4f7}
#masthead{position:absolute;top:0;left:0;width:100%;min-width:980px;padding:0}#masthead .nav{z-index:15001}
#masthead{position:absolute;top:0;left:0;width:100%;min-width:990px;padding:0}#masthead .nav{z-index:15001}
#masthead .nav>li>a{cursor:pointer;text-decoration:none}#masthead .nav>li>a:hover{color:gold}
#masthead li.dropdown>a:hover .caret{border-top-color:gold;border-bottom-color:gold}
#masthead .navbar-brand{position:absolute;left:0;top:0;font-family:verdana;font-weight:bold;font-size:20px;line-height:1;color:white;padding:5px 20px 12px;margin-left:-15px;z-index:2000}#masthead .navbar-brand img{display:inline;width:26px;vertical-align:top}
#masthead .navbar-brand a{color:white;text-decoration:none}
#masthead .iconbar{position:absolute;top:2px;right:110px;cursor:pointer;color:#999;overflow:hidden}#masthead .iconbar .symbol{float:left;margin:0px 8px}
#masthead .iconbar{position:absolute;top:2px;right:110px;cursor:pointer;color:#999;overflow:hidden}#masthead .iconbar .symbol{float:left;margin:0px 10px}
#masthead .iconbar .symbol .number{font-weight:bold;font-size:12px;font-family:"Lucida Grande",verdana,arial,helvetica,sans-serif;position:relative;left:23px;top:-18px}
#masthead .iconbar .toggle{color:#BCC800}
.quota-meter-container{position:absolute;top:0;right:0;height:32px}
@@ -1246,9 +1247,10 @@ input[type="submit"].disabled,button.disabled,input[type="submit"][disabled],but
.errormessage .alert-link,.warningmessage .alert-link,.donemessage .alert-link,.infomessage .alert-link,.errormessagesmall .alert-link,.warningmessagesmall .alert-link,.donemessagesmall .alert-link,.infomessagesmall .alert-link{font-weight:bold}
.errormessage>p,.warningmessage>p,.donemessage>p,.infomessage>p,.errormessagesmall>p,.warningmessagesmall>p,.donemessagesmall>p,.infomessagesmall>p,.errormessage>ul,.warningmessage>ul,.donemessage>ul,.infomessage>ul,.errormessagesmall>ul,.warningmessagesmall>ul,.donemessagesmall>ul,.infomessagesmall>ul{margin-bottom:0}
.errormessage>p+p,.warningmessage>p+p,.donemessage>p+p,.infomessage>p+p,.errormessagesmall>p+p,.warningmessagesmall>p+p,.donemessagesmall>p+p,.infomessagesmall>p+p{margin-top:5px}
.errormessage{background-color:#f9c7c5;border-color:#dd1c15;color:#7e2a27}.errormessage hr{border-top-color:#c61913}
.errormessage .alert-link{color:#571d1b}
.warningmessage,.warningmessagesmall{background-image:url(warn_small.png)}
.errormessage,.errormessagesmall{background-color:#f9c7c5;border-color:#dd1c15;color:#7e2a27}.errormessage hr,.errormessagesmall hr{border-top-color:#c61913}
.errormessage .alert-link,.errormessagesmall .alert-link{color:#571d1b}
.warningmessage,.warningmessagesmall{background-color:#fce1ba;border-color:#e28709;color:#80571e;background-image:url(warn_small.png)}.warningmessage hr,.warningmessagesmall hr{border-top-color:#c97908}
.warningmessage .alert-link,.warningmessagesmall .alert-link{color:#573b14}
.donemessage,.donemessagesmall{background-color:#aff1af;border-color:#20b420;color:#295f29;background-image:url(ok_small.png)}.donemessage hr,.donemessagesmall hr{border-top-color:#1c9e1c}
.donemessage .alert-link,.donemessagesmall .alert-link{color:#193b19}
.infomessage,.infomessagesmall{background-color:#a6e4f7;border-color:#1197c0;color:#1f5566;background-image:url(info_small.png)}.infomessage hr,.infomessagesmall hr{border-top-color:#0f85a8}
+4 -9
View File
@@ -335,7 +335,7 @@ div.unified-panel-body {
top:0;
left:0;
width:100%;
min-width:980px;
min-width:990px;
padding: 0;
.nav {
@@ -398,7 +398,7 @@ div.unified-panel-body {
.symbol
{
float : left;
margin : 0px 8px;
margin : 0px 10px;
}
.symbol .number
@@ -770,28 +770,23 @@ input[type="submit"], button {
background-position: 5px 5px;
}
.errormessage {
.errormessage, .errormessagesmall {
.alert-danger();
}
.warningmessage, .warningmessagesmall {
.alert-warning();
background-image: url(warn_small.png);
//border-color: @warn_message_border;
//background-color: @warn_message_bg;
}
.donemessage, .donemessagesmall {
.alert-success();
background-image: url(ok_small.png);
// border-color: @done_message_border;
// background-color: @done_message_bg;
}
.infomessage, .infomessagesmall {
.alert-info();
background-image: url(info_small.png);
//border-color: @info_message_border;
//background-color: @info_message_bg;
}
.errormark, .warningmark, .donemark, .infomark, .ok_bgr, .err_bgr {
-2
View File
@@ -111,7 +111,6 @@
border : 1px solid @black;
background : @base-color-1;
color : @white;
font-weight : bold;
}
.f-title
@@ -133,7 +132,6 @@
{
position : absolute;
cursor : pointer;
font-style : normal;
}
.f-not-allowed
+7 -1
View File
@@ -1,3 +1,9 @@
.upload-info
{
font-weight: normal;
text-align: center;
}
.upload-box
{
width : 100%;
@@ -43,7 +49,7 @@
margin: 0px;
}
.remove
.symbol
{
position: absolute;
cursor: pointer;
@@ -254,6 +254,49 @@ def execute_uninstall_method( app, deactivate_only=False ):
success = result.wasSuccessful()
return success
def extract_log_data( test_result, from_tool_test=True ):
'''Extract any useful data from the test_result.failures and test_result.errors attributes.'''
for failure in test_result.failures + test_result.errors:
# Record the twill test identifier and information about the tool, so the repository owner can discover which test is failing.
test_id = str( failure[0] )
if not from_tool_test:
tool_id = None
tool_version = None
else:
tool_id, tool_version = get_tool_info_from_test_id( test_id )
test_status = dict( test_id=test_id, tool_id=tool_id, tool_version=tool_version )
log_output = failure[1].replace( '\\n', '\n' )
# Remove debug output that the reviewer or owner doesn't need.
log_output = re.sub( r'control \d+:.+', r'', log_output )
log_output = re.sub( r'\n+', r'\n', log_output )
appending_to = 'output'
tmp_output = {}
output = {}
# Iterate through the functional test output and extract only the important data. Captured logging and stdout are not recorded.
for line in log_output.split( '\n' ):
if line.startswith( 'Traceback' ):
appending_to = 'traceback'
elif '>> end captured' in line or '>> end tool' in line:
continue
elif 'request returned None from get_history' in line:
continue
elif '>> begin captured logging <<' in line:
appending_to = 'logging'
continue
elif '>> begin captured stdout <<' in line:
appending_to = 'stdout'
continue
elif '>> begin captured stderr <<' in line or '>> begin tool stderr <<' in line:
appending_to = 'stderr'
continue
if appending_to not in tmp_output:
tmp_output[ appending_to ] = []
tmp_output[ appending_to ].append( line )
for output_type in [ 'stderr', 'traceback' ]:
if output_type in tmp_output:
test_status[ output_type ] = '\n'.join( tmp_output[ output_type ] )
return test_status
def get_api_url( base, parts=[], params=None, key=None ):
if 'api' in parts and parts.index( 'api' ) != 0:
parts.pop( parts.index( 'api' ) )
@@ -1054,43 +1097,7 @@ def main():
params )
log.debug( 'Revision %s of repository %s installed and passed functional tests.', changeset_revision, name )
else:
# If the functional tests fail, log the output and update the failed changeset revision's metadata record in the tool shed via the API.
for failure in result.failures + result.errors:
# Record the twill test identifier and information about the tool, so the repository owner can discover which test is failing.
test_id = str( failure[0] )
tool_id, tool_version = get_tool_info_from_test_id( test_id )
test_status = dict( test_id=test_id, tool_id=tool_id, tool_version=tool_version )
log_output = failure[1].replace( '\\n', '\n' )
# Remove debug output that the reviewer or owner doesn't need.
log_output = re.sub( r'control \d+:.+', r'', log_output )
log_output = re.sub( r'\n+', r'\n', log_output )
appending_to = 'output'
tmp_output = {}
output = {}
# Iterate through the functional test output and extract only the important data. Captured logging and stdout are not recorded.
for line in log_output.split( '\n' ):
if line.startswith( 'Traceback' ):
appending_to = 'traceback'
elif '>> end captured' in line or '>> end tool' in line:
continue
elif 'request returned None from get_history' in line:
continue
elif '>> begin captured logging <<' in line:
appending_to = 'logging'
continue
elif '>> begin captured stdout <<' in line:
appending_to = 'stdout'
continue
elif '>> begin captured stderr <<' in line or '>> begin tool stderr <<' in line:
appending_to = 'stderr'
continue
if appending_to not in tmp_output:
tmp_output[ appending_to ] = []
tmp_output[ appending_to ].append( line )
for output_type in [ 'stderr', 'traceback' ]:
if output_type in tmp_output:
test_status[ output_type ] = '\n'.join( tmp_output[ output_type ] )
repository_status[ 'failed_tests' ].append( test_status )
repository_status[ 'failed_tests' ] = extract_log_data( result, from_tool_test=True )
# Call the register_test_result method, which executes a PUT request to the repository_revisions API controller with the outcome
# of the tests, and updates tool_test_results with the relevant log data.
# This also sets the do_not_test and tools_functionally correct flags to the appropriate values, and updates the time_last_tested
@@ -1129,7 +1136,7 @@ def main():
name=repository.name,
owner=repository.owner,
changeset_revision=repository.changeset_revision,
error_message=repository.error_message )
error_message=extract_log_data( result, from_tool_test=False ) )
repository_status[ 'installation_errors' ][ 'repository_dependencies' ].append( test_result )
params[ 'tools_functionally_correct' ] = False
params[ 'test_install_error' ] = True
@@ -38,7 +38,7 @@ class TestBasicRepositoryFeatures( ShedTwillTestCase ):
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
category = test_db_util.get_category_by_name( 'Test 0000 Basic Repository Features 1' )
strings_displayed = [ 'Repository %s' % "'%s'" % repository_name,
'Repository %s has been created' % "'%s'" % repository_name ]
'Repository %s has been created' % "<b>%s</b>" % repository_name ]
self.get_or_create_repository( name=repository_name,
description=repository_description,
long_description=repository_long_description,
@@ -58,7 +58,7 @@ class TestRepositoryMultipleOwners( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_2_email, username=common.test_user_2_name )
strings_displayed = [ 'Repository %s' % "'%s'" % datatypes_repository_name,
'Repository %s has been created' % "'%s'" % datatypes_repository_name ]
'Repository %s has been created' % "<b>%s</b>" % datatypes_repository_name ]
repository = self.get_or_create_repository( name=datatypes_repository_name,
description=datatypes_repository_description,
long_description=datatypes_repository_long_description,
@@ -98,7 +98,7 @@ class TestRepositoryMultipleOwners( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
strings_displayed = [ 'Repository %s' % "'%s'" % tool_repository_name,
'Repository %s has been created' % "'%s'" % tool_repository_name ]
'Repository %s has been created' % "<b>%s</b>" % tool_repository_name ]
repository = self.get_or_create_repository( name=tool_repository_name,
description=tool_repository_description,
long_description=tool_repository_long_description,
@@ -93,7 +93,7 @@ class TestRepositoryComponentReviews( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
strings_displayed = [ 'Repository %s' % "'%s'" % repository_name,
'Repository %s has been created' % "'%s'" % repository_name ]
'Repository %s has been created' % "<b>%s</b>" % repository_name ]
repository = self.get_or_create_repository( name=repository_name,
description=repository_description,
long_description=repository_long_description,
@@ -72,7 +72,7 @@ class TestRepositoryComponentReviews( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
strings_displayed = [ 'Repository %s' % "'%s'" % repository_name,
'Repository %s has been created' % "'%s'" % repository_name ]
'Repository %s has been created' % "<b>%s</b>" % repository_name ]
repository = self.get_or_create_repository( name=repository_name,
description=repository_description,
long_description=repository_long_description,
@@ -52,7 +52,7 @@ class TestRepositoryCitableURLs( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
strings_displayed = [ 'Repository %s' % "'%s'" % repository_name,
'Repository %s has been created' % "'%s'" % repository_name ]
'Repository %s has been created' % "<b>%s</b>" % repository_name ]
repository = self.get_or_create_repository( name=repository_name,
description=repository_description,
long_description=repository_long_description,
@@ -57,7 +57,7 @@ class TestToolShedBrowseUtilities( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
strings_displayed = [ 'Repository %s' % "'%s'" % datatypes_repository_name,
'Repository %s has been created' % "'%s'" % datatypes_repository_name ]
'Repository %s has been created' % "<b>%s</b>" % datatypes_repository_name ]
repository = self.get_or_create_repository( name=datatypes_repository_name,
description=datatypes_repository_description,
long_description=datatypes_repository_long_description,
@@ -85,7 +85,7 @@ class TestToolShedBrowseUtilities( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
strings_displayed = [ 'Repository %s' % "'%s'" % emboss_repository_name,
'Repository %s has been created' % "'%s'" % emboss_repository_name ]
'Repository %s has been created' % "<b>%s</b>" % emboss_repository_name ]
emboss_repository = self.get_or_create_repository( name=emboss_repository_name,
description=emboss_repository_description,
long_description=emboss_repository_long_description,
@@ -122,7 +122,7 @@ class TestToolShedBrowseUtilities( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
strings_displayed = [ 'Repository %s' % "'%s'" % freebayes_repository_name,
'Repository %s has been created' % "'%s'" % freebayes_repository_name ]
'Repository %s has been created' % "<b>%s</b>" % freebayes_repository_name ]
repository = self.get_or_create_repository( name=freebayes_repository_name,
description=freebayes_repository_description,
long_description=freebayes_repository_long_description,
@@ -76,7 +76,7 @@ class TestSkipToolTestFeature( ShedTwillTestCase ):
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
category = test_db_util.get_category_by_name( category_name )
strings_displayed = [ 'Repository %s' % "'%s'" % repository_name,
'Repository %s has been created' % "'%s'" % repository_name ]
'Repository %s has been created' % "<b>%s</b>" % repository_name ]
repository = self.get_or_create_repository( name=repository_name,
description=repository_description,
long_description=repository_long_description,
@@ -63,7 +63,7 @@ class TestInstallRepositoryMultipleOwners( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_2_email, username=common.test_user_2_name )
strings_displayed = [ 'Repository %s' % "'%s'" % datatypes_repository_name,
'Repository %s has been created' % "'%s'" % datatypes_repository_name ]
'Repository %s has been created' % "<b>%s</b>" % datatypes_repository_name ]
repository = self.get_or_create_repository( name=datatypes_repository_name,
description=datatypes_repository_description,
long_description=datatypes_repository_long_description,
@@ -105,7 +105,7 @@ class TestInstallRepositoryMultipleOwners( ShedTwillTestCase ):
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
strings_displayed = [ 'Repository %s' % "'%s'" % tool_repository_name,
'Repository %s has been created' % "'%s'" % tool_repository_name ]
'Repository %s has been created' % "<b>%s</b>" % tool_repository_name ]
repository = self.get_or_create_repository( name=tool_repository_name,
description=tool_repository_description,
long_description=tool_repository_long_description,
+109 -68
View File
@@ -56,6 +56,40 @@ default_galaxy_test_port_min = 9000
default_galaxy_test_port_max = 9999
default_galaxy_test_host = 'localhost'
# should this serve static resources (scripts, images, styles, etc.)
STATIC_ENABLED = True
def get_static_settings():
"""Returns dictionary of the settings necessary for a galaxy App
to be wrapped in the static middleware.
This mainly consists of the filesystem locations of url-mapped
static resources.
"""
cwd = os.getcwd()
static_dir = os.path.join( cwd, 'static' )
#TODO: these should be copied from universe_wsgi.ini
return dict(
#TODO: static_enabled needed here?
static_enabled = True,
static_cache_time = 360,
static_dir = static_dir,
static_images_dir = os.path.join( static_dir, 'images', '' ),
static_favicon_dir = os.path.join( static_dir, 'favicon.ico' ),
static_scripts_dir = os.path.join( static_dir, 'scripts', '' ),
static_style_dir = os.path.join( static_dir, 'june_2007_style', 'blue' ),
static_robots_txt = os.path.join( static_dir, 'robots.txt' ),
)
def get_webapp_global_conf():
"""Get the global_conf dictionary sent as the first argument to app_factory.
"""
# (was originally sent 'dict()') - nothing here for now except static settings
global_conf = dict()
if STATIC_ENABLED:
global_conf.update( get_static_settings() )
return global_conf
tool_sheds_conf_xml_template = '''<?xml version="1.0"?>
<tool_sheds>
<tool_shed name="Embedded tool shed for functional tests" url="http://${shed_url}:${shed_port}/"/>
@@ -144,6 +178,9 @@ def main():
galaxy_migrated_tool_path = tempfile.mkdtemp( dir=tool_shed_test_tmp_dir )
galaxy_tool_dependency_dir = tempfile.mkdtemp( dir=tool_shed_test_tmp_dir )
os.environ[ 'GALAXY_TEST_TOOL_DEPENDENCY_DIR' ] = galaxy_tool_dependency_dir
hgweb_config_dir = hgweb_config_file_path
os.environ[ 'TEST_HG_WEB_CONFIG_DIR' ] = hgweb_config_dir
print "Directory location for hgweb.config:", hgweb_config_dir
if 'TOOL_SHED_TEST_DBURI' in os.environ:
toolshed_database_connection = os.environ[ 'TOOL_SHED_TEST_DBURI' ]
else:
@@ -152,7 +189,29 @@ def main():
galaxy_database_connection = os.environ[ 'GALAXY_TEST_DBURI' ]
else:
galaxy_database_connection = 'sqlite:///' + os.path.join( galaxy_db_path, 'universe_test.sqlite' )
kwargs = {}
tool_shed_global_conf = get_webapp_global_conf()
tool_shed_global_conf[ '__file__' ] = 'tool_shed_wsgi.ini.sample'
kwargs = dict( admin_users = 'test@bx.psu.edu',
allow_user_creation = True,
allow_user_deletion = True,
database_connection = toolshed_database_connection,
datatype_converters_config_file = 'datatype_converters_conf.xml.sample',
file_path = shed_file_path,
global_conf = tool_shed_global_conf,
hgweb_config_dir = hgweb_config_dir,
job_queue_workers = 5,
id_secret = 'changethisinproductiontoo',
log_destination = "stdout",
new_file_path = new_repos_path,
running_functional_tests = True,
shed_tool_data_table_config = shed_tool_data_table_conf_file,
smtp_server = 'smtp.dummy.string.tld',
email_from = 'functional@localhost',
template_path = 'templates',
tool_path=tool_path,
tool_parse_help = False,
tool_data_table_config_path = galaxy_tool_data_table_conf_file,
use_heartbeat = False )
for dir in [ tool_shed_test_tmp_dir ]:
try:
os.makedirs( dir )
@@ -162,11 +221,6 @@ def main():
print "Tool shed database connection:", toolshed_database_connection
print "Galaxy database connection:", galaxy_database_connection
hgweb_config_dir = hgweb_config_file_path
os.environ[ 'TEST_HG_WEB_CONFIG_DIR' ] = hgweb_config_dir
print "Directory location for hgweb.config:", hgweb_config_dir
# Generate the tool_data_table_conf.xml file.
file( galaxy_tool_data_table_conf_file, 'w' ).write( tool_data_table_conf_xml_template )
# Generate the shed_tool_data_table_conf.xml file.
@@ -174,7 +228,6 @@ def main():
os.environ[ 'TOOL_SHED_TEST_TOOL_DATA_TABLE_CONF' ] = shed_tool_data_table_conf_file
# ---- Build Tool Shed Application --------------------------------------------------
toolshedapp = None
global_conf = { '__file__' : 'tool_shed_wsgi.ini.sample' }
# if not toolshed_database_connection.startswith( 'sqlite://' ):
# kwargs[ 'database_engine_option_max_overflow' ] = '20'
if tool_dependency_dir is not None:
@@ -183,41 +236,22 @@ def main():
kwargs[ 'object_store' ] = 'distributed'
kwargs[ 'distributed_object_store_config_file' ] = 'distributed_object_store_conf.xml.sample'
kwargs[ 'global_conf' ] = tool_shed_global_conf
if not toolshed_database_connection.startswith( 'sqlite://' ):
kwargs[ 'database_engine_option_pool_size' ] = '10'
toolshedapp = ToolshedUniverseApplication( admin_users = 'test@bx.psu.edu',
allow_user_creation = True,
allow_user_deletion = True,
database_connection = toolshed_database_connection,
datatype_converters_config_file = 'datatype_converters_conf.xml.sample',
file_path = shed_file_path,
global_conf = global_conf,
hgweb_config_dir = hgweb_config_dir,
job_queue_workers = 5,
id_secret = 'changethisinproductiontoo',
log_destination = "stdout",
new_file_path = new_repos_path,
running_functional_tests = True,
shed_tool_data_table_config = shed_tool_data_table_conf_file,
smtp_server = 'smtp.dummy.string.tld',
email_from = 'functional@localhost',
template_path = 'templates',
tool_path=tool_path,
tool_parse_help = False,
tool_data_table_config_path = galaxy_tool_data_table_conf_file,
use_heartbeat = False,
**kwargs )
toolshedapp = ToolshedUniverseApplication( **kwargs )
log.info( "Embedded Toolshed application started" )
# ---- Run tool shed webserver ------------------------------------------------------
tool_shed_server = None
toolshedwebapp = toolshedbuildapp.app_factory( dict( database_connection=toolshed_database_connection ),
use_translogger=False,
static_enabled=False,
app=toolshedapp )
tool_shed_global_conf[ 'database_connection' ] = toolshed_database_connection
toolshedwebapp = toolshedbuildapp.app_factory( tool_shed_global_conf,
use_translogger=False,
static_enabled=True,
app=toolshedapp )
if tool_shed_test_port is not None:
tool_shed_server = httpserver.serve( toolshedwebapp, host=tool_shed_test_host, port=tool_shed_test_port, start_loop=False )
else:
@@ -268,50 +302,53 @@ def main():
migrated_tool_conf_xml = shed_tool_conf_template_parser.safe_substitute( shed_tool_path=galaxy_migrated_tool_path )
file( galaxy_migrated_tool_conf_file, 'w' ).write( migrated_tool_conf_xml )
os.environ[ 'GALAXY_TEST_SHED_TOOL_CONF' ] = galaxy_shed_tool_conf_file
galaxy_global_conf = get_webapp_global_conf()
galaxy_global_conf[ '__file__' ] = 'universe_wsgi.ini.sample'
kwargs = dict( allow_user_creation = True,
allow_user_deletion = True,
admin_users = 'test@bx.psu.edu',
allow_library_path_paste = True,
database_connection = galaxy_database_connection,
datatype_converters_config_file = "datatype_converters_conf.xml.sample",
enable_tool_shed_check = True,
file_path = galaxy_file_path,
global_conf = galaxy_global_conf,
hours_between_check = 0.001,
id_secret = 'changethisinproductiontoo',
job_queue_workers = 5,
log_destination = "stdout",
migrated_tools_config = galaxy_migrated_tool_conf_file,
new_file_path = galaxy_tempfiles,
running_functional_tests=True,
shed_tool_data_table_config = shed_tool_data_table_conf_file,
shed_tool_path = galaxy_shed_tool_path,
template_path = "templates",
tool_data_path = tool_data_path,
tool_dependency_dir = galaxy_tool_dependency_dir,
tool_path = tool_path,
tool_config_file = [ galaxy_tool_conf_file, galaxy_shed_tool_conf_file ],
tool_sheds_config_file = galaxy_tool_sheds_conf_file,
tool_parse_help = False,
tool_data_table_config_path = galaxy_tool_data_table_conf_file,
update_integrated_tool_panel = False,
use_heartbeat = False )
# ---- Build Galaxy Application --------------------------------------------------
galaxy_global_conf = { '__file__' : 'universe_wsgi.ini.sample' }
if not galaxy_database_connection.startswith( 'sqlite://' ):
kwargs[ 'database_engine_option_pool_size' ] = '10'
kwargs[ 'database_engine_option_max_overflow' ] = '20'
galaxyapp = GalaxyUniverseApplication( allow_user_creation = True,
allow_user_deletion = True,
admin_users = 'test@bx.psu.edu',
allow_library_path_paste = True,
database_connection = galaxy_database_connection,
datatype_converters_config_file = "datatype_converters_conf.xml.sample",
enable_tool_shed_check = True,
file_path = galaxy_file_path,
global_conf = global_conf,
hours_between_check = 0.001,
id_secret = 'changethisinproductiontoo',
job_queue_workers = 5,
log_destination = "stdout",
migrated_tools_config = galaxy_migrated_tool_conf_file,
new_file_path = galaxy_tempfiles,
running_functional_tests=True,
shed_tool_data_table_config = shed_tool_data_table_conf_file,
shed_tool_path = galaxy_shed_tool_path,
template_path = "templates",
tool_data_path = tool_data_path,
tool_dependency_dir = galaxy_tool_dependency_dir,
tool_path = tool_path,
tool_config_file = [ galaxy_tool_conf_file, galaxy_shed_tool_conf_file ],
tool_sheds_config_file = galaxy_tool_sheds_conf_file,
tool_parse_help = False,
tool_data_table_config_path = galaxy_tool_data_table_conf_file,
update_integrated_tool_panel = False,
use_heartbeat = False,
**kwargs )
galaxyapp = GalaxyUniverseApplication( **kwargs )
log.info( "Embedded Galaxy application started" )
# ---- Run galaxy webserver ------------------------------------------------------
galaxy_server = None
galaxywebapp = galaxybuildapp.app_factory( dict( database_file=galaxy_database_connection ),
use_translogger=False,
static_enabled=False,
app=galaxyapp )
galaxy_global_conf[ 'database_file' ] = galaxy_database_connection
galaxywebapp = galaxybuildapp.app_factory( galaxy_global_conf,
use_translogger=False,
static_enabled=True,
app=galaxyapp )
if galaxy_test_port is not None:
galaxy_server = httpserver.serve( galaxywebapp, host=galaxy_test_host, port=galaxy_test_port, start_loop=False )
@@ -412,4 +449,8 @@ def main():
return 1
if __name__ == "__main__":
sys.exit( main() )
try:
sys.exit( main() )
except Exception, e:
log.exception( str( e ) )
exit(1)
-29
View File
@@ -336,33 +336,4 @@
<label text="Filtering" id="filtering" />
<tool file="ngs_rna/filter_transcripts_via_tracking.xml" />
</section>
<label text="RGENETICS" id="rgenetics" />
<section name="SNP/WGA: Data; Filters" id="rgdat">
<label text="Data: Import and upload" id="rgimport" />
<tool file="data_source/upload.xml"/>
<tool file="data_source/access_libraries.xml" />
<tool file="data_source/hapmapmart.xml" />
<label text="Data: Filter and Clean" id="rgfilter" />
<tool file="rgenetics/rgClean.xml"/>
<tool file="rgenetics/rgPedSub.xml"/>
<tool file="rgenetics/rgLDIndep.xml"/>
<label text="Simulate" id="rgsim" />
<tool file="rgenetics/rgfakePhe.xml"/>
<tool file="rgenetics/rgfakePed.xml"/>
</section>
<section name="SNP/WGA: QC; LD; Plots" id="rgqcplot">
<label text="QC; Eigenstrat" id="rgvisual" />
<tool file="rgenetics/rgQC.xml"/>
<tool file="rgenetics/rgEigPCA.xml"/>
<label text="LD; Manhattan/QQ; GRR" id="rgld" />
<tool file="rgenetics/rgHaploView.xml"/>
<tool file="rgenetics/rgManQQ.xml"/>
<tool file="rgenetics/rgGRR.xml"/>
</section>
<section name="SNP/WGA: Statistical Models" id="rgmodel">
<tool file="rgenetics/rgCaCo.xml"/>
<tool file="rgenetics/rgTDT.xml"/>
<tool file="rgenetics/rgGLM.xml"/>
<tool file="rgenetics/rgManQQ.xml"/>
</section>
</toolbox>