-
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
Version 0.0.1 #13
Version 0.0.1 #13
Conversation
tests/test_examples.py
Outdated
# run provided scripts | ||
print(f"Running permutation {permutation}") | ||
processes = [ | ||
Popen( # noqa: S607 |
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.
Why dont' you use subprocess.run
instead? the latest versions of python provide this more convenient helper that is far more readable and has preconfigured the most common setups. Using raw Popen can be sometimes errorprone ... (we already had this discussion several times... :-) )
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.
Not what I wanted or needed. From the docs
Run the command described by args. Wait for command to complete, then return a CompletedProcess instance.
I need to start 2 scripts and wait for them to complete.
tests/test_examples.py
Outdated
|
||
# ensure all processes finished successfully | ||
for process in processes: | ||
stdout, _ = process.communicate() |
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.
but these do not run in parallel as you claim in assert_run_in_parallel
, right?
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.
Yes they do run in parallel, otherwise it would not be possible for example/2_base_time_add
to finish.
In the above loop I wait for the process to provide a returncode
, meaning it finished execution.
Here I fetch the standard output.
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.
Awesome! let's get this in!
@@ -1,5 +1,5 @@ | |||
[flake8] | |||
select = B,B9,C,D,DAR,E,F,N,RST,S,W | |||
select = B,B9,C,DAR,E,F,N,RST,S,W |
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.
these entries are amazingly clear 🤣
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.
It looks good to me! Looking forward to testing it.
What do these changes do?
Add a base library to be used for control cases.
NOTE: this package was build using cookiecutter-hypermodern-python for convenience.
How does it work?
osparc_control
package provides an easy way to define a supported interface by providing a list ofCommandManifest
.CommandManifest
is the interface(signature) of the supported command.CommandManifest
. ACommandReceived
confirmation is always send to each command. The requester expects this command to be delivered (this is required to avoid the requesting part being stuck awaiting forever if the remote part is not running). A 1 minute interval is defined to detect this situation.CommandType
:How to test
You require
poetry
on your system, please make sure it is installed.In a virtualenv install dev dependencies
Run suite with
python 3.6
andnox
.If you do not have python 3.6 on your system feel free to run with a different python interpreter by changing the below command (replace
3.6
with your version of python:Examples
Please follow the updated
README.md
What changed
sphynx
withdocsify
Related issues