Closed bhagenbourger closed 4 months ago
I only manage string type for the moment for string provider. I will do another PR for other types later.
Is this what you expected for constant provider?
Thank you for your feedback @vianneybacoup I think about your advice and I propose to split what I did into three providers:
What do you think about that?
Thank you for your feedback @vianneybacoup I think about your advice and I propose to split what I did into three providers:
- ConstantStringProvider : a provider which accepts a single value and returns this value
- ListStringProvider : a provider which accepts a list of values and returns a value randomly chosen
- WeightedListStringProvider : a provider which accepts a weighted list of values and returns a value weighted randomly chosen
What do you think about that?
That's perfect. This should be purely on dev side. For the user, it will access those three providers with Constant.string (like what you did already), and the new_from_yaml function will return the correct one.
Hello @vianneybacoup I tried to improve my code following your comments, let me know if I need to do other improvements.
No worries, I didn't have time to fix that sooner. I just amended my commit with the fixes.
Partially solves #20