Skip to content

Commit

Permalink
Hack: more tweaks to the new mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-krishna committed Dec 6, 2023
1 parent 010dfb7 commit a2f0ac7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions times_reader/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ def __init__(
for m in param_mappings:
# TODO use normalized names in times_info_file instead of fixing here?
tag = Tag(m.xl_name)
m.xl_cols = [self.column_aliases[tag].get(c, c) for c in m.xl_cols]
m.col_map = {
k: self.column_aliases[tag].get(v, v) for k, v in m.col_map.items()
}
substitution = self.column_aliases[tag]
substitution.pop(
"value", None
) # TODO hack to stop renaming value to allregions
m.xl_cols = [substitution.get(c, c) for c in m.xl_cols]
m.col_map = {k: substitution.get(v, v) for k, v in m.col_map.items()}
name_to_map[m.times_name] = m
self.times_xl_maps = list(name_to_map.values())

Expand Down

0 comments on commit a2f0ac7

Please sign in to comment.