-
Notifications
You must be signed in to change notification settings - Fork 11
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
Makes v0.6.0 (soon to be v0.6.1) retro-compatible with v0.5.0 #82
Makes v0.6.0 (soon to be v0.6.1) retro-compatible with v0.5.0 #82
Conversation
…f present Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
From the next release I'd then revert this this so that by importing |
examples/language-analyzer-v0.5.0.py
Outdated
@@ -0,0 +1,77 @@ | |||
#!/usr/bin/env python3 |
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.
imo we don't need to include this example. But add a test that checks "normal" grpc code works.
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.
ok, gonna remove it. BTW how do you propose to test it? I mean the normal gRPC datastub should be guaranteed to work by gRPC itself, isn't 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.
it doesn't work right now on master. So we can break it again in the future occasionally.
I propose something like:
class DummyAnalyzer(pb.AnalyzerServicer):
def NotifyReviewEvent(self, request, context):
return pb.EventResponse(messages=["review"])
def NotifyPushEvent(self, request, context):
return pb.EventResponse(messages=["push"])
class Test:
def test_review():
res = stub.NotifyReviewEvent(event_pb2.ReviewEvent())
self.assertEqual(res.messages, ["review"])
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.
thanks for the tip! done in 8053a25.
I also moved some utility testing so that analyzers could eventually use the mixin for testing purposes.
@@ -23,8 +23,9 @@ def __new__(cls, clsname, bases, dct): | |||
if name.startswith("__"): | |||
continue | |||
|
|||
default_func = dct.get(name, func) |
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 knew it's 1 line change!
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.
yeah I was ignoring if the method is actually defined 😅.
Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
fb9df66
to
8053a25
Compare
No description provided.