@@ -94,7 +94,7 @@ def __init__(
9494 module_name : str = None ,
9595 # TODO: model_id for selecting the model in multi-model problems
9696 # model_id: str = None,
97- outdir : str | Path = None ,
97+ output_dir : str | Path = None ,
9898 jax : bool = False ,
9999 output_parameter_defaults : dict [str , float ] | None = None ,
100100 verbose : int | bool = logging .INFO ,
@@ -107,7 +107,7 @@ def __init__(
107107 :param compile_: Whether to compile the model extension after import.
108108 :param validate: Whether to validate the PEtab problem before import.
109109 :param module_name: The name of model module to generate.
110- :param outdir :
110+ :param output_dir :
111111 The output directory where the model files are written to.
112112 :param jax: Whether to generate a JAX model instead of a
113113 SUNDIALS model. Currently, only ``False`` is supported.
@@ -178,8 +178,8 @@ def __init__(
178178 "was specified in the PEtab problem."
179179 )
180180
181- self ._outdir : Path | None = (
182- None if outdir is None else Path (outdir ).absolute ()
181+ self ._output_dir : Path | None = (
182+ None if output_dir is None else Path (output_dir ).absolute ()
183183 )
184184 self ._jax = jax
185185 self ._non_estimated_parameters_as_constants : bool = (
@@ -281,11 +281,11 @@ def model_id(self) -> str:
281281 return self ._model_id
282282
283283 @property
284- def outdir (self ) -> Path :
284+ def output_dir (self ) -> Path :
285285 """The output directory where the model files are written to."""
286- if self ._outdir is None :
287- self ._outdir = get_model_dir (self ._module_name , jax = self ._jax )
288- return self ._outdir
286+ if self ._output_dir is None :
287+ self ._output_dir = get_model_dir (self ._module_name , jax = self ._jax )
288+ return self ._output_dir
289289
290290 def _do_import_sbml (self ):
291291 """Import the model.
@@ -309,7 +309,7 @@ def _do_import_sbml(self):
309309
310310 logger .info (
311311 f"Module name is '{ self ._module_name } '.\n "
312- f"Writing model code to '{ self .outdir } '."
312+ f"Writing model code to '{ self .output_dir } '."
313313 )
314314
315315 observation_model = self ._get_observation_model ()
@@ -354,7 +354,7 @@ def _do_import_sbml(self):
354354 if self ._jax :
355355 sbml_importer .sbml2jax (
356356 model_name = self ._module_name ,
357- output_dir = self .outdir ,
357+ output_dir = self .output_dir ,
358358 observation_model = observation_model ,
359359 verbose = self ._verbose ,
360360 # **kwargs,
@@ -365,7 +365,7 @@ def _do_import_sbml(self):
365365 allow_reinit_fixpar_initcond = True
366366 sbml_importer .sbml2amici (
367367 model_name = self ._module_name ,
368- output_dir = self .outdir ,
368+ output_dir = self .output_dir ,
369369 observation_model = observation_model ,
370370 fixed_parameters = fixed_parameters ,
371371 allow_reinit_fixpar_initcond = allow_reinit_fixpar_initcond ,
@@ -398,7 +398,7 @@ def _do_import_pysb(
398398
399399 logger .info (
400400 f"Module name is '{ self ._module_name } '.\n "
401- f"Writing model code to '{ self .outdir } '."
401+ f"Writing model code to '{ self .output_dir } '."
402402 )
403403
404404 observation_model = self ._get_observation_model ()
@@ -433,7 +433,7 @@ def _do_import_pysb(
433433 pysb2jax (
434434 model = pysb_model ,
435435 model_name = self ._module_name ,
436- output_dir = self .outdir ,
436+ output_dir = self .output_dir ,
437437 observation_model = observation_model ,
438438 verbose = self ._verbose ,
439439 pysb_model_has_obs_and_noise = True ,
@@ -445,7 +445,7 @@ def _do_import_pysb(
445445 pysb2amici (
446446 model = pysb_model ,
447447 model_name = self ._module_name ,
448- output_dir = self .outdir ,
448+ output_dir = self .output_dir ,
449449 verbose = True ,
450450 fixed_parameters = fixed_parameters ,
451451 observation_model = observation_model ,
@@ -571,15 +571,15 @@ def import_module(self, force_import: bool = False) -> amici.ModelModule:
571571 Whether to force re-import even if the model module already exists.
572572 :return: The imported model module.
573573 """
574- if not self .outdir .is_dir () or force_import :
574+ if not self .output_dir .is_dir () or force_import :
575575 if self .petab_problem .model .type_id == MODEL_TYPE_SBML :
576576 self ._do_import_sbml ()
577577 else :
578578 self ._do_import_pysb ()
579579
580580 return amici .import_model_module (
581581 self ._module_name ,
582- self .outdir ,
582+ self .output_dir ,
583583 )
584584
585585 def create_model (self ) -> amici .sim .sundials .Model :
0 commit comments