-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to variable sequences and file based configuration #32
Add support to variable sequences and file based configuration #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved 🐛
side note
We could further support variables referencing to each other, with only one rule: variable is allowed to reference any variable declared before it.
All it takes is to replace string
s by TelemetryTemplate
s in variable values on startup. And when generating values, evaluate these templates to strings.
Whether these super capabilities would help any of our users, I don't know 🙃
But one could do wild things like:
[
{
"name": "Counter"
},
{
"name": "DeviceName",
"random": true,
"values": [ "Alice", "Bob" ]
},
{
"name": "DeviceLength",
"sequence": true,
"values": [ "$.Counter", "$.Counter", "$.Counter", "$.Counter", "$.Counter", "true", "false", "$.Counter" ]
},
{
"name": "DeviceLengthWithCmSuffix",
"value": "$DeviceLength cm"
},
{
"name": "DeviceDescription",
"random": true,
"value": ["$DeviceName of length $DeviceLengthWithCmSuffix", "$DeviceName:$DeviceLength"]
}
]
Co-authored-by: Konstantin Gukov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve, but in the future I'd limit ResetNotUsedReferencedVariables
to a particular variable type that needs it:
#36 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good to me :)
Purpose
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?