Files
g0v0-server/app/models/performance.py

139 lines
4.8 KiB
Python

# Version: 2025.1108.0
# Auto-generated by scripts/generate_ruleset_attributes.py.
# Schema generated by https://github.com/GooGuTeam/custom-rulesets
# Do not edit this file directly.
# ruff: noqa: E501
from typing import Any
from pydantic import BaseModel, Field, RootModel
class OsuAttributeModels(RootModel[Any]):
root: Any = Field(..., title="osu! Attribute models")
class PerformanceAttributes(BaseModel):
pp: float = Field(..., description="Calculated score performance points.")
class DifficultyAttributes(BaseModel):
star_rating: float = Field(..., description="The combined star rating of all skills.")
max_combo: int = Field(..., description="The maximum achievable combo.")
class OsuPerformanceAttributes(PerformanceAttributes):
aim: float
speed: float
accuracy: float
flashlight: float
effective_miss_count: float
speed_deviation: float | None = None
combo_based_estimated_miss_count: float
score_based_estimated_miss_count: float | None = None
aim_estimated_slider_breaks: float
speed_estimated_slider_breaks: float
class OsuDifficultyAttributes(DifficultyAttributes):
aim_difficulty: float = Field(..., description="The difficulty corresponding to the aim skill.")
aim_difficult_slider_count: float = Field(..., description="The number of Sliders weighted by difficulty.")
speed_difficulty: float = Field(..., description="The difficulty corresponding to the speed skill.")
speed_note_count: float = Field(
..., description="The number of clickable objects weighted by difficulty.\nRelated to SpeedDifficulty"
)
flashlight_difficulty: float = Field(..., description="The difficulty corresponding to the flashlight skill.")
slider_factor: float = Field(
...,
description="Describes how much of AimDifficulty is contributed to by hitcircles or sliders.\nA value closer to 1.0 indicates most of AimDifficulty is contributed by hitcircles.\nA value closer to 0.0 indicates most of AimDifficulty is contributed by sliders.",
)
aim_top_weighted_slider_factor: float = Field(
...,
description="Describes how much of AimDifficultStrainCount is contributed to by hitcircles or sliders\nA value closer to 0.0 indicates most of AimDifficultStrainCount is contributed by hitcircles\nA value closer to Infinity indicates most of AimDifficultStrainCount is contributed by sliders",
)
speed_top_weighted_slider_factor: float = Field(
...,
description="Describes how much of SpeedDifficultStrainCount is contributed to by hitcircles or sliders\nA value closer to 0.0 indicates most of SpeedDifficultStrainCount is contributed by hitcircles\nA value closer to Infinity indicates most of SpeedDifficultStrainCount is contributed by sliders",
)
aim_difficult_strain_count: float
speed_difficult_strain_count: float
nested_score_per_object: float
legacy_score_base_multiplier: float
maximum_legacy_combo_score: float
class TaikoPerformanceAttributes(PerformanceAttributes):
difficulty: float
accuracy: float
estimated_unstable_rate: float | None = None
class TaikoDifficultyAttributes(DifficultyAttributes):
rhythm_difficulty: float = Field(..., description="The difficulty corresponding to the rhythm skill.")
mono_stamina_factor: float = Field(
...,
description="The ratio of stamina difficulty from mono-color (single colour) streams to total stamina difficulty.",
)
consistency_factor: float = Field(..., description="The factor corresponding to the consistency of a map.")
CatchPerformanceAttributes = PerformanceAttributes
CatchDifficultyAttributes = DifficultyAttributes
class ManiaPerformanceAttributes(PerformanceAttributes):
difficulty: float
ManiaDifficultyAttributes = DifficultyAttributes
SentakkiPerformanceAttributes = PerformanceAttributes
SentakkiDifficultyAttributes = DifficultyAttributes
class TauPerformanceAttribute(PerformanceAttributes):
aim: float
speed: float
accuracy: float
complexity: float
effective_miss_count: float
class TauDifficultyAttributes(DifficultyAttributes):
aim_difficulty: float
speed_difficulty: float
complexity_difficulty: float
approach_rate: float
slider_factor: float
overall_difficulty: float
RushPerformanceAttributes = PerformanceAttributes
RushDifficultyAttributes = DifficultyAttributes
HishigataPerformanceAttributes = PerformanceAttributes
HishigataDifficultyAttributes = DifficultyAttributes
SoyokazePerformanceAttributes = PerformanceAttributes
SoyokazeDifficultyAttributes = DifficultyAttributes
PerformanceAttributesUnion = (
OsuPerformanceAttributes | TaikoPerformanceAttributes | ManiaPerformanceAttributes | PerformanceAttributes
)
DifficultyAttributesUnion = (
OsuDifficultyAttributes | TaikoDifficultyAttributes | TauDifficultyAttributes | DifficultyAttributes
)