Skip to content

Commit 646de5c

Browse files
committed
Rename LoggingConfigUpdater to LoggingConfigUpdatingActor
This is to follow the naming convention of actors and make it more obvious that it is an actor. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 061952a commit 646de5c

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Upgrading
88

9-
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
9+
- The `LoggingConfigUpdater` was renamed to `LoggingConfigUpdatingActor` to follow the actor naming convention.
1010

1111
## New Features
1212

src/frequenz/sdk/config/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33

44
"""Read and update config variables."""
55

6-
from ._logging_config_updater import LoggerConfig, LoggingConfig, LoggingConfigUpdater
6+
from ._logging_config_updater import (
7+
LoggerConfig,
8+
LoggingConfig,
9+
LoggingConfigUpdatingActor,
10+
)
711
from ._managing_actor import ConfigManagingActor
812
from ._util import load_config
913

1014
__all__ = [
1115
"ConfigManagingActor",
1216
"LoggingConfig",
1317
"LoggerConfig",
14-
"LoggingConfigUpdater",
18+
"LoggingConfigUpdatingActor",
1519
"load_config",
1620
]

src/frequenz/sdk/config/_logging_config_updater.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def load(cls, configs: Mapping[str, Any]) -> Self: # noqa: DOC502
8585
return cast(Self, schema.load(configs, unknown=RAISE))
8686

8787

88-
class LoggingConfigUpdater(Actor):
88+
class LoggingConfigUpdatingActor(Actor):
8989
"""Actor that listens for logging configuration changes and sets them.
9090
9191
Example:
@@ -107,14 +107,14 @@ class LoggingConfigUpdater(Actor):
107107
from typing import Any
108108
109109
from frequenz.channels import Broadcast
110-
from frequenz.sdk.config import LoggingConfigUpdater, ConfigManager
110+
from frequenz.sdk.config import LoggingConfigUpdatingActor, ConfigManager
111111
from frequenz.sdk.actor import run as run_actors
112112
113113
async def run() -> None:
114114
config_channel = Broadcast[Mapping[str, Any]](name="config", resend_latest=True)
115115
actors = [
116116
ConfigManager(config_paths=["config.toml"], output=config_channel.new_sender()),
117-
LoggingConfigUpdater(
117+
LoggingConfigUpdatingActor(
118118
config_recv=config_channel.new_receiver(limit=1)).map(
119119
lambda app_config: app_config.get("logging", {}
120120
)

tests/config/test_logging_config_updater.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from marshmallow import ValidationError
1414
from pytest_mock import MockerFixture
1515

16-
from frequenz.sdk.config import LoggerConfig, LoggingConfig, LoggingConfigUpdater
16+
from frequenz.sdk.config import LoggerConfig, LoggingConfig, LoggingConfigUpdatingActor
1717

1818

1919
def test_logging_config() -> None:
@@ -60,7 +60,7 @@ def cleanup_logs() -> Any:
6060
logging.getLogger("frequenz.sdk.timeseries").setLevel(logging.NOTSET)
6161

6262

63-
async def test_logging_config_updater_actor(
63+
async def test_logging_config_updating_actor(
6464
mocker: MockerFixture,
6565
cleanup_logs: Any,
6666
) -> None:
@@ -74,7 +74,7 @@ async def test_logging_config_updater_actor(
7474

7575
config_channel = Broadcast[Mapping[str, Any]](name="config")
7676
config_sender = config_channel.new_sender()
77-
async with LoggingConfigUpdater(
77+
async with LoggingConfigUpdatingActor(
7878
config_recv=config_channel.new_receiver().map(
7979
lambda app_config: app_config.get("logging", {})
8080
)

0 commit comments

Comments
 (0)