Skip to content

Commit e2fb768

Browse files
committed
Include Snapshots as well
1 parent f376ad0 commit e2fb768

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

elementary/monitor/api/filters/filters.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
ModelRunsSchema,
77
NormalizedModelSchema,
88
NormalizedSeedSchema,
9+
NormalizedSnapshotSchema,
910
NormalizedSourceSchema,
1011
)
1112
from elementary.monitor.api.totals_schema import TotalsSchema
@@ -27,12 +28,13 @@ def get_filters(
2728
sources: Dict[str, NormalizedSourceSchema],
2829
models_runs: List[ModelRunsSchema],
2930
seeds: Dict[str, NormalizedSeedSchema],
31+
snapshots: Dict[str, NormalizedSnapshotSchema],
3032
) -> FiltersSchema:
3133
test_results_filters = self._get_test_filters(
32-
test_results_totals, models, sources, seeds
34+
test_results_totals, models, sources, seeds, snapshots
3335
)
3436
test_runs_filters = self._get_test_filters(
35-
test_runs_totals, models, sources, seeds
37+
test_runs_totals, models, sources, seeds, snapshots
3638
)
3739
model_runs_filters = self._get_model_runs_filters(models_runs)
3840
return FiltersSchema(
@@ -47,6 +49,7 @@ def _get_test_filters(
4749
models: Dict[str, NormalizedModelSchema],
4850
sources: Dict[str, NormalizedSourceSchema],
4951
seeds: Dict[str, NormalizedSeedSchema],
52+
snapshots: Dict[str, NormalizedSnapshotSchema],
5053
) -> List[FilterSchema]:
5154
failures_filter = FilterSchema(name="failures", display_name="Failures")
5255
warnings_filter = FilterSchema(name="warnings", display_name="Warnings")
@@ -59,6 +62,7 @@ def _get_test_filters(
5962
*models.values(),
6063
*sources.values(),
6164
*seeds.values(),
65+
*snapshots.values(),
6266
]
6367
for artifact in artifacts:
6468
if artifact.unique_id and artifact.unique_id not in totals_models_ids:

elementary/monitor/api/report/report.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def get_report_data(
167167
sources,
168168
models_runs.runs,
169169
seeds,
170+
snapshots,
170171
)
171172

172173
serializable_groups = groups.dict()

0 commit comments

Comments
 (0)