From a5de6fe3134fe9ac487eaf01d498d0a7ed89d132 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Wed, 22 Nov 2017 20:09:25 +0000 Subject: [PATCH 1/3] Fixes #7 --- cgp_seq_input_val/manifest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cgp_seq_input_val/manifest.py b/cgp_seq_input_val/manifest.py index 0b17e51..d4baae5 100644 --- a/cgp_seq_input_val/manifest.py +++ b/cgp_seq_input_val/manifest.py @@ -230,6 +230,10 @@ def __init__(self, manifest): header_items[row[0]] = val # now load the ini based on 'Form type:' and 'Form version:' + if 'Form type:' not in header_items: + raise ParsingError('"Form type:" not found in header') + if 'Form version:' not in header_items: + raise ParsingError('"Form version:" not found in header') self.type = header_items['Form type:'] self.version = header_items['Form version:'] self.uuid = None From f9d16d0aa68fb3a93949bf09b5ccd16994426b2e Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Wed, 22 Nov 2017 20:49:00 +0000 Subject: [PATCH 2/3] Fixes #8 --- cgp_seq_input_val/manifest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cgp_seq_input_val/manifest.py b/cgp_seq_input_val/manifest.py index d4baae5..ce87478 100644 --- a/cgp_seq_input_val/manifest.py +++ b/cgp_seq_input_val/manifest.py @@ -134,6 +134,9 @@ def _excel_to_tsv(self, ofh): formatting_info=False, on_demand=True, ragged_rows=True) + if 'For entry' not in book.sheet_names(): + raise ParsingError('xls[x] workbooks require the data sheet to be named "For entry"') + sheet = book.sheet_by_name('For entry') for r in range(0, sheet.nrows): simplerow = [] From 7e82675d6106d88b98e6f76eadf9de5b126be9bf Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Wed, 22 Nov 2017 20:50:07 +0000 Subject: [PATCH 3/3] bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7746631..fc92761 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ 'url': 'https://github.com/cancerit/cgp_seq_input_val', 'download_url': '', 'author_email': 'cgphelp@sanger.ac.uk', - 'version': '1.2.0', + 'version': '1.2.1', 'python_requires': '>= 3.4', 'setup_requires': ['pytest'], 'install_requires': ['progressbar2', 'xlrd'],