Skip to content

Commit 7a86ef4

Browse files
committed
Improve ModelicaSystemCmd docstrings
1 parent 73fb34a commit 7a86ef4

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,7 @@ def args_set(self, args: dict[str, Optional[str | dict[str, str]]]) -> None:
168168
self.arg_set(key=arg, val=args[arg])
169169

170170
def get_exe(self) -> pathlib.Path:
171-
"""
172-
Get the path to the executable / complied model.
173-
174-
Returns
175-
-------
176-
pathlib.Path
177-
"""
171+
"""Get the path to the compiled model executable."""
178172
if platform.system() == "Windows":
179173
path_exe = self._runpath / f"{self._modelname}.exe"
180174
else:
@@ -186,12 +180,9 @@ def get_exe(self) -> pathlib.Path:
186180
return path_exe
187181

188182
def get_cmd(self) -> list:
189-
"""
190-
Run the requested simulation
183+
"""Get a list with the path to the executable and all command line args.
191184
192-
Returns
193-
-------
194-
list
185+
This can later be used as an argument for subprocess.run().
195186
"""
196187

197188
path_exe = self.get_exe()
@@ -206,12 +197,11 @@ def get_cmd(self) -> list:
206197
return cmdl
207198

208199
def run(self) -> int:
209-
"""
210-
Run the requested simulation
200+
"""Run the requested simulation.
211201
212202
Returns
213203
-------
214-
int
204+
Subprocess return code (0 on success).
215205
"""
216206

217207
cmdl: list = self.get_cmd()

0 commit comments

Comments
 (0)