Implement default metadata for components and adapters
This implements default metadata as specified in landtrans/landtech/management#233
@muellese Should we somehow try to get the actual slot metadata (like units, grid, ...) into here too? Not sure how to represent grids, but it could IMO be useful.
Done.
TODO:
-
Update docs -
Add book section -
Overwrite/implement for existing components and adapters -
Update CHANGELOG -
Merge !273 (merged)
Example
{'adapters': {'Scale@2391719058640': {'class': 'finam.adapters.base.Scale',
'in_info': {'grid': 'NoGrid (0D)',
'units': ''},
'name': 'Scale',
'out_info': {'grid': 'NoGrid (0D)',
'units': ''}},
'Scale@2391719059168': {'class': 'finam.adapters.base.Scale',
'in_info': {'grid': 'NoGrid (0D)',
'units': ''},
'name': 'Scale',
'out_info': {'grid': 'NoGrid (0D)',
'units': ''}}},
'components': {'MockupComponent@2391719110688': {'class': 'test_schedule.MockupComponent',
'inputs': {},
'name': 'MockupComponent',
'outputs': {'Output': {'class': 'finam.sdk.output.Output',
'has_targets': True,
'info': {'grid': 'NoGrid (0D)',
'units': ''},
'is_static': False,
'name': 'Output'}}},
'MockupDependentComponent@2391719111408': {'class': 'test_schedule.MockupDependentComponent',
'inputs': {'Input': {'class': 'finam.sdk.input.Input',
'info': {'grid': 'NoGrid (0D)',
'units': ''},
'is_static': False,
'name': 'Input'}},
'name': 'MockupDependentComponent',
'outputs': {}},
'MockupDependentComponent@2391719111696': {'class': 'test_schedule.MockupDependentComponent',
'inputs': {'Input': {'class': 'finam.sdk.input.Input',
'info': {'grid': 'NoGrid (0D)',
'units': ''},
'is_static': False,
'name': 'Input'}},
'name': 'MockupDependentComponent',
'outputs': {}}},
'links': [{'from': {'component': 'MockupComponent@2391719110688',
'output': 'Output'},
'to': {'adapter': 'Scale@2391719059168'}},
{'from': {'component': 'MockupComponent@2391719110688',
'output': 'Output'},
'to': {'component': 'MockupDependentComponent@2391719111696',
'input': 'Input'}},
{'from': {'adapter': 'Scale@2391719058640'},
'to': {'component': 'MockupDependentComponent@2391719111408',
'input': 'Input'}},
{'from': {'adapter': 'Scale@2391719059168'},
'to': {'adapter': 'Scale@2391719058640'}}],
'time_frame': [datetime.datetime(2000, 1, 1, 0, 0), None]}
Edited by Martin Lange