Skip to content

Commit dce9db6

Browse files
committed
[ModelicaSystem] rename variables: customBuildDirectory => work_directory
1 parent 335ef4f commit dce9db6

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ class ModelicaSystem:
326326
def __init__(
327327
self,
328328
command_line: Optional[list[str]] = None,
329-
customBuildDirectory: Optional[str | os.PathLike] = None,
329+
work_directory: Optional[str | os.PathLike] = None,
330330
omhome: Optional[str] = None,
331331
omc_process: Optional[OMCProcess] = None,
332332
) -> None:
@@ -336,7 +336,7 @@ def __init__(
336336
command_line: List with extra command line options as elements. The list elements are
337337
provided to omc via setCommandLineOptions(). If set, the default values will be overridden.
338338
To disable any command line options, use an empty list.
339-
customBuildDirectory: Path to a directory to be used for temporary
339+
work_directory: Path to a directory to be used for temporary
340340
files like the model executable. If left unspecified, a tmp
341341
directory will be created.
342342
omhome: path to OMC to be used when creating the OMC session (see OMCSessionZMQ).
@@ -380,7 +380,7 @@ def __init__(
380380
self._simulated = False # True if the model has already been simulated
381381
self._result_file: Optional[OMCPath] = None # for storing result file
382382

383-
self._work_dir: OMCPath = self.setWorkDirectory(customBuildDirectory)
383+
self._work_dir: OMCPath = self.setWorkDirectory(work_directory)
384384

385385
self._model_name: Optional[str] = None
386386
self._libraries: Optional[list[str | tuple[str, str]]] = None
@@ -1948,7 +1948,7 @@ def __init__(
19481948

19491949
self._mod = ModelicaSystem(
19501950
command_line=command_line,
1951-
customBuildDirectory=customBuildDirectory,
1951+
work_directory=customBuildDirectory,
19521952
omhome=omhome,
19531953
omc_process=omc_process,
19541954
)

tests/test_ModelicaSystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
139139
filePath = model_firstorder.as_posix()
140140
tmpdir = tmp_path / "tmpdir1"
141141
tmpdir.mkdir()
142-
mod = OMPython.ModelicaSystem(customBuildDirectory=tmpdir)
142+
mod = OMPython.ModelicaSystem(work_directory=tmpdir)
143143
mod.model(
144144
model_file=filePath,
145145
model_name="M",

0 commit comments

Comments
 (0)