Skip to content
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
merged 21 commits into from
Oct 22, 2024

Conversation

zhangyi1357
Copy link
Contributor

Add channel context support for aimrt_py.
Reorganize imports for consistency.

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.
@AimRT AimRT added the ci CI/CD workflow trigger label Oct 21, 2024
Improve visual consistency of the ASCII banner in the output, enhancing readability.
@AimRT AimRT added ci CI/CD workflow trigger and removed ci CI/CD workflow trigger labels Oct 21, 2024
@zhangyi1357 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.
@AimRT AimRT added ci ready ci CI/CD workflow trigger and removed ci CI/CD workflow trigger ci ready labels Oct 21, 2024
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.
@AimRT AimRT removed the ci CI/CD workflow trigger label Oct 22, 2024
@AimRT AimRT added the ci CI/CD workflow trigger label Oct 22, 2024
@AimRT AimRT merged commit e2e7706 into AimRT:main Oct 22, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci CI/CD workflow trigger
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants