frequenz-client-microgrid 0.18.3__tar.gz → 0.18.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.
- {frequenz_client_microgrid-0.18.3/src/frequenz_client_microgrid.egg-info → frequenz_client_microgrid-0.18.5}/PKG-INFO +27 -26
- frequenz_client_microgrid-0.18.5/RELEASE_NOTES.md +5 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/pyproject.toml +29 -27
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_category.py +4 -2
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_component.py +40 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_component_proto.py +61 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_state_sample.py +2 -1
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/metrics/_metric.py +64 -32
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/metrics/_sample_proto.py +5 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5/src/frequenz_client_microgrid.egg-info}/PKG-INFO +27 -26
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz_client_microgrid.egg-info/SOURCES.txt +2 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz_client_microgrid.egg-info/requires.txt +26 -25
- frequenz_client_microgrid-0.18.5/src/frequenz_client_microgrid.egg-info/scm_file_list.json +179 -0
- frequenz_client_microgrid-0.18.5/src/frequenz_client_microgrid.egg-info/scm_version.json +8 -0
- frequenz_client_microgrid-0.18.3/RELEASE_NOTES.md +0 -5
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/LICENSE +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/MANIFEST.in +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/README.md +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/setup.cfg +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/__init__.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_client.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_delivery_area.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_delivery_area_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_exception.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_lifetime.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_lifetime_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_location.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_location_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_microgrid_info.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_microgrid_info_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/_util.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/__init__.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_battery.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_chp.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_connection.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_connection_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_converter.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_crypto_miner.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_data_samples.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_data_samples_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_electrolyzer.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_ev_charger.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_grid_connection_point.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_hvac.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_inverter.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_meter.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_precharger.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_problematic.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_relay.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_state_sample_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_steam_boiler.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_types.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_voltage_transformer.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/component/_wind_turbine.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/conftest.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/metrics/__init__.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/metrics/_bounds.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/metrics/_bounds_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/metrics/_sample.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/py.typed +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/sensor/__init__.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/sensor/_sensor.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/sensor/_sensor_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/sensor/_state.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/sensor/_state_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/sensor/_telemetry.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz/client/microgrid/sensor/_telemetry_proto.py +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz_client_microgrid.egg-info/dependency_links.txt +0 -0
- {frequenz_client_microgrid-0.18.3 → frequenz_client_microgrid-0.18.5}/src/frequenz_client_microgrid.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: frequenz-client-microgrid
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.5
|
|
4
4
|
Summary: Microgrid API client for Python
|
|
5
5
|
Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -20,9 +20,9 @@ Classifier: Typing :: Typed
|
|
|
20
20
|
Requires-Python: <4,>=3.11
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
|
-
Requires-Dist: frequenz-api-common<1.0.0,>=0.8.
|
|
23
|
+
Requires-Dist: frequenz-api-common<1.0.0,>=0.8.4
|
|
24
24
|
Requires-Dist: frequenz-api-microgrid<1,>=0.18.0
|
|
25
|
-
Requires-Dist: frequenz-channels<
|
|
25
|
+
Requires-Dist: frequenz-channels<3,>=1.6.1
|
|
26
26
|
Requires-Dist: frequenz-client-base<0.12.0,>=0.10.0
|
|
27
27
|
Requires-Dist: frequenz-client-common<0.4.0,>=0.3.6
|
|
28
28
|
Requires-Dist: frequenz-core<2.0.0,>=1.3.0
|
|
@@ -30,44 +30,45 @@ Requires-Dist: grpcio<2,>=1.80.0
|
|
|
30
30
|
Requires-Dist: protobuf<8,>=6.33.6
|
|
31
31
|
Requires-Dist: typing-extensions<5,>=4.13.0
|
|
32
32
|
Provides-Extra: dev-flake8
|
|
33
|
-
Requires-Dist: flake8==7.
|
|
34
|
-
Requires-Dist: flake8-datetimez==
|
|
33
|
+
Requires-Dist: flake8==7.5.0; extra == "dev-flake8"
|
|
34
|
+
Requires-Dist: flake8-datetimez==26.8.1; extra == "dev-flake8"
|
|
35
35
|
Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
|
|
36
36
|
Requires-Dist: flake8-pyproject==1.2.4; extra == "dev-flake8"
|
|
37
|
-
Requires-Dist: pydoclint==0.
|
|
37
|
+
Requires-Dist: pydoclint==0.12.0; extra == "dev-flake8"
|
|
38
38
|
Requires-Dist: pydocstyle==6.3.0; extra == "dev-flake8"
|
|
39
39
|
Provides-Extra: dev-formatting
|
|
40
|
-
Requires-Dist: black==26.
|
|
41
|
-
Requires-Dist: isort==
|
|
40
|
+
Requires-Dist: black==26.10.1; extra == "dev-formatting"
|
|
41
|
+
Requires-Dist: isort==9.0.2; extra == "dev-formatting"
|
|
42
42
|
Provides-Extra: dev-mkdocs
|
|
43
|
-
Requires-Dist: black==26.
|
|
44
|
-
Requires-Dist:
|
|
45
|
-
Requires-Dist:
|
|
43
|
+
Requires-Dist: black==26.10.1; extra == "dev-mkdocs"
|
|
44
|
+
Requires-Dist: griffe-warnings-deprecated==1.1.2; extra == "dev-mkdocs"
|
|
45
|
+
Requires-Dist: Markdown==3.11.2; extra == "dev-mkdocs"
|
|
46
|
+
Requires-Dist: mike==2.2.0; extra == "dev-mkdocs"
|
|
46
47
|
Requires-Dist: mkdocs-gen-files==0.6.1; extra == "dev-mkdocs"
|
|
47
48
|
Requires-Dist: mkdocs-literate-nav==0.6.3; extra == "dev-mkdocs"
|
|
48
49
|
Requires-Dist: mkdocs-macros-plugin==1.5.0; extra == "dev-mkdocs"
|
|
49
|
-
Requires-Dist: mkdocs-material==9.
|
|
50
|
-
Requires-Dist: mkdocstrings[python]==1.0.
|
|
51
|
-
Requires-Dist: mkdocstrings-python==2.0.
|
|
52
|
-
Requires-Dist: frequenz-repo-config[lib]==0.
|
|
50
|
+
Requires-Dist: mkdocs-material==9.8.0; extra == "dev-mkdocs"
|
|
51
|
+
Requires-Dist: mkdocstrings[python]==1.0.8; extra == "dev-mkdocs"
|
|
52
|
+
Requires-Dist: mkdocstrings-python==2.0.10; extra == "dev-mkdocs"
|
|
53
|
+
Requires-Dist: frequenz-repo-config[lib]==0.19.0; extra == "dev-mkdocs"
|
|
53
54
|
Provides-Extra: dev-mypy
|
|
54
|
-
Requires-Dist: mypy==
|
|
55
|
+
Requires-Dist: mypy==2.4.1; extra == "dev-mypy"
|
|
55
56
|
Requires-Dist: grpc-stubs==1.53.0.6; extra == "dev-mypy"
|
|
56
|
-
Requires-Dist: types-Markdown==3.
|
|
57
|
-
Requires-Dist: types-protobuf==
|
|
57
|
+
Requires-Dist: types-Markdown==3.11.2.20261029; extra == "dev-mypy"
|
|
58
|
+
Requires-Dist: types-protobuf==7.35.1.20260906; extra == "dev-mypy"
|
|
58
59
|
Requires-Dist: frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-mypy"
|
|
59
60
|
Provides-Extra: dev-noxfile
|
|
60
|
-
Requires-Dist: nox==2026.
|
|
61
|
-
Requires-Dist: frequenz-repo-config[lib]==0.
|
|
61
|
+
Requires-Dist: nox==2026.10.20; extra == "dev-noxfile"
|
|
62
|
+
Requires-Dist: frequenz-repo-config[lib]==0.19.0; extra == "dev-noxfile"
|
|
62
63
|
Provides-Extra: dev-pylint
|
|
63
|
-
Requires-Dist: pylint==4.
|
|
64
|
+
Requires-Dist: pylint==4.1.3; extra == "dev-pylint"
|
|
64
65
|
Requires-Dist: frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
|
|
65
66
|
Provides-Extra: dev-pytest
|
|
66
|
-
Requires-Dist: pytest==9.0
|
|
67
|
-
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.
|
|
68
|
-
Requires-Dist: pytest-mock==3.
|
|
69
|
-
Requires-Dist: pytest-asyncio==1.
|
|
70
|
-
Requires-Dist: async-solipsism==0.
|
|
67
|
+
Requires-Dist: pytest==9.2.0; extra == "dev-pytest"
|
|
68
|
+
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.19.0; extra == "dev-pytest"
|
|
69
|
+
Requires-Dist: pytest-mock==3.17.0; extra == "dev-pytest"
|
|
70
|
+
Requires-Dist: pytest-asyncio==1.4.1.post1; extra == "dev-pytest"
|
|
71
|
+
Requires-Dist: async-solipsism==0.10; extra == "dev-pytest"
|
|
71
72
|
Provides-Extra: dev
|
|
72
73
|
Requires-Dist: frequenz-client-microgrid[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]; extra == "dev"
|
|
73
74
|
Dynamic: license-file
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
[build-system]
|
|
5
5
|
requires = [
|
|
6
|
-
"setuptools ==
|
|
7
|
-
"setuptools_scm[toml] == 10.
|
|
8
|
-
"frequenz-repo-config[lib] == 0.
|
|
6
|
+
"setuptools == 84.2.1",
|
|
7
|
+
"setuptools_scm[toml] == 10.3.4",
|
|
8
|
+
"frequenz-repo-config[lib] == 0.19.0",
|
|
9
9
|
]
|
|
10
10
|
build-backend = "setuptools.build_meta"
|
|
11
11
|
|
|
@@ -36,9 +36,9 @@ classifiers = [
|
|
|
36
36
|
]
|
|
37
37
|
requires-python = ">= 3.11, < 4"
|
|
38
38
|
dependencies = [
|
|
39
|
-
"frequenz-api-common >= 0.8.
|
|
39
|
+
"frequenz-api-common >= 0.8.4, < 1.0.0",
|
|
40
40
|
"frequenz-api-microgrid >= 0.18.0, < 1",
|
|
41
|
-
"frequenz-channels >= 1.6.1, <
|
|
41
|
+
"frequenz-channels >= 1.6.1, < 3",
|
|
42
42
|
"frequenz-client-base >= 0.10.0, < 0.12.0",
|
|
43
43
|
"frequenz-client-common >= 0.3.6, < 0.4.0",
|
|
44
44
|
"frequenz-core >= 1.3.0, < 2.0.0",
|
|
@@ -54,46 +54,47 @@ email = "floss@frequenz.com"
|
|
|
54
54
|
|
|
55
55
|
[project.optional-dependencies]
|
|
56
56
|
dev-flake8 = [
|
|
57
|
-
"flake8 == 7.
|
|
58
|
-
"flake8-datetimez ==
|
|
57
|
+
"flake8 == 7.5.0",
|
|
58
|
+
"flake8-datetimez == 26.8.1",
|
|
59
59
|
"flake8-docstrings == 1.7.0",
|
|
60
60
|
"flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
|
|
61
|
-
"pydoclint == 0.
|
|
61
|
+
"pydoclint == 0.12.0",
|
|
62
62
|
"pydocstyle == 6.3.0",
|
|
63
63
|
]
|
|
64
|
-
dev-formatting = ["black == 26.
|
|
64
|
+
dev-formatting = ["black == 26.10.1", "isort == 9.0.2"]
|
|
65
65
|
dev-mkdocs = [
|
|
66
|
-
"black == 26.
|
|
67
|
-
"
|
|
68
|
-
"
|
|
66
|
+
"black == 26.10.1",
|
|
67
|
+
"griffe-warnings-deprecated == 1.1.2",
|
|
68
|
+
"Markdown==3.11.2",
|
|
69
|
+
"mike == 2.2.0",
|
|
69
70
|
"mkdocs-gen-files == 0.6.1",
|
|
70
71
|
"mkdocs-literate-nav == 0.6.3",
|
|
71
72
|
"mkdocs-macros-plugin == 1.5.0",
|
|
72
|
-
"mkdocs-material == 9.
|
|
73
|
-
"mkdocstrings[python] == 1.0.
|
|
74
|
-
"mkdocstrings-python == 2.0.
|
|
75
|
-
"frequenz-repo-config[lib] == 0.
|
|
73
|
+
"mkdocs-material == 9.8.0",
|
|
74
|
+
"mkdocstrings[python] == 1.0.8",
|
|
75
|
+
"mkdocstrings-python == 2.0.10",
|
|
76
|
+
"frequenz-repo-config[lib] == 0.19.0",
|
|
76
77
|
]
|
|
77
78
|
dev-mypy = [
|
|
78
|
-
"mypy ==
|
|
79
|
+
"mypy == 2.4.1",
|
|
79
80
|
"grpc-stubs == 1.53.0.6",
|
|
80
|
-
"types-Markdown == 3.
|
|
81
|
-
"types-protobuf ==
|
|
81
|
+
"types-Markdown == 3.11.2.20261029",
|
|
82
|
+
"types-protobuf == 7.35.1.20260906",
|
|
82
83
|
# For checking the noxfile, docs/ script, and tests
|
|
83
84
|
"frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]",
|
|
84
85
|
]
|
|
85
|
-
dev-noxfile = ["nox == 2026.
|
|
86
|
+
dev-noxfile = ["nox == 2026.10.20", "frequenz-repo-config[lib] == 0.19.0"]
|
|
86
87
|
dev-pylint = [
|
|
87
|
-
"pylint == 4.
|
|
88
|
+
"pylint == 4.1.3",
|
|
88
89
|
# For checking the noxfile, docs/ script, and tests
|
|
89
90
|
"frequenz-client-microgrid[dev-mkdocs,dev-noxfile,dev-pytest]",
|
|
90
91
|
]
|
|
91
92
|
dev-pytest = [
|
|
92
|
-
"pytest == 9.0
|
|
93
|
-
"frequenz-repo-config[extra-lint-examples] == 0.
|
|
94
|
-
"pytest-mock == 3.
|
|
95
|
-
"pytest-asyncio == 1.
|
|
96
|
-
"async-solipsism == 0.
|
|
93
|
+
"pytest == 9.2.0",
|
|
94
|
+
"frequenz-repo-config[extra-lint-examples] == 0.19.0",
|
|
95
|
+
"pytest-mock == 3.17.0",
|
|
96
|
+
"pytest-asyncio == 1.4.1.post1",
|
|
97
|
+
"async-solipsism == 0.10",
|
|
97
98
|
]
|
|
98
99
|
dev = [
|
|
99
100
|
"frequenz-client-microgrid[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
|
|
@@ -168,7 +169,6 @@ disable = [
|
|
|
168
169
|
]
|
|
169
170
|
|
|
170
171
|
[tool.pytest.ini_options]
|
|
171
|
-
addopts = "-vv"
|
|
172
172
|
filterwarnings = [
|
|
173
173
|
"error",
|
|
174
174
|
"once::DeprecationWarning",
|
|
@@ -178,11 +178,13 @@ filterwarnings = [
|
|
|
178
178
|
'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning',
|
|
179
179
|
]
|
|
180
180
|
testpaths = ["tests", "src"]
|
|
181
|
+
asyncio_debug = true
|
|
181
182
|
asyncio_mode = "auto"
|
|
182
183
|
asyncio_default_fixture_loop_scope = "function"
|
|
183
184
|
required_plugins = ["pytest-asyncio", "pytest-mock"]
|
|
184
185
|
|
|
185
186
|
[tool.mypy]
|
|
187
|
+
enable_error_code = ["exhaustive-match"]
|
|
186
188
|
explicit_package_bases = true
|
|
187
189
|
namespace_packages = true
|
|
188
190
|
# This option disables mypy cache, and it is sometimes useful to enable it if
|
|
@@ -27,7 +27,8 @@ class ComponentCategory(enum.Enum):
|
|
|
27
27
|
)
|
|
28
28
|
"""The point where the local microgrid is connected to the grid (deprecated).
|
|
29
29
|
|
|
30
|
-
Deprecated:
|
|
30
|
+
Deprecated:
|
|
31
|
+
This member is deprecated since v0.18.0.
|
|
31
32
|
Use
|
|
32
33
|
[`GRID_CONNECTION_POINT`][frequenz.client.microgrid.component.ComponentCategory.GRID_CONNECTION_POINT]
|
|
33
34
|
instead.
|
|
@@ -96,7 +97,8 @@ class ComponentCategory(enum.Enum):
|
|
|
96
97
|
)
|
|
97
98
|
"""A voltage transformer (deprecated).
|
|
98
99
|
|
|
99
|
-
Deprecated:
|
|
100
|
+
Deprecated:
|
|
101
|
+
This member is deprecated since v0.18.0.
|
|
100
102
|
Use
|
|
101
103
|
[`POWER_TRANSFORMER`][frequenz.client.microgrid.component.ComponentCategory.POWER_TRANSFORMER]
|
|
102
104
|
instead.
|
|
@@ -52,6 +52,12 @@ class Component: # pylint: disable=too-many-instance-attributes
|
|
|
52
52
|
operational_lifetime: Lifetime = dataclasses.field(default_factory=Lifetime)
|
|
53
53
|
"""The operational lifetime of this component."""
|
|
54
54
|
|
|
55
|
+
_provides_telemetry: bool | None = None
|
|
56
|
+
"""Whether this component provides telemetry data, or `None` if unspecified."""
|
|
57
|
+
|
|
58
|
+
_accepts_control: bool | None = None
|
|
59
|
+
"""Whether this component accepts control commands, or `None` if unspecified."""
|
|
60
|
+
|
|
55
61
|
rated_bounds: Mapping[Metric | int, Bounds] = dataclasses.field(
|
|
56
62
|
default_factory=dict,
|
|
57
63
|
# dict is not hashable, so we don't use this field to calculate the hash. This
|
|
@@ -85,6 +91,40 @@ class Component: # pylint: disable=too-many-instance-attributes
|
|
|
85
91
|
raise TypeError(f"Cannot instantiate {cls.__name__} directly")
|
|
86
92
|
return super().__new__(cls)
|
|
87
93
|
|
|
94
|
+
def provides_telemetry(self) -> bool:
|
|
95
|
+
"""Check whether this component provides telemetry data.
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
Whether this component provides telemetry data.
|
|
99
|
+
|
|
100
|
+
Raises:
|
|
101
|
+
ValueError: If the operational mode is unspecified, so whether telemetry
|
|
102
|
+
is provided is unknown.
|
|
103
|
+
"""
|
|
104
|
+
if self._provides_telemetry is None:
|
|
105
|
+
raise ValueError(
|
|
106
|
+
f"operational mode of {self} is unspecified; "
|
|
107
|
+
"telemetry availability is unknown"
|
|
108
|
+
)
|
|
109
|
+
return self._provides_telemetry
|
|
110
|
+
|
|
111
|
+
def accepts_control(self) -> bool:
|
|
112
|
+
"""Check whether this component accepts control commands.
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Whether this component accepts control commands.
|
|
116
|
+
|
|
117
|
+
Raises:
|
|
118
|
+
ValueError: If the operational mode is unspecified, so whether control
|
|
119
|
+
commands are accepted is unknown.
|
|
120
|
+
"""
|
|
121
|
+
if self._accepts_control is None:
|
|
122
|
+
raise ValueError(
|
|
123
|
+
f"operational mode of {self} is unspecified; "
|
|
124
|
+
"control availability is unknown"
|
|
125
|
+
)
|
|
126
|
+
return self._accepts_control
|
|
127
|
+
|
|
88
128
|
def is_operational_at(self, timestamp: datetime) -> bool:
|
|
89
129
|
"""Check whether this component is operational at a specific timestamp.
|
|
90
130
|
|
|
@@ -71,6 +71,40 @@ _logger = logging.getLogger(__name__)
|
|
|
71
71
|
# pylint: disable=too-many-arguments
|
|
72
72
|
|
|
73
73
|
|
|
74
|
+
_BOOLS_BY_OPERATIONAL_MODE: dict[int, tuple[bool | None, bool | None]] = {
|
|
75
|
+
electrical_components_pb2.ELECTRICAL_COMPONENT_OPERATIONAL_MODE_INACTIVE: (
|
|
76
|
+
False,
|
|
77
|
+
False,
|
|
78
|
+
),
|
|
79
|
+
electrical_components_pb2.ELECTRICAL_COMPONENT_OPERATIONAL_MODE_TELEMETRY_ONLY: (
|
|
80
|
+
True,
|
|
81
|
+
False,
|
|
82
|
+
),
|
|
83
|
+
electrical_components_pb2.ELECTRICAL_COMPONENT_OPERATIONAL_MODE_CONTROL_ONLY: (
|
|
84
|
+
False,
|
|
85
|
+
True,
|
|
86
|
+
),
|
|
87
|
+
electrical_components_pb2.ELECTRICAL_COMPONENT_OPERATIONAL_MODE_CONTROL_AND_TELEMETRY: (
|
|
88
|
+
True,
|
|
89
|
+
True,
|
|
90
|
+
),
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def _operational_mode_to_bools(value: int) -> tuple[bool | None, bool | None]:
|
|
95
|
+
"""Map a protobuf operational mode to telemetry/control booleans.
|
|
96
|
+
|
|
97
|
+
Args:
|
|
98
|
+
value: A protobuf operational-mode enum value (an
|
|
99
|
+
`ELECTRICAL_COMPONENT_OPERATIONAL_MODE_*` constant).
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
A `(provides_telemetry, accepts_control)` tuple, with both elements `None`
|
|
103
|
+
when the operational mode is unspecified or unrecognized.
|
|
104
|
+
"""
|
|
105
|
+
return _BOOLS_BY_OPERATIONAL_MODE.get(value, (None, None))
|
|
106
|
+
|
|
107
|
+
|
|
74
108
|
def component_from_proto(
|
|
75
109
|
message: electrical_components_pb2.ElectricalComponent,
|
|
76
110
|
) -> ComponentTypes:
|
|
@@ -117,6 +151,8 @@ class ComponentBaseData(NamedTuple):
|
|
|
117
151
|
lifetime: Lifetime
|
|
118
152
|
rated_bounds: dict[Metric | int, Bounds]
|
|
119
153
|
category_specific_info: dict[str, Any]
|
|
154
|
+
provides_telemetry: bool | None
|
|
155
|
+
accepts_control: bool | None
|
|
120
156
|
category_mismatched: bool = False
|
|
121
157
|
|
|
122
158
|
|
|
@@ -197,6 +233,7 @@ def component_base_from_proto_with_issues(
|
|
|
197
233
|
lifetime,
|
|
198
234
|
rated_bounds,
|
|
199
235
|
category_specific_info,
|
|
236
|
+
*_operational_mode_to_bools(message.operational_mode),
|
|
200
237
|
category_mismatched,
|
|
201
238
|
)
|
|
202
239
|
|
|
@@ -231,6 +268,8 @@ def component_from_proto_with_issues(
|
|
|
231
268
|
model_name=base_data.model_name,
|
|
232
269
|
category=base_data.category,
|
|
233
270
|
operational_lifetime=base_data.lifetime,
|
|
271
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
272
|
+
_accepts_control=base_data.accepts_control,
|
|
234
273
|
category_specific_metadata=base_data.category_specific_info,
|
|
235
274
|
rated_bounds=base_data.rated_bounds,
|
|
236
275
|
)
|
|
@@ -245,6 +284,8 @@ def component_from_proto_with_issues(
|
|
|
245
284
|
model_name=base_data.model_name,
|
|
246
285
|
category=base_data.category,
|
|
247
286
|
operational_lifetime=base_data.lifetime,
|
|
287
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
288
|
+
_accepts_control=base_data.accepts_control,
|
|
248
289
|
rated_bounds=base_data.rated_bounds,
|
|
249
290
|
)
|
|
250
291
|
case (
|
|
@@ -267,6 +308,8 @@ def component_from_proto_with_issues(
|
|
|
267
308
|
manufacturer=base_data.manufacturer,
|
|
268
309
|
model_name=base_data.model_name,
|
|
269
310
|
operational_lifetime=base_data.lifetime,
|
|
311
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
312
|
+
_accepts_control=base_data.accepts_control,
|
|
270
313
|
rated_bounds=base_data.rated_bounds,
|
|
271
314
|
)
|
|
272
315
|
case ComponentCategory.BATTERY:
|
|
@@ -291,6 +334,8 @@ def component_from_proto_with_issues(
|
|
|
291
334
|
manufacturer=base_data.manufacturer,
|
|
292
335
|
model_name=base_data.model_name,
|
|
293
336
|
operational_lifetime=base_data.lifetime,
|
|
337
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
338
|
+
_accepts_control=base_data.accepts_control,
|
|
294
339
|
rated_bounds=base_data.rated_bounds,
|
|
295
340
|
)
|
|
296
341
|
case int():
|
|
@@ -302,6 +347,8 @@ def component_from_proto_with_issues(
|
|
|
302
347
|
manufacturer=base_data.manufacturer,
|
|
303
348
|
model_name=base_data.model_name,
|
|
304
349
|
operational_lifetime=base_data.lifetime,
|
|
350
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
351
|
+
_accepts_control=base_data.accepts_control,
|
|
305
352
|
rated_bounds=base_data.rated_bounds,
|
|
306
353
|
type=battery_type,
|
|
307
354
|
)
|
|
@@ -338,6 +385,8 @@ def component_from_proto_with_issues(
|
|
|
338
385
|
manufacturer=base_data.manufacturer,
|
|
339
386
|
model_name=base_data.model_name,
|
|
340
387
|
operational_lifetime=base_data.lifetime,
|
|
388
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
389
|
+
_accepts_control=base_data.accepts_control,
|
|
341
390
|
rated_bounds=base_data.rated_bounds,
|
|
342
391
|
)
|
|
343
392
|
case int():
|
|
@@ -351,6 +400,8 @@ def component_from_proto_with_issues(
|
|
|
351
400
|
manufacturer=base_data.manufacturer,
|
|
352
401
|
model_name=base_data.model_name,
|
|
353
402
|
operational_lifetime=base_data.lifetime,
|
|
403
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
404
|
+
_accepts_control=base_data.accepts_control,
|
|
354
405
|
rated_bounds=base_data.rated_bounds,
|
|
355
406
|
type=ev_charger_type,
|
|
356
407
|
)
|
|
@@ -368,6 +419,8 @@ def component_from_proto_with_issues(
|
|
|
368
419
|
manufacturer=base_data.manufacturer,
|
|
369
420
|
model_name=base_data.model_name,
|
|
370
421
|
operational_lifetime=base_data.lifetime,
|
|
422
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
423
|
+
_accepts_control=base_data.accepts_control,
|
|
371
424
|
rated_bounds=base_data.rated_bounds,
|
|
372
425
|
rated_fuse_current=rated_fuse_current,
|
|
373
426
|
)
|
|
@@ -405,6 +458,8 @@ def component_from_proto_with_issues(
|
|
|
405
458
|
manufacturer=base_data.manufacturer,
|
|
406
459
|
model_name=base_data.model_name,
|
|
407
460
|
operational_lifetime=base_data.lifetime,
|
|
461
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
462
|
+
_accepts_control=base_data.accepts_control,
|
|
408
463
|
rated_bounds=base_data.rated_bounds,
|
|
409
464
|
)
|
|
410
465
|
case int():
|
|
@@ -418,6 +473,8 @@ def component_from_proto_with_issues(
|
|
|
418
473
|
manufacturer=base_data.manufacturer,
|
|
419
474
|
model_name=base_data.model_name,
|
|
420
475
|
operational_lifetime=base_data.lifetime,
|
|
476
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
477
|
+
_accepts_control=base_data.accepts_control,
|
|
421
478
|
rated_bounds=base_data.rated_bounds,
|
|
422
479
|
type=inverter_type,
|
|
423
480
|
)
|
|
@@ -433,6 +490,8 @@ def component_from_proto_with_issues(
|
|
|
433
490
|
manufacturer=base_data.manufacturer,
|
|
434
491
|
model_name=base_data.model_name,
|
|
435
492
|
operational_lifetime=base_data.lifetime,
|
|
493
|
+
_provides_telemetry=base_data.provides_telemetry,
|
|
494
|
+
_accepts_control=base_data.accepts_control,
|
|
436
495
|
rated_bounds=base_data.rated_bounds,
|
|
437
496
|
primary_voltage=message.category_specific_info.power_transformer.primary,
|
|
438
497
|
secondary_voltage=message.category_specific_info.power_transformer.secondary,
|
|
@@ -498,6 +557,8 @@ def _metric_config_bounds_from_proto(
|
|
|
498
557
|
minor_issues.append(
|
|
499
558
|
f"metric_config_bounds has an unrecognized metric {metric}"
|
|
500
559
|
)
|
|
560
|
+
case _:
|
|
561
|
+
pass
|
|
501
562
|
|
|
502
563
|
if not metric_bound.HasField("config_bounds"):
|
|
503
564
|
major_issues.append(
|
|
@@ -188,7 +188,8 @@ class ComponentErrorCode(enum.Enum):
|
|
|
188
188
|
)
|
|
189
189
|
"""System shutdown due to undervoltage involving this component.
|
|
190
190
|
|
|
191
|
-
Deprecated:
|
|
191
|
+
Deprecated:
|
|
192
|
+
This member is deprecated since v0.18.0.
|
|
192
193
|
Use
|
|
193
194
|
[`UNDERVOLTAGE`][frequenz.client.microgrid.component.ComponentErrorCode.UNDERVOLTAGE]
|
|
194
195
|
instead.
|