diff --git a/cgp_seq_input_val/manifest.py b/cgp_seq_input_val/manifest.py index 0b17e51..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 = [] @@ -230,6 +233,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 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'],