Repository navigation
Conversion guide to upgrade to OMPython 4 #373
Copy link
Copy link
Open
Description
Activity
@AnHeuermann Thanks for your work an this; below my comments; see also issue #372 and #374
OMCSessionZMQwas splitted into several parts:OMCSessionZMQ=> handling of interactions with OMCOMCProcess*=> responsible for the connection to the OMC process; local, port, docker and WSL possibleOMCSesionCMD=> OMC API, to be removed (see Remove the OMC API functions #276)- => using this structure and the other changes ModelicaSystem can be used with OMC local, via docker or via WSL
- why would you need
pyparsingdirectly? if needed it should be imported - I'm not aware of any change regarding
omc.sendExpression('exit')- was this working before? I did not found any code handling this in v3.6.0
other (breaking?) changes:
- rework of file structure - should not be visible to the user
- updated handling of linearisation; see
LinearizationResult- should be compatible - use of
ModelicaSystemCmd- should also not be directly visible to the user - simargs for
ModelicSystem.simulation()- simflags depreciated
in v4.1.0:
- update of
set*()functions - use a dictionary instead of string based definition; old version still working but depreciated - use of
OMCPath- compatibility layer for Python < 3.12; limited functionality - update
ModelicaSysteminterface - split class initialisation and model definition (this will fixconvertFmo2Mo())
planned for v4.1.0:
- finish fix for
convertFmo2Mo() - rename variables - breaking change (in my v4.1.0-test branch; not available as PR for now)
future (v5.0.0):
- remove support of Python < 3.12 (
OMCPath) - PR Remove deprecated parts of OMCPath #346 set*()function - suport only *kwargs - PR Remove deprecated code in ModelicaSystem set*() functions #347- remove simflags for simulate() - PR Remove deprecated functionality #308
feel free to ask if you need more information
why would you need pyparsing directly? if needed it should be imported
Yes, that is the better way and how I changed it. It was used to catch some specific parsing error.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsBacklog
Description
Is there a write up of the main breaking changes in OMPython v4.0.0?
While trying to update OMPython in https://github.com/OpenModelica/OpenModelicaLibraryTesting I noticed some breaking changes. It would be nice if there was some place in the documentation telling users how to upgrade.
Breaking changes I noticed:
OMCSessionZMQno longer accepts Docker arguments --> I found a new classOMCProcessDockerwhich does and used that one.pyparsingis no longer exported.omc.sendExpression('exit')no longer works -->omc.sendExpression('quit()')or simply let the class destruction handle it.Are there more mayor changes?