-
Notifications
You must be signed in to change notification settings - Fork 138
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
feat: enhance aimrt_py channel with ctx functionality #44
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refactor the import statements across multiple modules to improve readability and maintain consistency. Ensure all relevant libraries are imported in a coherent manner.
Expose the GetTopic method for both PublisherRef and SubscriberRef to improve topic management and enhance usability within the Python interface.
Introduce new context management methods for publishing messages with context support. Enhance the Python bindings to allow for better integration with context references, improving the flexibility and usability of the publisher functionality.
Add a new subscription method that includes context handling for better message processing. This improves the flexibility of message serialization formats and error handling during callback execution.
Improve code readability by removing unnecessary blank lines and ensuring consistent formatting in the publish and subscribe functions.
Improve visual consistency of the ASCII banner in the output, enhancing readability.
zhangyi1357
changed the title
feat: enhance aimrt_py channel with ctx funationality
feat: enhance aimrt_py channel with ctx functionality
Oct 21, 2024
Enhance the type hints in the RegisterPublishType, Publish, and Subscribe functions to improve code clarity and maintainability. This facilitates better integration with type-checking tools and helps prevent potential runtime errors.
Enhance the publishing functionality to handle both protobuf and JSON serialization types. This improves flexibility and allows for broader compatibility with different data formats. Add error handling for invalid serialization types to ensure robustness.
Update the serialization type from "pb" to "json" when publishing JSON messages, ensuring accurate format differentiation for better clarity and preventing potential processing errors.
Improve message serialization by consolidating logic and enhancing readability. Ensure error handling for unsupported types remains clear.
Enhance channel functionality in aimrt_py by providing Context support, improving usability and enabling better resource management during operations.
Improve clarity by formatting the serialization type in the publish method. This enhances readability and ensures consistent output in message formatting.
Enhance the Publish function to accept different argument configurations and simplify the serialization process, ensuring clearer logic and improved usability.
Allow publishers to specify serialization type (protobuf or JSON) when publishing messages. Update method signatures to improve clarity and error handling for serialization type validation.
Clarify usage and expectations for the Publish function, including argument types and potential exceptions. This improves maintainability and usability for future developers.
Streamline the protobuf message serialization and deserialization processes by separating concerns into dedicated functions. Improve callback handling for subscriber methods to enhance code readability and maintainability.
Simplify the process of message serialization and deserialization by consolidating functions and improving code clarity. This enhances maintainability and reduces redundancy in handling protobuf messages.
Eliminate the `PySubscribeWithSerializationType` function to streamline the code and improve maintainability, as it is not being used in the current implementation.
Simplify the validation and handling of callback parameters in the subscription process. Ensure the callback adheres to a clear signature expectation, enhancing code maintainability and reducing potential errors.
Optimize import statements by specifying only required components, improving readability and maintainability.
Improve docstrings for registering and subscribing to protobuf message types, clarifying parameter details and callback expectations to aid developer understanding and usage.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add channel context support for aimrt_py.
Reorganize imports for consistency.