-
Notifications
You must be signed in to change notification settings - Fork 62
Rewrite OMCSessionZMQ #295
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
Conversation
e41076d
to
1af654a
Compare
1af654a
to
ee230a3
Compare
@adeas31 I just tried to run OMPython with docker ... and it failed even for 3.6.0! At that time docker was last tested? Who is using it? PS: got it working again ... it depends on omc installed on the host (in 3.6.0 and also now) |
6250241
to
3bf8811
Compare
@adeas31 this is now a complete rewrite of the code to connect to / start OMC in different ways: (1) just provide the ZMQ port => OMCProcessPort I think, what it would be quite easy to add podman or similar tools based on this definition. For the default users (localy started OMC), nothing changes. Question: is this something for the next release? If yes, I would cleanup this code and prepare it as PR ... however, more testing would be needed! I can only test a limited set of possibilities ... port (win/linux) / local (this is tested on github) / docker (linux) / docker container (linux) |
3bf8811
to
99572e4
Compare
99572e4
to
ae4855c
Compare
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.
LGTM
On Windows, use the list input style of the subprocess module to | ||
avoid problems resulting from spaces in the path string. | ||
Linux, however, only works with the string version. | ||
super().__init__(timeout=timeout) |
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.
Perhaps you can define a proper constructor for OMCProcessDockerHelper
which sets the docker arguments using the super().__init__
instead of setting them explicitly in OMCProcessDocker
and OMCProcessDockerContainer
.
super().__init__
can handle it based on cooperative multiple inheritance.
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.
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.
Great. Please rebase the PR and we are good to merge it.
ae4855c
to
1fe63c8
Compare
This is now a complete rewrite of OMCSessionZMQ; it is defined on top of PR #300
The main items are still the same as mentioned in the original statement.
Besides the OMCSessionZMQ class there are now several classes which can be used to create the OMC/ZMQ process:
This will also allow usage of WSL (see #268); I have some code ready but could not test it ...
OMCSessionZMQ handles different tasks:
a) start OMC process (local / via docker / via docker container)
b) connect to OMC process via ZMQ
c) connect to OMC using ZMQ
This PR tries to find a way to to split these items into several classes:
[1] OMCSessionZMQ - for b) and c)
[2] OMCProcess / OMCProcessLocal / OMCProcessDummy / OMCProcessDocker(?) - for a)
I started to work on this due to the docker code just sitting there without much usage in my case. Save for docker, all other test run fine ...
Still work in progress; feel free to comment if this even makes sense ...
On top of PR #291