Update creation_helpers.py

add DH support
This commit is contained in:
Cal Corum 2023-02-24 21:47:37 -06:00
parent 1b1c8a5c0d
commit dca8eaa8cd

View File

@ -540,7 +540,7 @@ def get_col(col_num):
def write_to_csv(output_path, file_name: str, row_data: list): def write_to_csv(output_path, file_name: str, row_data: list):
# Build the csv output # Build the csv output
fpath = (output_path / f'{file_name}').with_suffix('.csv') fpath = (output_path / f'{file_name}').with_suffix('.csv')
logging.info(f'Printing following data to {file_name}:\n\n{row_data}') # logging.info(f'Printing following data to {file_name}:\n\n{row_data}')
with fpath.open(mode='w+', newline='', encoding='utf-8') as csv_File: with fpath.open(mode='w+', newline='', encoding='utf-8') as csv_File:
writer = csv.writer(csv_File) writer = csv.writer(csv_File)
writer.writerows(row_data) writer.writerows(row_data)
@ -613,6 +613,9 @@ def get_position_string(all_pos: list, inc_p: bool):
def ordered_positions(all_pos: list) -> list: def ordered_positions(all_pos: list) -> list:
if len(all_pos) == 0:
return ['DH']
all_def = [] all_def = []
for x in all_pos: for x in all_pos: