commit/galaxy-central: 3 new changesets
3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/62d0924f163b/ Changeset: 62d0924f163b User: nsoranzo Date: 2013-03-06 12:37:08 Summary: Fix file extension determination Extension was determined uncorrectly for filenames with more than 1 dot Affected #: 1 file diff -r 3a3eab0b0adbda30e72fdda0c5de899728bcd5e6 -r 62d0924f163b8731adaf582056587c0c4f415a7b tools/data_source/upload.py --- a/tools/data_source/upload.py +++ b/tools/data_source/upload.py @@ -247,7 +247,7 @@ #binary_ok = False parts = dataset.name.split( "." ) if len( parts ) > 1: - ext = parts[1].strip().lower() + ext = parts[-1].strip().lower() if not Binary.is_ext_unsniffable(ext): file_err( 'The uploaded binary file contains inappropriate content', dataset, json_file ) return https://bitbucket.org/galaxy/galaxy-central/commits/d6f866cbf12d/ Changeset: d6f866cbf12d User: nsoranzo Date: 2013-03-06 12:39:04 Summary: Add generic ASN.1 text and binary datatypes Affected #: 3 files diff -r 62d0924f163b8731adaf582056587c0c4f415a7b -r d6f866cbf12d0242089fbbbfb799fb20600441cf datatypes_conf.xml.sample --- a/datatypes_conf.xml.sample +++ b/datatypes_conf.xml.sample @@ -3,6 +3,8 @@ <registration converters_path="lib/galaxy/datatypes/converters" display_path="display_applications"><datatype extension="ab1" type="galaxy.datatypes.binary:Ab1" mimetype="application/octet-stream" display_in_upload="true"/><datatype extension="afg" type="galaxy.datatypes.assembly:Amos" display_in_upload="false"/> + <datatype extension="asn1" type="galaxy.datatypes.data:GenericAsn1" mimetype="text/plain" display_in_upload="true" /> + <datatype extension="asn1-binary" type="galaxy.datatypes.binary:GenericAsn1Binary" mimetype="application/octet-stream" display_in_upload="true" /><datatype extension="axt" type="galaxy.datatypes.sequence:Axt" display_in_upload="true"/><datatype extension="fli" type="galaxy.datatypes.tabular:FeatureLocationIndex" display_in_upload="false"/><datatype extension="bam" type="galaxy.datatypes.binary:Bam" mimetype="application/octet-stream" display_in_upload="true"> diff -r 62d0924f163b8731adaf582056587c0c4f415a7b -r d6f866cbf12d0242089fbbbfb799fb20600441cf lib/galaxy/datatypes/binary.py --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -85,6 +85,12 @@ Binary.register_unsniffable_binary_ext("ab1") +class GenericAsn1Binary( Binary ): + """Class for generic ASN.1 binary format""" + file_ext = "asn1-binary" + +Binary.register_unsniffable_binary_ext("asn1-binary") + class Bam( Binary ): """Class describing a BAM binary file""" file_ext = "bam" diff -r 62d0924f163b8731adaf582056587c0c4f415a7b -r d6f866cbf12d0242089fbbbfb799fb20600441cf lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py +++ b/lib/galaxy/datatypes/data.py @@ -739,6 +739,10 @@ f.close() split = classmethod(split) +class GenericAsn1( Text ): + """Class for generic ASN.1 text format""" + file_ext = 'asn1' + class LineCount( Text ): """ Dataset contains a single line with a single integer that denotes the https://bitbucket.org/galaxy/galaxy-central/commits/b7a05dcaa521/ Changeset: b7a05dcaa521 User: dannon Date: 2013-04-04 14:41:54 Summary: Merged in nsoranzo/galaxy-central (pull request #135) Add generic ASN.1 text and binary datatypes Affected #: 4 files diff -r 740d8a84d0abeaf28c423fe98b8bee121ba92934 -r b7a05dcaa5211ac29af0d3aa201a526e51eb0bfa datatypes_conf.xml.sample --- a/datatypes_conf.xml.sample +++ b/datatypes_conf.xml.sample @@ -3,6 +3,8 @@ <registration converters_path="lib/galaxy/datatypes/converters" display_path="display_applications"><datatype extension="ab1" type="galaxy.datatypes.binary:Ab1" mimetype="application/octet-stream" display_in_upload="true"/><datatype extension="afg" type="galaxy.datatypes.assembly:Amos" display_in_upload="false"/> + <datatype extension="asn1" type="galaxy.datatypes.data:GenericAsn1" mimetype="text/plain" display_in_upload="true" /> + <datatype extension="asn1-binary" type="galaxy.datatypes.binary:GenericAsn1Binary" mimetype="application/octet-stream" display_in_upload="true" /><datatype extension="axt" type="galaxy.datatypes.sequence:Axt" display_in_upload="true"/><datatype extension="fli" type="galaxy.datatypes.tabular:FeatureLocationIndex" display_in_upload="false"/><datatype extension="bam" type="galaxy.datatypes.binary:Bam" mimetype="application/octet-stream" display_in_upload="true"> diff -r 740d8a84d0abeaf28c423fe98b8bee121ba92934 -r b7a05dcaa5211ac29af0d3aa201a526e51eb0bfa lib/galaxy/datatypes/binary.py --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -85,6 +85,12 @@ Binary.register_unsniffable_binary_ext("ab1") +class GenericAsn1Binary( Binary ): + """Class for generic ASN.1 binary format""" + file_ext = "asn1-binary" + +Binary.register_unsniffable_binary_ext("asn1-binary") + class Bam( Binary ): """Class describing a BAM binary file""" file_ext = "bam" diff -r 740d8a84d0abeaf28c423fe98b8bee121ba92934 -r b7a05dcaa5211ac29af0d3aa201a526e51eb0bfa lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py +++ b/lib/galaxy/datatypes/data.py @@ -739,6 +739,10 @@ f.close() split = classmethod(split) +class GenericAsn1( Text ): + """Class for generic ASN.1 text format""" + file_ext = 'asn1' + class LineCount( Text ): """ Dataset contains a single line with a single integer that denotes the diff -r 740d8a84d0abeaf28c423fe98b8bee121ba92934 -r b7a05dcaa5211ac29af0d3aa201a526e51eb0bfa tools/data_source/upload.py --- a/tools/data_source/upload.py +++ b/tools/data_source/upload.py @@ -247,7 +247,7 @@ #binary_ok = False parts = dataset.name.split( "." ) if len( parts ) > 1: - ext = parts[1].strip().lower() + ext = parts[-1].strip().lower() if not Binary.is_ext_unsniffable(ext): file_err( 'The uploaded binary file contains inappropriate content', dataset, json_file ) return 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