Skip to content

Conversation

@syntron
Copy link
Contributor

@syntron syntron commented Aug 16, 2025

remove old style input for set*() functions

see PR #314 and PR #345

this should be with milestone 5.0.0 (one release with the warning message)

@syntron syntron changed the title Remove deprecated modelica system rewrite set functions Remove deprecated code in ModelicaSystem set*() functions Aug 16, 2025
@adeas31 adeas31 added this to the 5.0.0 milestone Aug 18, 2025
@syntron syntron force-pushed the remove_deprecated-ModelicaSystem_rewrite_set_functions branch from 1f551fd to 9d33992 Compare October 15, 2025 20:38
@syntron syntron force-pushed the remove_deprecated-ModelicaSystem_rewrite_set_functions branch from 9d33992 to ba56397 Compare October 30, 2025 20:34
@syntron syntron force-pushed the remove_deprecated-ModelicaSystem_rewrite_set_functions branch from 7698707 to 0144f48 Compare November 22, 2025 20:07
@syntron syntron force-pushed the remove_deprecated-ModelicaSystem_rewrite_set_functions branch from 0144f48 to 6acd4dd 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
@syntron syntron force-pushed the remove_deprecated-ModelicaSystem_rewrite_set_functions branch from 6acd4dd to 0d9e385 Compare January 24, 2026 12:27
@syntron syntron force-pushed the remove_deprecated-ModelicaSystem_rewrite_set_functions branch from 0d9e385 to b26b95b 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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants