BreakingBytes / simkit

Model Simulation Framework
http://breakingbytes.github.io/simkit/
BSD 3-Clause "New" or "Revised" License
27 stars 16 forks source link

move registry metadata to attribute called called metadata as dictionaries #81

Open mikofski opened 7 years ago

mikofski commented 7 years ago

since the metadata are inferred, the new convention in carousel is to put them into a published attribute as a dictionary.

For example, currently metadata are dynamically created at runtime, which can be confusing

my_reg = <MyRegistry[dict](
    reg_item_1: values ...,
    reg_item_2: values ...,
    ...
    meta_1: <dict(
        reg_item_1: values ...,
        reg_item_2: values ...,
        ...)>
    meta_2: <dict(
        reg_item_1: values ...,
        reg_item_2: values ...,
        ...)>
    ...
)>

where the meta_n are created dynamically from the meta_names value of MyReg at runtime. Since these names are inferred, following the new convention they should be placed in a published attribute as a dictionary like this:

my_reg = <MyRegistry[dict](
    reg_item_1: values ...,
    reg_item_2: values ...,
    ...
    meta_data: <dict(
        meta_1: <dict(
            reg_item_1: values ...,
            reg_item_2: values ...,
            ...)>
        meta_2: <dict(
            reg_item_1: values ...,
            reg_item_2: values ...,
            ...)>
        ...
)>