@@ -286,8 +286,8 @@ def getClassNames(self, className=None, recursive=False, qualified=False, sort=F
286286
287287class OMCPathReal (pathlib .PurePosixPath ):
288288 """
289- Implementation of a basic (PurePosix)Path object which uses OMC as backend. The connection to OMC is provided via a
290- OMCSessionZMQ session object .
289+ Implementation of a basic (PurePosix)Path object which uses OMC as backend. The connection to OMC is provided via an
290+ instances of OMCSession* classes .
291291
292292 PurePosixPath is selected to cover usage of OMC in docker or via WSL. Usage of specialised function could result in
293293 errors as well as usage on a Windows system due to slightly different definitions (PureWindowsPath).
@@ -301,7 +301,7 @@ def with_segments(self, *pathsegments):
301301 """
302302 Create a new OMCPath object with the given path segments.
303303
304- The original definition of Path is overridden to ensure session is set.
304+ The original definition of Path is overridden to ensure the OMC session is set.
305305 """
306306 return type (self )(* pathsegments , session = self ._session )
307307
@@ -539,7 +539,7 @@ def get_cmd(self) -> list[str]:
539539
540540class OMCSessionZMQ :
541541 """
542- This class is handling an OMC session. It is a compatibility class for the new schema using OMCProcess * classes.
542+ This class is a compatibility layer for the new schema using OMCSession * classes.
543543 """
544544
545545 def __init__ (
@@ -574,7 +574,7 @@ def escape_str(value: str) -> str:
574574
575575 def omcpath (self , * path ) -> OMCPath :
576576 """
577- Create an OMCPath object based on the given path segments and the current OMC session .
577+ Create an OMCPath object based on the given path segments and the current OMC process definition .
578578 """
579579 return self .omc_process .omcpath (* path )
580580
@@ -652,21 +652,22 @@ class OMCSessionMeta(abc.ABCMeta, PostInitCaller):
652652
653653class OMCSession (metaclass = OMCSessionMeta ):
654654 """
655- Base class for an OMC session. This class contains common functionality for all OMC sessions.
655+ Base class for an OMC session started via ZMQ. This class contains common functionality for all variants of an
656+ OMC session definition.
656657
657658 The main method is sendExpression() which is used to send commands to the OMC process.
658659
659- The class expects an OMCProcess* on initialisation. It defines the type of OMC process to use :
660+ The following variants are defined :
660661
661- * OMCProcessLocal
662+ * OMCSessionLocal
662663
663- * OMCProcessPort
664+ * OMCSessionPort
664665
665- * OMCProcessDocker
666+ * OMCSessionDocker
666667
667- * OMCProcessDockerContainer
668+ * OMCSessionDockerContainer
668669
669- * OMCProcessWSL
670+ * OMCSessionWSL
670671
671672 If no OMC process is defined, a local OMC process is initialized.
672673 """
@@ -677,12 +678,12 @@ def __init__(
677678 ** kwargs ,
678679 ) -> None :
679680 """
680- Initialisation for OMCProcess
681+ Initialisation for OMCSession
681682 """
682683
683684 # store variables
684685 self ._timeout = timeout
685- # generate a random string for this session
686+ # generate a random string for this instance of OMC
686687 self ._random_string = uuid .uuid4 ().hex
687688 # get a temporary directory
688689 self ._temp_dir = pathlib .Path (tempfile .gettempdir ())
@@ -766,15 +767,15 @@ def escape_str(value: str) -> str:
766767
767768 def omcpath (self , * path ) -> OMCPath :
768769 """
769- Create an OMCPath object based on the given path segments and the current OMC session .
770+ Create an OMCPath object based on the given path segments and the current OMCSession* class .
770771 """
771772
772773 # fallback solution for Python < 3.12; a modified pathlib.Path object is used as OMCPath replacement
773774 if sys .version_info < (3 , 12 ):
774775 if isinstance (self , OMCSessionLocal ):
775776 # noinspection PyArgumentList
776777 return OMCPath (* path )
777- raise OMCSessionException ("OMCPath is supported for Python < 3.12 only if OMCProcessLocal is used!" )
778+ raise OMCSessionException ("OMCPath is supported for Python < 3.12 only if OMCSessionLocal is used!" )
778779 return OMCPath (* path , session = self )
779780
780781 def omcpath_tempdir (self , tempdir_base : Optional [OMCPath ] = None ) -> OMCPath :
@@ -868,7 +869,7 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
868869 timeout = 1.0
869870
870871 if self ._omc_zmq is None :
871- raise OMCSessionException ("No OMC running. Please create a new instance of OMCProcess !" )
872+ raise OMCSessionException ("No OMC running. Please create a new instance of OMCSession !" )
872873
873874 logger .debug ("sendExpression(%r, parsed=%r)" , command , parsed )
874875
@@ -998,7 +999,7 @@ def sendExpression(self, command: str, parsed: bool = True) -> Any:
998999
9991000 def get_port (self ) -> Optional [str ]:
10001001 """
1001- Get the port to connect to the OMC process .
1002+ Get the port to connect to the OMC session .
10021003 """
10031004 if not isinstance (self ._omc_port , str ):
10041005 raise OMCSessionException (f"Invalid port to connect to OMC process: { self ._omc_port } " )
@@ -1030,7 +1031,7 @@ def _get_portfile_path(self) -> Optional[pathlib.Path]:
10301031 @abc .abstractmethod
10311032 def omc_run_data_update (self , omc_run_data : OMCSessionRunData ) -> OMCSessionRunData :
10321033 """
1033- Update the OMCSessionRunData object based on the selected OMCProcess implementation.
1034+ Update the OMCSessionRunData object based on the selected OMCSession implementation.
10341035
10351036 The main point is the definition of OMCSessionRunData.cmd_model_executable which contains the specific command
10361037 to run depending on the selected system.
@@ -1042,7 +1043,7 @@ def omc_run_data_update(self, omc_run_data: OMCSessionRunData) -> OMCSessionRunD
10421043
10431044class OMCSessionPort (OMCSession ):
10441045 """
1045- OMCProcess implementation which uses a port to connect to an already running OMC server.
1046+ OMCSession implementation which uses a port to connect to an already running OMC server.
10461047 """
10471048
10481049 def __init__ (
@@ -1054,14 +1055,14 @@ def __init__(
10541055
10551056 def omc_run_data_update (self , omc_run_data : OMCSessionRunData ) -> OMCSessionRunData :
10561057 """
1057- Update the OMCSessionRunData object based on the selected OMCProcess implementation.
1058+ Update the OMCSessionRunData object based on the selected OMCSession implementation.
10581059 """
1059- raise OMCSessionException ("OMCProcessPort does not support omc_run_data_update()!" )
1060+ raise OMCSessionException ("OMCSessionPort does not support omc_run_data_update()!" )
10601061
10611062
10621063class OMCSessionLocal (OMCSession ):
10631064 """
1064- OMCProcess implementation which runs the OMC server locally on the machine (Linux / Windows).
1065+ OMCSession implementation which runs the OMC server locally on the machine (Linux / Windows).
10651066 """
10661067
10671068 def __init__ (
@@ -1144,7 +1145,7 @@ def _omc_port_get(self) -> str:
11441145
11451146 def omc_run_data_update (self , omc_run_data : OMCSessionRunData ) -> OMCSessionRunData :
11461147 """
1147- Update the OMCSessionRunData object based on the selected OMCProcess implementation.
1148+ Update the OMCSessionRunData object based on the selected OMCSession implementation.
11481149 """
11491150 # create a copy of the data
11501151 omc_run_data_copy = dataclasses .replace (omc_run_data )
@@ -1187,7 +1188,7 @@ def omc_run_data_update(self, omc_run_data: OMCSessionRunData) -> OMCSessionRunD
11871188
11881189class OMCSessionDockerHelper (OMCSession ):
11891190 """
1190- Base class for OMCProcess implementations which run the OMC server in a Docker container.
1191+ Base class for OMCSession implementations which run the OMC server in a Docker container.
11911192 """
11921193
11931194 def __init__ (
@@ -1301,7 +1302,7 @@ def get_docker_container_id(self) -> str:
13011302
13021303 def omc_run_data_update (self , omc_run_data : OMCSessionRunData ) -> OMCSessionRunData :
13031304 """
1304- Update the OMCSessionRunData object based on the selected OMCProcess implementation.
1305+ Update the OMCSessionRunData object based on the selected OMCSession implementation.
13051306 """
13061307 omc_run_data_copy = dataclasses .replace (omc_run_data )
13071308
@@ -1646,7 +1647,7 @@ def _omc_port_get(self) -> str:
16461647
16471648 def omc_run_data_update (self , omc_run_data : OMCSessionRunData ) -> OMCSessionRunData :
16481649 """
1649- Update the OMCSessionRunData object based on the selected OMCProcess implementation.
1650+ Update the OMCSessionRunData object based on the selected OMCSession implementation.
16501651 """
16511652 omc_run_data_copy = dataclasses .replace (omc_run_data )
16521653
0 commit comments