Closed FelixMau closed 1 year ago
Simplified iterating over all Processes. Goal was to provide more readable code. Unfortunately it is necessary to have two loops (where one is using pd.DataFrame.apply now: https://github.com/sedos-project/data_adapter_oemof/blob/6b6641d59d9c2662cee8bdd13054ad0554dd59fa/data_adapter_oemof/build_datapackage.py#L58-L63
Since the Adapters.parametrize_dataclass() tries to return an instance of a facade it cannot receive a Dataframe with multiple instances of the facade: https://github.com/sedos-project/data_adapter_oemof/blob/6b6641d59d9c2662cee8bdd13054ad0554dd59fa/data_adapter_oemof/adapters.py#L113-L116
Even though the behaviour of parameterize_dataclass could be changed, we should discuss whether this would be beneficial. I think it is more handy to keep the Adapter function working with a single instance.
parameterize_dataclass
Simplified iterating over all Processes. Goal was to provide more readable code. Unfortunately it is necessary to have two loops (where one is using pd.DataFrame.apply now: https://github.com/sedos-project/data_adapter_oemof/blob/6b6641d59d9c2662cee8bdd13054ad0554dd59fa/data_adapter_oemof/build_datapackage.py#L58-L63
Since the Adapters.parametrize_dataclass() tries to return an instance of a facade it cannot receive a Dataframe with multiple instances of the facade: https://github.com/sedos-project/data_adapter_oemof/blob/6b6641d59d9c2662cee8bdd13054ad0554dd59fa/data_adapter_oemof/adapters.py#L113-L116
Even though the behaviour of
parameterize_dataclass
could be changed, we should discuss whether this would be beneficial. I think it is more handy to keep the Adapter function working with a single instance.