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

BAC-296: update Client.Evaluate call to version 1.2alpha1 (breaking) #34

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

magnusgohn
Copy link
Collaborator

i have updated the clarify go sdk to support the new evaluate parameter groups. i have also updated some names to match the changes introduced in BAC-282. lastly i have updated the automation and examples packages to use the new builder style EvaluateRequest type

automation/doc.go Outdated Show resolved Hide resolved
fields/evaluate.go Outdated Show resolved Hide resolved
fields/evaluate.go Outdated Show resolved Hide resolved
Copy link
Contributor

@smyrman smyrman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure you enable an automatic formatter.

fields/evaluate.go Show resolved Hide resolved
@magnusgohn
Copy link
Collaborator Author

thank you sindre, i'll be back with something corrected

@magnusgohn magnusgohn force-pushed the magnus/evaluate branch 3 times, most recently from 947ad27 to 1058855 Compare January 20, 2024 17:40
@magnusgohn magnusgohn marked this pull request as ready for review January 20, 2024 19:09
fields/evaluate.go Outdated Show resolved Hide resolved
fields/evaluate.go Outdated Show resolved Hide resolved
fields/evaluate.go Outdated Show resolved Hide resolved
fields/evaluate.go Outdated Show resolved Hide resolved
@smyrman
Copy link
Contributor

smyrman commented Jan 22, 2024

Split in two documents, but try to follow this commit-style:

E.g.

update Client.Evaluate call to version 1.2alpha1 (breaking)
<Blank line>
<Longer description, including list all breaking changes>

In PR title, add issue prefix: BAC-296: update Client.Evaluate call to version 1.2alpha1 (breaking)

For this case, there is no (sub-component) prefix needed.

@magnusgohn magnusgohn force-pushed the magnus/evaluate branch 3 times, most recently from ad74157 to 5e45f98 Compare January 22, 2024 10:14
@magnusgohn magnusgohn changed the title BAC-296 updated sdk with the new groups parameter for evaluate BAC-296: update Evaluate call to version 1.2alpha1 (breaking) Jan 22, 2024
@magnusgohn magnusgohn changed the title BAC-296: update Evaluate call to version 1.2alpha1 (breaking) BAC-296: update Client.Evaluate call to version 1.2alpha1 (breaking) Jan 22, 2024
this introduces a breaking change in `Evaluate` requiring users of
this function to update as follows:
```
Evaluate(items, calculations, data)
        ↓
Evaluate(data).
    Items(items...).
    Calculations(calculations...)
```
the type `AggregateMethod` has been updated as follows:
```
AggregateMethod → TimeAggregationMethod
```
with new value names:
```
AggregateDefault          → TimeAggregationDefault
AggregateCount            → TimeAggregationCount
AggregateMin              → TimeAggregationMin
AggregateMax              → TimeAggregationMax
AggregateSum              → TimeAggregationSum
AggregateAvg              → TimeAggregationAvg
AggregateStateHistSeconds → TimeAggregationSeconds
AggregateStateHistPercent → TimeAggregationPercent
AggregateStateHistRate    → TimeAggregationRate
```
the type `ItemAggregation` has been updated as follows:
```
ItemAggregation → EvaluateItem
```
@magnusgohn magnusgohn merged commit 6f10f57 into main Jan 22, 2024
1 check passed
@magnusgohn magnusgohn deleted the magnus/evaluate branch January 22, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants