sims ==== .. py:module:: sidequest_common.schemas.sims .. autoapi-nested-parse:: Gear-swap sims through wowsims/forever: the bot's ``#sim`` forum request and result shapes. A member names a character and up to 6 gear swaps; the API queues a sim job (``SimJob`` holds its own worn gear ``wearing`` corrections, since Battle.net's copy of a character's gear is stale until it next logs out), runs ``wowsimcli`` once per job, and returns one ``SimComparison`` per combination of swaps applied, each with one ``SimRow`` per (targets, mob) scenario the request asked for. .. py:data:: SIM_SLOTS :value: ('head', 'neck', 'shoulder', 'back', 'chest', 'wrist', 'hands', 'waist', 'legs', 'feet',... .. py:data:: SIM_MOB_TYPES :value: ('humanoid', 'undead', 'beast', 'demon', 'dragonkin', 'elemental', 'giant', 'mechanical') .. py:data:: MAX_SIM_SWAPS :value: 6 .. py:data:: MAX_SIM_WEARING :value: 17 .. py:data:: MAX_QUEUED_SIM_JOBS :value: 3 .. py:data:: SIM_JOB_RETENTION_DAYS :value: 7 .. py:data:: SimSlot .. py:data:: SimMobType .. py:data:: SimRole .. py:data:: SimJobStatusName .. py:class:: SimItem Bases: :py:obj:`pydantic.BaseModel` One item to try (a swap) or correct the baseline with (``wearing``). .. py:attribute:: item :type: str .. py:attribute:: slot :type: SimSlot | None .. py:attribute:: enchant :type: str | None .. py:attribute:: suffix :type: str | None .. py:class:: SimRequest Bases: :py:obj:`pydantic.BaseModel` Body for ``POST /api/guilds/{guild_id}/sims``. .. py:attribute:: character :type: str .. py:attribute:: swaps :type: list[SimItem] .. py:attribute:: wearing :type: list[SimItem] .. py:attribute:: spec :type: str | None .. py:attribute:: talents :type: str | None .. py:attribute:: targets :type: list[int] .. py:attribute:: mobs :type: list[SimMobType] .. py:attribute:: duration :type: int .. py:attribute:: requested_by :type: str | None .. py:class:: SimMetrics Bases: :py:obj:`pydantic.BaseModel` One scenario's measured metrics. A metric a spec doesn't produce (e.g. ``hps`` for a dps spec) is `None`. .. py:attribute:: dps :type: float | None :value: None .. py:attribute:: tps :type: float | None :value: None .. py:attribute:: dtps :type: float | None :value: None .. py:attribute:: hps :type: float | None :value: None .. py:class:: ItemRef Bases: :py:obj:`pydantic.BaseModel` An item as a changed-gear line names it. .. py:attribute:: id :type: int .. py:attribute:: name :type: str .. py:class:: GearChange Bases: :py:obj:`pydantic.BaseModel` One slot changed between a comparison's baseline and swapped gear. .. py:attribute:: slot :type: SimSlot .. py:attribute:: from_item :type: ItemRef | None .. py:attribute:: to_item :type: ItemRef .. py:class:: SimRow Bases: :py:obj:`pydantic.BaseModel` One (targets, mob) scenario's baseline vs. swapped metrics. .. py:attribute:: targets :type: int .. py:attribute:: mob :type: SimMobType .. py:attribute:: baseline :type: SimMetrics .. py:attribute:: swapped :type: SimMetrics .. py:attribute:: delta_pct :type: SimMetrics .. py:attribute:: noise :type: list[str] .. py:class:: SimComparison Bases: :py:obj:`pydantic.BaseModel` One combination of swaps applied, across every requested scenario. .. py:attribute:: label :type: str .. py:attribute:: changes :type: list[GearChange] .. py:attribute:: rows :type: list[SimRow] .. py:class:: SimResult Bases: :py:obj:`pydantic.BaseModel` What a finished sim job found. .. py:attribute:: character :type: str .. py:attribute:: class_name :type: str .. py:attribute:: spec :type: str .. py:attribute:: role :type: SimRole .. py:attribute:: level :type: int .. py:attribute:: gear_fetched_at :type: datetime.datetime | None .. py:attribute:: iterations :type: int .. py:attribute:: duration :type: int .. py:attribute:: comparisons :type: list[SimComparison] .. py:attribute:: notes :type: list[str] .. py:class:: SimJobSchema Bases: :py:obj:`pydantic.BaseModel` A sim job's status, and its result once done. .. py:attribute:: id :type: uuid.UUID .. py:attribute:: status :type: SimJobStatusName .. py:attribute:: position :type: int | None .. py:attribute:: error :type: str | None .. py:attribute:: result :type: SimResult | None .. py:attribute:: created_at :type: datetime.datetime