commit/galaxy-central: inithello: Display an error message when cookies are blocked between the tool shed and galaxy.
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c6503a2cc9a4/
changeset: c6503a2cc9a4
user: inithello
date: 2013-03-20 14:33:34
summary: Display an error message when cookies are blocked between the tool shed and galaxy.
affected #: 2 files
diff -r 254f3e344235d8446adf5902d2e90567f5c34d6b -r c6503a2cc9a477f28337de575ce77e24ccb781d9 lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -317,9 +317,9 @@
@web.expose
def browse_valid_categories( self, trans, **kwd ):
# The request came from Galaxy, so restrict category links to display only valid repository changeset revisions.
- galaxy_url = kwd.get( 'galaxy_url', None )
+ galaxy_url = suc.handle_galaxy_url( trans, **kwd )
if galaxy_url:
- trans.set_cookie( galaxy_url, name='toolshedgalaxyurl' )
+ kwd[ 'galaxy_url' ] = galaxy_url
if 'f-free-text-search' in kwd:
if kwd[ 'f-free-text-search' ] == 'All':
# The user performed a search, then clicked the "x" to eliminate the search criteria.
@@ -346,11 +346,14 @@
return trans.response.send_redirect( web.url_for( controller='repository',
action='browse_valid_repositories',
**kwd ) )
+ log.debug("CCC In browse_valid_categories, just before returning valid_category_grid, kwd: %s" % str( kwd ))
return self.valid_category_grid( trans, **kwd )
@web.expose
def browse_valid_repositories( self, trans, **kwd ):
- galaxy_url = kwd.get( 'galaxy_url', None )
+ galaxy_url = suc.handle_galaxy_url( trans, **kwd )
+ if galaxy_url:
+ kwd[ 'galaxy_url' ] = galaxy_url
repository_id = kwd.get( 'id', None )
if 'f-free-text-search' in kwd:
if 'f-Category.name' in kwd:
@@ -359,8 +362,6 @@
category = suc.get_category_by_name( trans, category_name )
# Set the id value in kwd since it is required by the ValidRepositoryGrid.build_initial_query method.
kwd[ 'id' ] = trans.security.encode_id( category.id )
- if galaxy_url:
- trans.set_cookie( galaxy_url, name='toolshedgalaxyurl' )
if 'operation' in kwd:
operation = kwd[ 'operation' ].lower()
if operation == "preview_tools_in_changeset":
@@ -423,7 +424,7 @@
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
# If the request originated with the UpdateManager, it will not include a galaxy_url.
- galaxy_url = kwd.get( 'galaxy_url', '' )
+ galaxy_url = suc.handle_galaxy_url( trans, **kwd )
name = params.get( 'name', None )
owner = params.get( 'owner', None )
changeset_revision = params.get( 'changeset_revision', None )
@@ -437,11 +438,14 @@
if from_update_manager:
update = 'true'
no_update = 'false'
- else:
+ elif galaxy_url:
# Start building up the url to redirect back to the calling Galaxy instance.
url = suc.url_join( galaxy_url,
'admin_toolshed/update_to_changeset_revision?tool_shed_url=%s&name=%s&owner=%s&changeset_revision=%s&latest_changeset_revision=' % \
( web.url_for( '/', qualified=True ), repository.name, repository.user.username, changeset_revision ) )
+ else:
+ message = 'Unable to check for updates due to an invalid Galaxy URL: <b>%s</b>. You may need to enable cookies in your browser. ' % galaxy_url
+ return trans.show_error_message( message )
if changeset_revision == repository.tip( trans.app ):
# If changeset_revision is the repository tip, there are no additional updates.
if from_update_manager:
@@ -746,9 +750,7 @@
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
- galaxy_url = kwd.get( 'galaxy_url', None )
- if galaxy_url:
- trans.set_cookie( galaxy_url, name='toolshedgalaxyurl' )
+ galaxy_url = suc.handle_galaxy_url( trans, **kwd )
if 'operation' in kwd:
item_id = kwd.get( 'id', '' )
if item_id:
@@ -833,9 +835,7 @@
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
- galaxy_url = kwd.get( 'galaxy_url', None )
- if galaxy_url:
- trans.set_cookie( galaxy_url, name='toolshedgalaxyurl' )
+ galaxy_url = suc.handle_galaxy_url( trans, **kwd )
if 'operation' in kwd:
item_id = kwd.get( 'id', '' )
if item_id:
@@ -952,7 +952,6 @@
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
- galaxy_url = kwd.get( 'galaxy_url', '' )
name = params.get( 'name', None )
owner = params.get( 'owner', None )
changeset_revision = params.get( 'changeset_revision', None )
@@ -1443,18 +1442,23 @@
changeset_revisions = kwd.get( 'changeset_revisions', None )
name = kwd.get( 'name', None )
owner = kwd.get( 'owner', None )
- galaxy_url = kwd.get( 'galaxy_url', None )
if not repository_ids:
repository = suc.get_repository_by_name_and_owner( trans.app, name, owner )
repository_ids = trans.security.encode_id( repository.id )
- if not galaxy_url:
- # If galaxy_url is not in the request, it had to have been stored in a cookie by the tool shed.
- galaxy_url = trans.get_cookie( name='toolshedgalaxyurl' )
- # Redirect back to local Galaxy to perform install.
- url = suc.url_join( galaxy_url,
- 'admin_toolshed/prepare_for_install?tool_shed_url=%s&repository_ids=%s&changeset_revisions=%s' % \
- ( web.url_for( '/', qualified=True ), ','.join( util.listify( repository_ids ) ), ','.join( util.listify( changeset_revisions ) ) ) )
- return trans.response.send_redirect( url )
+ galaxy_url = suc.handle_galaxy_url( trans, **kwd )
+ if galaxy_url:
+ # Redirect back to local Galaxy to perform install.
+ url = suc.url_join( galaxy_url,
+ 'admin_toolshed/prepare_for_install?tool_shed_url=%s&repository_ids=%s&changeset_revisions=%s' % \
+ ( web.url_for( '/', qualified=True ), ','.join( util.listify( repository_ids ) ), ','.join( util.listify( changeset_revisions ) ) ) )
+ return trans.response.send_redirect( url )
+ else:
+ message = 'Repository installation is not possible due to an invalid Galaxy URL: <b>%s</b>. You may need to enable cookies in your browser. ' % galaxy_url
+ status = 'error'
+ return trans.response.send_redirect( web.url_for( controller='repository',
+ action='browse_valid_categories',
+ message=message,
+ status=status ) )
@web.expose
def load_invalid_tool( self, trans, repository_id, tool_config, changeset_revision, **kwd ):
@@ -1854,8 +1858,6 @@
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
- # If the request originated with the UpdateManager, it will not include a galaxy_url.
- galaxy_url = kwd.get( 'galaxy_url', '' )
name = params.get( 'name', None )
owner = params.get( 'owner', None )
changeset_revision = params.get( 'changeset_revision', None )
diff -r 254f3e344235d8446adf5902d2e90567f5c34d6b -r c6503a2cc9a477f28337de575ce77e24ccb781d9 lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -116,6 +116,7 @@
return False
def changeset_is_valid( app, repository, changeset_revision ):
+ """Make sure a changeset hash is valid for a specified repository."""
repo = hg.repository( get_configured_ui(), repository.repo_path( app ) )
for changeset in repo.changelog:
changeset_hash = str( repo.changectx( changeset ) )
@@ -124,6 +125,7 @@
return False
def clean_repository_clone_url( repository_clone_url ):
+ """Return a URL that can be used to clone a tool shed repository, eliminating the protocol and user if either exists."""
if repository_clone_url.find( '@' ) > 0:
# We have an url that includes an authenticated user, something like:
# http://test@bx.psu.edu:9009/repos/some_username/column
@@ -139,6 +141,7 @@
return tmp_url
def clean_tool_shed_url( tool_shed_url ):
+ """Return a tool shed URL, eliminating the port if it exists."""
if tool_shed_url.find( ':' ) > 0:
# Eliminate the port, if any, since it will result in an invalid directory name.
return tool_shed_url.split( ':' )[ 0 ]
@@ -186,6 +189,10 @@
def create_or_update_tool_shed_repository( app, name, description, installed_changeset_revision, ctx_rev, repository_clone_url, metadata_dict,
status, current_changeset_revision=None, owner='', dist_to_shed=False ):
+ """
+ Update a tool shed repository record i the Galaxy database with the new information received. If a record defined by the received tool shed, repository name
+ and owner does not exists, create a new record with the received information.
+ """
# The received value for dist_to_shed will be True if the InstallManager is installing a repository that contains tools or datatypes that used
# to be in the Galaxy distribution, but have been moved to the main Galaxy tool shed.
log.debug( "Adding new row (or updating an existing row) for repository '%s' in the tool_shed_repository table." % name )
@@ -272,6 +279,7 @@
return sharable_url
def generate_tool_elem( tool_shed, repository_name, changeset_revision, owner, tool_file_path, tool, tool_section ):
+ """Create and return an ElementTree tool Element."""
if tool_section is not None:
tool_elem = SubElement( tool_section, 'tool' )
else:
@@ -429,6 +437,7 @@
return _ui
def get_ctx_rev( tool_shed_url, name, owner, changeset_revision ):
+ """Send a request to the tool shed to retrieve the ctx_rev for a repository defined by the combination of a name, owner and changeset revision."""
url = url_join( tool_shed_url, 'repository/get_ctx_rev?name=%s&owner=%s&changeset_revision=%s' % ( name, owner, changeset_revision ) )
response = urllib2.urlopen( url )
ctx_rev = response.read()
@@ -448,6 +457,7 @@
return None, None
def get_file_context_from_ctx( ctx, filename ):
+ """Return the mercurial file context for a specified file."""
# We have to be careful in determining if we found the correct file because multiple files with the same name may be in different directories
# within ctx if the files were moved within the change set. For example, in the following ctx.files() list, the former may have been moved to
# the latter: ['tmap_wrapper_0.0.19/tool_data_table_conf.xml.sample', 'tmap_wrapper_0.3.3/tool_data_table_conf.xml.sample']. Another scenario
@@ -473,6 +483,7 @@
return trans.sa_session.query( trans.model.ToolShedRepository ).get( trans.security.decode_id( id ) )
def get_named_tmpfile_from_ctx( ctx, filename, dir ):
+ """Return a named temporary file created from a specified file with a given name included in a repository changeset revision."""
filename = strip_path( filename )
for ctx_file in ctx.files():
ctx_file_name = strip_path( ctx_file )
@@ -958,6 +969,14 @@
except Exception, e:
log.exception( "An error occurred sending a tool shed repository update alert by email." )
+def handle_galaxy_url( trans, **kwd ):
+ galaxy_url = kwd.get( 'galaxy_url', None )
+ if galaxy_url:
+ trans.set_cookie( galaxy_url, name='toolshedgalaxyurl' )
+ else:
+ galaxy_url = trans.get_cookie( name='toolshedgalaxyurl' )
+ return galaxy_url
+
def open_repository_files_folder( trans, folder_path ):
"""Return a list of dictionaries, each of which contains information for a file or directory contained within a directory in a repository file hierarchy."""
try:
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.
9 years, 10 months
commit/galaxy-central: inithello: Add option to specify extra tool data for the automated install and test framework.
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/254f3e344235/
changeset: 254f3e344235
user: inithello
date: 2013-03-19 21:59:27
summary: Add option to specify extra tool data for the automated install and test framework.
affected #: 1 file
diff -r 2d8fcb2f456caaee4ff804ea4a01893a8a3accae -r 254f3e344235d8446adf5902d2e90567f5c34d6b 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
@@ -98,6 +98,15 @@
</toolbox>
'''
+# If we have a tool_data_table_conf.test.xml, set it up to be loaded when the UniverseApplication is started.
+# This allows one to specify a set of tool data that is used exclusively for testing, and not loaded into any
+# Galaxy instance. By default, this will be in the test-data-repo/location directory generated by buildbot_setup.sh.
+if os.path.exists( 'tool_data_table_conf.test.xml' ):
+ additional_tool_data_tables = 'tool_data_table_conf.test.xml'
+ additional_tool_data_path = os.environ.get( 'GALAXY_INSTALL_TEST_EXTRA_TOOL_DATA_PATH', os.path.join( 'test-data-repo', 'location' ) )
+else:
+ additional_tool_data_tables = None
+ additional_tool_data_path = None
# And set up a blank tool_data_table_conf.xml and shed_tool_data_table_conf.xml.
tool_data_table_conf_xml_template = '''<?xml version="1.0"?><tables>
@@ -463,6 +472,12 @@
log.info( "The embedded Galaxy application is running on %s:%s" % ( galaxy_test_host, galaxy_test_port ) )
log.info( "Repositories will be installed from the tool shed at %s" % galaxy_tool_shed_url )
success = False
+ # If a tool_data_table_conf.test.xml file was found, add the entries from it into the app's tool data tables.
+ if additional_tool_data_tables:
+ app.tool_data_tables.add_new_entries_from_config_file( config_filename=additional_tool_data_tables,
+ tool_data_path=additional_tool_data_path,
+ shed_tool_data_table_config=None,
+ persist=False )
# Initialize some variables for the summary that will be printed to stdout.
repositories_tested = 0
repositories_passed = []
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.
9 years, 10 months
commit/galaxy-central: inithello: Add missing import in upload controller.
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c92d41cb7144/
changeset: c92d41cb7144
branch: next-stable
user: inithello
date: 2013-03-19 17:26:33
summary: Add missing import in upload controller.
affected #: 1 file
diff -r 6d5efc862967ffe5b520a3c6eccdb7549ca01171 -r c92d41cb71440de8564112e6e89a75598388268c lib/galaxy/webapps/tool_shed/controllers/upload.py
--- a/lib/galaxy/webapps/tool_shed/controllers/upload.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/upload.py
@@ -2,6 +2,8 @@
from galaxy.web.base.controller import BaseUIController
from galaxy import web, util
from galaxy.datatypes import checkers
+from galaxy.util import json
+
import tool_shed.util.shed_util_common as suc
from tool_shed.util import metadata_util, repository_dependency_util, tool_dependency_util, tool_util
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.
9 years, 10 months
commit/galaxy-central: inithello: Add missing import in upload controller.
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/2d8fcb2f456c/
changeset: 2d8fcb2f456c
user: inithello
date: 2013-03-19 17:26:33
summary: Add missing import in upload controller.
affected #: 1 file
diff -r e409e7af84be829a91e630d983ec7009b20907bc -r 2d8fcb2f456caaee4ff804ea4a01893a8a3accae lib/galaxy/webapps/tool_shed/controllers/upload.py
--- a/lib/galaxy/webapps/tool_shed/controllers/upload.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/upload.py
@@ -2,6 +2,8 @@
from galaxy.web.base.controller import BaseUIController
from galaxy import web, util
from galaxy.datatypes import checkers
+from galaxy.util import json
+
import tool_shed.util.shed_util_common as suc
from tool_shed.util import metadata_util, repository_dependency_util, tool_dependency_util, tool_util
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.
9 years, 10 months
commit/galaxy-central: guerler: Fix tool tip for compute quality statistics
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/e409e7af84be/
changeset: e409e7af84be
user: guerler
date: 2013-03-19 17:04:24
summary: Fix tool tip for compute quality statistics
affected #: 1 file
diff -r 9b74ad2ccd683258bd1e0f6ed282118f6f55bb15 -r e409e7af84be829a91e630d983ec7009b20907bc tools/solid_tools/solid_qual_stats.xml
--- a/tools/solid_tools/solid_qual_stats.xml
+++ b/tools/solid_tools/solid_qual_stats.xml
@@ -23,7 +23,7 @@
.. class:: infomark
-**TIP:** This statistics report can be used as input for **Quality Boxplot for SOLiD data** tool.
+**TIP:** This statistics report can be used as input for **Quality Boxplot for SOLiD data** and **Nucleotides Distribution** tool.
-----
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.
9 years, 10 months
commit/galaxy-central: guerler: tool tip fix for fastq summary and sorter
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/9b74ad2ccd68/
changeset: 9b74ad2ccd68
user: guerler
date: 2013-03-19 16:50:03
summary: tool tip fix for fastq summary and sorter
affected #: 2 files
diff -r a9cd08b97ec0e4a65f5d2ab62f6bff2599765cfb -r 9b74ad2ccd683258bd1e0f6ed282118f6f55bb15 tools/fastq/fastq_stats.xml
--- a/tools/fastq/fastq_stats.xml
+++ b/tools/fastq/fastq_stats.xml
@@ -18,7 +18,7 @@
.. class:: infomark
-**TIP:** This statistics report can be used as input for the **Boxplot** and **Nucleotides Distribution** tools.
+**TIP:** This statistics report can be used as input for the **Boxplot** tools.
-----
diff -r a9cd08b97ec0e4a65f5d2ab62f6bff2599765cfb -r 9b74ad2ccd683258bd1e0f6ed282118f6f55bb15 tools/filters/sorter.xml
--- a/tools/filters/sorter.xml
+++ b/tools/filters/sorter.xml
@@ -65,69 +65,67 @@
</test></tests><help>
+.. class:: infomark
- .. class:: infomark
+**TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
- **TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
+-----
+
+**Syntax**
+
+This tool sorts the dataset on any number of columns in either ascending or descending order.
+
+* Numerical sort orders numbers by their magnitude, ignores all characters besides numbers, and evaluates a string of numbers to the value they signify.
+* Alphabetical sort is a phonebook type sort based on the conventional order of letters in an alphabet. Each nth letter is compared with the nth letter of other words in the list, starting at the first letter of each word and advancing to the second, third, fourth, and so on, until the order is established. Therefore, in an alphabetical sort, 2 comes after 100 (1 < 2).
- -----
-
- **Syntax**
-
- This tool sorts the dataset on any number of columns in either ascending or descending order.
-
- * Numerical sort orders numbers by their magnitude, ignores all characters besides numbers, and evaluates a string of numbers to the value they signify.
- * Alphabetical sort is a phonebook type sort based on the conventional order of letters in an alphabet. Each nth letter is compared with the nth letter of other words in the list, starting at the first letter of each word and advancing to the second, third, fourth, and so on, until the order is established. Therefore, in an alphabetical sort, 2 comes after 100 (1 < 2).
-
- -----
-
- **Examples**
-
- The list of numbers 4,17,3,5 collates to 3,4,5,17 by numerical sorting, while it collates to 17,3,4,5 by alphabetical sorting.
-
- Sorting the following::
-
- Q d 7 II jhu 45
- A kk 4 I h 111
- Pd p 1 ktY WS 113
- A g 10 H ZZ 856
- A edf 4 tw b 234
- BBB rt 10 H ZZ 100
- A rew 10 d b 1111
- C sd 19 YH aa 10
- Hah c 23 ver bb 467
- MN gtr 1 a X 32
- N j 9 a T 205
- BBB rrf 10 b Z 134
- odfr ws 6 Weg dew 201
- C f 3 WW SW 34
- A jhg 4 I b 345
- Pd gf 7 Gthe de 567
- rS hty 90 YY LOp 89
- A g 10 H h 43
- A g 4 I h 500
-
- on columns 1 (alpha), 3 (num), and 6 (num) in ascending order will yield::
-
- A kk 4 I h 111
- A edf 4 tw b 234
- A jhg 4 I b 345
- A g 4 I h 500
- A g 10 H h 43
- A g 10 H ZZ 856
- A rew 10 d b 1111
- BBB rt 10 H ZZ 100
- BBB rrf 10 b Z 134
- C f 3 WW SW 34
- C sd 19 YH aa 10
- Hah c 23 ver bb 467
- MN gtr 1 a X 32
- N j 9 a T 205
- odfr ws 6 Weg dew 201
- Pd p 1 ktY WS 113
- Pd gf 7 Gthe de 567
- Q d 7 II jhu 45
- rS hty 90 YY LOp 89
-
+-----
+
+**Examples**
+
+The list of numbers 4,17,3,5 collates to 3,4,5,17 by numerical sorting, while it collates to 17,3,4,5 by alphabetical sorting.
+
+Sorting the following::
+
+ Q d 7 II jhu 45
+ A kk 4 I h 111
+ Pd p 1 ktY WS 113
+ A g 10 H ZZ 856
+ A edf 4 tw b 234
+ BBB rt 10 H ZZ 100
+ A rew 10 d b 1111
+ C sd 19 YH aa 10
+ Hah c 23 ver bb 467
+ MN gtr 1 a X 32
+ N j 9 a T 205
+ BBB rrf 10 b Z 134
+ odfr ws 6 Weg dew 201
+ C f 3 WW SW 34
+ A jhg 4 I b 345
+ Pd gf 7 Gthe de 567
+ rS hty 90 YY LOp 89
+ A g 10 H h 43
+ A g 4 I h 500
+
+on columns 1 (alpha), 3 (num), and 6 (num) in ascending order will yield::
+
+ A kk 4 I h 111
+ A edf 4 tw b 234
+ A jhg 4 I b 345
+ A g 4 I h 500
+ A g 10 H h 43
+ A g 10 H ZZ 856
+ A rew 10 d b 1111
+ BBB rt 10 H ZZ 100
+ BBB rrf 10 b Z 134
+ C f 3 WW SW 34
+ C sd 19 YH aa 10
+ Hah c 23 ver bb 467
+ MN gtr 1 a X 32
+ N j 9 a T 205
+ odfr ws 6 Weg dew 201
+ Pd p 1 ktY WS 113
+ Pd gf 7 Gthe de 567
+ Q d 7 II jhu 45
+ rS hty 90 YY LOp 89
</help></tool>
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.
9 years, 10 months
commit/galaxy-central: 2 new changesets
by commits-noreply@bitbucket.org
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a9cd08b97ec0/
changeset: a9cd08b97ec0
user: inithello
date: 2013-03-19 15:56:35
summary: Remove reference to shed_util_common in remove_tool_dependency method.
affected #: 1 file
diff -r 5bfe49c7983310e13f0cc8bc5857ff39da6936a5 -r a9cd08b97ec0e4a65f5d2ab62f6bff2599765cfb lib/tool_shed/util/tool_dependency_util.py
--- a/lib/tool_shed/util/tool_dependency_util.py
+++ b/lib/tool_shed/util/tool_dependency_util.py
@@ -319,7 +319,7 @@
def remove_tool_dependency( trans, tool_dependency ):
dependency_install_dir = tool_dependency.installation_directory( trans.app )
- removed, error_message = suc.remove_tool_dependency_installation_directory( dependency_install_dir )
+ removed, error_message = remove_tool_dependency_installation_directory( dependency_install_dir )
if removed:
tool_dependency.status = trans.model.ToolDependency.installation_status.UNINSTALLED
tool_dependency.error_message = None
https://bitbucket.org/galaxy/galaxy-central/commits/6d5efc862967/
changeset: 6d5efc862967
branch: next-stable
user: inithello
date: 2013-03-19 15:56:35
summary: Remove reference to shed_util_common in remove_tool_dependency method.
affected #: 1 file
diff -r f1f1d36479082ab77ac5cf67832f09cbbf70c65a -r 6d5efc862967ffe5b520a3c6eccdb7549ca01171 lib/tool_shed/util/tool_dependency_util.py
--- a/lib/tool_shed/util/tool_dependency_util.py
+++ b/lib/tool_shed/util/tool_dependency_util.py
@@ -319,7 +319,7 @@
def remove_tool_dependency( trans, tool_dependency ):
dependency_install_dir = tool_dependency.installation_directory( trans.app )
- removed, error_message = suc.remove_tool_dependency_installation_directory( dependency_install_dir )
+ removed, error_message = remove_tool_dependency_installation_directory( dependency_install_dir )
if removed:
tool_dependency.status = trans.model.ToolDependency.installation_status.UNINSTALLED
tool_dependency.error_message = None
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.
9 years, 10 months
commit/galaxy-central: carlfeberhard: upload: dont refresh history panel from upload_async_message as tool_executed.mako will already do this.
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5bfe49c79833/
changeset: 5bfe49c79833
user: carlfeberhard
date: 2013-03-18 22:46:21
summary: upload: dont refresh history panel from upload_async_message as tool_executed.mako will already do this.
affected #: 1 file
diff -r ef7f32032b55995657d15af8b173613461dd49af -r 5bfe49c7983310e13f0cc8bc5857ff39da6936a5 lib/galaxy/webapps/galaxy/controllers/tool_runner.py
--- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py
+++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py
@@ -312,4 +312,4 @@
<p><b>Please do not use your browser\'s "stop" or "reload" buttons until the upload is complete, or it may be interrupted.</b></p><p>You may safely continue to use Galaxy while the upload is in progress. Using "stop" and "reload" on pages other than Galaxy is also safe.</p>
"""
- return trans.show_message( msg, refresh_frames='history' )
+ return trans.show_message( msg )
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.
9 years, 10 months
commit/galaxy-central: 3 new changesets
by commits-noreply@bitbucket.org
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/579c0b64e463/
changeset: 579c0b64e463
user: jgoecks
date: 2013-03-18 22:17:14
summary: When possible, move HDA attribute addition from controller method down to model.
affected #: 2 files
diff -r a7bd59964f5053133897e6e7b89065a608e11d03 -r 579c0b64e463918691bb38e718af8d70dd6f9fa7 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1516,6 +1516,11 @@
# other model classes.
hda = self
rval = dict( id = hda.id,
+ uuid = ( lambda uuid: str( uuid ) if uuid else None )( hda.dataset.uuid ),
+ history_id = hda.history.id,
+ hid = hda.hid,
+ file_ext = hda.ext,
+ peek = ( lambda hda: hda.display_peek() if hda.peek and hda.peek != 'no peek' else None )( hda ),
model_class = self.__class__.__name__,
name = hda.name,
deleted = hda.deleted,
diff -r a7bd59964f5053133897e6e7b89065a608e11d03 -r 579c0b64e463918691bb38e718af8d70dd6f9fa7 lib/galaxy/webapps/galaxy/api/history_contents.py
--- a/lib/galaxy/webapps/galaxy/api/history_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/history_contents.py
@@ -195,20 +195,16 @@
return "Not implemented."
-#TODO: move these into model
def get_hda_dict( trans, history, hda, for_editing ):
hda_dict = hda.get_api_value( view='element' )
- hda_dict[ 'id' ] = trans.security.encode_id( hda.id )
- hda_dict[ 'history_id' ] = trans.security.encode_id( history.id )
- hda_dict[ 'hid' ] = hda.hid
-
- hda_dict[ 'file_ext' ] = hda.ext
+ # Add additional attributes that depend on trans can hence must be added here rather than at the model level.
if trans.user_is_admin() or trans.app.config.expose_dataset_path:
hda_dict[ 'file_name' ] = hda.file_name
if not hda_dict[ 'deleted' ]:
- hda_dict[ 'download_url' ] = url_for( 'history_contents_display', history_id = trans.security.encode_id( history.id ), history_content_id = trans.security.encode_id( hda.id ) )
+ hda_dict[ 'download_url' ] = url_for( 'history_contents_display', history_id = trans.security.encode_id( history.id ),
+ history_content_id = trans.security.encode_id( hda.id ) )
can_access_hda = trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset )
hda_dict[ 'accessible' ] = ( trans.user_is_admin() or can_access_hda )
@@ -224,22 +220,14 @@
hda_dict[ 'display_apps' ] = get_display_apps( trans, hda )
hda_dict[ 'display_types' ] = get_old_display_applications( trans, hda )
-
- if hda.dataset.uuid is None:
- hda_dict['uuid'] = None
- else:
- hda_dict['uuid'] = str(hda.dataset.uuid)
-
hda_dict[ 'visualizations' ] = hda.get_visualizations()
- if hda.peek and hda.peek != 'no peek':
- hda_dict[ 'peek' ] = to_unicode( hda.display_peek() )
if hda.creating_job and hda.creating_job.tool_id:
tool_used = trans.app.toolbox.get_tool( hda.creating_job.tool_id )
if tool_used and tool_used.force_history_refresh:
hda_dict[ 'force_history_refresh' ] = True
- return hda_dict
+ return trans.security.encode_dict_ids( hda_dict )
def get_display_apps( trans, hda ):
#TODO: make more straightforward (somehow)
https://bitbucket.org/galaxy/galaxy-central/commits/c39687f63b9a/
changeset: c39687f63b9a
user: jgoecks
date: 2013-03-18 22:18:31
summary: Remove unused parameter.
affected #: 1 file
diff -r 579c0b64e463918691bb38e718af8d70dd6f9fa7 -r c39687f63b9afb75c56102ec89431997a586a656 lib/galaxy/webapps/galaxy/api/history_contents.py
--- a/lib/galaxy/webapps/galaxy/api/history_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/history_contents.py
@@ -67,7 +67,7 @@
if encoded_hda_id in ids:
#TODO: share code with show
try:
- rval.append( get_hda_dict( trans, history, hda, for_editing=True ) )
+ rval.append( get_hda_dict( trans, history, hda ) )
except Exception, exc:
# don't fail entire list if hda err's, record and move on
@@ -149,7 +149,7 @@
hda = self.get_history_dataset_association( trans, history, id,
check_ownership=True, check_accessible=True )
- hda_dict = get_hda_dict( trans, history, hda, for_editing=True )
+ hda_dict = get_hda_dict( trans, history, hda )
except Exception, e:
msg = "Error in history API at listing dataset: %s" % ( str(e) )
@@ -195,7 +195,7 @@
return "Not implemented."
-def get_hda_dict( trans, history, hda, for_editing ):
+def get_hda_dict( trans, history, hda ):
hda_dict = hda.get_api_value( view='element' )
# Add additional attributes that depend on trans can hence must be added here rather than at the model level.
https://bitbucket.org/galaxy/galaxy-central/commits/ef7f32032b55/
changeset: ef7f32032b55
user: jgoecks
date: 2013-03-18 22:38:31
summary: Move get_hda_dict and associated methods from history_contents controller to HDA mixin. Use get_hda_dict in datasets controller; this unifies the dataset dictionary returns by API controllers.
affected #: 3 files
diff -r c39687f63b9afb75c56102ec89431997a586a656 -r ef7f32032b55995657d15af8b173613461dd49af lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -6,12 +6,16 @@
import os
import re
import pkg_resources
+import urllib
pkg_resources.require("SQLAlchemy >= 0.4")
+pkg_resources.require( "Routes" )
+import routes
from sqlalchemy import func, and_, select
from paste.httpexceptions import HTTPBadRequest, HTTPInternalServerError, HTTPNotImplemented, HTTPRequestRangeNotSatisfiable
from galaxy import util, web
+from gettext import gettext
from galaxy.datatypes.interval import ChromatinInteractions
from galaxy.exceptions import ItemAccessibilityException, ItemDeletionException, ItemOwnershipException, MessageException
from galaxy.security.validate_user_input import validate_publicname
@@ -25,6 +29,11 @@
from galaxy.datatypes.data import Text
+from galaxy.datatypes.display_applications import util as da_util
+from galaxy.datatypes.metadata import FileParameter
+
+from galaxy.datatypes.display_applications.link_generator import get_display_app_link_generator
+
log = logging.getLogger( __name__ )
# States for passing messages
@@ -322,6 +331,85 @@
return dataset.conversion_messages.PENDING
return None
+ def get_hda_dict( self, trans, hda ):
+ hda_dict = hda.get_api_value( view='element' )
+ history = hda.history
+
+ # Add additional attributes that depend on trans can hence must be added here rather than at the model level.
+ if trans.user_is_admin() or trans.app.config.expose_dataset_path:
+ hda_dict[ 'file_name' ] = hda.file_name
+
+ if not hda_dict[ 'deleted' ]:
+ hda_dict[ 'download_url' ] = url_for( 'history_contents_display', history_id = trans.security.encode_id( history.id ),
+ history_content_id = trans.security.encode_id( hda.id ) )
+
+ can_access_hda = trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset )
+ hda_dict[ 'accessible' ] = ( trans.user_is_admin() or can_access_hda )
+ hda_dict[ 'api_type' ] = "file"
+
+ if not( hda.purged or hda.deleted or hda.dataset.purged ):
+ meta_files = []
+ for meta_type in hda.metadata.spec.keys():
+ if isinstance( hda.metadata.spec[ meta_type ].param, FileParameter ):
+ meta_files.append( dict( file_type=meta_type ) )
+ if meta_files:
+ hda_dict[ 'meta_files' ] = meta_files
+
+ hda_dict[ 'display_apps' ] = self.get_display_apps( trans, hda )
+ hda_dict[ 'display_types' ] = self.get_old_display_applications( trans, hda )
+ hda_dict[ 'visualizations' ] = hda.get_visualizations()
+
+ if hda.creating_job and hda.creating_job.tool_id:
+ tool_used = trans.app.toolbox.get_tool( hda.creating_job.tool_id )
+ if tool_used and tool_used.force_history_refresh:
+ hda_dict[ 'force_history_refresh' ] = True
+
+ return trans.security.encode_dict_ids( hda_dict )
+
+ def get_display_apps( self, trans, hda ):
+ #TODO: make more straightforward (somehow)
+ display_apps = []
+
+ def get_display_app_url( display_app_link, hda, trans ):
+ web_url_for = routes.URLGenerator( trans.webapp.mapper, trans.environ )
+ dataset_hash, user_hash = da_util.encode_dataset_user( trans, hda, None )
+ return web_url_for( controller='dataset',
+ action="display_application",
+ dataset_id=dataset_hash,
+ user_id=user_hash,
+ app_name=urllib.quote_plus( display_app_link.display_application.id ),
+ link_name=urllib.quote_plus( display_app_link.id ) )
+
+ for display_app in hda.get_display_applications( trans ).itervalues():
+ app_links = []
+ for display_app_link in display_app.links.itervalues():
+ app_links.append({
+ 'target' : display_app_link.url.get( 'target_frame', '_blank' ),
+ 'href' : get_display_app_url( display_app_link, hda, trans ),
+ 'text' : gettext( display_app_link.name )
+ })
+ display_apps.append( dict( label=display_app.name, links=app_links ) )
+
+ return display_apps
+
+ def get_old_display_applications( self, trans, hda ):
+ display_apps = []
+ for display_app_name in hda.datatype.get_display_types():
+ link_generator = get_display_app_link_generator( display_app_name )
+ display_links = link_generator.generate_links( trans, hda )
+
+ app_links = []
+ for display_name, display_link in display_links:
+ app_links.append({
+ 'target' : '_blank',
+ 'href' : display_link,
+ 'text' : display_name
+ })
+ if app_links:
+ display_apps.append( dict( label=hda.datatype.get_display_label( display_app_name ), links=app_links ) )
+
+ return display_apps
+
class UsesLibraryMixin:
diff -r c39687f63b9afb75c56102ec89431997a586a656 -r ef7f32032b55995657d15af8b173613461dd49af lib/galaxy/webapps/galaxy/api/datasets.py
--- a/lib/galaxy/webapps/galaxy/api/datasets.py
+++ b/lib/galaxy/webapps/galaxy/api/datasets.py
@@ -50,8 +50,11 @@
elif data_type == 'genome_data':
rval = self._get_genome_data( trans, dataset, kwd.get('dbkey', None) )
else:
- # Default: return dataset as API value.
- rval = dataset.get_api_value()
+ # Default: return dataset as dict.
+ if hda_ldda == 'hda':
+ rval = self.get_hda_dict( trans, dataset )
+ else:
+ rval = dataset.get_api_value()
except Exception, e:
rval = "Error in dataset API at listing contents: " + str( e )
diff -r c39687f63b9afb75c56102ec89431997a586a656 -r ef7f32032b55995657d15af8b173613461dd49af lib/galaxy/webapps/galaxy/api/history_contents.py
--- a/lib/galaxy/webapps/galaxy/api/history_contents.py
+++ b/lib/galaxy/webapps/galaxy/api/history_contents.py
@@ -2,24 +2,12 @@
API operations on the contents of a history.
"""
import logging
-import urllib
-from gettext import gettext
from galaxy import web
from galaxy.web.base.controller import BaseAPIController, url_for
from galaxy.web.base.controller import UsesHistoryDatasetAssociationMixin, UsesHistoryMixin
from galaxy.web.base.controller import UsesLibraryMixin, UsesLibraryMixinItems
-from galaxy.web.framework.helpers import to_unicode
-from galaxy.datatypes.display_applications import util
-from galaxy.datatypes.metadata import FileParameter
-
-from galaxy.datatypes.display_applications.link_generator import get_display_app_link_generator
-
-import pkg_resources
-pkg_resources.require( "Routes" )
-import routes
-
log = logging.getLogger( __name__ )
class HistoryContentsController( BaseAPIController, UsesHistoryDatasetAssociationMixin, UsesHistoryMixin,
@@ -67,7 +55,7 @@
if encoded_hda_id in ids:
#TODO: share code with show
try:
- rval.append( get_hda_dict( trans, history, hda ) )
+ rval.append( self.get_hda_dict( trans, hda ) )
except Exception, exc:
# don't fail entire list if hda err's, record and move on
@@ -149,7 +137,7 @@
hda = self.get_history_dataset_association( trans, history, id,
check_ownership=True, check_accessible=True )
- hda_dict = get_hda_dict( trans, history, hda )
+ hda_dict = self.get_hda_dict( trans, hda )
except Exception, e:
msg = "Error in history API at listing dataset: %s" % ( str(e) )
@@ -194,81 +182,3 @@
trans.response.status = 403
return "Not implemented."
-
-def get_hda_dict( trans, history, hda ):
- hda_dict = hda.get_api_value( view='element' )
-
- # Add additional attributes that depend on trans can hence must be added here rather than at the model level.
- if trans.user_is_admin() or trans.app.config.expose_dataset_path:
- hda_dict[ 'file_name' ] = hda.file_name
-
- if not hda_dict[ 'deleted' ]:
- hda_dict[ 'download_url' ] = url_for( 'history_contents_display', history_id = trans.security.encode_id( history.id ),
- history_content_id = trans.security.encode_id( hda.id ) )
-
- can_access_hda = trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset )
- hda_dict[ 'accessible' ] = ( trans.user_is_admin() or can_access_hda )
- hda_dict[ 'api_type' ] = "file"
-
- if not( hda.purged or hda.deleted or hda.dataset.purged ):
- meta_files = []
- for meta_type in hda.metadata.spec.keys():
- if isinstance( hda.metadata.spec[ meta_type ].param, FileParameter ):
- meta_files.append( dict( file_type=meta_type ) )
- if meta_files:
- hda_dict[ 'meta_files' ] = meta_files
-
- hda_dict[ 'display_apps' ] = get_display_apps( trans, hda )
- hda_dict[ 'display_types' ] = get_old_display_applications( trans, hda )
- hda_dict[ 'visualizations' ] = hda.get_visualizations()
-
- if hda.creating_job and hda.creating_job.tool_id:
- tool_used = trans.app.toolbox.get_tool( hda.creating_job.tool_id )
- if tool_used and tool_used.force_history_refresh:
- hda_dict[ 'force_history_refresh' ] = True
-
- return trans.security.encode_dict_ids( hda_dict )
-
-def get_display_apps( trans, hda ):
- #TODO: make more straightforward (somehow)
- display_apps = []
-
- def get_display_app_url( display_app_link, hda, trans ):
- web_url_for = routes.URLGenerator( trans.webapp.mapper, trans.environ )
- dataset_hash, user_hash = util.encode_dataset_user( trans, hda, None )
- return web_url_for( controller='dataset',
- action="display_application",
- dataset_id=dataset_hash,
- user_id=user_hash,
- app_name=urllib.quote_plus( display_app_link.display_application.id ),
- link_name=urllib.quote_plus( display_app_link.id ) )
-
- for display_app in hda.get_display_applications( trans ).itervalues():
- app_links = []
- for display_app_link in display_app.links.itervalues():
- app_links.append({
- 'target' : display_app_link.url.get( 'target_frame', '_blank' ),
- 'href' : get_display_app_url( display_app_link, hda, trans ),
- 'text' : gettext( display_app_link.name )
- })
- display_apps.append( dict( label=display_app.name, links=app_links ) )
-
- return display_apps
-
-def get_old_display_applications( trans, hda ):
- display_apps = []
- for display_app_name in hda.datatype.get_display_types():
- link_generator = get_display_app_link_generator( display_app_name )
- display_links = link_generator.generate_links( trans, hda )
-
- app_links = []
- for display_name, display_link in display_links:
- app_links.append({
- 'target' : '_blank',
- 'href' : display_link,
- 'text' : display_name
- })
- if app_links:
- display_apps.append( dict( label=hda.datatype.get_display_label( display_app_name ), links=app_links ) )
-
- return display_apps
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.
9 years, 10 months
commit/galaxy-central: inithello: Reference the right app.
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f1f1d3647908/
changeset: f1f1d3647908
branch: next-stable
user: inithello
date: 2013-03-18 20:51:04
summary: Reference the right app.
affected #: 1 file
diff -r 7b5f97700fdc8286db3e5ed6b6425127694ca42f -r f1f1d36479082ab77ac5cf67832f09cbbf70c65a lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -399,7 +399,7 @@
tool_panel_dict = tool_util.generate_tool_panel_dict_for_new_install( metadata_dict[ 'tools' ], tool_section )
sample_files = metadata_dict.get( 'sample_files', [] )
tool_index_sample_files = tool_util.get_tool_index_sample_files( sample_files )
- tool_util.copy_sample_files( self.app, tool_index_sample_files, tool_path=tool_path )
+ tool_util.copy_sample_files( trans.app, tool_index_sample_files, tool_path=tool_path )
sample_files_copied = [ str( s ) for s in tool_index_sample_files ]
repository_tools_tups = suc.get_repository_tools_tups( trans.app, metadata_dict )
if repository_tools_tups:
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.
9 years, 10 months