Add ZeroMQ pub/sub transport support with explicit import structure#19
Add ZeroMQ pub/sub transport support with explicit import structure#19
Conversation
Co-authored-by: gonzalocasas <[email protected]>
Co-authored-by: gonzalocasas <[email protected]>
|
@copilot please merge main into this PR |
src/compas_eve/__init__.py
Outdated
| "set_default_transport", | ||
| "InMemoryTransport", | ||
| ] | ||
|
|
There was a problem hiding this comment.
Remove all importing of ZeroMQTransport directly into the main __init__, this should only be an explicit import action by the user
There was a problem hiding this comment.
Removed all ZeroMQTransport imports from the main init.py. ZeroMQTransport is now only available via explicit import from compas_eve.zeromq. Commit: 9ea3789
src/compas_eve/zeromq/__init__.py
Outdated
|
|
||
| def __init__(self, endpoint, bind_subscriber=True, *args, **kwargs): | ||
| if zmq is None: | ||
| raise ImportError("pyzmq is required for ZeroMQ transport. Please install it with: pip install pyzmq") |
There was a problem hiding this comment.
Add conda also to the message
There was a problem hiding this comment.
Updated error message to include conda installation option: "pip install pyzmq or conda install pyzmq". Commit: 9ea3789
tests/integration/test_zeromq.py
Outdated
| try: | ||
| from compas_eve import ZeroMQTransport | ||
| ZEROMQ_AVAILABLE = True | ||
| except ImportError: | ||
| ZEROMQ_AVAILABLE = False |
There was a problem hiding this comment.
Remove conditional logic from tests, always test zeromq.
Also, ZeroMQTransport should be importable from compas_eve.zeromq instead of from compas_eve
There was a problem hiding this comment.
Removed all conditional logic from ZeroMQ tests and updated imports to use compas_eve.zeromq. Tests now always run without skipif decorators. Commit: 9ea3789
|
@copilot please check the review comment and fix them |
…essage, fix test imports Co-authored-by: gonzalocasas <[email protected]>
|
@copilot please merge main back into this PR |
…copilot/fix-18
This PR implements ZeroMQ pub/sub transport for
compas_eve, providing a high-performance messaging backend that shares the same generic API as existing transports.Implementation
The
ZeroMQTransportclass follows the established patterns fromMqttTransportandInMemoryTransport:TransportandEventEmitterMixinpublish(),subscribe(),advertise(), etc.Usage
Key Features
compas_eve.zeromq- not auto-imported into main moduleTesting
The implementation allows users to choose the best transport backend for their specific needs while maintaining clean import boundaries and explicit dependency management.
Fixes #18.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.