New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine dynamically if an extension corresponds to an unsniffable binary datatype #5109

Merged
merged 1 commit into from Dec 5, 2017

Conversation

Projects
None yet
3 participants
@nsoranzo
Member

nsoranzo commented Dec 1, 2017

Remove the need to call Binary.register_unsniffable_binary_ext() for each unsniffable binary datatype.

Fix #3441 , where the upload of files of a datatype defined in datatypes_conf.xml as subclass of an unsniffable binary datatype ended up with "The uploaded binary file contains inappropriate content" because it was not possible to register the subclassed datatype as unsniffable.

Also remove unused stop_err() function in upload.py .

Determine dynamically if an extension corresponds to an unsniffable b…
…inary datatype

Remove the need to call `Binary.register_unsniffable_binary_ext()` for
each unsniffable binary datatype.

Fix #3441 , where the upload
of files of a datatype defined in datatypes_conf.xml as subclass of an
unsniffable binary datatype ended up with "The uploaded binary file
contains inappropriate content" because it was not possible to register the
subclassed datatype as unsniffable.

Also remove unused `stop_err()` function in upload.py .
def is_ext_unsniffable(ext):
return ext in Binary.unsniffable_binary_formats
"""Deprecated method."""
pass

This comment has been minimized.

@dannon

dannon Dec 4, 2017

Member

I'm sure there's a reason, but why leave this in and just 'pass'? If it's here for compatibility, are we worried about external consumers receiving a None? And should it maybe log "Hey, this code is a deprecated function and may not behave how you expect" or the like?

This comment has been minimized.

@nsoranzo

nsoranzo Dec 5, 2017

Member

I think you're reading the diff wrong, is_ext_unsniffable() has been removed, register_unsniffable_binary_ext() is kept for backward compatibility, but never returned anything.

This comment has been minimized.

@dannon

dannon Dec 5, 2017

Member

@nsoranzo D'oh, yes, I glanced through this too quickly.

@dannon dannon merged commit 2111218 into galaxyproject:dev Dec 5, 2017

7 checks passed

api test Build finished. 331 tests run, 4 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 164 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 59 tests run, 0 skipped, 0 failed.
Details
lgtm analysis: JavaScript No alert changes
Details
selenium test Build finished. 117 tests run, 2 skipped, 0 failed.
Details
toolshed test Build finished. 577 tests run, 0 skipped, 0 failed.
Details

@nsoranzo nsoranzo deleted the nsoranzo:deprecate_register_unsniffable_binary_ext branch Dec 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment