commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/0273de7467e0/ Changeset: 0273de7467e0 User: dan Date: 2014-12-03 16:35:35+00:00 Summary: DatasetMatcher should check to see if hda is of the correct format before attempting to filter on e.g. metadata attributes (that may not exist for a non-expected format). Affected #: 1 file diff -r 87ef26ad1876d0d6162eb4b6e7c93c8d69fbc4d6 -r 0273de7467e0f42a56ffa018c5fb9a53a6396e76 lib/galaxy/tools/parameters/dataset_matcher.py --- a/lib/galaxy/tools/parameters/dataset_matcher.py +++ b/lib/galaxy/tools/parameters/dataset_matcher.py @@ -39,27 +39,30 @@ return state_valid and ( not check_security or self.__can_access_dataset( dataset ) ) def valid_hda_match( self, hda, check_implicit_conversions=True, check_security=False ): - """ Return False of this parameter can not be matched to a the supplied + """ Return False of this parameter can not be matched to the supplied HDA, otherwise return a description of the match (either a HdaDirectMatch describing a direct match or a HdaImplicitMatch describing an implicit conversion.) """ + rval = False + formats = self.param.formats + if hda.datatype.matches_any( formats ): + rval = HdaDirectMatch( hda ) + else: + if not check_implicit_conversions: + return False + target_ext, converted_dataset = hda.find_conversion_destination( formats ) + if target_ext: + if converted_dataset: + hda = converted_dataset + if check_security and not self.__can_access_dataset( hda.dataset ): + return False + rval = HdaImplicitMatch( hda, target_ext ) + else: + return False if self.filter( hda ): return False - formats = self.param.formats - if hda.datatype.matches_any( formats ): - return HdaDirectMatch( hda ) - if not check_implicit_conversions: - return False - target_ext, converted_dataset = hda.find_conversion_destination( formats ) - if target_ext: - original_hda = hda - if converted_dataset: - hda = converted_dataset - if check_security and not self.__can_access_dataset( hda.dataset ): - return False - return HdaImplicitMatch( hda, target_ext, original_hda ) - return False + return rval def hda_match( self, hda, check_implicit_conversions=True, ensure_visible=True ): """ If HDA is accessible, return information about whether it could https://bitbucket.org/galaxy/galaxy-central/commits/13d43b327511/ Changeset: 13d43b327511 Branch: next-stable User: dan Date: 2014-12-03 16:35:35+00:00 Summary: DatasetMatcher should check to see if hda is of the correct format before attempting to filter on e.g. metadata attributes (that may not exist for a non-expected format). Affected #: 1 file diff -r f05ed31c16741b5c1a4a43c73697f7ca9a6919d8 -r 13d43b327511d46e836398fa09330722acccd419 lib/galaxy/tools/parameters/dataset_matcher.py --- a/lib/galaxy/tools/parameters/dataset_matcher.py +++ b/lib/galaxy/tools/parameters/dataset_matcher.py @@ -39,27 +39,30 @@ return state_valid and ( not check_security or self.__can_access_dataset( dataset ) ) def valid_hda_match( self, hda, check_implicit_conversions=True, check_security=False ): - """ Return False of this parameter can not be matched to a the supplied + """ Return False of this parameter can not be matched to the supplied HDA, otherwise return a description of the match (either a HdaDirectMatch describing a direct match or a HdaImplicitMatch describing an implicit conversion.) """ + rval = False + formats = self.param.formats + if hda.datatype.matches_any( formats ): + rval = HdaDirectMatch( hda ) + else: + if not check_implicit_conversions: + return False + target_ext, converted_dataset = hda.find_conversion_destination( formats ) + if target_ext: + if converted_dataset: + hda = converted_dataset + if check_security and not self.__can_access_dataset( hda.dataset ): + return False + rval = HdaImplicitMatch( hda, target_ext ) + else: + return False if self.filter( hda ): return False - formats = self.param.formats - if hda.datatype.matches_any( formats ): - return HdaDirectMatch( hda ) - if not check_implicit_conversions: - return False - target_ext, converted_dataset = hda.find_conversion_destination( formats ) - if target_ext: - original_hda = hda - if converted_dataset: - hda = converted_dataset - if check_security and not self.__can_access_dataset( hda.dataset ): - return False - return HdaImplicitMatch( hda, target_ext, original_hda ) - return False + return rval def hda_match( self, hda, check_implicit_conversions=True, ensure_visible=True ): """ If HDA is accessible, return information about whether it could 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.
participants (1)
-
commits-noreply@bitbucket.org