frequenz-gridpool 0.2.0__tar.gz → 0.2.1__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.
Files changed (20) hide show
  1. {frequenz_gridpool-0.2.0/src/frequenz_gridpool.egg-info → frequenz_gridpool-0.2.1}/PKG-INFO +1 -1
  2. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/RELEASE_NOTES.md +2 -4
  3. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz/gridpool/_microgrid_config.py +16 -3
  4. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1/src/frequenz_gridpool.egg-info}/PKG-INFO +1 -1
  5. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/LICENSE +0 -0
  6. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/MANIFEST.in +0 -0
  7. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/README.md +0 -0
  8. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/pyproject.toml +0 -0
  9. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/setup.cfg +0 -0
  10. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz/gridpool/__init__.py +0 -0
  11. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz/gridpool/_graph_generator.py +0 -0
  12. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz/gridpool/cli/__init__.py +0 -0
  13. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz/gridpool/cli/__main__.py +0 -0
  14. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz/gridpool/conftest.py +0 -0
  15. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz/gridpool/py.typed +0 -0
  16. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz_gridpool.egg-info/SOURCES.txt +0 -0
  17. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz_gridpool.egg-info/dependency_links.txt +0 -0
  18. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz_gridpool.egg-info/entry_points.txt +0 -0
  19. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz_gridpool.egg-info/requires.txt +0 -0
  20. {frequenz_gridpool-0.2.0 → frequenz_gridpool-0.2.1}/src/frequenz_gridpool.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: frequenz-gridpool
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: High-level interface to grid pools for the Frequenz platform.
5
5
  Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
6
6
  License: MIT
@@ -5,12 +5,10 @@
5
5
  <!-- Here goes a general summary of what this release is about -->
6
6
 
7
7
  ## Upgrading
8
- * Microgrid_config is updated from AC_ACTIVE_POWER to AC_POWER_ACTIVE in accordance with the update in client-reporting - v0.20.0
9
- <!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
10
8
 
11
- ## New Features
9
+ * Add back support for old active power formula config `AC_ACTIVE_POWER`.
12
10
 
13
- * Add CLI tool to print formulas from assets API component graph.
11
+ ## New Features
14
12
 
15
13
  <!-- Here goes the main new features and examples or instructions on how to use them -->
16
14
 
@@ -41,11 +41,24 @@ class ComponentTypeConfig:
41
41
  def __post_init__(self) -> None:
42
42
  """Set the default formula if none is provided."""
43
43
  self.formula = self.formula or {}
44
- if "AC_POWER_ACTIVE" not in self.formula:
45
- self.formula["AC_POWER_ACTIVE"] = "+".join(
46
- [f"#{cid}" for cid in self._default_cids()]
44
+ if "AC_ACTIVE_POWER" in self.formula:
45
+ _logger.warning(
46
+ "ComponentTypeConfig: 'AC_ACTIVE_POWER' formula is deprecated, "
47
+ "please use 'AC_POWER_ACTIVE' instead."
47
48
  )
48
49
 
50
+ if "AC_POWER_ACTIVE" not in self.formula:
51
+ if "AC_ACTIVE_POWER" in self.formula:
52
+ self.formula["AC_POWER_ACTIVE"] = self.formula["AC_ACTIVE_POWER"]
53
+ else:
54
+ _logger.warning(
55
+ "ComponentTypeConfig: No formula provided for 'AC_POWER_ACTIVE', "
56
+ "using default summation formula."
57
+ )
58
+ self.formula["AC_POWER_ACTIVE"] = "+".join(
59
+ [f"#{cid}" for cid in self._default_cids()]
60
+ )
61
+
49
62
  def cids(self, metric: str = "") -> list[int]:
50
63
  """Get component IDs for this component.
51
64
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: frequenz-gridpool
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: High-level interface to grid pools for the Frequenz platform.
5
5
  Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
6
6
  License: MIT