-
Notifications
You must be signed in to change notification settings - Fork 17
Update frequenz-api-microgrid
to v0.15.1
#416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
frequenz-api-microgrid
to v0.14.0frequenz-api-microgrid
to v0.15.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the "Disable pylint rules that started failing after updating to v0.15.1" commit, it looks extremely fishy. I'd rather investigate what broke and try to fix it before merging all these new ignores.
def GetMicrogridMetadata( | ||
self, request: Empty, context: grpc.ServicerContext | ||
) -> MicrogridMetadata: | ||
"""/nitrogen.Nitrogen/GetMicrogridMetadata method stub.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this nitrogen.Nitrogen/
still a thing? Not to address it in this PR, but to know if we should create an issue to update this or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not. the api spec no-longer has any mention of nitrogen, so we need to remove all mentions of it from the sdk as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -12,10 +12,13 @@ | |||
from enum import Enum | |||
from typing import Iterable, Optional, Set, TypeVar, Union | |||
|
|||
# pylint: disable=no-name-in-module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas why is this suddenly failing? It would be good to find out where this regressions comes from (and ideally fix it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'm guessing because some protobuf dep version changed in the api repo. That's why I put them all in a single comment, so it can be removed easily once we figure out the issue 🤞🏽
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually have a theory now:
Pylint doesn't look at the type annotations, it just looks at the code other other modules to see if the desired functions are there. This works only if the names are defined in python code in the modules. But protoc has not been doing that for a while now, and is just using dynamic module creation during import, and we appear to have to just use the type hints to know what's going on. If you look at one of the generated files, this becomes clear, like .nox/pylint/lib/python3.11/site-packages/frequenz/api/microgrid/inverter_pb2.py
And it was working until now, because we were using a very old version of protoc in the api repo.
Rebased to latest and resolved conflicts. |
7578a7f
to
1a1981a
Compare
New conflicts. BTW, please re-request a review when you want me to have a look at this again 🙏 |
714fdcb
to
425f8a0
Compare
Will add release notes when we are closer to merging, to not have to deal with conflicts. |
Why not merging it now? |
9862668
to
ae96aa5
Compare
I've rebased on your clear-release notes PR. Also the last code commit (e484f37) has changed. The previous version was ignoring the missing component type data, which was wrong. |
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
These follow the inclusion/exclusion bounds in the microgrid api. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Support for exclusion bounds will be added separately. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
The component type is now part of `Metadata`. This commit also adds a test for non-NONE inverter types. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Closes #412
To be merged after v0.21 is released.