commit/galaxy-central: 2 new changesets
by commits-noreply@bitbucket.org
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a6f688dade80/
Changeset: a6f688dade80
Branch: next-stable
User: natefoo
Date: 2013-05-29 19:55:08
Summary: Make PBKDF2 password hashing conditional, enable by default.
Affected #: 3 files
diff -r 886a722b0aef6560320c1ddf7382e6207731f49f -r a6f688dade808b0e16903fbb50186ad9656c0d1c lib/galaxy/app.py
--- a/lib/galaxy/app.py
+++ b/lib/galaxy/app.py
@@ -62,7 +62,8 @@
self.config.database_engine_options,
database_query_profiling_proxy = self.config.database_query_profiling_proxy,
object_store = self.object_store,
- trace_logger=self.trace_logger )
+ trace_logger=self.trace_logger,
+ use_pbkdf2=self.config.get_bool( 'use_pbkdf2', True ) )
# Manage installed tool shed repositories.
self.installed_repository_manager = tool_shed.galaxy_install.InstalledRepositoryManager( self )
# Create an empty datatypes registry.
diff -r 886a722b0aef6560320c1ddf7382e6207731f49f -r a6f688dade808b0e16903fbb50186ad9656c0d1c lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -62,6 +62,7 @@
class User( object, APIItem ):
+ use_pbkdf2 = True
"""
Data for a Galaxy user or admin and relations to their
histories, credentials, and roles.
@@ -87,7 +88,10 @@
"""
Set user password to the digest of `cleartext`.
"""
- self.password = galaxy.security.passwords.hash_password( cleartext )
+ if User.use_pbkdf2:
+ self.password = galaxy.security.passwords.hash_password( cleartext )
+ else:
+ self.password = new_secure_hash( text_type=cleartext )
def check_password( self, cleartext ):
"""
diff -r 886a722b0aef6560320c1ddf7382e6207731f49f -r a6f688dade808b0e16903fbb50186ad9656c0d1c lib/galaxy/model/mapping.py
--- a/lib/galaxy/model/mapping.py
+++ b/lib/galaxy/model/mapping.py
@@ -2008,12 +2008,14 @@
# Let this go, it could possibly work with db's we don't support
log.error( "database_connection contains an unknown SQLAlchemy database dialect: %s" % dialect )
-def init( file_path, url, engine_options={}, create_tables=False, database_query_profiling_proxy=False, object_store=None, trace_logger=None ):
+def init( file_path, url, engine_options={}, create_tables=False, database_query_profiling_proxy=False, object_store=None, trace_logger=None, use_pbkdf2=True ):
"""Connect mappings to the database"""
# Connect dataset to the file path
model.Dataset.file_path = file_path
# Connect dataset to object store
model.Dataset.object_store = object_store
+ # Use PBKDF2 password hashing?
+ model.User.use_pbkdf2 = use_pbkdf2
# Load the appropriate db module
load_egg_for_url( url )
# Should we use the logging proxy?
https://bitbucket.org/galaxy/galaxy-central/commits/e3455a092882/
Changeset: e3455a092882
User: natefoo
Date: 2013-05-29 19:55:22
Summary: merge next-stable.
Affected #: 3 files
diff -r 35ac562e7e81f232b99c2c377d415b6aeab538cb -r e3455a0928824b8ef0fb8f9337e3b0a1d194d2ed lib/galaxy/app.py
--- a/lib/galaxy/app.py
+++ b/lib/galaxy/app.py
@@ -62,7 +62,8 @@
self.config.database_engine_options,
database_query_profiling_proxy = self.config.database_query_profiling_proxy,
object_store = self.object_store,
- trace_logger=self.trace_logger )
+ trace_logger=self.trace_logger,
+ use_pbkdf2=self.config.get_bool( 'use_pbkdf2', True ) )
# Manage installed tool shed repositories.
self.installed_repository_manager = tool_shed.galaxy_install.InstalledRepositoryManager( self )
# Create an empty datatypes registry.
diff -r 35ac562e7e81f232b99c2c377d415b6aeab538cb -r e3455a0928824b8ef0fb8f9337e3b0a1d194d2ed lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -62,6 +62,7 @@
class User( object, APIItem ):
+ use_pbkdf2 = True
"""
Data for a Galaxy user or admin and relations to their
histories, credentials, and roles.
@@ -87,7 +88,10 @@
"""
Set user password to the digest of `cleartext`.
"""
- self.password = galaxy.security.passwords.hash_password( cleartext )
+ if User.use_pbkdf2:
+ self.password = galaxy.security.passwords.hash_password( cleartext )
+ else:
+ self.password = new_secure_hash( text_type=cleartext )
def check_password( self, cleartext ):
"""
diff -r 35ac562e7e81f232b99c2c377d415b6aeab538cb -r e3455a0928824b8ef0fb8f9337e3b0a1d194d2ed lib/galaxy/model/mapping.py
--- a/lib/galaxy/model/mapping.py
+++ b/lib/galaxy/model/mapping.py
@@ -2008,12 +2008,14 @@
# Let this go, it could possibly work with db's we don't support
log.error( "database_connection contains an unknown SQLAlchemy database dialect: %s" % dialect )
-def init( file_path, url, engine_options={}, create_tables=False, database_query_profiling_proxy=False, object_store=None, trace_logger=None ):
+def init( file_path, url, engine_options={}, create_tables=False, database_query_profiling_proxy=False, object_store=None, trace_logger=None, use_pbkdf2=True ):
"""Connect mappings to the database"""
# Connect dataset to the file path
model.Dataset.file_path = file_path
# Connect dataset to object store
model.Dataset.object_store = object_store
+ # Use PBKDF2 password hashing?
+ model.User.use_pbkdf2 = use_pbkdf2
# Load the appropriate db module
load_egg_for_url( url )
# Should we use the logging proxy?
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, 1 month
commit/galaxy-central: 2 new changesets
by commits-noreply@bitbucket.org
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/886a722b0aef/
Changeset: 886a722b0aef
Branch: next-stable
User: Dave Bouvier
Date: 2013-05-29 19:26:38
Summary: Fix for set_environment appearing in multiple action sections. Fix for interpolating multiple environment variables in set_environment actions.
Affected #: 2 files
diff -r 8c69611137c19dd59d9e6f7cc339484213a88b18 -r 886a722b0aef6560320c1ddf7382e6207731f49f lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
@@ -22,7 +22,6 @@
log = logging.getLogger( __name__ )
-CMD_SEPARATOR = '__CMD_SEP__'
INSTALLATION_LOG = 'INSTALLATION.log'
VIRTUALENV_URL = 'https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz'
@@ -51,21 +50,90 @@
return output.return_code
def handle_environment_variables( app, tool_dependency, install_dir, env_var_dict, set_prior_environment_commands ):
+ """
+ This method works with with a combination of three tool dependency definition tag sets, which are defined in the tool_dependencies.xml file in the
+ order discussed here. The example for this discussion is the tool_dependencies.xml file contained in the osra repository, which is available at:
+
+ http://testtoolshed.g2.bx.psu.edu/view/bgruening/osra
+
+ The first tag set defines a complex repository dependency like this. This tag set ensures that changeset revision XXX of the repository named
+ package_graphicsmagick_1_3 owned by YYY in the tool shed ZZZ has been previously installed.
+
+ <tool_dependency>
+ <package name="graphicsmagick" version="1.3.18">
+ <repository changeset_revision="XXX" name="package_graphicsmagick_1_3" owner="YYY" prior_installation_required="True" toolshed="ZZZ" />
+ </package>
+ ...
+
+ * By the way, there is an env.sh file associated with version 1.3.18 of the graphicsmagick package which looks something like this (we'll reference
+ this file later in this discussion.
+ ----
+ GRAPHICSMAGICK_ROOT_DIR=/<my configured tool dependency path>/graphicsmagick/1.3.18/YYY/package_graphicsmagick_1_3/XXX/gmagick;
+ export GRAPHICSMAGICK_ROOT_DIR
+ ----
+
+ The second tag set defines a specific package dependency that has been previously installed (guaranteed by the tag set discussed above) and compiled,
+ where the compiled dependency is needed by the tool dependency currently being installed (osra version 2.0.0 in this case) and complied in order for
+ it's installation and compilation to succeed. This tag set is contained within the <package name="osra" version="2.0.0"> tag set, which implies that
+ version 2.0.0 of the osra package requires version 1.3.18 of the graphicsmagick package in order to successfully compile. When this tag set is handled,
+ one of the effects is that the env.sh file associated with graphicsmagick version 1.3.18 is "sourced", which undoubtedly sets or alters certain environment
+ variables (e.g. PATH, PYTHONPATH, etc).
+
+ <!-- populate the environment variables from the dependent repositories -->
+ <action type="set_environment_for_install">
+ <repository changeset_revision="XXX" name="package_graphicsmagick_1_3" owner="YYY" toolshed="ZZZ">
+ <package name="graphicsmagick" version="1.3.18" />
+ </repository>
+ </action>
+
+ The third tag set enables discovery of the same required package dependency discussed above for correctly compiling the osra version 2.0.0 package, but
+ in this case the package can be discovered at tool execution time. Using the $ENV[] option as shown in this example, the value of the environment
+ variable named GRAPHICSMAGICK_ROOT_DIR (which was set in the environment using the second tag set described above) will be used to automatically alter
+ the env.sh file associated with the osra version 2.0.0 tool dependency when it is installed into Galaxy. * Refer to where we discussed the env.sh file
+ for version 1.3.18 of the graphicsmagick package above.
+
+ <action type="set_environment">
+ <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[GRAPHICSMAGICK_ROOT_DIR]/lib/</environment_variable>
+ <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$INSTALL_DIR/potrace/build/lib/</environment_variable>
+ <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
+ <!-- OSRA_DATA_FILES is only used by the galaxy wrapper and is not part of OSRA -->
+ <environment_variable action="set_to" name="OSRA_DATA_FILES">$INSTALL_DIR/share</environment_variable>
+ </action>
+
+ The above tag will produce an env.sh file for version 2.0.0 of the osra package when it it installed into Galaxy that looks something like this. Notice
+ that the path to the gmagick binary is included here since it expands the defined $ENV[GRAPHICSMAGICK_ROOT_DIR] value in the above tag set.
+
+ ----
+ LD_LIBRARY_PATH=/<my configured tool dependency path>/graphicsmagick/1.3.18/YYY/package_graphicsmagick_1_3/XXX/gmagick/lib/:$LD_LIBRARY_PATH;
+ export LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=/<my configured tool dependency path>/osra/1.4.0/YYY/depends_on/XXX/potrace/build/lib/:$LD_LIBRARY_PATH;
+ export LD_LIBRARY_PATH
+ PATH=/<my configured tool dependency path>/osra/1.4.0/YYY/depends_on/XXX/bin:$PATH;
+ export PATH
+ OSRA_DATA_FILES=/<my configured tool dependency path>/osra/1.4.0/YYY/depends_on/XXX/share;
+ export OSRA_DATA_FILES
+ ----
+ """
env_var_value = env_var_dict[ 'value' ]
+ # env_var_value is the text of an environment variable tag like this: <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">
+ # Here is an example of what env_var_value could look like: $ENV[GRAPHICSMAGICK_ROOT_DIR]/lib/
if '$ENV[' in env_var_value and ']' in env_var_value:
# Pull out the name of the environment variable to populate.
inherited_env_var_name = env_var_value.split( '[' )[1].split( ']' )[0]
to_replace = '$ENV[%s]' % inherited_env_var_name
- # Build a command line that outputs CMD_SEPARATOR + environment variable value + CMD_SEPARATOR.
- set_prior_environment_commands.extend( [ "echo '%s'" % CMD_SEPARATOR, 'echo $%s' % inherited_env_var_name, "echo '%s'" % CMD_SEPARATOR ] )
+ # Build a command line that outputs VARIABLE_NAME: <the value of the variable>.
+ set_prior_environment_commands.append( 'echo "%s: $%s"' % ( inherited_env_var_name, inherited_env_var_name ) )
command = ' ; '.join( set_prior_environment_commands )
# Run the command and capture the output.
command_return = handle_command( app, tool_dependency, install_dir, command, return_output=True )
- # And extract anything between the two instances of CMD_SEPARATOR.
- environment_variable_value = command_return.split( CMD_SEPARATOR )[1].split( CMD_SEPARATOR )[0].strip( '\n' )
- if environment_variable_value:
- log.info( 'Replacing %s with %s in env.sh for this repository.', to_replace, environment_variable_value )
- env_var_value = env_var_value.replace( to_replace, environment_variable_value )
+ # And extract anything labeled with the name of the environment variable we're populating here.
+ if '%s: ' % inherited_env_var_name in command_return:
+ environment_variable_value = command_return.split( '\n' )
+ for line in environment_variable_value:
+ if line.startswith( inherited_env_var_name ):
+ inherited_env_var_value = line.replace( '%s: ' % inherited_env_var_name, '' )
+ log.info( 'Replacing %s with %s in env.sh for this repository.', to_replace, inherited_env_var_value )
+ env_var_value = env_var_value.replace( to_replace, inherited_env_var_value )
else:
# If the return is empty, replace the original $ENV[] with nothing, to avoid any shell misparsings later on.
log.error( 'Environment variable %s not found, removing from set_environment.', inherited_env_var_name )
diff -r 8c69611137c19dd59d9e6f7cc339484213a88b18 -r 886a722b0aef6560320c1ddf7382e6207731f49f lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
@@ -339,6 +339,7 @@
actions_dict[ 'package_name' ] = package_name
actions = []
all_env_shell_file_paths = []
+ env_var_dicts = []
# Make sure to skip all comments, since they are now included in the XML tree.
for action_elem in actions_elem.findall( 'action' ):
action_dict = {}
@@ -389,7 +390,6 @@
# <environment_variable name="PYTHONPATH" action="append_to">$INSTALL_DIR/lib/python</environment_variable>
# <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
# </action>
- env_var_dicts = []
for env_elem in action_elem:
if env_elem.tag == 'environment_variable':
env_var_dict = common_util.create_env_var_dict( env_elem, tool_dependency_install_dir=install_dir )
https://bitbucket.org/galaxy/galaxy-central/commits/35ac562e7e81/
Changeset: 35ac562e7e81
User: Dave Bouvier
Date: 2013-05-29 19:27:48
Summary: Merge with next-stable.
Affected #: 2 files
diff -r 964071e63ee3173e35f245d193e3cb8252fabc7c -r 35ac562e7e81f232b99c2c377d415b6aeab538cb lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
@@ -22,7 +22,6 @@
log = logging.getLogger( __name__ )
-CMD_SEPARATOR = '__CMD_SEP__'
INSTALLATION_LOG = 'INSTALLATION.log'
VIRTUALENV_URL = 'https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz'
@@ -94,7 +93,7 @@
for version 1.3.18 of the graphicsmagick package above.
<action type="set_environment">
- <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[$GRAPHICSMAGICK_ROOT_DIR]/lib/</environment_variable>
+ <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[GRAPHICSMAGICK_ROOT_DIR]/lib/</environment_variable><environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$INSTALL_DIR/potrace/build/lib/</environment_variable><environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable><!-- OSRA_DATA_FILES is only used by the galaxy wrapper and is not part of OSRA -->
@@ -102,7 +101,7 @@
</action>
The above tag will produce an env.sh file for version 2.0.0 of the osra package when it it installed into Galaxy that looks something like this. Notice
- that the path to the gmagick binary is included here since it expands the defined $ENV[$GRAPHICSMAGICK_ROOT_DIR] value in the above tag set.
+ that the path to the gmagick binary is included here since it expands the defined $ENV[GRAPHICSMAGICK_ROOT_DIR] value in the above tag set.
----
LD_LIBRARY_PATH=/<my configured tool dependency path>/graphicsmagick/1.3.18/YYY/package_graphicsmagick_1_3/XXX/gmagick/lib/:$LD_LIBRARY_PATH;
@@ -116,20 +115,25 @@
----
"""
env_var_value = env_var_dict[ 'value' ]
+ # env_var_value is the text of an environment variable tag like this: <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">
+ # Here is an example of what env_var_value could look like: $ENV[GRAPHICSMAGICK_ROOT_DIR]/lib/
if '$ENV[' in env_var_value and ']' in env_var_value:
# Pull out the name of the environment variable to populate.
inherited_env_var_name = env_var_value.split( '[' )[1].split( ']' )[0]
to_replace = '$ENV[%s]' % inherited_env_var_name
- # Build a command line that outputs CMD_SEPARATOR + environment variable value + CMD_SEPARATOR.
- set_prior_environment_commands.extend( [ "echo '%s'" % CMD_SEPARATOR, 'echo $%s' % inherited_env_var_name, "echo '%s'" % CMD_SEPARATOR ] )
+ # Build a command line that outputs VARIABLE_NAME: <the value of the variable>.
+ set_prior_environment_commands.append( 'echo "%s: $%s"' % ( inherited_env_var_name, inherited_env_var_name ) )
command = ' ; '.join( set_prior_environment_commands )
# Run the command and capture the output.
command_return = handle_command( app, tool_dependency, install_dir, command, return_output=True )
- # And extract anything between the two instances of CMD_SEPARATOR.
- environment_variable_value = command_return.split( CMD_SEPARATOR )[1].split( CMD_SEPARATOR )[0].strip( '\n' )
- if environment_variable_value:
- log.info( 'Replacing %s with %s in env.sh for this repository.', to_replace, environment_variable_value )
- env_var_value = env_var_value.replace( to_replace, environment_variable_value )
+ # And extract anything labeled with the name of the environment variable we're populating here.
+ if '%s: ' % inherited_env_var_name in command_return:
+ environment_variable_value = command_return.split( '\n' )
+ for line in environment_variable_value:
+ if line.startswith( inherited_env_var_name ):
+ inherited_env_var_value = line.replace( '%s: ' % inherited_env_var_name, '' )
+ log.info( 'Replacing %s with %s in env.sh for this repository.', to_replace, inherited_env_var_value )
+ env_var_value = env_var_value.replace( to_replace, inherited_env_var_value )
else:
# If the return is empty, replace the original $ENV[] with nothing, to avoid any shell misparsings later on.
log.error( 'Environment variable %s not found, removing from set_environment.', inherited_env_var_name )
diff -r 964071e63ee3173e35f245d193e3cb8252fabc7c -r 35ac562e7e81f232b99c2c377d415b6aeab538cb lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
@@ -339,6 +339,7 @@
actions_dict[ 'package_name' ] = package_name
actions = []
all_env_shell_file_paths = []
+ env_var_dicts = []
# Make sure to skip all comments, since they are now included in the XML tree.
for action_elem in actions_elem.findall( 'action' ):
action_dict = {}
@@ -389,7 +390,6 @@
# <environment_variable name="PYTHONPATH" action="append_to">$INSTALL_DIR/lib/python</environment_variable>
# <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
# </action>
- env_var_dicts = []
for env_elem in action_elem:
if env_elem.tag == 'environment_variable':
env_var_dict = common_util.create_env_var_dict( env_elem, tool_dependency_install_dir=install_dir )
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, 1 month
commit/galaxy-central: 2 new changesets
by commits-noreply@bitbucket.org
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/1a9a6e51304c/
Changeset: 1a9a6e51304c
User: dannon
Date: 2013-05-28 23:23:17
Summary: Bugfix for standard dataset upload
Affected #: 1 file
diff -r 79889b1c7da331afc80e2fa64e9d568a9c559cbe -r 1a9a6e51304c95d79322d17c9583afbaf305b25b lib/galaxy/tools/actions/upload_common.py
--- a/lib/galaxy/tools/actions/upload_common.py
+++ b/lib/galaxy/tools/actions/upload_common.py
@@ -209,13 +209,12 @@
trans.sa_session.add( dp )
trans.sa_session.flush()
return ldda
+
def new_upload( trans, cntrller, uploaded_dataset, library_bunch=None, history=None, state=None ):
if library_bunch:
return __new_library_upload( trans, cntrller, uploaded_dataset, library_bunch, state )
- elif history:
+ else:
return __new_history_upload( trans, uploaded_dataset, history=history, state=state )
- else:
- raise Exception("new_upload must be called with empty values for library_bunch and history")
def get_uploaded_datasets( trans, cntrller, params, precreated_datasets, dataset_upload_inputs, library_bunch=None, history=None ):
uploaded_datasets = []
https://bitbucket.org/galaxy/galaxy-central/commits/8c69611137c1/
Changeset: 8c69611137c1
Branch: next-stable
User: dannon
Date: 2013-05-28 23:23:17
Summary: Bugfix for standard dataset upload
Affected #: 1 file
diff -r 6b4b91d27c3316960ae0e65bfb7c87371831be41 -r 8c69611137c19dd59d9e6f7cc339484213a88b18 lib/galaxy/tools/actions/upload_common.py
--- a/lib/galaxy/tools/actions/upload_common.py
+++ b/lib/galaxy/tools/actions/upload_common.py
@@ -209,13 +209,12 @@
trans.sa_session.add( dp )
trans.sa_session.flush()
return ldda
+
def new_upload( trans, cntrller, uploaded_dataset, library_bunch=None, history=None, state=None ):
if library_bunch:
return __new_library_upload( trans, cntrller, uploaded_dataset, library_bunch, state )
- elif history:
+ else:
return __new_history_upload( trans, uploaded_dataset, history=history, state=state )
- else:
- raise Exception("new_upload must be called with empty values for library_bunch and history")
def get_uploaded_datasets( trans, cntrller, params, precreated_datasets, dataset_upload_inputs, library_bunch=None, history=None ):
uploaded_datasets = []
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, 1 month
commit/galaxy-central: 2 new changesets
by commits-noreply@bitbucket.org
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/7395e351ec85/
Changeset: 7395e351ec85
User: jgoecks
Date: 2013-05-26 21:05:31
Summary: Trackster: whitespace additions between functions.
Affected #: 1 file
diff -r 31714646a7b441f34a43748065278a1b08940c3c -r 7395e351ec8564c8c38c38ffcef79a57d02ec836 static/scripts/viz/trackster/tracks.js
--- a/static/scripts/viz/trackster/tracks.js
+++ b/static/scripts/viz/trackster/tracks.js
@@ -1137,9 +1137,11 @@
// FIXME: need to use this approach to enable inheritance of DrawableCollection functions.
extend( TracksterView.prototype, DrawableCollection.prototype, {
+
changed: function() {
this.has_changes = true;
},
+
/** Add or remove intro div depending on view state. */
update_intro_div: function() {
if (this.drawables.length === 0) {
@@ -1149,6 +1151,7 @@
this.intro_div.hide();
}
},
+
/**
* Triggers navigate events as needed. If there is a delay,
* then event is triggered only after navigation has stopped.
@@ -1171,6 +1174,7 @@
view.trigger("navigate", new_chrom + ":" + new_low + "-" + new_high);
}
},
+
update_location: function(low, high) {
this.location_span.text( commatize(low) + ' - ' + commatize(high) );
this.nav_input.val( this.chrom + ':' + commatize(low) + '-' + commatize(high) );
@@ -1182,6 +1186,7 @@
this.trigger_navigate(chrom, view.low, view.high, true);
}
},
+
/**
* Load chrom data for the view. Returns a jQuery Deferred.
*/
@@ -1230,6 +1235,7 @@
return chrom_data;
},
+
change_chrom: function(chrom, low, high) {
var view = this;
// If chrom data is still loading, wait for it.
@@ -1365,6 +1371,7 @@
var chrom = view.chrom_select.val();
this.trigger_navigate(chrom, view.low, view.high, true);
},
+
/**
* Add a drawable to the view.
*/
@@ -1374,11 +1381,13 @@
this.changed();
this.update_intro_div();
},
+
add_label_track: function (label_track) {
label_track.view = this;
label_track.init();
this.label_tracks.push(label_track);
},
+
/**
* Remove drawable from the view.
*/
@@ -1392,11 +1401,13 @@
});
}
},
+
reset: function() {
this.low = this.max_low;
this.high = this.max_high;
this.viewport_container.find(".yaxislabel").remove();
},
+
/**
* Request that view redraw some or all tracks. If a track is not specificied, redraw all tracks.
*/
@@ -1439,6 +1450,7 @@
this.requested_redraw = true;
}
},
+
/**
* Redraws view and tracks.
* NOTE: this method should never be called directly; request_redraw() should be used so
@@ -1503,6 +1515,7 @@
this.label_tracks[i]._draw();
}
},
+
zoom_in: function (point, container) {
if (this.max_high === 0 || this.high - this.low <= this.min_separation) {
return;
@@ -1518,6 +1531,7 @@
this.changed();
this.request_redraw();
},
+
zoom_out: function () {
if (this.max_high === 0) {
return;
@@ -1530,10 +1544,12 @@
this.changed();
this.request_redraw();
},
+
resize_window: function() {
this.viewport_container.height( this.container.height() - this.top_container.height() - this.bottom_container.height() );
this.request_redraw();
},
+
/** Show a Drawable in the overview. */
set_overview: function(drawable) {
if (this.overview_drawable) {
@@ -1561,6 +1577,7 @@
view.overview_drawable.request_draw();
this.changed();
},
+ view
/** Close and reset overview. */
reset_overview: function() {
// Update UI.
https://bitbucket.org/galaxy/galaxy-central/commits/79889b1c7da3/
Changeset: 79889b1c7da3
User: jgoecks
Date: 2013-05-28 21:22:58
Summary: Automated merge
Affected #: 1 file
diff -r c3199d306781ce61ce121a2c34c846310dac74c7 -r 79889b1c7da331afc80e2fa64e9d568a9c559cbe static/scripts/viz/trackster/tracks.js
--- a/static/scripts/viz/trackster/tracks.js
+++ b/static/scripts/viz/trackster/tracks.js
@@ -1137,9 +1137,11 @@
// FIXME: need to use this approach to enable inheritance of DrawableCollection functions.
extend( TracksterView.prototype, DrawableCollection.prototype, {
+
changed: function() {
this.has_changes = true;
},
+
/** Add or remove intro div depending on view state. */
update_intro_div: function() {
if (this.drawables.length === 0) {
@@ -1149,6 +1151,7 @@
this.intro_div.hide();
}
},
+
/**
* Triggers navigate events as needed. If there is a delay,
* then event is triggered only after navigation has stopped.
@@ -1171,6 +1174,7 @@
view.trigger("navigate", new_chrom + ":" + new_low + "-" + new_high);
}
},
+
update_location: function(low, high) {
this.location_span.text( commatize(low) + ' - ' + commatize(high) );
this.nav_input.val( this.chrom + ':' + commatize(low) + '-' + commatize(high) );
@@ -1182,6 +1186,7 @@
this.trigger_navigate(chrom, view.low, view.high, true);
}
},
+
/**
* Load chrom data for the view. Returns a jQuery Deferred.
*/
@@ -1230,6 +1235,7 @@
return chrom_data;
},
+
change_chrom: function(chrom, low, high) {
var view = this;
// If chrom data is still loading, wait for it.
@@ -1365,6 +1371,7 @@
var chrom = view.chrom_select.val();
this.trigger_navigate(chrom, view.low, view.high, true);
},
+
/**
* Add a drawable to the view.
*/
@@ -1374,11 +1381,13 @@
this.changed();
this.update_intro_div();
},
+
add_label_track: function (label_track) {
label_track.view = this;
label_track.init();
this.label_tracks.push(label_track);
},
+
/**
* Remove drawable from the view.
*/
@@ -1392,11 +1401,13 @@
});
}
},
+
reset: function() {
this.low = this.max_low;
this.high = this.max_high;
this.viewport_container.find(".yaxislabel").remove();
},
+
/**
* Request that view redraw some or all tracks. If a track is not specificied, redraw all tracks.
*/
@@ -1439,6 +1450,7 @@
this.requested_redraw = true;
}
},
+
/**
* Redraws view and tracks.
* NOTE: this method should never be called directly; request_redraw() should be used so
@@ -1503,6 +1515,7 @@
this.label_tracks[i]._draw();
}
},
+
zoom_in: function (point, container) {
if (this.max_high === 0 || this.high - this.low <= this.min_separation) {
return;
@@ -1518,6 +1531,7 @@
this.changed();
this.request_redraw();
},
+
zoom_out: function () {
if (this.max_high === 0) {
return;
@@ -1530,10 +1544,12 @@
this.changed();
this.request_redraw();
},
+
resize_window: function() {
this.viewport_container.height( this.container.height() - this.top_container.height() - this.bottom_container.height() );
this.request_redraw();
},
+
/** Show a Drawable in the overview. */
set_overview: function(drawable) {
if (this.overview_drawable) {
@@ -1561,6 +1577,7 @@
view.overview_drawable.request_draw();
this.changed();
},
+ view
/** Close and reset overview. */
reset_overview: function() {
// Update UI.
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, 1 month
commit/galaxy-central: 2 new changesets
by commits-noreply@bitbucket.org
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6b4b91d27c33/
Changeset: 6b4b91d27c33
Branch: next-stable
User: Dave Bouvier
Date: 2013-05-28 20:49:19
Summary: Explicitly filter by tag name actions when building the actions dict for tool dependency installation.
Affected #: 1 file
diff -r 412b9edb65ec78b029cae0969956b194c16ac053 -r 6b4b91d27c3316960ae0e65bfb7c87371831be41 lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
@@ -339,7 +339,8 @@
actions_dict[ 'package_name' ] = package_name
actions = []
all_env_shell_file_paths = []
- for action_elem in actions_elem:
+ # Make sure to skip all comments, since they are now included in the XML tree.
+ for action_elem in actions_elem.findall( 'action' ):
action_dict = {}
action_type = action_elem.get( 'type', 'shell_command' )
if action_type == 'shell_command':
https://bitbucket.org/galaxy/galaxy-central/commits/c3199d306781/
Changeset: c3199d306781
User: Dave Bouvier
Date: 2013-05-28 20:51:18
Summary: Merge with next-stable.
Affected #: 1 file
diff -r 79d036fbc175dc9e8eeb3c3a8e57352ded1fbbbf -r c3199d306781ce61ce121a2c34c846310dac74c7 lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/install_util.py
@@ -339,7 +339,8 @@
actions_dict[ 'package_name' ] = package_name
actions = []
all_env_shell_file_paths = []
- for action_elem in actions_elem:
+ # Make sure to skip all comments, since they are now included in the XML tree.
+ for action_elem in actions_elem.findall( 'action' ):
action_dict = {}
action_type = action_elem.get( 'type', 'shell_command' )
if action_type == 'shell_command':
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, 1 month
commit/galaxy-central: 2 new changesets
by commits-noreply@bitbucket.org
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/412b9edb65ec/
Changeset: 412b9edb65ec
Branch: next-stable
User: jmchilton
Date: 2013-05-26 22:15:19
Summary: Fix job splitting to rewrite references in config files in addition to command-line.
Affected #: 1 file
diff -r 69f70d84619de8024e8de7ef5669bda6dfaffce8 -r 412b9edb65ec78b029cae0969956b194c16ac053 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -1573,6 +1573,12 @@
self.sa_session.flush()
# Build any required config files
config_filenames = self.tool.build_config_files( param_dict, self.working_directory )
+ for config_filename in config_filenames:
+ config_contents = open(config_filename, "r").read()
+ for k, v in fnames.iteritems():
+ config_contents = config_contents.replace(k, v)
+ open(config_filename, "w").write(config_contents)
+
# FIXME: Build the param file (might return None, DEPRECATED)
param_filename = self.tool.build_param_file( param_dict, self.working_directory )
# Build the job's command line
https://bitbucket.org/galaxy/galaxy-central/commits/79d036fbc175/
Changeset: 79d036fbc175
User: dannon
Date: 2013-05-28 20:44:29
Summary: Merge PR169 to next-stable
Affected #: 0 files
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, 1 month
commit/galaxy-central: 2 new changesets
by commits-noreply@bitbucket.org
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/4294c2a836fe/
Changeset: 4294c2a836fe
User: jmchilton
Date: 2013-05-26 22:15:19
Summary: Fix job splitting to rewrite references in config files in addition to command-line.
Affected #: 1 file
diff -r 31714646a7b441f34a43748065278a1b08940c3c -r 4294c2a836fea78d50e65c29fc85bb047b095fd3 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -1573,6 +1573,12 @@
self.sa_session.flush()
# Build any required config files
config_filenames = self.tool.build_config_files( param_dict, self.working_directory )
+ for config_filename in config_filenames:
+ config_contents = open(config_filename, "r").read()
+ for k, v in fnames.iteritems():
+ config_contents = config_contents.replace(k, v)
+ open(config_filename, "w").write(config_contents)
+
# FIXME: Build the param file (might return None, DEPRECATED)
param_filename = self.tool.build_param_file( param_dict, self.working_directory )
# Build the job's command line
https://bitbucket.org/galaxy/galaxy-central/commits/f3e6cf36517e/
Changeset: f3e6cf36517e
User: dannon
Date: 2013-05-28 20:43:12
Summary: Merged in jmchilton/galaxy-central-api-history-uploads (pull request #169)
Fix job splitting to rewrite references in config files in addition to command-line.
Affected #: 1 file
diff -r a3f91ab1dc83c242ef284627df58f19ee95c0b12 -r f3e6cf36517e7db7b507fc1b15af7a43ad4a84f5 lib/galaxy/jobs/__init__.py
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -1573,6 +1573,12 @@
self.sa_session.flush()
# Build any required config files
config_filenames = self.tool.build_config_files( param_dict, self.working_directory )
+ for config_filename in config_filenames:
+ config_contents = open(config_filename, "r").read()
+ for k, v in fnames.iteritems():
+ config_contents = config_contents.replace(k, v)
+ open(config_filename, "w").write(config_contents)
+
# FIXME: Build the param file (might return None, DEPRECATED)
param_filename = self.tool.build_param_file( param_dict, self.working_directory )
# Build the job's command line
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, 1 month
commit/galaxy-central: jmchilton: Fix API uploads (must have broken with API/Web transaction unification).
by commits-noreply@bitbucket.org
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/69f70d84619d/
Changeset: 69f70d84619d
Branch: next-stable
User: jmchilton
Date: 2013-05-26 22:10:43
Summary: Fix API uploads (must have broken with API/Web transaction unification).
Affected #: 3 files
diff -r 4df405e7a2aff50c4ef83806c55d01448227cc5d -r 69f70d84619de8024e8de7ef5669bda6dfaffce8 lib/galaxy/tools/actions/upload.py
--- a/lib/galaxy/tools/actions/upload.py
+++ b/lib/galaxy/tools/actions/upload.py
@@ -16,7 +16,7 @@
incoming = upload_common.persist_uploads( incoming )
# We can pass an empty string as the cntrller here since it is used to check whether we
# are in an admin view, and this tool is currently not used there.
- uploaded_datasets = upload_common.get_uploaded_datasets( trans, '', incoming, precreated_datasets, dataset_upload_inputs )
+ uploaded_datasets = upload_common.get_uploaded_datasets( trans, '', incoming, precreated_datasets, dataset_upload_inputs, history=history )
upload_common.cleanup_unused_precreated_datasets( precreated_datasets )
if not uploaded_datasets:
@@ -24,4 +24,4 @@
json_file_path = upload_common.create_paramfile( trans, uploaded_datasets )
data_list = [ ud.data for ud in uploaded_datasets ]
- return upload_common.create_job( trans, incoming, tool, json_file_path, data_list )
+ return upload_common.create_job( trans, incoming, tool, json_file_path, data_list, history=history )
diff -r 4df405e7a2aff50c4ef83806c55d01448227cc5d -r 69f70d84619de8024e8de7ef5669bda6dfaffce8 lib/galaxy/tools/actions/upload_common.py
--- a/lib/galaxy/tools/actions/upload_common.py
+++ b/lib/galaxy/tools/actions/upload_common.py
@@ -107,11 +107,13 @@
data.state = data.states.ERROR
data.info = 'No file contents were available.'
-def new_history_upload( trans, uploaded_dataset, state=None ):
+def __new_history_upload( trans, uploaded_dataset, history=None, state=None ):
+ if not history:
+ history = trans.history
hda = trans.app.model.HistoryDatasetAssociation( name = uploaded_dataset.name,
extension = uploaded_dataset.file_type,
dbkey = uploaded_dataset.dbkey,
- history = trans.history,
+ history = history,
create_dataset = True,
sa_session = trans.sa_session )
if state:
@@ -120,12 +122,13 @@
hda.state = hda.states.QUEUED
trans.sa_session.add( hda )
trans.sa_session.flush()
- trans.history.add_dataset( hda, genome_build = uploaded_dataset.dbkey )
- permissions = trans.app.security_agent.history_get_default_permissions( trans.history )
+ history.add_dataset( hda, genome_build=uploaded_dataset.dbkey )
+ permissions = trans.app.security_agent.history_get_default_permissions( history )
trans.app.security_agent.set_all_dataset_permissions( hda.dataset, permissions )
trans.sa_session.flush()
return hda
-def new_library_upload( trans, cntrller, uploaded_dataset, library_bunch, state=None ):
+
+def __new_library_upload( trans, cntrller, uploaded_dataset, library_bunch, state=None ):
current_user_roles = trans.get_current_user_roles()
if not ( ( trans.user_is_admin() and cntrller in [ 'library_admin', 'api' ] ) or trans.app.security_agent.can_add_library_item( current_user_roles, library_bunch.folder ) ):
# This doesn't have to be pretty - the only time this should happen is if someone's being malicious.
@@ -206,19 +209,22 @@
trans.sa_session.add( dp )
trans.sa_session.flush()
return ldda
-def new_upload( trans, cntrller, uploaded_dataset, library_bunch=None, state=None ):
+def new_upload( trans, cntrller, uploaded_dataset, library_bunch=None, history=None, state=None ):
if library_bunch:
- return new_library_upload( trans, cntrller, uploaded_dataset, library_bunch, state )
+ return __new_library_upload( trans, cntrller, uploaded_dataset, library_bunch, state )
+ elif history:
+ return __new_history_upload( trans, uploaded_dataset, history=history, state=state )
else:
- return new_history_upload( trans, uploaded_dataset, state )
-def get_uploaded_datasets( trans, cntrller, params, precreated_datasets, dataset_upload_inputs, library_bunch=None ):
+ raise Exception("new_upload must be called with empty values for library_bunch and history")
+
+def get_uploaded_datasets( trans, cntrller, params, precreated_datasets, dataset_upload_inputs, library_bunch=None, history=None ):
uploaded_datasets = []
for dataset_upload_input in dataset_upload_inputs:
uploaded_datasets.extend( dataset_upload_input.get_uploaded_datasets( trans, params ) )
for uploaded_dataset in uploaded_datasets:
data = get_precreated_dataset( precreated_datasets, uploaded_dataset.name )
if not data:
- data = new_upload( trans, cntrller, uploaded_dataset, library_bunch )
+ data = new_upload( trans, cntrller, uploaded_dataset, library_bunch=library_bunch, history=history )
else:
data.extension = uploaded_dataset.file_type
data.dbkey = uploaded_dataset.dbkey
@@ -246,7 +252,9 @@
trans.sa_session.add( info_association )
trans.sa_session.flush()
else:
- trans.history.genome_build = uploaded_dataset.dbkey
+ if not history:
+ history = trans.history
+ history.genome_build = uploaded_dataset.dbkey
uploaded_dataset.data = data
return uploaded_datasets
def create_paramfile( trans, uploaded_datasets ):
@@ -320,7 +328,7 @@
if trans.app.config.external_chown_script:
_chown( json_file_path )
return json_file_path
-def create_job( trans, params, tool, json_file_path, data_list, folder=None ):
+def create_job( trans, params, tool, json_file_path, data_list, folder=None, history=None ):
"""
Create the upload job.
"""
@@ -333,7 +341,9 @@
if folder:
job.library_folder_id = folder.id
else:
- job.history_id = trans.history.id
+ if not history:
+ history = trans.history
+ job.history_id = history.id
job.tool_id = tool.id
job.tool_version = tool.version
job.state = job.states.UPLOAD
diff -r 4df405e7a2aff50c4ef83806c55d01448227cc5d -r 69f70d84619de8024e8de7ef5669bda6dfaffce8 lib/galaxy/webapps/galaxy/api/tools.py
--- a/lib/galaxy/webapps/galaxy/api/tools.py
+++ b/lib/galaxy/webapps/galaxy/api/tools.py
@@ -78,7 +78,6 @@
if history_id:
target_history = trans.sa_session.query(trans.app.model.History).get(
trans.security.decode_id(history_id))
- trans.galaxy_session.current_history = target_history
else:
target_history = 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, 1 month