Skip to content
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

Type check predictive unit parameters in the Python wrapper #440

Closed
jklaise opened this issue Feb 11, 2019 · 0 comments · Fixed by #488
Closed

Type check predictive unit parameters in the Python wrapper #440

jklaise opened this issue Feb 11, 2019 · 0 comments · Fixed by #488
Assignees
Projects
Milestone

Comments

@jklaise
Copy link
Member

jklaise commented Feb 11, 2019

We should check types when converting the json strings defining predictive unite parameters to python types:

def parse_parameters(parameters):
type_dict = {
"INT": int,
"FLOAT": float,
"DOUBLE": float,
"STRING": str,
"BOOL": bool
}
parsed_parameters = {}
for param in parameters:
name = param.get("name")
value = param.get("value")
type_ = param.get("type")
parsed_parameters[name] = type_dict[type_](value)
return parsed_parameters

@jklaise jklaise added this to the 0.2.x milestone Feb 11, 2019
@jklaise jklaise added this to To do in 0.2.6 via automation Feb 11, 2019
@ukclivecox ukclivecox removed this from To do in 0.2.6 Feb 18, 2019
@ukclivecox ukclivecox added this to In progress in 0.2.7 Feb 21, 2019
@ukclivecox ukclivecox moved this from In progress to Done in 0.2.7 Apr 4, 2019
agrski pushed a commit that referenced this issue Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
0.2.7
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants