Skip to content

Commit

Permalink
updates based on PR review, thanks @daisieh
Browse files Browse the repository at this point in the history
  • Loading branch information
mshadbolt committed Nov 22, 2023
1 parent 2eba9b4 commit 70f3dc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
9 changes: 6 additions & 3 deletions CSVConvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,14 @@ def read_mapping_template(mapping_path):
continue
joined_line = ''
for value in line:
if value == '':
if value.strip() == '':
continue
else:
joined_line = joined_line + value + ','
template_lines.append(joined_line.rstrip(','))
joined_line = joined_line + value.strip() + ','
if joined_line == '':
continue
else:
template_lines.append(joined_line.rstrip(','))
except FileNotFoundError:
sys.exit(f"Mapping template {mapping_path} not found. Ensure your mapping template is in the directory with the"
f" manifest.yml and is specified correctly.")
Expand Down
11 changes: 0 additions & 11 deletions mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,6 @@ def float(data_values):
return None


# This seems like a duplicate of the method above, ok to delete?
# def double(data_values):
# cell = single_val(data_values)
# if cell is None or cell.lower() == "nan":
# return None
# try:
# return float_val(cell)
# except:
# return None


def ontology_placeholder(data_values):
"""Placeholder function to make a fake ontology entry.
Expand Down

0 comments on commit 70f3dc1

Please sign in to comment.