OSeMOSYS / otoole

OSeMOSYS Tools for Energy
https://otoole.readthedocs.io
MIT License
23 stars 17 forks source link

[FEATURE]: otoole can not reach `ReadStrategy._get_missing_input_dataframes(...)` #221

Open trevorb1 opened 5 months ago

trevorb1 commented 5 months ago

Feature Request

The ._get_missing_input_dataframes(...) method is meant to align the input_data with the config file data. It will add empty dataframes if the user has not supplied data. However, the method ReadStrrategy._compare_read_to_expected(...) is often called before ._get_missing_input_dataframes(...) in the concrete classes. ._compare_read_to_expected(...) will raise a OtooleNameMismatchError if the input data and config data do not match (which is not entirely clear from the name OtooleNameMismatchError).

Is your feature related to a bug?

169

Suggested Solution

I guess we could:

  1. Get rid of the ._compare_read_to_expected(...) method, and just raise a warning if the input data and config data dont match
  2. Change the error handling to a flag option (see issue #169)
  3. Get rid of the ._get_missing_input_dataframes(...) method and strictly enforce data consistency (which may be tedious for legacy models)

Additional Info

No response