-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring HistogramMetics to NumericSubscriberMetricsSchema + other…
… PR comments
- Loading branch information
Showing
7 changed files
with
88 additions
and
84 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
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
38 changes: 38 additions & 0 deletions
38
flowmachine/flowmachine/core/server/query_schemas/numeric_subscriber_metrics.py
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,38 @@ | ||
from marshmallow_oneofschema import OneOfSchema | ||
|
||
from flowmachine.core.server.query_schemas.displacement import DisplacementSchema | ||
from flowmachine.core.server.query_schemas.event_count import EventCountSchema | ||
from flowmachine.core.server.query_schemas.nocturnal_events import NocturnalEventsSchema | ||
from flowmachine.core.server.query_schemas.pareto_interactions import ( | ||
ParetoInteractionsSchema, | ||
) | ||
from flowmachine.core.server.query_schemas.radius_of_gyration import ( | ||
RadiusOfGyrationSchema, | ||
) | ||
from flowmachine.core.server.query_schemas.subscriber_degree import ( | ||
SubscriberDegreeSchema, | ||
) | ||
from flowmachine.core.server.query_schemas.topup_amount import TopUpAmountSchema | ||
from flowmachine.core.server.query_schemas.topup_balance import TopUpBalanceSchema | ||
from flowmachine.core.server.query_schemas.total_active_periods import ( | ||
TotalActivePeriodsSchema, | ||
) | ||
from flowmachine.core.server.query_schemas.unique_location_counts import ( | ||
UniqueLocationCountsSchema, | ||
) | ||
|
||
|
||
class NumericSubscriberMetricsSchema(OneOfSchema): | ||
type_field = "query_kind" | ||
type_schemas = { | ||
"radius_of_gyration": RadiusOfGyrationSchema, | ||
"unique_location_counts": UniqueLocationCountsSchema, | ||
"topup_balance": TopUpBalanceSchema, | ||
"subscriber_degree": SubscriberDegreeSchema, | ||
"topup_amount": TopUpAmountSchema, | ||
"event_count": EventCountSchema, | ||
"pareto_interactions": ParetoInteractionsSchema, | ||
"nocturnal_events": NocturnalEventsSchema, | ||
"displacement": DisplacementSchema, | ||
"total_active_periods": TotalActivePeriodsSchema, | ||
} |
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