You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classResult(BaseModel):
"""The result of the Indicator. Attributes: timestamp (datetime): Timestamp of the creation of the indicator timestamp_osm (datetime): Timestamp of the used OSM data (e.g. Latest timestamp of the ohsome API results) label (str): Traffic lights like quality label: `green`, `yellow` or `red`. The value is determined by the result classes value (float): The result value class_ (int): The result class. An integer between 1 and 5. It maps to the result labels. This value is used by the reports to determine an overall result. description (str): The result description. """description: strtimestamp: datetime=Field(default=datetime.now(timezone.utc))
timestamp_osm: datetime|None=Field(default=None, alias="timestampOSM")
value: float|None=Noneclass_: Literal[1, 2, 3, 4, 5] |None=Nonefigure: dict|None=Nonelabels: dict= {1: "red", 2: "yellow", 3: "yellow", 4: "green", 5: "green"}
model_config=ConfigDict(
alias_generator=snake_to_lower_camel,
extra="forbid",
populate_by_name=True,
)
@computed_field@propertydeflabel(self) ->Literal["green", "yellow", "red", "undefined"]:
returnself.labels.get(self.class_, "undefined")
Currently, labels are either red, yellow or green.
Suggestion: Labels should describe quality dimension. E.g. for quality dimension "completeness" label should be either low, medium or high.
The text was updated successfully, but these errors were encountered: