MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / build_exposures_summary

Function build_exposures_summary

api/experimentation/services.py:179–192  ·  view source on GitHub ↗
(
    buckets: Sequence[ExposureBucket],
    *,
    granularity: ExposureGranularity,
)

Source from the content-addressed store, hash-verified

177
178
179def build_exposures_summary(
180 buckets: Sequence[ExposureBucket],
181 *,
182 granularity: ExposureGranularity,
183) -> ExposuresSummary:
184 return ExposuresSummary(
185 excluded_identities=sum(
186 b.first_exposed_identities for b in buckets if b.quarantined
187 ),
188 timeseries=ExposuresTimeseries(
189 granularity=granularity,
190 points=_timeseries_points([b for b in buckets if not b.quarantined]),
191 ),
192 )
193
194
195def _timeseries_points(

Callers 1

Calls 3

ExposuresSummaryClass · 0.90
ExposuresTimeseriesClass · 0.90
_timeseries_pointsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…