galaxy-commits
Threads by month
- ----- 2026 -----
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 15302 discussions
commit/galaxy-central: inithello: Added tool_sheds_conf.xml.sample to buildbot_setup.sh.
by commits-noreply@bitbucket.org 27 Feb '13
by commits-noreply@bitbucket.org 27 Feb '13
27 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/81527d3d8962/
changeset: 81527d3d8962
user: inithello
date: 2013-02-27 21:45:43
summary: Added tool_sheds_conf.xml.sample to buildbot_setup.sh.
affected #: 1 file
diff -r 22aaf90bc420bb93862c08c8f24549e76d701b7d -r 81527d3d8962f3d5f5804fa1457f4e7a782c7136 buildbot_setup.sh
--- a/buildbot_setup.sh
+++ b/buildbot_setup.sh
@@ -68,6 +68,7 @@
datatypes_conf.xml.sample
universe_wsgi.ini.sample
tool_data_table_conf.xml.sample
+tool_sheds_conf.xml.sample
shed_tool_data_table_conf.xml.sample
migrated_tools_conf.xml.sample
data_manager_conf.xml.sample
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
5 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f46c9a707af8/
changeset: f46c9a707af8
user: jmchilton
date: 2013-02-23 21:09:53
summary: Implement macro mechanism for tool config XML. This should allow for a drastic reduction in 'code' duplication across XML files in a tool repository or inside of an XML file (repeated blocks in different when statements for instance).
affected #: 1 file
diff -r fa34924860aaa282fe3c3021a257f2523848a6e6 -r f46c9a707af8ae9256b762cf7ef26c38da69c3a2 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -17,6 +17,7 @@
from galaxy.util.template import fill_template
from galaxy import util, jobs, model
from galaxy.jobs import ParallelismInfo
+from copy import deepcopy
from elementtree import ElementTree
from parameters import *
from parameters.grouping import *
@@ -520,7 +521,7 @@
def load_tool( self, config_file, guid=None, **kwds ):
"""Load a single tool from the file named by `config_file` and return an instance of `Tool`."""
# Parse XML configuration file and get the root element
- tree = util.parse_xml( config_file )
+ tree = self._load_and_preprocess_tool_xml( config_file )
root = tree.getroot()
# Allow specifying a different tool subclass to instantiate
if root.find( "type" ) is not None:
@@ -704,7 +705,86 @@
rval = tools
return rval
-
+
+ def _load_and_preprocess_tool_xml(self, config_file):
+ tree = util.parse_xml(config_file)
+ root = tree.getroot()
+ macros_el = root.find('macros')
+ if not macros_el:
+ return tree
+ tool_dir = os.path.dirname(config_file)
+ macros = self._load_macros(macros_el, tool_dir)
+ # HACK for elementtree, newer implementations (etree/lxml) won't
+ # require this parent_map data structure but elementtree does not
+ # track parents or recongnize .find('..').
+ parent_map = dict((c, p) for p in tree.getiterator() for c in p)
+ for expand_el in root.findall('.//expand'):
+ macro_name = expand_el.get('macro')
+ macro_def = macros[macro_name]
+ self._xml_replace(expand_el, macro_def, parent_map)
+ return tree
+
+ def _load_macros(self, macros_el, tool_dir):
+ macros = {}
+ # Import macros from external files.
+ macros.update(self._load_imported_macros(macros_el, tool_dir))
+ # Load all directly defined macros.
+ macros.update(self._load_embedded_macros(macros_el, tool_dir))
+ return macros
+
+ def _load_embedded_macros(self, macros_el, tool_dir):
+ macros = {}
+
+ macro_els = []
+ if macros_el:
+ macro_els = macros_el.findall("macro")
+ for macro in macro_els:
+ macro_name = macro.get("name")
+ macros[macro_name] = self._load_macro_def(macro)
+
+ return macros
+
+ def _load_imported_macros(self, macros_el, tool_dir):
+ macros = {}
+
+ macro_import_els = []
+ if macros_el:
+ macro_import_els = macros_el.findall("import")
+ for macro_import_el in macro_import_els:
+ raw_import_path = macro_import_el.text
+ tool_relative_import_path = \
+ os.path.basename(raw_import_path) # Sanitize this
+ import_path = \
+ os.path.join(tool_dir, tool_relative_import_path)
+ file_macros = self._load_macro_file(import_path, tool_dir)
+ macros.update(file_macros)
+
+ return macros
+
+ def _load_macro_file(self, path, tool_dir):
+ tree = util.parse_xml(path)
+ root = tree.getroot()
+ return self._load_macros(root, tool_dir)
+
+ def _load_macro_def(self, macro):
+ return list(macro.getchildren())
+
+ def _xml_replace(self, query, targets, parent_map):
+ #parent_el = query.find('..') ## Something like this would be better with newer xml library
+ parent_el = parent_map[query]
+ matching_index = -1
+ #for index, el in enumerate(parent_el.iter('.')): ## Something like this for newer implementation
+ for index, el in enumerate(parent_el.getchildren()):
+ if el == query:
+ matching_index = index
+ break
+ assert matching_index >= 0
+ current_index = matching_index
+ for target in targets:
+ current_index += 1
+ parent_el.insert(current_index, deepcopy(target))
+ parent_el.remove(query)
+
class ToolSection( object ):
"""
A group of tools with similar type/purpose that will be displayed as a
https://bitbucket.org/galaxy/galaxy-central/commits/7ae831ebb4aa/
changeset: 7ae831ebb4aa
user: jmchilton
date: 2013-02-23 21:09:53
summary: Extend tool config macro engine so that macros may be rendered inside other macros.
affected #: 1 file
diff -r f46c9a707af8ae9256b762cf7ef26c38da69c3a2 -r 7ae831ebb4aad4989cbf6ecba0e8128413a28403 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -714,16 +714,24 @@
return tree
tool_dir = os.path.dirname(config_file)
macros = self._load_macros(macros_el, tool_dir)
- # HACK for elementtree, newer implementations (etree/lxml) won't
- # require this parent_map data structure but elementtree does not
- # track parents or recongnize .find('..').
- parent_map = dict((c, p) for p in tree.getiterator() for c in p)
- for expand_el in root.findall('.//expand'):
- macro_name = expand_el.get('macro')
- macro_def = macros[macro_name]
- self._xml_replace(expand_el, macro_def, parent_map)
+
+ self._expand_macros([root], macros)
return tree
+ def _expand_macros(self, elements, macros):
+ for element in elements:
+ # HACK for elementtree, newer implementations (etree/lxml) won't
+ # require this parent_map data structure but elementtree does not
+ # track parents or recongnize .find('..').
+ parent_map = dict((c, p) for p in element.getiterator() for c in p)
+ for expand_el in element.findall('.//expand'):
+ macro_name = expand_el.get('macro')
+ macro_def = macros[macro_name]
+
+ # Recursively expand contained macros.
+ self._expand_macros(macro_def, macros)
+ self._xml_replace(expand_el, macro_def, parent_map)
+
def _load_macros(self, macros_el, tool_dir):
macros = {}
# Import macros from external files.
@@ -785,6 +793,7 @@
parent_el.insert(current_index, deepcopy(target))
parent_el.remove(query)
+
class ToolSection( object ):
"""
A group of tools with similar type/purpose that will be displayed as a
https://bitbucket.org/galaxy/galaxy-central/commits/0d78c9da2cc8/
changeset: 0d78c9da2cc8
user: jmchilton
date: 2013-02-23 21:09:53
summary: Add ability to pass sub-blocks of XML to macros and corresponding ability to render those (via the new <yield /> tag) from macros.
affected #: 1 file
diff -r 7ae831ebb4aad4989cbf6ecba0e8128413a28403 -r 0d78c9da2cc82c25f919f1850be39774b46fbb57 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -726,7 +726,16 @@
parent_map = dict((c, p) for p in element.getiterator() for c in p)
for expand_el in element.findall('.//expand'):
macro_name = expand_el.get('macro')
- macro_def = macros[macro_name]
+ macro_def = deepcopy(macros[macro_name]) # deepcopy needed?
+
+ yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')]
+
+ expand_el_children = expand_el.getchildren()
+ macro_def_parent_map = \
+ dict((c, p) for macro_def_el in macro_def for p in macro_def_el.getiterator() for c in p)
+
+ for yield_el in yield_els:
+ self._xml_replace(yield_el, expand_el_children, macro_def_parent_map)
# Recursively expand contained macros.
self._expand_macros(macro_def, macros)
https://bitbucket.org/galaxy/galaxy-central/commits/f522eea2d4c1/
changeset: f522eea2d4c1
user: jmchilton
date: 2013-02-23 21:09:53
summary: Rework some duplication out tophat wrappers using macros. This dmeonstrates how macros can reduce duplication inside a file (e.g. the dbKeyActions macro) and between files (e.g. the own_junctionsConditional macro).
affected #: 4 files
diff -r 0d78c9da2cc82c25f919f1850be39774b46fbb57 -r f522eea2d4c19d7c7c24209afc1a4dee5bd71aa3 tools/ngs_rna/tophat2_wrapper.xml
--- a/tools/ngs_rna/tophat2_wrapper.xml
+++ b/tools/ngs_rna/tophat2_wrapper.xml
@@ -143,23 +143,12 @@
</param></when></conditional>
- <conditional name="refGenomeSource">
- <param name="genomeSource" type="select" label="Use a built in reference genome or own from your history" help="Built-in genomes were created using default options">
- <option value="indexed" selected="True">Use a built-in genome</option>
- <option value="history">Use a genome from history</option>
- </param>
- <when value="indexed">
- <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
- <options from_data_table="tophat2_indexes">
- <filter type="sort_by" column="2"/>
- <validator type="no_options" message="No genomes are available for the selected input dataset"/>
- </options>
- </param>
- </when>
- <when value="history">
- <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
- </when><!-- history -->
- </conditional><!-- refGenomeSource -->
+ <expand macro="refGenomeSourceConditional">
+ <options from_data_table="tophat2_indexes">
+ <filter type="sort_by" column="2"/>
+ <validator type="no_options" message="No genomes are available for the selected input dataset"/>
+ </options>
+ </expand><conditional name="params"><param name="settingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters."><option value="preSet">Use Defaults</option>
@@ -182,17 +171,7 @@
<param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" /><param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." /><param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
+ <expand macro="indel_searchConditional" />
alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" /><param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" /><param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
@@ -201,40 +180,7 @@
<param name="seg_length" type="integer" value="25" label="Minimum length of read segments" /><!-- Options for supplying own junctions. -->
- <conditional name="own_junctions">
- <param name="use_junctions" type="select" label="Use Own Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <conditional name="gene_model_ann">
- <param name="use_annotations" type="select" label="Use Gene Annotation Model">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="gtf,gff3" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
- </when>
- </conditional>
- <conditional name="raw_juncs">
- <param name="use_juncs" type="select" label="Use Raw Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
- </when>
- </conditional>
- <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when>
- <when value="No" />
- </conditional><!-- /own_junctions -->
-
+ <expand macro="own_junctionsConditional" /><!-- Coverage search. --><conditional name="coverage_search"><param name="use_search" type="select" label="Use Coverage Search" help="Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.">
@@ -319,83 +265,40 @@
<filter>(params['settingsType'] == 'full' and params['fusion_search']['do_search'] == 'Yes')</filter></data><data format="bed" name="insertions" label="${tool.name} on ${on_string}: insertions" from_work_dir="tophat_out/insertions.bed">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat2_indexes" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data><data format="bed" name="deletions" label="${tool.name} on ${on_string}: deletions" from_work_dir="tophat_out/deletions.bed">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat2_indexes" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data><data format="bed" name="junctions" label="${tool.name} on ${on_string}: splice junctions" from_work_dir="tophat_out/junctions.bed">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat2_indexes" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data><data format="bam" name="accepted_hits" label="${tool.name} on ${on_string}: accepted_hits" from_work_dir="tophat_out/accepted_hits.bam">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat2_indexes" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data></outputs>
-
+ <macros>
+ <import>tophat_macros.xml</import>
+ <macro name="dbKeyActions">
+ <actions>
+ <conditional name="refGenomeSource.genomeSource">
+ <when value="indexed">
+ <action type="metadata" name="dbkey">
+ <option type="from_data_table" name="tophat2_indexes" column="1" offset="0">
+ <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
+ <filter type="param_value" ref="refGenomeSource.index" column="0"/>
+ </option>
+ </action>
+ </when>
+ <when value="history">
+ <action type="metadata" name="dbkey">
+ <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
+ </action>
+ </when>
+ </conditional>
+ </actions>
+ </macro>
+ </macros><tests><!-- Test base-space single-end reads with pre-built index and preset parameters --><test>
diff -r 0d78c9da2cc82c25f919f1850be39774b46fbb57 -r f522eea2d4c19d7c7c24209afc1a4dee5bd71aa3 tools/ngs_rna/tophat_color_wrapper.xml
--- a/tools/ngs_rna/tophat_color_wrapper.xml
+++ b/tools/ngs_rna/tophat_color_wrapper.xml
@@ -154,23 +154,12 @@
</command><inputs><param format="fastqcssanger" name="input1" type="data" label="RNA-Seq FASTQ file" help="Color-space: Must have Sanger-scaled quality values with ASCII offset 33" />
- <conditional name="refGenomeSource">
- <param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
- <option value="indexed">Use a built-in index</option>
- <option value="history">Use one from the history</option>
- </param>
- <when value="indexed">
- <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
- <options from_data_table="tophat_indexes_color">
- <filter type="sort_by" column="2"/>
- <validator type="no_options" message="No indexes are available for the selected input dataset"/>
- </options>
- </param>
- </when>
- <when value="history">
- <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
- </when><!-- history -->
- </conditional><!-- refGenomeSource -->
+ <expand macro="refGenomeSourceConditional">
+ <options from_data_table="tophat_indexes_color">
+ <filter type="sort_by" column="2"/>
+ <validator type="no_options" message="No indexes are available for the selected input dataset"/>
+ </options>
+ </expand><conditional name="singlePaired"><param name="sPaired" type="select" label="Is this library mate-paired?"><option value="single">Single-end</option>
@@ -194,17 +183,7 @@
<param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" /><param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." /><param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
+ <expand macro="indel_searchConditional" /><param name="junction_filter" type="float" value="0.15" label="Minimum isoform fraction: filter out junctions supported by too few alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" /><param name="max_multihits" type="integer" value="40" label="Maximum number of alignments to be allowed" /><param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
@@ -230,20 +209,8 @@
<param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/></when></conditional>
- <conditional name="raw_juncs">
- <param name="use_juncs" type="select" label="Use Raw Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
- </when>
- </conditional>
- <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
+ <expand macro="raw_juncsConditional" />
+ <expand macro="no_novel_juncsParam" /></when><when value="No" /></conditional><!-- /own_junctions -->
@@ -301,17 +268,7 @@
<param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" /><param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." /><param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
+ <expand macro="indel_searchConditional" /><param name="junction_filter" type="float" value="0.15" label="Minimum isoform fraction: filter out junctions supported by too few alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" /><param name="max_multihits" type="integer" value="40" label="Maximum number of alignments to be allowed" /><param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
@@ -399,90 +356,50 @@
( singlePaired['pParams']['indel_search']['allow_indel_search'] == 'Yes' ) )
)
</filter>
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat_indexes_color" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data><data format="bed" name="deletions" label="${tool.name} on ${on_string}: deletions" from_work_dir="tophat_out/deletions.bed">
- <filter>
+ <expand macro="dbKeyActions" />
+ </data>
+ <data format="bed" name="junctions" label="${tool.name} on ${on_string}: splice junctions">
+ <expand macro="dbKeyActions" />
+ </data>
+ <data format="bam" name="accepted_hits" label="${tool.name} on ${on_string}: accepted_hits">
+ <expand macro="dbKeyActions" />
+ </data>
+ </outputs>
+ <macros>
+ <import>tophat_macros.xml</import>
+ <macro name="bedFilter">
+ <filter>
(
( ( 'sParams' in singlePaired ) and ( 'indel_search' in singlePaired['sParams'] ) and
( singlePaired['sParams']['indel_search']['allow_indel_search'] == 'Yes' ) ) or
( ( 'pParams' in singlePaired ) and ( 'indel_search' in singlePaired['pParams'] ) and
( singlePaired['pParams']['indel_search']['allow_indel_search'] == 'Yes' ) )
)
- </filter>
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat_indexes_color" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
- </data>
- <data format="bed" name="junctions" label="${tool.name} on ${on_string}: splice junctions">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat_indexes_color" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
- </data>
- <data format="bam" name="accepted_hits" label="${tool.name} on ${on_string}: accepted_hits">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat_indexes_color" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
- </data>
- </outputs>
+ </filter>
+ </macro>
+ <macro name="dbKeyActions">
+ <actions>
+ <conditional name="refGenomeSource.genomeSource">
+ <when value="indexed">
+ <action type="metadata" name="dbkey">
+ <option type="from_data_table" name="tophat_indexes_color" column="1" offset="0">
+ <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
+ <filter type="param_value" ref="refGenomeSource.index" column="0"/>
+ </option>
+ </action>
+ </when>
+ <when value="history">
+ <action type="metadata" name="dbkey">
+ <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
+ </action>
+ </when>
+ </conditional>
+ </actions>
+ </macro>
+ </macros><tests><!-- Test color-space single-end reads with user-supplied reference fasta and preset parameters --><test>
diff -r 0d78c9da2cc82c25f919f1850be39774b46fbb57 -r f522eea2d4c19d7c7c24209afc1a4dee5bd71aa3 tools/ngs_rna/tophat_macros.xml
--- /dev/null
+++ b/tools/ngs_rna/tophat_macros.xml
@@ -0,0 +1,72 @@
+<macros>
+ <macro name="refGenomeSourceConditional">
+ <conditional name="refGenomeSource">
+ <param name="genomeSource" type="select" label="Use a built in reference genome or own from your history" help="Built-ins genomes were created using default options">
+ <option value="indexed" selected="True">Use a built-in genome</option>
+ <option value="history">Use a genome from history</option>
+ </param>
+ <when value="indexed">
+ <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
+ <yield />
+ </param>
+ </when>
+ <when value="history">
+ <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
+ </when><!-- history -->
+ </conditional><!-- refGenomeSource -->
+ </macro>
+ <macro name="indel_searchConditional">
+ <conditional name="indel_search">
+ <param name="allow_indel_search" type="select" label="Allow indel search">
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </param>
+ <when value="No"/>
+ <when value="Yes">
+ <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
+ <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
+ </when>
+ </conditional>
+ </macro>
+ <macro name="own_junctionsConditional">
+ <conditional name="own_junctions">
+ <param name="use_junctions" type="select" label="Use Own Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="Yes">
+ <conditional name="gene_model_ann">
+ <param name="use_annotations" type="select" label="Use Gene Annotation Model">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="gtf,gff3" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
+ </when>
+ </conditional>
+ <expand macro="raw_juncsConditional" />
+ <expand macro="no_novel_juncsParam" />
+ </when>
+ <when value="No" />
+ </conditional><!-- /own_junctions -->
+ </macro>
+ <macro name="raw_juncsConditional">
+ <conditional name="raw_juncs">
+ <param name="use_juncs" type="select" label="Use Raw Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
+ </when>
+ </conditional>
+ </macro>
+ <macro name="no_novel_juncsParam">
+ <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ </macro>
+</macros>
diff -r 0d78c9da2cc82c25f919f1850be39774b46fbb57 -r f522eea2d4c19d7c7c24209afc1a4dee5bd71aa3 tools/ngs_rna/tophat_wrapper.xml
--- a/tools/ngs_rna/tophat_wrapper.xml
+++ b/tools/ngs_rna/tophat_wrapper.xml
@@ -151,23 +151,12 @@
</command><inputs><param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
- <conditional name="refGenomeSource">
- <param name="genomeSource" type="select" label="Use a built in reference genome or own from your history" help="Built-ins genomes were created using default options">
- <option value="indexed" selected="True">Use a built-in genome</option>
- <option value="history">Use a genome from history</option>
- </param>
- <when value="indexed">
- <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
- <options from_data_table="tophat_indexes">
- <filter type="sort_by" column="2"/>
- <validator type="no_options" message="No genomes are available for the selected input dataset"/>
- </options>
- </param>
- </when>
- <when value="history">
- <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
- </when><!-- history -->
- </conditional><!-- refGenomeSource -->
+ <expand macro="refGenomeSourceConditional">
+ <options from_data_table="tophat_indexes">
+ <filter type="sort_by" column="2"/>
+ <validator type="no_options" message="No genomes are available for the selected input dataset"/>
+ </options>
+ </expand><conditional name="singlePaired"><param name="sPaired" type="select" label="Is this library mate-paired?"><option value="single">Single-end</option>
@@ -298,17 +287,7 @@
<param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" /><param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." /><param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
+ <expand macro="indel_searchConditional" /><param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" /><param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" /><param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
@@ -316,40 +295,7 @@
<param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" /><param name="seg_length" type="integer" value="25" label="Minimum length of read segments" /><!-- Options for supplying own junctions. -->
- <conditional name="own_junctions">
- <param name="use_junctions" type="select" label="Use Own Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <conditional name="gene_model_ann">
- <param name="use_annotations" type="select" label="Use Gene Annotation Model">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
- </when>
- </conditional>
- <conditional name="raw_juncs">
- <param name="use_juncs" type="select" label="Use Raw Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
- </when>
- </conditional>
- <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when>
- <when value="No" />
- </conditional><!-- /own_junctions -->
-
+ <expand macro="own_junctionsConditional" /><!-- Closure search. --><conditional name="closure_search"><param name="use_search" type="select" label="Use Closure Search">
@@ -387,83 +333,40 @@
<outputs><data format="bed" name="insertions" label="${tool.name} on ${on_string}: insertions" from_work_dir="tophat_out/insertions.bed">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat_indexes" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data><data format="bed" name="deletions" label="${tool.name} on ${on_string}: deletions" from_work_dir="tophat_out/deletions.bed">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat_indexes" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data><data format="bed" name="junctions" label="${tool.name} on ${on_string}: splice junctions" from_work_dir="tophat_out/junctions.bed">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat_indexes" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data><data format="bam" name="accepted_hits" label="${tool.name} on ${on_string}: accepted_hits" from_work_dir="tophat_out/accepted_hits.bam">
- <actions>
- <conditional name="refGenomeSource.genomeSource">
- <when value="indexed">
- <action type="metadata" name="dbkey">
- <option type="from_data_table" name="tophat_indexes" column="1" offset="0">
- <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
- <filter type="param_value" ref="refGenomeSource.index" column="0"/>
- </option>
- </action>
- </when>
- <when value="history">
- <action type="metadata" name="dbkey">
- <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
- </action>
- </when>
- </conditional>
- </actions>
+ <expand macro="dbKeyActions" /></data></outputs>
-
+ <macros>
+ <import>tophat_macros.xml</import>
+ <macro name="dbKeyActions">
+ <actions>
+ <conditional name="refGenomeSource.genomeSource">
+ <when value="indexed">
+ <action type="metadata" name="dbkey">
+ <option type="from_data_table" name="tophat_indexes" column="1" offset="0">
+ <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
+ <filter type="param_value" ref="refGenomeSource.index" column="0"/>
+ </option>
+ </action>
+ </when>
+ <when value="history">
+ <action type="metadata" name="dbkey">
+ <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
+ </action>
+ </when>
+ </conditional>
+ </actions>
+ </macro>
+ </macros><tests><!-- Test base-space single-end reads with pre-built index and preset parameters --><test>
https://bitbucket.org/galaxy/galaxy-central/commits/22aaf90bc420/
changeset: 22aaf90bc420
user: jgoecks
date: 2013-02-27 21:21:30
summary: Merged in jmchilton/galaxy-central-multi-input-tool-fixes-2 (pull request #129)
Implement Macro Engine to Reduce Tool Config XML Duplication
affected #: 5 files
Diff not available.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: inithello: Enhance twill automated repository installation framework to get a list of repositories from the tool shed API, install, run functional tests defined in the tools' XML, and report success or failure back to the tool shed.
by commits-noreply@bitbucket.org 27 Feb '13
by commits-noreply@bitbucket.org 27 Feb '13
27 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/9d87d7c61912/
changeset: 9d87d7c61912
user: inithello
date: 2013-02-27 20:28:12
summary: Enhance twill automated repository installation framework to get a list of repositories from the tool shed API, install, run functional tests defined in the tools' XML, and report success or failure back to the tool shed.
affected #: 3 files
diff -r fabb0ae1edabf77f9aceb018fa5a988ce05500f9 -r 9d87d7c6191284aaf48ade4462256131c0345c8d test/install_and_test_tool_shed_repositories/base/twilltestcase.py
--- a/test/install_and_test_tool_shed_repositories/base/twilltestcase.py
+++ b/test/install_and_test_tool_shed_repositories/base/twilltestcase.py
@@ -55,7 +55,7 @@
name = repository_info_dict[ 'name' ]
owner = repository_info_dict[ 'owner' ]
changeset_revision = repository_info_dict[ 'changeset_revision' ]
- encoded_repository_id = repository_info_dict[ 'encoded_repository_id' ]
+ encoded_repository_id = repository_info_dict[ 'repository_id' ]
tool_shed_url = repository_info_dict[ 'tool_shed_url' ]
preview_params = urllib.urlencode( dict( repository_id=encoded_repository_id, changeset_revision=changeset_revision ) )
self.visit_url( '%s/repository/preview_tools_in_changeset?%s' % ( tool_shed_url, preview_params ) )
diff -r fabb0ae1edabf77f9aceb018fa5a988ce05500f9 -r 9d87d7c6191284aaf48ade4462256131c0345c8d test/install_and_test_tool_shed_repositories/functional/test_install_repositories.py
--- a/test/install_and_test_tool_shed_repositories/functional/test_install_repositories.py
+++ b/test/install_and_test_tool_shed_repositories/functional/test_install_repositories.py
@@ -3,7 +3,7 @@
from install_and_test_tool_shed_repositories.base.twilltestcase import InstallTestRepository
log = logging.getLogger(__name__)
-class TestInstallRepositories( InstallTestRepository ):
+class InstallTestRepositories( InstallTestRepository ):
"""Abstract test case that installs and uninstalls a predefined list of repositories."""
def do_installation( self, repository_info_dict ):
self.logout()
@@ -35,11 +35,11 @@
G = globals()
# Eliminate all previous tests from G.
for key, val in G.items():
- if key.startswith( 'TestInstallRepository_' ) or key.startswith( 'TestUninstallRepository_' ):
+ if key.startswith( 'TestInstallRepository_' ) or key.startswith( 'TestUninstallRepository_' ) or key.startswith( 'TestForTool_' ):
del G[ key ]
# Create a new subclass with a method named install_repository_XXX that installs the repository specified by the provided dict.
name = "TestInstallRepository_" + repository_dict[ 'name' ]
- baseclasses = ( TestInstallRepositories, )
+ baseclasses = ( InstallTestRepositories, )
namespace = dict()
def make_install_method( repository_dict ):
def test_install_repository( self ):
@@ -61,11 +61,11 @@
G = globals()
# Eliminate all previous tests from G.
for key, val in G.items():
- if key.startswith( 'TestInstallRepository_' ) or key.startswith( 'TestUninstallRepository_' ):
+ if key.startswith( 'TestInstallRepository_' ) or key.startswith( 'TestUninstallRepository_' ) or key.startswith( 'TestForTool_' ):
del G[ key ]
# Create a new subclass with a method named install_repository_XXX that installs the repository specified by the provided dict.
name = "TestUninstallRepository_" + repository_dict[ 'name' ]
- baseclasses = ( TestInstallRepositories, )
+ baseclasses = ( InstallTestRepositories, )
namespace = dict()
def make_uninstall_method( repository_dict ):
def test_install_repository( self ):
diff -r fabb0ae1edabf77f9aceb018fa5a988ce05500f9 -r 9d87d7c6191284aaf48ade4462256131c0345c8d test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -4,7 +4,7 @@
# order to run functional tests on repository tools after installation. The install_and_test_tool_shed_repositories.sh
# will execute this script with the appropriate parameters.
-import os, sys, shutil, tempfile, re, string
+import os, sys, shutil, tempfile, re, string, urllib
# Assume we are run from the galaxy root directory, add lib to the python path
cwd = os.getcwd()
@@ -19,7 +19,7 @@
default_galaxy_locales = 'en'
default_galaxy_test_file_dir = "test-data"
os.environ[ 'GALAXY_INSTALL_TEST_TMP_DIR' ] = galaxy_test_tmp_dir
-new_path = [ os.path.join( cwd, "lib" ), os.path.join( cwd, 'test' ) ]
+new_path = [ os.path.join( cwd, "lib" ), os.path.join( cwd, 'test' ), os.path.join( cwd, 'scripts', 'api' ) ]
new_path.extend( sys.path )
sys.path = new_path
@@ -48,6 +48,7 @@
from galaxy.app import UniverseApplication
from galaxy.web import buildapp
from galaxy.util import parse_xml
+from galaxy.util.json import from_json_string, to_json_string
import nose.core
import nose.config
@@ -56,6 +57,8 @@
from base.util import parse_tool_panel_config
+from common import update
+
log = logging.getLogger( 'install_and_test_repositories' )
default_galaxy_test_port_min = 10000
@@ -95,7 +98,10 @@
'''
# Define a default location to find the list of repositories to check.
-galaxy_repository_list = os.environ.get( 'GALAXY_INSTALL_TEST_REPOSITORY_FILE', 'repository_list.json' )
+galaxy_repository_list = os.environ.get( 'GALAXY_INSTALL_TEST_REPOSITORY_LIST_LOCATIOM', 'repository_list.json' )
+galaxy_tool_shed_url = os.environ.get( 'GALAXY_INSTALL_TEST_TOOL_SHED_URL', 'http://toolshed.local:10001' )
+tool_shed_api_key = os.environ.get( 'GALAXY_INSTALL_TEST_TOOL_SHED_API_KEY', None )
+assert tool_shed_api_key is not None, 'Unable to proceed without API key.'
if 'GALAXY_INSTALL_TEST_SECRET' not in os.environ:
galaxy_encode_secret = 'changethisinproductiontoo'
@@ -103,7 +109,28 @@
else:
galaxy_encode_secret = os.environ[ 'GALAXY_INSTALL_TEST_SECRET' ]
-def get_repositories_to_install( format='json' ):
+def get_api_url( base, parts=[], params=None, key=None ):
+ if 'api' in parts and parts.index( 'api' ) != 0:
+ parts.pop( parts.index( 'api' ) )
+ parts.insert( 0, 'api' )
+ elif 'api' not in parts:
+ parts.insert( 0, 'api' )
+ url = '%s/%s' % ( base, '/'.join( parts ) )
+ if key:
+ url += '?%s' % urllib.urlencode( dict( key=key ) )
+ else:
+ url += '?%s' % urllib.urlencode( dict( key=tool_shed_api_key ) )
+ if params:
+ url += '&%s' % params
+ return url
+
+def get_repository_info_from_api( url, repository_info_dict ):
+ parts = [ 'api', 'repositories', repository_info_dict[ 'repository_id' ] ]
+ api_url = get_api_url( base=url, parts=parts )
+ extended_dict = json_from_url( api_url )
+ return extended_dict
+
+def get_repositories_to_install( location, source='file', format='json' ):
'''
Get a list of repository info dicts to install. This method expects a json list of dicts with the following structure:
[
@@ -118,11 +145,34 @@
]
NOTE: If the tool shed URL specified in any dict is not present in the tool_sheds_conf.xml, the installation will fail.
'''
+ if source == 'file':
+ listing = file( location, 'r' ).read()
+ elif source == 'url':
+ assert tool_shed_api_key is not None, 'Cannot proceed without tool shed API key.'
+ params = urllib.urlencode( dict( downloadable='true' ) )
+ api_url = get_api_url( base=location, parts=[ 'repository_revisions' ], params=params )
+ if format == 'json':
+ return json_from_url( api_url )
+ else:
+ raise AssertionError( 'Do not know how to handle source type %s.' % source )
if format == 'json':
- return simplejson.loads( file( galaxy_repository_list, 'r' ).read() )
+ return from_json_string( listing )
else:
raise AssertonError( 'Unknown format %s.' % format )
+def json_from_url( url ):
+ url_handle = urllib.urlopen( url )
+ url_contents = url_handle.read()
+ return from_json_string( url_contents )
+
+def register_test_failure( url, metadata_id, test_errors ):
+ params = dict( tools_functionally_correct='false', do_not_test='true', tool_test_errors=test_errors )
+ return update( tool_shed_api_key, '%s/api/%s' % ( galaxy_tool_shed_url, '/'.join( [ 'repository_revisions', metadata_id ] ) ), params )
+
+def register_test_success( url, metadata_id ):
+ params = dict( tools_functionally_correct='true', do_not_test='false' )
+ return update( tool_shed_api_key, '%s/api/%s' % ( galaxy_tool_shed_url, '/'.join( [ 'repository_revisions', metadata_id ] ) ), params )
+
def run_tests( test_config ):
loader = nose.loader.TestLoader( config=test_config )
plug_loader = test_config.plugins.prepareTestLoader( loader )
@@ -162,6 +212,7 @@
galaxy_migrated_tool_conf_file = os.environ.get( 'GALAXY_INSTALL_TEST_MIGRATED_TOOL_CONF', os.path.join( galaxy_test_tmp_dir, 'test_migrated_tool_conf.xml' ) )
galaxy_tool_sheds_conf_file = os.environ.get( 'GALAXY_INSTALL_TEST_TOOL_SHEDS_CONF', os.path.join( galaxy_test_tmp_dir, 'test_tool_sheds_conf.xml' ) )
galaxy_shed_tools_dict = os.environ.get( 'GALAXY_INSTALL_TEST_SHED_TOOL_DICT_FILE', os.path.join( galaxy_test_tmp_dir, 'shed_tool_dict' ) )
+ file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( dict() ) )
if 'GALAXY_INSTALL_TEST_TOOL_DATA_PATH' in os.environ:
tool_data_path = os.environ.get( 'GALAXY_INSTALL_TEST_TOOL_DATA_PATH' )
else:
@@ -302,8 +353,13 @@
log.info( "Tests will be run against %s:%s" % ( galaxy_test_host, galaxy_test_port ) )
success = False
try:
+ repository_status = []
# Iterate through a list of repository info dicts.
- for repository_dict in get_repositories_to_install():
+ for repository_dict in get_repositories_to_install( galaxy_tool_shed_url, source='url' ):
+ metadata_revision_id = repository_dict[ 'id' ]
+ repository_dict[ 'tool_shed_url' ] = galaxy_tool_shed_url
+ repository_info = get_repository_info_from_api( galaxy_tool_shed_url, repository_dict )
+ repository_dict = dict( repository_info.items() + repository_dict.items() )
# Generate the method that will install this repository into the running Galaxy instance.
test_install_repositories.generate_install_method( repository_dict )
os.environ[ 'GALAXY_INSTALL_TEST_HOST' ] = galaxy_test_host
@@ -319,9 +375,12 @@
if success:
log.debug( 'Installation of %s succeeded, running any defined functional tests.' % repository_dict[ 'name' ] )
# Parse the tool panel config to get the test-data path for this repository.
- shed_tools_dict = parse_tool_panel_config( galaxy_shed_tool_conf_file, {} )
+ if not os.path.exists( galaxy_shed_tools_dict ):
+ file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( dict() ) )
+ shed_tools_dict = parse_tool_panel_config( galaxy_shed_tool_conf_file, from_json_string( file( galaxy_shed_tools_dict, 'r' ).read() ) )
+ log.debug( shed_tools_dict )
# Write this to a file, so the functional test framework can find it.
- file( galaxy_shed_tools_dict, 'w' ).write( simplejson.dumps( shed_tools_dict ) )
+ file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( shed_tools_dict ) )
# Set up the environment so that test.functional.test_toolbox can find the Galaxy server we configured in this framework.
os.environ[ 'GALAXY_TOOL_SHED_TEST_FILE' ] = galaxy_shed_tools_dict
os.environ[ 'GALAXY_TEST_HOST' ] = galaxy_test_host
@@ -337,10 +396,52 @@
# Run the configured tests.
result = run_tests( test_config )
success = result.wasSuccessful()
+ repository_dict[ 'functional_tests_passed' ] = success
if success:
+ register_test_success( galaxy_tool_shed_url, metadata_revision_id )
log.debug( 'Repository %s installed and passed functional tests.' % repository_dict[ 'name' ] )
else:
+ # If the functional tests fail, log the output and submit it to the tool shed whence the repository was installed.
+ repository_dict[ 'tool_test_errors' ] = []
+ for failure in result.failures:
+ label = str( failure[0] )
+ log_output = failure[1].replace( '\\n', '\n' )
+ 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 = {}
+ for line in log_output.split( '\n' ):
+ if line.startswith( 'Traceback' ):
+ appending_to = 'traceback'
+ 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:
+ 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 tmp_output:
+ output[ output_type ] = '\n'.join( tmp_output[ output_type ] )
+ repository_dict[ 'tool_test_errors' ].append( dict( test=label, output=output ) )
+ register_test_failure( galaxy_tool_shed_url, metadata_revision_id, repository_dict[ 'tool_test_errors' ] )
log.debug( 'Repository %s installed, but did not pass functional tests.' % repository_dict[ 'name' ] )
+ repository_status.append( repository_dict )
+ # Delete the completed tool functional tests from the test_toolbox.__dict__, otherwise nose will find them and try to re-run the
+ # tests after uninstalling the repository.
+ tests_to_delete = []
+ for key in test_toolbox.__dict__:
+ if key.startswith( 'TestForTool_' ):
+ tests_to_delete.append( key )
+ for key in tests_to_delete:
+ del test_toolbox.__dict__[ key ]
# Generate an uninstall method for this repository, so that the next repository has a clean environment for testing.
test_install_repositories.generate_uninstall_method( repository_dict )
# Set up nose to run the generated uninstall method as a functional test.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: inithello: Remove some unneeded data from the repository metadata API collection view.
by commits-noreply@bitbucket.org 27 Feb '13
by commits-noreply@bitbucket.org 27 Feb '13
27 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/fabb0ae1edab/
changeset: fabb0ae1edab
user: inithello
date: 2013-02-27 20:23:07
summary: Remove some unneeded data from the repository metadata API collection view.
affected #: 1 file
diff -r b9c7813848e989d1a228a53745bb57f958b05467 -r fabb0ae1edabf77f9aceb018fa5a988ce05500f9 lib/galaxy/webapps/community/model/__init__.py
--- a/lib/galaxy/webapps/community/model/__init__.py
+++ b/lib/galaxy/webapps/community/model/__init__.py
@@ -191,8 +191,7 @@
fp.close()
class RepositoryMetadata( object, APIItem ):
- api_collection_visible_keys = ( 'id', 'repository_id', 'changeset_revision', 'malicious', 'downloadable', 'tools_functionally_correct',
- 'do_not_test', 'time_last_tested', 'tool_test_errors' )
+ api_collection_visible_keys = ( 'id', 'repository_id', 'changeset_revision', 'malicious', 'downloadable' )
api_element_visible_keys = ( 'id', 'repository_id', 'changeset_revision', 'malicious', 'downloadable', 'tools_functionally_correct',
'do_not_test', 'time_last_tested', 'tool_test_errors' )
def __init__( self, id=None, repository_id=None, changeset_revision=None, metadata=None, tool_versions=None, malicious=False, downloadable=False,
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: inithello: Attempt to resolve issue with tool shed registry when running buildbot functional tests.
by commits-noreply@bitbucket.org 27 Feb '13
by commits-noreply@bitbucket.org 27 Feb '13
27 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b9c7813848e9/
changeset: b9c7813848e9
user: inithello
date: 2013-02-27 20:12:07
summary: Attempt to resolve issue with tool shed registry when running buildbot functional tests.
affected #: 1 file
diff -r 8bad40b5b8ab0aee26c09ef8d59ca15227e1fec3 -r b9c7813848e989d1a228a53745bb57f958b05467 scripts/functional_tests.py
--- a/scripts/functional_tests.py
+++ b/scripts/functional_tests.py
@@ -314,6 +314,7 @@
log.info( "Functional tests will be run against %s:%s" % ( galaxy_test_host, galaxy_test_port ) )
success = False
try:
+ tool_configs = app.config.tool_configs
# What requires these? Handy for (eg) functional tests to save outputs?
if galaxy_test_save:
os.environ[ 'GALAXY_TEST_SAVE' ] = galaxy_test_save
@@ -337,7 +338,6 @@
# Eliminate the migrated_tool_panel_config from the app's tool_configs, append the list of installed_tool_panel_configs,
# and reload the app's toolbox.
relative_migrated_tool_panel_config = os.path.join( app.config.root, migrated_tool_panel_config )
- tool_configs = app.config.tool_configs
if relative_migrated_tool_panel_config in tool_configs:
tool_configs.remove( relative_migrated_tool_panel_config )
for installed_tool_panel_config in installed_tool_panel_configs:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: inithello: Clean up remaining references to galaxy.util.shed_util_common.
by commits-noreply@bitbucket.org 27 Feb '13
by commits-noreply@bitbucket.org 27 Feb '13
27 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/8bad40b5b8ab/
changeset: 8bad40b5b8ab
user: inithello
date: 2013-02-27 17:16:10
summary: Clean up remaining references to galaxy.util.shed_util_common.
affected #: 2 files
diff -r b985587c33926d8d38fa4456b51eecbc68953bb9 -r 8bad40b5b8ab0aee26c09ef8d59ca15227e1fec3 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -920,7 +920,7 @@
def tool_shed_repository( self ):
# If this tool is included in an installed tool shed repository, return it.
if self.tool_shed:
- return galaxy.util.shed_util_common.get_tool_shed_repository_by_shed_name_owner_installed_changeset_revision( self.app,
+ return tool_shed.util.shed_util_common.get_tool_shed_repository_by_shed_name_owner_installed_changeset_revision( self.app,
self.tool_shed,
self.repository_name,
self.repository_owner,
diff -r b985587c33926d8d38fa4456b51eecbc68953bb9 -r 8bad40b5b8ab0aee26c09ef8d59ca15227e1fec3 lib/tool_shed/galaxy_install/__init__.py
--- a/lib/tool_shed/galaxy_install/__init__.py
+++ b/lib/tool_shed/galaxy_install/__init__.py
@@ -28,7 +28,7 @@
ElementInclude.include( root )
tool_path = root.get( 'tool_path', None )
if tool_path:
- tool_shed = galaxy.util.shed_util_common.clean_tool_shed_url( tool_shed_repository.tool_shed )
+ tool_shed = tool_shed.util.shed_util_common.clean_tool_shed_url( tool_shed_repository.tool_shed )
relative_path = os.path.join( tool_path,
tool_shed,
'repos',
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Rename community template path to tool_shed.
by commits-noreply@bitbucket.org 26 Feb '13
by commits-noreply@bitbucket.org 26 Feb '13
26 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b985587c3392/
changeset: b985587c3392
user: greg
date: 2013-02-26 23:12:52
summary: Rename community template path to tool_shed.
affected #: 101 files
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 lib/galaxy/web/base/controllers/admin.py
--- a/lib/galaxy/web/base/controllers/admin.py
+++ b/lib/galaxy/web/base/controllers/admin.py
@@ -36,7 +36,7 @@
message=message,
status=status )
else:
- return trans.fill_template( '/webapps/community/admin/index.mako',
+ return trans.fill_template( '/webapps/tool_shed/admin/index.mako',
message=message,
status=status )
@web.expose
@@ -49,7 +49,7 @@
message=message,
status=status )
else:
- return trans.fill_template( '/webapps/community/admin/center.mako',
+ return trans.fill_template( '/webapps/tool_shed/admin/center.mako',
message=message,
status=status )
@web.expose
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 lib/galaxy/web/framework/helpers/grids.py
--- a/lib/galaxy/web/framework/helpers/grids.py
+++ b/lib/galaxy/web/framework/helpers/grids.py
@@ -454,7 +454,7 @@
""" Column that displays community ratings for an item. """
def get_value( self, trans, grid, item ):
ave_item_rating, num_ratings = self.get_ave_item_rating_data( trans.sa_session, item, webapp_model=trans.model )
- return trans.fill_template( "community_rating.mako",
+ return trans.fill_template( "tool_shed_rating.mako",
ave_item_rating=ave_item_rating,
num_ratings=num_ratings,
item_id=trans.security.encode_id( item.id ) )
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 lib/galaxy/webapps/community/controllers/admin.py
--- a/lib/galaxy/webapps/community/controllers/admin.py
+++ b/lib/galaxy/webapps/community/controllers/admin.py
@@ -403,7 +403,7 @@
# Grid definition
title = "Repository Metadata"
model_class = model.RepositoryMetadata
- template='/webapps/community/repository/grid.mako'
+ template='/webapps/tool_shed/repository/grid.mako'
default_sort_key = "name"
columns = [
IdColumn( "Id",
@@ -567,7 +567,7 @@
action='manage_categories',
message=message,
status=status ) )
- return trans.fill_template( '/webapps/community/category/create_category.mako',
+ return trans.fill_template( '/webapps/tool_shed/category/create_category.mako',
name=name,
description=description,
message=message,
@@ -667,7 +667,7 @@
action='manage_categories',
message=message,
status=status ) )
- return trans.fill_template( '/webapps/community/category/edit_category.mako',
+ return trans.fill_template( '/webapps/tool_shed/category/edit_category.mako',
category=category,
message=message,
status=status )
@@ -677,7 +677,7 @@
if 'f-free-text-search' in kwd:
# Trick to enable searching repository name, description from the CategoryGrid.
# What we've done is rendered the search box for the RepositoryGrid on the grid.mako
- # template for the CategoryGrid. See ~/templates/webapps/community/category/grid.mako.
+ # template for the CategoryGrid. See ~/templates/webapps/tool_shed/category/grid.mako.
# Since we are searching repositories and not categories, redirect to browse_repositories().
return trans.response.send_redirect( web.url_for( controller='admin',
action='browse_repositories',
@@ -714,7 +714,7 @@
if 'regenerate_statistics_button' in kwd:
trans.app.shed_counter.generate_statistics()
message = "Successfully regenerated statistics"
- return trans.fill_template( '/webapps/community/admin/statistics.mako',
+ return trans.fill_template( '/webapps/tool_shed/admin/statistics.mako',
message=message,
status=status )
@web.expose
@@ -726,7 +726,7 @@
message = util.restore_text( kwd.get( 'message', '' ) )
status = kwd.get( 'status', 'done' )
repositories_select_field = suc.build_repository_ids_select_field( trans )
- return trans.fill_template( '/webapps/community/admin/reset_metadata_on_selected_repositories.mako',
+ return trans.fill_template( '/webapps/tool_shed/admin/reset_metadata_on_selected_repositories.mako',
repositories_select_field=repositories_select_field,
message=message,
status=status )
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -46,7 +46,7 @@
return 0
title = "Categories"
model_class = model.Category
- template='/webapps/community/category/grid.mako'
+ template='/webapps/tool_shed/category/grid.mako'
default_sort_key = "name"
columns = [
NameColumn( "Name",
@@ -82,7 +82,7 @@
return 0
title = "Categories of valid repositories"
model_class = model.Category
- template='/webapps/community/category/valid_grid.mako'
+ template='/webapps/tool_shed/category/valid_grid.mako'
default_sort_key = "name"
columns = [
CategoryGrid.NameColumn( "Name",
@@ -172,7 +172,7 @@
# Grid definition
title = "Repositories"
model_class = model.Repository
- template='/webapps/community/repository/grid.mako'
+ template='/webapps/tool_shed/repository/grid.mako'
default_sort_key = "name"
columns = [
NameColumn( "Name",
@@ -503,7 +503,7 @@
# Grid definition
title = "Matching repositories"
model_class = model.RepositoryMetadata
- template='/webapps/community/repository/grid.mako'
+ template='/webapps/tool_shed/repository/grid.mako'
default_sort_key = "Repository.name"
columns = [
NameColumn( "Repository name",
@@ -571,7 +571,7 @@
# The request came from the tool shed.
if 'f-free-text-search' in kwd:
# Trick to enable searching repository name, description from the CategoryGrid. What we've done is rendered the search box for the
- # RepositoryGrid on the grid.mako template for the CategoryGrid. See ~/templates/webapps/community/category/grid.mako. Since we
+ # RepositoryGrid on the grid.mako template for the CategoryGrid. See ~/templates/webapps/tool_shed/category/grid.mako. Since we
# are searching repositories and not categories, redirect to browse_repositories().
if 'id' in kwd and 'f-free-text-search' in kwd and kwd[ 'id' ] == kwd[ 'f-free-text-search' ]:
# The value of 'id' has been set to the search string, which is a repository name. We'll try to get the desired encoded repository
@@ -629,7 +629,7 @@
repository.name,
repository.user.username,
downloadable_revision.changeset_revision )
- return trans.fill_template( '/webapps/community/repository/browse_invalid_tools.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/browse_invalid_tools.mako',
cntrller=cntrller,
invalid_tools_dict=invalid_tools_dict,
message=message,
@@ -747,7 +747,7 @@
suc.update_repository( repo )
is_malicious = suc.changeset_is_malicious( trans, id, repository.tip( trans.app ) )
metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
- return trans.fill_template( '/webapps/community/repository/browse_repository.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/browse_repository.mako',
repository=repository,
metadata=metadata,
commit_message=commit_message,
@@ -937,7 +937,7 @@
repository = suc.get_repository_in_tool_shed( trans, id )
metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
if trans.user and trans.user.email:
- return trans.fill_template( "/webapps/community/repository/contact_owner.mako",
+ return trans.fill_template( "/webapps/tool_shed/repository/contact_owner.mako",
repository=repository,
metadata=metadata,
message=message,
@@ -1032,7 +1032,7 @@
action='view_repository',
message=message,
id=trans.security.encode_id( repository.id ) ) )
- return trans.fill_template( '/webapps/community/repository/create_repository.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/create_repository.mako',
name=name,
description=description,
long_description=long_description,
@@ -1073,7 +1073,7 @@
is_malicious = suc.changeset_is_malicious( trans, repository_id, repository.tip( trans.app ) )
metadata = self.get_metadata( trans, repository_id, changeset_revision )
try:
- return trans.fill_template( "/webapps/community/repository/tool_form.mako",
+ return trans.fill_template( "/webapps/tool_shed/repository/tool_form.mako",
repository=repository,
metadata=metadata,
changeset_revision=changeset_revision,
@@ -1197,7 +1197,7 @@
message = "No search performed - each field must contain the same number of comma-separated items."
status = "error"
exact_matches_check_box = CheckboxField( 'exact_matches', checked=exact_matches_checked )
- return trans.fill_template( '/webapps/community/repository/find_tools.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/find_tools.mako',
tool_id=self.__stringify( tool_ids ),
tool_name=self.__stringify( tool_names ),
tool_version=self.__stringify( tool_versions ),
@@ -1286,7 +1286,7 @@
exact_matches_checked = False
workflow_names = []
exact_matches_check_box = CheckboxField( 'exact_matches', checked=exact_matches_checked )
- return trans.fill_template( '/webapps/community/repository/find_workflows.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/find_workflows.mako',
workflow_name=self.__stringify( workflow_names ),
exact_matches_check_box=exact_matches_check_box,
message=message,
@@ -1690,7 +1690,7 @@
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
- return trans.fill_template( '/webapps/community/repository/help.mako', message=message, status=status, **kwd )
+ return trans.fill_template( '/webapps/tool_shed/repository/help.mako', message=message, status=status, **kwd )
def __in_tool_dict( self, tool_dict, exact_matches_checked, tool_id=None, tool_name=None, tool_version=None ):
found = False
if tool_id and not tool_name and not tool_version:
@@ -1762,7 +1762,7 @@
user_id = params.get( 'user_id', None )
repository_id = params.get( 'repository_id', None )
changeset_revision = params.get( 'changeset_revision', None )
- return trans.fill_template( '/webapps/community/index.mako',
+ return trans.fill_template( '/webapps/tool_shed/index.mako',
repository_metadata=repository_metadata,
has_reviewed_repositories=has_reviewed_repositories,
has_deprecated_repositories=has_deprecated_repositories,
@@ -1813,7 +1813,7 @@
elif error_message:
message = error_message
try:
- return trans.fill_template( "/webapps/community/repository/tool_form.mako",
+ return trans.fill_template( "/webapps/tool_shed/repository/tool_form.mako",
repository=repository,
changeset_revision=changeset_revision,
tool=tool,
@@ -1872,7 +1872,7 @@
.order_by( trans.model.Repository.table.c.name ):
if user.email in repository.email_alerts:
email_alert_repositories.append( repository )
- return trans.fill_template( "/webapps/community/user/manage_email_alerts.mako",
+ return trans.fill_template( "/webapps/tool_shed/user/manage_email_alerts.mako",
new_repo_alert_check_box=new_repo_alert_check_box,
email_alert_repositories=email_alert_repositories,
message=message,
@@ -2056,7 +2056,7 @@
review_id = None
can_browse_repository_reviews = suc.can_browse_repository_reviews( trans, repository )
containers_dict = suc.build_repository_containers_for_tool_shed( trans, repository, changeset_revision, repository_dependencies, repository_metadata )
- return trans.fill_template( '/webapps/community/repository/manage_repository.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/manage_repository.mako',
repo_name=repo_name,
description=description,
long_description=long_description,
@@ -2163,7 +2163,7 @@
add_id_to_name=False,
downloadable=False )
containers_dict = suc.build_repository_containers_for_tool_shed( trans, repository, changeset_revision, repository_dependencies, repository_metadata )
- return trans.fill_template( '/webapps/community/repository/preview_tools_in_changeset.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/preview_tools_in_changeset.mako',
repository=repository,
containers_dict=containers_dict,
repository_metadata_id=repository_metadata_id,
@@ -2230,7 +2230,7 @@
rra = self.get_user_item_rating( trans.sa_session, trans.user, repository, webapp_model=trans.model )
is_malicious = suc.changeset_is_malicious( trans, id, repository.tip( trans.app ) )
metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
- return trans.fill_template( '/webapps/community/repository/rate_repository.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/rate_repository.mako',
repository=repository,
metadata=metadata,
avg_rating=avg_rating,
@@ -2242,7 +2242,7 @@
status=status )
@web.expose
def reset_all_metadata( self, trans, id, **kwd ):
- # This method is called only from the ~/templates/webapps/community/repository/manage_repository.mako template.
+ # This method is called only from the ~/templates/webapps/tool_shed/repository/manage_repository.mako template.
# It resets all metadata on the complete changelog for a single repository in the tool shed.
invalid_file_tups, metadata_dict = suc.reset_all_metadata_on_repository_in_tool_shed( trans, id, **kwd )
if invalid_file_tups:
@@ -2405,7 +2405,7 @@
message = "Select at least 1 file to delete from the repository before clicking <b>Delete selected files</b>."
status = "error"
is_malicious = suc.changeset_is_malicious( trans, id, repository.tip( trans.app ) )
- return trans.fill_template( '/webapps/community/repository/browse_repository.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/browse_repository.mako',
repo=repo,
repository=repository,
commit_message=commit_message,
@@ -2672,7 +2672,7 @@
changesets.insert( 0, change_dict )
is_malicious = suc.changeset_is_malicious( trans, id, repository.tip( trans.app ) )
metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
- return trans.fill_template( '/webapps/community/repository/view_changelog.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/view_changelog.mako',
repository=repository,
metadata=metadata,
changesets=changesets,
@@ -2703,7 +2703,7 @@
diffs.append( suc.to_safe_string( diff, to_html=True ) )
is_malicious = suc.changeset_is_malicious( trans, id, repository.tip( trans.app ) )
metadata = self.get_metadata( trans, id, ctx_str )
- return trans.fill_template( '/webapps/community/repository/view_changeset.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/view_changeset.mako',
repository=repository,
metadata=metadata,
ctx=ctx,
@@ -2810,7 +2810,7 @@
review_id = None
containers_dict = suc.build_repository_containers_for_tool_shed( trans, repository, changeset_revision, repository_dependencies, repository_metadata )
can_browse_repository_reviews = suc.can_browse_repository_reviews( trans, repository )
- return trans.fill_template( '/webapps/community/repository/view_repository.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/view_repository.mako',
repo=repo,
repository=repository,
repository_metadata_id=repository_metadata_id,
@@ -2893,7 +2893,7 @@
review_id = trans.security.encode_id( review.id )
else:
review_id = None
- return trans.fill_template( "/webapps/community/repository/view_tool_metadata.mako",
+ return trans.fill_template( "/webapps/tool_shed/repository/view_tool_metadata.mako",
repository=repository,
metadata=metadata,
tool=tool,
@@ -2919,7 +2919,7 @@
repository = suc.get_repository_in_tool_shed( trans, trans.security.encode_id( repository_metadata.repository_id ) )
changeset_revision = repository_metadata.changeset_revision
metadata = repository_metadata.metadata
- return trans.fill_template( "/webapps/community/repository/view_workflow.mako",
+ return trans.fill_template( "/webapps/tool_shed/repository/view_workflow.mako",
repository=repository,
changeset_revision=changeset_revision,
repository_metadata_id=repository_metadata_id,
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 lib/galaxy/webapps/community/controllers/repository_review.py
--- a/lib/galaxy/webapps/community/controllers/repository_review.py
+++ b/lib/galaxy/webapps/community/controllers/repository_review.py
@@ -27,7 +27,7 @@
return component.description
title = "Repository review components"
model_class = model.Component
- template='/webapps/community/repository_review/grid.mako'
+ template='/webapps/tool_shed/repository_review/grid.mako'
default_sort_key = "name"
columns = [
NameColumn( "Name",
@@ -89,7 +89,7 @@
return rval
title = "All reviewed repositories"
model_class = model.Repository
- template='/webapps/community/repository_review/grid.mako'
+ template='/webapps/tool_shed/repository_review/grid.mako'
default_sort_key = "Repository.name"
columns = [
RepositoryGrid.NameColumn( "Repository name",
@@ -196,7 +196,7 @@
return ''
title = "Reviews by user"
model_class = model.RepositoryReview
- template='/webapps/community/repository_review/grid.mako'
+ template='/webapps/tool_shed/repository_review/grid.mako'
default_sort_key = 'repository_id'
columns = [
RepositoryNameColumn( "Repository Name",
@@ -316,7 +316,7 @@
repository = review.repository
repo = hg.repository( suc.get_configured_ui(), repository.repo_path( trans.app ) )
rev, changeset_revision_label = suc.get_rev_label_from_changeset_revision( repo, review.changeset_revision )
- return trans.fill_template( '/webapps/community/repository_review/browse_review.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository_review/browse_review.mako',
repository=repository,
changeset_revision_label=changeset_revision_label,
review=review,
@@ -361,7 +361,7 @@
action='manage_components',
message=message,
status=status ) )
- return trans.fill_template( '/webapps/community/repository_review/create_component.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository_review/create_component.mako',
name=name,
description=description,
message=message,
@@ -456,7 +456,7 @@
action='manage_components',
message=message,
status=status ) )
- return trans.fill_template( '/webapps/community/repository_review/edit_component.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository_review/edit_component.mako',
component=component,
message=message,
status=status )
@@ -576,7 +576,7 @@
selected_value=selected_value,
for_component=False )
rev, changeset_revision_label = suc.get_rev_label_from_changeset_revision( repo, review.changeset_revision )
- return trans.fill_template( '/webapps/community/repository_review/edit_review.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository_review/edit_review.mako',
repository=repository,
review=review,
changeset_revision_label=changeset_revision_label,
@@ -688,7 +688,7 @@
installable=installable,
can_add_review=can_add_review )
reviews_dict[ changeset_revision ] = revision_dict
- return trans.fill_template( '/webapps/community/repository_review/reviews_of_repository.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository_review/reviews_of_repository.mako',
repository=repository,
reviews_dict=reviews_dict,
mine=mine,
@@ -709,7 +709,7 @@
installable = changeset_revision in [ metadata_revision.changeset_revision for metadata_revision in repository.metadata_revisions ]
rev, changeset_revision_label = suc.get_rev_label_from_changeset_revision( repo, changeset_revision )
reviews = suc.get_reviews_by_repository_id_changeset_revision( trans, repository_id, changeset_revision )
- return trans.fill_template( '/webapps/community/repository_review/reviews_of_changeset_revision.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository_review/reviews_of_changeset_revision.mako',
repository=repository,
changeset_revision=changeset_revision,
changeset_revision_label=changeset_revision_label,
@@ -773,7 +773,7 @@
repo = hg.repository( suc.get_configured_ui(), repository.repo_path( trans.app ) )
previous_reviews_dict = suc.get_previous_repository_reviews( trans, repository, changeset_revision )
rev, changeset_revision_label = suc.get_rev_label_from_changeset_revision( repo, changeset_revision )
- return trans.fill_template( '/webapps/community/repository_review/select_previous_review.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository_review/select_previous_review.mako',
repository=repository,
changeset_revision=changeset_revision,
changeset_revision_label=changeset_revision_label,
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -204,7 +204,7 @@
# Reset the tool_data_tables by loading the empty tool_data_table_conf.xml file.
suc.reset_tool_data_tables( trans.app )
selected_categories = [ trans.security.decode_id( id ) for id in category_ids ]
- return trans.fill_template( '/webapps/community/repository/upload.mako',
+ return trans.fill_template( '/webapps/tool_shed/repository/upload.mako',
repository=repository,
url=url,
commit_message=commit_message,
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 lib/galaxy/webapps/galaxy/controllers/admin.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin.py
@@ -733,7 +733,7 @@
status = util.restore_text( kwd.get( 'status', 'done' ) )
migration_stages_dict = odict()
migration_modules = []
- migration_scripts_dir = os.path.abspath( os.path.join( trans.app.config.root, 'lib', 'galaxy', 'tool_shed', 'migrate', 'versions' ) )
+ migration_scripts_dir = os.path.abspath( os.path.join( trans.app.config.root, 'lib', 'tool_shed', 'galaxy_install', 'migrate', 'versions' ) )
migration_scripts_dir_contents = os.listdir( migration_scripts_dir )
for item in migration_scripts_dir_contents:
if os.path.isfile( os.path.join( migration_scripts_dir, item ) ) and item.endswith( '.py' ):
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 lib/galaxy/webapps/galaxy/controllers/user.py
--- a/lib/galaxy/webapps/galaxy/controllers/user.py
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py
@@ -735,7 +735,7 @@
message=message,
status=status )
else:
- return trans.fill_template( '/webapps/community/user/manage_info.mako',
+ return trans.fill_template( '/webapps/tool_shed/user/manage_info.mako',
cntrller=cntrller,
user=user,
email=email,
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/admin/tool_shed_repository/common.mako
--- a/templates/admin/tool_shed_repository/common.mako
+++ b/templates/admin/tool_shed_repository/common.mako
@@ -1,4 +1,4 @@
-<%namespace file="/webapps/community/repository/common.mako" import="*" />
+<%namespace file="/webapps/tool_shed/repository/common.mako" import="*" /><%def name="browse_files(title_text, directory_path)"><script type="text/javascript">
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/admin/tool_shed_repository/manage_repository.mako
--- a/templates/admin/tool_shed_repository/manage_repository.mako
+++ b/templates/admin/tool_shed_repository/manage_repository.mako
@@ -1,6 +1,6 @@
<%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" />
-<%namespace file="/webapps/community/repository/common.mako" import="*" />
+<%namespace file="/webapps/tool_shed/repository/common.mako" import="*" /><%namespace file="/admin/tool_shed_repository/common.mako" import="*" /><%def name="stylesheets()">
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/admin/tool_shed_repository/reselect_tool_panel_section.mako
--- a/templates/admin/tool_shed_repository/reselect_tool_panel_section.mako
+++ b/templates/admin/tool_shed_repository/reselect_tool_panel_section.mako
@@ -2,7 +2,7 @@
<%namespace file="/message.mako" import="render_msg" /><%namespace file="/admin/tool_shed_repository/common.mako" import="render_dependencies_section" /><%namespace file="/admin/tool_shed_repository/common.mako" import="render_readme_section" />
-<%namespace file="/webapps/community/repository/common.mako" import="*" />
+<%namespace file="/webapps/tool_shed/repository/common.mako" import="*" /><%def name="stylesheets()">
${parent.stylesheets()}
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/admin/tool_shed_repository/reset_metadata_on_selected_repositories.mako
--- a/templates/admin/tool_shed_repository/reset_metadata_on_selected_repositories.mako
+++ b/templates/admin/tool_shed_repository/reset_metadata_on_selected_repositories.mako
@@ -1,6 +1,6 @@
<%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" />
-<%namespace file="/webapps/community/common/common.mako" import="common_misc_javascripts" />
+<%namespace file="/webapps/tool_shed/common/common.mako" import="common_misc_javascripts" /><%def name="javascripts()">
${parent.javascripts()}
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/admin/tool_shed_repository/select_shed_tool_panel_config.mako
--- a/templates/admin/tool_shed_repository/select_shed_tool_panel_config.mako
+++ b/templates/admin/tool_shed_repository/select_shed_tool_panel_config.mako
@@ -2,7 +2,7 @@
<%namespace file="/message.mako" import="render_msg" /><%namespace file="/admin/tool_shed_repository/common.mako" import="render_dependencies_section" /><%namespace file="/admin/tool_shed_repository/common.mako" import="render_readme_section" />
-<%namespace file="/webapps/community/repository/common.mako" import="*" />
+<%namespace file="/webapps/tool_shed/repository/common.mako" import="*" /><%def name="stylesheets()">
${parent.stylesheets()}
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/admin/tool_shed_repository/select_tool_panel_section.mako
--- a/templates/admin/tool_shed_repository/select_tool_panel_section.mako
+++ b/templates/admin/tool_shed_repository/select_tool_panel_section.mako
@@ -2,7 +2,7 @@
<%namespace file="/message.mako" import="render_msg" /><%namespace file="/admin/tool_shed_repository/common.mako" import="render_dependencies_section" /><%namespace file="/admin/tool_shed_repository/common.mako" import="render_readme_section" />
-<%namespace file="/webapps/community/repository/common.mako" import="*" />
+<%namespace file="/webapps/tool_shed/repository/common.mako" import="*" /><%def name="stylesheets()">
${parent.stylesheets()}
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/admin/tool_shed_repository/view_workflow.mako
--- a/templates/admin/tool_shed_repository/view_workflow.mako
+++ b/templates/admin/tool_shed_repository/view_workflow.mako
@@ -1,7 +1,7 @@
<%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" />
-<%namespace file="/webapps/community/common/common.mako" import="*" />
-<%namespace file="/webapps/community/repository/common.mako" import="*" />
+<%namespace file="/webapps/tool_shed/common/common.mako" import="*" />
+<%namespace file="/webapps/tool_shed/repository/common.mako" import="*" /><%
from galaxy.web.framework.helpers import time_ago
@@ -11,7 +11,7 @@
<%!
def inherit(context):
if context.get('use_panels'):
- return '/webapps/community/base_panels.mako'
+ return '/webapps/tool_shed/base_panels.mako'
else:
return '/base.mako'
%>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/community_rating.mako
--- a/templates/community_rating.mako
+++ /dev/null
@@ -1,33 +0,0 @@
-<%
- label = "ratings"
- if num_ratings == 1:
- label = "rating"
-%>
-<div>
- <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="1"
- %if ave_item_rating > 0 and ave_item_rating <= 1.5:
- checked="checked"
- %endif
-
- />
- <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="2"
- %if ave_item_rating > 1.5 and ave_item_rating <= 2.5:
- checked="checked"
- %endif
- />
- <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="3"
- %if ave_item_rating > 2.5 and ave_item_rating <= 3.5:
- checked="checked"
- %endif
- />
- <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="4"
- %if ave_item_rating > 3.5 and ave_item_rating <= 4.5:
- checked="checked"
- %endif
- />
- <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="5"
- %if ave_item_rating > 4.5:
- checked="checked"
- %endif
- />
-</div>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/tool_shed_rating.mako
--- /dev/null
+++ b/templates/tool_shed_rating.mako
@@ -0,0 +1,33 @@
+<%
+ label = "ratings"
+ if num_ratings == 1:
+ label = "rating"
+%>
+<div>
+ <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="1"
+ %if ave_item_rating > 0 and ave_item_rating <= 1.5:
+ checked="checked"
+ %endif
+
+ />
+ <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="2"
+ %if ave_item_rating > 1.5 and ave_item_rating <= 2.5:
+ checked="checked"
+ %endif
+ />
+ <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="3"
+ %if ave_item_rating > 2.5 and ave_item_rating <= 3.5:
+ checked="checked"
+ %endif
+ />
+ <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="4"
+ %if ave_item_rating > 3.5 and ave_item_rating <= 4.5:
+ checked="checked"
+ %endif
+ />
+ <input name="star1-${item_id}" type="radio" class="community_rating_star star" disabled="disabled" value="5"
+ %if ave_item_rating > 4.5:
+ checked="checked"
+ %endif
+ />
+</div>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/user/dbkeys.mako
--- a/templates/user/dbkeys.mako
+++ b/templates/user/dbkeys.mako
@@ -1,7 +1,7 @@
<%!
def inherit(context):
if context.get('use_panels'):
- return '/base_panels.mako'
+ return '/webapps/galaxy/base_panels.mako'
else:
return '/base.mako'
%>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/user/login.mako
--- a/templates/user/login.mako
+++ b/templates/user/login.mako
@@ -1,7 +1,7 @@
<%!
def inherit(context):
if context.get('use_panels'):
- return '/base_panels.mako'
+ return '/webapps/galaxy/base_panels.mako'
else:
return '/base.mako'
%>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/user/logout.mako
--- a/templates/user/logout.mako
+++ b/templates/user/logout.mako
@@ -1,4 +1,4 @@
-<%inherit file="/base_panels.mako"/>
+<%inherit file="/webapps/galaxy/base_panels.mako"/><%namespace file="/message.mako" import="render_msg" />
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/user/openid_associate.mako
--- a/templates/user/openid_associate.mako
+++ b/templates/user/openid_associate.mako
@@ -1,7 +1,7 @@
<%!
def inherit(context):
if context.get('use_panels'):
- return '/base_panels.mako'
+ return '/webapps/galaxy/base_panels.mako'
else:
return '/base.mako'
%>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/admin/center.mako
--- a/templates/webapps/community/admin/center.mako
+++ /dev/null
@@ -1,50 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-<%def name="title()">Galaxy Administration</%def>
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-<h2>Administration</h2>
-
-<p>The menu on the left provides the following features</p>
-<ul>
- <li>
- <strong>Categories</strong>
- <p/>
- <ul>
- <li>
- <strong>Manage categories</strong>
- </li>
- <p/>
- </ul>
- </li>
- <li>
- <strong>Security</strong>
- <p/>
- <ul>
- <li>
- <strong>Manage users</strong> - provides a view of the registered users and all groups and non-private roles associated
- with each user.
- </li>
- <p/>
- <li>
- <strong>Manage groups</strong> - provides a view of all groups along with the members of the group and the roles associated with
- each group (both private and non-private roles). The group names include a link to a page that allows you to manage the users and
- roles that are associated with the group.
- </li>
- <p/>
- <li>
- <strong>Manage roles</strong> - provides a view of all non-private roles along with the role type, and the users and groups that
- are associated with the role. The role names include a link to a page that allows you to manage the users and groups that are associated
- with the role. The page also includes a view of the data library datasets that are associated with the role and the permissions applied
- to each dataset.
- </li>
- </ul>
- </li>
- <p/>
-</ul>
-<br/>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/admin/index.mako
--- a/templates/webapps/community/admin/index.mako
+++ /dev/null
@@ -1,139 +0,0 @@
-<%inherit file="/webapps/community/base_panels.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-<%def name="stylesheets()">
- ## Include "base.css" for styling tool menu and forms (details)
- ${h.css( "base", "autocomplete_tagging", "tool_menu" )}
-
- ## But make sure styles for the layout take precedence
- ${parent.stylesheets()}
-
- <style type="text/css">
- body { margin: 0; padding: 0; overflow: hidden; }
- #left {
- background: #C1C9E5 url(${h.url_for('/static/style/menu_bg.png')}) top repeat-x;
- }
- </style>
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
-</%def>
-
-<%def name="init()">
- <%
- self.has_left_panel=True
- self.has_right_panel=False
- self.active_view="tools"
- %>
- %if trans.app.config.require_login and not trans.user:
- <script type="text/javascript">
- if ( window != top ) {
- top.location.href = location.href;
- }
- </script>
- %endif
-</%def>
-
-<%def name="left_panel()">
- <% can_review_repositories = trans.app.security_agent.user_can_review_repositories( trans.user ) %>
- <div class="unified-panel-header" unselectable="on">
- <div class='unified-panel-header-inner'>Administration</div>
- </div>
- <div class="page-container" style="padding: 10px;">
- <div class="toolMenu">
- <div class="toolSectionList">
- <div class="toolSectionTitle">
- Repositories
- </div>
- <div class="toolSectionBody">
- <div class="toolSectionBg">
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_categories' )}">Browse by category</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='admin', action='browse_repositories' )}">Browse all repositories</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='admin', action='reset_metadata_on_selected_repositories_in_tool_shed' )}">Reset selected metadata</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='admin', action='browse_repository_metadata' )}">Browse metadata</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_invalid_tools', cntrller='admin' )}">Browse invalid tools</a>
- </div>
- </div>
- </div>
- %if can_review_repositories:
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- Reviewing Repositories
- </div>
- <div class="toolSectionBody">
- <div class="toolSectionBg">
- %if trans.user.repository_reviews:
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository_review', action='manage_repositories_reviewed_by_me' )}">Repositories reviewed by me</a>
- </div>
- %endif
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository_review', action='manage_repositories_with_reviews' )}">All reviewed repositories</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository_review', action='manage_repositories_without_reviews' )}">Repositories with no reviews</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository_review', action='manage_components' )}">Manage review components</a>
- </div>
- </div>
- </div>
- %endif
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- Categories
- </div>
- <div class="toolSectionBody">
- <div class="toolSectionBg">
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='admin', action='manage_categories' )}">Manage categories</a>
- </div>
- </div>
- </div>
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- Security
- </div>
- <div class="toolSectionBody">
- <div class="toolSectionBg">
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='admin', action='users' )}">Manage users</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='admin', action='groups' )}">Manage groups</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='admin', action='roles' )}">Manage roles</a>
- </div>
- </div>
- </div>
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- Statistics
- </div>
- <div class="toolSectionBody">
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='admin', action='regenerate_statistics' )}">View shed statistics</a>
- </div>
- </div>
- </div>
- </div>
- </div>
-</%def>
-
-<%def name="center_panel()">
- <%
- center_url = h.url_for(controller='admin', action='center' )
- %>
- <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${center_url}"></iframe>
-</%def>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/admin/reset_metadata_on_selected_repositories.mako
--- a/templates/webapps/community/admin/reset_metadata_on_selected_repositories.mako
+++ /dev/null
@@ -1,40 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-<%namespace file="/webapps/community/common/common.mako" import="common_misc_javascripts" />
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${common_misc_javascripts()}
-</%def>
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-<div class="warningmessage">
- Resetting metadata may take a while because this process clones each change set in each selected repository's change log to a temporary location on disk.
- Wait until this page redirects after clicking the <b>Reset metadata on selected repositories</b> button, as doing anything else will not be helpful. Watch
- the tool shed paster log to pass the time if necessary.
-</div>
-
-<div class="toolForm">
- <div class="toolFormTitle">Reset all metadata on each selected repository</div>
- <form name="reset_metadata_on_selected_repositories" id="reset_metadata_on_selected_repositories" action="${h.url_for( controller='admin', action='reset_metadata_on_selected_repositories_in_tool_shed' )}" method="post" >
- <div class="form-row">
- Check each repository for which you want to reset metadata. Repository names are followed by owners in parentheses.
- </div>
- <div style="clear: both"></div>
- <div class="form-row">
- <input type="checkbox" id="checkAll" name="select_all_repositories_checkbox" value="true" onclick="checkAllFields('repository_ids');"/><input type="hidden" name="select_all_repositories_checkbox" value="true"/><b>Select/unselect all repositories</b>
- </div>
- <div style="clear: both"></div>
- <div class="form-row">
- ${repositories_select_field.get_html()}
- </div>
- <div style="clear: both"></div>
- <div class="form-row">
- <input type="submit" name="reset_metadata_on_selected_repositories_button" value="Reset metadata on selected repositories"/>
- </div>
- </form>
- </div>
-</div>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/admin/statistics.mako
--- a/templates/webapps/community/admin/statistics.mako
+++ /dev/null
@@ -1,56 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Tool shed statistics generated on ${trans.app.shed_counter.generation_time}</div>
- <form name="regenerate_statistics" id="regenerate_statistics" action="${h.url_for( controller='admin', action='regenerate_statistics' )}" method="post" >
- <div class="form-row">
- <table class="grid">
- <tr>
- <th>Item</th>
- <th>Count</th>
- </tr>
- <tr>
- <td>Total repositories</td>
- <td>${trans.app.shed_counter.repositories | h}</td>
- </tr>
- ##<tr>
- ## <td>Empty repositories</td>
- ## <td>${trans.app.shed_counter.new_repositories | h}</td>
- ##</tr>
- <tr>
- <td>Deleted repositories</td>
- <td>${trans.app.shed_counter.deleted_repositories | h}</td>
- </tr>
- <tr>
- <td>Valid tools</td>
- <td>${trans.app.shed_counter.valid_tools | h}</td>
- </tr>
- <tr>
- <td>Invalid tools</td>
- <td>${trans.app.shed_counter.invalid_tools | h}</td>
- </tr>
- <tr>
- <td>Workflows</td>
- <td>${trans.app.shed_counter.workflows | h}</td>
- </tr>
- <tr>
- <td>Proprietary datatypes</td>
- <td>${trans.app.shed_counter.proprietary_datatypes | h}</td>
- </tr>
- <tr>
- <td>Total clones</td>
- <td>${trans.app.shed_counter.total_clones | h}</td>
- </tr>
- </table>
- </div>
- <div class="form-row">
- <input type="submit" name="regenerate_statistics_button" value="Regenerate statistics"/>
- </div>
- </form>
- </div>
-</div>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/base_panels.mako
--- a/templates/webapps/community/base_panels.mako
+++ /dev/null
@@ -1,133 +0,0 @@
-<%inherit file="/base/base_panels.mako"/>
-
-## Default title
-<%def name="title()">Galaxy Tool Shed</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
-</%def>
-
-## Masthead
-<%def name="masthead()">
-
- ## Tab area, fills entire width
- <div style="position: relative; right: -50%; float: left;">
- <div style="display: block; position: relative; right: 50%;">
-
- <ul class="nav" border="0" cellspacing="0">
-
- <%def name="tab( id, display, href, target='_parent', visible=True, extra_class='', menu_options=None )">
- <%
- cls = ""
- a_cls = ""
- extra = ""
- if extra_class:
- cls += " " + extra_class
- if self.active_view == id:
- cls += " active"
- if menu_options:
- cls += " dropdown"
- a_cls += " dropdown-toggle"
- extra = "<b class='caret'></b>"
- style = ""
- if not visible:
- style = "display: none;"
- %>
- <li class="${cls}" style="${style}">
- %if href:
- <a class="${a_cls}" data-toggle="dropdown" target="${target}" href="${href}">${display}${extra}</a>
- %else:
- <a class="${a_cls}" data-toggle="dropdown">${display}${extra}</a>
- %endif
- %if menu_options:
- <ul class="dropdown-menu">
- %for menu_item in menu_options:
- %if not menu_item:
- <li class="divider"></li>
- %else:
- <li>
- %if len ( menu_item ) == 1:
- ${menu_item[0]}
- %elif len ( menu_item ) == 2:
- <% name, link = menu_item %>
- <a href="${link}">${name | h}</a>
- %else:
- <% name, link, target = menu_item %>
- <a target="${target}" href="${link}">${name | h}</a>
- %endif
- </li>
- %endif
- %endfor
- </ul>
- %endif
- </li>
- </%def>
-
- ## Repositories tab.
- ${tab( "repositories", "Repositories", h.url_for( controller='/repository', action='index' ) )}
-
- ## Admin tab.
- ${tab( "admin", "Admin", h.url_for( controller='/admin', action='index' ), extra_class="admin-only", visible=( trans.user and app.config.is_admin_user( trans.user ) ) )}
-
- ## Help tab.
- <%
- menu_options = []
- qa_url = app.config.get( "qa_url", None )
- if qa_url:
- menu_options = [ [_('Galaxy Q&A'), qa_url, "_blank" ] ]
- menu_options.extend( [
- [_('Support'), app.config.get( "support_url", "http://wiki.g2.bx.psu.edu/Support" ), "_blank" ],
- [_('Tool shed wiki'), app.config.get( "wiki_url", "http://wiki.g2.bx.psu.edu/Tool%20Shed" ), "_blank" ],
- [_('Galaxy wiki'), app.config.get( "wiki_url", "http://wiki.g2.bx.psu.edu/" ), "_blank" ],
- [_('Video tutorials (screencasts)'), app.config.get( "screencasts_url", "http://galaxycast.org" ), "_blank" ],
- [_('How to Cite Galaxy'), app.config.get( "citation_url", "http://wiki.g2.bx.psu.edu/Citing%20Galaxy" ), "_blank" ]
- ] )
- tab( "help", _("Help"), None, menu_options=menu_options )
- %>
-
- ## User tabs.
- <%
- # Menu for user who is not logged in.
- menu_options = [ [ _("Login"), h.url_for( controller='/user', action='login' ), "galaxy_main" ] ]
- if app.config.allow_user_creation:
- menu_options.append( [ _("Register"), h.url_for( controller='/user', action='create', cntrller='user' ), "galaxy_main" ] )
- extra_class = "loggedout-only"
- visible = ( trans.user == None )
- tab( "user", _("User"), None, visible=visible, menu_options=menu_options )
- # Menu for user who is logged in.
- if trans.user:
- email = trans.user.email
- else:
- email = ""
- menu_options = [ [ '<a>Logged in as <span id="user-email">%s</span></a>' % email ] ]
- if app.config.use_remote_user:
- if app.config.remote_user_logout_href:
- menu_options.append( [ _('Logout'), app.config.remote_user_logout_href, "_top" ] )
- else:
- menu_options.append( [ _('Preferences'), h.url_for( controller='/user', action='index', cntrller='user' ), "galaxy_main" ] )
- menu_options.append( [ _('API Keys'), h.url_for( controller='/user', action='api_keys', cntrller='user' ), "galaxy_main" ] )
- logout_url = h.url_for( controller='/user', action='logout' )
- menu_options.append( [ 'Logout', logout_url, "_top" ] )
- menu_options.append( None )
- if app.config.use_remote_user:
- menu_options.append( [ _('Public Name'), h.url_for( controller='/user', action='edit_username', cntrller='user' ), "galaxy_main" ] )
-
- extra_class = "loggedin-only"
- visible = ( trans.user != None )
- tab( "user", "User", None, visible=visible, menu_options=menu_options )
- %>
- </ul>
- </div>
- </div>
-
- ## Logo, layered over tabs to be clickable
- <div class="title">
- <a href="${h.url_for( app.config.get( 'logo_url', '/' ) )}">
- <img border="0" src="${h.url_for('/static/images/galaxyIcon_noText.png')}">
- Galaxy Tool Shed
- %if app.config.brand:
- <span>/ ${app.config.brand}</span>
- %endif
- </a>
- </div>
-</%def>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/category/create_category.mako
--- a/templates/webapps/community/category/create_category.mako
+++ /dev/null
@@ -1,34 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- <script type="text/javascript">
- $(function(){
- $("input:text:first").focus();
- })
- </script>
-</%def>
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Create Category</div>
- <div class="toolFormBody">
- <form name="create_category_form" id="create_category_form" action="${h.url_for(controller='admin', action='create_category' )}" method="post" >
- <div class="form-row">
- <label>Name:</label>
- <input name="name" type="textfield" value="${name | h}" size=40"/>
- </div>
- <div class="form-row">
- <label>Description:</label>
- <input name="description" type="textfield" value="${description | h}" size=40"/>
- </div>
- <div class="form-row">
- <input type="submit" name="create_category_button" value="Save"/>
- </div>
- </form>
- </div>
-</div>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/category/edit_category.mako
--- a/templates/webapps/community/category/edit_category.mako
+++ /dev/null
@@ -1,43 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">Change category name and description</div>
- <div class="toolFormBody">
- <form name="edit_category" action="${h.url_for( controller='admin', action='edit_category' )}" method="post" >
- <div class="form-row">
- <label>Name:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="text" name="name" value="${category.name | h}" size="40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>Description:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input name="description" type="textfield" value="${category.description | h}" size=40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="hidden" name="rename" value="submitted"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="hidden" name="id" value="${trans.security.encode_id( category.id )}"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <input type="submit" name="edit_category_button" value="Save"/>
- </div>
- </form>
- </div>
-</div>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/category/grid.mako
--- a/templates/webapps/community/category/grid.mako
+++ /dev/null
@@ -1,64 +0,0 @@
-<%namespace file="/display_common.mako" import="render_message" />
-<%namespace file="/grid_base.mako" import="*" />
-<%namespace file="/grid_common.mako" import="*" />
-<%inherit file="/grid_base.mako" />
-
-## Render grid header.
-## TODO: This is very similar to this directory's valid_grid.mako, so see if we can re-use this code in a better way.
-<%def name="render_grid_header( grid, repo_grid, render_title=True)">
- <div class="grid-header">
- %if render_title:
- ${grid_title()}
- %endif
- %if grid.global_actions:
- <ul class="manage-table-actions">
- %if len( grid.global_actions ) < 4:
- %for action in grid.global_actions:
- <li><a class="action-button" href="${h.url_for( **action.url_args )}">${action.label | h}</a></li>
- %endfor
- %else:
- <li><a class="action-button" id="action-8675309-popup" class="menubutton">Actions</a></li>
- <div popupmenu="action-8675309-popup">
- %for action in grid.global_actions:
- <a class="action-button" href="${h.url_for( **action.url_args )}">${action.label | h}</a>
- %endfor
- </div>
- %endif
- </ul>
- %endif
- ${render_grid_filters( repo_grid, render_advanced_search=False )}
- </div>
-</%def>
-
-<%def name="make_grid( grid, repo_grid )">
- <div class="loading-elt-overlay"></div>
- <table>
- <tr>
- <td width="75%">${self.render_grid_header( grid, repo_grid )}</td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td width="100%" id="grid-message" valign="top">${render_message( message, status )}</td>
- <td></td>
- <td></td>
- </tr>
- </table>
- ${render_grid_table( grid, show_item_checkboxes )}
-</%def>
-
-<%def name="grid_body( grid )">
- <%
- from galaxy.webapps.community.controllers.repository import RepositoryGrid
- repo_grid = RepositoryGrid()
- %>
- ${self.make_grid( grid, repo_grid )}
-</%def>
-
-<%def name="center_panel()">
- <div style="overflow: auto; height: 100%">
- <div class="page-container" style="padding: 10px;">
- ${self.grid_body( grid )}
- </div>
- </div>
-</%def>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/category/valid_grid.mako
--- a/templates/webapps/community/category/valid_grid.mako
+++ /dev/null
@@ -1,63 +0,0 @@
-<%namespace file="/display_common.mako" import="render_message" />
-<%namespace file="/grid_base.mako" import="*" />
-<%namespace file="/grid_common.mako" import="*" />
-<%inherit file="/grid_base.mako" />
-
-## Render grid header.
-<%def name="render_grid_header( grid, repo_grid, render_title=True)">
- <div class="grid-header">
- %if render_title:
- ${grid_title()}
- %endif
- %if grid.global_actions:
- <ul class="manage-table-actions">
- %if len( grid.global_actions ) < 4:
- %for action in grid.global_actions:
- <li><a class="action-button" href="${h.url_for( **action.url_args )}">${action.label | h}</a></li>
- %endfor
- %else:
- <li><a class="action-button" id="action-8675309-popup" class="menubutton">Actions</a></li>
- <div popupmenu="action-8675309-popup">
- %for action in grid.global_actions:
- <a class="action-button" href="${h.url_for( **action.url_args )}">${action.label | h}</a>
- %endfor
- </div>
- %endif
- </ul>
- %endif
- ${render_grid_filters( repo_grid, render_advanced_search=False )}
- </div>
-</%def>
-
-<%def name="make_grid( grid, repo_grid )">
- <div class="loading-elt-overlay"></div>
- <table>
- <tr>
- <td width="75%">${self.render_grid_header( grid, repo_grid )}</td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td width="100%" id="grid-message" valign="top">${render_message( message, status )}</td>
- <td></td>
- <td></td>
- </tr>
- </table>
- ${render_grid_table( grid, show_item_checkboxes )}
-</%def>
-
-<%def name="grid_body( grid )">
- <%
- from galaxy.webapps.community.controllers.repository import ValidRepositoryGrid
- repo_grid = ValidRepositoryGrid()
- %>
- ${self.make_grid( grid, repo_grid )}
-</%def>
-
-<%def name="center_panel()">
- <div style="overflow: auto; height: 100%">
- <div class="page-container" style="padding: 10px;">
- ${self.grid_body( grid )}
- </div>
- </div>
-</%def>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/common/common.mako
--- a/templates/webapps/community/common/common.mako
+++ /dev/null
@@ -1,84 +0,0 @@
-<%def name="common_misc_javascripts()">
- <script type="text/javascript">
- function checkAllFields( name )
- {
- var chkAll = document.getElementById( 'checkAll' );
- var checks = document.getElementsByTagName( 'input' );
- var boxLength = checks.length;
- var allChecked = false;
- var totalChecked = 0;
- if ( chkAll.checked == true )
- {
- for ( i=0; i < boxLength; i++ )
- {
- if ( checks[i].name.indexOf( name ) != -1 )
- {
- checks[i].checked = true;
- }
- }
- }
- else
- {
- for ( i=0; i < boxLength; i++ )
- {
- if ( checks[i].name.indexOf( name ) != -1 )
- {
- checks[i].checked = false
- }
- }
- }
- }
- </script>
-</%def>
-
-<%def name="render_star_rating( name, rating, disabled=False )">
- <%
- if disabled:
- disabled_str = ' disabled="disabled"'
- else:
- disabled_str = ''
- html = ''
- for index in range( 1, 6 ):
- html += '<input name="%s" type="radio" class="star" value="%s" %s' % ( str( name ), str( index ), disabled_str )
- if rating > ( index - 0.5 ) and rating < ( index + 0.5 ):
- html += ' checked="checked"'
- html += '/>'
- %>
- ${html}
-</%def>
-
-<%def name="render_long_description( description_text )">
- <style type="text/css">
- #description_table{ table-layout:fixed;
- width:100%;
- overflow-wrap:normal;
- overflow:hidden;
- border:0px;
- word-break:keep-all;
- word-wrap:break-word;
- line-break:strict; }
- </style>
- <div class="form-row">
- <label>Detailed description:</label>
- <table id="description_table">
- <tr><td>${description_text}</td></tr>
- </table>
- <div style="clear: both"></div>
- </div>
-</%def>
-
-<%def name="render_review_comment( comment_text )">
- <style type="text/css">
- #reviews_table{ table-layout:fixed;
- width:100%;
- overflow-wrap:normal;
- overflow:hidden;
- border:0px;
- word-break:keep-all;
- word-wrap:break-word;
- line-break:strict; }
- </style>
- <table id="reviews_table">
- <tr><td>${comment_text}</td></tr>
- </table>
-</%def>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/index.mako
--- a/templates/webapps/community/index.mako
+++ /dev/null
@@ -1,165 +0,0 @@
-<%inherit file="/webapps/community/base_panels.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ## Include "base.css" for styling tool menu and forms (details)
- ${h.css( "base", "autocomplete_tagging", "tool_menu" )}
-
- ## But make sure styles for the layout take precedence
- ${parent.stylesheets()}
-
- <style type="text/css">
- body { margin: 0; padding: 0; overflow: hidden; }
- #left {
- background: #C1C9E5 url(${h.url_for('/static/style/menu_bg.png')}) top repeat-x;
- }
- </style>
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
-</%def>
-
-<%def name="init()">
- <%
- self.has_left_panel=True
- self.has_right_panel=False
- self.active_view="tools"
- %>
- %if trans.app.config.require_login and not trans.user:
- <script type="text/javascript">
- if ( window != top ) {
- top.location.href = location.href;
- }
- </script>
- %endif
-</%def>
-
-<%def name="left_panel()">
- <% can_review_repositories = trans.app.security_agent.user_can_review_repositories( trans.user ) %>
- <div class="unified-panel-header" unselectable="on">
- <div class='unified-panel-header-inner'>${trans.app.shed_counter.valid_tools | h} valid tools on ${trans.app.shed_counter.generation_time | h}</div>
- </div>
- <div class="page-container" style="padding: 10px;">
- <div class="toolMenu">
- <div class="toolSectionList">
- %if user_id or repository_id:
- ## The route in was a sharable url, and may have included a changeset_revision, although we don't check for it.
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- All Repositories
- </div>
- <div class="toolTitle">
- <a href="${h.url_for( controller='repository', action='index' )}">Browse by category</a>
- </div>
- %else:
- %if repository_metadata:
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- Search
- </div>
- <div class="toolSectionBody">
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='find_tools' )}">Search for valid tools</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='find_workflows' )}">Search for workflows</a>
- </div>
- </div>
- %endif
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- All Repositories
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_categories' )}">Browse by category</a>
- </div>
- %if trans.user:
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- My Repositories and Tools
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_repositories', operation='repositories_i_own' )}">Repositories I own</a>
- </div>
- %if has_reviewed_repositories:
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_repositories', operation='reviewed_repositories_i_own' )}">Reviewed repositories I own</a>
- </div>
- %endif
- %if has_deprecated_repositories:
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_repositories', operation='deprecated_repositories_i_own' )}">Deprecated repositories I own</a>
- </div>
- %endif
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_repositories', operation='my_writable_repositories' )}">My writable repositories</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_invalid_tools', cntrller='repository' )}">My invalid tools</a>
- </div>
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- Available Actions
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository', action='create_repository' )}">Create new repository</a>
- </div>
- %if can_review_repositories:
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- Reviewing Repositories
- </div>
- <div class="toolSectionBody">
- <div class="toolSectionBg">
- %if trans.user.repository_reviews:
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository_review', action='manage_repositories_reviewed_by_me' )}">Repositories reviewed by me</a>
- </div>
- %endif
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository_review', action='manage_repositories_with_reviews' )}">All reviewed repositories</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository_review', action='manage_repositories_without_reviews' )}">Repositories with no reviews</a>
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='repository_review', action='manage_components' )}">Manage review components</a>
- </div>
- </div>
- </div>
- %endif
- %else:
- <div class="toolSectionPad"></div>
- <div class="toolSectionTitle">
- Available Actions
- </div>
- <div class="toolTitle">
- <a target="galaxy_main" href="${h.url_for( controller='/user', action='login' )}">Login to create a repository</a>
- </div>
- %endif
- %endif
- </div>
- </div>
- </div>
-</%def>
-
-<%def name="center_panel()">
- <%
- if trans.app.config.require_login and not trans.user:
- center_url = h.url_for( controller='user', action='login', message=message, status=status )
- elif repository_id and changeset_revision:
- # Route in was a sharable url: /view/{owner}/{name}/{changeset_revision}.
- center_url = h.url_for( controller='repository', action='view_repository', id=repository_id, changeset_revision=changeset_revision, message=message, status=status )
- elif repository_id:
- # Route in was a sharable url: /view/{owner}/{name}.
- center_url = h.url_for( controller='repository', action='view_repository', id=repository_id, message=message, status=status )
- elif user_id:
- # Route in was a sharable url: /view/{owner}.
- center_url = h.url_for( controller='repository', action='browse_repositories', operation="repositories_by_user", user_id=user_id, message=message, status=status )
- else:
- center_url = h.url_for( controller='repository', action='browse_categories', message=message, status=status )
- %>
- <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${center_url}"></iframe>
-</%def>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/message.mako
--- a/templates/webapps/community/message.mako
+++ /dev/null
@@ -1,1 +0,0 @@
-<%inherit file="../../message.mako"/>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/repository/browse_invalid_tools.mako
--- a/templates/webapps/community/repository/browse_invalid_tools.mako
+++ /dev/null
@@ -1,44 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-<div class="toolForm">
- %if invalid_tools_dict:
- <div class="toolFormTitle">Invalid tools<i> - click the tool config file name to see why the tool is invalid</i></div>
- <div class="form-row">
- <table class="grid">
- <tr>
- <th>Tool config</th>
- <th>Repository name</th>
- <th>Repository owner</th>
- <th>Changeset revision</th>
- </tr>
- %for invalid_tool_config, repository_tup in invalid_tools_dict.items():
- <% repository_id, repository_name, repository_owner, changeset_revision = repository_tup %>
- <tr>
- <td>
- <a class="view-info" href="${h.url_for( controller='repository', action='load_invalid_tool', repository_id=trans.security.encode_id( repository_id ), tool_config=invalid_tool_config, changeset_revision=changeset_revision )}">
- ${invalid_tool_config}
- </a>
- </td>
- <td>${repository_name | h}</td>
- <td>${repository_owner | h}</td>
- <td>${changeset_revision | h}</td>
- </tr>
- %endfor
- </table>
- </div>
- </div>
- %else:
- <div class="form-row">
- %if cntrller == 'admin' and trans.user_is_admin():
- No repositories in this tool shed contain invalid tools.
- %else:
- None of your repositories contain invalid tools.
- %endif
- </div>
- %endif
-</div>
diff -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 -r b985587c33926d8d38fa4456b51eecbc68953bb9 templates/webapps/community/repository/browse_repository.mako
--- a/templates/webapps/community/repository/browse_repository.mako
+++ /dev/null
@@ -1,156 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-<%namespace file="/webapps/community/common/common.mako" import="*" />
-<%namespace file="/webapps/community/repository/common.mako" import="*" />
-
-<%
- from galaxy.web.framework.helpers import time_ago
- is_admin = trans.user_is_admin()
- is_new = repository.is_new( trans.app )
- can_contact_owner = trans.user and trans.user != repository.user
- can_push = trans.app.security_agent.can_push( trans.app, trans.user, repository )
- can_upload = can_push and ( not repository.deprecated )
- can_download = not is_new and ( not is_malicious or can_push )
- can_browse_contents = not is_new
- can_rate = trans.user and repository.user != trans.user
- can_manage = is_admin or repository.user == trans.user
- can_view_change_log = not is_new
- has_readme = metadata and 'readme' in metadata
-%>
-
-<%!
- def inherit(context):
- if context.get('use_panels'):
- return '/webapps/community/base_panels.mako'
- else:
- return '/base.mako'
-%>
-<%inherit file="${inherit(context)}"/>
-
-<%def name="stylesheets()">
- ${parent.stylesheets()}
- ${h.css( "jquery.rating", "dynatree_skin/ui.dynatree" )}
- <style type="text/css">
- ul.fileBrowser,
- ul.toolFile {
- margin-left: 0;
- padding-left: 0;
- list-style: none;
- }
- ul.fileBrowser {
- margin-left: 20px;
- }
- .fileBrowser li,
- .toolFile li {
- padding-left: 20px;
- background-repeat: no-repeat;
- background-position: 0;
- min-height: 20px;
- }
- .toolFile li {
- background-image: url( ${h.url_for( '/static/images/silk/page_white_compressed.png' )} );
- }
- .fileBrowser li {
- background-image: url( ${h.url_for( '/static/images/silk/page_white.png' )} );
- }
- </style>
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- ${h.js( "libs/jquery/jquery.rating", "libs/jquery/jquery-ui", "libs/jquery/jquery.cookie", "libs/jquery/jquery.dynatree" )}
- ${common_javascripts(repository)}
-</%def>
-
-<br/><br/>
-<ul class="manage-table-actions">
- %if is_new:
- <a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
- %else:
- <li><a class="action-button" id="repository-${repository.id}-popup" class="menubutton">Repository Actions</a></li>
- <div popupmenu="repository-${repository.id}-popup">
- %if can_manage:
- <a class="action-button" href="${h.url_for( controller='repository', action='manage_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">Manage repository</a>
- %else:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_repository', id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ) )}">View repository</a>
- %endif
- %if can_upload:
- <a class="action-button" href="${h.url_for( controller='upload', action='upload', repository_id=trans.security.encode_id( repository.id ) )}">Upload files to repository</a>
- %endif
- %if can_view_change_log:
- <a class="action-button" href="${h.url_for( controller='repository', action='view_changelog', id=trans.app.security.encode_id( repository.id ) )}">View change log</a>
- %endif
- %if can_rate:
- <a class="action-button" href="${h.url_for( controller='repository', action='rate_repository', id=trans.app.security.encode_id( repository.id ) )}">Rate repository</a>
- %endif
- %if can_download:
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='gz' )}">Download as a .tar.gz file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='bz2' )}">Download as a .tar.bz2 file</a>
- <a class="action-button" href="${h.url_for( controller='repository', action='download', repository_id=trans.app.security.encode_id( repository.id ), changeset_revision=repository.tip( trans.app ), file_type='zip' )}">Download as a zip file</a>
- %endif
- </div>
- %endif
-</ul>
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-%if can_browse_contents:
- <div class="toolForm">
- <div class="toolFormTitle">Browse ${repository.name | h} revision ${repository.tip( trans.app ) | h} (repository tip)</div>
- %if can_download:
- <div class="form-row">
- <label>Clone this repository:</label>
- ${render_clone_str( repository )}
- </div>
- %endif
- %if can_push:
- <form name="select_files_to_delete" id="select_files_to_delete" action="${h.url_for( controller='repository', action='select_files_to_delete', id=trans.security.encode_id( repository.id ))}" method="post" >
- <div class="form-row" >
- <label>Contents:</label>
- <div id="tree" >
- Loading...
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Click on a file to display it's contents below. You may delete files from the repository by clicking the check box next to each file and clicking the <b>Delete selected files</b> button.
- </div>
- <input id="selected_files_to_delete" name="selected_files_to_delete" type="hidden" value=""/>
- </div>
- <div class="form-row">
- <label>Message:</label>
- <div class="form-row-input">
- %if commit_message:
- <textarea name="commit_message" rows="3" cols="35">${commit_message | h}</textarea>
- %else:
- <textarea name="commit_message" rows="3" cols="35"></textarea>
- %endif
- </div>
- <div class="toolParamHelp" style="clear: both;">
- This is the commit message for the mercurial change set that will be created if you delete selected files.
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <input type="submit" name="select_files_to_delete_button" value="Delete selected files"/>
- </div>
- <div class="form-row">
- <div id="file_contents" class="toolParamHelp" style="clear: both;background-color:#FAFAFA;"></div>
- </div>
- </form>
- %else:
- <div class="toolFormBody">
- <div class="form-row" >
- <label>Contents:</label>
- <div id="tree" >
- Loading...
- </div>
- </div>
- <div class="form-row">
- <div id="file_contents" class="toolParamHelp" style="clear: both;background-color:#FAFAFA;"></div>
- </div>
- </div>
- %endif
- </div>
- <p/>
-%endif
This diff is so big that we needed to truncate the remainder.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: inithello: Added name attribute to MigrateToolsApplication to generate a correct metadata dict for migrated tools.
by commits-noreply@bitbucket.org 26 Feb '13
by commits-noreply@bitbucket.org 26 Feb '13
26 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ddfdfd2fce3e/
changeset: ddfdfd2fce3e
user: inithello
date: 2013-02-26 22:59:17
summary: Added name attribute to MigrateToolsApplication to generate a correct metadata dict for migrated tools.
affected #: 1 file
diff -r b9a7f2ae70a830e7ad5ef2a4c7e24f43d4575fa1 -r ddfdfd2fce3ef42d50f4b7b5a02db1cad03c5663 lib/tool_shed/galaxy_install/migrate/common.py
--- a/lib/tool_shed/galaxy_install/migrate/common.py
+++ b/lib/tool_shed/galaxy_install/migrate/common.py
@@ -14,6 +14,7 @@
def __init__( self, tools_migration_config ):
install_dependencies = 'install_dependencies' in sys.argv
galaxy_config_file = 'universe_wsgi.ini'
+ self.name = 'galaxy'
if '-c' in sys.argv:
pos = sys.argv.index( '-c' )
sys.argv.pop( pos )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
26 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b9a7f2ae70a8/
changeset: b9a7f2ae70a8
user: jgoecks
date: 2013-02-26 22:42:11
summary: Add missing import.
affected #: 1 file
diff -r 5d71d6193bbaf758ae901de19a601bce6c34aeca -r b9a7f2ae70a830e7ad5ef2a4c7e24f43d4575fa1 lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -6,6 +6,7 @@
from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesVisualizationMixin
from galaxy.web.framework.helpers import time_ago, grids
from galaxy import util
+from galaxy.datatypes.interval import Bed
from galaxy.util.json import from_json_string
from galaxy.util.sanitize_html import sanitize_html
from galaxy.visualization.genomes import decode_dbkey
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Force absolute imprts in Galaxy's app.
by commits-noreply@bitbucket.org 26 Feb '13
by commits-noreply@bitbucket.org 26 Feb '13
26 Feb '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5d71d6193bba/
changeset: 5d71d6193bba
user: greg
date: 2013-02-26 22:33:57
summary: Force absolute imprts in Galaxy's app.
affected #: 1 file
diff -r 6f0050c4e06ef6f5fdce3f7326280c07c63ef62e -r 5d71d6193bbaf758ae901de19a601bce6c34aeca lib/galaxy/app.py
--- a/lib/galaxy/app.py
+++ b/lib/galaxy/app.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import
import sys, os, atexit
from galaxy import config, jobs, util, tools, web
@@ -151,10 +152,10 @@
self.memdump = memdump.Memdump()
# Transfer manager client
if self.config.get_bool( 'enable_beta_job_managers', False ):
- from jobs import transfer_manager
+ from galaxy.jobs import transfer_manager
self.transfer_manager = transfer_manager.TransferManager( self )
# Start the job manager
- from jobs import manager
+ from galaxy.jobs import manager
self.job_manager = manager.JobManager( self )
# FIXME: These are exposed directly for backward compatibility
self.job_queue = self.job_manager.job_queue
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0