Refactor export
stage to use a config dict representing the workbook structure
#221
Labels
pipeline
Code that glues all the model bits together
When you add or remove a column from the desk review workbook template used by the
export
pipeline stage (misc/desk_review_template.xlsx
), you currently have to adjust all the individual references to integer and/or letter column positions for columns that come after your new column(s) inpipeline/export.R
, as well as tweak the code to add any necessary formatting to the column. This is annoying and error-prone.I think a better design would be refactor the pipeline stage to use a centralized data structure like a dictionary of dictionaries to read all of the position and formatting metadata about every column, so that adding or removing a column only requires updating the one data structure. I'm imagining something like:
Using this kind of data structure, the position of each column could be determined with a
which()
call and the column's name, and the code could be updated to iterate the list of columns and apply formatting appropriately.The text was updated successfully, but these errors were encountered: