sedos-project / data_adapter_oemof

This respository holds the data adapters to connect oemof with the OEDatamodel-concrete.
GNU Affero General Public License v3.0
0 stars 1 forks source link

Not all values of an extra fields containing periodic values are moved to datapackage #55

Closed henhuy closed 11 months ago

henhuy commented 11 months ago

See #53 for attribute invest_relation_output_capacity which holds multiple values, but only first value is written to datapackage. Adapter/Mapper should somehow "see" or "know" that this is an periodic value. i think sequence detection has to be adapted for extra_fields - maybe Field also needs a boolean indicator is_list (or similar)?!

FelixMau commented 11 months ago

Thank you! I had a look and found that everything is working as expected if I set extra_fields = Adapter.extra_fields + (Field(name="invest_relation_output_capacity", type=typing.Sequence),) in the Adapter. As the values are not changing the Values are not written to a list but kept as a float. Only changing values are using the periodic approach. I think we can close if this is the behavior we wanted to achieve. I will update Docstrings and post here they, as they are not speaking a lot :)