[Feature] Conditional `d_features`
Closed this issue · 1 comments
markoshorro commented
Maybe we want to limit certain values to the value of other variables, e.g.:
d_features:
foo:
evaluate: True
type: "string"
value: [0,2]
bar:
evaluate: True
type: "string"
value: [0,1]
For the sake of the argument, imagine when foo
is lower than 2
, bar
variable has no effect and, therefore, we do not want to generate the combination with the bar
values. So the list of combinations would be:
[foo: 0]
,[foo: 2, bar: 0]
,[foo: 2, bar: 1]
We could write that description as:
bar:
evaluate: True
type: "string"
value: [0,1]
restrict: "foo > 1"
markoshorro commented
I had to rewrite the product, inspect the values, and discard those which I do not want. This is not fast at all... But it gives a lot of functionality.