-
Notifications
You must be signed in to change notification settings - Fork 3
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
Restructure modules and class names #25
Conversation
I'm planning to improve the docs too, but I will wait until this is merged because I can imagine there could be some push back. BTW, I really think we should eventually rename this project |
The comments are using the old v4 syntax, so it might confuse users trying to add more rules. We consider all files under `docs/_scripts/` as tooling, and we remove the TODO as the work was already done. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
The `aio` module doesn't seem to be properly exposed in the `grpc` package and it makes `pyright` think it doesn't exist. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
The `grpcio-tools` package is not really necessary for this repository, as it provides tools to build `.proto` files, but it is indirectly providing the dependency to `protobuf`, which provides `google.protobuf` and it's indeed used by this repository. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
We remove the `_helper` suffix, as it doesn't provide any information. We also remove the `grpc_` prefix for `streaming` as we have that info in the class name, and it also involves Frequenz channels, and the same for the `_strategy` in `retry`. In general it is also a good practice to keep module names short. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
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.
Just a comment about the name.
I will update and improve the docs in a followup PR, and then do the v0.2.0 release. |
Enabled auto-merge. |
do you want to update the commit message also? edab315 |
The `Helper` part doesn't provide any useful information, what is more important about this class, is that it is using a `Broadcast` channel to broadcast what's received by the gRPC stream. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
The `Retry` part is in the module name, so it is redundant. This also change imports to use the module name, and change some variables to `strategy` to make the code more clear (before the style was not very consistent, sometimes calling variables `retry_spec` or just `retry`. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Good catch, done now! |
I updated the PR description also with the new name, and removed and re-enabled auto-merge, so that it uses the updated merge commit message. |
This PR do some minor cleanups and some major project structuring to use more consistent and shorter modules and class names.
frequenz.client.base.grpc_streaming_helper
was renamed tofrequenz.client.base.streaming
.The
GrpcStreamingHelper
class was renamed toGrpcStreamBroadcaster
.retry_spec
was renamed toretry_strategy
.frequenz.client.base.retry_strategy
was renamed tofrequenz.client.base.retry
.RetryStrategy
class was renamed toStrategy
.