unifhy-org / unifhy

A Unified Framework for Hydrology
https://unifhy-org.github.io/unifhy
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Add component attribute to declare what inward/outward transfers are used/produced #66

Closed ThibHlln closed 2 years ago

ThibHlln commented 2 years ago

While we have a standard interface defining the transfers of information between the components, we are aware that some components may not use all the ones they are being given or are not able to produce all the ones they are meant to produce. To some extent, this is perfectly acceptable as kong as it is clearly documented.

At the moment, there is no clear location for a component contributor to explicit declare which transfers are being effectively used and produced. Originally, I thought it would be done in the docstring, but it would be a shame to "bury" it in some text, and a new class attribute (alongside the *_info ones) could be a good place to make such declaration. In turn, this would allow for the framework to do some checks on the compatibility between components, i.e. raising warnings when an inward transfer produced is not being used, or raising an exception when an outward transfer is not being produced while required by another component.