Skip to content

Request parameters

Martin Lange requested to merge request-parameters into main

This MR implements the exchange of info about data, like grid specification and othe metadata.

Features:

  • Works with iterative connect
  • Adapters can automatically determine source and target properties/requirements, i.e. from what to what to convert (e.g. grid spec or units)
  • Possible to receive (parts of) the info from the source
  • Possible to receive (parts of) the info from the target
  • Terminal inputs (i.e. not an adapter) check compatibility with the source info; e.g. detects missing regridding
  • Wrote ConnectHelper to make the connect phase much easier to implement; it basically tracks what has already been done and the received data and info, and determines the component status

To note:

  • Can't initialize inputs with info, as it needs to be exchanged during the connect phase; can't be done by the scheduler
  • Can't initialize outputs with grid= and meta=, but with an Info objects; would not let us distinguish between missing and to-be-filled info otherwise

A lot of things can now be exchanged during the connect phase:

  • push data info to outputs
  • push data to outputs
  • exchange input's data info the with source
    • may update source data info in case of overwrite is intended
  • pull data from inputs

To make a component fully compatible with connections to other components that need info or data from it, all this needs to be implemented to work in an iterative way. tools.connect_helper.ConnectHelper aims at taking most of this burden from component developers.

Edited by Martin Lange

Merge request reports