-
Couldn't load subscription status.
- Fork 79
Add qiimp xlsx #2599
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
Merged
ElDeveloper
merged 7 commits into
qiita-spots:release-candidate
from
antgonza:add-qiimp-xlsx
Jun 4, 2018
Merged
Add qiimp xlsx #2599
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
51986a1
fix-secure
antgonza d701b81
improve available files display
antgonza 011b339
Merge branch 'release-candidate' of https://github.com/biocore/qiita …
antgonza 2fe8e71
initial code for accepting xlsx qiimp files
antgonza fd564e6
adding more tests and valid python 2.7 code for openpyxl
antgonza df980db
adding empty test to load_template_to_dataframe
antgonza 39d7906
addressing @ElDeveloper comment
antgonza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to fail when
filepath_oris not a string because it won't have theendswithmethod, right?I think the XLSX parsing should be moved elsewhere this function seems too generic as it should only open a file path or file handle. Is there any motivation to have this here instead of in the sample/prep information parsing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! I initially was gonna add the code in
load_template_to_dataframebut realized that it really just calls this function (see, https://github.com/biocore/qiita/blob/master/qiita_db/metadata_template/util.py#L100) as it just calls the open_file method. BTW note that the same method is available to open hdf5, text, or iostring. Thus, I believe is fine to fail if not a string as the other code should be able to handle and parse correctly those errors. Thoughts?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, the use of this function is rather limited (see these search results). It still seems too odd to me that a function that's intended to return a file handle will parse a file write it as a txt file and return that file handle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the idea of parsing the xmlx is that it will be transformed to txt and then use the regular prep/sample code ... ¯_(ツ)_/¯ ... I don't have a better place to move it but if you do, let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to have this outside of this function. I see as two very different things, (1) opening a file and (2) parsing a file. And this function opens the file and shouldn't be parsing it. Is there any technical limitation to putting this in load_template_to_dataframe? Perhaps as a helper function somewhere in there?