Skip to content

Commit

Permalink
Merge pull request #377 from nanglo123/add_argument_stratify_endpoint
Browse files Browse the repository at this point in the history
Propogate param_renaming_uses_strata_names argument from stratify endpoint to stratify method
  • Loading branch information
bgyori authored Oct 1, 2024
2 parents 1a33254 + bb208e1 commit bd7095d
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 bd7095d

Please sign in to comment.