phi-grib / flame

Modeling framework for eTRANSAFE project
GNU General Public License v3.0
12 stars 10 forks source link

the `input_type` parameter is infered automatically in `idata.run()`? #78

Closed BielStela closed 5 years ago

BielStela commented 6 years ago

From the code base itself is not clear if the input_type is read from the parameters.yml or is inferred from idata file extension:


if self.parameters['input_type'] == 'ext_data':
            input_type = 'ext_data'
        else:
            suffix = pathlib.Path(self.ifile).suffix
            if suffix == '.tsv':
                input_type = 'data'
            elif suffix == '.sdf':
                input_type = 'molecule'
            else:
                input_type = self.parameters['input_type']

If the goal is to have a pseudo automatic file extension inference it should be clearly commented in the docstring and inline comments

manuelpastor commented 5 years ago

You are right. It does not makes sense. I am removing this code, so the input_type is defined in the parameters.yal and nowhere else