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

Allow to pass precission for every field in Aggregator #24

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

ecarreras
Copy link
Member

@ecarreras ecarreras commented Jan 16, 2025

This pull request introduces enhancements to the Aggregator class to support precision handling for aggregated fields and updates the corresponding tests to verify this new functionality.

Enhancements to Aggregator class:

  • ooui/helpers/aggregated.py: Added an optional precisions parameter to the Aggregator class to allow specifying the precision for each field. Updated the process method to use this precision when performing aggregation functions like sum, count, avg, max, and min.

Updates to tests:

  • spec/aggregated_spec.py: Added new tests to verify that the Aggregator class correctly handles precision for fields during aggregation. These tests ensure that the precision is applied correctly for floating-point numbers and that integers are not rounded.

@ecarreras ecarreras added enhancement New feature or request minor Create a Minor version labels Jan 16, 2025
@ecarreras ecarreras self-assigned this Jan 16, 2025
@ecarreras ecarreras changed the title feat(agg): allow to pass precission for every field Allow to pass precission for every field in Aggregator Jan 16, 2025
@ecarreras ecarreras merged commit a8c0860 into main Jan 16, 2025
1 check passed
@ecarreras ecarreras deleted the 68842/fix-round branch January 16, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor Create a Minor version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant