Skip to content

Commit

Permalink
Merge pull request #315 from Boavizta/313-upgrade-fastapi-dependency
Browse files Browse the repository at this point in the history
chore(deps): update fastapi to 0.115.0 and pydantic to 2.9.2
  • Loading branch information
da-ekchajzer authored Sep 25, 2024
2 parents 0a93f9e + 90a8309 commit 781789f
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 68 deletions.
2 changes: 1 addition & 1 deletion boaviztapi/dto/component/component_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@


class ComponentDTO(BaseDTO):
units: Optional[int]
units: Optional[int] = None
usage: Optional[Usage] = Usage()
5 changes: 2 additions & 3 deletions boaviztapi/dto/consumption_profile/consumption_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from boaviztapi.model.component import ComponentCPU
from boaviztapi.model.consumption_profile import CPUConsumptionProfileModel
from boaviztapi.model.component.cpu import attributes_from_cpu_name
from pydantic import ConfigDict


class WorkloadPower(BaseDTO):
Expand All @@ -17,9 +18,7 @@ class WorkloadPower(BaseDTO):

class ConsumptionProfile(BaseDTO):
workload: List[WorkloadPower] = None

class Config:
arbitrary_types_allowed = True
model_config = ConfigDict(arbitrary_types_allowed=True)


class ConsumptionProfileCPU(ConsumptionProfile):
Expand Down
Loading

0 comments on commit 781789f

Please sign in to comment.