-
Notifications
You must be signed in to change notification settings - Fork 23
Add measures to metrics (temporary) & fix metric deduplication #436
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
Changes from 4 commits
0b78216
a33e80a
c35aa8f
e35ed6e
217703e
933d8fb
157424b
bf33f74
74670d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,7 @@ def test_cumulative_metric_with_custom_grain_to_date() -> None: # noqa: D | |
| type_params: | ||
| measure: | ||
| name: bookings | ||
| fill_nulls_with: 15 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. de-duplicating cut the number of metrics down by 1, but I wanted to make sure we had variety in our tests so I made this one require a new metric.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what a silly metric! |
||
| cumulative_type_params: | ||
| grain_to_date: martian_week | ||
| """ | ||
|
|
@@ -121,9 +122,9 @@ def test_cumulative_metric_with_custom_window() -> None: # noqa: D | |
| ) | ||
| assert not model.issues.has_blocking_issues | ||
| semantic_manifest = model.semantic_manifest | ||
| # 2 explicit ones and one that is created for the measure input for the | ||
| # cumulative metric's params | ||
| assert len(semantic_manifest.metrics) == 3 | ||
| # 2 explicit metrics. The cumulative metric's input metric should be deduplicated | ||
| # so it will match. | ||
| assert len(semantic_manifest.metrics) == 2 | ||
|
|
||
| metric = next((m for m in semantic_manifest.metrics if m.name == "test_cumulative_metric_with_custom_window"), None) | ||
| assert metric is not None, "Can't find metric" | ||
|
|
@@ -185,9 +186,9 @@ def test_conversion_metric_with_custom_grain_window() -> None: # noqa: D | |
| ) | ||
| assert not model.issues.has_blocking_issues | ||
| semantic_manifest = model.semantic_manifest | ||
| # 2 explicit ones and one that is created for the measure input for the | ||
| # cumulative metric's params | ||
| assert len(semantic_manifest.metrics) == 3 | ||
| # 2 explicitly created metrics. The conversion measure -> metric transformation | ||
| # should not need to create a new metric since the existing one already matches. | ||
| assert len(semantic_manifest.metrics) == 2 | ||
|
|
||
| metric = next( | ||
| (m for m in semantic_manifest.metrics if m.name == "test_conversion_metric_with_custom_grain_window"), None | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.