Skip to content

Commit

Permalink
Merge pull request #570 from gridsingularity/feature/GSYE-840
Browse files Browse the repository at this point in the history
GSYE-840: Corrected schema definition for ScmHeatPump and ScmStorage …
  • Loading branch information
spyrostz authored Jan 29, 2025
2 parents e40e031 + 7e30b4a commit fb6dc3a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@
{"name": "name", "type": "string"},
{"name": "type", "type": "string"},
{"name": "uuid", "type": "string"},
{"name": "libraryUUID", "type": ["null", "string"]},
{"name": "address", "type": ["null", "string"]},
{"name": "geo_tag_location", "type": [
"null", {
"type": "array",
Expand All @@ -317,8 +315,8 @@
{"name": "prosumption_kWh_profile", "type": ["null", "string"]},
{"name": "prosumption_kWh_profile_uuid", "type": ["null", "string"]},
{"name": "prosumption_kWh_measurement_uuid", "type": ["null", "string"]},
{"name": "use_market_maker_rate", "type": ["null", "boolean"]},
{"name": "allow_external_connection", "type": ["null", "boolean"]},
{"name": "forecast_stream_enabled", "type": ["null", "boolean"]},
{"name": "display_type", "type": "string"}
]
},
Expand All @@ -329,8 +327,6 @@
{"name": "name", "type": "string"},
{"name": "type", "type": "string"},
{"name": "uuid", "type": "string"},
{"name": "libraryUUID", "type": ["null", "string"]},
{"name": "address", "type": ["null", "string"]},
{"name": "geo_tag_location", "type": [
"null", {
"type": "array",
Expand All @@ -340,7 +336,7 @@
{"name": "consumption_kWh_profile", "type": ["null", "string"]},
{"name": "consumption_kWh_profile_uuid", "type": ["null", "string"]},
{"name": "consumption_kWh_measurement_uuid", "type": ["null", "string"]},
{"name": "use_market_maker_rate", "type": ["null", "boolean"]},
{"name": "forecast_stream_enabled", "type": ["null", "boolean"]},
{"name": "allow_external_connection", "type": ["null", "boolean"]},
{"name": "display_type", "type": "string"}
]
Expand Down
14 changes: 14 additions & 0 deletions gsy_framework/schema/avro_schemas/scm_simulation_raw_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,20 @@
"name": "spent_to_grid",
"type": "float"
},
{
"name": "savings_from_buy_from_community",
"type": [
"float",
"null"
]
},
{
"name": "savings_from_sell_to_community",
"type": [
"float",
"null"
]
},
{
"name": "export_grid_fees",
"type": "float"
Expand Down
20 changes: 4 additions & 16 deletions gsy_framework/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,8 @@ class ScenarioSchemas:
"name": {"type": "string"},
"type": {"enum": ["ScmHeatPump"]},
"uuid": {"type": "string"},
"libraryUUID": {"anyOf": [{"type": "string"}, {"type": "null"}]},
"address": {"type": ["string", "null"]},
"allow_external_connection": {"type": ["null", "boolean"]},
"forecast_stream_enabled": {"type": ["boolean", "null"]},
"geo_tag_location": {},
"consumption_kW": {
"anyOf": [
Expand All @@ -318,10 +317,6 @@ class ScenarioSchemas:
]
},
"consumption_profile_uuid": {"anyOf": [{"type": "string"}, {"type": "null"}]},
"initial_buying_rate": {"type": "number"},
"final_buying_rate": {"anyOf": [{"type": "number"}, {"type": "null"}]},
"preferred_buying_rate": {"type": "number"},
"update_interval": {"anyOf": [{"type": "number"}, {"type": "null"}]},
},
},
"scm_storage": {
Expand All @@ -330,22 +325,15 @@ class ScenarioSchemas:
"name": {"type": "string"},
"type": {"enum": ["ScmStorage"]},
"uuid": {"type": "string"},
"libraryUUID": {"anyOf": [{"type": "string"}, {"type": "null"}]},
"address": {"type": ["string", "null"]},
"allow_external_connection": {"type": ["null", "boolean"]},
"geo_tag_location": {},
"initial_buying_rate": {"type": "number"},
"final_buying_rate": {"anyOf": [{"type": "number"}, {"type": "null"}]},
"fit_to_limit": {"type": "boolean"},
"update_interval": {"anyOf": [{"type": "number"}, {"type": "null"}]},
"energy_rate_increase_per_update": {
"anyOf": [{"type": "number"}, {"type": "null"}]
},
"use_market_maker_rate": {"type": "boolean"},
"forecast_stream_enabled": {"type": ["boolean", "null"]},
"prosumption_kWh_profile_uuid": {
"anyOf": [{"type": "string"}, {"type": "null"}]
},
"prosumption_kWh_measurement_uuid": {
"anyOf": [{"type": "string"}, {"type": "null"}]
},
"prosumption_kWh_profile": {
"anyOf": [
{"type": "object"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,10 @@ def test_parse(_uuid_mock, asset_coordinates_builder_cls_mock):
assert datasheet.advanced_settings == {
"coefficient_algorithm": 1,
"grid_fees_reduction": 0,
"intracommunity_rate_base_eur": 0.3,
"intracommunity_rate_base_eur": 0.12,
"scm_cn_hours_of_delay": 0,
"vat_percentage": 10,
"self_consumption_type": 0,
"self_consumption_type": 1,
"enable_assistance_monthly_fee": False,
"enable_contracted_power_cargo_monthly_fee": False,
"enable_contracted_power_monthly_fee": False,
Expand Down

0 comments on commit fb6dc3a

Please sign in to comment.