Skip to content

Commit

Permalink
Merge pull request #456 from kids-first/analyze-xls
Browse files Browse the repository at this point in the history
✨ Accept .xls file type for file analysis
  • Loading branch information
XuTheBunny authored Aug 25, 2020
2 parents 21e2d4a + 16bf179 commit c76d4d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions creator/analyses/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def CSVDictReader(data, delimiter=","):
"reader": partial(CSVDictReader, delimiter="\t"),
},
".xlsx": {"name": "Excel", "reader": XLSXDictReader},
".xls": {"name": "Excel", "reader": XLSXDictReader},
}

NUMBER_OF_COMMON_VALUES = 15
Expand Down
8 changes: 7 additions & 1 deletion tests/analyses/test_file_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ def test_file_formats(db, clients, upload_file):
client = clients.get("Administrators")
study = StudyFactory()

analyses = {"tsv": None, "csv": None, "xlsx": None}
analyses = {
"tsv": None,
"csv": None,
"xlsx": None,
"xls": None,
}

for fmt in analyses.keys():
resp = upload_file(
Expand All @@ -36,6 +41,7 @@ def test_file_formats(db, clients, upload_file):
getattr(analyses["csv"], attr)
== getattr(analyses["tsv"], attr)
== getattr(analyses["xlsx"], attr)
== getattr(analyses["xls"], attr)
)


Expand Down
Binary file not shown.

0 comments on commit c76d4d4

Please sign in to comment.