Expose and Variant have difficult method signatures
Closed this issue · 2 comments
markis commented
Mostly the hard part to keep track of is name
in variant
and experiment_name
in expose
.
From here:
https://github.com/reddit/baseplate.py/blob/develop/baseplate/lib/experiments/__init__.py#L138
def variant(
self,
name: str,
user: Optional[User] = None,
bucketing_event_override: Optional[bool] = None,
**kwargs: str,
) -> Optional[str]:
From here:
https://github.com/reddit/baseplate.py/blob/develop/baseplate/lib/experiments/__init__.py#L233
def expose(
self, experiment_name: str, variant_name: str, user: Optional[User] = None, **kwargs: str
) -> None:
Would it be possible to add experiment_name
to variant
and deprecate name
? Or just accept both?
spladug commented
Making the naming consistent between the two calls sounds good to me. Deprecating the old one also sounds good as long as we don't break apps that are using the old name still.
Are you interested in taking this on?
markis commented
Yes, I am interested in taking it on. I wanted to ask before filing a PR.