Skip to content

Commit 377cd56

Browse files
Fix Python module being broken (#10)
It seems like the fcr sub directory was recently added (0.7.0) and that its respective `py` directory structure was not updated respectively. I added an `__init__.py`, and a `py.typed` to it, analogous to its parent directory. That SEEMS to fix the import issue I had on 0.8.1 (simply latest, tried nothing else above 0.6.0). I am not sure though if `py.typed` addition is needed.
2 parents 37d4675 + da0fd26 commit 377cd56

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License: MIT
2+
# Copyright © 2023 Frequenz Energy-as-a-Service GmbH
3+
"""FCR related dispatch."""

pytests/test_dispatch.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,16 @@ def test_module_import() -> None:
2323
from frequenz.api.dispatch import dispatch_pb2_grpc
2424

2525
assert dispatch_pb2_grpc is not None
26+
27+
28+
def test_fcr_pq_import() -> None:
29+
"""Test that the FCR prequalification sub module can be imported."""
30+
# pylint: disable=import-outside-toplevel
31+
from frequenz.api.dispatch.fcr import prequalification_pb2
32+
33+
assert prequalification_pb2 is not None
34+
35+
# pylint: disable=import-outside-toplevel
36+
from frequenz.api.dispatch.fcr import prequalification_pb2_grpc
37+
38+
assert prequalification_pb2_grpc is not None

0 commit comments

Comments
 (0)