Skip to content

Commit 5e247ab

Browse files
committed
[ModelicaSystem] rename variables: customBuildDirectory => work_directory
1 parent 81f88de commit 5e247ab

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
@@ -330,7 +330,7 @@ class ModelicaSystem:
330330
def __init__(
331331
self,
332332
command_line: Optional[list[str]] = None,
333-
customBuildDirectory: Optional[str | os.PathLike] = None,
333+
work_directory: Optional[str | os.PathLike] = None,
334334
omhome: Optional[str] = None,
335335
omc_process: Optional[OMCProcess] = None,
336336
) -> None:
@@ -340,7 +340,7 @@ def __init__(
340340
command_line: List with extra command line options as elements. The list elements are
341341
provided to omc via setCommandLineOptions(). If set, the default values will be overridden.
342342
To disable any command line options, use an empty list.
343-
customBuildDirectory: Path to a directory to be used for temporary
343+
work_directory: Path to a directory to be used for temporary
344344
files like the model executable. If left unspecified, a tmp
345345
directory will be created.
346346
omhome: path to OMC to be used when creating the OMC session (see OMCSessionZMQ).
@@ -391,7 +391,7 @@ def __init__(
391391
self._simulated = False # True if the model has already been simulated
392392
self._result_file: Optional[OMCPath] = None # for storing result file
393393

394-
self._work_dir: OMCPath = self.setWorkDirectory(customBuildDirectory)
394+
self._work_dir: OMCPath = self.setWorkDirectory(work_directory)
395395

396396
self._model_name: Optional[str] = None
397397
self._libraries: Optional[list[str | tuple[str, str]]] = None
@@ -1981,7 +1981,7 @@ def __init__(
19811981

19821982
self._mod = ModelicaSystem(
19831983
command_line=command_line,
1984-
customBuildDirectory=customBuildDirectory,
1984+
work_directory=customBuildDirectory,
19851985
omhome=omhome,
19861986
omc_process=omc_process,
19871987
)

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)