-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add metrics from metric type params to a metric's depends_on * Add Lookup utility for finding `SemanticModel`s by measure names * Add the `SemanticModel` of a `Metric`'s measure property to the `Metric`'s `depends_on` * Add `SemanticModelConfig` to `SemanticModel` Some tests were failing due to `Metric`'s referencing `SemanticModels`. Specifically there was a check to see if a referenced node was disabled, and because `SemanticModel`'s didn't have a `config` holding the `enabled` boolean attr, core would blow up. * Checkpoint on test fixing * Correct metricflow_time_spine_sql in test fixtures * Add check for `SemanticModel` nodes in `Linker.link_node` Now that `Metrics` depend on `SemanticModels` and `SemanticModels` have their own dependencies on `Models` they need to be checked for in the `Linker.link_node`. I forget the details but things blow up without it. Basically it adds the SemanticModels to the dependency graph. * Fix artifacts/test_previous_version_state.py tests * fix access/test_access.py tests * Fix function metric tests * Fix functional partial_parsing tests * Add time dimension to semantic model in exposures fixture * Bump DSI version to a minimum of 0.1.0dev10 DSI 0.1.0dev10 fixes an incoherence issue in DSI around `agg_time_dimension` setting. This incoherence was that `measure.agg_time_dimension` was being required, even though it was no longer supposed to be a required attribute (it's specificially typed as optional in the protocol). This was causing a handful of tests to fail because the `semantic_model.defaults.agg_time_dimension` value wasn't being respected. Pulling in the fix from DSI 0.1.0dev10 fixes the issue. Interestingly after bumping the DSI version, the integration tests were still failing. If I ran the tests individually they passed though. To get `make integration` to run properly I ended up having to clear my `.tox` cache, as it seems some outdated state was being persisted. * Add test specifically for checking the `depends_on` of `Metric` nodes * Re-enable test asserting calling metric nodes in models * Migrate `checked_agg_time_dimension` to `checked_agg_time_dimension_for_measure` DSI 0.1.0dev10 moved `checked_agg_time_dimension` from the `Measure` protocol to the `SemanticModel` protocol as `checked_agg_time_dimension_for_measure`. This finishes a change where for a given measure either the `Measure.agg_time_dimension` or the measure's parent `SemanticModel.defaults.agg_time_dimension` needs to be set, instead of always require the measure's `Measure.agg_time_dimension`. * Add changie doc for populating metric --------- Co-authored-by: Gerda Shank <[email protected]>
- Loading branch information
Showing
20 changed files
with
462 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Features | ||
body: Begin populating `depends_on` of metric nodes | ||
time: 2023-07-12T12:37:24.01449-07:00 | ||
custom: | ||
Author: QMalcolm gshank | ||
Issue: "7854" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.