domainiac 2.0.1__tar.gz → 3.0.0__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: 2.0.1
3
+ Version: 3.0.0
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
@@ -41,17 +41,24 @@ class PlantManager(MasterdataManager):
41
41
  "is_tso_connected",
42
42
  "valid_from_date_utc",
43
43
  "valid_to_date_utc",
44
+ "net_component_id",
44
45
  ]
45
46
  if not columns:
46
47
  columns = default_columns
47
- else:
48
- columns = list(set(default_columns + columns))
49
48
 
50
- df_plant = self.get_data("masterdataPlant", filters=filters, columns=columns)
49
+ # TODO: masterdata_plant table doesn't have net_component_id column
50
+ # Find a better way to do this in future.
51
+ plant_columns = [col for col in columns if col != "net_component_id"]
52
+ df_plant = self.get_data(
53
+ "masterdataPlant", filters=filters, columns=plant_columns
54
+ )
51
55
  df_psrt = self._get_power_system_resource_type()
52
56
  df = df_psrt.merge(
53
57
  df_plant, on=["plant_id"], how="inner", validate="m:1"
54
58
  ).drop_duplicates()
59
+
60
+ df = df[columns]
61
+
55
62
  return df
56
63
 
57
64
  def get_installed_power_timeseries(self, gsrn: str) -> pd.DataFrame:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "domainiac"
3
- version = "2.0.1"
3
+ version = "3.0.0"
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 = [