@@ -68,11 +68,6 @@ class CmdStanModel:
6868 Stan program source file or the compiled executable, or both.
6969 This will compile the model if provided a Stan file and no executable,
7070
71- :param model_name: Model name, used for output file names.
72- Optional, default is the base filename of the Stan program file.
73- Deprecated: In version 2.0.0, model name cannot be
74- specified and will always be taken from executable.
75-
7671 :param stan_file: Path to Stan program file.
7772
7873 :param exe_file: Path to compiled executable file. Optional, unless
@@ -94,13 +89,6 @@ class CmdStanModel:
9489 :param user_header: A path to a header file to include during C++
9590 compilation.
9691 Optional.
97-
98- :param compile: Whether or not to compile the model. Default is ``True``.
99- If set to the string ``"force"``, it will always compile even if
100- an existing executable is found.
101- Deprecated: Use ``force_compile`` instead. The ability to instantiate
102- a CmdStanModel without an executable will be removed in version 2.0.0.
103-
10492 """
10593
10694 def __init__ (
@@ -115,7 +103,6 @@ def __init__(
115103 """
116104 Initialize object given constructor args.
117105
118- :param model_name: Deprecated. Model name, used for output file names.
119106 :param stan_file: Path to Stan program file.
120107 :param exe_file: Path to compiled executable file.
121108 :param force_compile: Whether or not to force recompilation if
@@ -206,17 +193,15 @@ def __init__(
206193 get_logger ().debug ("TBB already found in load path" )
207194
208195 def __repr__ (self ) -> str :
209- repr = 'CmdStanModel: name={}' . format ( self . _name )
210- repr = '{} \n \t stan_file={}' . format ( repr , self . _stan_file )
211- repr = '{} \n \t exe_file={}' . format ( repr , self ._exe_file )
212- return repr
196+ return (
197+ f"CmdStanModel( stan_file={ self . stan_file !r } , "
198+ f" exe_file={ self .exe_file !r } )"
199+ )
213200
214201 @property
215202 def name (self ) -> str :
216203 """
217- Model name used in output filename templates. Default is basename
218- of Stan program or exe file, unless specified in call to constructor
219- via argument ``model_name``.
204+ Model name used in output filename templates.
220205 """
221206 return self ._name
222207
@@ -226,7 +211,7 @@ def stan_file(self) -> OptionalPath:
226211 return self ._stan_file
227212
228213 @property
229- def exe_file (self ) -> Union [ os . PathLike , str ] :
214+ def exe_file (self ) -> str :
230215 """Full path to Stan exe file."""
231216 return self ._exe_file
232217
@@ -237,7 +222,7 @@ def exe_info(self) -> dict[str, str]:
237222 """
238223 result : dict [str , str ] = {}
239224 info = StringIO ()
240- do_command (cmd = [str ( self .exe_file ) , 'info' ], fd_out = info )
225+ do_command (cmd = [self .exe_file , 'info' ], fd_out = info )
241226 lines = info .getvalue ().split ('\n ' )
242227 for line in lines :
243228 kv_pair = [x .strip () for x in line .split ('=' )]
0 commit comments