domainiac 8.0.3__tar.gz → 8.0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: domainiac
3
- Version: 8.0.3
3
+ Version: 8.0.5
4
4
  Summary: Package for working with Energinet data, but with specialized functions used for Enigma.
5
5
  Author: Team Enigma
6
6
  Author-email: gridop-enigma@energinet.dk
@@ -25,6 +25,11 @@ class Plant:
25
25
  else:
26
26
  altitude = 0
27
27
 
28
+ if "power_system_resource_type" in row.keys():
29
+ psrt = row["power_system_resource_type"]
30
+ else:
31
+ psrt = None
32
+
28
33
  plant = cls(
29
34
  plant_gsrn=row["plant_gsrn"],
30
35
  plant_name=row["plant_name"],
@@ -36,7 +41,7 @@ class Plant:
36
41
  altitude=altitude,
37
42
  ),
38
43
  installed_power_MW=row["installed_power_MW"],
39
- power_system_resource_type=row["power_system_resource_type"],
44
+ power_system_resource_type=psrt,
40
45
  )
41
46
  plants.append(plant)
42
47
  return plants
@@ -52,6 +57,11 @@ class Group:
52
57
  def groups_from_df(cls, df: pd.DataFrame, identifiers: list[str]) -> list["Group"]:
53
58
  groups = []
54
59
  for _, row in df.iterrows():
60
+ if "altitude" in row.keys():
61
+ altitude = row["altitude"]
62
+ else:
63
+ altitude = 0
64
+
55
65
  identifiers = {identifier: row[identifier] for identifier in identifiers}
56
66
  group = cls(
57
67
  identifiers=identifiers,
@@ -59,7 +69,7 @@ class Group:
59
69
  coordinate=Coordinate(
60
70
  latitude=row["latitude"],
61
71
  longitude=row["longitude"],
62
- altitude=row["altitude"],
72
+ altitude=altitude,
63
73
  ),
64
74
  )
65
75
  groups.append(group)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "domainiac"
3
- version = "8.0.3"
3
+ version = "8.0.5"
4
4
  description = "Package for working with Energinet data, but with specialized functions used for Enigma."
5
5
  authors = ["Team Enigma <gridop-enigma@energinet.dk>"]
6
6
  packages = [