Skip to content
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

Misc datatypes fixes and enhancements #2690

Merged
merged 2 commits into from Jul 29, 2016

Conversation

nsoranzo
Copy link
Member

  • Redefine svg datatype as subclass of GenericXml
  • Fix some wrong file_ext
  • Fix import order and Python3 compatibility
  • Specify some classes as abstracts
  • Use super() to call superclass methods
  • Various semplifications

SVG is XML-based and Python Pillow does not support it.
- Specify some classes are abstracts
- Use super() to call superclass methods
- Various simplifications
@@ -72,7 +72,7 @@ def display_peek(self, dataset):
class ProtXmlReport(Tabular):
"""protxml converted to tabular report"""
edam_data = "data_2536"
file_ext = "tsv"
file_ext = "protxml.tsv"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw you make this comment the other day, and it seemed wrong at the time - that this extension needs to match the datatypes_conf.xml file. I thought file_ext in this file is used for downloads - and that many things with the same file_ext could all have different datatypes_conf.xml keys.

I wouldn't make this change - do you have evidence that it needs to match up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmchilton The file_ext attribute is not used when downloading a history dataset, in fact if you have a "protxml.tsv" dataset on Galaxy Main and click the disk icon, the downloaded file will have ".protxml.tsv" extension. It is instead used by the guess_ext function in https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/datatypes/sniff.py#L369 .

This PR fixes a problem for the upload of hmm2 and hmm3 files, if you upload a text file starting with HMMER2.0 on Galaxy Main, the sniffer recognizes it as hmm instead of hmm2 because the file_ext attribute was wrong.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay then - I stand quite corrected. Thanks for schooling me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmchilton I was also assuming it has something do to with the download extension and I think there should be such a reall-ife extension defined in a datatype, isn't it?

@nsoranzo
Copy link
Member Author

All tests pass after a restart.

@jmchilton jmchilton merged commit 3fd0e40 into galaxyproject:dev Jul 29, 2016
@nsoranzo nsoranzo deleted the datatypes_fixes branch August 1, 2016 09:48
zipho added a commit to SANBI-SA-archive/galaxy that referenced this pull request Aug 1, 2016
…_fixes"

This reverts commit 3fd0e40, reversing
changes made to 9aac156.
@nsoranzo
Copy link
Member Author

nsoranzo commented Aug 3, 2016

xref #1715

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

Successfully merging this pull request may close these issues.

None yet

3 participants