Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/_css/mkdocstrings.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,25 @@ a.autorefs-external::after {
a.autorefs-external:hover::after {
background-color: var(--md-accent-fg-color);
}

/* A "Deprecated" admonition, styled like a warning but with its own icon. */
:root {
--md-admonition-icon--deprecated: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 2h4c3.31 0 5 2.69 5 6v10.66C16.88 17.63 15.07 17 12 17s-4.88.63-7 1.66V8c0-3.31 1.69-6 5-6M8 8v1.5h8V8zm1 4v1.5h6V12zM3 22v-.69c2.66-1.69 10.23-5.47 18-.06V22z"/></svg>');
}

.md-typeset .admonition.deprecated,
.md-typeset details.deprecated {
border-color: #cc9900;
}

.md-typeset .deprecated > .admonition-title,
.md-typeset .deprecated > summary {
background-color: #cc99001a;
}

.md-typeset .deprecated > .admonition-title::before,
.md-typeset .deprecated > summary::before {
background-color: #cc9900;
-webkit-mask-image: var(--md-admonition-icon--deprecated);
mask-image: var(--md-admonition-icon--deprecated);
}
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ plugins:
python:
paths: ["src"]
options:
extensions:
- griffe_warnings_deprecated:
kind: deprecated
title: Deprecated
docstring_section_style: spacy
inherited_members: true
merge_init_into_class: false
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dev-flake8 = [
dev-formatting = ["black == 26.5.1", "isort == 9.0.1"]
dev-mkdocs = [
"black == 26.5.1",
"griffe-warnings-deprecated == 1.1.1",
"Markdown==3.10.3",
"mike == 2.2.0",
"mkdocs-gen-files == 0.6.1",
Expand Down
6 changes: 4 additions & 2 deletions src/frequenz/client/microgrid/component/_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ComponentCategory(enum.Enum):
)
"""The point where the local microgrid is connected to the grid (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use
[`GRID_CONNECTION_POINT`][frequenz.client.microgrid.component.ComponentCategory.GRID_CONNECTION_POINT]
instead.
Expand Down Expand Up @@ -96,7 +97,8 @@ class ComponentCategory(enum.Enum):
)
"""A voltage transformer (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use
[`POWER_TRANSFORMER`][frequenz.client.microgrid.component.ComponentCategory.POWER_TRANSFORMER]
instead.
Expand Down
3 changes: 2 additions & 1 deletion src/frequenz/client/microgrid/component/_state_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ class ComponentErrorCode(enum.Enum):
)
"""System shutdown due to undervoltage involving this component.

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use
[`UNDERVOLTAGE`][frequenz.client.microgrid.component.ComponentErrorCode.UNDERVOLTAGE]
instead.
Expand Down
96 changes: 64 additions & 32 deletions src/frequenz/client/microgrid/metrics/_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class Metric(enum.Enum):
)
"""The alternating current apparent power (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_APPARENT`][frequenz.client.microgrid.metrics.Metric.AC_POWER_APPARENT]
instead.
"""
Expand All @@ -95,7 +96,8 @@ class Metric(enum.Enum):
)
"""The alternating current apparent power in phase 1 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_APPARENT_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_POWER_APPARENT_PHASE_1]
instead.
"""
Expand All @@ -109,7 +111,8 @@ class Metric(enum.Enum):
)
"""The alternating current apparent power in phase 2 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_APPARENT_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_POWER_APPARENT_PHASE_2]
instead.
"""
Expand All @@ -123,7 +126,8 @@ class Metric(enum.Enum):
)
"""The alternating current apparent power in phase 3 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_APPARENT_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_POWER_APPARENT_PHASE_3]
instead.
"""
Expand All @@ -137,7 +141,8 @@ class Metric(enum.Enum):
)
"""The alternating current active power (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_ACTIVE`][frequenz.client.microgrid.metrics.Metric.AC_POWER_ACTIVE]
instead.
"""
Expand All @@ -151,7 +156,8 @@ class Metric(enum.Enum):
)
"""The alternating current active power in phase 1 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_ACTIVE_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_POWER_ACTIVE_PHASE_1]
instead.
"""
Expand All @@ -165,7 +171,8 @@ class Metric(enum.Enum):
)
"""The alternating current active power in phase 2 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_ACTIVE_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_POWER_ACTIVE_PHASE_2]
instead.
"""
Expand All @@ -179,7 +186,8 @@ class Metric(enum.Enum):
)
"""The alternating current active power in phase 3 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_ACTIVE_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_POWER_ACTIVE_PHASE_3]
instead.
"""
Expand All @@ -193,7 +201,8 @@ class Metric(enum.Enum):
)
"""The alternating current reactive power (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_REACTIVE`][frequenz.client.microgrid.metrics.Metric.AC_POWER_REACTIVE]
instead.
"""
Expand All @@ -207,7 +216,8 @@ class Metric(enum.Enum):
)
"""The alternating current reactive power in phase 1 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_REACTIVE_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_POWER_REACTIVE_PHASE_1]
instead.
"""
Expand All @@ -221,7 +231,8 @@ class Metric(enum.Enum):
)
"""The alternating current reactive power in phase 2 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_REACTIVE_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_POWER_REACTIVE_PHASE_2]
instead.
"""
Expand All @@ -235,7 +246,8 @@ class Metric(enum.Enum):
)
"""The alternating current reactive power in phase 3 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_POWER_REACTIVE_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_POWER_REACTIVE_PHASE_3]
instead.
"""
Expand All @@ -261,7 +273,8 @@ class Metric(enum.Enum):
)
"""The alternating current apparent energy (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_APPARENT`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_APPARENT]
instead.
"""
Expand All @@ -275,7 +288,8 @@ class Metric(enum.Enum):
)
"""The alternating current apparent energy in phase 1 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_APPARENT_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_APPARENT_PHASE_1]
instead.
"""
Expand All @@ -289,7 +303,8 @@ class Metric(enum.Enum):
)
"""The alternating current apparent energy in phase 2 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_APPARENT_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_APPARENT_PHASE_2]
instead.
"""
Expand All @@ -303,7 +318,8 @@ class Metric(enum.Enum):
)
"""The alternating current apparent energy in phase 3 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_APPARENT_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_APPARENT_PHASE_3]
instead.
"""
Expand All @@ -317,7 +333,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE]
instead.
"""
Expand All @@ -331,7 +348,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy in phase 1 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_PHASE_1]
instead.
"""
Expand All @@ -345,7 +363,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy in phase 2 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_PHASE_2]
instead.
"""
Expand All @@ -359,7 +378,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy in phase 3 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_PHASE_3]
instead.
"""
Expand All @@ -373,7 +393,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy consumed (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_CONSUMED`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_CONSUMED]
instead.
"""
Expand All @@ -389,7 +410,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy consumed in phase 1 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_CONSUMED_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_CONSUMED_PHASE_1]
instead.
"""
Expand All @@ -405,7 +427,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy consumed in phase 2 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_CONSUMED_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_CONSUMED_PHASE_2]
instead.
"""
Expand All @@ -421,7 +444,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy consumed in phase 3 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_CONSUMED_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_CONSUMED_PHASE_3]
instead.
"""
Expand All @@ -435,7 +459,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy delivered (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_DELIVERED`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_DELIVERED]
instead.
"""
Expand All @@ -451,7 +476,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy delivered in phase 1 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_DELIVERED_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_DELIVERED_PHASE_1]
instead.
"""
Expand All @@ -467,7 +493,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy delivered in phase 2 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_DELIVERED_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_DELIVERED_PHASE_2]
instead.
"""
Expand All @@ -483,7 +510,8 @@ class Metric(enum.Enum):
)
"""The alternating current active energy delivered in phase 3 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_ACTIVE_DELIVERED_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_ACTIVE_DELIVERED_PHASE_3]
instead.
"""
Expand All @@ -497,7 +525,8 @@ class Metric(enum.Enum):
)
"""The alternating current reactive energy (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_REACTIVE`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_REACTIVE]
instead.
"""
Expand All @@ -511,7 +540,8 @@ class Metric(enum.Enum):
)
"""The alternating current reactive energy in phase 1 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_REACTIVE_PHASE_1`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_REACTIVE_PHASE_1]
instead.
"""
Expand All @@ -525,7 +555,8 @@ class Metric(enum.Enum):
)
"""The alternating current reactive energy in phase 2 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_REACTIVE_PHASE_2`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_REACTIVE_PHASE_2]
instead.
"""
Expand All @@ -539,7 +570,8 @@ class Metric(enum.Enum):
)
"""The alternating current reactive energy in phase 3 (deprecated).

Deprecated: Deprecated in v0.18.0
Deprecated:
This member is deprecated since v0.18.0.
Use [`AC_ENERGY_REACTIVE_PHASE_3`][frequenz.client.microgrid.metrics.Metric.AC_ENERGY_REACTIVE_PHASE_3]
instead.
"""
Expand Down
Loading