Skip to content

Conversation

@tedpearson
Copy link
Collaborator

This PR was begun almost a week ago and I just finished it up tonight. It may be a bit rough around the edges, and you may or may not want to move in this direction, so rejection/disagreements will be fine here.

I started this out wanting to have a single fluent style for point creation. This resulted in failing tests due to map iteration order, so I ended up changing both tags and fields to use slices instead of maps internally. I also realized I missed adding static tags to sleep metrics, so this adds them. I don't have a full grasp of the changes right now as it's late and it's been several days since I began, so it might take a bit of extra work to resolve any comments.

Summary:

  • tags and fields will always be output in the same order.
  • store fields and tags as slices instead of maps
  • reorder test fixtures and output as necessary
  • Create points the same, in the more fluent style
  • add static tags to sleep metrics again

…tyle for point creation.

- tags and fields will always be output in the same order.
- store fields and tags as slices instead of maps
- reorder test fixtures and output as necessary
- Create points the same, in the more fluent style
- add static tags to sleep metrics again
@irvinlim
Copy link
Owner

I'll hold off reviewing this until #17 is merged since that is a dependency - it'll make it easier to sift through the new changes.

Thanks for the effort!

@irvinlim
Copy link
Owner

Hey @tedpearson, if you're still interested in working on this PR, you can rebase your changes onto the latest main, and I'll review from there!

@tedpearson
Copy link
Collaborator Author

Weird. I thought I had already done so! 😂 Must have forgotten. Ready for review now.

Copy link
Owner

@irvinlim irvinlim left a comment

Choose a reason for hiding this comment

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

Rest LGTM!

@codecov-commenter
Copy link

codecov-commenter commented Dec 1, 2022

Codecov Report

Base: 70.90% // Head: 71.93% // Increases project coverage by +1.03% 🎉

Coverage data is based on head (c47dcfd) compared to base (0f578a7).
Patch coverage: 90.90% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
+ Coverage   70.90%   71.93%   +1.03%     
==========================================
  Files           7        7              
  Lines         622      620       -2     
==========================================
+ Hits          441      446       +5     
+ Misses        143      139       -4     
+ Partials       38       35       -3     
Impacted Files Coverage Δ
pkg/backends/influxdb/backend.go 81.65% <88.57%> (-0.05%) ⬇️
pkg/backends/influxdb/workouts.go 100.00% <100.00%> (ø)
pkg/healthautoexport/types.go 57.06% <100.00%> (+3.65%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@irvinlim
Copy link
Owner

irvinlim commented Dec 1, 2022

LGTM, you can merge when you are ready~

@tedpearson tedpearson merged commit a3877ba into main Dec 1, 2022
@tedpearson tedpearson deleted the ted/metric-creation-style branch December 1, 2022 19:08
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.

4 participants