Skip to content

Conversation

@syntron
Copy link
Contributor

@syntron syntron commented Nov 26, 2025

finally remove OMCSessionZMQ

based on top of PR #386

milestone v5.0.0 (cleanup / removal of depreciated features)

@syntron syntron force-pushed the remove_OMCSessionZMQ branch from 3a851c2 to 4b7dfa7 Compare November 26, 2025 19:38
@adeas31 adeas31 added this to the 5.0.0 milestone Nov 27, 2025
@syntron syntron force-pushed the remove_OMCSessionZMQ branch 2 times, most recently from 130a54b to 2918597 Compare November 29, 2025 22:46
Pylint is recommenting to order the imports in several sections alphabetically:
(1) python standard library
(2) third party packages
(3) current package
OMPython/ModelicaSystem.py:1787:16: W0612: Unused variable 'key' (unused-variable)

=> replace items() by values()
…table

* use check=False => no CalledProcessError exception; possibility to
  handle the error code
* error code needs to be checked (compare == 0) by the caller!
* improve log messages; print returncode if it is != 0 with stdout
* ensure a message if logged if returncode != 0
* self.session().run_model_executable() will raise OMCSessionException!
Would it make sense to combine this code and the code in linearize() in one new function?

def _process_override_data(self, om_cmd, sim_override, file_override) -> None:
The code could:
(1) check the version; set command line parameters as needed
(2) create the content of the override file
(3) create the overwrite file and set it as command line parameter

The advantage would be, that the modified code is not in two places but only in one ...
…ons as dict[str, str]

* after OMC is run, the values will be string anyway
* simplify code / align on one common definition for these dicts
OMCSessionPort is a limited version as we do not know how OMC is run.
@syntron syntron force-pushed the remove_OMCSessionZMQ branch from 2918597 to 9ebd429 Compare January 24, 2026 12:27
@syntron syntron force-pushed the remove_OMCSessionZMQ branch from 475cbbd to 93f2bd9 Compare January 24, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants