Skip to content

Commit

Permalink
address greg's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestoarbitrio committed Feb 26, 2024
1 parent 3a8ea46 commit e8909f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cr/cube/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,9 @@ def shimmed_dimension_dict(self) -> Dict:

# --- array variables are identified by thier aliases
if self.dimension_type in DT.ARRAY_TYPES:
# --- Replace element ids with the alias
# --- Add new field to the shim for the alias to be associated to the
# --- existing ID. This augmentation of the dimension dict it a temporary
# --- hack for subvariable ref that should change in future
for idx, alias in enumerate(self._subvar_aliases):
shim["type"]["elements"][idx]["subvar_alias"] = alias

Expand All @@ -658,6 +660,10 @@ def shimmed_dimension_dict(self) -> Dict:
for el in shim["type"]["elements"]:
# --- Missing data comes in as a dict and should be ignored
if not isinstance(el["value"], dict):
# --- Add new field to the shim for datetime value to be associated
# --- to the existing ID. This augmentation of the dimension dict
# --- it a temporary hack for subvariable ref that should change
# --- in future
el["datetime_value"] = el["value"]

# --- Leave other types alone
Expand Down

0 comments on commit e8909f2

Please sign in to comment.