1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b94bb858d29b/
Changeset: b94bb858d29b
User: jmchilton
Date: 2014-05-16 05:05:04
Summary: Fix for previous commit.
Affected #: 1 file
diff -r 933d0f2847332024f1fdf40234e74930014794e6 -r b94bb858d29b39f5d8127414bd703ee8e4905281 lib/galaxy/jobs/runners/lwr_client/manager.py
--- a/lib/galaxy/jobs/runners/lwr_client/manager.py
+++ b/lib/galaxy/jobs/runners/lwr_client/manager.py
@@ -76,7 +76,7 @@
def __init__(self, **kwds):
self.url = kwds.get('url')
- self.manager_name = kwds.get("manager", "_default_")
+ self.manager_name = kwds.get("manager", None) or "_default_"
self.connect_ssl = parse_amqp_connect_ssl_params(kwds.get('amqp_connect_ssl_args', None))
timeout = kwds.get('amqp_consumer_timeout', False)
if timeout is False:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/933d0f284733/
Changeset: 933d0f284733
User: jmchilton
Date: 2014-05-16 04:57:54
Summary: Bugfix: LWR - Fix manager name not passed into MQClientManager.
Affected #: 1 file
diff -r 559c5f4d1bdb694f90826896e5ebc837afa9b4f2 -r 933d0f2847332024f1fdf40234e74930014794e6 lib/galaxy/jobs/runners/lwr.py
--- a/lib/galaxy/jobs/runners/lwr.py
+++ b/lib/galaxy/jobs/runners/lwr.py
@@ -51,7 +51,13 @@
for kwd in kwds.keys():
if kwd.startswith('amqp_connect_ssl_'):
amqp_connect_ssl_args[kwd] = kwds[kwd]
- client_manager_kwargs = {'transport_type': transport, 'cache': string_as_bool_or_none(cache), "url": url, 'amqp_connect_ssl_args': amqp_connect_ssl_args or None}
+ client_manager_kwargs = {
+ 'transport_type': transport,
+ 'cache': string_as_bool_or_none(cache),
+ "url": url,
+ 'amqp_connect_ssl_args': amqp_connect_ssl_args or None,
+ 'manager': kwds.get("manager", None),
+ }
if 'amqp_consumer_timeout' in kwds:
if kwds['amqp_consumer_timeout'] == 'None':
client_manager_kwargs['amqp_consumer_timeout'] = 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.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/fcd83883072c/
Changeset: fcd83883072c
User: jmchilton
Date: 2014-05-15 22:58:12
Summary: Fix GALAXY_SLOTS calculation for LSF.
Thanks to Ilya Sytchev for the patch.
Affected #: 1 file
diff -r 47786821cd22eed10d1db9227b2ac18eff760374 -r fcd83883072c64b96ea0f12582fde3d05060b0f4 lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
--- a/lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
+++ b/lib/galaxy/jobs/runners/util/job_script/CLUSTER_SLOTS_STATEMENT.sh
@@ -8,6 +8,8 @@
GALAXY_SLOTS="$NSLOTS"
elif [ -f "$PBS_NODEFILE" ]; then
GALAXY_SLOTS=`wc -l < $PBS_NODEFILE`
+elif [ -n "$LSB_DJOB_NUMPROC" ]; then
+ GALAXY_SLOTS="$LSB_DJOB_NUMPROC"
else
GALAXY_SLOTS="1"
unset GALAXY_SLOTS_CONFIGURED
https://bitbucket.org/galaxy/galaxy-central/commits/559c5f4d1bdb/
Changeset: 559c5f4d1bdb
User: jmchilton
Date: 2014-05-15 22:58:58
Summary: Merge.
Affected #: 1 file
diff -r fcd83883072c64b96ea0f12582fde3d05060b0f4 -r 559c5f4d1bdb694f90826896e5ebc837afa9b4f2 lib/galaxy/webapps/galaxy/controllers/library_common.py
--- a/lib/galaxy/webapps/galaxy/controllers/library_common.py
+++ b/lib/galaxy/webapps/galaxy/controllers/library_common.py
@@ -473,6 +473,20 @@
dbkey = dbkey[0]
file_formats = [ dtype_name for dtype_name, dtype_value in trans.app.datatypes_registry.datatypes_by_extension.iteritems() if dtype_value.allow_datatype_change ]
file_formats.sort()
+
+ def __ok_to_edit_metadata( ldda_id ):
+ #prevent modifying metadata when dataset is queued or running as input/output
+ #This code could be more efficient, i.e. by using mappers, but to prevent slowing down loading a History panel, we'll leave the code here for now
+ for job_to_dataset_association in trans.sa_session.query( self.app.model.JobToInputLibraryDatasetAssociation ) \
+ .filter_by( ldda_id=ldda_id ) \
+ .all() \
+ + trans.sa_session.query( self.app.model.JobToOutputLibraryDatasetAssociation ) \
+ .filter_by( ldda_id=ldda_id ) \
+ .all():
+ if job_to_dataset_association.job.state not in [ job_to_dataset_association.job.states.OK, job_to_dataset_association.job.states.ERROR, job_to_dataset_association.job.states.DELETED ]:
+ return False
+ return True
+
# See if we have any associated templates
widgets = []
info_association, inherited = ldda.get_info_association()
@@ -480,14 +494,18 @@
widgets = ldda.get_template_widgets( trans )
if params.get( 'change', False ):
# The user clicked the Save button on the 'Change data type' form
- if ldda.datatype.allow_datatype_change and trans.app.datatypes_registry.get_datatype_by_extension( params.datatype ).allow_datatype_change:
- trans.app.datatypes_registry.change_datatype( ldda, params.datatype )
- trans.sa_session.flush()
- message = "Data type changed for library dataset '%s'." % ldda.name
- status = 'done'
+ if __ok_to_edit_metadata( ldda.id ):
+ if ldda.datatype.allow_datatype_change and trans.app.datatypes_registry.get_datatype_by_extension( params.datatype ).allow_datatype_change:
+ trans.app.datatypes_registry.change_datatype( ldda, params.datatype )
+ trans.sa_session.flush()
+ message = "Data type changed for library dataset '%s'." % ldda.name
+ status = 'done'
+ else:
+ message = "You are unable to change datatypes in this manner. Changing %s to %s is not allowed." % ( ldda.extension, params.datatype )
+ status = 'error'
else:
- message = "You are unable to change datatypes in this manner. Changing %s to %s is not allowed." % ( ldda.extension, params.datatype )
- status = 'error'
+ message = "This dataset is currently being used as input or output. You cannot change datatype until the jobs have completed or you have canceled them."
+ status = "error"
elif params.get( 'save', False ):
# The user clicked the Save button on the 'Edit Attributes' form
old_name = ldda.name
@@ -501,33 +519,40 @@
ldda.name = new_name
ldda.info = new_info
ldda.message = new_message
- # The following for loop will save all metadata_spec items
- for name, spec in ldda.datatype.metadata_spec.items():
- if spec.get("readonly"):
- continue
- optional = params.get( "is_" + name, None )
- if optional and optional == 'true':
- # optional element... == 'true' actually means it is NOT checked (and therefore ommitted)
- setattr( ldda.metadata, name, None )
- else:
- setattr( ldda.metadata, name, spec.unwrap( params.get ( name, None ) ) )
- ldda.metadata.dbkey = dbkey
- ldda.datatype.after_setting_metadata( ldda )
+ if __ok_to_edit_metadata( ldda.id ):
+ # The following for loop will save all metadata_spec items
+ for name, spec in ldda.datatype.metadata_spec.items():
+ if spec.get("readonly"):
+ continue
+ optional = params.get( "is_" + name, None )
+ if optional and optional == 'true':
+ # optional element... == 'true' actually means it is NOT checked (and therefore ommitted)
+ setattr( ldda.metadata, name, None )
+ else:
+ setattr( ldda.metadata, name, spec.unwrap( params.get ( name, None ) ) )
+ ldda.metadata.dbkey = dbkey
+ ldda.datatype.after_setting_metadata( ldda )
+ message = "Attributes updated for library dataset '%s'." % ldda.name
+ status = 'done'
+ else:
+ message = "Attributes updated, but metadata could not be changed because this dataset is currently being used as input or output. You must cancel or wait for these jobs to complete before changing metadata."
+ status = 'warning'
trans.sa_session.flush()
- message = "Attributes updated for library dataset '%s'." % ldda.name
- status = 'done'
elif params.get( 'detect', False ):
# The user clicked the Auto-detect button on the 'Edit Attributes' form
- for name, spec in ldda.datatype.metadata_spec.items():
- # We need to be careful about the attributes we are resetting
- if name not in [ 'name', 'info', 'dbkey' ]:
- if spec.get( 'default' ):
- setattr( ldda.metadata, name, spec.unwrap( spec.get( 'default' ) ) )
- ldda.datatype.set_meta( ldda )
- ldda.datatype.after_setting_metadata( ldda )
+ if __ok_to_edit_metadata( ldda.id ):
+ for name, spec in ldda.datatype.metadata_spec.items():
+ # We need to be careful about the attributes we are resetting
+ if name not in [ 'name', 'info', 'dbkey' ]:
+ if spec.get( 'default' ):
+ setattr( ldda.metadata, name, spec.unwrap( spec.get( 'default' ) ) )
+ message = "Attributes have been queued to be updated for library dataset '%s'." % ldda.name
+ status = 'done'
+ trans.app.datatypes_registry.set_external_metadata_tool.tool_action.execute( trans.app.datatypes_registry.set_external_metadata_tool, trans, incoming = { 'input1':ldda } )
+ else:
+ message = "This dataset is currently being used as input or output. You cannot change metadata until the jobs have completed or you have canceled them."
+ status = 'error'
trans.sa_session.flush()
- message = "Information updated for library dataset '%s'." % ldda.name
- status = 'done'
elif params.get( 'change_extended_metadata', False):
em_string = util.restore_text( params.get("extended_metadata", "") )
if len(em_string):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/331232edbe8f/
Changeset: 331232edbe8f
User: dan
Date: 2014-05-15 22:25:44
Summary: Have auto-detect metadata option in library use external set metadata process.
Affected #: 1 file
diff -r 47786821cd22eed10d1db9227b2ac18eff760374 -r 331232edbe8f30eef4814cc01ac1cb3db4bd09e7 lib/galaxy/webapps/galaxy/controllers/library_common.py
--- a/lib/galaxy/webapps/galaxy/controllers/library_common.py
+++ b/lib/galaxy/webapps/galaxy/controllers/library_common.py
@@ -473,6 +473,20 @@
dbkey = dbkey[0]
file_formats = [ dtype_name for dtype_name, dtype_value in trans.app.datatypes_registry.datatypes_by_extension.iteritems() if dtype_value.allow_datatype_change ]
file_formats.sort()
+
+ def __ok_to_edit_metadata( ldda_id ):
+ #prevent modifying metadata when dataset is queued or running as input/output
+ #This code could be more efficient, i.e. by using mappers, but to prevent slowing down loading a History panel, we'll leave the code here for now
+ for job_to_dataset_association in trans.sa_session.query( self.app.model.JobToInputLibraryDatasetAssociation ) \
+ .filter_by( ldda_id=ldda_id ) \
+ .all() \
+ + trans.sa_session.query( self.app.model.JobToOutputLibraryDatasetAssociation ) \
+ .filter_by( ldda_id=ldda_id ) \
+ .all():
+ if job_to_dataset_association.job.state not in [ job_to_dataset_association.job.states.OK, job_to_dataset_association.job.states.ERROR, job_to_dataset_association.job.states.DELETED ]:
+ return False
+ return True
+
# See if we have any associated templates
widgets = []
info_association, inherited = ldda.get_info_association()
@@ -480,14 +494,18 @@
widgets = ldda.get_template_widgets( trans )
if params.get( 'change', False ):
# The user clicked the Save button on the 'Change data type' form
- if ldda.datatype.allow_datatype_change and trans.app.datatypes_registry.get_datatype_by_extension( params.datatype ).allow_datatype_change:
- trans.app.datatypes_registry.change_datatype( ldda, params.datatype )
- trans.sa_session.flush()
- message = "Data type changed for library dataset '%s'." % ldda.name
- status = 'done'
+ if __ok_to_edit_metadata( ldda.id ):
+ if ldda.datatype.allow_datatype_change and trans.app.datatypes_registry.get_datatype_by_extension( params.datatype ).allow_datatype_change:
+ trans.app.datatypes_registry.change_datatype( ldda, params.datatype )
+ trans.sa_session.flush()
+ message = "Data type changed for library dataset '%s'." % ldda.name
+ status = 'done'
+ else:
+ message = "You are unable to change datatypes in this manner. Changing %s to %s is not allowed." % ( ldda.extension, params.datatype )
+ status = 'error'
else:
- message = "You are unable to change datatypes in this manner. Changing %s to %s is not allowed." % ( ldda.extension, params.datatype )
- status = 'error'
+ message = "This dataset is currently being used as input or output. You cannot change datatype until the jobs have completed or you have canceled them."
+ status = "error"
elif params.get( 'save', False ):
# The user clicked the Save button on the 'Edit Attributes' form
old_name = ldda.name
@@ -501,33 +519,40 @@
ldda.name = new_name
ldda.info = new_info
ldda.message = new_message
- # The following for loop will save all metadata_spec items
- for name, spec in ldda.datatype.metadata_spec.items():
- if spec.get("readonly"):
- continue
- optional = params.get( "is_" + name, None )
- if optional and optional == 'true':
- # optional element... == 'true' actually means it is NOT checked (and therefore ommitted)
- setattr( ldda.metadata, name, None )
- else:
- setattr( ldda.metadata, name, spec.unwrap( params.get ( name, None ) ) )
- ldda.metadata.dbkey = dbkey
- ldda.datatype.after_setting_metadata( ldda )
+ if __ok_to_edit_metadata( ldda.id ):
+ # The following for loop will save all metadata_spec items
+ for name, spec in ldda.datatype.metadata_spec.items():
+ if spec.get("readonly"):
+ continue
+ optional = params.get( "is_" + name, None )
+ if optional and optional == 'true':
+ # optional element... == 'true' actually means it is NOT checked (and therefore ommitted)
+ setattr( ldda.metadata, name, None )
+ else:
+ setattr( ldda.metadata, name, spec.unwrap( params.get ( name, None ) ) )
+ ldda.metadata.dbkey = dbkey
+ ldda.datatype.after_setting_metadata( ldda )
+ message = "Attributes updated for library dataset '%s'." % ldda.name
+ status = 'done'
+ else:
+ message = "Attributes updated, but metadata could not be changed because this dataset is currently being used as input or output. You must cancel or wait for these jobs to complete before changing metadata."
+ status = 'warning'
trans.sa_session.flush()
- message = "Attributes updated for library dataset '%s'." % ldda.name
- status = 'done'
elif params.get( 'detect', False ):
# The user clicked the Auto-detect button on the 'Edit Attributes' form
- for name, spec in ldda.datatype.metadata_spec.items():
- # We need to be careful about the attributes we are resetting
- if name not in [ 'name', 'info', 'dbkey' ]:
- if spec.get( 'default' ):
- setattr( ldda.metadata, name, spec.unwrap( spec.get( 'default' ) ) )
- ldda.datatype.set_meta( ldda )
- ldda.datatype.after_setting_metadata( ldda )
+ if __ok_to_edit_metadata( ldda.id ):
+ for name, spec in ldda.datatype.metadata_spec.items():
+ # We need to be careful about the attributes we are resetting
+ if name not in [ 'name', 'info', 'dbkey' ]:
+ if spec.get( 'default' ):
+ setattr( ldda.metadata, name, spec.unwrap( spec.get( 'default' ) ) )
+ message = "Attributes have been queued to be updated for library dataset '%s'." % ldda.name
+ status = 'done'
+ trans.app.datatypes_registry.set_external_metadata_tool.tool_action.execute( trans.app.datatypes_registry.set_external_metadata_tool, trans, incoming = { 'input1':ldda } )
+ else:
+ message = "This dataset is currently being used as input or output. You cannot change metadata until the jobs have completed or you have canceled them."
+ status = 'error'
trans.sa_session.flush()
- message = "Information updated for library dataset '%s'." % ldda.name
- status = 'done'
elif params.get( 'change_extended_metadata', False):
em_string = util.restore_text( params.get("extended_metadata", "") )
if len(em_string):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/47786821cd22/
Changeset: 47786821cd22
User: jmchilton
Date: 2014-05-15 21:59:57
Summary: Fix incorrect LWR comment.
Affected #: 1 file
diff -r a50b64b9d70704542eba7dd69410c2a25c54e2a3 -r 47786821cd22eed10d1db9227b2ac18eff760374 lib/galaxy/jobs/runners/lwr.py
--- a/lib/galaxy/jobs/runners/lwr.py
+++ b/lib/galaxy/jobs/runners/lwr.py
@@ -108,7 +108,7 @@
sleep( 2 )
job_state = self.__find_watched_job( job_id )
if not job_state:
- log.warn( "Failed to find job corresponding to final status %s in %s" % ( full_status, self.watched ) )
+ log.warn( "Failed to find job corresponding to status %s in %s" % ( full_status, self.watched ) )
else:
self.__update_job_state_for_lwr_status(job_state, full_status["status"])
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.