-
Notifications
You must be signed in to change notification settings - Fork 6
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
New mutation setHeuristic for phase 2 store refactor #337
Conversation
|
||
dataDictionary: { | ||
annotated: { | ||
column1: { transformationHeuristic: "" } |
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.
minor point: in the default state of the store.state
the transformationHeuristic
attribute doesn't exist for a column.
That makes sense, not every column will need one, so probably best not to create the field by default.
However: it would be good to have a test here that checks that we actually successfully create the attribute as well.
i.e.:
- mock the state to not have
transformationHeuristic
(i.e. to reflect the default state), - fire the mutation
- ensure that 1) the respective column now does have the
transformationHeuristic
attribute, and 2) that the value of this attribute is correct
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.
@surchs Makes sense. One moment.
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.
@surchs Okay. Just added the existence check as well. Check it out and see what you think.
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.
Nice, looks good @jarmoza. I left some suggestions for clarity - all minor. Add where you agree, but otherwise good to go!
This PR addresses #270.
setHeuristic
is now a mutation that takes a column and heuristic name and assigns the heuristic to thetransformationHeuristic
field in the data dictionary object for that columnsetHeuristic
mutation.annot-continuous-values
component has been amended to understandsetHeuristic
as a mutation instead of an action.