-
Notifications
You must be signed in to change notification settings - Fork 65
RFC - definition of a runner class using as much of the existing code as possible #404
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
base: master
Are you sure you want to change the base?
Conversation
* rename ModelicaSystemCmd => ModelExecutionCmd * rename OMCSessionRunData => ModelExecutionData * create class ModelExecutionException * move some code: * OMCSession.omc_run_data_update() => merge into ModelExecutionCmd.define() * OMCSession.run_model_executable() => ModelExecutionData.run()
…delExecutionException
* this prepares a version of OMCSession which is independend of OMC as these functions where the last two which needed sendExpression() in basic ModelicaSystem functionality
* store data as numpy.float64 - allows to define None values * split get*() function into Initial values and Final values
…tinuous data handling
…existable exists and can be executed
* test_ModelicaSystemDoE_local is tested * test_ModelicaSystemDoE_docker should work * test_ModelicaSystemDoE_WSL is untested
…delExecutionException
…m OMSessionABC * needed for the compatibility layer
* add get_session() * fix return values
* check return value from OMC * define return value for methods
* fix return values * additional cleanups
…rLocal and OMPathRunner Bash
* move more code to OMCSessionDockerHelper * use _docker_omc_start() to differentiate classes * define cmd_prefix
* use .items()
…ivate variable _model_name
* ModelicaSystemRunner & OMCPath * ModelicaSystemRunner & OMPathRunnerLocal * ModelicaSystemRunner & OMPathRunnerBash * ModelicaSystemRunner & OMPathRunnerBash using docker * ModelicaSystemRunner & OMPathRunnerBash using WSL (not tested!)
* OMCPath & OMCSessionZMQ * OMCPath & OMCSessionLocal * OMCPath & OMCSessionDocker * OMCPath & OMCSessionWSL (not tested!) * OMPathLocal & OMCSessionRunner * OMPathBash & OMCSessionRunner * OMPathBash & OMCSessionRunner in docker * OMPathBash & OMCSessionRunner in WSL (not tested!)
|
Some status update on this PR - the main points are:
The code defined here updates the internal structure of OMPython such that:
Furthermore, as OMCPath is working only for Python >= 3.12, another dimension exists. There is a dummy implementation of OMCPath for Python < 3.12 such that most of the functionality can also be used here. See PR #401 for a hint that even older Python version are used (Python 3.10 or even lower). These changes could be the baseline for a new documentation (see https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/ompython.html). My idea was to include these changes as 4.x.0 and create a cut at the next release (or keep some kind of compatibility layer alive). (partly from the discussion in PR #387) |
|
The failed test is due to Windows - it runs well for v4.0.0 (see: https://github.com/syntron/OMPython/actions/runs/21842400755) and 4.x.x (see: https://github.com/syntron/OMPython/actions/runs/21841418638) |
Content (lots of changes / these will be splitted into several PRs if the general approach is approved):
Compared to PR #401 this solution:
|instead ofUnionFurther changes could do additional modifications such that the 3rd party packages (ZMQ) are not needed at all in the runner code path.
All tests are running without error / tested in https://github.com/syntron/OMPython/actions/runs/20865402893
Please comment!