Open
Description
According to the BMI spec, the filename argument for the BMI initialize method must not be optional and must be a string. Right now BmiHeat.initialize
accepts either None
, a file-like object, or a string. I think this should be changed so that it only accepts a string that is a path to a configuration file.
i.e.
def initialize(self, filename: str):
with open(filename) as file_obj:
self._model = Heat.from_file_like(file_obj)
...
Actually, in looking at what's there now, I think there's also a bug. Heat.from_file_like
must take a stream, not a string
i.e.
Heat.from_file_like(file_obj.read())
should be
Heat.from_file_like(file_obj)
Metadata
Metadata
Assignees
Labels
No labels