IODE integrates all the functionalities required for the construction and the handling of economectric models and for the management of statistical series.
[ ] import Path from pathlib in the main file iode_python.pyx
Then, in every method/functions having a filename or a filepath argument in pyiode, you have to do:
[ ] update the type hints of the argument filename/filepath (something like filename/filepath: Union[str, Path])
[ ] update the accepted types for filename/filepath in the list of Parameters in the function/method documentation (filename/filepath: str or Path)
[ ] in the body of the function/method, check that the type of the passed value for filename/filepath is either str or Path (isisinstance(filename/filepath, (str, Path))
[ ] if filename/filepath is of type PATH (isinstance(filename/filepath, Path):), convert it to an absolute path as string (I think the method is 'resolve()') -> check documentation of pathlib
[ ] check if the file exist -> if not file.exists(): raise ValueError(...)
See for example Variables.low_to_high() and Variables.high_to_low() methods
@yvdabb You may want to work on this. First:
iode_python.pyx
Then, in every method/functions having a
filename
or afilepath
argument in pyiode, you have to do:filename/filepath
(something likefilename/filepath: Union[str, Path]
)filename/filepath
in the list of Parameters in the function/method documentation (filename/filepath: str or Path
)filename/filepath
is either str or Path (isisinstance(filename/filepath, (str, Path))
filename/filepath
is of type PATH (isinstance(filename/filepath, Path):
), convert it to an absolute path as string (I think the method is 'resolve()') -> check documentation of pathlibif not file.exists(): raise ValueError(...)
See for example Variables.low_to_high() and Variables.high_to_low() methods