diff --git a/CHANGES.md b/CHANGES.md index d3005c8..440df64 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Change log +## Unreleased +- Avoid errors when a new maturity is added +- Ungrade somenergia-ui to 0.5.1 that fixes curve labels + ## 1.2.0 (2024-11-13) - Add HD maturity diff --git a/backend/datasources/dummy.py b/backend/datasources/dummy.py index 9fe38e8..02912e9 100644 --- a/backend/datasources/dummy.py +++ b/backend/datasources/dummy.py @@ -373,7 +373,7 @@ def dummy_production_data( nhours = round( (last_timestamp_utc - first_timestamp_utc) / datetime.timedelta(hours=1) ) - maturity_options = ["H2", "H3", "HP", "HC", None] + maturity_options = ["H2", "H3", "HP", "HC", "HD", None] return CustomerProductionData( data=[ diff --git a/backend/models.py b/backend/models.py index 6e7e28b..daeda2e 100644 --- a/backend/models.py +++ b/backend/models.py @@ -165,14 +165,6 @@ class ProductionData(BaseModel): data: str value: int -DataMaturity = Literal[ - 'H2', - 'H3', - 'HP', - 'HC', - 'HD', -] - class ContractProductionData(BaseModel): contract_name: str first_timestamp_utc: AwareDatetime @@ -180,7 +172,7 @@ class ContractProductionData(BaseModel): foreseen_kwh: list[float | None] measure_kwh: list[float | None] estimated: list [bool | None] - maturity: list[DataMaturity | None] + maturity: list[str | None] class CustomerProductionData(BaseModel): data: list[ContractProductionData] diff --git a/package.json b/package.json index e1adda9..fdb448c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@mui/material": "^5.14.6", "@mui/x-date-pickers": "^6.19.3", "@prettier/plugin-xml": "^3.2.2", - "@somenergia/somenergia-ui": "^0.3.0", + "@somenergia/somenergia-ui": "^0.5.1", "axios": "^1.5.1", "dayjs": "^1.11.10", "i18next": "^23.4.5",