fix(docs): Remove AI instructions to multiply percentage metrics by 100#10607
Draft
fix(docs): Remove AI instructions to multiply percentage metrics by 100#10607
Conversation
- Updated documentation to use 1.0 * instead of 100.0 * for percentage calculations - Frontend now automatically multiplies by 100 when format: percent is used - Changed examples in getting started guides, recipes, and API documentation - Updated Funnels extension conversionsPercent measure - Updated test fixtures and example schemas - Kept decimal point multiplication (1.0 *) to ensure proper floating point division Resolves CUB-2081 Co-authored-by: Artyom Keydunov <artyom.keydunov@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #10607 +/- ##
===========================================
- Coverage 78.58% 57.91% -20.68%
===========================================
Files 475 225 -250
Lines 92831 17587 -75244
Branches 3614 3614
===========================================
- Hits 72954 10185 -62769
+ Misses 19333 6858 -12475
Partials 544 544
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR removes incorrect AI instructions and examples that suggest multiplying percentage metrics by 100. The Cube frontend now automatically handles percentage formatting when
format: percentis specified, so multiplication by 100 in the SQL is no longer needed and results in incorrect values (e.g., showing 5000% instead of 50%).Changes
Documentation Updates
completed_percentageexamples in Cloud and Databricks tutorialspaying_percentageCode Changes
conversionsPercentmeasure to use1.0 *instead of100.0 *examples/recipes/active-users: Fixed WAU to MAU ratioexamples/recipes/referencing-dynamic-measures: Fixed percentage measurescalendar_orders.ymltest fixtureKey Changes
Before (Incorrect):
After (Correct):
Rationale
format: percent1.0 *ensures proper floating-point division while avoiding the multiplication issueTesting
Related Issue
Resolves CUB-2081
Linear Issue: CUB-2081