Skip to content

Commit

Permalink
Propogate param_renaming_uses_strata_names argument from stratify end…
Browse files Browse the repository at this point in the history
…point to stratify method
  • Loading branch information
nanglo123 committed Sep 30, 2024
1 parent 1a33254 commit bb208e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mira/dkg/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ class StratificationQuery(BaseModel):
"will stratify all concepts.",
examples=[["recovered"]],
)
param_renaming_uses_strata_names: Optional[bool] = Field(
False,
description="If true, the strata names will be used in the parameter "
"renaming. If false, the strata indices will be used. "
"Default: False",
examples=[False]
)

def get_conversion_cls(self) -> Type[Template]:
if self.conversion_cls == "natural_conversion":
Expand Down Expand Up @@ -339,6 +346,7 @@ def model_stratification(
params_to_preserve=stratification_query.params_to_preserve,
concepts_to_stratify=stratification_query.concepts_to_stratify,
concepts_to_preserve=stratification_query.concepts_to_preserve,
param_renaming_uses_strata_names=stratification_query.param_renaming_uses_strata_names
)
return template_model

Expand Down

0 comments on commit bb208e1

Please sign in to comment.