mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
(manually merge conflicts)
This commit is contained in:
@@ -100,7 +100,7 @@ window.app = function app( options, bootstrapped ){
|
||||
'(/)' : 'home',
|
||||
// TODO: remove annoying 'root' from root urls
|
||||
'(/)root*' : 'home',
|
||||
'(/)tours(/:tour_id)' : 'show_tours',
|
||||
'(/)tours(/)(:tour_id)' : 'show_tours',
|
||||
},
|
||||
|
||||
show_tours : function( tour_id ){
|
||||
|
||||
@@ -144,15 +144,15 @@ var Collection = Backbone.Collection.extend({
|
||||
target : '_blank'
|
||||
},{
|
||||
title : 'Interactive Tours',
|
||||
url : 'tours',
|
||||
onclick : function(){
|
||||
if (Galaxy.app){
|
||||
Galaxy.app.display(new Tours.ToursView());
|
||||
} else {
|
||||
// Redirect and use clientside routing to go to tour index
|
||||
window.location = Galaxy.root + "#/tours";
|
||||
window.location = Galaxy.root + "tours";
|
||||
}
|
||||
},
|
||||
target : 'galaxy_main'
|
||||
}
|
||||
}]
|
||||
};
|
||||
options.terms_url && helpTab.menu.push({
|
||||
@@ -383,4 +383,4 @@ return {
|
||||
Tab : Tab
|
||||
};
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -101,14 +101,15 @@ define(['libs/bootstrap-tour'],function(BootstrapTour) {
|
||||
"<ul>",
|
||||
'<% _.each(tours, function(tour) { %>',
|
||||
'<li>',
|
||||
'<a href="#/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>',
|
||||
'<a href="/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>',
|
||||
'<%- tour.attributes.name || tour.id %>',
|
||||
'</a>',
|
||||
' - <%- tour.attributes.description || "No description given." %>',
|
||||
'</li>',
|
||||
'<% }); %>',
|
||||
"</ul>"].join(''));
|
||||
this.$el.html(tpl({tours: this.model.models})).on("click", ".tourItem", function(){
|
||||
this.$el.html(tpl({tours: this.model.models})).on("click", ".tourItem", function(e){
|
||||
e.preventDefault();
|
||||
giveTour($(this).data("tour.id"));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,18 +28,18 @@
|
||||
</section>
|
||||
<section id="textutil" name="Text Manipulation">
|
||||
<tool file="filters/fixedValueColumn.xml" />
|
||||
<tool file="filters/catWrapper.xml" />
|
||||
<tool file="filters/catWrapper.xml" hidden="True" />
|
||||
<tool file="filters/condense_characters.xml" />
|
||||
<tool file="filters/convert_characters.xml" />
|
||||
<tool file="filters/mergeCols.xml" />
|
||||
<tool file="filters/CreateInterval.xml" />
|
||||
<tool file="filters/cutWrapper.xml" />
|
||||
<tool file="filters/cutWrapper.xml" hidden="True" />
|
||||
<tool file="filters/changeCase.xml" />
|
||||
<tool file="filters/pasteWrapper.xml" />
|
||||
<tool file="filters/remove_beginning.xml" />
|
||||
<tool file="filters/randomlines.xml" />
|
||||
<tool file="filters/headWrapper.xml" />
|
||||
<tool file="filters/tailWrapper.xml" />
|
||||
<tool file="filters/headWrapper.xml" hidden="True" />
|
||||
<tool file="filters/tailWrapper.xml" hidden="True" />
|
||||
<tool file="filters/trimmer.xml" />
|
||||
<tool file="filters/wc_gnu.xml" />
|
||||
<tool file="filters/secure_hash_message_digest.xml" />
|
||||
|
||||
@@ -647,81 +647,81 @@ class Registry( object ):
|
||||
# Default values.
|
||||
if not self.datatypes_by_extension:
|
||||
self.datatypes_by_extension = {
|
||||
'ab1' : binary.Ab1(),
|
||||
'axt' : sequence.Axt(),
|
||||
'bam' : binary.Bam(),
|
||||
'bed' : interval.Bed(),
|
||||
'coverage' : coverage.LastzCoverage(),
|
||||
'customtrack' : interval.CustomTrack(),
|
||||
'csfasta' : sequence.csFasta(),
|
||||
'db3' : binary.SQlite(),
|
||||
'fasta' : sequence.Fasta(),
|
||||
'eland' : tabular.Eland(),
|
||||
'fastq' : sequence.Fastq(),
|
||||
'fastqsanger' : sequence.FastqSanger(),
|
||||
'ab1' : binary.Ab1(),
|
||||
'axt' : sequence.Axt(),
|
||||
'bam' : binary.Bam(),
|
||||
'bed' : interval.Bed(),
|
||||
'coverage' : coverage.LastzCoverage(),
|
||||
'customtrack' : interval.CustomTrack(),
|
||||
'csfasta' : sequence.csFasta(),
|
||||
'db3' : binary.SQlite(),
|
||||
'fasta' : sequence.Fasta(),
|
||||
'eland' : tabular.Eland(),
|
||||
'fastq' : sequence.Fastq(),
|
||||
'fastqsanger' : sequence.FastqSanger(),
|
||||
'gemini.sqlite' : binary.GeminiSQLite(),
|
||||
'gtf' : interval.Gtf(),
|
||||
'gff' : interval.Gff(),
|
||||
'gff3' : interval.Gff3(),
|
||||
'genetrack' : tracks.GeneTrack(),
|
||||
'h5' : binary.H5(),
|
||||
'idpdb' : binary.IdpDB(),
|
||||
'interval' : interval.Interval(),
|
||||
'laj' : images.Laj(),
|
||||
'lav' : sequence.Lav(),
|
||||
'maf' : sequence.Maf(),
|
||||
'mz.sqlite' : binary.MzSQlite(),
|
||||
'pileup' : tabular.Pileup(),
|
||||
'qualsolid' : qualityscore.QualityScoreSOLiD(),
|
||||
'qualsolexa' : qualityscore.QualityScoreSolexa(),
|
||||
'qual454' : qualityscore.QualityScore454(),
|
||||
'sam' : tabular.Sam(),
|
||||
'scf' : binary.Scf(),
|
||||
'sff' : binary.Sff(),
|
||||
'tabular' : tabular.Tabular(),
|
||||
'csv' : tabular.CSV(),
|
||||
'taxonomy' : tabular.Taxonomy(),
|
||||
'txt' : data.Text(),
|
||||
'wig' : interval.Wiggle(),
|
||||
'xml' : xml.GenericXml(),
|
||||
'gtf' : interval.Gtf(),
|
||||
'gff' : interval.Gff(),
|
||||
'gff3' : interval.Gff3(),
|
||||
'genetrack' : tracks.GeneTrack(),
|
||||
'h5' : binary.H5(),
|
||||
'idpdb' : binary.IdpDB(),
|
||||
'interval' : interval.Interval(),
|
||||
'laj' : images.Laj(),
|
||||
'lav' : sequence.Lav(),
|
||||
'maf' : sequence.Maf(),
|
||||
'mz.sqlite' : binary.MzSQlite(),
|
||||
'pileup' : tabular.Pileup(),
|
||||
'qualsolid' : qualityscore.QualityScoreSOLiD(),
|
||||
'qualsolexa' : qualityscore.QualityScoreSolexa(),
|
||||
'qual454' : qualityscore.QualityScore454(),
|
||||
'sam' : tabular.Sam(),
|
||||
'scf' : binary.Scf(),
|
||||
'sff' : binary.Sff(),
|
||||
'tabular' : tabular.Tabular(),
|
||||
'csv' : tabular.CSV(),
|
||||
'taxonomy' : tabular.Taxonomy(),
|
||||
'txt' : data.Text(),
|
||||
'wig' : interval.Wiggle(),
|
||||
'xml' : xml.GenericXml(),
|
||||
}
|
||||
self.mimetypes_by_extension = {
|
||||
'ab1' : 'application/octet-stream',
|
||||
'axt' : 'text/plain',
|
||||
'bam' : 'application/octet-stream',
|
||||
'bed' : 'text/plain',
|
||||
'customtrack' : 'text/plain',
|
||||
'csfasta' : 'text/plain',
|
||||
'db3' : 'application/octet-stream',
|
||||
'eland' : 'application/octet-stream',
|
||||
'fasta' : 'text/plain',
|
||||
'fastq' : 'text/plain',
|
||||
'fastqsanger' : 'text/plain',
|
||||
'ab1' : 'application/octet-stream',
|
||||
'axt' : 'text/plain',
|
||||
'bam' : 'application/octet-stream',
|
||||
'bed' : 'text/plain',
|
||||
'customtrack' : 'text/plain',
|
||||
'csfasta' : 'text/plain',
|
||||
'db3' : 'application/octet-stream',
|
||||
'eland' : 'application/octet-stream',
|
||||
'fasta' : 'text/plain',
|
||||
'fastq' : 'text/plain',
|
||||
'fastqsanger' : 'text/plain',
|
||||
'gemini.sqlite' : 'application/octet-stream',
|
||||
'gtf' : 'text/plain',
|
||||
'gff' : 'text/plain',
|
||||
'gff3' : 'text/plain',
|
||||
'h5' : 'application/octet-stream',
|
||||
'idpdb' : 'application/octet-stream',
|
||||
'interval' : 'text/plain',
|
||||
'laj' : 'text/plain',
|
||||
'lav' : 'text/plain',
|
||||
'maf' : 'text/plain',
|
||||
'memexml' : 'application/xml',
|
||||
'mz.sqlite' : 'application/octet-stream',
|
||||
'pileup' : 'text/plain',
|
||||
'qualsolid' : 'text/plain',
|
||||
'qualsolexa' : 'text/plain',
|
||||
'qual454' : 'text/plain',
|
||||
'sam' : 'text/plain',
|
||||
'scf' : 'application/octet-stream',
|
||||
'sff' : 'application/octet-stream',
|
||||
'tabular' : 'text/plain',
|
||||
'csv' : 'text/plain',
|
||||
'taxonomy' : 'text/plain',
|
||||
'txt' : 'text/plain',
|
||||
'wig' : 'text/plain',
|
||||
'xml' : 'application/xml',
|
||||
'gtf' : 'text/plain',
|
||||
'gff' : 'text/plain',
|
||||
'gff3' : 'text/plain',
|
||||
'h5' : 'application/octet-stream',
|
||||
'idpdb' : 'application/octet-stream',
|
||||
'interval' : 'text/plain',
|
||||
'laj' : 'text/plain',
|
||||
'lav' : 'text/plain',
|
||||
'maf' : 'text/plain',
|
||||
'memexml' : 'application/xml',
|
||||
'mz.sqlite' : 'application/octet-stream',
|
||||
'pileup' : 'text/plain',
|
||||
'qualsolid' : 'text/plain',
|
||||
'qualsolexa' : 'text/plain',
|
||||
'qual454' : 'text/plain',
|
||||
'sam' : 'text/plain',
|
||||
'scf' : 'application/octet-stream',
|
||||
'sff' : 'application/octet-stream',
|
||||
'tabular' : 'text/plain',
|
||||
'csv' : 'text/plain',
|
||||
'taxonomy' : 'text/plain',
|
||||
'txt' : 'text/plain',
|
||||
'wig' : 'text/plain',
|
||||
'xml' : 'application/xml',
|
||||
}
|
||||
# super supertype fix for input steps in workflows.
|
||||
if 'data' not in self.datatypes_by_extension:
|
||||
|
||||
@@ -8,17 +8,16 @@ import gzip
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import tempfile
|
||||
import subprocess
|
||||
|
||||
import tempfile
|
||||
from cgi import escape
|
||||
from json import dumps
|
||||
|
||||
from galaxy import util
|
||||
from galaxy.datatypes import data, metadata
|
||||
from galaxy.util.checkers import is_gzip
|
||||
from galaxy.datatypes.metadata import MetadataElement
|
||||
from galaxy.datatypes.sniff import get_headers
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.util.checkers import is_gzip
|
||||
|
||||
from . import dataproviders
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from galaxy.util.json import loads
|
||||
import logging
|
||||
from json import loads
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
"""
|
||||
Support for running a tool in Galaxy via an internal job management system
|
||||
"""
|
||||
from abc import ABCMeta
|
||||
from abc import abstractmethod
|
||||
|
||||
import time
|
||||
import copy
|
||||
import datetime
|
||||
import galaxy
|
||||
import logging
|
||||
import os
|
||||
import pwd
|
||||
@@ -15,21 +10,23 @@ import random
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from json import loads
|
||||
from xml.etree import ElementTree
|
||||
|
||||
import galaxy
|
||||
from galaxy import model, util
|
||||
from galaxy.util.xml_macros import load
|
||||
from galaxy.datatypes import metadata
|
||||
from galaxy.datatypes import metadata, sniff
|
||||
from galaxy.exceptions import ObjectInvalid, ObjectNotFound
|
||||
from galaxy.jobs.actions.post import ActionBox
|
||||
from galaxy.jobs.mapper import JobRunnerMapper
|
||||
from galaxy.jobs.runners import BaseJobRunner, JobState
|
||||
from galaxy.util import safe_makedirs, unicodify
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.util.expressions import ExpressionContext
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.util import safe_makedirs
|
||||
from galaxy.util import unicodify
|
||||
from galaxy.datatypes import sniff
|
||||
from galaxy.util.xml_macros import load
|
||||
|
||||
from .output_checker import check_output
|
||||
from .datasets import TaskPathRewriter
|
||||
@@ -1291,7 +1288,7 @@ class JobWrapper( object ):
|
||||
dataset.extension = 'txt'
|
||||
self.sa_session.add( dataset )
|
||||
if job.states.ERROR == final_job_state:
|
||||
log.debug( "setting dataset state to ERROR" )
|
||||
log.debug( "(%s) setting dataset %s state to ERROR", job.id, dataset_assoc.dataset.dataset.id )
|
||||
# TODO: This is where the state is being set to error. Change it!
|
||||
dataset_assoc.dataset.dataset.state = model.Dataset.states.ERROR
|
||||
# Pause any dependent jobs (and those jobs' outputs)
|
||||
|
||||
@@ -6,10 +6,12 @@ immediate_actions listed below. Currently only used in workflows.
|
||||
import datetime
|
||||
import logging
|
||||
import socket
|
||||
from galaxy.util import send_mail
|
||||
from galaxy.util.json import dumps
|
||||
from json import dumps
|
||||
|
||||
from markupsafe import escape
|
||||
|
||||
from galaxy.util import send_mail
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
Module for managing jobs in Pacific Bioscience's SMRT Portal and automatically transferring files
|
||||
produced by SMRT Portal.
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
import urllib2
|
||||
from string import Template
|
||||
from galaxy.util import json
|
||||
|
||||
from data_transfer import DataTransfer
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
Manage transfers from arbitrary URLs to temporary files. Socket interface for
|
||||
IPC with multiple process configurations.
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
import socket
|
||||
import subprocess
|
||||
import threading
|
||||
|
||||
from galaxy.util import listify, json, sleeper
|
||||
from galaxy.util import listify, sleeper
|
||||
from galaxy.util.json import jsonrpc_request, validate_jsonrpc_response
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
@@ -83,13 +85,13 @@ class TransferManager( object ):
|
||||
for tj in transfer_jobs:
|
||||
if via_socket and tj.state not in tj.terminal_states and tj.socket:
|
||||
try:
|
||||
request = json.jsonrpc_request( method='get_state', id=True )
|
||||
request = jsonrpc_request( method='get_state', id=True )
|
||||
sock = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
|
||||
sock.settimeout( 5 )
|
||||
sock.connect( ( 'localhost', tj.socket ) )
|
||||
sock.send( json.dumps( request ) )
|
||||
response = sock.recv( 8192 )
|
||||
valid, response = json.validate_jsonrpc_response( response, id=request['id'] )
|
||||
valid, response = validate_jsonrpc_response( response, id=request['id'] )
|
||||
if not valid:
|
||||
# No valid response received, make some pseudo-json-rpc
|
||||
raise Exception( dict( code=128, message='Did not receive valid response from transfer daemon for state' ) )
|
||||
|
||||
@@ -3,8 +3,8 @@ Mixins for transaction-like objects.
|
||||
"""
|
||||
|
||||
import os
|
||||
from json import dumps
|
||||
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.util import bunch
|
||||
|
||||
|
||||
|
||||
@@ -6,28 +6,25 @@ Galaxy Metadata
|
||||
import copy
|
||||
import cPickle
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import weakref
|
||||
|
||||
from os.path import abspath
|
||||
|
||||
from six import string_types
|
||||
from sqlalchemy.orm import object_session
|
||||
|
||||
import galaxy.model
|
||||
from galaxy.util import listify
|
||||
from galaxy.util.object_wrapper import sanitize_lists_to_string
|
||||
from galaxy.util import stringify_dictionary_keys
|
||||
from galaxy.util import string_as_bool
|
||||
from galaxy.util import in_directory
|
||||
from galaxy.util import (in_directory, listify, string_as_bool,
|
||||
stringify_dictionary_keys)
|
||||
from galaxy.util.json import safe_dumps
|
||||
from galaxy.util.object_wrapper import sanitize_lists_to_string
|
||||
from galaxy.util.odict import odict
|
||||
from galaxy.web import form_builder
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
STATEMENTS = "__galaxy_statements__" # this is the name of the property in a Datatype class where new metadata spec element Statements are stored
|
||||
|
||||
@@ -26,8 +26,11 @@ select * from history where name='Unnamed history'
|
||||
|
||||
import logging
|
||||
import re
|
||||
from json import dumps
|
||||
|
||||
import parsley
|
||||
from sqlalchemy import and_
|
||||
from sqlalchemy.orm import aliased
|
||||
|
||||
from galaxy.model import (HistoryDatasetAssociation, LibraryDatasetDatasetAssociation,
|
||||
History, Library, LibraryFolder, LibraryDataset, StoredWorkflowTagAssociation,
|
||||
@@ -37,10 +40,6 @@ from galaxy.model import (HistoryDatasetAssociation, LibraryDatasetDatasetAssoci
|
||||
Page, PageRevision)
|
||||
from galaxy.model.tool_shed_install import ToolVersion
|
||||
|
||||
from galaxy.util.json import dumps
|
||||
from sqlalchemy import and_
|
||||
from sqlalchemy.orm import aliased
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class GalaxyQueueWorker(ConsumerMixin, threading.Thread):
|
||||
"""
|
||||
def __init__(self, app, queue=None, task_mapping=control_message_to_task, connection=None):
|
||||
super(GalaxyQueueWorker, self).__init__()
|
||||
log.info("Initalizing %s Galaxy Queue Worker on %s", app.config.server_name, util.mask_password_from_url(app.config.amqp_internal_connection))
|
||||
log.info("Initializing %s Galaxy Queue Worker on %s", app.config.server_name, util.mask_password_from_url(app.config.amqp_internal_connection))
|
||||
self.daemon = True
|
||||
if connection:
|
||||
self.connection = connection
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import json
|
||||
import re
|
||||
from json import dumps
|
||||
|
||||
from six import string_types
|
||||
|
||||
from galaxy import model
|
||||
from galaxy.exceptions import ObjectInvalid
|
||||
from galaxy.model import LibraryDatasetDatasetAssociation
|
||||
from galaxy import model
|
||||
from galaxy.tools.parameters.basic import DataCollectionToolParameter, DataToolParameter
|
||||
from galaxy.tools.parameters.wrapped import WrappedParameters
|
||||
from galaxy.tools.parameters import update_param
|
||||
from galaxy.util import ExecutionTimer
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.util.none_like import NoneDataset
|
||||
from galaxy.util.odict import odict
|
||||
from galaxy.util.template import fill_template
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import logging
|
||||
from json import dumps
|
||||
|
||||
from __init__ import ToolAction
|
||||
from galaxy.datatypes.metadata import JobExternalOutputMetadataWrapper
|
||||
from galaxy.util.odict import odict
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.jobs.datasets import DatasetPath
|
||||
from galaxy.util.odict import odict
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import pwd
|
||||
import logging
|
||||
import os
|
||||
import pwd
|
||||
import StringIO
|
||||
import subprocess
|
||||
import tempfile
|
||||
from cgi import FieldStorage
|
||||
from json import dumps
|
||||
|
||||
from sqlalchemy.orm import eagerload_all
|
||||
|
||||
from galaxy import datatypes, util
|
||||
from galaxy.util.odict import odict
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.exceptions import ObjectInvalid
|
||||
from galaxy.util.odict import odict
|
||||
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
|
||||
@@ -4,17 +4,16 @@ import logging
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from json import dumps, loads
|
||||
|
||||
from sqlalchemy.orm import eagerload, eagerload_all
|
||||
from sqlalchemy.sql import expression
|
||||
|
||||
from galaxy import model
|
||||
from galaxy.exceptions import MalformedContents
|
||||
from galaxy.model.item_attrs import UsesAnnotations
|
||||
from galaxy.util.json import dumps, loads
|
||||
from galaxy.web.framework.helpers import to_unicode
|
||||
|
||||
from sqlalchemy.sql import expression
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ import optparse
|
||||
import os
|
||||
import sys
|
||||
import tarfile
|
||||
|
||||
from galaxy.util.json import dumps, loads
|
||||
from json import dumps, loads
|
||||
|
||||
|
||||
def get_dataset_filename( name, ext, hid ):
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
Classes encapsulating Galaxy tool parameters.
|
||||
"""
|
||||
import re
|
||||
from json import dumps, loads
|
||||
|
||||
from basic import RuntimeValue
|
||||
from grouping import Conditional, Repeat, Section, UploadDataset
|
||||
from galaxy.util.json import dumps, json_fix, loads
|
||||
from galaxy.util.expressions import ExpressionContext
|
||||
from galaxy.util.json import json_fix
|
||||
|
||||
REPLACE_ON_TRUTHY = object()
|
||||
|
||||
@@ -20,19 +22,35 @@ def visit_input_values( inputs, input_values, callback, name_prefix='', label_pr
|
||||
If the callback returns a value, it will be replace the old value.
|
||||
|
||||
>>> from xml.etree.ElementTree import XML
|
||||
>>> from galaxy.util.bunch import Bunch
|
||||
>>> from galaxy.util.odict import odict
|
||||
>>> from galaxy.tools.parameters.basic import TextToolParameter
|
||||
>>> from galaxy.tools.parameters.grouping import Repeat
|
||||
>>> a = TextToolParameter( None, XML( '<param name="a" type="text"/>' ) )
|
||||
>>> a = TextToolParameter( None, XML( '<param name="a"/>' ) )
|
||||
>>> b = Repeat()
|
||||
>>> c = TextToolParameter( None, XML( '<param name="c" type="text"/>' ) )
|
||||
>>> c = TextToolParameter( None, XML( '<param name="c"/>' ) )
|
||||
>>> d = Repeat()
|
||||
>>> e = TextToolParameter( None, XML( '<param name="e"/>' ) )
|
||||
>>> f = Conditional()
|
||||
>>> g = TextToolParameter( None, XML( '<param name="g"/>' ) )
|
||||
>>> h = TextToolParameter( None, XML( '<param name="h"/>' ) )
|
||||
>>> i = TextToolParameter( None, XML( '<param name="i"/>' ) )
|
||||
>>> b.name = 'b'
|
||||
>>> b.inputs = { 'c': c }
|
||||
>>> def visitor( input, value, prefixed_name, **kwargs ):
|
||||
... print '%s, %s, %s' % ( input.name, prefixed_name, value )
|
||||
>>> visit_input_values( odict( [ ('a', a), ('b', b ) ] ), odict( [ ('a', 1), ('b', [ { 'c': 3 } ] ) ] ), visitor )
|
||||
a, a, 1
|
||||
c, b_0|c, 3
|
||||
>>> b.inputs = odict([ ('c', c), ('d', d) ])
|
||||
>>> d.name = 'd'
|
||||
>>> d.inputs = odict([ ('e', e), ('f', f) ])
|
||||
>>> f.test_param = g
|
||||
>>> f.name = 'f'
|
||||
>>> f.cases = [ Bunch( value='true', inputs= { 'h': h } ), Bunch( value='false', inputs= { 'i': i } ) ]
|
||||
>>>
|
||||
>>> def visitor( input, value, prefix, prefixed_name, **kwargs ):
|
||||
... print 'name=%s, prefix=%s, prefixed_name=%s, value=%s' % ( input.name, prefix, prefixed_name, value )
|
||||
>>> visit_input_values( odict([('a',a),('b',b)]), odict([ ('a', 1), ('b', [ odict([('c', 3), ( 'd', [odict([ ('e',5), ('f', odict([ ('g','true'), ('h',7) ])) ]) ])]) ]) ]), visitor )
|
||||
name=a, prefix=, prefixed_name=a, value=1
|
||||
name=c, prefix=b_0|, prefixed_name=b_0|c, value=3
|
||||
name=e, prefix=b_0|d_0|, prefixed_name=b_0|d_0|e, value=5
|
||||
name=g, prefix=b_0|d_0|, prefixed_name=b_0|d_0|f|g, value=true
|
||||
name=h, prefix=b_0|d_0|, prefixed_name=b_0|d_0|f|h, value=7
|
||||
"""
|
||||
def callback_helper( input, input_values, name_prefix, label_prefix, parent_prefix, context=None, error=None ):
|
||||
args = {
|
||||
@@ -56,7 +74,7 @@ def visit_input_values( inputs, input_values, callback, name_prefix='', label_pr
|
||||
input_values[ input.name ] = new_value
|
||||
|
||||
context = ExpressionContext( input_values, context )
|
||||
payload = { 'parent_prefix': name_prefix, 'context': context, 'no_replacement_value': no_replacement_value }
|
||||
payload = { 'context': context, 'no_replacement_value': no_replacement_value }
|
||||
for input in inputs.itervalues():
|
||||
if isinstance( input, Repeat ) or isinstance( input, UploadDataset ):
|
||||
values = input_values[ input.name ] = input_values.get( input.name, [] )
|
||||
@@ -64,7 +82,7 @@ def visit_input_values( inputs, input_values, callback, name_prefix='', label_pr
|
||||
d[ '__index__' ] = i
|
||||
new_name_prefix = name_prefix + '%s_%d|' % ( input.name, i )
|
||||
new_label_prefix = label_prefix + '%s %d > ' % ( input.title, i + 1 )
|
||||
visit_input_values( input.inputs, d, callback, new_name_prefix, new_label_prefix, **payload )
|
||||
visit_input_values( input.inputs, d, callback, new_name_prefix, new_label_prefix, parent_prefix=new_name_prefix, **payload )
|
||||
elif isinstance( input, Conditional ):
|
||||
values = input_values[ input.name ] = input_values.get( input.name, {} )
|
||||
new_name_prefix = name_prefix + input.name + '|'
|
||||
@@ -74,15 +92,15 @@ def visit_input_values( inputs, input_values, callback, name_prefix='', label_pr
|
||||
except:
|
||||
case_error = 'The selected case is unavailable/invalid.'
|
||||
pass
|
||||
callback_helper( input.test_param, values, new_name_prefix, label_prefix, parent_prefix, context=context, error=case_error )
|
||||
callback_helper( input.test_param, values, new_name_prefix, label_prefix, parent_prefix=name_prefix, context=context, error=case_error )
|
||||
values[ '__current_case__' ] = input.get_current_case( values[ input.test_param.name ] )
|
||||
visit_input_values( input.cases[ values[ '__current_case__' ] ].inputs, values, callback, new_name_prefix, label_prefix, **payload )
|
||||
visit_input_values( input.cases[ values[ '__current_case__' ] ].inputs, values, callback, new_name_prefix, label_prefix, parent_prefix=name_prefix, **payload )
|
||||
elif isinstance( input, Section ):
|
||||
values = input_values[ input.name ] = input_values.get( input.name, {} )
|
||||
new_name_prefix = name_prefix + input.name + '|'
|
||||
visit_input_values( input.inputs, values, callback, new_name_prefix, label_prefix, **payload )
|
||||
visit_input_values( input.inputs, values, callback, new_name_prefix, label_prefix, parent_prefix=name_prefix, **payload )
|
||||
else:
|
||||
callback_helper( input, input_values, name_prefix, label_prefix, parent_prefix, context=context )
|
||||
callback_helper( input, input_values, name_prefix, label_prefix, parent_prefix=parent_prefix, context=context )
|
||||
|
||||
|
||||
def check_param( trans, param, incoming_value, param_values ):
|
||||
|
||||
@@ -1819,8 +1819,6 @@ class DataToolParameter( BaseDataToolParameter ):
|
||||
return ''
|
||||
|
||||
def from_html( self, value, trans, other_values={} ):
|
||||
# Can't look at history in workflow mode, skip validation and such,
|
||||
# although, this should never be called in workflow mode right?
|
||||
if trans.workflow_building_mode:
|
||||
return None
|
||||
if not value and not self.optional:
|
||||
@@ -2035,12 +2033,14 @@ class DataToolParameter( BaseDataToolParameter ):
|
||||
d['max'] = self.max
|
||||
d['options'] = {'hda': [], 'hdca': []}
|
||||
|
||||
# return dictionary without options if context is unavailable
|
||||
history = trans.history
|
||||
if history is None or trans.workflow_building_mode:
|
||||
return d
|
||||
|
||||
# prepare dataset/collection matching
|
||||
dataset_matcher = DatasetMatcher( trans, self, None, other_values )
|
||||
multiple = self.multiple
|
||||
history = trans.history
|
||||
if history is None:
|
||||
return d
|
||||
|
||||
# build and append a new select option
|
||||
def append( list, id, hid, name, src ):
|
||||
@@ -2223,13 +2223,13 @@ class DataCollectionToolParameter( BaseDataToolParameter ):
|
||||
d['multiple'] = self.multiple
|
||||
d['options'] = {'hda': [], 'hdca': []}
|
||||
|
||||
# return default content if context is not available
|
||||
if other_values is None:
|
||||
# return dictionary without options if context is unavailable
|
||||
history = trans.history
|
||||
if history is None or trans.workflow_building_mode or other_values is None:
|
||||
return d
|
||||
|
||||
# prepare dataset/collection matching
|
||||
dataset_matcher = DatasetMatcher( trans, self, None, other_values )
|
||||
history = trans.history
|
||||
|
||||
# append directly matched collections
|
||||
for hdca in self.match_collections( trans, history, dataset_matcher ):
|
||||
|
||||
@@ -131,6 +131,13 @@ class JobContext( object ):
|
||||
filename=filename,
|
||||
metadata_source_name=output_collection_def.metadata_source,
|
||||
)
|
||||
log.debug(
|
||||
"(%s) Created dynamic collection dataset for path [%s] with element identifier [%s] for output [%s].",
|
||||
self.job.id,
|
||||
filename,
|
||||
designation,
|
||||
output_collection_def.name,
|
||||
)
|
||||
current_builder.add_dataset( element_identifiers[-1], dataset )
|
||||
|
||||
def create_dataset(
|
||||
|
||||
@@ -58,7 +58,7 @@ class RegexValidator( Validator ):
|
||||
self.expression = expression
|
||||
|
||||
def validate( self, value, trans=None ):
|
||||
if re.match( self.expression, value ) is None:
|
||||
if re.match( self.expression, value or '' ) is None:
|
||||
raise ValueError( self.message )
|
||||
|
||||
|
||||
|
||||
@@ -614,8 +614,8 @@ class AbstractToolBox( Dictifiable, ManagesIntegratedToolPanelMixin, object ):
|
||||
log.exception( "Error reading tool from path: %s" % path )
|
||||
|
||||
def _get_tool_shed_repository( self, tool_shed, name, owner, installed_changeset_revision ):
|
||||
# Abstract class does't have a dependency on the database, for full tool shed
|
||||
# support the actual Galaxy ToolBox implement this method and return a ToolShd repository.
|
||||
# Abstract class doesn't have a dependency on the database, for full Tool Shed
|
||||
# support the actual Galaxy ToolBox implements this method and returns a Tool Shed repository.
|
||||
return None
|
||||
|
||||
def __add_tool( self, tool, load_panel_dict, panel_dict ):
|
||||
|
||||
+10
-18
@@ -3,13 +3,13 @@
|
||||
Utility functions used systemwide.
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import binascii
|
||||
import collections
|
||||
import errno
|
||||
import grp
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
@@ -19,25 +19,17 @@ import smtplib
|
||||
import stat
|
||||
import string
|
||||
import sys
|
||||
import time
|
||||
import tempfile
|
||||
import threading
|
||||
|
||||
from os.path import relpath, normpath
|
||||
from hashlib import md5
|
||||
|
||||
from six import binary_type
|
||||
from six import iteritems
|
||||
from six import PY3
|
||||
from six import string_types, text_type
|
||||
from six.moves import email_mime_text
|
||||
from six.moves.urllib import parse as urlparse
|
||||
from six.moves import xrange
|
||||
from six.moves import zip
|
||||
from xml.etree import ElementTree, ElementInclude
|
||||
|
||||
from galaxy.util import json
|
||||
import time
|
||||
from datetime import datetime
|
||||
from hashlib import md5
|
||||
from os.path import normpath, relpath
|
||||
from xml.etree import ElementInclude, ElementTree
|
||||
|
||||
from six import binary_type, iteritems, PY3, string_types, text_type
|
||||
from six.moves import email_mime_text, xrange, zip
|
||||
from six.moves.urllib import parse as urlparse
|
||||
|
||||
try:
|
||||
import docutils.core as docutils_core
|
||||
@@ -46,7 +38,7 @@ except ImportError:
|
||||
docutils_core = None
|
||||
docutils_html4css1 = None
|
||||
|
||||
from .inflection import Inflector, English
|
||||
from .inflection import English, Inflector
|
||||
inflector = Inflector(English)
|
||||
|
||||
if PY3:
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
Functionality for dealing with dbkeys.
|
||||
"""
|
||||
# dbkeys read from disk using builds.txt
|
||||
from galaxy.util import read_dbnames
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.util.object_wrapper import sanitize_lists_to_string
|
||||
from __future__ import absolute_import
|
||||
import os.path
|
||||
from json import loads
|
||||
|
||||
from galaxy.util import read_dbnames
|
||||
from galaxy.util.object_wrapper import sanitize_lists_to_string
|
||||
|
||||
|
||||
class GenomeBuilds( object ):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
__all__ = [ "dumps", "loads", "safe_dumps", "json_fix", "validate_jsonrpc_request", "validate_jsonrpc_response", "jsonrpc_request", "jsonrpc_response" ]
|
||||
__all__ = [ "safe_dumps", "json_fix", "validate_jsonrpc_request", "validate_jsonrpc_response", "jsonrpc_request", "jsonrpc_response" ]
|
||||
|
||||
import copy
|
||||
import collections
|
||||
@@ -12,13 +12,10 @@ import string
|
||||
|
||||
from six import text_type, string_types, iteritems
|
||||
|
||||
dumps = json.dumps
|
||||
loads = json.loads
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
to_json_string = dumps
|
||||
from_json_string = loads
|
||||
to_json_string = json.dumps
|
||||
from_json_string = json.loads
|
||||
|
||||
|
||||
def json_fix( val ):
|
||||
@@ -77,7 +74,7 @@ def safe_dumps( *args, **kwargs ):
|
||||
|
||||
def validate_jsonrpc_request( request, regular_methods, notification_methods ):
|
||||
try:
|
||||
request = loads( request )
|
||||
request = json.loads( request )
|
||||
except Exception as e:
|
||||
return False, request, jsonrpc_response( id=None,
|
||||
error=dict( code=-32700,
|
||||
@@ -114,7 +111,7 @@ def validate_jsonrpc_request( request, regular_methods, notification_methods ):
|
||||
|
||||
def validate_jsonrpc_response( response, id=None ):
|
||||
try:
|
||||
response = loads( response )
|
||||
response = json.loads( response )
|
||||
except Exception as e:
|
||||
log.error( 'Response was not valid JSON: %s' % str( e ) )
|
||||
log.debug( 'Response was: %s' % response )
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from json import loads
|
||||
|
||||
from galaxy.datatypes.tabular import Tabular
|
||||
from galaxy.util.json import loads
|
||||
|
||||
|
||||
class BaseDataProvider( object ):
|
||||
|
||||
@@ -8,9 +8,9 @@ import os
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
from json import loads
|
||||
|
||||
import pysam
|
||||
|
||||
from bx.interval_index_file import Indexes
|
||||
from bx.bbi.bigbed_file import BigBedFile
|
||||
from bx.bbi.bigwig_file import BigWigFile
|
||||
@@ -18,7 +18,6 @@ from pysam import ctabix
|
||||
|
||||
from galaxy.datatypes.interval import Bed, Gff, Gtf
|
||||
from galaxy.datatypes.util.gff_util import convert_gff_coords_to_bed, GFFFeature, GFFInterval, GFFReaderWrapper, parse_gff_attributes
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.visualization.data_providers.basic import BaseDataProvider
|
||||
from galaxy.visualization.data_providers.cigar import get_ref_based_read_seq_and_cigar
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@ import logging
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from json import loads
|
||||
|
||||
from bx.seq.twobit import TwoBitFile
|
||||
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.util.json import loads
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Deserialize Galaxy resources (hdas, ldas, datasets, genomes, etc.) from
|
||||
a dictionary of string data/ids (often from a query string).
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
import weakref
|
||||
|
||||
import galaxy.exceptions
|
||||
@@ -10,7 +12,6 @@ from galaxy.util import bunch
|
||||
from galaxy.managers import visualizations as visualization_manager
|
||||
from galaxy.managers import hdas as hda_manager
|
||||
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
@@ -31,7 +32,7 @@ class ResourceParser( object ):
|
||||
'int' : int,
|
||||
'float' : float,
|
||||
# 'date' : lambda param: ,
|
||||
'json' : ( lambda param: galaxy.util.json.loads(
|
||||
'json' : ( lambda param: json.loads(
|
||||
galaxy.util.sanitize_html.sanitize_html( param ) ) ),
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import logging
|
||||
import os.path
|
||||
import socket
|
||||
import tarfile
|
||||
import tempfile
|
||||
import types
|
||||
|
||||
import routes
|
||||
@@ -93,6 +94,9 @@ class WebApplication( object ):
|
||||
"""
|
||||
self.mapper.connect( route, **kwargs )
|
||||
|
||||
def add_client_route( self, route ):
|
||||
self.add_route(route, controller='root', action='index')
|
||||
|
||||
def set_transaction_factory( self, transaction_factory ):
|
||||
"""
|
||||
Use the callable `transaction_factory` to create the transaction
|
||||
@@ -285,15 +289,13 @@ class DefaultWebTransaction( object ):
|
||||
else:
|
||||
return None
|
||||
|
||||
# For request.params, override cgi.FieldStorage.make_file to create persistent
|
||||
# tempfiles. Necessary for externalizing the upload tool. It's a little hacky
|
||||
# but for performance reasons it's way better to use Paste's tempfile than to
|
||||
# create a new one and copy.
|
||||
import tempfile
|
||||
|
||||
|
||||
class FieldStorage( cgi.FieldStorage ):
|
||||
def make_file(self, binary=None):
|
||||
# For request.params, override cgi.FieldStorage.make_file to create persistent
|
||||
# tempfiles. Necessary for externalizing the upload tool. It's a little hacky
|
||||
# but for performance reasons it's way better to use Paste's tempfile than to
|
||||
# create a new one and copy.
|
||||
return tempfile.NamedTemporaryFile()
|
||||
|
||||
def read_lines(self):
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
import inspect
|
||||
from traceback import format_exc
|
||||
import logging
|
||||
from functools import wraps
|
||||
from six import string_types
|
||||
from json import loads
|
||||
from traceback import format_exc
|
||||
|
||||
import paste.httpexceptions
|
||||
from six import string_types
|
||||
|
||||
from galaxy.web.framework import url_for
|
||||
from galaxy import util
|
||||
from galaxy.exceptions import error_codes
|
||||
from galaxy.exceptions import MessageException
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.util.json import safe_dumps as dumps
|
||||
from galaxy.exceptions import error_codes, MessageException
|
||||
from galaxy.util.json import safe_dumps
|
||||
from galaxy.web.framework import url_for
|
||||
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
JSON_CONTENT_TYPE = "application/json"
|
||||
|
||||
|
||||
@@ -46,7 +44,7 @@ def json( func, **json_kwargs ):
|
||||
@wraps(func)
|
||||
def call_and_format( self, trans, *args, **kwargs ):
|
||||
trans.response.set_content_type( JSON_CONTENT_TYPE )
|
||||
return dumps( func( self, trans, *args, **kwargs ), **json_kwargs )
|
||||
return safe_dumps( func( self, trans, *args, **kwargs ), **json_kwargs )
|
||||
if not hasattr( func, '_orig' ):
|
||||
call_and_format._orig = func
|
||||
return expose( _save_orig_fn( call_and_format, func ) )
|
||||
@@ -138,9 +136,9 @@ def expose_api( func, to_json=True, user_required=True ):
|
||||
try:
|
||||
rval = func( self, trans, *args, **kwargs)
|
||||
if to_json and trans.debug:
|
||||
rval = dumps( rval, indent=4, sort_keys=True )
|
||||
rval = safe_dumps( rval, indent=4, sort_keys=True )
|
||||
elif to_json:
|
||||
rval = dumps( rval )
|
||||
rval = safe_dumps( rval )
|
||||
return rval
|
||||
except paste.httpexceptions.HTTPException:
|
||||
raise # handled
|
||||
@@ -258,9 +256,9 @@ def _future_expose_api( func, to_json=True, user_required=True, user_or_session_
|
||||
try:
|
||||
rval = func( self, trans, *args, **kwargs)
|
||||
if to_json and trans.debug:
|
||||
rval = dumps( rval, indent=4, sort_keys=True )
|
||||
rval = safe_dumps( rval, indent=4, sort_keys=True )
|
||||
elif to_json:
|
||||
rval = dumps( rval )
|
||||
rval = safe_dumps( rval )
|
||||
return rval
|
||||
except MessageException as e:
|
||||
traceback_string = format_exc()
|
||||
@@ -334,7 +332,7 @@ def __api_error_response( trans, **kwds ):
|
||||
# non-success (i.e. not 200 or 201) has been set, do not override
|
||||
# underlying controller.
|
||||
response.status = status_code
|
||||
return dumps( error_dict )
|
||||
return safe_dumps( error_dict )
|
||||
|
||||
|
||||
def _future_expose_api_anonymous( func, to_json=True ):
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
import logging
|
||||
import math
|
||||
from json import dumps, loads
|
||||
|
||||
from markupsafe import escape
|
||||
from six import text_type
|
||||
from six import string_types
|
||||
from sqlalchemy.sql.expression import and_, func, or_, null, false, true
|
||||
from six import string_types, text_type
|
||||
from sqlalchemy.sql.expression import and_, false, func, null, or_, true
|
||||
|
||||
from galaxy.model.item_attrs import RuntimeException, UsesAnnotations, UsesItemRatings
|
||||
from galaxy.util import sanitize_text
|
||||
from galaxy.util.json import loads, dumps
|
||||
from galaxy.util.odict import odict
|
||||
from galaxy.web.framework import decorators
|
||||
from galaxy.web.framework import url_for
|
||||
from galaxy.web.framework import decorators, url_for
|
||||
from galaxy.web.framework.helpers import iff
|
||||
|
||||
|
||||
|
||||
@@ -2,12 +2,16 @@
|
||||
API operations on the library datasets.
|
||||
"""
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
import os.path
|
||||
import string
|
||||
import sys
|
||||
import tempfile
|
||||
import zipfile
|
||||
from json import dumps
|
||||
|
||||
from paste.httpexceptions import HTTPBadRequest, HTTPInternalServerError
|
||||
|
||||
from galaxy import exceptions
|
||||
from galaxy import util
|
||||
@@ -15,15 +19,11 @@ from galaxy import web
|
||||
from galaxy.exceptions import ObjectNotFound
|
||||
from galaxy.managers import folders, roles
|
||||
from galaxy.tools.actions import upload_common
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.util.streamball import StreamBall
|
||||
from galaxy.web import _future_expose_api as expose_api
|
||||
from galaxy.web import _future_expose_api_anonymous as expose_api_anonymous
|
||||
from galaxy.web.base.controller import BaseAPIController, UsesVisualizationMixin
|
||||
from paste.httpexceptions import HTTPBadRequest, HTTPInternalServerError
|
||||
|
||||
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
|
||||
@@ -1,27 +1,24 @@
|
||||
import json
|
||||
import logging
|
||||
|
||||
from paste.httpexceptions import HTTPBadRequest, HTTPForbidden
|
||||
from time import strftime
|
||||
|
||||
from paste.httpexceptions import HTTPBadRequest, HTTPForbidden
|
||||
|
||||
import tool_shed.util.shed_util_common as suc
|
||||
from galaxy import util
|
||||
from galaxy import web
|
||||
from galaxy import exceptions
|
||||
from galaxy.web import _future_expose_api as expose_api
|
||||
from galaxy.util import json
|
||||
from galaxy.web.base.controller import BaseAPIController
|
||||
|
||||
from tool_shed.galaxy_install.install_manager import InstallRepositoryManager
|
||||
from tool_shed.galaxy_install.metadata.installed_repository_metadata_manager import InstalledRepositoryMetadataManager
|
||||
from tool_shed.galaxy_install.repair_repository_manager import RepairRepositoryManager
|
||||
|
||||
from tool_shed.util import common_util
|
||||
from tool_shed.util import encoding_util
|
||||
from tool_shed.util import hg_util
|
||||
from tool_shed.util import workflow_util
|
||||
from tool_shed.util import tool_util
|
||||
|
||||
import tool_shed.util.shed_util_common as suc
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
import logging
|
||||
import urllib
|
||||
|
||||
from galaxy import exceptions
|
||||
from galaxy import web, util
|
||||
from galaxy import managers
|
||||
from galaxy.web import _future_expose_api_anonymous_and_sessionless as expose_api_anonymous_and_sessionless
|
||||
from galaxy.web import _future_expose_api_anonymous as expose_api_anonymous
|
||||
from galaxy.web import _future_expose_api as expose_api
|
||||
from galaxy.web.base.controller import BaseAPIController
|
||||
from galaxy.web.base.controller import UsesVisualizationMixin
|
||||
from galaxy.visualization.genomes import GenomeRegion
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.managers.collections_util import dictify_dataset_collection_instance
|
||||
from json import dumps
|
||||
|
||||
import galaxy.queue_worker
|
||||
from galaxy import exceptions, managers, util, web
|
||||
from galaxy.managers.collections_util import dictify_dataset_collection_instance
|
||||
from galaxy.visualization.genomes import GenomeRegion
|
||||
from galaxy.web import _future_expose_api as expose_api
|
||||
from galaxy.web import _future_expose_api_anonymous as expose_api_anonymous
|
||||
from galaxy.web import _future_expose_api_anonymous_and_sessionless as expose_api_anonymous_and_sessionless
|
||||
from galaxy.web.base.controller import BaseAPIController
|
||||
from galaxy.web.base.controller import UsesVisualizationMixin
|
||||
|
||||
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
|
||||
@@ -72,6 +72,15 @@ def paste_app_factory( global_conf, **kwargs ):
|
||||
# Create the universe WSGI application
|
||||
webapp = GalaxyWebApplication( app, session_cookie='galaxysession', name='galaxy' )
|
||||
|
||||
# CLIENTSIDE ROUTES
|
||||
# The following are routes that are handled completely on the clientside.
|
||||
# The following routes don't bootstrap any information, simply provide the
|
||||
# base analysis interface at which point the application takes over.
|
||||
|
||||
webapp.add_client_route( '/tours' )
|
||||
webapp.add_client_route( '/tours/{tour_id}' )
|
||||
|
||||
# STANDARD CONTROLLER ROUTES
|
||||
webapp.add_ui_controllers( 'galaxy.webapps.galaxy.controllers', app )
|
||||
# Force /history to go to view of current
|
||||
webapp.add_route( '/history', controller='history', action='view' )
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from sqlalchemy import false, or_
|
||||
from six import string_types
|
||||
from sqlalchemy import false, or_
|
||||
|
||||
import tool_shed.repository_types.util as rt_util
|
||||
from admin import AdminGalaxy
|
||||
from galaxy import web
|
||||
from galaxy import util
|
||||
from galaxy.util import json
|
||||
from galaxy import util, web
|
||||
from galaxy.tools.deps import views
|
||||
from galaxy.web.form_builder import CheckboxField
|
||||
from tool_shed.galaxy_install import dependency_display
|
||||
from tool_shed.galaxy_install import install_manager
|
||||
@@ -31,7 +31,6 @@ from tool_shed.util import tool_dependency_util
|
||||
from tool_shed.util import tool_util
|
||||
from tool_shed.util import workflow_util
|
||||
from tool_shed.util.web_util import escape
|
||||
from galaxy.tools.deps import views
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import logging
|
||||
from json import loads
|
||||
|
||||
import paste.httpexceptions
|
||||
from markupsafe import escape
|
||||
from six import string_types
|
||||
import paste.httpexceptions
|
||||
|
||||
import galaxy.queue_worker
|
||||
from galaxy import web
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.web.base.controller import BaseUIController
|
||||
|
||||
# set up logger
|
||||
import logging
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ log = logging.getLogger( __name__ )
|
||||
|
||||
comptypes = []
|
||||
|
||||
# TODO: not used in this file
|
||||
from galaxy.util.json import loads # noqa
|
||||
try:
|
||||
import zlib # noqa
|
||||
comptypes.append( 'zip' )
|
||||
|
||||
@@ -10,6 +10,7 @@ import tempfile
|
||||
import urllib
|
||||
import urllib2
|
||||
import zipfile
|
||||
from json import dumps, loads
|
||||
|
||||
from markupsafe import escape
|
||||
from sqlalchemy import and_, false
|
||||
@@ -18,9 +19,7 @@ from sqlalchemy.orm import eagerload_all
|
||||
from galaxy import util, web
|
||||
from galaxy.security import Action
|
||||
from galaxy.tools.actions import upload_common
|
||||
from galaxy.util import inflector
|
||||
from galaxy.util import unicodify
|
||||
from galaxy.util.json import dumps, loads
|
||||
from galaxy.util import inflector, unicodify
|
||||
from galaxy.util.streamball import StreamBall
|
||||
from galaxy.web.base.controller import BaseUIController, UsesFormDefinitionsMixin, UsesExtendedMetadataMixin, UsesLibraryMixinItems
|
||||
from galaxy.web.form_builder import AddressField, CheckboxField, SelectField, build_select_field
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
from json import loads
|
||||
|
||||
from markupsafe import escape
|
||||
from sqlalchemy import and_, desc, false, true
|
||||
|
||||
from galaxy import managers, model, util, web
|
||||
from galaxy.model.item_attrs import UsesItemRatings
|
||||
from galaxy.util import unicodify
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.util.sanitize_html import sanitize_html, _BaseHTMLProcessor
|
||||
from galaxy.util.sanitize_html import _BaseHTMLProcessor, sanitize_html
|
||||
from galaxy.web import error, url_for
|
||||
from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesStoredWorkflowMixin, UsesVisualizationMixin
|
||||
from galaxy.web.framework.helpers import time_ago, grids
|
||||
from galaxy.web.framework.helpers import grids, time_ago
|
||||
|
||||
|
||||
def format_bool( b ):
|
||||
|
||||
@@ -31,7 +31,8 @@ class RootController( controller.JSAppLauncher, UsesAnnotations ):
|
||||
|
||||
@web.expose
|
||||
def default(self, trans, target1=None, target2=None, **kwd):
|
||||
"""Called on any url that does not match a controller method.
|
||||
"""
|
||||
Called on any url that does not match a controller method.
|
||||
"""
|
||||
raise HTTPNotFound( 'This link may not be followed from within Galaxy.' )
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import os
|
||||
import random
|
||||
import socket
|
||||
import urllib
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from json import dumps, loads
|
||||
|
||||
from markupsafe import escape
|
||||
from sqlalchemy import and_, or_, true, func
|
||||
@@ -17,12 +17,12 @@ from sqlalchemy import and_, or_, true, func
|
||||
from galaxy import model
|
||||
from galaxy import util
|
||||
from galaxy import web
|
||||
from galaxy.exceptions import ObjectInvalid
|
||||
from galaxy.security.validate_user_input import (transform_publicname,
|
||||
validate_email,
|
||||
validate_password,
|
||||
validate_publicname)
|
||||
from galaxy.util import biostar, hash_util, docstring_trim, listify
|
||||
from galaxy.util.json import dumps, loads
|
||||
from galaxy.web import url_for
|
||||
from galaxy.web.base.controller import (BaseUIController,
|
||||
CreatesApiKeysMixin,
|
||||
@@ -30,8 +30,6 @@ from galaxy.web.base.controller import (BaseUIController,
|
||||
UsesFormDefinitionsMixin)
|
||||
from galaxy.web.form_builder import build_select_field, CheckboxField
|
||||
from galaxy.web.framework.helpers import grids, time_ago
|
||||
from galaxy.exceptions import ObjectInvalid
|
||||
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
from json import loads
|
||||
|
||||
from markupsafe import escape
|
||||
from paste.httpexceptions import HTTPNotFound, HTTPBadRequest
|
||||
from six import string_types
|
||||
from sqlalchemy import and_, desc, false, or_, true
|
||||
|
||||
from galaxy import managers
|
||||
from galaxy import model, web
|
||||
from galaxy import util
|
||||
from galaxy import managers, model, util, web
|
||||
from galaxy.datatypes.interval import Bed
|
||||
from galaxy.model.item_attrs import UsesAnnotations, UsesItemRatings
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.util.sanitize_html import sanitize_html
|
||||
from galaxy.visualization.plugins import registry
|
||||
from galaxy.visualization.data_providers.phyloviz import PhylovizDataProvider
|
||||
from galaxy.visualization.data_providers.genome import RawBedDataProvider
|
||||
from galaxy.visualization.data_providers.phyloviz import PhylovizDataProvider
|
||||
from galaxy.visualization.genomes import decode_dbkey
|
||||
from galaxy.visualization.genomes import GenomeRegion
|
||||
from galaxy.visualization.plugins import registry
|
||||
from galaxy.web import error
|
||||
from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesVisualizationMixin
|
||||
from galaxy.web.framework.helpers import grids, time_ago
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import string
|
||||
@@ -16,7 +17,6 @@ import tool_shed.repository_types.util as rt_util
|
||||
|
||||
from galaxy import util
|
||||
from galaxy import web
|
||||
from galaxy.util import json
|
||||
from galaxy.web.base.controller import BaseUIController
|
||||
from galaxy.web.form_builder import CheckboxField
|
||||
from galaxy.web.framework.helpers import grids
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
"""
|
||||
Modules used in building workflows
|
||||
"""
|
||||
|
||||
import logging
|
||||
import copy
|
||||
|
||||
import logging
|
||||
from json import dumps, loads
|
||||
from xml.etree.ElementTree import Element
|
||||
|
||||
import galaxy.tools
|
||||
from galaxy import exceptions
|
||||
from galaxy import model
|
||||
from galaxy import web
|
||||
from galaxy import exceptions, model, web
|
||||
from galaxy.dataset_collections import matching
|
||||
from galaxy.web.framework import formbuilder
|
||||
from galaxy.jobs.actions.post import ActionBox
|
||||
from galaxy.model import PostJobAction
|
||||
from galaxy.tools.execute import execute
|
||||
from galaxy.tools.parameters import check_param, visit_input_values
|
||||
from galaxy.tools.parameters.basic import (
|
||||
parameter_types,
|
||||
@@ -23,11 +20,9 @@ from galaxy.tools.parameters.basic import (
|
||||
RuntimeValue,
|
||||
)
|
||||
from galaxy.tools.parameters.wrapped import make_dict_copy
|
||||
from galaxy.tools.execute import execute
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.util import odict
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.web.framework import formbuilder
|
||||
from tool_shed.util import common_util
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
@@ -56,7 +56,8 @@ class RepairRepositoryManager():
|
||||
and attempt to make sure they are all properly installed as well as each repository's
|
||||
tool dependencies. This method is called only from Galaxy when attempting to correct
|
||||
issues with an installed repository that has installation problems somewhere in its
|
||||
dependency hierarchy.
|
||||
dependency hierarchy. Problems with dependencies that have never been installed
|
||||
cannot be resolved with a repair.
|
||||
"""
|
||||
rdim = repository_dependency_manager.RepositoryDependencyInstallManager( self.app )
|
||||
tsr_ids = []
|
||||
@@ -150,8 +151,12 @@ class RepairRepositoryManager():
|
||||
else:
|
||||
repair_dict[ repository_name ] = [ error_message ]
|
||||
return repair_dict
|
||||
|
||||
tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( self.app, repository.tool_shed )
|
||||
metadata = repository.metadata
|
||||
# The repository.metadata contains dependency information that corresponds to the current changeset revision,
|
||||
# which may be different from what is stored in the database
|
||||
# If any of these repository-repository dependency associations is obsolete, clean_dependency_relationships removes them.
|
||||
suc.clean_dependency_relationships(self.app, metadata, repository, tool_shed_url)
|
||||
repair_dict = {}
|
||||
tpm = tool_panel_manager.ToolPanelManager( self.app )
|
||||
if repository.status in [ self.app.install_model.ToolShedRepository.installation_status.DEACTIVATED ]:
|
||||
|
||||
@@ -108,6 +108,8 @@ class UpdateRepositoryManager( object ):
|
||||
Tool Shed. This happens when updating an installed repository to a new changeset revision.
|
||||
"""
|
||||
repository.metadata = updated_metadata_dict
|
||||
tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( self.app, repository.tool_shed )
|
||||
suc.clean_dependency_relationships(self.app, updated_metadata_dict, repository, tool_shed_url)
|
||||
# Update the repository.changeset_revision column in the database.
|
||||
repository.changeset_revision = updated_changeset_revision
|
||||
repository.ctx_rev = updated_ctx_rev
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import json
|
||||
import logging
|
||||
|
||||
from markupsafe import escape as escape_html
|
||||
@@ -6,7 +7,7 @@ from sqlalchemy import and_, false, or_, true
|
||||
import tool_shed.grids.util as grids_util
|
||||
import tool_shed.repository_types.util as rt_util
|
||||
import tool_shed.util.shed_util_common as suc
|
||||
from galaxy.util import json, listify
|
||||
from galaxy.util import listify
|
||||
from galaxy.web.framework.helpers import grids
|
||||
from galaxy.webapps.tool_shed import model
|
||||
from tool_shed.util import hg_util, metadata_util
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import threading
|
||||
@@ -6,7 +7,7 @@ from mako.template import Template
|
||||
|
||||
import tool_shed.util.shed_util_common as suc
|
||||
from galaxy import web
|
||||
from galaxy.util import json, rst_to_html, unicodify
|
||||
from galaxy.util import rst_to_html, unicodify
|
||||
from tool_shed.util import basic_util, common_util, hg_util
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
@@ -127,10 +127,16 @@ def clean_dependency_relationships(trans, metadata_dict, tool_shed_repository, t
|
||||
rd = rrda.repository_dependency
|
||||
r = rd.repository
|
||||
if can_eliminate_repository_dependency(metadata_dict, tool_shed_url, r.name, r.owner):
|
||||
message = "Repository dependency %s by owner %s is not required by repository %s, owner %s, "
|
||||
message += "removing from list of repository dependencies."
|
||||
log.debug(message % (r.name, r.owner, tool_shed_repository.name, tool_shed_repository.owner))
|
||||
trans.install_model.context.delete(rrda)
|
||||
trans.install_model.context.flush()
|
||||
for td in tool_shed_repository.tool_dependencies:
|
||||
if can_eliminate_tool_dependency(metadata_dict, td.name, td.type, td.version):
|
||||
message = "Tool dependency %s, version %s is not required by repository %s, owner %s, "
|
||||
message += "removing from list of tool dependencies."
|
||||
log.debug(message % (td.name, td.version, tool_shed_repository.name, tool_shed_repository.owner))
|
||||
trans.install_model.context.delete(td)
|
||||
trans.install_model.context.flush()
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
""" Tool shed helper methods for dealing with workflows - only two methods are
|
||||
utilized outside of this modules - generate_workflow_image and import_workflow.
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
|
||||
import galaxy.tools
|
||||
import galaxy.tools.parameters
|
||||
from galaxy.util import json
|
||||
from galaxy.util.sanitize_html import sanitize_html
|
||||
from galaxy.workflow.render import WorkflowCanvas
|
||||
from galaxy.workflow.steps import attach_ordered_steps
|
||||
from galaxy.workflow.modules import module_types
|
||||
from galaxy.workflow.modules import ToolModule
|
||||
from galaxy.workflow.modules import WorkflowModuleFactory
|
||||
from galaxy.workflow.render import WorkflowCanvas
|
||||
from galaxy.workflow.steps import attach_ordered_steps
|
||||
|
||||
from tool_shed.tools import tool_validator
|
||||
|
||||
|
||||
+5
-3
@@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -d .venv ];
|
||||
: ${GALAXY_VIRTUAL_ENV:=.venv}
|
||||
|
||||
if [ -d "$GALAXY_VIRTUAL_ENV" ];
|
||||
then
|
||||
printf "Activating virtualenv at %s/.venv\n" $(pwd)
|
||||
. .venv/bin/activate
|
||||
printf "Activating virtualenv at $GALAXY_VIRTUAL_ENV\n"
|
||||
. "$GALAXY_VIRTUAL_ENV/bin/activate"
|
||||
fi
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
@@ -11,21 +11,8 @@
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
# If there is a .venv/ directory, assume it contains a virtualenv that we
|
||||
# should run this instance in.
|
||||
if [ -d .venv ];
|
||||
then
|
||||
. .venv/bin/activate
|
||||
fi
|
||||
|
||||
./scripts/common_startup.sh --skip-samples
|
||||
|
||||
if [ -d .venv ];
|
||||
then
|
||||
printf "Activating virtualenv at %s/.venv\n" $(pwd)
|
||||
. .venv/bin/activate
|
||||
fi
|
||||
|
||||
if [ -z "$GALAXY_REPORTS_CONFIG" ]; then
|
||||
if [ -f reports_wsgi.ini ]; then
|
||||
GALAXY_REPORTS_CONFIG=reports_wsgi.ini
|
||||
|
||||
@@ -4,12 +4,6 @@ cd `dirname $0`
|
||||
|
||||
./scripts/common_startup.sh
|
||||
|
||||
if [ -d .venv ];
|
||||
then
|
||||
printf "Activating virtualenv at %s/.venv\n" $(pwd)
|
||||
. .venv/bin/activate
|
||||
fi
|
||||
|
||||
tool_shed=`./lib/tool_shed/scripts/bootstrap_tool_shed/parse_run_sh_args.sh $@`
|
||||
args=$@
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
"""
|
||||
If the current installed python version is not 2.6 to 2.7, prints an error
|
||||
If the current installed python version is not 2.7, prints an error
|
||||
message to stderr and returns 1
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
msg = """ERROR: Your Python version is: %s
|
||||
Galaxy is currently supported on Python 2.6 and 2.7. To run Galaxy,
|
||||
Galaxy is currently supported on Python 2.7 only. To run Galaxy,
|
||||
please download and install a supported version from python.org. If a
|
||||
supported version is installed but is not your default, getgalaxy.org
|
||||
contains instructions on how to force Galaxy to use a different version.""" % sys.version[:3]
|
||||
@@ -14,7 +14,7 @@ contains instructions on how to force Galaxy to use a different version.""" % sy
|
||||
|
||||
def check_python():
|
||||
try:
|
||||
assert sys.version_info[:2] >= ( 2, 6 ) and sys.version_info[:2] <= ( 2, 7 )
|
||||
assert sys.version_info[:2] == ( 2, 7 )
|
||||
except AssertionError:
|
||||
print >>sys.stderr, msg
|
||||
raise
|
||||
|
||||
@@ -13,6 +13,7 @@ import threading
|
||||
import time
|
||||
import urllib
|
||||
from ConfigParser import SafeConfigParser
|
||||
from json import dumps
|
||||
|
||||
import nose.core
|
||||
import nose.config
|
||||
@@ -31,7 +32,6 @@ from base.tool_shed_util import parse_tool_panel_config
|
||||
from functional import database_contexts
|
||||
from galaxy import tools
|
||||
from galaxy.app import UniverseApplication
|
||||
from galaxy.util.json import dumps
|
||||
from galaxy.util.properties import load_app_properties
|
||||
from galaxy.web import buildapp
|
||||
|
||||
|
||||
+8
-7
@@ -5,6 +5,7 @@ Manager (galaxy.jobs.transfer_manager) and should not normally be invoked by
|
||||
hand.
|
||||
"""
|
||||
import ConfigParser
|
||||
import json
|
||||
import logging
|
||||
import optparse
|
||||
import os
|
||||
@@ -16,9 +17,6 @@ import threading
|
||||
import time
|
||||
import urllib2
|
||||
|
||||
galaxy_root = os.path.abspath( os.path.join( os.path.dirname( __file__ ), os.pardir ) )
|
||||
sys.path.insert( 1, os.path.join( galaxy_root, 'lib' ) )
|
||||
|
||||
try:
|
||||
import pexpect
|
||||
except ImportError:
|
||||
@@ -28,9 +26,12 @@ from daemon import DaemonContext
|
||||
from sqlalchemy import create_engine, MetaData, Table
|
||||
from sqlalchemy.orm import scoped_session, sessionmaker
|
||||
|
||||
import galaxy.model
|
||||
from galaxy.util import json, bunch
|
||||
galaxy_root = os.path.abspath( os.path.join( os.path.dirname( __file__ ), os.pardir ) )
|
||||
sys.path.insert( 1, os.path.join( galaxy_root, 'lib' ) )
|
||||
|
||||
import galaxy.model
|
||||
from galaxy.util import bunch
|
||||
from galaxy.util.json import jsonrpc_response, validate_jsonrpc_request
|
||||
|
||||
PEXPECT_IMPORT_MESSAGE = ('The Python pexpect package is required to use this '
|
||||
'feature, please install it')
|
||||
@@ -134,9 +135,9 @@ class ListenerRequestHandler( SocketServer.BaseRequestHandler ):
|
||||
def handle( self ):
|
||||
request = self.request.recv( 8192 )
|
||||
response = {}
|
||||
valid, request, response = json.validate_jsonrpc_request( request, ( 'get_state', ), () )
|
||||
valid, request, response = validate_jsonrpc_request( request, ( 'get_state', ), () )
|
||||
if valid:
|
||||
self.request.send( json.dumps( json.jsonrpc_response( request=request, result=self.server.state_result.result ) ) )
|
||||
self.request.send( json.dumps( jsonrpc_response( request=request, result=self.server.state_result.result ) ) )
|
||||
else:
|
||||
error_msg = 'Unable to serve request: %s' % response['error']['message']
|
||||
if 'data' in response['error']:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"tours.js","sources":["../../src/mvc/tours.js"],"names":["define","gxy_root","Galaxy","root","tour_opts","storage","window","sessionStorage","onEnd","removeItem","delay","orphan","hooked_tour_from_data","data","_","each","steps","step","preclick","onShow","$","click","postclick","onHide","textinsert","onShown","element","val","trigger","TourItem","Backbone","Model","extend","urlRoot","Tours","Collection","url","model","giveTour","tour_id","getJSON","tourdata","setItem","JSON","stringify","tour","Tour","init","goTo","restart","ToursView","View","initialize","self","this","setElement","fetch","success","render","error","console","tpl","template","join","$el","html","tours","models","on"],"mappings":"AAUAA,QAAQ,uBAAuB,WAE3B,GAAIC,GAA6B,mBAAXC,QAAyB,IAAMA,OAAOC,KAExDC,GAAcC,QAASC,OAAOC,eAChBC,MAAO,WACHD,eAAeE,WAAW,qBAE9BC,MAAO,IACPC,QAAO,GAGrBC,EAAwB,SAASC,GA2BjC,MA1BAC,GAAEC,KAAKF,EAAKG,MAAO,SAASC,GACpBA,EAAKC,WACLD,EAAKE,OAAQ,WACTL,EAAEC,KAAKE,EAAKC,SAAU,SAASA,GAE3BE,EAAEF,GAAUG,YAIpBJ,EAAKK,YACLL,EAAKM,OAAS,WACVT,EAAEC,KAAKE,EAAKK,UAAW,SAASA,GAE5BF,EAAEE,GAAWD,YAIrBJ,EAAKO,aAILP,EAAKQ,QAAS,WACVL,EAAEH,EAAKS,SAASC,IAAIV,EAAKO,YAAYI,QAAQ,cAIlDf,GAGPgB,EAAWC,SAASC,MAAMC,QAC5BC,QAAShC,EAAW,cAGlBiC,EAAQJ,SAASK,WAAWH,QAC9BI,IAAMnC,EAAW,YACjBoC,MAAOR,IAILS,EAAY,SAASC,GACrB,GAAIH,GAAMnC,EAAW,aAAesC,CACpCnB,GAAEoB,QAASJ,EAAK,SAAUvB,GAEtB,GAAI4B,GAAW7B,EAAsBC,EACrCN,gBAAemC,QAAQ,mBAAoBC,KAAKC,UAAU/B,GAE1D,IAAIgC,GAAO,GAAIC,MAAKhC,EAAEkB,QAClBhB,MAAOyB,EAASzB,OACjBZ,GAEHyC,GAAKE,OACLF,EAAKG,KAAK,GACVH,EAAKI,aAGTC,EAAYpB,SAASqB,KAAKnB,QAE1BoB,WAAY,WACR,GAAIC,GAAOC,IACXA,MAAKC,WAAW,UAChBD,KAAKjB,MAAQ,GAAIH,GACjBoB,KAAKjB,MAAMmB,OACTC,QAAS,WACPJ,EAAKK,UAEPC,MAAO,WAELC,QAAQD,MAAM,8BAKtBD,OAAQ,WACJ,GAAIG,GAAM/C,EAAEgD,UACR,wBACA,uFACA,2FACA,OACA,uCACI,OACI,iFACI,yCACJ,OACA,mEACJ,QACJ,YACA,SAASC,KAAK,IAClBT,MAAKU,IAAIC,KAAKJ,GAAKK,MAAOZ,KAAKjB,MAAM8B,UAAUC,GAAG,QAAS,YAAa,WACpE9B,EAASlB,EAAEkC,MAAMzC,KAAK,gBAKlC,QAAQqC,UAAWA,EACXtC,sBAAuBA,EACvBR,UAAWA,EACXkC,SAAUA"}
|
||||
{"version":3,"file":"tours.js","sources":["../../src/mvc/tours.js"],"names":["define","gxy_root","Galaxy","root","tour_opts","storage","window","sessionStorage","onEnd","removeItem","delay","orphan","hooked_tour_from_data","data","_","each","steps","step","preclick","onShow","$","click","postclick","onHide","textinsert","onShown","element","val","trigger","TourItem","Backbone","Model","extend","urlRoot","Tours","Collection","url","model","giveTour","tour_id","getJSON","tourdata","setItem","JSON","stringify","tour","Tour","init","goTo","restart","ToursView","View","initialize","self","this","setElement","fetch","success","render","error","console","tpl","template","join","$el","html","tours","models","on","e","preventDefault"],"mappings":"AAUAA,QAAQ,uBAAuB,WAE3B,GAAIC,GAA6B,mBAAXC,QAAyB,IAAMA,OAAOC,KAExDC,GAAcC,QAASC,OAAOC,eAChBC,MAAO,WACHD,eAAeE,WAAW,qBAE9BC,MAAO,IACPC,QAAO,GAGrBC,EAAwB,SAASC,GA2BjC,MA1BAC,GAAEC,KAAKF,EAAKG,MAAO,SAASC,GACpBA,EAAKC,WACLD,EAAKE,OAAQ,WACTL,EAAEC,KAAKE,EAAKC,SAAU,SAASA,GAE3BE,EAAEF,GAAUG,YAIpBJ,EAAKK,YACLL,EAAKM,OAAS,WACVT,EAAEC,KAAKE,EAAKK,UAAW,SAASA,GAE5BF,EAAEE,GAAWD,YAIrBJ,EAAKO,aAILP,EAAKQ,QAAS,WACVL,EAAEH,EAAKS,SAASC,IAAIV,EAAKO,YAAYI,QAAQ,cAIlDf,GAGPgB,EAAWC,SAASC,MAAMC,QAC5BC,QAAShC,EAAW,cAGlBiC,EAAQJ,SAASK,WAAWH,QAC9BI,IAAMnC,EAAW,YACjBoC,MAAOR,IAILS,EAAY,SAASC,GACrB,GAAIH,GAAMnC,EAAW,aAAesC,CACpCnB,GAAEoB,QAASJ,EAAK,SAAUvB,GAEtB,GAAI4B,GAAW7B,EAAsBC,EACrCN,gBAAemC,QAAQ,mBAAoBC,KAAKC,UAAU/B,GAE1D,IAAIgC,GAAO,GAAIC,MAAKhC,EAAEkB,QAClBhB,MAAOyB,EAASzB,OACjBZ,GAEHyC,GAAKE,OACLF,EAAKG,KAAK,GACVH,EAAKI,aAGTC,EAAYpB,SAASqB,KAAKnB,QAE1BoB,WAAY,WACR,GAAIC,GAAOC,IACXA,MAAKC,WAAW,UAChBD,KAAKjB,MAAQ,GAAIH,GACjBoB,KAAKjB,MAAMmB,OACTC,QAAS,WACPJ,EAAKK,UAEPC,MAAO,WAELC,QAAQD,MAAM,8BAKtBD,OAAQ,WACJ,GAAIG,GAAM/C,EAAEgD,UACR,wBACA,uFACA,2FACA,OACA,uCACI,OACI,gFACI,yCACJ,OACA,mEACJ,QACJ,YACA,SAASC,KAAK,IAClBT,MAAKU,IAAIC,KAAKJ,GAAKK,MAAOZ,KAAKjB,MAAM8B,UAAUC,GAAG,QAAS,YAAa,SAASC,GAC7EA,EAAEC,iBACFhC,EAASlB,EAAEkC,MAAMzC,KAAK,gBAKlC,QAAQqC,UAAWA,EACXtC,sBAAuBA,EACvBR,UAAWA,EACXkC,SAAUA"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
define(["libs/bootstrap-tour"],function(){var a="undefined"==typeof Galaxy?"/":Galaxy.root,b={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},c=function(a){return _.each(a.steps,function(a){a.preclick&&(a.onShow=function(){_.each(a.preclick,function(a){$(a).click()})}),a.postclick&&(a.onHide=function(){_.each(a.postclick,function(a){$(a).click()})}),a.textinsert&&(a.onShown=function(){$(a.element).val(a.textinsert).trigger("change")})}),a},d=Backbone.Model.extend({urlRoot:a+"api/tours"}),e=Backbone.Collection.extend({url:a+"api/tours",model:d}),f=function(d){var e=a+"api/tours/"+d;$.getJSON(e,function(a){var d=c(a);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(a));var e=new Tour(_.extend({steps:d.steps},b));e.init(),e.goTo(0),e.restart()})},g=Backbone.View.extend({initialize:function(){var a=this;this.setElement("<div/>"),this.model=new e,this.model.fetch({success:function(){a.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var a=_.template(["<h2>Galaxy Tours</h2>","<p>This page presents a list of interactive tours available on this Galaxy server. ","Select any tour to get started (and remember, you can click 'End Tour' at any time).</p>","<ul>","<% _.each(tours, function(tour) { %>","<li>",'<a href="#/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>',"<%- tour.attributes.name || tour.id %>","</a>",' - <%- tour.attributes.description || "No description given." %>',"</li>","<% }); %>","</ul>"].join(""));this.$el.html(a({tours:this.model.models})).on("click",".tourItem",function(){f($(this).data("tour.id"))})}});return{ToursView:g,hooked_tour_from_data:c,tour_opts:b,giveTour:f}});
|
||||
define(["libs/bootstrap-tour"],function(){var a="undefined"==typeof Galaxy?"/":Galaxy.root,b={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},c=function(a){return _.each(a.steps,function(a){a.preclick&&(a.onShow=function(){_.each(a.preclick,function(a){$(a).click()})}),a.postclick&&(a.onHide=function(){_.each(a.postclick,function(a){$(a).click()})}),a.textinsert&&(a.onShown=function(){$(a.element).val(a.textinsert).trigger("change")})}),a},d=Backbone.Model.extend({urlRoot:a+"api/tours"}),e=Backbone.Collection.extend({url:a+"api/tours",model:d}),f=function(d){var e=a+"api/tours/"+d;$.getJSON(e,function(a){var d=c(a);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(a));var e=new Tour(_.extend({steps:d.steps},b));e.init(),e.goTo(0),e.restart()})},g=Backbone.View.extend({initialize:function(){var a=this;this.setElement("<div/>"),this.model=new e,this.model.fetch({success:function(){a.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var a=_.template(["<h2>Galaxy Tours</h2>","<p>This page presents a list of interactive tours available on this Galaxy server. ","Select any tour to get started (and remember, you can click 'End Tour' at any time).</p>","<ul>","<% _.each(tours, function(tour) { %>","<li>",'<a href="/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>',"<%- tour.attributes.name || tour.id %>","</a>",' - <%- tour.attributes.description || "No description given." %>',"</li>","<% }); %>","</ul>"].join(""));this.$el.html(a({tours:this.model.models})).on("click",".tourItem",function(a){a.preventDefault(),f($(this).data("tour.id"))})}});return{ToursView:g,hooked_tour_from_data:c,tour_opts:b,giveTour:f}});
|
||||
//# sourceMappingURL=../../maps/mvc/tours.js.map
|
||||
@@ -25,7 +25,7 @@
|
||||
tip_str = ''
|
||||
sharable_link_label = 'Link to this repository revision:'
|
||||
sharable_link_changeset_revision = changeset_revision
|
||||
|
||||
|
||||
if heads:
|
||||
multiple_heads = len( heads ) > 1
|
||||
else:
|
||||
@@ -119,8 +119,7 @@
|
||||
</div>
|
||||
%if repository.long_description:
|
||||
<div class="form-row">
|
||||
<p>${repository.long_description|h}</p>
|
||||
## ${render_long_description( to_html_string( repository.long_description ) )}
|
||||
${render_long_description( to_html_string( repository.long_description ) )}
|
||||
</div>
|
||||
%endif
|
||||
%if repository.homepage_url:
|
||||
|
||||
+4
-4
@@ -15,6 +15,10 @@ import sys
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
from json import loads
|
||||
|
||||
import nose
|
||||
from paste import httpserver
|
||||
|
||||
galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, os.path.pardir))
|
||||
sys.path[1:1] = [ os.path.join( galaxy_root, "scripts" ),
|
||||
@@ -22,15 +26,11 @@ sys.path[1:1] = [ os.path.join( galaxy_root, "scripts" ),
|
||||
os.path.join( galaxy_root, 'test' ),
|
||||
os.path.join( galaxy_root, 'scripts', 'api' ) ]
|
||||
|
||||
import nose
|
||||
from paste import httpserver
|
||||
|
||||
import install_and_test_tool_shed_repositories.base.util as install_and_test_base_util
|
||||
from base.tool_shed_util import parse_tool_panel_config
|
||||
from functional import database_contexts
|
||||
from functional_tests import generate_config_file
|
||||
from galaxy.app import UniverseApplication
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.util import asbool
|
||||
from galaxy.web import buildapp
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import tarfile
|
||||
import tempfile
|
||||
import time
|
||||
import urllib
|
||||
from json import loads
|
||||
|
||||
import twill.commands as tc
|
||||
from mercurial import commands, hg, ui
|
||||
@@ -17,7 +18,6 @@ import galaxy.util
|
||||
import galaxy.webapps.tool_shed.util.hgweb_config
|
||||
from base.tool_shed_util import repository_installation_timeout
|
||||
from base.twilltestcase import TwillTestCase
|
||||
from galaxy.util.json import loads
|
||||
from galaxy.web import security
|
||||
from tool_shed.util import hg_util, xml_util
|
||||
from tool_shed.util.encoding_util import tool_shed_encode
|
||||
|
||||
@@ -12,13 +12,13 @@ import sys
|
||||
import tempfile
|
||||
import urllib
|
||||
import zipfile
|
||||
from json import dumps, loads
|
||||
|
||||
from galaxy import util
|
||||
from galaxy.datatypes import sniff
|
||||
from galaxy.datatypes.binary import Binary
|
||||
from galaxy.datatypes.registry import Registry
|
||||
from galaxy.datatypes.util.image_util import get_image_ext
|
||||
from galaxy.util.json import dumps, loads
|
||||
from galaxy.util import multi_byte
|
||||
from galaxy.util.checkers import check_binary, check_bz2, check_gzip, check_html, check_image, check_zip
|
||||
|
||||
|
||||
Reference in New Issue
Block a user